# ====================
# | 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
sRef = 30*300.,
tRef = 0*300.,
no_slip_sides=.FALSE.,
no_slip_bottom=.TRUE.,
# viscAz=1.93e-5,
 viscAz=5.6614e-4,
 viscAh=5.E4,
 diffKhT=0.0,
 diffKzT=1e-6,
 diffKhS=0.0,
 diffKzS=1e-6,
# 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 = 4180.0,
 gravity         = 9.8156,
# rhoConst        = 1035.0,
 rhoConstFresh   = 1000,
 useCDscheme=.FALSE.,
 staggerTimeStep=.TRUE.,
 multiDimAdvection=.false.,
# tempAdvScheme=2,
# saltAdvScheme=2,
 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
  niter0 =2448,
  nTimeSteps=28800,
  deltaT = 600.0,
# deltaTtracer= 1800.0,
# deltaTClock= 1800.0,
  deltaTfreesurf=600.0,
  cAdjFreq=0.,
 abEps=0.1,
# tracForcingOutAB=1,
  pChkptFreq=86400.,
#chkptFreq= 432000.,
#dumpFreq = 86400.,
#taveFreq = 0.,
 monitorFreq=86400.,
# adjDumpFreq=86400.,
# adjMonitorFreq = 86400.,
#  monitorFreq=1.,
#  adjDumpFreq=1.,
#  adjMonitorFreq = 1.,
#  outputTypeslnclusive=.TRUE.,
 forcing_In_AB = .FALSE.,
 dumpInitAndLast=.FALSE.,
# pickupStrictlyMatch=.TRUE.,
# writePickupAtEnd = .TRUE.,
# outputTypesInclusive=.TRUE.,
# periodicExternalForcing=.TRUE.,
# externForcingPeriod=86400.,
# externForcingCycle=31536000., 
&

# 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,
# modify by myself 60
  delZ   = 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
           1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
# Depth = 200 m,
# ygOrigin=60.,
# xgOrigin=280.,
# rSphere = 6371.D3,
 &

 &PARM05
 bathyFile = 'bathy_2000m.bin',
# hydrogThetaFile= 'T_E6.bin',
# hydrogSaltFile = 'S_E6.bin',
 &

# MAS parameters
 &PARM06
# xp1=-157.5,
# xp2=-155,
# yp1=71.3,
# yp2=71.8,
 &
