Back to home page

MITgcm

 
 

    


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

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
c04db39328 Jean*0001 #include "ATM_CPL_OPTIONS.h"
12983a4149 Jean*0002 
                0003 CBOP
                0004 C     !ROUTINE: ATM_STORE_THSICE
                0005 C     !INTERFACE:
                0006       SUBROUTINE ATM_STORE_THSICE(
                0007      I                     bi, bj,
                0008      I                     myTime, myIter, myThid )
                0009 
                0010 C     !DESCRIPTION: \bv
                0011 C     *==========================================================*
                0012 C     | SUBROUTINE ATM_STORE_THSICE
                0013 C     | o Routine for saving Sea-Ice fields from thSIce pkg
                0014 C     |   for export to coupling layer.
                0015 C     *==========================================================*
                0016 C     | This version interfaces to the THSICE package.
                0017 C     *==========================================================*
                0018 C     \ev
                0019 
                0020 C     !USES:
                0021       IMPLICIT NONE
                0022 
                0023 C     == Global variables ==
                0024 #include "SIZE.h"
                0025 
                0026 #include "EEPARAMS.h"
                0027 #include "PARAMS.h"
                0028 #include "CPL_PARAMS.h"
                0029 #ifdef ALLOW_THSICE
                0030 # include "THSICE_PARAMS.h"
                0031 # include "THSICE_VARS.h"
                0032 #endif
                0033 C     == Global variables for coupling interface ==
                0034 #include "ATMCPL.h"
                0035 
                0036 C     !INPUT/OUTPUT PARAMETERS:
                0037 C     bi, bj  :: Tile indices
                0038 C     myTime :: Current model time
                0039 C     myIter :: Current timestep number
                0040 C     myThid :: my Thread Id number
                0041       INTEGER bi, bj
                0042       _RL     myTime
                0043       INTEGER myIter
                0044       INTEGER myThid
                0045 CEOP
                0046 
                0047 #ifdef ALLOW_THSICE
                0048 C     !LOCAL VARIABLES:
                0049 C     i, j   :: Loop counters
                0050       INTEGER i,j
                0051 
b5f894cd8b Jean*0052       IF ( atm_cplExch1W_sIce ) THEN
12983a4149 Jean*0053 C     o Accumulate Sea-Ice Mass from thSIce pkg that will be exported
                0054 C       to the coupling layer. seaIceMass is per surface unit, in kg/m2.
                0055 c      cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter)
b5f894cd8b Jean*0056 c      sIceMassTime(bi,bj) = sIceMassTime(bi,bj) + cplTimeFraction
12983a4149 Jean*0057 C-     Needs really to store the last time-step value and not the average
b5f894cd8b Jean*0058         sIceMassTime(bi,bj) = 1. _d 0
                0059         DO j=1,sNy
                0060          DO i=1,sNx
                0061 c          seaIceMass(i,j,bi,bj) = seaIceMass(i,j,bi,bj) + cplTimeFraction*
                0062            seaIceMass(i,j,bi,bj) =
12983a4149 Jean*0063      &                   ( snowHeight(i,j,bi,bj)*rhos
                0064      &                    + iceHeight(i,j,bi,bj)*rhoi
b5f894cd8b Jean*0065      &                   )*iceMask(i,j,bi,bj)
                0066          ENDDO
12983a4149 Jean*0067         ENDDO
b5f894cd8b Jean*0068       ENDIF
12983a4149 Jean*0069 
b5f894cd8b Jean*0070       IF ( ( atm_cplExch1W_sIce.AND.atm_cplExch_DIC )
                0071      &  .OR. atm_cplExch2W_sIce ) THEN
                0072 C     o Store Sea-Ice concentration (no-units) from thSIce pkg
12983a4149 Jean*0073 C       that will be exported to the coupling layer.
b5f894cd8b Jean*0074         sIceFracTime(bi,bj) = 1. _d 0
                0075         DO j=1,sNy
                0076          DO i=1,sNx
                0077            sIceFrac_cpl(i,j,bi,bj) = iceMask(i,j,bi,bj)
                0078          ENDDO
                0079         ENDDO
                0080       ENDIF
                0081 
                0082       IF ( atm_cplExch2W_sIce ) THEN
                0083 C     o Store other thSIce state-vars
                0084 C       that will be exported to the coupling layer.
                0085         sIceThickTime(bi,bj) = 1. _d 0
                0086         sIceSnowHTime(bi,bj) = 1. _d 0
                0087         sIceQ1Time   (bi,bj) = 1. _d 0
                0088         sIceQ2Time   (bi,bj) = 1. _d 0
                0089         DO j=1,sNy
                0090          DO i=1,sNx
                0091            sIceThick_cpl(i,j,bi,bj) = iceHeight(i,j,bi,bj)
                0092            sIceSnowH_cpl(i,j,bi,bj) = snowHeight(i,j,bi,bj)
                0093            sIceQ1_cpl   (i,j,bi,bj) = Qice1(i,j,bi,bj)
                0094            sIceQ2_cpl   (i,j,bi,bj) = Qice2(i,j,bi,bj)
                0095          ENDDO
12983a4149 Jean*0096         ENDDO
2f77de548f Jean*0097       ENDIF
12983a4149 Jean*0098 
                0099 #endif /* ALLOW_THSICE */
                0100 
                0101       RETURN
                0102       END