# ====================
# | Model parameters |
# ====================
#
# Continuous equation parameters
#
#   tRef            - Reference vertical potential temperature          (deg C)
#   sRef            - Reference vertical salinity                         (PSU)
#   viscAh          - Horizontal eddy viscosity coefficient             (m^2/s)
#   viscAz          - Vertical eddy viscosity coefficient               (m^2/s)
#   diffKhT         - Horizontal temperature diffusivity                (m^2/s)
#   diffKzT         - Vertical temperature diffusivity                  (m^2/s)
#   diffKhS         - Horizontal salt diffusivity                       (m^2/s)
#   diffKzS         - Vertical salt diffusivity                         (m^2/s)
#   f0              - Reference coriolis parameter,
#                     south edge of f on beta plane                       (1/s)
#   beta            - df/dy                                         (s^-1.m^-1)
#   tAlpha          - Linear EOS thermal expansion coefficient           (1/oC)
#   sBeta           - Linear EOS haline contraction coefficient         (1/ppt)
#   gravity         - Acceleration due to gravity                       (m/s^2)
#   gBaro           - Accel. due to gravity used in barotropic equation (m/s^2)
#   rigidLid        - Set to true to use rigid lid
#   implicitFreeSurface - Set to true to use implicit free surface
#   eosType         - Flag for linear or polynomial equation of state
#   momAdvection    - On/Off flag for momentum self transport
#   momViscosity    - On/Off flag for momentum mixing
#
 &PARM01
# an's T,S profiles @ 23 levels
 tRef               = -1.930,-1.931,-1.932,-1.2854,-0.6,-0.6,-0.9,-1.2,-1.2,-1.3,
                      -1.4,-1.4,-1.5,-1.5,-1.5,-1.5,-1.3,-0.9,-0.3, 0.2,
                       0.5, 0.5, 0.5,
# tRef to use for 11,000 time step adjoint calculations
# tRef = -1.8420,-1.8464,-1.8392,-1.2854,-0.6,-0.6,-0.9,-1.2,-1.2,-1.3,
# 	-1.4,-1.4,-1.5,-1.5,-1.5,-1.5,-1.3,-0.9,-0.3, 0.2,
# 	0.5, 0.5, 0.5
 sRef               = 29.0079,29.0080,29.0086,29.0775,30.7,31.6,31.9,32.1,32.3,32.4,
                      32.5,32.7,32.8,32.9,33.1,33.4,33.8,34.2,34.5,34.7,
                      34.8,34.8,34.8,
 no_slip_sides=.FALSE.,
 no_slip_bottom=.TRUE.,
 viscAz=1.93e-5,
 viscAh=5.E4,
 diffKhT=0.0,
 diffKzT=1.46e-7,
 diffKhS=0.0,
 diffKzS=1.46e-7,
# beta=1.E-11,
# 1-D setups work best with an f-plane due to unequal Coriolis force on north
# and south faces
 selectCoriMap=0,
 rigidLid=.FALSE.,
 implicitFreeSurface=.TRUE.,
 eosType='JMD95Z',
 readBinaryPrec=32,
 writeBinaryPrec=32,
 saltStepping=.TRUE.,
 tempStepping=.TRUE.,
 momStepping=.TRUE.,
 implicitDiffusion=.TRUE.,
 implicitViscosity=.TRUE.,
 allowFreezing=.FALSE.,
#- set wrong celsius2K to reproduce old results:
 celsius2K=273.16,
 HeatCapacity_Cp = 3986.0,
 gravity         = 9.8156,
 rhoConst        = 1027.0,
 rhoConstFresh   = 999.8,
 useCDscheme=.FALSE.,
 staggerTimeStep=.TRUE.,
 multiDimAdvection=.false.,
 tempAdvScheme=30,
 saltAdvScheme=30,
 vectorInvariantMomentum=.TRUE.,
 useRealFreshWaterFlux = .TRUE.,
# debugLevel=1,
 &

# Elliptic solver parameters
#
#   cg2dMaxIters       - Maximum number of 2d solver iterations
#   cg2dTargetResidual - Solver target residual
#
 &PARM02
 cg2dMaxIters=1000,
 cg2dTargetResidual=1.D-13,
 &

# Time stepping parameters
#
#   startTime         - Integration starting time                (s)
#   endTime           - Integration ending time                  (s)
#   tauCD             - CD scheme coupling timescale             (s)
#   deltaTMom         - Timestep for momemtum equations          (s)
#   deltaTtracer      - Tracer timestep                          (s)
#   deltaTClock       - Timestep used as model "clock"           (s)
#   abEps             - Adams-Bashforth stabilising factor
#   pChkPtFreq        - Frequency of permanent check pointing    (s)
#   chkPtFreq         - Frequency of rolling check pointing      (s)
#   dumpFreq          - Frequency at which model state is stored (s)
#   tauThetaClimRelax - Relaxation to climatology time scale     (s)
#   tauSaltClimRelax  - Relaxation to climatology time scale     (s)
#
 &PARM03
 startTime=0.0,
 nTimeSteps= 10,
# nTimeSteps= 11000,
 deltaTtracer=3600.0,
 deltaTClock =3600.0,
 cAdjFreq=0.,
 abEps=0.1,
 tracForcingOutAB=1,
 pChkptFreq=0.,
 chkptFreq= 0.,
 dumpFreq = 0.,
# monitorFreq=86400.,
# adjDumpFreq=86400.,
# adjMonitorFreq = 86400.,
 monitorFreq=1.,
 adjDumpFreq=1.,
 adjMonitorFreq = 1.,
 &

# Gridding parameters
#
#   usingSphericalPolarGrid - On/Off flag for spherical polar coordinates
#   delX                    - Zonal grid spacing         (degrees)
#   delY                    - Meridional grid spacing    (degrees)
#   delZ                    - Vertical grid spacing      (m)
#   ygOrigin                - Southern boundary latitude (degrees)
#
 &PARM04
 usingCartesianGrid=.TRUE.,
 dXspacing=5000.,
 dYspacing=5000.,
# usingSphericalPolarGrid=.TRUE.,
# delX=1*2.E0,
# delY=1*2.E0,
 delZ   = 10.00, 10.00, 10.00, 10.00, 10.00, 10.00, 10.00, 10.01,
 10.03, 10.11, 10.32, 10.80, 11.76, 13.42, 16.04 , 19.82, 24.85,
 31.10, 38.42, 46.50, 55.00, 63.50, 71.58,
# ygOrigin=65.,
# xgOrigin=280.,
# rSphere = 6371.D3,
 &

 &PARM05
 bathyFile = 'bathy_1x1_1105m_testpool',
 &

