/[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.17 by dfer, Wed Sep 23 20:24:47 2009 UTC revision 1.18 by jmc, Wed Aug 1 18:20:55 2012 UTC
# Line 42  C     === Local variables === Line 42  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          CHARACTER*(20) fmtR, fmtI, fmtL, fmtC
46        INTEGER iUnit        INTEGER iUnit
47    
48  C--   Th-Sea-ICE parameter  C--   Th-Sea-ICE parameter
# Line 65  C--   Th-Sea-ICE parameter Line 66  C--   Th-Sea-ICE parameter
66       &     ocean_deltaT, tauRelax_MxL, tauRelax_MxL_salt,       &     ocean_deltaT, tauRelax_MxL, tauRelax_MxL_salt,
67       &     hMxL_default, sMxL_default, vMxL_default,       &     hMxL_default, sMxL_default, vMxL_default,
68       &     thSIce_diffK, thSIceAdvScheme, stressReduction,       &     thSIce_diffK, thSIceAdvScheme, stressReduction,
69         &     thSIceBalanceAtmFW,
70       &     thSIce_taveFreq, thSIce_diagFreq, thSIce_monFreq,       &     thSIce_taveFreq, thSIce_diagFreq, thSIce_monFreq,
71       &     thSIce_tave_mnc, thSIce_snapshot_mnc, thSIce_mon_mnc,       &     thSIce_tave_mnc, thSIce_snapshot_mnc, thSIce_mon_mnc,
72       &     thSIce_pickup_read_mnc, thSIce_pickup_write_mnc,       &     thSIce_pickup_read_mnc, thSIce_pickup_write_mnc,
# Line 141  C--   Default values (parameters) Line 143  C--   Default values (parameters)
143        thSIceAdvScheme = 0        thSIceAdvScheme = 0
144        stressReduction = 1. _d 0        stressReduction = 1. _d 0
145        IF ( useSEAICE ) stressReduction = 0. _d 0        IF ( useSEAICE ) stressReduction = 0. _d 0
146          thSIceBalanceAtmFW  = 0
147        thSIce_taveFreq = taveFreq        thSIce_taveFreq = taveFreq
148        thSIce_diagFreq = dumpFreq        thSIce_diagFreq = dumpFreq
149        thSIce_monFreq  = monitorFreq        thSIce_monFreq  = monitorFreq
# Line 216  C     Set I/O parameters Line 219  C     Set I/O parameters
219  #endif  #endif
220    
221  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
222  C--   Check parameter consistency:  C--   Check/reset parameters:
       IF ( thSIceAdvScheme.EQ.0 .AND. thSIce_diffK.NE.0. ) THEN  
         WRITE(msgBuf,'(2A)')  
      &   'THSICE_READPARMS: to use thSIce_diffK, needs to select',  
      &   ' one advection scheme (thSIceAdvScheme<>0)'  
         CALL PRINT_ERROR( msgBuf , myThid )  
         STOP 'ABNORMAL END: THSICE_READPARMS'  
       ENDIF  
 #ifndef ALLOW_GENERIC_ADVDIFF  
       IF ( thSIceAdvScheme.NE.0 ) THEN  
         WRITE(msgBuf,'(2A)')  
      &   'THSICE_READPARMS: Need to compile "generic_advdiff" pkg',  
      &   ' in order to use thSIceAdvScheme'  
         CALL PRINT_ERROR( msgBuf , myThid )  
         STOP 'ABNORMAL END: THSICE_READPARMS'  
       ENDIF  
 #endif /* ndef ALLOW_GENERIC_ADVDIFF */  
   
223        IF ( useSEAICE .AND. stressReduction.NE.0. _d 0 ) THEN        IF ( useSEAICE .AND. stressReduction.NE.0. _d 0 ) THEN
224  C--     If useSEAICE=.true., the stress is computed in seaice_model,  C--     If useSEAICE=.true., the stress is computed in seaice_model,
225  C--     so that it does not need any further reduction  C--     so that it does not need any further reduction
226          WRITE(msgBuf,'(2A)')          WRITE(msgBuf,'(2A)') '** WARNING ** THSICE_READPARMS:',
227       &   'THSICE_READPARMS: if useSEAICE, stress will be computed',       &                       ' reset stressReduction to zero'
      &   ' by SEAICE pkg => no reduction'  
228          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
229       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
230          WRITE(msgBuf,'(A)')          WRITE(msgBuf,'(2A)') 'THSICE_READPARMS: useSEAICE=T =>',
231       &   'THSICE_READPARMS: WARNING: reset stressReduction to zero'       &       ' stress is be computed by SEAICE pkg => no reduction'
232          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,          CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
233       &                    SQUEEZE_RIGHT , myThid)       &                      SQUEEZE_RIGHT, myThid )
234          stressReduction = 0. _d 0          stressReduction = 0. _d 0
235        ENDIF        ENDIF
236          IF ( fluidIsAir .AND. thSIceBalanceAtmFW.NE.0 ) THEN
237            WRITE(msgBuf,'(2A)') '** WARNING ** THSICE_READPARMS:',
238         &                       ' reset thSIceBalanceAtmFW to zero'
239            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
240         &                      SQUEEZE_RIGHT, myThid )
241            WRITE(msgBuf,'(2A)') 'THSICE_READPARMS:',
242         &       ' since it is not available in Atmospheric set-up'
243            CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
244         &                      SQUEEZE_RIGHT, myThid )
245            thSIceBalanceAtmFW = 0
246          ENDIF
247    
248  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
249        iUnit = standardMessageUnit        iUnit = standardMessageUnit
250          fmtR = '(A6,A20,1PE21.13)'
251          fmtI = '(A6,A20,I10)'
252          fmtL = '(A6,A20,L10)'
253          fmtC = '(A26,1X,A)'
254  c     CALL MDSFINDUNIT( iUnit, mythid )  c     CALL MDSFINDUNIT( iUnit, mythid )
255  c     OPEN(iUnit,file='thsice_check_params',status='unknown')  c     OPEN(iUnit,file='thsice_check_params',status='unknown')
256        WRITE(iUnit,*) 'ThSI: rhos      =',rhos        WRITE(iUnit,fmtR) 'ThSI:', 'rhos        =', rhos
257        WRITE(iUnit,*) 'ThSI: rhoi      =',rhoi        WRITE(iUnit,fmtR) 'ThSI:', 'rhoi        =', rhoi
258        WRITE(iUnit,*) 'ThSI: rhosw     =',rhosw        WRITE(iUnit,fmtR) 'ThSI:', 'rhosw       =', rhosw
259        WRITE(iUnit,*) 'ThSI: rhofw     =',rhofw        WRITE(iUnit,fmtR) 'ThSI:', 'rhofw       =', rhofw
260        WRITE(iUnit,*) 'ThSI: floodFac  =',floodFac        WRITE(iUnit,fmtR) 'ThSI:', 'floodFac    =', floodFac
261        WRITE(iUnit,*) 'ThSI: cpIce     =',cpIce        WRITE(iUnit,fmtR) 'ThSI:', 'cpIce       =', cpIce
262        WRITE(iUnit,*) 'ThSI: cpWater   =',cpWater        WRITE(iUnit,fmtR) 'ThSI:', 'cpWater     =', cpWater
263        WRITE(iUnit,*) 'ThSI: kIce      =',kIce        WRITE(iUnit,fmtR) 'ThSI:', 'kIce        =', kIce
264        WRITE(iUnit,*) 'ThSI: kSnow     =',kSnow        WRITE(iUnit,fmtR) 'ThSI:', 'kSnow       =', kSnow
265        WRITE(iUnit,*) 'ThSI: bMeltCoef =',bMeltCoef        WRITE(iUnit,fmtR) 'ThSI:', 'bMeltCoef   =', bMeltCoef
266        WRITE(iUnit,*) 'ThSI: Lfresh    =',Lfresh        WRITE(iUnit,fmtR) 'ThSI:', 'Lfresh      =', Lfresh
267        WRITE(iUnit,*) 'ThSI: qsnow     =',qsnow        WRITE(iUnit,fmtR) 'ThSI:', 'qsnow       =', qsnow
268        WRITE(iUnit,*) 'ThSI: albColdSnow=',albColdSnow        WRITE(iUnit,fmtR) 'ThSI:', 'albColdSnow =', albColdSnow
269        WRITE(iUnit,*) 'ThSI: albWarmSnow=',albWarmSnow        WRITE(iUnit,fmtR) 'ThSI:', 'albWarmSnow =', albWarmSnow
270        WRITE(iUnit,*) 'ThSI: tempSnowAlb=',tempSnowAlb        WRITE(iUnit,fmtR) 'ThSI:', 'tempSnowAlb =', tempSnowAlb
271        WRITE(iUnit,*) 'ThSI: albOldSnow =',albOldSnow        WRITE(iUnit,fmtR) 'ThSI:', 'albOldSnow  =', albOldSnow
272        WRITE(iUnit,*) 'ThSI: hNewSnowAge=',hNewSnowAge        WRITE(iUnit,fmtR) 'ThSI:', 'hNewSnowAge =', hNewSnowAge
273        WRITE(iUnit,*) 'ThSI: snowAgTime =',snowAgTime        WRITE(iUnit,fmtR) 'ThSI:', 'snowAgTime  =', snowAgTime
274        WRITE(iUnit,*) 'ThSI: albIceMax =',albIceMax        WRITE(iUnit,fmtR) 'ThSI:', 'albIceMax   =', albIceMax
275        WRITE(iUnit,*) 'ThSI: albIceMin =',albIceMin        WRITE(iUnit,fmtR) 'ThSI:', 'albIceMin   =', albIceMin
276        WRITE(iUnit,*) 'ThSI: hAlbIce   =',hAlbIce        WRITE(iUnit,fmtR) 'ThSI:', 'hAlbIce     =', hAlbIce
277        WRITE(iUnit,*) 'ThSI: hAlbSnow  =',hAlbSnow        WRITE(iUnit,fmtR) 'ThSI:', 'hAlbSnow    =', hAlbSnow
278        WRITE(iUnit,*) 'ThSI: i0swFrac  =',i0swFrac        WRITE(iUnit,fmtR) 'ThSI:', 'i0swFrac    =', i0swFrac
279        WRITE(iUnit,*) 'ThSI: ksolar    =',ksolar        WRITE(iUnit,fmtR) 'ThSI:', 'ksolar      =', ksolar
280        WRITE(iUnit,*) 'ThSI: dhSnowLin =',dhSnowLin        WRITE(iUnit,fmtR) 'ThSI:', 'dhSnowLin   =', dhSnowLin
281        WRITE(iUnit,*) 'ThSI: saltIce   =',saltIce        WRITE(iUnit,fmtR) 'ThSI:', 'saltIce     =', saltIce
282        WRITE(iUnit,*) 'ThSI: S_winton  =',S_winton        WRITE(iUnit,fmtR) 'ThSI:', 'S_winton    =', S_winton
283        WRITE(iUnit,*) 'ThSI: mu_Tf     =',mu_Tf        WRITE(iUnit,fmtR) 'ThSI:', 'mu_Tf       =', mu_Tf
284        WRITE(iUnit,*) 'ThSI: Tf0kel    =',Tf0kel        WRITE(iUnit,fmtR) 'ThSI:', 'Tf0kel      =', Tf0kel
285        WRITE(iUnit,*) 'ThSI: Tmlt1     =',Tmlt1        WRITE(iUnit,fmtR) 'ThSI:', 'Tmlt1       =', Tmlt1
286        WRITE(iUnit,*) 'ThSI: Terrmax   =',Terrmax        WRITE(iUnit,fmtR) 'ThSI:', 'Terrmax     =', Terrmax
287        WRITE(iUnit,*) 'ThSI: nitMaxTsf =',nitMaxTsf        WRITE(iUnit,fmtI) 'ThSI:', 'nitMaxTsf   =', nitMaxTsf
288        WRITE(iUnit,*) 'ThSI: hIceMin   =',hIceMin        WRITE(iUnit,fmtR) 'ThSI:', 'hIceMin     =', hIceMin
289        WRITE(iUnit,*) 'ThSI: hiMax     =',hiMax        WRITE(iUnit,fmtR) 'ThSI:', 'hiMax       =', hiMax
290        WRITE(iUnit,*) 'ThSI: hsMax     =',hsMax        WRITE(iUnit,fmtR) 'ThSI:', 'hsMax       =', hsMax
291        WRITE(iUnit,*) 'ThSI: iceMaskMax =',iceMaskMax        WRITE(iUnit,fmtR) 'ThSI:', 'iceMaskMax  =', iceMaskMax
292        WRITE(iUnit,*) 'ThSI: iceMaskMin =',iceMaskMin        WRITE(iUnit,fmtR) 'ThSI:', 'iceMaskMin  =', iceMaskMin
293        WRITE(iUnit,*) 'ThSI: fracEnMelt =',fracEnMelt        WRITE(iUnit,fmtR) 'ThSI:', 'fracEnMelt  =', fracEnMelt
294        WRITE(iUnit,*) 'ThSI: fracEnFreez=',fracEnFreez        WRITE(iUnit,fmtR) 'ThSI:', 'fracEnFreez =', fracEnFreez
295        WRITE(iUnit,*) 'ThSI: hThinIce   =',hThinIce        WRITE(iUnit,fmtR) 'ThSI:', 'hThinIce    =', hThinIce
296        WRITE(iUnit,*) 'ThSI: hThickIce  =',hThickIce        WRITE(iUnit,fmtR) 'ThSI:', 'hThickIce   =', hThickIce
297        WRITE(iUnit,*) 'ThSI: hNewIceMax =',hNewIceMax        WRITE(iUnit,fmtR) 'ThSI:', 'hNewIceMax  =', hNewIceMax
298        WRITE(iUnit,*) 'ThSI: stressReduction =',stressReduction        WRITE(iUnit,fmtR) 'ThSI:','stressReduction   =',stressReduction
299        WRITE(iUnit,*) 'ThSI: thSIceAdvScheme =',thSIceAdvScheme        WRITE(iUnit,fmtI) 'ThSI:','thSIceAdvScheme   =',thSIceAdvScheme
300        WRITE(iUnit,*) 'ThSI: thSIce_diffK  =',thSIce_diffK        WRITE(iUnit,fmtI) 'ThSI:','thSIceBalanceAtmFW=',thSIceBalanceAtmFW
301        WRITE(iUnit,*) 'ThSI: thSIce_deltaT =',thSIce_deltaT        WRITE(iUnit,fmtR) 'ThSI:','thSIce_diffK      =',thSIce_diffK
302        WRITE(iUnit,*) 'ThSI: ocean_deltaT  =',ocean_deltaT        WRITE(iUnit,fmtR) 'ThSI:','thSIce_deltaT     =',thSIce_deltaT
303        WRITE(iUnit,*) 'ThSI: stepFwd_oceMxL=',stepFwd_oceMxL        WRITE(iUnit,fmtR) 'ThSI:','ocean_deltaT      =',ocean_deltaT
304        WRITE(iUnit,*) 'ThSI: tauRelax_MxL  =',tauRelax_MxL        WRITE(iUnit,fmtL) 'ThSI:','stepFwd_oceMxL    =',stepFwd_oceMxL
305        WRITE(iUnit,*) 'ThSI: tauRelax_MxL_salt  =',tauRelax_MxL_salt        WRITE(iUnit,fmtR) 'ThSI:','tauRelax_MxL      =',tauRelax_MxL
306        WRITE(iUnit,*) 'ThSI: hMxL_default  =',hMxL_default        WRITE(iUnit,fmtR) 'ThSI:','tauRelax_MxL_salt =',tauRelax_MxL_salt
307        WRITE(iUnit,*) 'ThSI: sMxL_default  =',sMxL_default        WRITE(iUnit,fmtR) 'ThSI:','hMxL_default      =',hMxL_default
308        WRITE(iUnit,*) 'ThSI: vMxL_default  =',vMxL_default        WRITE(iUnit,fmtR) 'ThSI:','sMxL_default      =',sMxL_default
309        WRITE(iUnit,*) 'ThSI: thSIce_taveFreq=',thSIce_taveFreq        WRITE(iUnit,fmtR) 'ThSI:','vMxL_default      =',vMxL_default
310        WRITE(iUnit,*) 'ThSI: thSIce_diagFreq=',thSIce_diagFreq        WRITE(iUnit,fmtR) 'ThSI:','thSIce_taveFreq   =',thSIce_taveFreq
311        WRITE(iUnit,*) 'ThSI: thSIce_monFreq =',thSIce_monFreq        WRITE(iUnit,fmtR) 'ThSI:','thSIce_diagFreq   =',thSIce_diagFreq
312        WRITE(iUnit,*) 'ThSI: startIceModel =',startIceModel        WRITE(iUnit,fmtR) 'ThSI:','thSIce_monFreq    =',thSIce_monFreq
313          WRITE(iUnit,fmtI) 'ThSI:','startIceModel     =',startIceModel
314    c     WRITE(iUnit,fmtC) 'thSIceFract_InitFile    =',thSIceFract_InitFile
315        IF (iUnit.NE.standardMessageUnit) CLOSE(iUnit)        IF (iUnit.NE.standardMessageUnit) CLOSE(iUnit)
316  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
317    

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.22