--- MITgcm/model/inc/PARAMS.h 1998/05/28 16:19:50 1.12 +++ MITgcm/model/inc/PARAMS.h 2001/04/10 22:35:25 1.51 @@ -1,14 +1,18 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/model/inc/PARAMS.h,v 1.12 1998/05/28 16:19:50 adcroft Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/model/inc/PARAMS.h,v 1.51 2001/04/10 22:35:25 heimbach Exp $ +C $Name: $ C C /==========================================================\ C | PARAMS.h | C | o Header file defining model "parameters". | C |==========================================================| -C | The values from the model's standard input file are | +C | The values from the model standard input file are | C | stored into the variables held here. Notes describing | C | the parameters can also be found here. | C \==========================================================/ +C Macros for special grid options +#include "PARAMS_MACROS.h" + C-- Contants C Useful physical values Real*8 PI @@ -20,9 +24,20 @@ C precXXXX - Used to indicate what precision to use for C dumping model state. INTEGER precFloat32 - PARAMETER ( precFloat32 = 0 ) + PARAMETER ( precFloat32 = 32 ) INTEGER precFloat64 - PARAMETER ( precFloat64 = 1 ) + PARAMETER ( precFloat64 = 64 ) +C UNSET_xxx - Used to indicate variables that have not been given a value + Real*8 UNSET_FLOAT8 + PARAMETER ( UNSET_FLOAT8 = 1.234567D5 ) + Real*4 UNSET_FLOAT4 + PARAMETER ( UNSET_FLOAT4 = 1.234567E5 ) + _RL UNSET_RL + PARAMETER ( UNSET_RL = 1.234567D5 ) + _RS UNSET_RS + PARAMETER ( UNSET_RS = 1.234567E5 ) + INTEGER UNSET_I + PARAMETER ( UNSET_I = 123456789 ) C Checkpoint data INTEGER maxNoChkptLev @@ -30,14 +45,56 @@ C-- COMMON /PARM_C/ Character valued parameters used by the model. C checkPtSuff - List of checkpoint file suffices - COMMON /PARM_C/ checkPtSuff +C bathyFile - File containing bathymetry. If not defined bathymetry +C is taken from inline function. +C hydrogThetaFile - File containing initial hydrographic data for potential +C temperature. +C hydrogSaltFile - File containing initial hydrographic data for salinity. +C zonalWindFile - File containing zonal wind data +C meridWindFile - File containing meridional wind data +C thetaClimFile - File containing theta climataology used +C in relaxation term -lambda(theta-theta*) +C saltClimFile - File containing salt climataology used +C in relaxation term -lambda(salt-salt*) +C surfQfile - File containing surface heat flux +C surfQswfile - File containing surface shortwave radiation +C dQdTfile - File containing thermal relaxation coefficient +C EmPmRfile - File containing surface fresh water flux +C buoyancyRelation - Flag used to indicate which relation to use to +C get buoyancy. + COMMON /PARM_C/ checkPtSuff, + & bathyFile, hydrogThetaFile, hydrogSaltFile, + & zonalWindFile, meridWindFile, thetaClimFile, + & saltClimFile, buoyancyRelation, + & EmPmRfile, surfQfile, surfQswfile, + & uVelInitFile, vVelInitFile, pSurfInitFile, + & dQdTfile CHARACTER*(5) checkPtSuff(maxNoChkptLev) + CHARACTER*(MAX_LEN_FNAM) bathyFile + CHARACTER*(MAX_LEN_FNAM) hydrogThetaFile + CHARACTER*(MAX_LEN_FNAM) hydrogSaltFile + CHARACTER*(MAX_LEN_FNAM) zonalWindFile + CHARACTER*(MAX_LEN_FNAM) meridWindFile + CHARACTER*(MAX_LEN_FNAM) thetaClimFile + CHARACTER*(MAX_LEN_FNAM) saltClimFile + CHARACTER*(MAX_LEN_FNAM) surfQfile + CHARACTER*(MAX_LEN_FNAM) surfQswfile + CHARACTER*(MAX_LEN_FNAM) EmPmRfile + CHARACTER*(MAX_LEN_FNAM) buoyancyRelation + CHARACTER*(MAX_LEN_FNAM) uVelInitFile + CHARACTER*(MAX_LEN_FNAM) vVelInitFile + CHARACTER*(MAX_LEN_FNAM) pSurfInitFile + CHARACTER*(MAX_LEN_FNAM) dQdTfile 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. C cg2dChkResFreq - Frequency with which to check residual C in con. grad solver. +C cg3dMaxIters - Maximum number of iterations in the +C three-dimensional con. grad solver. +C cg3dChkResFreq - Frequency with which to check residual +C in con. grad solver. C nIter0 - Start time-step number of for this run C nTimeSteps - Number of timesteps to execute C numStepsPerPickup - For offline setup. Frequency of pickup @@ -46,34 +103,55 @@ C writeBinaryPrec - Precision used for writing binary files C readBinaryPrec - Precision used for reading binary files C nCheckLev - Holds current checkpoint level +C nShap - "Order" of shapiro filter to apply to +C model prognositic fields. +C nShap == 1 => del2 +C nShap == 2 => del4 +C nShap == 3 => del6 +C etc... + COMMON /PARM_I/ & cg2dMaxIters, & cg2dChkResFreq, - & nIter0, nTimeSteps, + & cg3dMaxIters, + & cg3dChkResFreq, + & nIter0, nTimeSteps, nEndIter, & numStepsPerPickup, & writeStatePrec, nCheckLev, - & writeBinaryPrec, readBinaryPrec + & writeBinaryPrec, readBinaryPrec, + & nShap, zonal_filt_sinpow, zonal_filt_cospow INTEGER cg2dMaxIters INTEGER cg2dChkResFreq + INTEGER cg3dMaxIters + INTEGER cg3dChkResFreq INTEGER nIter0 INTEGER nTimeSteps + INTEGER nEndIter INTEGER numStepsPerPickup INTEGER writeStatePrec INTEGER writeBinaryPrec INTEGER readBinaryPrec INTEGER nCheckLev + INTEGER nShap + INTEGER zonal_filt_sinpow + INTEGER zonal_filt_cospow C-- COMMON /PARM_L/ Logical valued parameters used by the model. C usingCartesianGrid - If TRUE grid generation will be in a cartesian C coordinate frame. C usingSphericalPolarGrid - If TRUE grid generation will be in a C spherical polar frame. +C no_slip_sides - Impose "no-slip" at lateral boundaries. +C no_slip_bottom- Impose "no-slip" at bottom boundary. +C staggerTimeStep - enable a Stagger time stepping T,S Rho then U,V C momViscosity - Flag which turns momentum friction terms on and off. 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 metricTerms - Flag which turns metric terms on or off. +C usingSphericalPolarMTerms - If TRUE use spherical polar metric terms. C useCoriolis - Flag which turns the coriolis terms on and off. C tempDiffusion - Flag which turns diffusion of temperature on C and off. @@ -90,14 +168,48 @@ 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 +C tempStepping - Turns temperature equation time-stepping off +C saltStepping - Turns salinity equation time-stepping off +C useConstantF - Coriolis parameter set to f0 +C useBetaPlaneF - Coriolis parameter set to f0 + beta.y +C useSphereF - Coriolis parameter set to 2.omega.sin(phi) +C implicitDiffusion - Turns implicit vertical diffusion on +C implicitViscosity - Turns implicit vertical viscosity on +C doThetaClimRelax - Set true if relaxation to temperature +C climatology is required. +C doSaltClimRelax - Set true if relaxation to salinity +C climatology is required. +C periodicExternalForcing - Set true if forcing is time-dependant +C usingPCoords - Set to indicate that we are working in pressure +C coords. +C usingZCoords - Set to indicate that we are working in height +C coords. +C nonHydrostatic - Using non-hydrostatic terms +C globalFiles - Selects between "global" and "tiled" files +C allowFreezing - Allows water to freeze and form ice +C groundAtK1 - put the surface(k=1) at the Lower Boundary (=ground) COMMON /PARM_L/ usingCartesianGrid, usingSphericalPolarGrid, - & momViscosity, momAdvection, momForcing, useCoriolis, momPressureForcing, - & tempDiffusion, tempAdvection, tempForcing, + & no_slip_sides,no_slip_bottom, + & staggerTimeStep, + & momViscosity, momAdvection, momForcing, useCoriolis, + & momPressureForcing,tempDiffusion, tempAdvection, tempForcing, & saltDiffusion, saltAdvection, saltForcing, - & implicitFreeSurface, rigidLid, momStepping, tempStepping + & implicitFreeSurface, rigidLid, + & momStepping, tempStepping, saltStepping, + & metricTerms, usingSphericalPolarMTerms, + & useConstantF, useBetaPlaneF, useSphereF, + & implicitDiffusion, implicitViscosity, + & doThetaClimRelax, doSaltClimRelax, + & periodicExternalForcing, usingPCoords, usingZCoords, + & nonHydrostatic, globalFiles, + & allowFreezing, groundAtK1, + & usePickupBeforeC35 LOGICAL usingCartesianGrid LOGICAL usingSphericalPolarGrid + LOGICAL usingSphericalPolarMTerms + LOGICAL no_slip_sides + LOGICAL no_slip_bottom + LOGICAL staggerTimeStep LOGICAL momViscosity LOGICAL momAdvection LOGICAL momForcing @@ -113,10 +225,29 @@ LOGICAL rigidLid LOGICAL momStepping LOGICAL tempStepping + LOGICAL saltStepping + LOGICAL metricTerms + LOGICAL useConstantF + LOGICAL useBetaPlaneF + LOGICAL useSphereF + LOGICAL implicitDiffusion + LOGICAL implicitViscosity + LOGICAL doThetaClimRelax + LOGICAL doSaltClimRelax + LOGICAL periodicExternalForcing + LOGICAL usingPCoords + LOGICAL usingZCoords + LOGICAL nonHydrostatic + LOGICAL globalFiles + LOGICAL allowFreezing + LOGICAL groundAtK1 + LOGICAL usePickupBeforeC35 C-- COMMON /PARM_R/ "Real" valued parameters used by the model. C cg2dTargetResidual C - Target residual for cg2d solver. +C cg3dTargetResidual +C - Target residual for cg3d solver. 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 @@ -131,38 +262,55 @@ 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 delP - Vertical grid spacing ( Pa ). +C delZ - Vertical grid spacing ( m ). +C delR - Vertical grid spacing ( units of r ). 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 recip_gravity and its inverse C gBaro - Accel. due to gravity used in barotropic equation ( m/s^2 ) C ronil - Reference density +C rhoConst - Vertically constant reference density 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 ( m ). +C recip_RSphere - Reciprocal radius of sphere ( m ). C f0 - Reference coriolis parameter ( 1/s ) C ( Southern edge f for beta plane ) C beta - df/dy ( s^-1.m^-1 ) +C omega - Angular velocity ( rad/s ) C viscAh - Eddy viscosity coeff. for mixing of C momentum laterally ( m^2/s ) C viscAz - Eddy viscosity coeff. for mixing of C momentum vertically ( m^2/s ) +C viscAp - Eddy viscosity coeff. for mixing of +C momentum vertically ( Pa^2/s ) +C viscAr - Eddy viscosity coeff. for mixing of +C momentum vertically ( units of r^2/s ) C viscA4 - Biharmonic viscosity coeff. for mixing of C momentum laterally ( m^4/s ) C diffKhT - Laplacian diffusion coeff. for mixing of C heat laterally ( m^2/s ) C diffKzT - Laplacian diffusion coeff. for mixing of C heat vertically ( m^2/s ) +C diffKpT - Laplacian diffusion coeff. for mixing of +C heat vertically ( Pa^2/s ) +C diffKrT - Laplacian diffusion coeff. for mixing of +C heat vertically ( units of r^2/s ) C diffK4T - Biharmonic diffusion coeff. for mixing of C heat laterally ( m^4/s ) C diffKhS - Laplacian diffusion coeff. for mixing of C salt laterally ( m^2/s ) C diffKzS - Laplacian diffusion coeff. for mixing of C salt vertically ( m^2/s ) +C diffKpS - Laplacian diffusion coeff. for mixing of +C salt vertically ( Pa^2/s ) +C diffKrS - Laplacian diffusion coeff. for mixing of +C salt vertically ( units of r^2/s ) C diffK4S - Biharmonic diffusion coeff. for mixing of C salt laterally ( m^4/s ) C deltaT - Default timestep ( s ) @@ -177,38 +325,79 @@ 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 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 ). -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 +C implicSurfPress - parameter of the Crank-Nickelson time stepping : +C Implicit part of Surface Pressure Gradient ( 0-1 ) +C implicDiv2Dflow - parameter of the Crank-Nickelson time stepping : +C Implicit part of barotropic flow Divergence ( 0-1 ) +C hFacMin - Minimum fraction size of a cell (affects hFacC etc...) +C hFacMinDz - Minimum dimesional size of a cell (affects hFacC etc..., m) +C hFacMinDp - Minimum dimesional size of a cell (affects hFacC etc..., Pa) +C hFacMinDr - Minimum dimesional size of a cell (affects hFacC etc..., units of r) +C tauCD - CD scheme coupling timescale ( 1/s ) +C rCD - CD scheme normalised coupling parameter ( 0-1 ) +C startTime - Starting time for this integration ( s ). +C endTime - Ending time for this integration ( 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 ). +C afFacMom - Advection of momentum term tracer parameter +C vfFacMom - Momentum viscosity tracer parameter +C pfFacMom - Momentum pressure forcing tracer parameter +C cfFacMom - Coriolis term tracer parameter +C foFacMom - Momentum forcing tracer parameter +C mtFacMom - Metric terms tracer parameter +C cosPower - Power of cosine of latitude to multiply viscosity +C cAdjFreq - Frequency of convective adjustment +C +C taveFreq - Frequency with which time-averaged model state is written to +C post-processing files ( s ). +C tauThetaClimRelax - Relaxation to climatology time scale ( s ). +C lambdaThetaClimRelax - Inverse time scale for relaxation ( 1/s ). +C tauSaltClimRelax - Relaxation to climatology time scale ( s ). +C lambdaSaltClimRelax - Inverse time scale for relaxation ( 1/s ). +C externForcingPeriod - Is the period of which forcing varies (eg. 1 month) +C externForcingCycle - Is the repeat time of the forcing (eg. 1 year) +C (note: externForcingCycle must be an integer +C number times externForcingPeriod) +C horiVertRatio - Ratio on units in vertical to units in horizontal. +C recip_horiVertRatio ( 1 if horiz in m and vertical in m ). +C ( g*rho if horiz in m and vertical in Pa ). +C latFFTFiltLo - Low latitude for FFT filtering of latitude +C circles ( see filter*.F ) +C Ro_SeaLevel - standard position of Sea-Level in "R" coordinate, used as +C starting value (k=1) for vertical coordinate (rf(1)=Ro_SeaLevel) +C bottomDragLinear - Drag coefficient built in to core dynamics +C " Quadratic ( linear: 1/s, quadratic: 1/m ) + COMMON /PARM_R/ cg2dTargetResidual, cg2dpcOffDFac, + & cg3dTargetResidual, + & delP, delZ, delR, delX, delY, + & deltaT,deltaTmom, deltaTtracer, deltaTClock,abeps, startTime, + & phiMin, thetaMin, rSphere, recip_RSphere, f0, fCori, beta, + & viscAh, viscAz, viscA4, viscAr, + & diffKhT, diffKzT, diffK4T, diffKrT, + & diffKhS, diffKzS, diffK4S, diffKrS, + & delT, tauCD, rCD, freeSurfFac, implicSurfPress, implicDiv2Dflow, + & hFacMin, hFacMinDz, + & gravity, recip_Gravity, gBaro, rhonil, recip_rhonil, + & recip_rhoConst, rhoConst, tRef, sRef, + & endTime, chkPtFreq, pchkPtFreq, dumpFreq, taveFreq, + & afFacMom, vfFacMom, pfFacMom, cfFacMom, foFacMom, mtFacMom, + & cosPower, + & cAdjFreq, omega, tauThetaClimRelax, lambdaThetaClimRelax, + & tauSaltClimRelax, lambdaSaltClimRelax, + & externForcingCycle, externForcingPeriod, + & viscAp, diffKpT, diffKpS, hFacMinDr, hFacMinDp, + & theta_S, specVol_S, horiVertRatio, recip_horiVertRatio, + & latFFTFiltLo, ivdc_kappa, Ro_SeaLevel, zonal_filt_lat, + & bottomDragLinear,bottomDragQuadratic + _RL cg2dTargetResidual + _RL cg3dTargetResidual _RL cg2dpcOffDFac - _RL delZ(Nz) + _RL delZ(Nr) + _RL delP(Nr) + _RL delR(Nr) _RL delX(Nx) _RL delY(Ny) _RL deltaT @@ -219,52 +408,85 @@ _RL phiMin _RL thetaMin _RL rSphere + _RL recip_RSphere _RL f0 _RL freeSurfFac + _RL implicSurfPress + _RL implicDiv2Dflow + _RL hFacMin + _RL hFacMinDz + _RL hFacMinDp + _RL hFacMinDr _RL beta _RL viscAh _RL viscAz + _RL viscAp + _RL viscAr _RL viscA4 _RL diffKhT + _RL diffKrT _RL diffKzT + _RL diffKpT _RL diffK4T _RL diffKhS + _RL diffKrS _RL diffKzS + _RL diffKpS _RL diffK4S _RL delt _RL tauCD _RL rCD - _RL GMmaxslope - _RL GMlength - _RL GMalpha - _RL GMdepth - _RL GMkbackground _RL gravity + _RL recip_gravity _RL gBaro _RL rhonil - _RL tRef(Nz) - _RL sRef(Nz) + _RL recip_rhonil + _RL rhoConst + _RL recip_rhoConst + _RL specVol_S(Nr) + _RL tRef(Nr) + _RL theta_S(Nr) + _RL sRef(Nr) _RS Fcori(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) _RL startTime _RL endTime _RL chkPtFreq _RL pChkPtFreq _RL dumpFreq + _RL taveFreq _RL afFacMom _RL vfFacMom _RL pfFacMom _RL cfFacMom _RL foFacMom + _RL mTFacMom + _RL cosPower _RL cAdjFreq + _RL omega + _RL tauThetaClimRelax + _RL lambdaThetaClimRelax + _RL tauSaltClimRelax + _RL lambdaSaltClimRelax + _RL externForcingCycle + _RL externForcingPeriod + _RL horiVertRatio + _RL recip_horiVertRatio + _RL latFFTFiltLo + _RL ivdc_kappa + _RL Ro_SeaLevel + _RL zonal_filt_lat + _RL bottomDragLinear + _RL bottomDragQuadratic - COMMON /PARM_A/ HeatCapacity_Cp, + COMMON /PARM_A/ HeatCapacity_Cp,recip_Cp, & Lamba_theta _RL HeatCapacity_Cp _RL Lamba_theta + _RL recip_Cp 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) + _RL eosC(9,Nr+1),eosSig0(Nr+1),eosRefT(Nr+1),eosRefS(Nr+1) C Linear equation of state C tAlpha - Linear EOS thermal expansion coefficient ( 1/degree ). C sBeta - Linear EOS haline contraction coefficient. @@ -273,3 +495,12 @@ _RL sBeta character*(6) eosType +C Logical flags for selecting packages + LOGICAL useKPP + LOGICAL useGMRedi + LOGICAL useOBCS + LOGICAL useAIM + LOGICAL useECCO + COMMON /PARM_PACKAGES/ + & useKPP, useGMRedi, useOBCS, useAIM, useECCO +