1 |
C $Header$ |
C $Header$ |
2 |
C $Name$ |
C $Name$ |
3 |
|
|
4 |
subroutine fizhi_init_veg ( mythid, vegdata,im,jm,bi,bj,maxtyp, |
subroutine fizhi_init_veg(mythid,vegdata,im,jm,maxbi,maxbj,maxtyp, |
5 |
. surftype,tilefrac,igrd,ityp,chfr ) |
. surftype,tilefrac,igrd,ityp,chfr ) |
6 |
C*********************************************************************** |
C*********************************************************************** |
7 |
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, |
15 |
C vegdata - Character*40 Vegetation Dataset name |
C vegdata - Character*40 Vegetation Dataset name |
16 |
C im - model grid longitude dimension |
C im - model grid longitude dimension |
17 |
C jm - model grid latitude dimension (number of lat. points) |
C jm - model grid latitude dimension (number of lat. points) |
18 |
C bi - Number of processors in x-direction |
C maxbi - Number of processors in x-direction |
19 |
C bj - Number of processors in y-direction |
C maxbj - Number of processors in y-direction |
20 |
C maxtyp - maximum allowable number of land surface types per grid box |
C maxtyp - maximum allowable number of land surface types per grid box |
21 |
C nchpmax - integer maximum per-processor number of tiles in tile space |
C nchpmax - integer maximum per-processor number of tiles in tile space |
22 |
C |
C |
49 |
implicit none |
implicit none |
50 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
51 |
|
|
52 |
integer mythid,im,jm,maxtyp,nchpmax |
integer mythid,im,jm,maxtyp,nchpmax,maxbi,maxbj |
53 |
integer surftype(im,jm,maxtyp,bi,bj) |
integer surftype(im,jm,maxtyp,maxbi,maxbj) |
54 |
integer igrd(nchpmax,bi,bj),ityp(nchpmax,bi,bj) |
integer igrd(nchpmax,bi,bj),ityp(nchpmax,maxbi,maxbj) |
55 |
real tilefrac(im,jm,maxtyp,bi,bj) |
real tilefrac(im,jm,maxtyp,maxbi,maxbj) |
56 |
real chfr(nchpmax,bi,bj) |
real chfr(nchpmax,maxbi,maxbj) |
57 |
character*40 vegdata |
character*40 vegdata |
58 |
integer imdata,jmdata,bidata,bjdata |
integer imdata,jmdata,bidata,bjdata |
59 |
integer nchp,nchpland |
integer nchp,nchpland |
62 |
integer*4 iveg_32(im,jm,maxtyp,bi,bj) |
integer*4 iveg_32(im,jm,maxtyp,bi,bj) |
63 |
real*4 veg_32(im,jm,maxtyp,bi,bj) |
real*4 veg_32(im,jm,maxtyp,bi,bj) |
64 |
|
|
65 |
integer i,j,k,bilocal,bjlocal,ierr1,kveg |
integer i,j,k,bi,bj,ierr1,kveg |
66 |
|
|
|
IF (myThid.eq.1) THEN |
|
67 |
call mdsfindunit( kveg, myThid ) |
call mdsfindunit( kveg, myThid ) |
68 |
close(kveg) |
close(kveg) |
69 |
open(kveg,file=vegdata,form='unformatted',access='sequential', |
open(kveg,file=vegdata,form='unformatted',access='sequential', |
77 |
call exit(101) |
call exit(101) |
78 |
endif |
endif |
79 |
close(kveg) |
close(kveg) |
80 |
|
IF (myThid.eq.1) THEN |
81 |
imdata = im_32 |
imdata = im_32 |
82 |
jmdata = jm_32 |
jmdata = jm_32 |
83 |
bidata = bi_32 |
bidata = bi_32 |
97 |
bidata = bi_32 |
bidata = bi_32 |
98 |
bjdata = bj_32 |
bjdata = bj_32 |
99 |
|
|
100 |
DO BJLOCAL = myByLo(myThid), myByHi(myThid) |
DO BJ = myByLo(myThid), myByHi(myThid) |
101 |
DO BILOCAL = myBxLo(myThid), myBxHi(myThid) |
DO BI = myBxLo(myThid), myBxHi(myThid) |
102 |
|
|
103 |
do k = 1,maxtyp |
do k = 1,maxtyp |
104 |
do j = 1,jm_32 |
do j = 1,jm_32 |
105 |
do i = 1,im_32 |
do i = 1,im_32 |
106 |
surftype(i,j,k,bilocal,bjlocal) = iveg_32(i,j,k,bilocal,bjlocal) |
surftype(i,j,k,bi,bj) = iveg_32(i,j,k,bi,bj) |
107 |
tilefrac(i,j,k,bilocal,bjlocal) = veg_32(i,j,k,bilocal,bjlocal) |
tilefrac(i,j,k,bi,bj) = veg_32(i,j,k,bi,bj) |
108 |
enddo |
enddo |
109 |
enddo |
enddo |
110 |
enddo |
enddo |
151 |
enddo |
enddo |
152 |
enddo |
enddo |
153 |
|
|
154 |
print *, 'bi ',bilocal,' bj ',bjlocal |
print *, 'bi ',bi,' bj ',bj |
155 |
print *, 'Number of Total Tiles: ',nchp |
print *, 'Number of Total Tiles: ',nchp |
156 |
print *, 'Number of Land Tiles: ',nchplnd |
print *, 'Number of Land Tiles: ',nchplnd |
157 |
print * |
print * |