Back to home page

MITgcm

 
 

    


File indexing completed on 2024-05-25 05:11:13 UTC

view on githubraw file Latest commit 00f81e67 on 2024-05-24 21:00:12 UTC
00f81e6785 Ou W*0001 #include "STIC_OPTIONS.h"
                0002 
                0003 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0004 CBOP
                0005 C !ROUTINE: STIC_INIT_VARIA
                0006 
                0007 C !INTERFACE:
                0008       SUBROUTINE STIC_INIT_VARIA( myThid )
                0009 
                0010 C     !DESCRIPTION:
                0011 C     Initialize STEEP_ICECAVITY variables
                0012 
                0013 C     !USES:
                0014       IMPLICIT NONE
                0015 C     == Global variables ===
                0016 #include "SIZE.h"
                0017 #include "EEPARAMS.h"
                0018 #include "PARAMS.h"
                0019 #include "GRID.h"
                0020 #include "STIC.h"
                0021 #ifdef ALLOW_SHELFICE
                0022 # include "SHELFICE.h"
                0023 #endif
                0024 
                0025 C     !INPUT/OUTPUT PARAMETERS:
                0026 C     myThid ::  my Thread Id number
                0027       INTEGER myThid
                0028 CEOP
                0029 
                0030 C     !LOCAL VARIABLES:
                0031       INTEGER i,j,k,bi,bj
                0032 
                0033       DO bj = myByLo(myThid), myByHi(myThid)
                0034        DO bi = myBxLo(myThid), myBxHi(myThid)
                0035 
                0036 C     Initialize arrays in common blocks :
                0037 C     3-dim.
                0038         DO k=1,Nr
                0039          DO j=1-OLy,sNy+OLy
                0040           DO i=1-OLx,sNx+OLx
                0041            icfHeatFlux      (i,j,k,bi,bj) = 0. _d 0
                0042            icfFreshWaterFlux(i,j,k,bi,bj) = 0. _d 0
                0043            stic_gT    (i,j,k,bi,bj) = 0. _d 0
                0044            stic_gS    (i,j,k,bi,bj) = 0. _d 0
                0045           ENDDO
                0046          ENDDO
                0047         ENDDO
                0048 
                0049 C     2-dim.
                0050         DO j=1-OLy,sNy+OLy
                0051          DO i=1-OLx,sNx+OLx
                0052           sticfHeatFlux      (i,j,bi,bj) = 0. _d 0
                0053           sticfFreshWaterFlux(i,j,bi,bj) = 0. _d 0
                0054          ENDDO
                0055         ENDDO
                0056 
                0057 C- end bi,bj loops
                0058        ENDDO
                0059       ENDDO
                0060 
                0061 #ifdef ALLOW_SHITRANSCOEFF_3D
                0062       IF ( .NOT. SHELFICEuseGammaFrict ) THEN
                0063        IF ( SHELFICETransCoeffTFile .NE. ' ' ) THEN
                0064         CALL READ_FLD_XYZ_RL( SHELFICETransCoeffTFile, ' ',
                0065      &                       shiTransCoeffT3d, 0, myThid )
                0066         _EXCH_XYZ_RL( shiTransCoeffT3d, myThid )
                0067         DO bj = myByLo(myThid), myByHi(myThid)
                0068          DO bi = myBxLo(myThid), myBxHi(myThid)
                0069           DO k = 1, Nr
                0070            DO j = 1-OLy, sNy+OLy
                0071             DO i = 1-OLx, sNx+OLx
                0072              shiTransCoeffS3d(i,j,k,bi,bj) = SHELFICEsaltToHeatRatio *
                0073      &            shiTransCoeffT3d(i,j,k,bi,bj)
                0074             ENDDO
                0075            ENDDO
                0076           ENDDO
                0077          ENDDO
                0078         ENDDO
                0079        ELSE
                0080 C     set coefficients to constant values
                0081         DO bj = myByLo(myThid), myByHi(myThid)
                0082          DO bi = myBxLo(myThid), myBxHi(myThid)
                0083           DO k = 1, Nr
                0084            DO j = 1-OLy, sNy+OLy
                0085             DO i = 1-OLx, sNx+OLx
                0086              shiTransCoeffT3d(i,j,k,bi,bj) = SHELFICEheatTransCoeff
                0087              shiTransCoeffS3d(i,j,k,bi,bj) = SHELFICEsaltTransCoeff
                0088             ENDDO
                0089            ENDDO
                0090           ENDDO
                0091          ENDDO
                0092         ENDDO
                0093        ENDIF
                0094       ENDIF
                0095 #endif
                0096 
                0097       RETURN
                0098       END