/[MITgcm]/MITgcm/pkg/fizhi/fizhi_init_vegsurftiles.F
ViewVC logotype

Diff of /MITgcm/pkg/fizhi/fizhi_init_vegsurftiles.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4 by molod, Wed May 11 19:04:01 2005 UTC revision 1.9 by molod, Sat Jun 23 14:53:24 2007 UTC
# Line 44  C     !LOCAL VARIABLES: Line 44  C     !LOCAL VARIABLES:
44        integer bislot,bjslot,iunit        integer bislot,bjslot,iunit
45        integer recl        integer recl
46        integer bi,bj,fileprec        integer bi,bj,fileprec
47        Real*8 globalarr(Nx,Ny,8)        integer xsize, ysize
48    #if defined(ALLOW_EXCH2)
49           PARAMETER ( xsize = exch2_domain_nxt * sNx )
50           PARAMETER ( ysize = exch2_domain_nyt * sNy )
51    #else
52           PARAMETER ( xsize = Nx )
53           PARAMETER ( ysize = Ny )
54    #endif
55          Real*8 globalarr(xsize,ysize,8)
56        _RL tempgrid(sNx,sNy)        _RL tempgrid(sNx,sNy)
57        _RL temptile(nchp)        _RL temptile(nchp)
58        _RL fracland(sNx,sNy,Nsx,Nsy)        _RL fracland(sNx,sNy,Nsx,Nsy)
59    
60        ihour = nhms/10000        ihour = nhms/10000
61          if(xsize.eq.192) then
62        WRITE(fn,'(a,I8,a,I2.2,a)')'vegtiles_cs32.d',nymd,'z',ihour,'.bin'        WRITE(fn,'(a,I8,a,I2.2,a)')'vegtiles_cs32.d',nymd,'z',ihour,'.bin'
63          elseif(xsize.eq.612) then
64          WRITE(fn,'(a,I8,a,I2.2,a)')'vegtiles_cs102.d',nymd,'z',ihour,'.bin'
65          else
66          print *,' xsize is ',xsize
67          stop 'do not seem to have correct vegtiles data '
68          endif
69        fileprec = 64        fileprec = 64
70    
71        call MDSFINDUNIT( iunit, mythid )        call MDSFINDUNIT( iunit, mythid )
# Line 81  C Only do I/O if I am the master thread Line 96  C Only do I/O if I am the master thread
96  #endif /* ALLOW_EXCH2 */  #endif /* ALLOW_EXCH2 */
97    
98        call get_landfrac(sNx,sNy,Nsx,Nsy,bi,bj,maxtyp,        call get_landfrac(sNx,sNy,Nsx,Nsy,bi,bj,maxtyp,
99       .        surftype,tilefrac,fracland)       .        surftype,tilefrac,fracland(1,1,bi,bj))
100    
101         do j = 1,sNy         do j = 1,sNy
102         do i = 1,sNx         do i = 1,sNx
103          tempgrid(i,j) = globalarr(i+bislot,j+bjslot,1)          tempgrid(i,j) = globalarr(i+bislot,j+bjslot,1)
104         enddo         enddo
105         enddo         enddo
106         call grd2msc(tempgrid,sNx,sNy,igrd,temptile,nchp,nchptot(bi,bj))         call grd2msc(tempgrid,sNx,sNy,igrd(1,bi,bj),
107         .                 temptile,nchp,nchptot(bi,bj))
108         do n = 1,nchp         do n = 1,nchp
109          tcanopy(n,bi,bj) = temptile(n)          tcanopy(n,bi,bj) = temptile(n)
110         enddo         enddo
# Line 100  C Only do I/O if I am the master thread Line 116  C Only do I/O if I am the master thread
116       .    tempgrid(i,j) = globalarr(i+bislot,j+bjslot,1) - 0.5       .    tempgrid(i,j) = globalarr(i+bislot,j+bjslot,1) - 0.5
117         enddo         enddo
118         enddo         enddo
119         call grd2msc(tempgrid,sNx,sNy,igrd,temptile,nchp,nchptot(bi,bj))         call grd2msc(tempgrid,sNx,sNy,igrd(1,bi,bj),
120         .                    temptile,nchp,nchptot(bi,bj))
121         do n = 1,nchp         do n = 1,nchp
122          tdeep(n,bi,bj) = temptile(n)          tdeep(n,bi,bj) = temptile(n)
123         enddo         enddo
# Line 112  C Only do I/O if I am the master thread Line 129  C Only do I/O if I am the master thread
129       .    tempgrid(i,j) = 0.01       .    tempgrid(i,j) = 0.01
130         enddo         enddo
131         enddo         enddo
132         call grd2msc(tempgrid,sNx,sNy,igrd,temptile,nchp,nchptot(bi,bj))         call grd2msc(tempgrid,sNx,sNy,igrd(1,bi,bj),
133         .                    temptile,nchp,nchptot(bi,bj))
134         do n = 1,nchp         do n = 1,nchp
135          ecanopy(n,bi,bj) = temptile(n)          ecanopy(n,bi,bj) = temptile(n)
136         enddo         enddo
# Line 124  C Only do I/O if I am the master thread Line 142  C Only do I/O if I am the master thread
142       .    tempgrid(i,j) = 0.7       .    tempgrid(i,j) = 0.7
143         enddo         enddo
144         enddo         enddo
145         call grd2msc(tempgrid,sNx,sNy,igrd,temptile,nchp,nchptot(bi,bj))         call grd2msc(tempgrid,sNx,sNy,igrd(1,bi,bj),
146         .                    temptile,nchp,nchptot(bi,bj))
147         do n = 1,nchp         do n = 1,nchp
148          swetshal(n,bi,bj) = temptile(n)          swetshal(n,bi,bj) = temptile(n)
149         enddo         enddo
# Line 136  C Only do I/O if I am the master thread Line 155  C Only do I/O if I am the master thread
155       .    tempgrid(i,j) = 0.5       .    tempgrid(i,j) = 0.5
156         enddo         enddo
157         enddo         enddo
158         call grd2msc(tempgrid,sNx,sNy,igrd,temptile,nchp,nchptot(bi,bj))         call grd2msc(tempgrid,sNx,sNy,igrd(1,bi,bj),
159         .                    temptile,nchp,nchptot(bi,bj))
160         do n = 1,nchp         do n = 1,nchp
161          swetroot(n,bi,bj) = temptile(n)          swetroot(n,bi,bj) = temptile(n)
162         enddo         enddo
# Line 148  C Only do I/O if I am the master thread Line 168  C Only do I/O if I am the master thread
168       .    tempgrid(i,j) = 0.3       .    tempgrid(i,j) = 0.3
169         enddo         enddo
170         enddo         enddo
171         call grd2msc(tempgrid,sNx,sNy,igrd,temptile,nchp,nchptot(bi,bj))         call grd2msc(tempgrid,sNx,sNy,igrd(1,bi,bj),
172         .                    temptile,nchp,nchptot(bi,bj))
173         do n = 1,nchp         do n = 1,nchp
174          swetdeep(n,bi,bj) = temptile(n)          swetdeep(n,bi,bj) = temptile(n)
175         enddo         enddo
# Line 160  C Only do I/O if I am the master thread Line 181  C Only do I/O if I am the master thread
181       .    tempgrid(i,j) = 0.       .    tempgrid(i,j) = 0.
182         enddo         enddo
183         enddo         enddo
184         call grd2msc(tempgrid,sNx,sNy,igrd,temptile,nchp,nchptot(bi,bj))         call grd2msc(tempgrid,sNx,sNy,igrd(1,bi,bj),
185         .                    temptile,nchp,nchptot(bi,bj))
186         do n = 1,nchp         do n = 1,nchp
187          snodep(n,bi,bj) = temptile(n)          snodep(n,bi,bj) = temptile(n)
188         enddo         enddo
# Line 172  C Only do I/O if I am the master thread Line 194  C Only do I/O if I am the master thread
194       .    tempgrid(i,j) = 0.       .    tempgrid(i,j) = 0.
195         enddo         enddo
196         enddo         enddo
197         call grd2msc(tempgrid,sNx,sNy,igrd,temptile,nchp,nchptot(bi,bj))         call grd2msc(tempgrid,sNx,sNy,igrd(1,bi,bj),
198         .                    temptile,nchp,nchptot(bi,bj))
199         do n = 1,nchp         do n = 1,nchp
200          capac(n,bi,bj) = temptile(n)          capac(n,bi,bj) = temptile(n)
201         enddo         enddo

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22