Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:37:35 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
9a4f5fc78a Jean*0001 #include "ATM_CPL_OPTIONS.h"
                0002 
                0003 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0004 CBOP 0
                0005 C !ROUTINE: CPL_DIAGNOSTICS_FILL
                0006 
                0007 C !INTERFACE:
                0008       SUBROUTINE CPL_DIAGNOSTICS_FILL(
                0009      I                     myTime, myIter, myThid )
                0010 
                0011 C     !DESCRIPTION:
                0012 C     Fill-in diagnostics array for ATM_CPL variables
                0013 
                0014 C     !USES:
                0015       IMPLICIT NONE
                0016 #include "SIZE.h"
                0017 #include "EEPARAMS.h"
                0018 #include "PARAMS.h"
                0019 #include "CPL_PARAMS.h"
                0020 #include "ATMCPL.h"
                0021 
                0022 C     !INPUT PARAMETERS:
                0023 C     myTime   :: Current time of simulation ( s )
                0024 C     myIter   :: Current iteration number in simulation
                0025 C     myThid   :: my Thread Id number
                0026       _RL     myTime
                0027       INTEGER myIter, myThid
                0028 CEOP
                0029 
                0030 #ifdef ALLOW_DIAGNOSTICS
                0031 C     !FUNCTIONS:
                0032 #ifdef ALLOW_THSICE
                0033       LOGICAL  DIAGNOSTICS_IS_ON
                0034       EXTERNAL DIAGNOSTICS_IS_ON
                0035 #endif /* ALLOW_THSICE */
                0036 
                0037 C     !LOCAL VARIABLES:
                0038 #ifdef ALLOW_THSICE
                0039       INTEGER bi,bj
                0040       INTEGER i,j
                0041       _RL tmpFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
                0042       _RL tmpFac
                0043 #endif /* ALLOW_THSICE */
                0044 
                0045       IF ( useDiagnostics ) THEN
                0046 
                0047         CALL DIAGNOSTICS_FILL( ocMxlD ,   'CPL_MxlD',
                0048      I                          0, 1, 0, 1, 1, myThid )
                0049         CALL DIAGNOSTICS_FILL( SSTocn ,   'CPL_SST ',
                0050      I                          0, 1, 0, 1, 1, myThid )
                0051         CALL DIAGNOSTICS_FILL( SSSocn ,   'CPL_SSS ',
                0052      I                          0, 1, 0, 1, 1, myThid )
                0053         CALL DIAGNOSTICS_FILL( vSqocn ,   'CPL_Vel2',
                0054      I                          0, 1, 0, 1, 1, myThid )
                0055 #ifdef ALLOW_AIM
                0056         IF ( atm_cplExch_DIC ) THEN
                0057          CALL DIAGNOSTICS_FILL( flxCO2ocn, 'CPL_fCO2',
                0058      I                          0, 1, 0, 1, 1, myThid )
                0059         ENDIF
                0060 #endif /* ALLOW_AIM */
                0061 #ifdef ALLOW_THSICE
                0062         IF ( atm_cplExch2W_sIce ) THEN
                0063          CALL DIAGNOSTICS_FILL( sIceFrac_cpl , 'CPL_icFr',
                0064      I                          0, 1, 0, 1, 1, myThid )
                0065 C      Ice-fraction weighted quantities:
                0066          tmpFac = 1. _d 0
                0067          CALL DIAGNOSTICS_FRACT_FILL(
                0068      I                          sIceThick_cpl, sIceFrac_cpl,
                0069      I                          tmpFac, 1, 'CPL_iceH',
                0070      I                          0, 1, 0, 1, 1, myThid )
                0071          CALL DIAGNOSTICS_FRACT_FILL(
                0072      I                          sIceSnowH_cpl, sIceFrac_cpl,
                0073      I                          tmpFac, 1, 'CPL_snwH',
                0074      I                          0, 1, 0, 1, 1, myThid )
                0075 
                0076 C      Ice-Volume weighted quantities:
                0077          IF ( DIAGNOSTICS_IS_ON('CPL_Qic1',myThid) .OR.
                0078      &        DIAGNOSTICS_IS_ON('CPL_Qic2',myThid) ) THEN
                0079           DO bj=myByLo(myThid),myByHi(myThid)
                0080            DO bi=myBxLo(myThid),myBxHi(myThid)
                0081 
                0082             DO j=1-OLy,sNy+OLy
                0083              DO i=1-OLx,sNx+OLx
                0084               tmpFld(i,j) = sIceFrac_cpl(i,j,bi,bj)
                0085      &                    * sIceThick_cpl(i,j,bi,bj)
                0086              ENDDO
                0087             ENDDO
                0088             CALL DIAGNOSTICS_FRACT_FILL(
                0089      I                          sIceQ1_cpl(1-OLx,1-OLy,bi,bj),
                0090      I                          tmpFld, tmpFac, 1, 'CPL_Qic1',
                0091      I                          0, 1, 2,bi,bj, myThid )
                0092             CALL DIAGNOSTICS_FRACT_FILL(
                0093      I                          sIceQ2_cpl(1-OLx,1-OLy,bi,bj),
                0094      I                          tmpFld, tmpFac, 1, 'CPL_Qic2',
                0095      I                          0, 1, 2,bi,bj, myThid )
                0096 
                0097            ENDDO
                0098           ENDDO
                0099          ENDIF
                0100 
                0101         ENDIF
                0102 #endif /* ALLOW_THSICE */
                0103 
                0104       ENDIF
                0105 
                0106 #endif /* ALLOW_DIAGNOSTICS */
                0107       RETURN
                0108       END