/[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.11 by molod, Thu Jun 10 20:53:19 2004 UTC revision 1.12 by molod, Tue Jul 13 21:11:08 2004 UTC
# Line 2  C $Header$ Line 2  C $Header$
2  C $Name$  C $Name$
3    
4        subroutine fizhi_init_veg(mythid,vegdata,im,jm,Nsx,Nsy,Nxg,Nyg,        subroutine fizhi_init_veg(mythid,vegdata,im,jm,Nsx,Nsy,Nxg,Nyg,
5       .maxtyp,nchp,lons,lats,surftype,tilefrac,igrd,ityp,chfr,chlt,chlon)       . maxtyp,nchp,nchpland,lons,lats,surftype,tilefrac,igrd,ityp,chfr,
6         . chlt,chlon)
7  C***********************************************************************  C***********************************************************************
8  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,
9  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 52  C*************************************** Line 53  C***************************************
53  #include "CPP_EEOPTIONS.h"  #include "CPP_EEOPTIONS.h"
54  #include "EEPARAMS.h"  #include "EEPARAMS.h"
55    
56        integer mythid,im,jm,maxtyp,nchp,Nsx,Nsy,Nxg,Nyg        integer mythid,im,jm,maxtyp,nchp,nchpland,Nsx,Nsy,Nxg,Nyg
57        integer surftype(im,jm,maxtyp,Nsx,Nsy)        integer surftype(im,jm,maxtyp,Nsx,Nsy)
58        integer igrd(nchp,Nsx,Nsy),ityp(nchp,Nsx,Nsy)        integer igrd(nchp,Nsx,Nsy),ityp(nchp,Nsx,Nsy)
59        _RL tilefrac(im,jm,maxtyp,Nsx,Nsy)        _RL tilefrac(im,jm,maxtyp,Nsx,Nsy)
# Line 60  C*************************************** Line 61  C***************************************
61        _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)
62        character*40 vegdata        character*40 vegdata
63        integer imdata,jmdata,Nxgdata,Nygdata        integer imdata,jmdata,Nxgdata,Nygdata
64        integer nchplocal,nchpland,biglobal,bjglobal        integer nchplocal,biglobal,bjglobal
65    
66        integer*4 im_32, jm_32, Nxg_32, Nyg_32        integer*4 im_32, jm_32, Nxg_32, Nyg_32
67        integer*4 iveg_32(im,jm,maxtyp,Nxg,Nyg)        integer*4 iveg_32(im,jm,maxtyp,Nxg,Nyg)
# Line 96  C*************************************** Line 97  C***************************************
97         print *         print *
98         call exit(102)         call exit(102)
99        ENDIF        ENDIF
100                                                                                          ENDIF
101    
102        DO BJ = myByLo(myThid), myByHi(myThid)        DO BJ = myByLo(myThid), myByHi(myThid)
103        DO BI = myBxLo(myThid), myBxHi(myThid)        DO BI = myBxLo(myThid), myBxHi(myThid)
104    
# Line 119  c      chfr :  vegetation fraction Line 121  c      chfr :  vegetation fraction
121  c      chlon:  chip longitude  c      chlon:  chip longitude
122  c      chlt :  chip latitude  c      chlt :  chip latitude
123    
124  c  nchplnd<=nchplocal is the actual number of land chips  c  nchpland<=nchplocal is the actual number of land chips
125    
126  c land points  c land points
127  c -----------  c -----------
128        nchplnd = 0        nchpland = 0
129        do k=1,maxtyp        do k=1,maxtyp
130        do j=1,jm        do j=1,jm
131        do i=1,im        do i=1,im
132        if(surftype(i,j,k,bi,bj).lt.100.and.        if(surftype(i,j,k,bi,bj).lt.100.and.
133       .                                  tilefrac(i,j,k,bi,bj).gt.0.)then       .                                  tilefrac(i,j,k,bi,bj).gt.0.)then
134               nchplnd  = nchplnd + 1               nchpland  = nchpland + 1
135         igrd (nchplnd,bi,bj) = i + (j-1)*im         igrd (nchpland,bi,bj) = i + (j-1)*im
136         ityp (nchplnd,bi,bj) = surftype(i,j,k,bi,bj)         ityp (nchpland,bi,bj) = surftype(i,j,k,bi,bj)
137         chfr (nchplnd,bi,bj) = tilefrac(i,j,k,bi,bj)         chfr (nchpland,bi,bj) = tilefrac(i,j,k,bi,bj)
138         chlon(nchplnd,bi,bj) = lons(i,j,bi,bj)         chlon(nchpland,bi,bj) = lons(i,j,bi,bj)
139         chlt (nchplnd,bi,bj) = lats(i,j,bi,bj)         chlt (nchpland,bi,bj) = lats(i,j,bi,bj)
140        endif        endif
141        enddo        enddo
142        enddo        enddo
# Line 142  c ----------- Line 144  c -----------
144    
145  c ocean points  c ocean points
146  c ------------  c ------------
147        nchplocal = nchplnd        nchplocal = nchpland
148    
149        do k=1,maxtyp        do k=1,maxtyp
150        do j=1,jm        do j=1,jm
# Line 162  c ------------ Line 164  c ------------
164    
165        print *, 'bi ',bi,' bj ',bj        print *, 'bi ',bi,' bj ',bj
166        print *, 'Number of Total Tiles: ',nchplocal        print *, 'Number of Total Tiles: ',nchplocal
167        print *, 'Number of Land  Tiles: ',nchplnd        print *, 'Number of Land  Tiles: ',nchpland
168        print *        print *
169    
170        ENDDO        ENDDO

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22