Back to home page

MITgcm

 
 

    


File indexing completed on 2019-12-18 06:11:23 UTC

view on githubraw file Latest commit 9952f046 on 2019-12-17 17:59:00 UTC
ea3c970699 Jean*0001 #include "SHELFICE_OPTIONS.h"
                0002 
                0003 CBOP
                0004 C     !ROUTINE: SHELFICE_INIT_DEPTHS
                0005 C     !INTERFACE:
                0006       SUBROUTINE SHELFICE_INIT_DEPTHS(
                0007      U                    rLowC, rSurfC,
                0008      I                    myThid )
                0009 C     !DESCRIPTION: \bv
                0010 C     *==========================================================*
                0011 C     | SUBROUTINE SHELFICE_INIT_DEPTHS
                0012 C     | o Modify ocean upper boundary position according to
                0013 C     |   ice-shelf topography
                0014 C     *==========================================================*
                0015 C     \ev
                0016 
                0017 C     !USES:
                0018       IMPLICIT NONE
                0019 C     === Global variables ===
                0020 #include "SIZE.h"
                0021 #include "EEPARAMS.h"
                0022 #include "PARAMS.h"
                0023 #ifdef ALLOW_SHELFICE
                0024 # include "SHELFICE.h"
                0025 #endif /* ALLOW_SHELFICE */
                0026 
                0027 C     !INPUT/OUTPUT PARAMETERS:
                0028 C     == Routine arguments ==
                0029 C     rLowC     :: base of fluid column in r_unit at grid-cell center
                0030 C     rSurfC    :: surface reference position (r_unit) at grid-cell center
                0031 C     myThid    :: my Thread Id number
                0032       _RS rLowC  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0033       _RS rSurfC (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
                0034       INTEGER myThid
                0035 
                0036 #ifdef ALLOW_SHELFICE
                0037 C     !LOCAL VARIABLES:
                0038 C     == Local variables ==
                0039 C     bi, bj    :: tile indices
                0040 C     i, j      :: Loop counters
                0041       INTEGER bi, bj
                0042       INTEGER i, j
                0043 CEOP
                0044 
                0045 C--   Initialize R_shelfIce
                0046       DO bj = myByLo(myThid), myByHi(myThid)
                0047        DO bi = myBxLo(myThid), myBxHi(myThid)
                0048         DO j=1-OLy,sNy+OLy
                0049          DO i=1-OLx,sNx+OLx
                0050           R_shelfIce(i,j,bi,bj) = 0. _d 0
                0051          ENDDO
                0052         ENDDO
                0053        ENDDO
                0054       ENDDO
                0055 
                0056       IF ( SHELFICEtopoFile .NE. ' ' ) THEN
                0057        _BARRIER
                0058 C-    Read the shelfIce draught using the mid-level I/O pacakage read_write_rec
                0059 C     The 0 is the "iteration" argument. The 1 is the record number.
                0060        CALL READ_REC_XY_RS( SHELFICEtopoFile, R_shelfIce,
                0061      &                      1, 0, myThid )
                0062 C-    Read the shelfIce draught using the mid-level I/O pacakage read_write_fld
                0063 C     The 0 is the "iteration" argument. The ' ' is an empty suffix
                0064 C      CALL READ_FLD_XY_RS( SHELFICEtopoFile, ' ', R_shelfIce,
                0065 C    &                      0, myThid )
                0066 C-     end setup R_shelfIce in the interior
                0067       ENDIF
                0068 
9952f046d7 dngo*0069 #ifdef ALLOW_SHELFICE_REMESHING
                0070       IF ( SHELFICEremeshFrequency.GT.zeroRL .AND.
                0071      &     ( nIter0.NE.0 .OR. startTime.NE.baseTime
                0072      &                   .OR. pickupSuff.NE.' ') ) THEN
                0073         CALL SHELFICE_READ_PICKUP( 0, nIter0, myThid )
                0074       ENDIF
                0075 #endif /* ALLOW_SHELFICE_REMESHING */
                0076 
ea3c970699 Jean*0077 C- fill in the overlap (+ BARRIER):
                0078       _EXCH_XY_RS( R_shelfIce, myThid )
                0079 
                0080 C--   Modify ocean upper boundary position according to ice-shelf topography
                0081       IF ( usingZCoords ) THEN
                0082         DO bj=myByLo(myThid), myByHi(myThid)
                0083          DO bi=myBxLo(myThid), myBxHi(myThid)
                0084           DO j=1-OLy,sNy+OLy
                0085            DO i=1-OLx,sNx+OLx
                0086             rSurfC(i,j,bi,bj) =
                0087      &        MIN( rSurfC(i,j,bi,bj), R_shelfIce(i,j,bi,bj) )
                0088            ENDDO
                0089           ENDDO
                0090          ENDDO
                0091         ENDDO
                0092       ELSE
                0093         STOP 'SHELFICE_INIT_DEPTHS: Missing code for P-coords'
                0094       ENDIF
                0095 
                0096 #endif /* ALLOW_SHELFICE */
                0097 
                0098       RETURN
                0099       END