/[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.14 by edhill, Thu Jul 22 15:56:01 2004 UTC revision 1.15 by molod, Fri Jul 23 22:32:28 2004 UTC
# Line 4  C $Name$ Line 4  C $Name$
4  #include "FIZHI_OPTIONS.h"  #include "FIZHI_OPTIONS.h"
5    
6        subroutine fizhi_init_veg(mythid,vegdata,im,jm,Nsx,Nsy,Nxg,Nyg,        subroutine fizhi_init_veg(mythid,vegdata,im,jm,Nsx,Nsy,Nxg,Nyg,
7       . maxtyp,nchp,nchpland,lons,lats,surftype,tilefrac,igrd,ityp,chfr,       . maxtyp,nchp,nchptot,nchpland,lons,lats,surftype,tilefrac,
8       . chlt,chlon)       . igrd,ityp,chfr,chlt,chlon)
9  C***********************************************************************  C***********************************************************************
10  C Subroutine fizhi_init_veg - routine to read in the land surface types,  C Subroutine fizhi_init_veg - routine to read in the land surface types,
11  C      interpolate to the models grid, and set up tile space for use by  C      interpolate to the models grid, and set up tile space for use by
# Line 54  C*************************************** Line 54  C***************************************
54        implicit none        implicit none
55  #include "EEPARAMS.h"  #include "EEPARAMS.h"
56    
57        integer mythid,im,jm,maxtyp,nchp,nchpland,Nsx,Nsy,Nxg,Nyg        integer mythid,im,jm,maxtyp,nchp,nchptot,nchpland,Nsx,Nsy,Nxg,Nyg
58        integer surftype(im,jm,maxtyp,Nsx,Nsy)        integer surftype(im,jm,maxtyp,Nsx,Nsy)
59        integer igrd(nchp,Nsx,Nsy),ityp(nchp,Nsx,Nsy)        integer igrd(nchp,Nsx,Nsy),ityp(nchp,Nsx,Nsy)
60        _RL tilefrac(im,jm,maxtyp,Nsx,Nsy)        _RL tilefrac(im,jm,maxtyp,Nsx,Nsy)
# Line 62  C*************************************** Line 62  C***************************************
62        _RL chfr(nchp,Nsx,Nsy),chlt(nchp,Nsx,Nsy),chlon(nchp,Nsx,Nsy)        _RL chfr(nchp,Nsx,Nsy),chlt(nchp,Nsx,Nsy),chlon(nchp,Nsx,Nsy)
63        character*40 vegdata        character*40 vegdata
64        integer imdata,jmdata,Nxgdata,Nygdata        integer imdata,jmdata,Nxgdata,Nygdata
65        integer nchplocal,biglobal,bjglobal        integer biglobal,bjglobal
66    
67        integer*4 im_32, jm_32, Nxg_32, Nyg_32        integer*4 im_32, jm_32, Nxg_32, Nyg_32
68        integer*4 iveg_32(im,jm,maxtyp,Nxg,Nyg)        integer*4 iveg_32(im,jm,maxtyp,Nxg,Nyg)
# Line 160  c      chfr :  vegetation fraction Line 160  c      chfr :  vegetation fraction
160  c      chlon:  chip longitude  c      chlon:  chip longitude
161  c      chlt :  chip latitude  c      chlt :  chip latitude
162    
163  c     nchpland<=nchplocal is the actual number of land chips  c     nchpland<=nchptot is the actual number of land chips
164    
165        DO BJ = myByLo(myThid), myByHi(myThid)        DO BJ = myByLo(myThid), myByHi(myThid)
166          DO BI = myBxLo(myThid), myBxHi(myThid)          DO BI = myBxLo(myThid), myBxHi(myThid)
# Line 186  c         ----------- Line 186  c         -----------
186                        
187  c         ocean points  c         ocean points
188  c         ------------  c         ------------
189            nchplocal = nchpland            nchptot = nchpland
190                        
191            do k=1,maxtyp            do k=1,maxtyp
192              do j=1,jm              do j=1,jm
193                do i=1,im                do i=1,im
194                  if(surftype(i,j,k,bi,bj).ge.100 .and.                  if(surftype(i,j,k,bi,bj).ge.100 .and.
195       .               tilefrac(i,j,k,bi,bj).gt.0.) then       .               tilefrac(i,j,k,bi,bj).gt.0.) then
196                    nchplocal  = nchplocal + 1                    nchptot  = nchptot + 1
197                    igrd (nchplocal,bi,bj) = i + (j-1)*im                    igrd (nchptot,bi,bj) = i + (j-1)*im
198                    ityp (nchplocal,bi,bj) = surftype(i,j,k,bi,bj)                    ityp (nchptot,bi,bj) = surftype(i,j,k,bi,bj)
199                    chfr (nchplocal,bi,bj) = tilefrac(i,j,k,bi,bj)                    chfr (nchptot,bi,bj) = tilefrac(i,j,k,bi,bj)
200                    chlon(nchplocal,bi,bj) = lons(i,j,bi,bj)                    chlon(nchptot,bi,bj) = lons(i,j,bi,bj)
201                    chlt (nchplocal,bi,bj) = lats(i,j,bi,bj)                    chlt (nchptot,bi,bj) = lats(i,j,bi,bj)
202                  endif                  endif
203                enddo                enddo
204              enddo              enddo
205            enddo            enddo
206                        
207            print *, 'bi ',bi,' bj ',bj            if(bi.eq.1.and.bj.eq.1)then
208            print *, 'Number of Total Tiles: ',nchplocal            print *, 'Number of Total Tiles: ',nchptot
209            print *, 'Number of Land  Tiles: ',nchpland            print *, 'Number of Land  Tiles: ',nchpland
210            print *            print *
211              endif
212                        
213          ENDDO          ENDDO
214        ENDDO        ENDDO

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.22