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

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

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

revision 1.17 by edhill, Sun Oct 10 06:08:48 2004 UTC revision 1.18 by molod, Fri Oct 22 19:20:55 2004 UTC
# Line 55  C*************************************** Line 55  C***************************************
55  #include "EEPARAMS.h"  #include "EEPARAMS.h"
56  #include "PARAMS.h"  #include "PARAMS.h"
57    
58        integer mythid,im,jm,maxtyp,nchp,nchptot,nchpland,Nsx,Nsy,Nxg,Nyg        integer mythid,im,jm,maxtyp,nchp,Nsx,Nsy,Nxg,Nyg
59          integer nchptot(Nsx,Nsy), nchpland(Nsx,Nsy)
60        integer surftype(im,jm,maxtyp,Nsx,Nsy)        integer surftype(im,jm,maxtyp,Nsx,Nsy)
61        integer igrd(nchp,Nsx,Nsy),ityp(nchp,Nsx,Nsy)        integer igrd(nchp,Nsx,Nsy),ityp(nchp,Nsx,Nsy)
62        _RL tilefrac(im,jm,maxtyp,Nsx,Nsy)        _RL tilefrac(im,jm,maxtyp,Nsx,Nsy)
# Line 170  c     nchpland<=nchptot is the actual nu Line 171  c     nchpland<=nchptot is the actual nu
171    
172  c         land points  c         land points
173  c         -----------  c         -----------
174            nchpland = 0            nchpland(bi,bj) = 0
175            do k=1,maxtyp            do k=1,maxtyp
176              do j=1,jm              do j=1,jm
177                do i=1,im                do i=1,im
178                  if(surftype(i,j,k,bi,bj).lt.100 .and.                  if(surftype(i,j,k,bi,bj).lt.100 .and.
179       .               tilefrac(i,j,k,bi,bj).gt.0.) then       .               tilefrac(i,j,k,bi,bj).gt.0.) then
180                    nchpland  = nchpland + 1                    nchpland(bi,bj)  = nchpland(bi,bj) + 1
181                    igrd (nchpland,bi,bj) = i + (j-1)*im                    igrd (nchpland(bi,bj),bi,bj) = i + (j-1)*im
182                    ityp (nchpland,bi,bj) = surftype(i,j,k,bi,bj)                    ityp (nchpland(bi,bj),bi,bj) = surftype(i,j,k,bi,bj)
183                    chfr (nchpland,bi,bj) = tilefrac(i,j,k,bi,bj)                    chfr (nchpland(bi,bj),bi,bj) = tilefrac(i,j,k,bi,bj)
184                    chlon(nchpland,bi,bj) = lons(i,j,bi,bj)                    chlon(nchpland(bi,bj),bi,bj) = lons(i,j,bi,bj)
185                    chlt (nchpland,bi,bj) = lats(i,j,bi,bj)                    chlt (nchpland(bi,bj),bi,bj) = lats(i,j,bi,bj)
186                  endif                  endif
187                enddo                enddo
188              enddo              enddo
# Line 189  c         ----------- Line 190  c         -----------
190                        
191  c         ocean points  c         ocean points
192  c         ------------  c         ------------
193            nchptot = nchpland            nchptot(bi,bj) = nchpland(bi,bj)
194                        
195            do k=1,maxtyp            do k=1,maxtyp
196              do j=1,jm              do j=1,jm
197                do i=1,im                do i=1,im
198                  if(surftype(i,j,k,bi,bj).ge.100 .and.                  if(surftype(i,j,k,bi,bj).ge.100 .and.
199       .               tilefrac(i,j,k,bi,bj).gt.0.) then       .               tilefrac(i,j,k,bi,bj).gt.0.) then
200                    nchptot  = nchptot + 1                    nchptot(bi,bj)  = nchptot(bi,bj) + 1
201                    igrd (nchptot,bi,bj) = i + (j-1)*im                    igrd (nchptot(bi,bj),bi,bj) = i + (j-1)*im
202                    ityp (nchptot,bi,bj) = surftype(i,j,k,bi,bj)                    ityp (nchptot(bi,bj),bi,bj) = surftype(i,j,k,bi,bj)
203                    chfr (nchptot,bi,bj) = tilefrac(i,j,k,bi,bj)                    chfr (nchptot(bi,bj),bi,bj) = tilefrac(i,j,k,bi,bj)
204                    chlon(nchptot,bi,bj) = lons(i,j,bi,bj)                    chlon(nchptot(bi,bj),bi,bj) = lons(i,j,bi,bj)
205                    chlt (nchptot,bi,bj) = lats(i,j,bi,bj)                    chlt (nchptot(bi,bj),bi,bj) = lats(i,j,bi,bj)
206                  endif                  endif
207                enddo                enddo
208              enddo              enddo
209            enddo            enddo
210                        
211            if(bi.eq.1.and.bj.eq.1)then            print *,'Number of Total Tiles for bi=',bi,': ',nchptot(bi,bj)
212            print *, 'Number of Total Tiles: ',nchptot            print *,'Number of Land  Tiles for bi=',bi,': ',nchpland(bi,bj)
213            print *, 'Number of Land  Tiles: ',nchpland  
           print *  
           endif  
             
214          ENDDO          ENDDO
215        ENDDO        ENDDO
216                

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.22