--- MITgcm/model/inc/PARAMS.h 1998/04/24 02:11:37 1.2 +++ MITgcm/model/inc/PARAMS.h 1998/05/30 02:10:16 1.13 @@ -1,4 +1,4 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/model/inc/PARAMS.h,v 1.2 1998/04/24 02:11:37 cnh Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/model/inc/PARAMS.h,v 1.13 1998/05/30 02:10:16 cnh Exp $ C C /==========================================================\ C | PARAMS.h | @@ -9,20 +9,33 @@ C | the parameters can also be found here. | C \==========================================================/ +C Macros for special grid options +#include "PARAMS_MACROS.h" + C-- Contants -C nOBands - No. of offline data time bands - INTEGER nOBands - PARAMETER ( nOBands = 12 ) C Useful physical values Real*8 PI PARAMETER ( PI = 3.14159265358979323844D0 ) Real*8 deg2rad PARAMETER ( deg2rad = 2.D0*PI/360.D0 ) +C Symbolic values +C precXXXX - Used to indicate what precision to use for +C dumping model state. + INTEGER precFloat32 + PARAMETER ( precFloat32 = 0 ) + INTEGER precFloat64 + PARAMETER ( precFloat64 = 1 ) + +C Checkpoint data + INTEGER maxNoChkptLev + PARAMETER ( maxNoChkptLev = 2 ) + C-- COMMON /PARM_C/ Character valued parameters used by the model. -C oBandId - Offline dataset identifiers for different periods. - COMMON /PARM_C/ oBandId - CHARACTER*3 oBandId(nOBands) +C checkPtSuff - List of checkpoint file suffices + COMMON /PARM_C/ checkPtSuff + CHARACTER*(5) checkPtSuff(maxNoChkptLev) + C-- COMMON /PARM_I/ Integer valued parameters used by the model. C cg2dMaxIters - Maximum number of iterations in the C two-dimensional con. grad solver. @@ -32,16 +45,26 @@ C nTimeSteps - Number of timesteps to execute C numStepsPerPickup - For offline setup. Frequency of pickup C of flow fields. +C writeStatePrec - Precision used for writing model state. +C writeBinaryPrec - Precision used for writing binary files +C readBinaryPrec - Precision used for reading binary files +C nCheckLev - Holds current checkpoint level COMMON /PARM_I/ & cg2dMaxIters, & cg2dChkResFreq, & nIter0, nTimeSteps, - & numStepsPerPickup + & numStepsPerPickup, + & writeStatePrec, nCheckLev, + & writeBinaryPrec, readBinaryPrec INTEGER cg2dMaxIters INTEGER cg2dChkResFreq INTEGER nIter0 INTEGER nTimeSteps INTEGER numStepsPerPickup + INTEGER writeStatePrec + INTEGER writeBinaryPrec + INTEGER readBinaryPrec + INTEGER nCheckLev C-- COMMON /PARM_L/ Logical valued parameters used by the model. C usingCartesianGrid - If TRUE grid generation will be in a cartesian @@ -52,6 +75,8 @@ C momAdvection - Flag which turns advection of momentum on and off. C momForcing - Flag which turns external forcing of momentum on C and off. +C momPressureForcing - Flag which turns pressure term in momentum equation +C on and off. C useCoriolis - Flag which turns the coriolis terms on and off. C tempDiffusion - Flag which turns diffusion of temperature on C and off. @@ -65,15 +90,21 @@ C and off. C saltForcing - Flag which turns external forcing of salinit on C and off. +C implicitFreeSurface - Set to true to use implcit free surface +C rigidLid - Set to true to use rigid lid +C momStepping - Turns momentum equation time-stepping off +C momStepping - Turns temperature equation time-stepping off COMMON /PARM_L/ usingCartesianGrid, usingSphericalPolarGrid, - & momViscosity, momAdvection, momForcing, useCoriolis, + & momViscosity, momAdvection, momForcing, useCoriolis, momPressureForcing, & tempDiffusion, tempAdvection, tempForcing, - & saltDiffusion, saltAdvection, saltForcing + & saltDiffusion, saltAdvection, saltForcing, + & implicitFreeSurface, rigidLid, momStepping, tempStepping LOGICAL usingCartesianGrid LOGICAL usingSphericalPolarGrid LOGICAL momViscosity LOGICAL momAdvection LOGICAL momForcing + LOGICAL momPressureForcing LOGICAL useCoriolis LOGICAL tempDiffusion LOGICAL tempAdvection @@ -81,25 +112,41 @@ LOGICAL saltDiffusion LOGICAL saltAdvection LOGICAL saltForcing + LOGICAL implicitFreeSurface + LOGICAL rigidLid + LOGICAL momStepping + LOGICAL tempStepping C-- COMMON /PARM_R/ "Real" valued parameters used by the model. C cg2dTargetResidual C - Target residual for cg2d solver. -C delZ - Vertical grid spacing (Pa) - delZ is the distance +C cg2dpcOffDFac - Averaging weight for preconditioner off-diagonal. +C Note. 20th May 1998 +C I made a weird discovery! In the model paper we argue +C for the form of the preconditioner used here ( see +C A Finite-volume, Incompressible Navier-Stokes Model +C ...., Marshall et. al ). The algebra gives a simple +C 0.5 factor for the averaging of ac and aCw to get a +C symmettric pre-conditioner. By using a factor of 0.51 +C i.e. scaling the off-diagonal terms in the +C preconditioner down slightly I managed to get the +C number of iterations for convergence in a test case to +C drop form 192 -> 134! Need to investigate this further! +C For now I have introduced a parameter cg2dpcOffDFac which +C defaults to 0.51 but can be set at runtime. +C delZ - Vertical grid spacing ( m ) - delZ is the distance C between "w" surfaces. C delX - Separation between cell faces (m) or (deg), depending C delY on input flags. C gravity - Accel. due to gravity ( m/s^2 ) +C gBaro - Accel. due to gravity used in barotropic equation ( m/s^2 ) C ronil - Reference density -C startTime - Start time for model -C oBandBeg - Offline bands start and end times. -C oBandEnd -C oPeriodLength - Lenght of offline period. +C startTime - Start time for model ( s ) C phiMin - Latitude of southern most cell face. C thetaMin - Longitude of western most cell face (this C is an "inert" parameter but it is included C to make geographical references simple.) -C rSphere - Radius of sphere for a spherical polar grid. +C rSphere - Radius of sphere for a spherical polar grid ( m ). C f0 - Reference coriolis parameter ( 1/s ) C ( Southern edge f for beta plane ) C beta - df/dy ( s^-1.m^-1 ) @@ -121,59 +168,111 @@ C salt vertically ( m^2/s ) C diffK4S - Biharmonic diffusion coeff. for mixing of C salt laterally ( m^4/s ) -C delt - Timestep ( s ) +C deltaT - Default timestep ( s ) +C deltaTClock - Timestep used as model "clock". This determines the +C IO frequencies and is used in tagging output. It can +C be totally different to the dynamical time. Typically +C it will be the deep-water timestep for accelerated runs. +C Frequency of checkpointing and dumping of the model state +C are referenced to this clock. ( s ) +C deltaTMom - Timestep for momemtum equations ( s ) +C deltaTtracer - Timestep for tracer equations ( s ) +C freesurfFac - Parameter to turn implicit free surface term on or off +C freesurfac = 1. uses implicit free surface +C freesurfac = 0. uses rigid lid C tauCD - CD scheme coupling timescale ( 1/s ) C rCD - CD scheme normalised coupling parameter ( 0-1 ) +C GMmaxslope - max. slope allowed in GM/Redi tensor +C GMlength - Length to use in Visbeck et al. formula for K (m) +C GMalpha - alpha to use in Visbeck et al. formula for K +C GMdepth - Depth over which to integrate Richardson # (Visbeck et al.) +C GMkbackground - background value of GM/Redi coefficient C startTime - Starting time for this integration ( s ). C endTime - Ending time for this integration ( s ). -C chkPtFreq - Frequency of check pointing ( s ). +C chkPtFreq - Frequency of rolling check pointing ( s ). +C pChkPtFreq - Frequency of permanent check pointing ( s ). C dumpFreq - Frequency with which model state is written to C post-processing files ( s ). - COMMON /PARM_R/ cg2dTargetResidual, delZ, delX, delY, - & deltaTmom, deltaTtracer, abeps, startTime, oBandBeg, oBandEnd, - & oPeriodLength, phiMin, thetaMin, rSphere, f0, fCori, beta, - & viscAh, viscAz, viscA4, diffKhT, diffKzT, diffK4T, - & diffKhS, diffKzS, diffK4S, delT, tauCD, rCD, - & tAlpha, sBeta, gravity, rhonil, tRef, sRef, - & endTime, chkPtFreq, dumpFreq - REAL cg2dTargetResidual - REAL delZ(Nz) - REAL delX(Nx) - REAL delY(Ny) - REAL deltaTmom - REAL deltaTtracer - REAL abeps - REAL oBandBeg(nOBands),oBandEnd(nOBands) - REAL oPeriodLength - REAL phiMin - REAL thetaMin - REAL rSphere - REAL f0 - _RL beta - REAL viscAh - REAL viscAz - REAL viscA4 - REAL diffKhT - REAL diffKzT - REAL diffK4T - REAL diffKhS - REAL diffKzS - REAL diffK4S - REAL delt - REAL tauCD - REAL rCD - REAL tAlpha - REAL sBeta - REAL gravity - REAL rhonil - REAL tRef(Nz) - REAL sRef(Nz) - real Fcori(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) - REAL startTime - REAL endTime - REAL chkPtFreq - REAL dumpFreq +C afFacMom - Advection of momentum term scaling parameter +C vfFacMom - Momentum viscosity scaling parameter +C pfFacMom - Momentum pressure forcing parameter +C cfFacMom - Coriolis term scaling parameter +C foFacMom - Momentum forcing scaling parameter +C cAdjFreq - Frequency of convective adjustment + COMMON /PARM_R/ cg2dTargetResidual, cg2dpcOffDFac, delZ, delX, delY, + & deltaT,deltaTmom, deltaTtracer, deltaTClock,abeps, startTime, phiMin, + & thetaMin, rSphere, f0, fCori, beta, viscAh, viscAz, viscA4, + & diffKhT, diffKzT, diffK4T, diffKhS, diffKzS, diffK4S, delT, + & tauCD, rCD, freeSurfFac, + & GMmaxslope,GMlength,GMalpha,GMdepth,GMkbackground, + & gravity, gBaro, rhonil, tRef, sRef, + & endTime, chkPtFreq, pchkPtFreq, dumpFreq, + & afFacMom, vfFacMom, pfFacMom, cfFacMom, foFacMom, + & cAdjFreq + _RL cg2dTargetResidual + _RL cg2dpcOffDFac + _RL delZ(Nz) + _RL delX(Nx) + _RL delY(Ny) + _RL deltaT + _RL deltaTClock + _RL deltaTmom + _RL deltaTtracer + _RL abeps + _RL phiMin + _RL thetaMin + _RL rSphere + _RL f0 + _RL freeSurfFac + _RL beta + _RL viscAh + _RL viscAz + _RL viscA4 + _RL diffKhT + _RL diffKzT + _RL diffK4T + _RL diffKhS + _RL diffKzS + _RL diffK4S + _RL delt + _RL tauCD + _RL rCD + _RL GMmaxslope + _RL GMlength + _RL GMalpha + _RL GMdepth + _RL GMkbackground + _RL gravity + _RL gBaro + _RL rhonil + _RL tRef(Nz) + _RL sRef(Nz) + _RS Fcori(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL startTime + _RL endTime + _RL chkPtFreq + _RL pChkPtFreq + _RL dumpFreq + _RL afFacMom + _RL vfFacMom + _RL pfFacMom + _RL cfFacMom + _RL foFacMom + _RL cAdjFreq + COMMON /PARM_A/ HeatCapacity_Cp, & Lamba_theta - REAL HeatCapacity_Cp - REAL Lamba_theta + _RL HeatCapacity_Cp + _RL Lamba_theta + +C Equation of State (polynomial coeffients) + COMMON /PARM_EOS_NL/ eosC,eosSig0,eosRefT,eosRefS + _RL eosC(9,Nz+1),eosSig0(Nz+1),eosRefT(Nz+1),eosRefS(Nz+1) +C Linear equation of state +C tAlpha - Linear EOS thermal expansion coefficient ( 1/degree ). +C sBeta - Linear EOS haline contraction coefficient. + COMMON /PARM_EOS_LIN/ tAlpha,sBeta,eosType + _RL tAlpha + _RL sBeta + character*(6) eosType +