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 |
50 |
C 100: OCEAN |
C 100: OCEAN |
51 |
C*********************************************************************** |
C*********************************************************************** |
52 |
implicit none |
implicit none |
53 |
|
#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 |
real tilefrac(im,jm,maxtyp,Nsx,Nsy) |
_RL tilefrac(im,jm,maxtyp,Nsx,Nsy) |
60 |
real lats(im,jm,nSx,nSy), lons(im,jm,nSx,nSy) |
_RL lats(im,jm,nSx,nSy), lons(im,jm,nSx,nSy) |
61 |
real 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) |
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 |
|
|
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 |
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 |
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 |