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 |
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) |
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) |
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) |
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 |