Back to home page

MITgcm

 
 

    


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

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
09a6f3668a Jeff*0001 #include "ctrparam.h"
                0002 #include "ATM2D_OPTIONS.h"
                0003 
                0004 C     !INTERFACE:
                0005       SUBROUTINE PUT_OCNVARS(  myTime, myIter, myThid )
                0006 C     *==========================================================*
                0007 C     | Put fluxes for the ocean where needed: MPI mode, into    |
                0008 c     | common block for passing; single-proc, into FFIELDS.h    |
                0009 C     *==========================================================*
                0010         IMPLICIT NONE
                0011 
                0012 C     === Global Atmosphere Variables ===
                0013 #include "ATMSIZE.h"
                0014 #include "SIZE.h"
                0015 #include "EEPARAMS.h"
589e8b378c Jeff*0016 #include "PARAMS.h"
0b83645f94 Jeff*0017 #include "THSICE_VARS.h"
09a6f3668a Jeff*0018 #include "ATM2D_VARS.h"
                0019 
                0020 #ifdef ATM2D_MPI_ON
                0021 #  include "OCNSIZE.h"
                0022 #  include "OCNVARS.h"
0b83645f94 Jeff*0023 #  include "OCNIDS.h"
09a6f3668a Jeff*0024 #else
                0025 #  include "FFIELDS.h"
                0026 #  include "SURFACE.h"
0b83645f94 Jeff*0027 #  ifdef ALLOW_DIC
43e8d37a02 Jeff*0028 #    include "DIC_VARS.h"
0b83645f94 Jeff*0029 #  endif
09a6f3668a Jeff*0030 #endif
                0031 
                0032 C     !INPUT/OUTPUT PARAMETERS:
                0033 C     === Routine arguments ===
                0034 C     myTime - current simulation time (ocean model time)
                0035 C     myIter - iteration number (ocean model)
                0036 C     myThid - Thread no. that called this routine.
                0037       _RL     myTime
                0038       INTEGER myIter
                0039       INTEGER myThid
                0040 
                0041 C     LOCAL VARIABLES:
                0042       INTEGER i,j
                0043 
                0044       DO j=1,sNy
                0045         DO i=1,sNx
                0046 
0b83645f94 Jeff*0047 #ifdef ATM2D_MPI_ON
                0048 
09a6f3668a Jeff*0049 C OCNVARS common set from ATM2D common
9274434acc Jean*0050           atmSLPr_ocn(i,j)= pass_slp(i,j)
                0051           HeatFlux_ocn(i,j)= pass_qnet(i,j)
                0052           qShortWave_ocn(i,j)= pass_solarnet(i,j)
                0053           TauX_ocn(i,j)= pass_fu(i,j)
                0054           TauY_ocn(i,j)= pass_fv(i,j)
589e8b378c Jeff*0055 C         convert FW to MITGCM units kg/m2/s for passing
9274434acc Jean*0056           FWFlux_ocn(i,j)= (pass_precip(i,j) + pass_evap(i,j)
589e8b378c Jeff*0057      &                     + pass_runoff(i,j)) * rhoConstFresh
09a6f3668a Jeff*0058           SaltFlx_ocn(i,j) = sFluxFromIce(i,j)
0b83645f94 Jeff*0059 #  ifdef ATMOSPHERIC_LOADING
                0060           sIceMass_ocn(i,j) = pass_sIceLoad(i,j)
                0061 #  endif /* ATMOSPHERIC_LOADING */
                0062           IF ( ocnCpl_exchange_DIC ) THEN
                0063             aCO2_ocn(i,j) = pass_pCO2(i,j)
                0064             wSpeed_ocn(i,j) = pass_wspeed(i,j)
                0065             sIceFrac_ocn(i,j) = iceMask(i,j,1,1)
                0066           ENDIF
09a6f3668a Jeff*0067 
                0068 #else
                0069 C FFIELDS.h common block set from ATM2D common
                0070 
9274434acc Jean*0071           pLoad(i,j,1,1)= pass_slp(i,j)
                0072           Qnet(i,j,1,1)= pass_qnet(i,j)
                0073           Qsw(i,j,1,1)= pass_solarnet(i,j)
                0074           fu(i,j,1,1)= pass_fu(i,j)
                0075           fv(i,j,1,1)= pass_fv(i,j)
                0076           EmPmR(i,j,1,1)= (pass_precip(i,j) + pass_evap(i,j)
589e8b378c Jeff*0077      &                     + pass_runoff(i,j)) * rhoConstFresh
09a6f3668a Jeff*0078           saltFlux(i,j,1,1)= sFluxFromIce(i,j)
                0079 
                0080           CALL EXCH_UV_XY_RS(fu,fv,.TRUE.,myThid)
2d471fad7c Jean*0081           _EXCH_XY_RS(EmPmR, myThid )   !for NL Free surf?
                0082           _EXCH_XY_RS(saltFlux, myThid )
                0083           _EXCH_XY_RS(Qnet, myThid )
                0084           _EXCH_XY_RS(Qsw, myThid )
09a6f3668a Jeff*0085 
                0086 #  ifdef ATMOSPHERIC_LOADING
0b83645f94 Jeff*0087           sIceLoad(i,j,1,1) = pass_sIceLoad(i,j)
2d471fad7c Jean*0088           _EXCH_XY_RS(pLoad, myThid )
                0089           _EXCH_XY_RS( sIceLoad, myThid )
0b83645f94 Jeff*0090 C          phi0surf(i,j,1,1) = pass_slp(i,j)*recip_rhoConst
09a6f3668a Jeff*0091 C     &                 + gravity*seaIceMass(i,j,1,1)*recip_rhoConst
                0092 #  endif /* ATMOSPHERIC_LOADING */
                0093 
0b83645f94 Jeff*0094 #  ifdef ALLOW_DIC
                0095 C          icemask should be imported in DIC code
9274434acc Jean*0096            AtmospCO2(i,j,1,1)=  pass_pCO2(i,j)
0b83645f94 Jeff*0097            wind(i,j,1,1)= pass_wspeed(i,j)
2d471fad7c Jean*0098            _EXCH_XY_RL(AtmospCO2 ,  myThid )
                0099            _EXCH_XY_RL(wind ,  myThid )
0b83645f94 Jeff*0100 #  endif /* ALLOW_DIC */
                0101 
                0102 #endif /* ATM2D_MPI_ON */
09a6f3668a Jeff*0103 
                0104         ENDDO
                0105       ENDDO
                0106 
                0107       RETURN
                0108       END
                0109