32 |
|
|
33 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
34 |
#include "SIZE.h" |
#include "SIZE.h" |
35 |
|
#include "PARAMS.h" |
36 |
#include "GRID.h" |
#include "GRID.h" |
37 |
#include "DYNVARS.h" |
#include "DYNVARS.h" |
38 |
|
|
77 |
#ifdef GENERIC_BAR_MONTH |
#ifdef GENERIC_BAR_MONTH |
78 |
integer mrec, nyears, iyear |
integer mrec, nyears, iyear |
79 |
#endif |
#endif |
80 |
|
|
81 |
|
_RL diagnosfld3d(1-olx:snx+olx,1-oly:sny+oly,nr,nsx,nsy) |
82 |
|
|
83 |
c == external functions == |
c == external functions == |
84 |
|
|
85 |
integer ilnblnk |
integer ilnblnk |
191 |
do i = imin,imax |
do i = imin,imax |
192 |
if ( _hFacC(i,j,k,bi,bj) .ne. 0. ) then |
if ( _hFacC(i,j,k,bi,bj) .ne. 0. ) then |
193 |
fctile = fctile + |
fctile = fctile + |
194 |
& (wtheta(k,bi,bj)*cmask(i,j)* |
& (wthetaLev(i,j,k,bi,bj)*cmask(i,j)* |
195 |
& (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj))* |
& (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj))* |
196 |
& (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj)) ) |
& (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj)) ) |
197 |
if ( wtheta(k,bi,bj)*cmask(i,j) .ne. 0. ) |
if ( wthetaLev(i,j,k,bi,bj)*cmask(i,j) .ne. 0. ) |
198 |
& num_temp(bi,bj) = num_temp(bi,bj) + 1. _d 0 |
& num_temp(bi,bj) = num_temp(bi,bj) + 1. _d 0 |
199 |
|
diagnosfld3d(i,j,k,bi,bj) = |
200 |
|
& (wthetaLev(i,j,k,bi,bj)*cmask(i,j)* |
201 |
|
& (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj))* |
202 |
|
& (tbar(i,j,k,bi,bj) - tdat(i,j,k,bi,bj)) ) |
203 |
|
else |
204 |
|
diagnosfld3d(i,j,k,bi,bj) = 0. |
205 |
endif |
endif |
206 |
enddo |
enddo |
207 |
enddo |
enddo |
209 |
enddo |
enddo |
210 |
c-- End of loop over layers. |
c-- End of loop over layers. |
211 |
|
|
212 |
|
call mdswritefield( 'DiagnosCost_ClimTheta', |
213 |
|
& writeBinaryPrec, globalfiles, 'RL', Nr, |
214 |
|
& diagnosfld3d, irec, optimcycle, mythid ) |
215 |
|
|
216 |
fcthread = fcthread + fctile |
fcthread = fcthread + fctile |
217 |
objf_temp(bi,bj) = objf_temp(bi,bj) + fctile |
objf_temp(bi,bj) = objf_temp(bi,bj) + fctile |
218 |
|
|