Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:39:11 UTC

view on githubraw file Latest commit 17bd6b94 on 2018-02-27 18:41:01 UTC
f18a542536 Jean*0001 #include "DIC_OPTIONS.h"
                0002 
                0003 CBOP
                0004 C !ROUTINE: DIC_FIELDS_UPDATE
                0005 
                0006 C !INTERFACE: ==========================================================
                0007       SUBROUTINE DIC_FIELDS_UPDATE(
                0008      I                      bi, bj, myTime, myIter, myThid )
                0009 
                0010 C !DESCRIPTION:
                0011 C     Update fields (needed for fluxterms or pH calculation)
                0012 C       with value imported from other pkgs or components
                0013 
                0014 C !USES: ===============================================================
                0015       IMPLICIT NONE
                0016 #include "SIZE.h"
                0017 #include "EEPARAMS.h"
                0018 #include "PARAMS.h"
                0019 #include "DIC_VARS.h"
                0020 #ifdef ALLOW_THSICE
                0021 # include "THSICE_VARS.h"
                0022 #endif
                0023 #ifdef ALLOW_SEAICE
                0024 # include "SEAICE_SIZE.h"
                0025 # include "SEAICE.h"
                0026 #endif
                0027 #ifdef ALLOW_OCN_COMPON_INTERF
                0028 # include "CPL_PARAMS.h"
                0029 # include "OCNCPL.h"
                0030 #endif /* ALLOW_OCN_COMPON_INTERF */
                0031 
                0032 C !INPUT PARAMETERS: ===================================================
                0033 C     bi, bj       :: tile indices
                0034 C     myTime       :: Current time in simulation
                0035 C     myIter       :: Current timestep number
                0036 C     myThid       :: my Thread Id number
                0037       INTEGER bi, bj
                0038       _RL myTime
                0039       INTEGER myIter
                0040       INTEGER myThid
                0041 
                0042 #ifdef ALLOW_DIC
                0043 
                0044 c !LOCAL VARIABLES: ===================================================
                0045 #if defined(ALLOW_THSICE) || defined(ALLOW_SEAICE) || defined(COMPONENT_MODULE)
                0046       INTEGER i, j
                0047 #endif
                0048 c     CHARACTER*(MAX_LEN_MBUF) msgBuf
                0049 CEOP
                0050 
                0051         IF ( useThSIce ) THEN
                0052 #ifdef ALLOW_THSICE
                0053           DO j=1-OLy,sNy+OLy
                0054            DO i=1-OLx,sNx+OLx
                0055              fIce(i,j,bi,bj) = iceMask(i,j,bi,bj)
                0056            ENDDO
                0057           ENDDO
                0058 #endif /* ALLOW_THSICE */
                0059         ELSEIF ( useSEAICE ) THEN
                0060 #ifdef ALLOW_SEAICE
                0061           DO j=1-OLy,sNy+OLy
                0062            DO i=1-OLx,sNx+OLx
                0063              fIce(i,j,bi,bj) = AREA(i,j,bi,bj)
                0064            ENDDO
                0065           ENDDO
                0066 #endif /* ALLOW_SEAICE */
                0067         ELSEIF ( useCoupler ) THEN
                0068 #ifdef ALLOW_OCN_COMPON_INTERF
                0069          IF ( useImportFice ) THEN
                0070            DO j=1-OLy,sNy+OLy
                0071             DO i=1-OLx,sNx+OLx
                0072              fIce(i,j,bi,bj) = sIceFrac_cpl(i,j,bi,bj)
                0073             ENDDO
                0074            ENDDO
                0075          ENDIF
                0076 #endif /* ALLOW_OCN_COMPON_INTERF */
                0077         ENDIF
                0078 
                0079 #ifdef ALLOW_OCN_COMPON_INTERF
                0080         IF ( useCoupler ) THEN
                0081          IF ( useImportCO2 ) THEN
                0082            DO j=1-OLy,sNy+OLy
                0083             DO i=1-OLx,sNx+OLx
                0084              AtmospCO2(i,j,bi,bj) = airCO2(i,j,bi,bj)
                0085             ENDDO
                0086            ENDDO
                0087          ENDIF
                0088          IF ( useImportWSpd ) THEN
                0089            DO j=1-OLy,sNy+OLy
                0090             DO i=1-OLx,sNx+OLx
                0091              wind(i,j,bi,bj) = surfWSpeed(i,j,bi,bj)
                0092             ENDDO
                0093            ENDDO
                0094          ENDIF
                0095         ENDIF
                0096 #endif /* ALLOW_OCN_COMPON_INTERF */
                0097 
                0098 #endif /* ALLOW_DIC */
                0099       RETURN
                0100       END