/[MITgcm]/MITgcm/pkg/diagnostics/diagstats_calc.F
ViewVC logotype

Diff of /MITgcm/pkg/diagnostics/diagstats_calc.F

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

revision 1.3 by mlosch, Mon Nov 21 09:37:10 2011 UTC revision 1.5 by mlosch, Fri Jan 20 14:24:08 2012 UTC
# Line 462  C     and thus will not compile with a F Line 462  C     and thus will not compile with a F
462         ENDIF         ENDIF
463    
464        ENDIF        ENDIF
465    C     inpArr can be undefined/non-initialised in overlaps, so we need
466    C     to clean this fields first by copying the defined range to tmpFld
467          tmpFld = 0. _d 0
468          DO j = 1,jRun
469           DO i = 1,iRun
470            tmpFld(i,j) = inpArr(i,j)*tmpFac
471           ENDDO
472          ENDDO
473        IF ( power.EQ.2) THEN        IF ( power.EQ.2) THEN
474         tmpFld = inpArr*inpArr         tmpFld = tmpFld*tmpFld
       ELSE  
        tmpFld = inpArr  
475        ENDIF        ENDIF
476  C     sum up the volume  C     sum up the volume
477        tmpVol = tmpVol*arrMaskL        tmpVol = tmpVol*arrMaskL
478        statArr(0)  = SUM(tmpVol)*arrDr        statArr(0)  = SUM(tmpVol)*arrDr
479  C     compute and sum up volume*field  C     compute and sum up volume*field
480        tmpVol = tmpVol*tmpFld        tmpVol = tmpVol*tmpFld
481        statArr(1)  = SUM(tmpVol)*tmpFac*arrDr        statArr(1)  = SUM(tmpVol)*arrDr
482  C     compute and sum up volume*field**2  C     compute and sum up volume*field**2
483        tmpVol = tmpVol*tmpFld        tmpVol = tmpVol*tmpFld
484        statArr(2)  = SUM(tmpVol)*tmpFac*tmpFac*arrDr        statArr(2)  = SUM(tmpVol)*arrDr
485        statArr(im) = MINVAL(tmpFld, MASK = arrMaskL>0.)*tmpFac        statArr(im) = MINVAL(tmpFld, MASK = arrMaskL>0.)
486        statArr(ix) = MAXVAL(tmpFld, MASK = arrMaskL>0.)*tmpFac        statArr(ix) = MAXVAL(tmpFld, MASK = arrMaskL>0.)
487    
488  #endif /* TARGET_NEC_SX */  #endif /* TARGET_NEC_SX */
489    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22