/[MITgcm]/MITgcm_contrib/torge/itd/code/seaice_readparms.F
ViewVC logotype

Diff of /MITgcm_contrib/torge/itd/code/seaice_readparms.F

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

revision 1.2 by dimitri, Fri Apr 27 22:25:23 2012 UTC revision 1.5 by torge, Mon Oct 22 22:18:09 2012 UTC
# Line 35  C     === Global variables === Line 35  C     === Global variables ===
35  #ifdef ALLOW_EXF  #ifdef ALLOW_EXF
36  # include "EXF_CONSTANTS.h"  # include "EXF_CONSTANTS.h"
37  #endif /* ALLOW_EXF */  #endif /* ALLOW_EXF */
 #ifdef ALLOW_CAL  
 # include "cal.h"  
 #endif  
38    
39  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
40  C     === Routine arguments ===  C     === Routine arguments ===
# Line 55  C     iUnit      :: Work variable for IO Line 52  C     iUnit      :: Work variable for IO
52  #ifdef ALLOW_SITRACER  #ifdef ALLOW_SITRACER
53        INTEGER iTracer        INTEGER iTracer
54  #endif  #endif
55    #ifdef ALLOW_COST
56          INTEGER locDate(4)
57    #endif /* ALLOW_COST */
58        INTEGER nRetired        INTEGER nRetired
59    
60  C-    Old parameters (to be retired one day):  C-    Old parameters (to be retired one day):
# Line 96  C--   SEAICE parameters Line 96  C--   SEAICE parameters
96       & SEAICE_deltaTtherm, SEAICE_deltaTdyn,       & SEAICE_deltaTtherm, SEAICE_deltaTdyn,
97       & SEAICE_deltaTevp, SEAICE_elasticParm, SEAICE_evpTauRelax,       & SEAICE_deltaTevp, SEAICE_elasticParm, SEAICE_evpTauRelax,
98       & SEAICE_evpDampC, SEAICE_zetaMin, SEAICE_zetaMaxFac,       & SEAICE_evpDampC, SEAICE_zetaMin, SEAICE_zetaMaxFac,
99         & SEAICEuseJFNK, SEAICEnewtonIterMax, SEAICEkrylovIterMax,
100         & JFNKgamma_nonlin,JFNKres_t,JFNKgamma_lin_min,JFNKgamma_lin_max,
101         & SEAICEpresH0, SEAICEpresPow0, SEAICEpresPow1,
102       & SEAICE_monFreq, SEAICE_dumpFreq, SEAICE_taveFreq,       & SEAICE_monFreq, SEAICE_dumpFreq, SEAICE_taveFreq,
103       & SEAICE_initialHEFF, SEAICEturbFluxFormula,       & SEAICE_initialHEFF, SEAICEturbFluxFormula,
104       & SEAICE_areaGainFormula, SEAICE_areaLossFormula,       & SEAICE_areaGainFormula, SEAICE_areaLossFormula,
# Line 123  C--   SEAICE parameters Line 126  C--   SEAICE parameters
126       & SEAICE_availHeatFrac, SEAICE_availHeatFracFrz,       & SEAICE_availHeatFrac, SEAICE_availHeatFracFrz,
127       & AreaFile, HeffFile, uIceFile, vIceFile, HsnowFile, HsaltFile,       & AreaFile, HeffFile, uIceFile, vIceFile, HsnowFile, HsaltFile,
128       & SOLV_MAX_ITERS, SOLV_NCHECK, NPSEUDOTIMESTEPS, LSR_mixIniGuess,       & SOLV_MAX_ITERS, SOLV_NCHECK, NPSEUDOTIMESTEPS, LSR_mixIniGuess,
129       & LSR_ERROR, DIFF1, SEAICEuseFREEDRIFT,       & LSR_ERROR, DIFF1, SEAICEuseFREEDRIFT, SEAICEuseTILT,
130       & SEAICEheatConsFix, SEAICE_multDim,       & SEAICEheatConsFix, SEAICE_multDim, SEAICE_useMultDimSnow,
131       & SEAICE_area_reg, SEAICE_hice_reg,       & SEAICE_area_reg, SEAICE_hice_reg,
132       & SEAICE_area_floor, SEAICE_area_max, SEAICE_tauAreaObsRelax,       & SEAICE_area_floor, SEAICE_area_max, SEAICE_tauAreaObsRelax,
133       & SEAICE_airTurnAngle, SEAICE_waterTurnAngle,       & SEAICE_airTurnAngle, SEAICE_waterTurnAngle,
134       & MAX_HEFF, MIN_ATEMP, MIN_LWDOWN, MAX_TICE, MIN_TICE,       & MAX_HEFF, MIN_ATEMP, MIN_LWDOWN, MAX_TICE, MIN_TICE,
135       & SEAICE_EPS, SEAICE_EPS_SQ,       & SEAICE_EPS, SEAICE_EPS_SQ,
136       & SEAICE_tave_mnc, SEAICE_dump_mnc, SEAICE_mon_mnc,       & SEAICE_tave_mnc, SEAICE_dump_mnc, SEAICE_mon_mnc,
137    #ifdef SEAICE_ITD
138  CToM<<<  CToM<<<
 C     & SEAICE_debugPointI, SEAICE_debugPointJ  
139       & SEAICE_debugPointI, SEAICE_debugPointJ,       & SEAICE_debugPointI, SEAICE_debugPointJ,
140       & Hlimit_c1, Hlimit_c2, Hlimit_c3       & Hlimit_c1, Hlimit_c2, Hlimit_c3
141  C>>>ToM  C>>>ToM
142    #else
143         & SEAICE_debugPointI, SEAICE_debugPointJ
144    #endif
145    
146  #ifdef ALLOW_COST  #ifdef ALLOW_COST
147        NAMELIST /SEAICE_PARM02/        NAMELIST /SEAICE_PARM02/
# Line 172  C--   set default sea ice parameters Line 178  C--   set default sea ice parameters
178  #endif  #endif
179        SEAICEadjMODE      = 0        SEAICEadjMODE      = 0
180        SEAICEuseFREEDRIFT = .FALSE.        SEAICEuseFREEDRIFT = .FALSE.
181          SEAICEuseTILT      = .TRUE.
182        SEAICEheatConsFix  = .FALSE.        SEAICEheatConsFix  = .FALSE.
183        SEAICEuseTEM       = .FALSE.        SEAICEuseTEM       = .FALSE.
184        SEAICEuseMetricTerms = .TRUE.        SEAICEuseMetricTerms = .TRUE.
# Line 209  c     SEAICEuseFluxForm  = .FALSE. Line 216  c     SEAICEuseFluxForm  = .FALSE.
216        SEAICE_deltaTtherm = dTtracerLev(1)        SEAICE_deltaTtherm = dTtracerLev(1)
217        SEAICE_deltaTdyn   = dTtracerLev(1)        SEAICE_deltaTdyn   = dTtracerLev(1)
218        SEAICE_deltaTevp   = UNSET_RL        SEAICE_deltaTevp   = UNSET_RL
219    C     JFNK stuff
220          SEAICEuseJFNK       = .FALSE.
221          SEAICEnewtonIterMax = 10
222          SEAICEkrylovIterMax = 10
223          JFNKgamma_nonlin    = 1. _d -05
224          JFNKgamma_lin_min   = 0.10 _d 0
225          JFNKgamma_lin_max   = 0.99 _d 0
226          JFNKres_t           = UNSET_RL
227  C     Hunke, JCP, 2001 use 615 kg/m^2 for this, but does not recommend using it  C     Hunke, JCP, 2001 use 615 kg/m^2 for this, but does not recommend using it
228        SEAICE_evpDampC    = -1. _d 0        SEAICE_evpDampC    = -1. _d 0
229        SEAICE_zetaMin     = 0. _d 0        SEAICE_zetaMin     = 0. _d 0
230        SEAICE_zetaMaxFac  = 2.5 _d 8        SEAICE_zetaMaxFac  = 2.5 _d 8
231          SEAICEpresH0       = 1. _d 0
232          SEAICEpresPow0     = 1
233          SEAICEpresPow1     = 1
234        SEAICE_monFreq     = monitorFreq        SEAICE_monFreq     = monitorFreq
235        SEAICE_dumpFreq    = dumpFreq        SEAICE_dumpFreq    = dumpFreq
236        SEAICE_taveFreq    = taveFreq        SEAICE_taveFreq    = taveFreq
# Line 228  C     Hunke, JCP, 2001 use 615 kg/m^2 fo Line 246  C     Hunke, JCP, 2001 use 615 kg/m^2 fo
246        SEAICE_mon_mnc  = .FALSE.        SEAICE_mon_mnc  = .FALSE.
247  #endif  #endif
248        SEAICE_initialHEFF = ZERO        SEAICE_initialHEFF = ZERO
249    #ifdef SEAICE_ITD
250  CToM<<<  CToM<<<
251  C     Coefficients used to calculate sea ice thickness category limits  C     Coefficients used to calculate sea ice thickness category limits
252  C     after Lipscomb et al. (2001, JGR), Equ. 22  C     after Lipscomb et al. (2001, JGR), Equ. 22
253    C     choose between
254    C      - original parameters of Lipscomb et al. (2001):
255    C        c1=3.0/N, c2=15*c1, c3=3.0
256    C      - and a higher resolution of thin end of ITD:
257    C        c1=1.5/N, c2=42*c1, c3=3.3
258        Hlimit_c1          = 3.0        Hlimit_c1          = 3.0
259        Hlimit_c2          = 15.        Hlimit_c2          = 15.
260        Hlimit_c3          = 3.0        Hlimit_c3          = 3.0
261  C>>>ToM  C>>>ToM
262    #endif
263        SEAICE_rhoIce      = 0.91   _d +03        SEAICE_rhoIce      = 0.91   _d +03
264        SEAICE_rhoSnow     = 330.   _d 0        SEAICE_rhoSnow     = 330.   _d 0
265        ICE2WATR           = UNSET_RL        ICE2WATR           = UNSET_RL
# Line 299  CToM<<< Line 324  CToM<<<
324  C#ifdef SEAICE_MULTICATEGORY  C#ifdef SEAICE_MULTICATEGORY
325  #if defined(SEAICE_MULTICATEGORY) || defined(SEAICE_ITD)  #if defined(SEAICE_MULTICATEGORY) || defined(SEAICE_ITD)
326  C in case defined(SEAICE_ITD) MULTDIM = nITD (see SEAICE_SIZE.h)  C in case defined(SEAICE_ITD) MULTDIM = nITD (see SEAICE_SIZE.h)
327    C because SEAICE_ITD uses code related to SEAICE_MULTICATEGORY
328  C>>>ToM  C>>>ToM
329        SEAICE_multDim     = MULTDIM        SEAICE_multDim     = MULTDIM
330  #else  #else
331        SEAICE_multDim     = 1        SEAICE_multDim     = 1
332  #endif  #endif
333          SEAICE_useMultDimSnow = .FALSE.
334  C     default to be set later (ocean-seaice turbulent flux coeff):  C     default to be set later (ocean-seaice turbulent flux coeff):
335        SEAICE_mcPheeStepFunc = .FALSE.        SEAICE_mcPheeStepFunc = .FALSE.
336        SEAICE_mcPheeTaper    = UNSET_RL        SEAICE_mcPheeTaper    = UNSET_RL
# Line 340  c     SEAICE_dTempFrz_dS = 0. _d 0 Line 367  c     SEAICE_dTempFrz_dS = 0. _d 0
367        vIceFile   = ' '        vIceFile   = ' '
368        IMAX_TICE  = 10        IMAX_TICE  = 10
369        postSolvTempIter = 2        postSolvTempIter = 2
370        SOLV_MAX_ITERS = 1500        SOLV_MAX_ITERS = UNSET_I
371        SOLV_NCHECK= 2        SOLV_NCHECK= 2
372  C     two pseudo time steps correspond to the original modified  C     two pseudo time steps correspond to the original modified
373  C     Euler time stepping scheme of Zhang+Hibler (1997)  C     Euler time stepping scheme of Zhang+Hibler (1997)
# Line 410  C-    end retired parameters Line 437  C-    end retired parameters
437        SEAICE_debugPointJ = UNSET_I        SEAICE_debugPointJ = UNSET_I
438    
439  #ifdef ALLOW_COST  #ifdef ALLOW_COST
440          locDate(1) = 0
441          locDate(2) = 0
442    # ifdef ALLOW_CAL
443          CALL CAL_GETDATE( -1, startTime, locDate, myThid )
444    # endif /* ALLOW_CAL */
445        mult_ice_export   =  0. _d 0        mult_ice_export   =  0. _d 0
446        mult_ice          =  0. _d 0        mult_ice          =  0. _d 0
447        costIceStart1     =  0        costIceStart1     = locDate(1)
448        costIceStart2     =  0        costIceStart2     = locDate(2)
449        costIceEnd1       =  0        costIceEnd1       =  0
450        costIceEnd2       =  0        costIceEnd2       =  0
451        cost_ice_flag     =  1        cost_ice_flag     =  1
# Line 430  c Line 462  c
462        smrareabarfile    =  'smrareabar'        smrareabarfile    =  'smrareabar'
463        smrareadatfile    =  ' '        smrareadatfile    =  ' '
464        smrarea_errfile   =  ' '        smrarea_errfile   =  ' '
465  # ifdef ALLOW_CAL        smrareastartdate1 = locDate(1)
466        smrareastartdate1 = startDate_1        smrareastartdate2 = locDate(2)
       smrareastartdate2 = startDate_2  
 # endif  
467  #endif /* ALLOW_COST */  #endif /* ALLOW_COST */
468    
469  #ifdef ALLOW_SITRACER  #ifdef ALLOW_SITRACER
# Line 456  c Line 486  c
486  C     Open and read the data.seaice file  C     Open and read the data.seaice file
487        WRITE(msgBuf,'(A)')        WRITE(msgBuf,'(A)')
488       &' '       &' '
489        CALL PRINT_MESSAGE( msgBuf, standardmessageunit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
490       &                    SQUEEZE_RIGHT , myThid)       &                    SQUEEZE_RIGHT , myThid)
491        WRITE(msgBuf,'(A)') ' SEAICE_READPARMS: opening data.seaice'        WRITE(msgBuf,'(A)') ' SEAICE_READPARMS: opening data.seaice'
492        CALL PRINT_MESSAGE( msgBuf, standardmessageunit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
493       &                    SQUEEZE_RIGHT , myThid)       &                    SQUEEZE_RIGHT , myThid)
494    
495        CALL OPEN_COPY_DATA_FILE(        CALL OPEN_COPY_DATA_FILE(
# Line 539  C     yet been tried nor thought through Line 569  C     yet been tried nor thought through
569       &      SEAICE_evpTauRelax = SEAICE_deltaTdyn*SEAICE_elasticParm       &      SEAICE_evpTauRelax = SEAICE_deltaTdyn*SEAICE_elasticParm
570        ENDIF        ENDIF
571  #endif /* SEAICE_ALLOW_EVP */  #endif /* SEAICE_ALLOW_EVP */
572  C  
573  #ifdef SEAICE_ALLOW_FREEDRIFT  #ifdef SEAICE_ALLOW_FREEDRIFT
574        IF ( SEAICEuseFREEDRIFT ) SEAICEuseEVP = .FALSE.        IF ( SEAICEuseFREEDRIFT ) SEAICEuseEVP = .FALSE.
575        IF ( SEAICEuseFREEDRIFT ) THEN        IF ( SEAICEuseFREEDRIFT ) THEN
# Line 554  C Line 584  C
584  C     Make sure that we have least two pseudo time steps  C     Make sure that we have least two pseudo time steps
585        NPSEUDOTIMESTEPS = MAX(NPSEUDOTIMESTEPS,2)        NPSEUDOTIMESTEPS = MAX(NPSEUDOTIMESTEPS,2)
586    
587    C-    limit preconditioner steps
588          IF ( SOLV_MAX_ITERS .EQ. UNSET_I ) THEN
589    C     maximum number of LSOR steps in default Picard solver
590           SOLV_MAX_ITERS = 1500
591    C     maximum number of LSOR steps as preconditioner in JFNK solver
592           IF ( SEAICEuseJFNK ) SOLV_MAX_ITERS = 10
593          ENDIF
594    
595  C-    The old ways of specifying mcPheeTaper, mcPheePiston & frazilFrac:  C-    The old ways of specifying mcPheeTaper, mcPheePiston & frazilFrac:
596  C     a) prevent multiple specification of the same coeff;  C     a) prevent multiple specification of the same coeff;
597  C     b) if specified, then try to recover old way of setting & default.  C     b) if specified, then try to recover old way of setting & default.
# Line 635  C     to set SEAICE_mcPheePiston once dr Line 673  C     to set SEAICE_mcPheePiston once dr
673          STOP 'ABNORMAL END: S/R SEAICE_READPARMS'          STOP 'ABNORMAL END: S/R SEAICE_READPARMS'
674        ENDIF        ENDIF
675    
 CToM<<<  
676  #ifdef SEAICE_ITD  #ifdef SEAICE_ITD
677    CToM<<<
678  C     The ice thickness distribution module can only be used with  C     The ice thickness distribution module can only be used with
679  C      package seaice calling  C      package seaice calling
680  C      SEAICE_ADVDIFF and  C      SEAICE_ADVDIFF and
681  C      SEAICE_GROWTH, i.e. needs usePW79thermodynamics = .TRUE.  C      SEAICE_GROWTH, i.e. needs usePW79thermodynamics = .TRUE.
682        useTHSice = .FALSE.        useTHSice = .FALSE.
 #endif  
683  C>>>ToM  C>>>ToM
684    #endif
685        IF ( useThSice ) THEN        IF ( useThSice ) THEN
686  C     If the thsice package with the Winton thermodynamics is used  C     If the thsice package with the Winton thermodynamics is used
687  C     is does not make sense to have the following parameters defined,  C     is does not make sense to have the following parameters defined,

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22