Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:42:49 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
b62066a712 Jean*0001 #include "OCN_CPL_OPTIONS.h"
e596558d31 Jean*0002 
49715ba709 Jean*0003 CBOP 0
                0004 C !ROUTINE: OCN_IMPORT_FIELDS
                0005 
                0006 C !INTERFACE:
90578acae6 Jean*0007       SUBROUTINE OCN_IMPORT_FIELDS( myIter, myThid )
e596558d31 Jean*0008 
49715ba709 Jean*0009 C !DESCRIPTION:
                0010 C     *==========================================================*
                0011 C     | SUBROUTINE OCN_IMPORT_FIELDS
                0012 C     | o Routine for importing fields (e.g. surface fluxes)
                0013 C     |   from coupling layer.
                0014 C     *==========================================================*
                0015 C     | This version talks to the MIT Coupler. It uses the
                0016 C     | MIT Coupler "checkpoint 1" library calls.
                0017 C     *==========================================================*
                0018 
                0019 C !USES:
                0020       IMPLICIT NONE
e596558d31 Jean*0021 C     == Global variables ==
                0022 #include "SIZE.h"
                0023 #include "EEPARAMS.h"
b62066a712 Jean*0024 #include "CPL_PARAMS.h"
e596558d31 Jean*0025 #include "OCNIDS.h"
                0026 #include "OCNCPL.h"
                0027 
49715ba709 Jean*0028 C !INPUT/OUTPUT PARAMETERS:
e596558d31 Jean*0029 C     == Routine arguments ==
90578acae6 Jean*0030 C     myIter  :: Current timestep number.
                0031 C     myThid  :: Thread number for this instance of the routine
                0032       INTEGER myIter
e596558d31 Jean*0033       INTEGER myThid
49715ba709 Jean*0034 CEOP
                0035 
                0036 #ifdef COMPONENT_MODULE
                0037 C !LOCAL VARIABLES:
e596558d31 Jean*0038 
                0039 C  Note: 1) all fields will have been gridded onto ocean grid.
49715ba709 Jean*0040 C        2) MIT Coupler checkpoint1 does not allow asynchronous posting of
e596558d31 Jean*0041 C          data, so ordering has to be consistent with coupling layer ordering
                0042 
49715ba709 Jean*0043       _BARRIER
                0044       _BEGIN_MASTER( myThid )
                0045 
e596558d31 Jean*0046 C-    Receive Atmospheric Sea-Level pressure from coupling layer.
                0047       CALL COMPRECV_R8TILES( ocnSLPrName,
                0048      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0049      O                       atmSLPr )
                0050 
                0051 C-    Receive surface heatflux from coupling layer.
                0052       CALL COMPRECV_R8TILES( ocnHeatFluxName,
                0053      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0054      O                       HeatFlux )
                0055 
                0056 C-    Receive net shortwave radiation from coupling layer.
                0057       CALL COMPRECV_R8TILES( ocnQshortWaveName,
                0058      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0059      O                       qShortWave )
                0060 
                0061 C-    Receive Zonal surface wind-stress from coupling layer.
                0062       CALL COMPRECV_R8TILES( ocnTauXName,
                0063      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0064      O                       tauX )
                0065 
                0066 C-    Receive Meridional surface wind-stress from coupling layer.
                0067       CALL COMPRECV_R8TILES( ocnTauYName,
                0068      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0069      O                       tauY )
                0070 
                0071 C-    Receive fresh water flux from coupling layer.
                0072       CALL COMPRECV_R8TILES( ocnFWFluxName,
                0073      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0074      O                       FWFlux )
                0075 
90578acae6 Jean*0076       IF ( ocn_cplExch1W_sIce ) THEN
e596558d31 Jean*0077 C-    Receive salt flux (sea-ice model) from coupling layer.
90578acae6 Jean*0078         CALL COMPRECV_R8TILES( ocnSaltFxName,
e596558d31 Jean*0079      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0080      O                       iceSaltFlx )
                0081 
                0082 C-    Receive sea-ice mass (sea-ice model) from coupling layer.
90578acae6 Jean*0083         CALL COMPRECV_R8TILES( ocnSIceMassName,
e596558d31 Jean*0084      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0085      O                       seaIceMass )
90578acae6 Jean*0086       ENDIF
e596558d31 Jean*0087 
90578acae6 Jean*0088 #ifdef ALLOW_SALT_PLUME
                0089       IF ( ocn_cplExch_SaltPl ) THEN
                0090 C-      Receive salt-plume flux (for pkg/salt_plume) from coupling layer.
                0091         CALL COMPRECV_R8TILES( ocnSaltPlmFlxName,
                0092      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0093      O                       saltPlmFlx_cpl )
                0094       ENDIF
                0095 #endif
                0096 #ifdef ALLOW_DIC
                0097       IF ( ocn_cplExch_RunOff ) THEN
                0098 C-      Receive Run-Off from coupling layer.
                0099         CALL COMPRECV_R8TILES( ocnRunOffName,
                0100      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0101      O                       RunOff_cpl )
                0102       ENDIF
b62066a712 Jean*0103       IF ( ocn_cplExch_DIC ) THEN
e7c6a47db7 Jeff*0104 C-      Receive atmos CO2 level from coupling layer.
                0105         CALL COMPRECV_R8TILES( ocnAirCO2Name,
                0106      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0107      O                       airCO2 )
                0108 
90578acae6 Jean*0109 C-      Receive surface windspeed from coupling layer.
b62066a712 Jean*0110         CALL COMPRECV_R8TILES( ocnWindSpdName,
e7c6a47db7 Jeff*0111      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0112      O                       surfWSpeed )
90578acae6 Jean*0113       ENDIF
                0114 #endif /* ALLOW_DIC */
                0115 #if (defined ALLOW_DIC) || (defined ALLOW_THSICE)
                0116       IF ( ( ocn_cplExch1W_sIce.AND.ocn_cplExch_DIC )
                0117      &  .OR. ocn_cplExch2W_sIce ) THEN
e7c6a47db7 Jeff*0118 C-      Receive seaice fraction from coupling layer.
b62066a712 Jean*0119         CALL COMPRECV_R8TILES( ocnSIceFracName,
e7c6a47db7 Jeff*0120      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
90578acae6 Jean*0121      O                       sIceFrac_cpl )
                0122       ENDIF
                0123 #endif /* ALLOW_DIC or ALLOW_THSICE */
                0124 #ifdef ALLOW_THSICE
                0125       IF ( ocn_cplExch2W_sIce ) THEN
                0126 C-      Receive thSIce state-vars from coupling layer.
                0127         CALL COMPRECV_R8TILES( ocnSIceThickName,
                0128      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0129      O                       sIceThick_cpl )
                0130         CALL COMPRECV_R8TILES( ocnSIceSnowName,
                0131      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0132      O                       sIceSnowH_cpl )
                0133         CALL COMPRECV_R8TILES( ocnSIceQ1Name,
                0134      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0135      O                       sIceQ1_cpl )
                0136         CALL COMPRECV_R8TILES( ocnSIceQ2Name,
                0137      I                       sNx, OLx, sNy, OLy, 1, nSx, nSy,
                0138      O                       sIceQ2_cpl )
e7c6a47db7 Jeff*0139       ENDIF
90578acae6 Jean*0140 #endif /* ALLOW_THSICE */
e7c6a47db7 Jeff*0141 
49715ba709 Jean*0142       _END_MASTER( myThid )
                0143       _BARRIER
                0144 
                0145 #endif /* COMPONENT_MODULE */
                0146 
e596558d31 Jean*0147       RETURN
                0148       END