/[MITgcm]/MITgcm/pkg/ecco/cost_theta.F
ViewVC logotype

Diff of /MITgcm/pkg/ecco/cost_theta.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7 by heimbach, Fri Sep 2 16:02:11 2005 UTC revision 1.8 by heimbach, Sat Oct 15 18:27:32 2005 UTC
# Line 32  c     == global variables == Line 32  c     == global variables ==
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    
# Line 76  c     == local variables == Line 77  c     == local variables ==
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
# Line 187  c             the temperature field. Line 191  c             the temperature field.
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
# Line 199  c             the temperature field. Line 209  c             the temperature field.
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    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22