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
3fd4b811ee Jean*0001 #include "ATM_CPL_OPTIONS.h"
12983a4149 Jean*0002 
                0003 CBOP
                0004 C     !ROUTINE: ATM_STORE_LAND
                0005 C     !INTERFACE:
                0006       SUBROUTINE ATM_STORE_LAND(
                0007      I                     bi, bj,
                0008      I                     myTime, myIter, myThid )
                0009 
                0010 C     !DESCRIPTION: \bv
                0011 C     *==========================================================*
                0012 C     | SUBROUTINE ATM_STORE_LAND
                0013 C     | o Routine for saving Land fluxes from LAND pkg
                0014 C     |   for export to coupling layer.
                0015 C     *==========================================================*
                0016 C     | This version interfaces to the LAND package.
                0017 C     *==========================================================*
                0018 C     \ev
                0019 
                0020 C     !USES:
                0021       IMPLICIT NONE
                0022 
                0023 C     == Global variables ==
                0024 #ifdef ALLOW_LAND
                0025 # include "LAND_SIZE.h"
                0026 #else
                0027 # include "SIZE.h"
                0028 #endif
                0029 
                0030 #include "EEPARAMS.h"
                0031 #include "PARAMS.h"
                0032 #include "CPL_PARAMS.h"
                0033 #ifdef ALLOW_LAND
                0034 c #include "LAND_PARAMS.h"
                0035 # include "LAND_VARS.h"
                0036 #endif
                0037 C     == Global variables for coupling interface ==
                0038 #include "ATMCPL.h"
                0039 
                0040 C     !INPUT/OUTPUT PARAMETERS:
                0041 C     bi, bj    :: Tile indices
                0042 C     myTime    :: Current model time
                0043 C     myIter    :: Current timestep number
                0044 C     myThid    :: my Thread Id number
                0045       INTEGER bi, bj
                0046       _RL     myTime
                0047       INTEGER myIter
                0048       INTEGER myThid
                0049 CEOP
                0050 
                0051 #ifdef ALLOW_LAND
                0052 C     !LOCAL VARIABLES:
                0053 C     i, j      :: Loop counters
                0054       INTEGER i, j
                0055       _RL cplTimeFraction
                0056 
                0057 C     o Accumulate RunOff from land bucket that will be exported to the
                0058 C       coupling layer. RunOff is per surface unit, in kg/m2/s
                0059        cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter)
                0060        RunOffTime(bi,bj) = RunOffTime(bi,bj) + cplTimeFraction
                0061        DO j=1,sNy
                0062         DO i=1,sNx
                0063           RunOffFlux(i,j,bi,bj) = RunOffFlux(i,j,bi,bj)
                0064      &                 + land_runOff(i,j,bi,bj)*cplTimeFraction
                0065         ENDDO
                0066        ENDDO
                0067 
                0068 C     o Accumulate RunOff Energy from land bucket that will be exported
                0069 C       to the coupling layer. RunOff Energy is per surface unit, in W/m2.
                0070        cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter)
                0071        ROEnFxTime(bi,bj) = ROEnFxTime(bi,bj) + cplTimeFraction
                0072        DO j=1,sNy
                0073         DO i=1,sNx
                0074           RunOffEnFx(i,j,bi,bj) = RunOffEnFx(i,j,bi,bj)
                0075      &                 + land_enRnOf(i,j,bi,bj)*cplTimeFraction
                0076         ENDDO
                0077        ENDDO
                0078 
                0079 #endif /* ALLOW_LAND */
                0080 
                0081       RETURN
                0082       END