File indexing completed on 2018-03-02 18:45:23 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
7ae8fb32b5 Andr*0001 #include "FIZHI_OPTIONS.h"
0002
d58f306b82 Jean*0003 SUBROUTINE FIZHI_INIT_VEG(myThid,vegdata,im,jm,nSx,nSy,Nxg,Nyg,
0004 & maxtyp,nchp,nchptot,nchpland,lons,lats,surftype,tilefrac,
0005 & igrd,ityp,chfr,chlt,chlon)
7ae8fb32b5 Andr*0006
0007
d58f306b82 Jean*0008
0009
7ae8fb32b5 Andr*0010
0011
0012
d58f306b82 Jean*0013
0014
7ae8fb32b5 Andr*0015
0016
0017
d58f306b82 Jean*0018
0019
7ae8fb32b5 Andr*0020
0021
0022
0023
0024
0025
0026
d58f306b82 Jean*0027
0028
0029
0030
0031
0032
0033
0034
0035
7ae8fb32b5 Andr*0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
d58f306b82 Jean*0046
7ae8fb32b5 Andr*0047
0048
0049
0050
d58f306b82 Jean*0051 IMPLICIT NONE
7ae8fb32b5 Andr*0052 #include "EEPARAMS.h"
0053
d58f306b82 Jean*0054 INTEGER myThid,im,jm,maxtyp,nchp,nSx,nSy,Nxg,Nyg
0055 INTEGER nchptot(nSx,nSy), nchpland(nSx,nSy)
0056 INTEGER surftype(im,jm,maxtyp,nSx,nSy)
0057 INTEGER igrd(nchp,nSx,nSy),ityp(nchp,nSx,nSy)
0058 _RL tilefrac(im,jm,maxtyp,nSx,nSy)
7ae8fb32b5 Andr*0059 _RL lats(im,jm,nSx,nSy), lons(im,jm,nSx,nSy)
d58f306b82 Jean*0060 _RL chfr(nchp,nSx,nSy),chlt(nchp,nSx,nSy),chlon(nchp,nSx,nSy)
7ae8fb32b5 Andr*0061
d58f306b82 Jean*0062
0063 CHARACTER*40 vegdata
0064 INTEGER i,j,k,bi,bj
0065
0066 WRITE(standardMessageUnit,'(2A)') ' FIZHI_INIT_VEG: ',
0067 & 'defining surface type and fraction: ----------------------'
0068
0069 DO bj = myByLo(myThid), myByHi(myThid)
0070 DO bi = myBxLo(myThid), myBxHi(myThid)
0071
0072 do j = 1,jm
0073 do i = 1,im
0074 surftype(i,j,1,bi,bj) = 100
0075 tilefrac(i,j,1,bi,bj) = 0.99 _d 0
0076 surftype(i,j,2,bi,bj) = 100
0077 tilefrac(i,j,2,bi,bj) = 0.01 _d 0
0078 enddo
0079 enddo
0080 do k = 3,maxtyp
0081 do j = 1,jm
0082 do i = 1,im
0083 surftype(i,j,k,bi,bj) = 0
0084 tilefrac(i,j,k,bi,bj) = 0.
0085 enddo
0086 enddo
0087 enddo
0088
0089 ENDDO
7ae8fb32b5 Andr*0090 ENDDO
0091
d58f306b82 Jean*0092
0093
0094
0095
0096
0097
0098
0099
0100 WRITE(standardMessageUnit,'(2A)') ' FIZHI_INIT_VEG: ',
0101 & 'setting surface Tiles:'
0102
0103 DO bj = myByLo(myThid), myByHi(myThid)
0104 DO bi = myBxLo(myThid), myBxHi(myThid)
0105
0106
0107 do i=1,nchp
0108 igrd(i,bi,bj) = 1
0109 enddo
0110
0111
0112 nchpland(bi,bj) = 0
0113
0114
0115 nchptot(bi,bj) = nchpland(bi,bj)
0116 do k=1,maxtyp
0117 do j=1,jm
0118 do i=1,im
0119 if(surftype(i,j,k,bi,bj).ge.100 .and.
0120 & tilefrac(i,j,k,bi,bj).gt.0.) then
0121 nchptot(bi,bj) = nchptot(bi,bj) + 1
0122 igrd (nchptot(bi,bj),bi,bj) = i + (j-1)*im
0123 ityp (nchptot(bi,bj),bi,bj) = surftype(i,j,k,bi,bj)
0124 chfr (nchptot(bi,bj),bi,bj) = tilefrac(i,j,k,bi,bj)
0125 chlon(nchptot(bi,bj),bi,bj) = lons(i,j,bi,bj)
0126 chlt (nchptot(bi,bj),bi,bj) = lats(i,j,bi,bj)
0127 endif
0128 enddo
7ae8fb32b5 Andr*0129 enddo
d58f306b82 Jean*0130 enddo
0131
0132 WRITE(standardMessageUnit,'(2(A,I4),2(A,I10))') ' bi=', bi,
0133 & ', bj=', bj, ', # of Land Tiles=', nchpland(bi,bj),
0134 & ', Total # of Tiles=', nchptot(bi,bj)
7ae8fb32b5 Andr*0135
d58f306b82 Jean*0136 ENDDO
7ae8fb32b5 Andr*0137 ENDDO
0138
d58f306b82 Jean*0139 WRITE(standardMessageUnit,'(2A)') ' FIZHI_INIT_VEG: done'
0140
7ae8fb32b5 Andr*0141 RETURN
0142 END