63 |
_RL tmpbar (1-olx:snx+olx,1-oly:sny+oly) |
_RL tmpbar (1-olx:snx+olx,1-oly:sny+oly) |
64 |
_RL cmask (1-olx:snx+olx,1-oly:sny+oly) |
_RL cmask (1-olx:snx+olx,1-oly:sny+oly) |
65 |
_RL spval |
_RL spval |
66 |
|
_RL spmax |
67 |
|
|
68 |
character*(80) fnametheta |
character*(80) fnametheta |
69 |
|
|
97 |
imax = snx |
imax = snx |
98 |
|
|
99 |
spval = -1.8 |
spval = -1.8 |
100 |
|
spmax = 40. |
101 |
|
|
102 |
c-- Read state record from global file. |
c-- Read state record from global file. |
103 |
doglobalread = .false. |
doglobalread = .false. |
155 |
do j = jmin,jmax |
do j = jmin,jmax |
156 |
do i = imin,imax |
do i = imin,imax |
157 |
cmask(i,j) = 1. _d 0 |
cmask(i,j) = 1. _d 0 |
158 |
if (ctdtobs(i,j,k,bi,bj) .eq. 0.) then |
if (ctdtobs(i,j,k,bi,bj) .lt. spval .or. |
159 |
cmask(i,j) = 0. _d 0 |
& ctdtobs(i,j,k,bi,bj) .gt. spmax .or. |
160 |
endif |
& ctdtobs(i,j,k,bi,bj) .eq. 0. ) then |
|
|
|
|
if (ctdtobs(i,j,k,bi,bj) .lt. spval) then |
|
161 |
cmask(i,j) = 0. _d 0 |
cmask(i,j) = 0. _d 0 |
162 |
endif |
endif |
163 |
|
|
169 |
cph if ( rC(K) .GT. -1000. ) then |
cph if ( rC(K) .GT. -1000. ) then |
170 |
cph) |
cph) |
171 |
c set cmask=0 in areas shallower than 1000m |
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 |
|
172 |
|
|
173 |
if (_hFacC(i,j,k,bi,bj) .eq. 0.) then |
if ( |
174 |
cmask(i,j) = 0. _d 0 |
& (_hFacC(i,j,13,bi,bj) .ne. 0.).and. |
175 |
endif |
& (_hFacC(i,j,k,bi,bj) .ne. 0.)) then |
176 |
|
|
177 |
enddo |
www(i,j) = cosphi(i,j,bi,bj)*cmask(i,j) |
178 |
enddo |
tmpobs(i,j) = ctdtobs(i,j,k,bi,bj) |
179 |
|
tmpbar(i,j) = tbar(i,j,k,bi,bj) |
180 |
do j = jmin,jmax |
wtmp(i,j) = wtheta2(i,j,k,bi,bj) |
|
do i = imin,imax |
|
|
www(i,j) = cosphi(i,j,bi,bj)*cmask(i,j) |
|
|
tmpobs(i,j) = ctdtobs(i,j,k,bi,bj) |
|
|
tmpbar(i,j) = tbar(i,j,k,bi,bj) |
|
|
c wtmp(i,j) = wtheta(k,bi,bj) |
|
|
wtmp(i,j) = wtheta2(i,j,k,bi,bj) |
|
|
enddo |
|
|
enddo |
|
181 |
|
|
182 |
do j = jmin,jmax |
c-- The array ctdtobs contains CTD temperature. |
183 |
do i = imin,imax |
fctile_ctdt = fctile_ctdt + |
|
c-- The array ctdtobs contains CTD temperature. |
|
|
fctile_ctdt = fctile_ctdt + |
|
184 |
& (wtmp(i,j)*www(i,j))* |
& (wtmp(i,j)*www(i,j))* |
185 |
& (tmpbar(i,j)-tmpobs(i,j))* |
& (tmpbar(i,j)-tmpobs(i,j))* |
186 |
& (tmpbar(i,j)-tmpobs(i,j)) |
& (tmpbar(i,j)-tmpobs(i,j)) |
187 |
|
|
188 |
|
endif |
189 |
enddo |
enddo |
190 |
enddo |
enddo |
191 |
enddo |
enddo |