69 |
|
|
70 |
_RL cmask (1-olx:snx+olx,1-oly:sny+oly) |
_RL cmask (1-olx:snx+olx,1-oly:sny+oly) |
71 |
_RL spval |
_RL spval |
72 |
|
_RL spmax |
73 |
|
|
74 |
character*(80) fnametheta |
character*(80) fnametheta |
75 |
|
|
97 |
imax = snx |
imax = snx |
98 |
|
|
99 |
spval = -1.8 |
spval = -1.8 |
100 |
|
spmax = 40. |
101 |
|
|
102 |
c-- Read tiled data. |
c-- Read tiled data. |
103 |
doglobalread = .false. |
doglobalread = .false. |
173 |
c-- Determine the mask on weights |
c-- Determine the mask on weights |
174 |
do j = jmin,jmax |
do j = jmin,jmax |
175 |
do i = imin,imax |
do i = imin,imax |
176 |
cmask(i,j) = 1. _d 0 |
cmask(i,j) = cosphi(i,j,bi,bj) |
177 |
if (tdat(i,j,k,bi,bj) .eq. 0.) then |
if (tdat(i,j,k,bi,bj) .eq. 0.) then |
178 |
cmask(i,j) = 0. _d 0 |
cmask(i,j) = 0. _d 0 |
179 |
endif |
else if (tdat(i,j,k,bi,bj) .lt. spval) then |
180 |
|
cmask(i,j) = 0. _d 0 |
181 |
if (tdat(i,j,k,bi,bj) .lt. spval) then |
else if (tdat(i,j,k,bi,bj) .gt. spmax) then |
182 |
cmask(i,j) = 0. _d 0 |
cmask(i,j) = 0. _d 0 |
183 |
endif |
endif |
184 |
|
|
189 |
cph |
cph |
190 |
cph if ( rC(K) .GT. -1000. ) then |
cph if ( rC(K) .GT. -1000. ) then |
191 |
cph) |
cph) |
|
c set cmask=0 in areas shallower than 1000m |
|
|
if (_hFacC(i,j,13,bi,bj) .eq. 0.) then |
|
|
cmask(i,j) = 0. _d 0 |
|
|
endif |
|
192 |
enddo |
enddo |
193 |
enddo |
enddo |
194 |
|
|
196 |
c the temperature field. |
c the temperature field. |
197 |
do j = jmin,jmax |
do j = jmin,jmax |
198 |
do i = imin,imax |
do i = imin,imax |
199 |
if (_hFacC(i,j,k,bi,bj) .ne. 0.) then |
if ( _hFacC(i,j,k,bi,bj) .ne. 0. .AND. |
200 |
|
& _hFacC(i,j,13,bi,bj) .ne. 0. ) then |
201 |
fctile = fctile + |
fctile = fctile + |
202 |
& (wtheta(k,bi,bj)*cosphi(i,j,bi,bj)*cmask(i,j)* |
& (wtheta(k,bi,bj)*cmask(i,j)* |
203 |
& (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj))* |
& (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj))* |
204 |
& (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj)) ) |
& (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj)) ) |
205 |
|
if ( wtheta(k,bi,bj)*cmask(i,j) .ne. 0. ) |
206 |
|
& num_temp(bi,bj) = num_temp(bi,bj) + 1. _d 0 |
207 |
endif |
endif |
208 |
enddo |
enddo |
209 |
enddo |
enddo |