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

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

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

revision 1.7 by edhill, Fri Jun 24 04:36:54 2005 UTC revision 1.13 by jscott, Mon Apr 9 17:44:13 2007 UTC
# Line 32  C     === Global variables === Line 32  C     === Global variables ===
32    
33  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
34  C     === Routine arguments ===  C     === Routine arguments ===
35    C     myThid    :: My Thread Id. number
36        INTEGER myThid        INTEGER myThid
37  CEOP  CEOP
38    
39  #ifdef ALLOW_THSICE  #ifdef ALLOW_THSICE
40    
41  C     === Local variables ===  C     === Local variables ===
42  C     msgBuf      - Informational/error message buffer  C     msgBuf    :: Informational/error message buffer
43  C     iUnit       - Work variable for IO unit number  C     iUnit     :: Work variable for IO unit number
44        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
45        INTEGER iUnit        INTEGER iUnit
46    
# Line 49  C--   Th-Sea-ICE parameter Line 50  C--   Th-Sea-ICE parameter
50       &  cpice, cpwater,       &  cpice, cpwater,
51       &  kice, ksnow,       &  kice, ksnow,
52       &  transcoef, Lfresh, qsnow,       &  transcoef, Lfresh, qsnow,
53       &  albColdSnow, albWarmSnow, albOldSnow, hNewSnowAge,       &  albColdSnow, albWarmSnow, tempSnowAlb,
54         &  albOldSnow, hNewSnowAge, snowAgTime,
55       &  albIceMax, albIceMin, hAlbIce, hAlbSnow,       &  albIceMax, albIceMin, hAlbIce, hAlbSnow,
56       &  i0, ksolar,       &  i0, ksolar,
57       &  saltice, S_winton, mu_Tf,       &  saltice, S_winton, mu_Tf,
# Line 57  C--   Th-Sea-ICE parameter Line 59  C--   Th-Sea-ICE parameter
59       &  himin, Terrmax, nitMaxTsf, hiMax, hsMax,       &  himin, Terrmax, nitMaxTsf, hiMax, hsMax,
60       &  iceMaskmax, iceMaskmin, himin0,       &  iceMaskmax, iceMaskmin, himin0,
61       &  frac_energy, hihig       &  frac_energy, hihig
62    
63        NAMELIST /THSICE_PARM01/        NAMELIST /THSICE_PARM01/
64       &     startIceModel, stepFwd_oceMxL,       &     startIceModel, stepFwd_oceMxL,
65       &     thSIce_deltaT, ocean_deltaT, tauRelax_MxL,       &     thSIce_deltaT, thSIce_dtTemp,
66         &     ocean_deltaT, tauRelax_MxL,
67       &     hMxL_default, sMxL_default, vMxL_default,       &     hMxL_default, sMxL_default, vMxL_default,
68       &     stressReduction,       &     thSIce_diffK, thSIceAdvScheme, stressReduction,
69       &     thSIce_taveFreq, thSIce_diagFreq, thSIce_monFreq,       &     thSIce_taveFreq, thSIce_diagFreq, thSIce_monFreq,
70       &     thSIce_tave_mnc, thSIce_snapshot_mnc, thSIce_mon_mnc,       &     thSIce_tave_mnc, thSIce_snapshot_mnc, thSIce_mon_mnc,
71       &     thSIce_pickup_read_mnc, thSIce_pickup_write_mnc,       &     thSIce_pickup_read_mnc, thSIce_pickup_write_mnc,
# Line 75  C--   Th-Sea-ICE parameter Line 78  C--   Th-Sea-ICE parameter
78        WRITE(msgBuf,'(A)') ' THSICE_READPARMS: opening data.ice'        WRITE(msgBuf,'(A)') ' THSICE_READPARMS: opening data.ice'
79        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
80       &                    SQUEEZE_RIGHT , 1)       &                    SQUEEZE_RIGHT , 1)
81        
82        CALL OPEN_COPY_DATA_FILE(        CALL OPEN_COPY_DATA_FILE(
83       I                          'data.ice', 'THSICE_READPARMS',       I                          'data.ice', 'THSICE_READPARMS',
84       O                          iUnit,       O                          iUnit,
# Line 95  C--   Default values (constants) Line 98  C--   Default values (constants)
98        qsnow    = Lfresh        qsnow    = Lfresh
99        albColdSnow= 0.85 _d 0        albColdSnow= 0.85 _d 0
100        albWarmSnow= 0.70 _d 0        albWarmSnow= 0.70 _d 0
101          tempSnowAlb= -10. _d 0
102        albOldSnow = 0.55 _d 0        albOldSnow = 0.55 _d 0
103        albIceMax  = 0.65 _d 0        albIceMax  = 0.65 _d 0
104        albIceMin  = 0.20 _d 0        albIceMin  = 0.20 _d 0
105        hAlbIce    = 0.50 _d 0        hAlbIce    = 0.50 _d 0
106        hAlbSnow   = 0.30 _d 0        hAlbSnow   = 0.30 _d 0
107        hNewSnowAge= 2. _d -3        hNewSnowAge= 2. _d -3
108          snowAgTime = 50. _d 0 * 86400. _d 0
109        i0       = 0.3 _d 0        i0       = 0.3 _d 0
110        ksolar   = 1.5 _d 0        ksolar   = 1.5 _d 0
111        saltice  = 4. _d 0        saltice  = 4. _d 0
# Line 122  C--   Default values (parameters) Line 127  C--   Default values (parameters)
127        stepFwd_oceMxL  = .FALSE.        stepFwd_oceMxL  = .FALSE.
128        startIceModel   = 0        startIceModel   = 0
129        thSIce_deltaT   = dTtracerLev(1)        thSIce_deltaT   = dTtracerLev(1)
130          thSIce_dtTemp  = UNSET_RL
131        ocean_deltaT    = dTtracerLev(1)        ocean_deltaT    = dTtracerLev(1)
132        tauRelax_MxL    = 0. _d 0        tauRelax_MxL    = 0. _d 0
133        hMxL_default    = 50. _d 0        hMxL_default    = 50. _d 0
134        sMxL_default    = 35. _d 0        sMxL_default    = 35. _d 0
135        vMxL_default    = 5. _d -2        vMxL_default    = 5. _d -2
136          thSIce_diffK    = 0. _d 0
137          thSIceAdvScheme = 0
138        stressReduction = 1. _d 0        stressReduction = 1. _d 0
139        thSIce_taveFreq = taveFreq        IF ( useSEAICE ) stressReduction = 0. _d 0
140          thSIce_taveFreq = taveFreq
141        thSIce_diagFreq = dumpFreq        thSIce_diagFreq = dumpFreq
142        thSIce_monFreq  = monitorFreq        thSIce_monFreq  = monitorFreq
143  #ifdef ALLOW_MNC  #ifdef ALLOW_MNC
# Line 166  C--   Read parameters from open data fil Line 175  C--   Read parameters from open data fil
175  C--   Close the open data file  C--   Close the open data file
176        CLOSE(iUnit)        CLOSE(iUnit)
177    
178    C     If using the same time step for both icetop temp solver
179    C     and ice thickness/growth, use thSIce_deltaT value
180          IF ( thSIce_dtTemp .EQ. UNSET_RL ) thSIce_dtTemp=thSIce_deltaT
181    
182  C-    Define other constants (from previous ones):  C-    Define other constants (from previous ones):
183        Tmlt1=-mu_Tf*S_winton        Tmlt1=-mu_Tf*S_winton
184        rhoiw = rhosw - rhoi        rhoiw = rhosw - rhoi
# Line 179  C     Set I/O parameters Line 192  C     Set I/O parameters
192        IF (useMNC) THEN        IF (useMNC) THEN
193          IF ( .NOT.outputTypesInclusive          IF ( .NOT.outputTypesInclusive
194       &       .AND. thSIce_tave_mnc ) thSIce_tave_mdsio = .FALSE.       &       .AND. thSIce_tave_mnc ) thSIce_tave_mdsio = .FALSE.
195          IF ( .NOT.outputTypesInclusive          IF ( .NOT.outputTypesInclusive
196       &       .AND. thSIce_snapshot_mnc )       &       .AND. thSIce_snapshot_mnc )
197       &       thSIce_snapshot_mdsio = .FALSE.       &       thSIce_snapshot_mdsio = .FALSE.
198          IF ( .NOT.outputTypesInclusive          IF ( .NOT.outputTypesInclusive
199       &       .AND. thSIce_mon_mnc  ) thSIce_mon_stdio  = .FALSE.       &       .AND. thSIce_mon_mnc  ) thSIce_mon_stdio  = .FALSE.
200          IF ( .NOT.outputTypesInclusive          IF ( .NOT.outputTypesInclusive
201       &       .AND. thSIce_pickup_write_mnc  )       &       .AND. thSIce_pickup_write_mnc  )
202       &       thSIce_pickup_write_mdsio = .FALSE.       &       thSIce_pickup_write_mdsio = .FALSE.
203        ENDIF        ENDIF
204  #endif  #endif
205    
206  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
207    C--   Check parameter consistency:
208          IF ( thSIceAdvScheme.EQ.0 .AND. thSIce_diffK.NE.0. ) THEN
209            WRITE(msgBuf,'(2A)')
210         &   'THSICE_READPARMS: to use thSIce_diffK, needs to select',
211         &   ' one advection scheme (thSIceAdvScheme<>0)'
212            CALL PRINT_ERROR( msgBuf , myThid )
213            STOP 'ABNORMAL END: THSICE_READPARMS'
214          ENDIF
215    #ifndef ALLOW_GENERIC_ADVDIFF
216          IF ( thSIceAdvScheme.NE.0 ) THEN
217            WRITE(msgBuf,'(2A)')
218         &   'THSICE_READPARMS: Need to compile "generic_advdiff" pkg',
219         &   ' in order to use thSIceAdvScheme'
220            CALL PRINT_ERROR( msgBuf , myThid )
221            STOP 'ABNORMAL END: THSICE_READPARMS'
222          ENDIF
223    #endif /* ndef ALLOW_GENERIC_ADVDIFF */
224    
225          IF ( useSEAICE .AND. stressReduction.NE.0. _d 0 ) THEN
226    C--     If useSEAICE=.true., the stress is computed in seaice_model,
227    C--     so that it does not need any further reduction
228            WRITE(msgBuf,'(2A)')
229         &   'THSICE_READPARMS: if useSEAICE, stress will be computed',
230         &   ' by SEAICE pkg => no reduction'
231            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
232         &                    SQUEEZE_RIGHT , myThid)
233            WRITE(msgBuf,'(A)')
234         &   'THSICE_READPARMS: WARNING: reset stressReduction to zero'
235            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
236         &                    SQUEEZE_RIGHT , myThid)
237            stressReduction = 0. _d 0
238          ENDIF
239    
240    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
241        iUnit = standardMessageUnit        iUnit = standardMessageUnit
242  c     CALL MDSFINDUNIT( iUnit, mythid )  c     CALL MDSFINDUNIT( iUnit, mythid )
243  c     OPEN(iUnit,file='thsice_check_params',status='unknown')  c     OPEN(iUnit,file='thsice_check_params',status='unknown')
# Line 208  c     OPEN(iUnit,file='thsice_check_para Line 255  c     OPEN(iUnit,file='thsice_check_para
255        WRITE(iUnit,*) 'ThSI: qsnow   =',qsnow        WRITE(iUnit,*) 'ThSI: qsnow   =',qsnow
256        WRITE(iUnit,*) 'ThSI: albColdSnow=',albColdSnow        WRITE(iUnit,*) 'ThSI: albColdSnow=',albColdSnow
257        WRITE(iUnit,*) 'ThSI: albWarmSnow=',albWarmSnow        WRITE(iUnit,*) 'ThSI: albWarmSnow=',albWarmSnow
258          WRITE(iUnit,*) 'ThSI: tempSnowAlb=',tempSnowAlb
259        WRITE(iUnit,*) 'ThSI: albOldSnow =',albOldSnow        WRITE(iUnit,*) 'ThSI: albOldSnow =',albOldSnow
260        WRITE(iUnit,*) 'ThSI: hNewSnowAge=',hNewSnowAge        WRITE(iUnit,*) 'ThSI: hNewSnowAge=',hNewSnowAge
261          WRITE(iUnit,*) 'ThSI: snowAgTime =',snowAgTime
262        WRITE(iUnit,*) 'ThSI: albIceMax =',albIceMax        WRITE(iUnit,*) 'ThSI: albIceMax =',albIceMax
263        WRITE(iUnit,*) 'ThSI: albIceMin =',albIceMin        WRITE(iUnit,*) 'ThSI: albIceMin =',albIceMin
264        WRITE(iUnit,*) 'ThSI: hAlbIce   =',hAlbIce        WRITE(iUnit,*) 'ThSI: hAlbIce   =',hAlbIce
# Line 232  c     OPEN(iUnit,file='thsice_check_para Line 281  c     OPEN(iUnit,file='thsice_check_para
281        WRITE(iUnit,*) 'ThSI: frac_energy',frac_energy        WRITE(iUnit,*) 'ThSI: frac_energy',frac_energy
282        WRITE(iUnit,*) 'ThSI: hihig   =',hihig        WRITE(iUnit,*) 'ThSI: hihig   =',hihig
283        WRITE(iUnit,*) 'ThSI: stressReduction =',stressReduction        WRITE(iUnit,*) 'ThSI: stressReduction =',stressReduction
284          WRITE(iUnit,*) 'ThSI: thSIceAdvScheme =',thSIceAdvScheme
285          WRITE(iUnit,*) 'ThSI: thSIce_diffK  =',thSIce_diffK
286        WRITE(iUnit,*) 'ThSI: thSIce_deltaT =',thSIce_deltaT        WRITE(iUnit,*) 'ThSI: thSIce_deltaT =',thSIce_deltaT
287        WRITE(iUnit,*) 'ThSI: ocean_deltaT  =',ocean_deltaT        WRITE(iUnit,*) 'ThSI: ocean_deltaT  =',ocean_deltaT
288        WRITE(iUnit,*) 'ThSI: stepFwd_oceMxL=',stepFwd_oceMxL        WRITE(iUnit,*) 'ThSI: stepFwd_oceMxL=',stepFwd_oceMxL

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

  ViewVC Help
Powered by ViewVC 1.1.22