/[MITgcm]/MITgcm/pkg/thsice/thsice_ini_vars.F
ViewVC logotype

Diff of /MITgcm/pkg/thsice/thsice_ini_vars.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.13 by dimitri, Thu May 22 15:54:37 2008 UTC revision 1.20 by jmc, Wed Sep 2 19:28:44 2009 UTC
# Line 26  C     === Global variables === Line 26  C     === Global variables ===
26  #include "EEPARAMS.h"  #include "EEPARAMS.h"
27  #include "PARAMS.h"  #include "PARAMS.h"
28  #include "FFIELDS.h"  #include "FFIELDS.h"
 #include "DYNVARS.h"  
29  #include "THSICE_PARAMS.h"  #include "THSICE_PARAMS.h"
30  #include "THSICE_VARS.h"  #include "THSICE_VARS.h"
31  #ifdef ALLOW_AIM  #ifdef ALLOW_AIM
# Line 48  C     i,j    :: Loop counters Line 47  C     i,j    :: Loop counters
47        INTEGER prec        INTEGER prec
48  c     CHARACTER*(MAX_LEN_FNAM) fn  c     CHARACTER*(MAX_LEN_FNAM) fn
49        _RL v2Loc        _RL v2Loc
50          _RL Tf
51    
52  c     set up ice arrays to zero if starting ice  c     set up ice arrays to zero if starting ice
53        DO bj = myByLo(myThid), myByHi(myThid)        DO bj = myByLo(myThid), myByHi(myThid)
# Line 110  C         and this mask is used in thsic Line 109  C         and this mask is used in thsic
109    
110  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
111    
112        IF ( startIceModel.LE.0 .AND. nIter0.NE.0 ) THEN        IF ( startIceModel.LE.0 .AND.
113         &     ( nIter0.NE.0  .OR. pickupSuff.NE.' ' )
114         &   ) THEN
115  C--     Read ice pickup fields  C--     Read ice pickup fields
        _BARRIER  
116          prec=precFloat64          prec=precFloat64
117          CALL THSICE_READ_PICKUP( prec, nIter0, myThid )          CALL THSICE_READ_PICKUP( prec, nIter0, myThid )
118    
119        ELSE        ELSE
120  C--     Read initial conditions:  C--     Read initial conditions:
         _BEGIN_MASTER( myThid )  
         IF ( thSIceThick_InitFile .NE. ' ' ) THEN  
          CALL READ_REC_XY_RL(thSIceThick_InitFile,iceHeight,1,0,myThid)  
         ENDIF  
121          IF ( thSIceFract_InitFile .NE. ' ' ) THEN          IF ( thSIceFract_InitFile .NE. ' ' ) THEN
122           CALL READ_REC_XY_RL(thSIceFract_InitFile,iceMask,1,0,myThid)           CALL READ_REC_XY_RL(thSIceFract_InitFile,iceMask,1,0,myThid)
123          ELSE          ENDIF
124  C     default to 100% ice concentration when thickness is non-zero          IF ( thSIceThick_InitFile .NE. ' ' ) THEN
125           DO bj = myByLo(myThid), myByHi(myThid)           CALL READ_REC_XY_RL(thSIceThick_InitFile,iceHeight,1,0,myThid)
           DO bi = myBxLo(myThid), myBxHi(myThid)  
            DO j=1-OLy,sNy+OLy  
             DO i=1-OLx,sNx+OLx  
              IF (iceHeight(i,j,bi,bj) .NE. 0. _d 0)  
      &            iceMask(i,j,bi,bj) = 1. _d 0  
             ENDDO  
            ENDDO  
           ENDDO  
          ENDDO  
126          ENDIF          ENDIF
127          IF ( thSIceSnowH_InitFile .NE. ' ' ) THEN          IF ( thSIceSnowH_InitFile .NE. ' ' ) THEN
128           CALL READ_REC_XY_RL(thSIceSnowH_InitFile,snowHeight,1,0,myThid)           CALL READ_REC_XY_RL(thSIceSnowH_InitFile,snowHeight,1,0,myThid)
         ELSE  
 C     default to <= 20 cm snow thickness where there is ice  
          DO bj = myByLo(myThid), myByHi(myThid)  
           DO bi = myBxLo(myThid), myBxHi(myThid)  
            DO j=1-OLy,sNy+OLy  
             DO i=1-OLx,sNx+OLx  
              snowHeight(i,j,bi,bj) = 0.2 _d 0  
             ENDDO  
            ENDDO  
           ENDDO  
          ENDDO  
129          ENDIF          ENDIF
130          IF ( thSIceSnowA_InitFile .NE. ' ' ) THEN          IF ( thSIceSnowA_InitFile .NE. ' ' ) THEN
131           CALL READ_REC_XY_RL(thSIceSnowA_InitFile,snowAge,1,0,myThid)           CALL READ_REC_XY_RL(thSIceSnowA_InitFile,snowAge,1,0,myThid)
         ELSE  
 C     default to 3 days for snow age  
          DO bj = myByLo(myThid), myByHi(myThid)  
           DO bi = myBxLo(myThid), myBxHi(myThid)  
            DO j=1-OLy,sNy+OLy  
             DO i=1-OLx,sNx+OLx  
              IF (snowHeight(i,j,bi,bj) .NE. 0. _d 0)  
      &            snowAge(i,j,bi,bj) = 259200. _d 0  
             ENDDO  
            ENDDO  
           ENDDO  
          ENDDO  
132          ENDIF          ENDIF
133          IF ( thSIceEnthp_InitFile .NE. ' ' ) THEN          IF ( thSIceEnthp_InitFile .NE. ' ' ) THEN
134           CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice1,1,0,myThid)           CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice1,1,0,myThid)
135           CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice2,2,0,myThid)           CALL READ_REC_XY_RL(thSIceEnthp_InitFile,Qice2,2,0,myThid)
136          ELSE          ENDIF
137  C     default to 3.4e5 J/kg for enthalpy where there is sea ice          IF ( thSIceTsurf_InitFile .NE. ' ' ) THEN
138             CALL READ_REC_XY_RL(thSIceTsurf_InitFile,Tsrf,1,0,myThid)
139            ENDIF
140            IF ( thSIceEnthp_InitFile .EQ. ' ' ) THEN
141    C-    enthalpy of new ice in J/kg, taken from thsice_extend.F with Tf beeing
142    C     the freezing Temp of seawater computed from a fixed salinity (31.5 psu)
143    C     Tf = -mu_Tf*salinity = -1.70 deg C;  Qice1 ~ 3.2e5;  Qice2 ~ 3.4e5
144             Tf = -1.70 _d 0
145           DO bj = myByLo(myThid), myByHi(myThid)           DO bj = myByLo(myThid), myByHi(myThid)
146            DO bi = myBxLo(myThid), myBxHi(myThid)            DO bi = myBxLo(myThid), myBxHi(myThid)
147             DO j=1-OLy,sNy+OLy             DO j=1-OLy,sNy+OLy
148              DO i=1-OLx,sNx+OLx              DO i=1-OLx,sNx+OLx
149               IF (iceMask(i,j,bi,bj) .NE. 0. _d 0) THEN               IF (iceMask(i,j,bi,bj) .NE. 0. _d 0) THEN
150                Qice1(i,j,bi,bj) = 3.4 _d 5                Qice1(i,j,bi,bj) = -cpWater*Tmlt1
151                Qice2(i,j,bi,bj) = 3.4 _d 5       &             + cpIce *(Tmlt1-Tf) + Lfresh*(1. _d 0-Tmlt1/Tf)
152                  Qice2(i,j,bi,bj) = -cpIce *Tf + Lfresh
153               ENDIF               ENDIF
154              ENDDO              ENDDO
155             ENDDO             ENDDO
156            ENDDO            ENDDO
157           ENDDO           ENDDO
158          ENDIF          ENDIF
         IF ( thSIceTsurf_InitFile .NE. ' ' ) THEN  
          CALL READ_REC_XY_RS(thSIceTsurf_InitFile,Tsrf,1,0,myThid)  
         ENDIF  
         _END_MASTER(myThid)  
159        ENDIF        ENDIF
160    
161          _EXCH_XY_R8(iceMask,myThid)        _EXCH_XY_RL(iceMask,myThid)
162          _EXCH_XY_R8(iceHeight, myThid)        _EXCH_XY_RL(iceHeight, myThid)
163          _EXCH_XY_R8(snowHeight,myThid)        _EXCH_XY_RL(snowHeight,myThid)
164          _EXCH_XY_R8(Tsrf,   myThid)        _EXCH_XY_RL(Tsrf,   myThid)
165          _EXCH_XY_R8(Tice1,  myThid)        _EXCH_XY_RL(Tice1,  myThid)
166          _EXCH_XY_R8(Tice2,  myThid)        _EXCH_XY_RL(Tice2,  myThid)
167          _EXCH_XY_R8(Qice1,  myThid)        _EXCH_XY_RL(Qice1,  myThid)
168          _EXCH_XY_R8(Qice2,  myThid)        _EXCH_XY_RL(Qice2,  myThid)
169          _EXCH_XY_R8(snowAge,myThid)        _EXCH_XY_RL(snowAge,myThid)
170    
171  C--     Initialise Sea-Ice Loading for SeaIce-Dynamics :  C--     Initialise Sea-Ice Loading for SeaIce-Dynamics :
172          IF ( useSEAICE ) THEN        IF ( useSEAICE ) THEN
173            DO bj = myByLo(myThid), myByHi(myThid)         DO bj = myByLo(myThid), myByHi(myThid)
174             DO bi = myBxLo(myThid), myBxHi(myThid)          DO bi = myBxLo(myThid), myBxHi(myThid)
175              DO j=1-OLy,sNy+OLy           DO j=1-OLy,sNy+OLy
176               DO i=1-OLx,sNx+OLx            DO i=1-OLx,sNx+OLx
177                 sIceLoad(i,j,bi,bj) = ( snowHeight(i,j,bi,bj)*rhos             sIceLoad(i,j,bi,bj) = ( snowHeight(i,j,bi,bj)*rhos
178       &                               + iceHeight(i,j,bi,bj)*rhoi       &          + iceHeight(i,j,bi,bj)*rhoi
179       &                               )*iceMask(i,j,bi,bj)       &          )*iceMask(i,j,bi,bj)
              ENDDO  
             ENDDO  
            ENDDO  
180            ENDDO            ENDDO
181          ENDIF           ENDDO
182            ENDDO
183           ENDDO
184          ENDIF
185    
186  #endif /* ALLOW_THSICE */  #endif /* ALLOW_THSICE */
187    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.22