139
Mars : Version 9.06 Mars : Mars : Version 9.06 Version 9.06 l fr e m e r 1 Mars_Agrif2_V9.06 “MARS manual” Valérie GARNIER, Bénédicte THOUVENIN, Martin HURET Mars_Agrif2_V9.06 Mars_Agrif2_V9.06 MARS manual MARS manual Val Val é é rie GARNIER, rie GARNIER, B B é é n n é é dicte THOUVENIN, dicte THOUVENIN, Martin HURET Martin HURET

Mars Agrif2 V9.06 “MARS manual” “MARS manual MARS ......Bénéédicte THOUVENIN, Martin HURETMartin HURET Mars : Mars : Version 9.06Mars : Version 9.06Version 9.06 l fr e m e

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    1

    Mars_Agrif2_V9.06

    “MARS manual”

    Valérie GARNIER, Bénédicte THOUVENIN,

    Martin HURET

    Mars_Agrif2_V9.06Mars_Agrif2_V9.06

    ““MARS manualMARS manual””

    ValValéérie GARNIER, rie GARNIER, BBéénnéédicte THOUVENIN, dicte THOUVENIN,

    Martin HURETMartin HURET

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    2

    SummarySummarySummaryIntroduction : General description of MARSEquations - σσ coordinate - Forcings - Vertical mixing -Numerical formulation : Mode splitting – Time stepping –

    Adaptative time step - Numerical schemesList of Modules and functionalitiesMARS variables MARS discretizationOpen boundariesParametrization of the bathymetrie - wetting and dryingParametrization of vertical mixingParametrization of the run period Structure of the code

    How to set up a new configuration ?How to set up a realistic configuration ?Available cpp keysNamelist variables in para*.txtExamples of input files * .dat

    How to simulate substances ?Module of sedimentologyModule of biologyModule of contaminant

    References

    FonctonnalitiesHow to use trajectory ? to use IBM ? AGRIF

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    3

    General description of MARSGeneral description of MARSGeneral description of MARS

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    4

    Context (1/5)ContextContext (1/5)(1/5)

    • MARS is a coastal hydrodynamical model developped by IFREMER (French Research Institute for the Exploitation of the Sea)

    • In such a multidisciplinary institute, numerical researches are managed on different environmental domains.

    • Sedimentology,

    • Coastal Environment health (microbial and contaminants),

    • Biogeochemistry : primary production,…

    • Halieutic applications.

    • MARS is also implemented for operational purpose : the PREVIMER project provides the users with analyses and forecasts of marine coastal parameters

    • The variety of applications involves the taking into account of a large range of time-space scales :

    • basin, region, shelf, bay, beach

    • decade, season, week, tide.

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    5

    Strategy of modelling at IFREMER (2/5)StrategyStrategy of of modellingmodelling atat IFREMER (2/5)IFREMER (2/5)

    MARS model is implemented for research and operational interests over the three metropolitan basins : the Channel, the Bay of Biscay and the North- Western Mediterranean Sea.

    FRANCE

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    6

    Strategy of modelling at IFREMER (3/5)StrategyStrategy of of modellingmodelling atat IFREMER (3/5)IFREMER (3/5)

    Large scales are treated by operational institutes (MFS, MERCATOR), that provides MARS with initial fields and open boundary conditions.

    For the coarsest configuration (rank0), open boundary conditions for tides come from different data sets : FES2004, FES1999, Schwiderski

    If required, models are coupled offline or online (AGRIF package). A configuration can be splitted into several ranks, the spatial resolution increasing with ranks

    -20 -15 -10 -5 0 5 10

    40

    45

    50

    55

    60

    65

    49

    50

    51

    Rang 0

    0 -3 -2 -1

    49

    50

    51

    Rang 1

    3 2 1

    -2.6 -2.4 -2.2 -2 -1.8 -1.6 -1.4

    49.2

    49.4

    49.6

    49.8

    50

    Rang 2

    Rang 3

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    7

    MFS

    PACAMARSEILLERHONE

    GOL

    www.ifremer.fr/nausicaa/medit/index.htmftp://ftp.ifremer.fr/delao/SOCOM

    Strategy of modelling at IFREMER (4/5) Mediterranean platform

    StrategyStrategy of of modellingmodelling atat IFREMER (4/5) IFREMER (4/5) MediterraneanMediterranean platformplatform

    MFS (OPA : 1/16° 72z)

    •Global model•Realistic (assimilation)•Operational

    RegionalRegional configurationconfiguration

    RegionalRegional circulationcirculation

    CoastalCoastal configurationsconfigurations

    Exchanges Exchanges withwith open open seaseaPhysicalPhysical and and sedimentologicalsedimentological processesprocesses

    LagoonsLagoons Dynamics / Dynamics / surveysurvey

    Local Local configurationsconfigurations

    Impact Impact studiesstudies, , industrialindustrial outflowoutflow

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    8

    Strategy of modelling at IFREMER (5/5) Modelling along the Atlantic and Channel coasts

    StrategyStrategy of of modellingmodelling atat IFREMER (5/5)IFREMER (5/5) ModellingModelling alongalong the Atlantic and Channel the Atlantic and Channel coastscoasts

    ShelfShelf of the of the BayBay of of BiscayBiscay

    UnderstandingUnderstanding of the of the regionalregional circulationcirculationHydrologicalHydrological structuresstructuresSeasonalSeasonal and and interannualinterannual changeschanges

    ChannelChannel Validation of Validation of residualresidual fieldsfieldsTrackingTracking of water massesof water massesOutflowOutflow (La Hague)(La Hague)BiologicalBiological applicationsapplications

    Local Local configurationconfiguration

    Impact Impact studiesstudiesImpact Impact studiesstudies, , industrialindustrial and and urbanurban outflowsoutflowsMicrobianMicrobian state in state in microtidalmicrotidal seasseas

    More than 30 configurations are implemented by Coastal Environment Laboratories

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    9

    EquationsEquationsEquations

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    10

    Primitive equations (z coordinate) (1/7)Primitive Primitive equationsequations (z (z coordinatecoordinate) (1/7)) (1/7)

    Navier-Stockes equations

    + Boussinesq approximation• ρ’

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    11

    σ coordinate (2/7)σσ coordinatecoordinate (2/7)(2/7)

    at the sea surface

    at the sea floor

    l_equisig=.true.

    l_equisig=.false.

    σ = -1σ = 0

    0z xe

    h xeσ −=

    +

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    12

    Generalized σ coordinate (3/7)GeneralizedGeneralized σσ coordinate (3/7)coordinate (3/7)

    l_equisig=.true.key_siggen

    σ = -1σ = 0

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    13

    Generalized σ coordinate (4/7)GeneralizedGeneralized σσ coordinate (4/7)coordinate (4/7)Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    14

    Primitive equations (σ coordinate) (5/7)Primitive equations (Primitive equations (σσ coordinate) (5/7)coordinate) (5/7)

    0

    ( )1 1( ) x x

    nz uu Pa DL u fv g Ft x x D

    ζ σπρ σ

    ∂∂∂ ∂ ∂ ∂+ − =− − + + +

    ∂ ∂ ∂ ∂

    0Du Dv Dwt x yζ

    σ∂ ∂ ∂ ∂

    + + + =∂ ∂ ∂ ∂

    å

    To simplify, equations are written using cartesian coordinates in this documentation, but MARS also uses spherical coordinates

    1 p gD

    ρσ

    ∂= −

    0

    ( )1 1( ) y y

    nz vv Pa DL v fu g Ft y y D

    ζ σπρ σ

    ∂∂∂ ∂ ∂ ∂+ + =− − + + +

    ∂ ∂ ∂ ∂

    1 ( ( ( 1) ) ( ( 1) ))H Hw w u vD t x x y y

    ζ ζ ζσ σ σ σ σ∂ ∂ ∂ ∂ ∂= − − + − − + −∂ ∂ ∂ ∂ ∂

    å

    ( ) A A AL A u v wx y σ

    ∂ ∂ ∂= + +

    ∂ ∂ ∂åwith

    with

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    15

    Primitive equations (σ coordinate) (6/7)Primitive equations (Primitive equations (σσ coordinate) (6/7)coordinate) (6/7)

    ( ) A A AL A u v wx y σ

    ∂ ∂ ∂= + +

    ∂ ∂ ∂å

    1[ ] ( )x

    D HD b d bx x xσ

    π σ σ∂ ∂ ∂= + −∂ ∂ ∂∫

    1[ ] ( )y

    D HD b d by y yσ

    π σ σ∂ ∂ ∂= + −∂ ∂ ∂∫

    0 0( )b g ρ ρ ρ= − − /

    2

    1 1[ ] [ ( ) ]

    1 1[ ( ) ] [ ]( )

    x x x

    xx

    u H D uF DD x x D x x x

    H D u uH DD x x x D D x x

    ν ν σσ

    νν σ σ

    σ σ σ

    ∂ ∂ ∂ ∂ ∂ ∂= + − +

    ∂ ∂ ∂ ∂ ∂ ∂∂ ∂ ∂ ∂ ∂ ∂∂ ∂− + −

    ∂ ∂ ∂ ∂ ∂ ∂∂ ∂

    2

    1 1[ ] [ ( ) ]

    1 1 ( )[ ( ) ] [ ]

    y y y

    yy

    v H D vF DD y y D y y y

    H DH D v vy yD y y y D D

    ν ν σσ

    νσν σ

    σ σ σ

    ∂ ∂ ∂ ∂ ∂ ∂= + − +

    ∂ ∂ ∂ ∂ ∂ ∂

    ∂ ∂∂ ∂ ∂ ∂ ∂ ∂−− +∂ ∂∂ ∂ ∂ ∂ ∂ ∂

    advection

    internal pressure

    buoyancy

    Horizontal friction

    ( ) ( )x x y yu vF F

    x x y yν ν∂ ∂ ∂ ∂= =

    ∂ ∂ ∂ ∂

    Smooth bathymetric gradient

    2f sinφ= Ω Coriolis parameter

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    16

    Equations of thermodynamics (7/7) Equations of thermodynamics (7/7) Equations of thermodynamics (7/7)

    2

    0

    ( )( ) ( ) 1yx

    p

    TT kz TD vT kD uT k D w TDT Iyx Dt x y C

    σσ ρ σ

    ∂∂ ∂∂ −∂ − ∂ −∂ ∂∂∂ ∂+ + + =∂ ∂ ∂ ∂ ∂

    å

    2( )( ) ( )

    0yx

    SS kz SD vS kD uS k D w SDS yx Dt x y

    σσ

    ∂∂ ∂∂ −∂ − ∂ −∂ ∂∂ ∂+ + + =∂ ∂ ∂ ∂

    å

    Heat and salinity equations

    Equation of state•Linearized around point T0 ,S0 ,p=0•Fully developped as Mellor (1991)

    Passive tracer

    ( , , )F S T pρ =

    2( )( ) ( )rr rr yr x r

    r

    TT TkzD vT kD uT k D w TDT yx D Sources Sinkst x y

    σσ

    ∂∂ ∂∂ −∂ − ∂ −∂ ∂∂ ∂+ + + = −∂ ∂ ∂ ∂

    å

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    17

    ForcingsForcingsForcingsMomentum equations

    •Winds, tides•River discharges (mass)

    Thermodynamics•Heat fluxes (LW, SH, latent, sensible)•River discharges (salinity)

    Passive tracer•Sewage…

    0

    s xn z uD

    τσ ρ

    ∂=

    0

    s yn z vD

    τσ ρ

    ∂=

    0

    T

    p

    Qk z TD Cσ ρ

    ∂=

    0Sk zσ

    ∂=

    ∂0w =å

    0

    b xn z uD

    τσ ρ

    ∂=

    0

    b yn z vD

    τσ ρ

    ∂=

    0Tk zσ

    ∂=

    0Sk zσ

    ∂=

    ∂0w =å

    1σ =Boundary conditions at the surface Boundary conditions at the bottom 0σ =

    ( , ) ( , )sx sy a S x yCd W W Wτ τ ρ=r

    0( , ) ( , )bx by BCd u u vτ τ ρ=r

    2

    0

    0

    lnBCd z h z

    z

    κ

    ⎛ ⎞⎜ ⎟⎜ ⎟= ⎜ ⎟⎛ ⎞+ +⎜ ⎟⎜ ⎟⎜ ⎟⎝ ⎠⎝ ⎠

    /( * )w Q surf D= −

    Du Dv Qt x y surfζ∂ ∂ ∂

    + + =∂ ∂ ∂

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    18

    Turbulence models

    0 equations :

    cst

    Prandt model

    Quetin model

    Pacanovski et Philander, 1981

    1 equation : Gaspard et al, 1990

    2 equations :

    Vertical mixing (1/2)Vertical mixing (1/2)Vertical mixing (1/2)

    ( )1nz uD

    σ

    ∂∂

    ∂∂

    2 2; ( ) ;u unz l kz f Ri l l analyticalz z

    ∂ ∂= =

    ∂ ∂0 ;

    (1 ) (1 )b bnv vnz kz k

    Ri Riν

    α α= + = +

    + +

    ,nz kz

    , ( , ) ; ;nz kz f ect l ect computed l evaluated=

    , ( , , ) ; ;nz kz f k kl l k et kl computed l evaluated=

    0* /15 (1 ) ; * 0.4 / log( / ) bottomnz u H u H z uσ σ σ= − =

    2

    /b URiz z

    ∂ ∂=

    ∂ ∂

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    19

    Turbulence models

    2 equations : Warner et al. (2005)

    4 turbulence closure models1. k-kl

    • Close to Mellor–Yamada level 2.5 scheme of Mellor et Yamada (1974, 1982)

    2. k–ε

    • Jones and Launder (1972), Launder and Sharma (1974)

    • Burchard et al. (1998), Burchard and Bolding (2001)

    3. k-ω

    • Kolmogorov (1942), Saffman (1970), Saffman and Wilcox (1974), Umlauf et al. (2003)

    4. GLS : generic length scale

    • Umlauf and Burchard (2003)

    Vertical mixing (2/2)Vertical mixing (2/2)Vertical mixing (2/2)( )1nz uD

    σ

    ∂∂

    ∂∂

    ,nz kz

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    20

    Numerical formulationNumerical formulationNumerical formulation

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    21

    MotivationPressure gradient can be splitted in 3 terms : atmospherical pressure, sea surface level, internal pressure gradient (buoyancy). The two first ones are barotropic terms (external mode) associated with fast propagating waves (tide waves, storm surges…).

    Explicit formulation (OPA, HYCOM, POM)External and internal modes are splitted and resolved separately.The simulation of external mode requires the use of small time steps in order to satisfy the CFL criteria.The internal mode is resolved with a longer time step.Splitting mode is mathematically correct for linear equations only. Because fully equations are not linear, a coupling method is required to fit barotropic and baroclinic modes.

    Semi-implicit formulation (MARS)A unique time step, allowing a more precise coupling procedure.

    Mode splittingMode splittingMode splittingReturn to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    22

    Barotropic mode is solved using a time stepping and Alternate Direction Implicit (ADI) methodology (Peaceman & Rachford, 1995, Leendertse,1970).

    Advantage : the external gravity wave term, semi-implicit, removes the stringest stability criterionthat becomesand allows larger time steps

    Drawback : increasing the time step too far beyond the explicit limit results in damping of the barotropic mode

    In MARS, scheme are semi-implicit because implicit only with respect to the direction of computation.

    Time stepping : external mode (1/6)Time stepping : external mode (1/6)Time stepping : external mode (1/6)

    max 0.7crit critu tC C avec C

    = ≤ =Δ

    /t x gDΔ < Δ

    Lazure & Dumas, 2008

    xev,u,v xeu,u,v xev,u,v xeu,u,v

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    23

    Time stepping in 2D code in dyn2dxy.F90 (2/6)Time stepping in 2D code in dyn2dxy.F90 (2/6)Time stepping in 2D code in dyn2dxy.F90 (2/6)

    Explicit estimates of velocities(the bottom stress is the only one semi-implicit term)

    dyn2d_uvstar

    barotropic tridiagonal linear system along yCoefficients and RHS : dyn2dy_ctymtm2

    Resolving : dyn2dy_tls_solve

    barotropic tridiagonal linear system along xCoefficients and RHS : dyn2dx_tls_coef

    (dyn2dx_cty, dyn2dx_mtm)Resolving : dyn2dx_tls_solve

    Balance between sea surface height and meridional velocity estimates at n+1/2

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    24

    Time stepping in 2D code in dyn2dyx.F90 (3/6)Time stepping in 2D code in dyn2dyx.F90 (3/6)Time stepping in 2D code in dyn2dyx.F90 (3/6)Explicit estimates of velocities

    (the bottom stress is the only one semi-implicit term)dyn2d_uvstar

    barotropic tridiagonal linear system along xCoefficients and RHS : dyn2dx_ctymtm2

    Resolving : dyn2dx_tls_solve

    barotropic tridiagonal linear system along yCoefficients and RHS : dyn2dy_tls_coef

    dyn2dy_cty, dyn2dy_mtmResolving : dyn2dy_tls_solve

    Balance between sea surface height and zonal velocity estimates at n+1/2

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    25

    Time stepping and 3D coupling procedure in dyn3dxy.F90 (4/6)

    Time stepping and 3D coupling procedure in Time stepping and 3D coupling procedure in dyn3dxy.F90 (4/6)dyn3dxy.F90 (4/6)

    Time extrapolation, Gn-1/2 to use old estimate

    Solve the barotropic tridiagonal linear systemdyn2dx_tls_solve

    Solve the tridiagonal linear system along z dyn3dx_ztls_solve

    Solve the barotropic tridiagonal linear systemdyn2dy_tls_solve

    Solve the tridiagonal linear system along z dyn3dy_ztls_solve

    Balance between sea surface height and meridional velocity estimates at n+1/2

    from dyn3dy

    dyn3dx_tls_coefdyn3dx_cty

    dyn3dx_mtm

    dyn3dy_tls_coefdyn3dy_cty

    dyn3dy_mtm

    dyn3d_height_mask

    dyn3d_height_mask3D coupling

    3D coupling

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    26

    Time stepping and 3D coupling procedure in dyn3dyx.F90 (5/6)

    Time stepping and 3D coupling procedure in Time stepping and 3D coupling procedure in dyn3dyx.F90 (5/6)dyn3dyx.F90 (5/6)

    Balance between sea surface height and zonal velocity estimates at n+1

    from dyn3dxTime extrapolation, Gn to use old estimate

    Solve the barotropic tridiagonal linear system dyn2dy_tls_solve

    Solve the tridiagonal linear system along z dyn3dy_ztls_solve

    Solve the barotropic tridiagonal linear systemdyn2dx_tls_solve

    Solve the tridiagonal linear system along z dyn3dx_ztls_solve

    dyn3dy_tls_coefdyn3dy_cty

    dyn3dy_mtm

    dyn3dx_tls_coefdyn3dx_cty

    dyn3dx_tls_coefdyn3dx_mtm

    dyn3d_height_mask

    dyn3d_height_mask

    3D coupling

    3D coupling

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    27

    Time stepping and 3D coupling procedure (6/6)Time stepping and 3D coupling procedure (6/6)Time stepping and 3D coupling procedure (6/6)

    The Gu/v is the Right Hand Side of the tridiagonal linear system that corresponds to the explicit part of the scheme. It is estimated in dyn3dx/y_tls_coef.F90. The other coefficients relative to the implicit part of the momentum and continuity equations are also estimated in the same routine : in dyn3dx/y_tls_coef-dyn3dx/y_mtm.h and dyn3dx/y_tls_coef- dyn3dx_cty.h respectively.

    Remove the barotropic part of Coriolis term at time n,add barotropic part of Coriolis term at time n+1/2

    internal pressure gradient

    wind and pressure forcing

    non-linear advection

    viscosity

    bottom stress

    Rk : n,(*) depending on the step of the estimate

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    28

    The time step remains limited due to non-linear stability reasons,but evolves during the simulation according to the hydrological situation.

    Typically, time step is larger during neap tides and lower during spring tides.

    The algorithm is :1. CFLref = 02. At t, estimation of CFLmax at the surface,3. If CFLmax < CFLcrit , the process goes to 64. Else new estimate of dt in order to get CFLmax = 0.55. If dt < 3 s, the runs is stopped6. CFLref = max (CFLmax , CFLref )7. If t < tref + tobs , the process starts procedure again from step 28. If t > tref + tobs & CFLref < 0.84 CFLcrit , dt = min(1.2 dt,dtmax ), the procedure

    restarts at step 1

    The time step is reduced as soon as the CFL criterion is not satisfied.It is increased after a period (tobs) during which the CFL criterion is satisfied. The

    time step is limited by dtmax and dtmin

    Adaptative time stepAdaptative time stepAdaptative time step

    max 0.7crit critu tC C avec C

    = ≤ =Δ

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    29

    Numerical schemesNumerical schemesNumerical schemes

    ( ) A A AL A u v wx y σ

    ∂ ∂ ∂= + +

    ∂ ∂ ∂å

    Arakawa C grid (horizontal and vertical)Finite differences2nd order spatial centered schemes

    Advection : centered et QUICKUpstream, QUICK + limiter for tracers

    Internal pressure gradient : - along sigma (density jacobian)- density jacobian using cubic spline interpolation(Shchepetkin & McWilliams, 2003)

    2

    1 1[ ] [ ( ) ]

    1 1[ ( ) ] [ ]( )

    x x x

    xx

    u H D uF DD x x D x x x

    H D u uH DD x x x D D x x

    ν ν σσ

    νν σ σ

    σ σ σ

    ∂ ∂ ∂ ∂ ∂ ∂= + − +

    ∂ ∂ ∂ ∂ ∂ ∂∂ ∂ ∂ ∂ ∂ ∂∂ ∂− + −

    ∂ ∂ ∂ ∂ ∂ ∂∂ ∂( ) ( )x x y y

    u vF Fx x y y

    ν ν∂ ∂ ∂ ∂= =∂ ∂ ∂ ∂

    ,x yν ν Cst, Smagorinsky, 1963

    Mellor, 1985 (momentum only)

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    30

    Modules and functionalitiesModules and functionalitiesModules and functionalitiesReturn to Summary

    TEST CASES : TEST CASES : Gravity ajustment, seamount, Wetting-drying, channel (tide+river dischage), Unsalty bubble, evaporation / rain, Kelvin wave,ProfileInstable barotropic jetBarotropic vortexBaroclinic vortexAdvection of spot of tracersconservation of constants in a non-divergent velocity fieldDeformation of a shape in a non-divergent velocity field

    PARALLELISATION openMPPARALLELISATION openMP / MPI/ MPIFUNCTIONALITESFUNCTIONALITES

    DiagnosticsTracking pointsPassive substancesbalance, stocks and fluxes calculations

    MODULESMODULESTrajectoriesAGRIF packageSedimentology (sand+mud)BiologyContaminant

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    31

    ReferencesReferencesReferences

    Blumberg AF, Mellor GL. A description of a three dimensional coastal ocean circulation model. In: Three dimensional Coastal Ocean Models. Heaps NS editor, Coastal and Estuarine science, AGU, Washington DC 1987 ; 4 : 1-16.Lazure P., Dumas F. An external-internal mode coupling for a 3D hydrodynamical model for applications at regional scale (MARS). Advances in Water Resources 2008 (31) 233-250.Leendertse JJ. A water quality simulation model for well-mixed estuaries and coastal seas. Principles of computations. The rand corporation, RM-6320-RC/1, 1970.Mellor GL. An equation of state for numerical models of ocean and estuaries. Journal of Atmospheric and Oceanic Technology 1991 ; 8 : 609-611.Peaceman DW, Rachford H. The numerical solution of parabolic and elliptic differential equations. J. Soc. Ind. Appl. Math. 1995 ; 3 : 28-41Schwiderski EW. Ocean Tides, Part II : A hydrodynamical interpolation model. Mar. Geodes. 1980 ; 3 : 219-255.

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    32

    Numerical discretizationNumerical discretizationNumerical discretization

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    33

    MARS variables (1/2)MARS variables (1/2)MARS variables (1/2)

    Metricsimin=0 (toujours) : index of the first columnjmin=0 (toujours) : index of the first rowimax : index of the last columnjmax : index of the last rowkmax : number of layers

    K=1 bottom layerK=kmax surface layer

    Bathymetric variablesh0(imin:imax,jmin:jmax)hx(imin:imax,jmin:jmax)hy(imin:imax,jmin:jmax)

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    34

    MARS variables (2/2)MARS variables (2/2)MARS variables (2/2)Return to Summary

    State variablesssh(imin:imax,jmin:jmax) : sea surface height

    u(imin:imax,jmin:jmax) : barotropic zonal velocity (from row calculation at t+dt/2)

    uz(kmax,imin:imax,jmin:jmax) : 3D zonal velocity (from row calculation at t+dt/2)

    v : barotropic zonal velocity (from column calculation at t+dt/2)

    vz(kmax,imin:imax,jmin:jmax) : 3D meridional velocity (from columncalculation at t+dt/2)

    sal(kmax,imin:imax,jmin:jmax) : salinity

    temp(kmax,imin:imax,jmin:jmax) : temperature

    cv_wat (nb_var,kmax,imin:imax,jmin:jmax) : substance

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    35

    MARS grid (1/2)MARS grid (1/2)MARS grid (1/2)Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    36

    Spatial discretization (2/2)Spatial discretization (2/2)Spatial discretization (2/2)Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    37

    Open boundariesOpen boundariesOpen boundariesReturn to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    38

    Parametrization of the bathymetry (1/4)Parametrization of the bathymetry (1/4)Parametrization of the bathymetry (1/4)Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    39

    Parametrization of the bathymetry (2/4)Parametrization of the bathymetry (2/4)Parametrization of the bathymetry (2/4)Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    40

    Parametrization of the bathymetry (3/4)Parametrization of the bathymetry (3/4)Parametrization of the bathymetry (3/4)Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    41

    Parametrization of the bathymetry (4/4)Parametrization of the bathymetry (4/4)Parametrization of the bathymetry (4/4)

    dhj

    Return to Summary Return to CPP keys

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    42

    Turbulence models

    0 equations : turb_nbeq=0

    turb_0eq_option=1 cst

    turb_0eq_option=2 Prandt model

    turb_0eq_option=3 Quetin model

    turb_0eq_option=4 Pacanovski et Philander, 1981

    1 equation : Gaspard et al, 1990

    turb_nbeq=1

    ( )1nz uD

    σ

    ∂∂

    ∂∂

    2 2; ( ) ;u unz l kz f Ri l l analyticalz z

    ∂ ∂= =

    ∂ ∂

    0 ;(1 ) (1 )b bn

    v vnz kz kRi Ri

    να α

    = + = ++ +

    ,nz kz

    , ( , ) ; ;nz kz f ect l ect computed l evaluated=

    0* /15 (1 ) ; * 0.4 / log( / ) bottomnz u H u H z uσ σ σ= − =

    2

    /b URiz z

    ∂ ∂=

    ∂ ∂

    Parametrization of vertical mixing (1/2)Parametrization of vertical mixing (1/2)Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    43

    ( )1nz uD

    σ

    ∂∂

    ∂∂

    ,nz kz

    Parametrization of vertical mixing (2/2)Parametrization of vertical mixing (2/2)

    Turbulence models

    2 equations : turb_nbeq=2

    turb_2eq_option=1 k-kl model

    turb_2eq_option=2 k-epsilon model

    turb_2eq_option=3 k-omega

    turb_2eq_option=4 generic length scale model

    , ( , , ) ; ;nz kz f k kl l k et kl computed l evaluated=

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    44

    Parametrization of the run periodParametrization of the run periodParametrization of the run periodReturn to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    45

    Structure of the code (1/11)Structure of the code (1/11)Structure of the code (1/11)

    Main.F90

    Step.F90

    step3dxy.F90 (computation along the row)following by

    step3dyx.F90 (computation along the column)

    Allocation of variables and initialization

    Forcings + open boundary conditions, Surface boundary conditions…

    Hydrodynamics+

    Tracers

    Parameters.F90 Parametrization of the configurationimax,jmax,kmax

    nrac,no

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    46

    Structure of the code : main.F90 (2/11) Structure of the code : Structure of the code : main.F90main.F90 (2/11) (2/11) call init ! Read namelist paramain.txt, paracom.txt, paraspec.txt,…

    ! Initialize a few variables and do some tests on cpp keys…

    call bathy ! Read (and modify) the bathymetry

    call grid_metric ! Initialize the grid

    call sub_read_var ! Read variables.dat file describing substances! Allocate substance variables ! Make variables in order

    call obc_subsref ! Initialize open boundary arrays for substance

    call sed_alloc ! Allocate sediment variablesif (l_repsed) then

    call sed_init_fromfile ! from fileelse

    call sed_init ! Variable.datendif

    call sed_settlveloc_ini ! Initialize the settling velocityIf(l_morphocoupl) ! Initalize for morphology

    call sed_morphoninit

    call sub_read_vardiag ! Read vardiag.dat file describing diagnoses! Allocate diagnoses variables (only for module biology )

    Return to structure codeReturn to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    47

    Structure of the code : main.F90 (3/11) Structure of the code : Structure of the code : main.F90main.F90 (3/11) (3/11) call init_xe(ssh) ! Initialize the sea surface heightCall init_height(ssh) ! Initialize heigt variables for vertical integrationcall init_uvz(uz,vz) ! Initialize the 3d velocitiescall init_uv(u,v,uz,vz) ! Initialize the barotropic velocitiescall init_viscoef ! Initialize viscosity coefficientscall init_turbcoef(ect,psi) ! Initialize some turbulent coefficientscall init_tssub(sal,temp,cv_wat) ! Initialize sal, temp, cv_watcall obc_tsref ! set T and S open boundary condition to reference valuesif (l_initfromfile)

    call init_fromfile ! Initialize ssh,uz,vz,u,v,sal,temp from a file

    call biolo_userinit(cv_wat) ! Special initialiszarion of biological variablescall conta_read_react ! Reading reactions between contaminant variablescall user_init_vdriv ! Initalization of driving variables

    call output_init ! Read output.dat file and initialize output parameters

    call sub_budget_readdomain(ssh) ! If (_bilan) initialize zones for budgets and fluxes computations

    call summary ! Summarize initialization part

    call meteo ! Set meteorological fluxes if l_meteo_stat=T,l_meteo_hom=Tcall river(ssh) ! Read river.dat , init….

    call outflow ! Read outflow.dat file, describing outflows! initialize outflow inputs with time interpolation

    Return to structure codeReturn to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    48

    Structure of the code : main.F90 (4/11)Structure of the code : Structure of the code : main.F90main.F90 (4/11)(4/11)

    call sub_flx_read ! If temporal variations in cv_rain or in atm.fluxes

    if(icon >=1)call ts_stateeq_*(sal,temp,bz) ! Estimate buoyancy from sal and temp

    if(l_points) ! Initialize variables for trakingcall track_points(u,v,uz,vz,ssh,sal,temp,cv_wat,....)

    if(l_diag) ! Initialize d iagnoses variablescall diagnostic(u,v,uz,vz,ssh,sal,temp,cv_wat,ect,bz)

    call output_mng ! manage outputs files

    if(l_demer(nb)) ! Initialize demerliac filteringcall out_demerliac(ssh,u,uz,v,vz,sal,temp,cv_wat,....)

    call traj_init2d or traj_init3d ! Initialize the trajectory partcall ibm_init ! Initalize IBM

    Return to structure codeReturn to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    49

    Structure of the code : main.F90 (5/11)Structure of the code : Structure of the code : main.F90main.F90 (5/11)(5/11)

    do while(t

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    50

    Structure of the code : step.F90 (6/11)Structure of the code : Structure of the code : step.F90step.F90 (6/11)(6/11)

    mod(nbouc,2)==0 odd nboucif(l_saverestart_1file.or.l_saverestart_bydate) ! Save restart file

    call out_saverestart(…)call sed_outsaverestart

    t=t+0.5 dt ; nbouc=nbouc+1 ! increment the time

    if(l_genpot) call tide_astroarg ! Tide potentialif(l_genpot) call tide_genpot

    call meteo ! Fluxes at t ! if l_meteo_stat or l_meteo_hom

    if(.not.l_meteo_stat .and. .not.l_meteo_hom) call sflx_read ! Fluxes at t

    call sflx_flux(temp) ! Exchanges at the air-sea interface

    if(nbfl > 0) call river ! Input of river discharge at t

    call sub_sflx_read ! Interpolation date for cvrain and flxatmcall user_ftime_vdriv ! Define driving variable at tcall user_vintermediate ! Computing intermediate variables

    call dyn3d_dt(uz,vz) ! CFL criterion,! increase or decrease time step

    Return to structure codeReturn to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    51

    Structure of the code : step.F90 (7/11)Structure of the code : Structure of the code : step.F90step.F90 (7/11)(7/11)

    If (t .ge. tdebsubs) then ! Module sedimentologycall sed_skinstresscall sed_erosioncall sed_settlveloc ! Estimate of settling velocityif (isand >= 1) call sed_sandconcextrapcall sed_depflx

    endif

    call conta_reac_after (cv_wat,sal,temp,ssh) !reactions at equilibrium (contaminant)

    ! First half time-step (mod(nbouc,2)==1)

    call step3d(2d)xy ! Estimate ssh,u,uz,v,vz,sal,temp! u,uz are intermediate estimate in 3d

    If (l_diag) call diagnostic(u,v,uz,vz,ssh,sal,temp,cv_wat,ect,bz)

    If (t .ge. tdebsubs) call sed_effdep(ssh) ! module sedimentologycall sed_consol_diffu

    call sub_budget_out ! Budget output

    If (l_points)call track_points(u,v,uz,vz,ssh,sal,temp,cv_wat,ect,bz)

    Return to structure codeReturn to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    52

    Structure of the code : step.F90 (8/11)Structure of the code : Structure of the code : step.F90step.F90 (8/11)(8/11)

    ! Second half time-step (mod(nbouc,2)==2)

    call step3d(2d)yx ! Estimate ssh,u,uz,v,vz,sal,temp! v,vz are intermediate estimate in 3d

    If (l_diag) call diagnostic(u,v,uz,vz,ssh,sal,temp,cv_wat,ect,bz)

    If (t .ge. tdebsubs) then ! module sedimentologycall sed_effdep(ssh) call sed_consol_diffuif (l_morphocoupl) call sed_morpho

    Endif

    if (l_bilan) call sub_budget_out(t,cv_wat,cv_sed,ssh)

    If (l_points) call track_points(u,v,uz,vz,ssh,sal,temp,cv_wat,ect,bz)

    call output_mng ! manage outputs files, save data output if required! Estimate of maximum velocities

    Return to structure codeReturn to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    53

    Structure of the code : step3dxy.F90 (9/11)Structure of the code : Structure of the code : step3dxy.F90step3dxy.F90 (9/11)(9/11)! Initialize xeuv, uv and uv2

    ! Open Boundariescall tide_harmcompo or obc_2D_rank… ! Prescribe ssh at open boundariesor obc2d_cas(xeuv) (! if test case)If (l_obc_ogcm) call obc_ogcm ! Read ogcm open boundary conditions

    call obc_subs ! Obc for substances

    call obc_combine(xeuv) ! Combine tide and ocgm open boundary fieldscall obc_apply_ssh(xeuv) ! Apply ssh at the open boundaries

    ! Dynamiccall dyn3dxy(u,v,ssh,uv,uv2,xeuv,uz,vz,bz) ! Estimate new xeuv,uv,uvz at t+dt/2

    call dyn3d_wz(ssh,xeuv,uz,vz) ! Estimate vertical velocity wz

    call init_flux ! Initalize phicon and phieau

    ! module Biologyif (t .ge. tdebsubs) ! Computation of inter-cell influencescall biolo_dyn_zwat(ssh,cv_wat,sal,temp) (extinction coefficient…)call radz_reduce ! module Contaminant

    ! module Tracerif(nbrej > 0) call outflow ! Prescribe discharges at t+dt/2

    Return to structure codeReturn to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    54

    Structure of the code : step3dxy.F90 (10/11)Structure of the code : Structure of the code : step3dxy.F90step3dxy.F90 (10/11)(10/11)if(t .ge. tdeqsubs) thenCALL biolo_sksc_wat(cv_wat,sal,temp,ssh) ! module BiologyCALL biolo_sksc_sed ! Transformations inside cell of water and sediment

    ! ! Estimate new concentrations in sediment cv_sed(1:nv_state,:,:,:)

    CALL conta_sksc_wat(cv_wat,sal,temp,ssh) ! module Contaminantendif

    call sflx_surf(temp,sal,ssh) ! Estimates atmospherical fluxes, ! temperature and salinity fluxes

    transport equation resolution -call tssub_eq(xeadv,ssh,sal,temp,cv_wat) ! Dissolved Tracers estimate –

    If(l_bilan .and.t > tdebsubs) ! Cumulating dissolved substances fluxes for budgetcall sub_budget_flxcum(cv_wat,ssh)

    Do l=1,nb_ws_max ! Particulate Tracers estimatecall parsub_eq(…) ! By group of substances (same settling velocity)

    Enddo

    ! Apply boundaries limits conditionscall ts_obc3d_apply(uz,vz,sal,temp) ! Apply obc for T and Scall sub_obc3d_apply(uz,vz,cv_wat) ! Apply obc for cv_wat (dissolved)

    Return to Summary Return to structure code

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    55

    Structure of the code : step3dyx.F90Structure of the code : Structure of the code : step3dyx.F90step3dyx.F90

    As step3dxy

    Return to Summary Return to structure code

    Structure of the code : step3dxy.F90 (11/11)Structure of the code : Structure of the code : step3dxy.F90step3dxy.F90 (11/11)(11/11)call ts_stateeq_* ! Buoyancy from state eqcall turb* ! Estimate mixing coeficients

    call traj_3d (ssh,uz,vz) ! Module trajectories (3D)call ibm_3d (ssh,uz,vz,sal,temp,cv_wat,boz) ! Module IBM

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    56

    How to set up a new configuration ?How to set up a new configuration ?How to set up a new configuration ?Return to Summary

    cd $UDIR/CONF/CONFcd $UDIR/CONF/CONF--CASE CASE (see also envt_manual.ppt)1.Create the configuration’s directories (mkconfdir) 2.Set up the code (gmake install)3.Define the grid size (getfile WORK/parameters.F90[rank*])

    INC/parameters.F90[_rank*]define imin=0, jmin=0,imax=,jmax=,kmax=,no=,nrac= (same as configuration

    name usually)4.compile

    cd $RDIR/CONF/inputscd $RDIR/CONF/inputs1.Head.CONF (keep exactly the same format ! )2.Bathymetric files (hxhy or netcdf files (file_bathy=); nmoy (file_bathy_meanlev=))3.Tide files (l_tide_harmcompo=T)4.Atmospherical file (l_file_meteo=) or academic tests (l_meteo_stat=T, l_meteo_hom=T, wind_veloc= ; l_sflx_solarcst=T, sflx_solarcst=)

    cd $RDIR/CONF/CONFcd $RDIR/CONF/CONF--CASECASE1.Set your parametrization up2.run

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    57

    realistic configurations : rank management (1/3)

    (see also envt_manual.ppt)

    realistic configurationsrealistic configurations : rank management : rank management (1/3)(1/3)

    (see also envt_manual.ppt)Compilation of each rankCompilation of each rank

    cd $UDIR/CONF/CONF-CASEvi makefile, RANK = 0gmake clean ; gmakevi makefile, RANK = 1gmake clean ; gmake***

    Parametrization of namelistsParametrization of namelistscd $RDIR/CONF/CONF-CASEparacom.txt and paramain.txt are the same whatever the rankparaspect.txt changes for each rank

    date_startshift (if negative, date_startshift decreases as the number of the rank increases)

    l_tide_harmcompo=.true. Only for rank 0l_bathy_meanlev=.true. Except for the rank 0 (because taken into

    account in the bathymetry file)

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    58

    realistic configurations : rank management (2/3)

    realistic configurationsrealistic configurations : rank management : rank management (2/3)(2/3)

    Example of differences between two paraspec.txt : one for rank 0Example of differences between two paraspec.txt : one for rank 0, the , the other one for rank 1other one for rank 1

    Rang 0Rang 0date_startshift=5file_bathy='../../inputs/hxhy. bzhk0'l_bathy_meanlev=.false.file_bathy_meanlev='../../inputs/nmoy. bzhk0'dtini=400.d0dtmax=1000.d0l_tide_harmcompo=.true.

    Rang 1Rang 1date_startshift=4file_bathy='../../inputs/hxhy.bzhk1'l_bathy_meanlev=.true.file_bathy_meanlev='../../inputs/nmoy.bzhk1'dtini=200.d0dtmax=400.d0l_tide_harmcompo=.false.

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    59

    realistic configurations : paraspec.txt : open boundary management

    (3/3)

    realistic configurationsrealistic configurations : : paraspec.txt : open boundary managementparaspec.txt : open boundary management

    (3/3)(3/3)

    Return to Summary

    Look at your domain, and specify where are the open boundariesLook at your domain, and specify where are the open boundariesl_obc_east=.true./.false. (if open/closed boundary)l_obc_west=….

    Specify the file containing the obc fields issued from an ogcm and extract executablefile_obc_n='../../inputs/obc_north.nc‘file_obc_e=…

    Which ogcm variables do you want to read and use at open boundaries ? Specify :l_obc_ogcm_rssh=.false. ! Read the sea surface heightl_obc_ogcm_rs=.false. ! Read the salinityl_obc_ogcm_rt=.false. ! Read the temperaturel_obc_ogcm_ruv=.false. ! Read the barotropic velocitiesl_obc_ogcm_ruvz=.false. ! Read the 3d velocities

    To relax the salinity and temperature towards the ogcm values over a bandwidth specified by obc_widl_obc_ogcm_relax=.true.obc_coef_relax=0.7e-06 (time relaxation in s-1)dtmax=1000.d0l_tide_harmcompo=.true.

    What kind of physics do you want to introduce through the open boundaries ?l_obc_ogcm=.true. ! If nested with an ogcml_obc_tide=.true. ! If tide and nested with a previous rank

    Which operator do you want to use ? Choose one of the following itemsl_obc_diri=.false. ! Dirichletl_obc_mars ! Zero gradient of velocitiesl_obc_char ! Characteristics method

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    60

    Namelist variablesNamelist variablesNamelist variables

    presented grouped by themes

    List of parameters read in namelist is available in a separate doc (list_param_namelist.doc) (available later)

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    61

    Namelist variables grouped by themesNamelist variables grouped by themesNamelist variables grouped by themes

    ADVECTION OF TRACERSAMOSPHERIC FIELDSBATHYMETRIEDATEDIAGNOSTICSDIFFUSIONECOSYSTEMGENERALEQUATION OF MOVEMENTNETCDF REFERENCEOFFLINEOPEN BOUNDARYOUTPUTRADIATIVE HEAT FLUXRESTART

    RIVER, OUTFLOWSAVINGSIGMASTATE EQUATIONTHERMODYNAMICSTIDETIME INTERPOLATIONTIME STEPSTRAJECTORIESTURBULENCE / VERTICAL MIXINGVISCOSITYWIND FIELD

    Open Boundaries examples

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    62

    namelist variables 1st configuration

    namelist variablesnamelist variables 1st configuration1st configuration

    DATESDATES

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    nmlmain (M) date_ref = '01-Jan-1900 00:00:00‘ Do not change

    namdate (C) date_start = '06/03/2005 00:00:00'datefin = '09/03/2005 00:00:00'

    simulation starting datesimulation fisnishing date

    namdate3d (S) date_start3d = '03/02/2001 12:00:00‘

    date_startagrif = '25/01/1998 11:12:00'date_startshift = 0.0

    3D run starting date (== or > date_start)AGRIF zoom starting dateRank management

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    63

    namelist variables 1st configuration

    namelist variablesnamelist variables 1st configuration1st configuration

    GENERALGENERAL

    namelistsnamelists variablesvariables cpp cpp keykey

    observationobservation

    nmlmain (M) comdir = '../‘

    jhemisph=1

    ./ without rank

    ../ if ranks1/-1 in North/South hemisphere

    namhead (C) file_head = '../../inputs/head.cool‘confname_mother = 'cool'confname = 'cool‘suffix = ‘V9.06’

    namriv (S) icon = 2 /=2 to make tests on buoyancy impact 3D

    namparanum (S) l_modele2d=.true.cflcrt=0.6

    If set to .true., 2D run even though kmax>1

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    64

    namelist variables 1st configuration

    namelist variablesnamelist variables 1st configuration1st configuration

    SIGMASIGMA

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    namsigma (S) l_equisig=.true.sig(1)= 0.05hc = 5.0 (meters)B_sigTheta_sigL_grid_anglel_corio_cst=.false.

    0 < Bottom control < 10 < Surface control < 20key_grid_rotated

    3D3DGeneralized sigmaGeneralized sigmaGeneralized sigma

    TIME STEPSTIME STEPS

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    namparanum (S) dtini=400.d0dtmin=200.d0dtmax=800.d0

    dtmin

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    65

    namelist variables 1st configuration

    namelist variablesnamelist variables 1st configuration1st configuration

    BATHYMETRYBATHYMETRYnamelistsnamelists VariablesVariables cpp keycpp key observationobservationnambathy (S) file_bathy='../../inputs/hxhy.cool0'

    file_bathy_meanlev='../../inputs/nmoy.cool0'name_bathy_hx_b='HX‘,name_bathy_hy_b, name_bathy_h0_bl_bathy_meanlev=.false.name_bathy_meanlev='nmoy‘mslshift=0.0bathy_nbsmooth=0l_bathy_comb=.false.l_bathy_pit=.false.hminim=-9.9hrdef=20.0h0fond=0.01dhj=0.05hminfrot=0.5hminkxky=0.5l_smalldepth=.true.hm=1.0l_bathy_save=.false.

    key_netcdfKey_netcdf

    should not be changedshould not be changed

    Return to SummaryReturn to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    66

    namelist variables 1st configuration

    namelist variablesnamelist variables 1st configuration1st configuration

    RESTARTRESTART

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    nmlreprise (M) name_in_dt = 'DT'name_in_xe = 'XE‘…

    mamreprise (S) l_initfromfile = .false.file_init = 'save.nc‘l_init_restart=.false.l_init_rtime=.false.l_init_rdt=.false.l_init_rssh=.false.l_init_rbtvel=.false.l_init_r3dvel=.false.l_init_rwz=.falsel_init_rturb=.false.l_init_rsal=.false.l_init_rtemp=.false.

    Set all the boolean to .true. to get exact results when restarting from a restart file after a break in the simulation.

    To read an input file prepared from extract program, specify which variables you want to read and define l_init_restart=.false.

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to SummaryReturn to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    67

    namelist variables 1st configuration

    namelist variablesnamelist variables 1st configuration1st configuration

    OUPUTOUPUT

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    nmlsortie (M) l_maxu=.true.name_out_h0='h0‘…riog_valid_min/max

    Maximum velocities are printed on the screen (iscreen=6) or in the listing file (iscreen=12)Range of valid value for the variable

    namsortie (S) file_output= './output.dat'iscreen=12iscreenlog=18iwarnlog=16ierrorlog=17

    l_out_nc4par

    l_out_pack

    -Dkey_MPI_2D

    Get it emptyThe simulation is stopped if an error occurs. The error si described in file error_suffix.logTrue : each cpu writes its local domain in a unique global fileTrue : the data values are packed, i.e. saved in short precision Packed_value = NINT( (value- offset)/scale_factor)

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    68

    namelist variables 1st configuration

    namelist variablesnamelist variables 1st configuration1st configuration

    SAVINGSAVING

    namelistsnamelists variablesvariables cpp keycpp key observationobservationnamsauv (S) l_saverestart_1file = .false.

    l_saverestart_bydate = .false.file_saverestart= 'save.nc'saverestart_step = 1.0d0

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    69

    namelist variables : 1st configurationnamelist variablesnamelist variables : 1st configuration: 1st configurationOPEN BOUNDARY CONDITIONSOPEN BOUNDARY CONDITIONS

    namelistsnamelists variablesvariables cpp keycpp key observationobservationnamobc (S) l_obc_ogcm_rssh=.false.

    l_obc_ogcm_rt=.false.l_obc_ogcm_rs=.false.l_obc_ogcm_rc=.false.l_obc_ogcm_ruv=.false.l_obc_ogcm_ruvz=.false.l_obc_cyc=.true.l_obc_cycl_x/y=.false.l_obc_mars=.true.l_obc_char=.true.l_obc_diri=.true.l_obc_tide=.true.L_obc_ogcm.true.l_tide_harmcompo=.true.l_obc2drank_save=.true.l_obc_south=.false.file_obc_s='./‘ …l_obc_relax=.false.obc_coefrel=0.7e-05

    key_tide_fes2004 or…

    Reading of data issued from another MARS configuration or another model. Data are spatially interpolated off-line with the use of the program named extract. Data are interpolated on time during the runl_obc_rssh=.true., the ssh relative to the mean circulation comes from a coarser modelIf periodiczonal/meridional periodicityNo gradient of velocity at open boundaryCharacteristics methodDirichletOBCs come from a previous rankOBCs come from an OGCM

    Saving of open boundary condition (rank)

    Return to Summary Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e rnamelist variables : 1st configuration

    OBC 2D – BISC rang 0 namelist variablesnamelist variables : 1st configuration: 1st configuration

    OBC 2D OBC 2D –– BISC rang 0BISC rang 0

    Type of dynamics

    Where Type of forcing Variable Operator

    Tide dynamics

    l_obc_north=.true.l_obc_west=.true.

    -Dkey_fes2004l_obc_tide=.true.

    l_tide_harmcompo=.true.Nothing l_obc_mars=.true.

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e rnamelist variables : 1st configuration

    OBC 3D – BISC rank 1 Dirichlet – Characteristics

    namelist variables : 1st configuration namelist variables : 1st configuration OBC 3D OBC 3D –– BISC rank 1BISC rank 1

    Dirichlet Dirichlet –– CharacteristicsCharacteristicsType of

    dynamicsWhere Type of forcing Variable Operator

    Tide dynamics l_obc_north=.true.

    l_obc_west=.true.+

    Path file_obc_ogcm_nfile_obc_ogcm_w

    l_obc_tide=.true.AND

    l_obc_ogcm=.true.

    l_obc_ogcm_rt=.true. l_obc_ogcm_rs=.true.

    l_obc_diri=.true.

    OR

    l_obc_char=.true.

    OGCM dynamics

    l_obc_ogcm=.true.l_obc_ogcm_rssh=.true.l_obc_ogcm_ruv=.true. l_obc_ogcm_ruvz=.true.

    l_obc_ogcm_rt=.true. l_obc_ogcm_rs=.true.

    Tide dynamics

    +OGCM

    dynamics

    l_obc_tide=.true.AND

    l_obc_ogcm=.true.

    Return to Summary Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e rnamelist variables : 1st configuration

    OBC 3D – BISC rank 1 old MARS operator

    namelist variables : 1st configuration namelist variables : 1st configuration OBC 3D OBC 3D –– BISC rank 1BISC rank 1

    old MARS operatorold MARS operator

    Type of dynamic

    Where Type of forcing Variable Operator

    Tide dynamics l_obc_north=.true.

    l_obc_west=.true.+

    Path file_obc_ogcm_nfile_obc_ogcm_w

    l_obc_tide=.true.AND

    l_obc_ogcm=.true.

    l_obc_ogcm_rt=.true. l_obc_ogcm_rs=.true.

    l_obc_mars=.true.OGCM

    dynamics l_obc_ogcm=.true.l_obc_ogcm_rssh=.true.

    l_obc_ogcm_rt=.true. l_obc_ogcm_rs=.true.

    Tide dynamics

    +OGCM

    dynamics

    l_obc_tide=.true.AND

    l_obc_ogcm=.true.

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    73

    namelist variablesnamelist variablesnamelist variables

    RIVERS, OUTFLOWS,TRAJECTORIES and OTHER FUNCTIONALITIESRIVERS, OUTFLOWS,TRAJECTORIES and OTHER FUNCTIONALITIES……

    namelists variablesvariables cpp keycpp key observationobservation

    namriv (S) file_river = '../../inputs/.dat' Define river discharges

    namtraj (S) file_trajec='tache.dat' Define the number and type of trajectories

    namdiag (S) l_diag=.false.date_startdiag = '01/01/1996 00:00:00'date_enddiag = '02/01/2001 18:00:01'file_diag='diag.gdg51'l_points=.false.file_point='points.dat'

    namecosys (E) file_outflow = '../../inputs/outflow.dat‘filevardiag

    key_substance Define outflowsDefine diagnoses variables

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt(E) : the variable is inside parasubs.txt

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    74

    namelist variablesnamelist variablesnamelist variables

    TIME INTERPOLATIONTIME INTERPOLATION

    namelistsnamelists variablesvariables cpp keycpp key observationobservationnmlinterp (M) perchrono=0.1

    Tobs=12.0 (hours)l_champroche=.false.

    Used if reading of one data.dat filedo not use

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt(E) : the variable is inside parasubs.txt

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    75

    namelist variablesnamelist variablesnamelist variables

    TIDETIDE

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    nammaree (C)

    l_tide_M2harm=.false.

    l_tide_M2statcoef=.T.,tide_M2coef=0.0

    file_tide_M2coef='bidon.dat‘

    file_tide_harmcp='../../inputs/fes2004.nc‘file_tide_harmcp='../../inputs/schwiderski.nc’

    l_tide_admittance=.false.datepm='02/02/2003 14:11:00'l_genpot=.false.

    key_tide_fes2004key_tide_schwid

    key_tide_fes2004key_tide_schwid

    effective if l_tide_M2harm=.true.

    effective if l_tide_M2harm=.T. + l_tide_M2statcoef=.F.

    On progressOn progress

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    76

    namelist variablesnamelist variablesnamelist variablesATMOSPHERICAL FIELDSATMOSPHERICAL FIELDS

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    nammeteo (S) imeteo_dragtype=0, cds = 0.0016

    imeteo_exchtype=0

    paref=101500.0l_sflx_rpa=.false.…name_sflx_sat=‘sat‘…

    type of surface drag coefficient0 -> constant value (= cds) if imeteo_exchtype=01 -> large and pond (1981)2 -> smith and banke (1975)3 -> geernaert et al. (1986)4 -> charnock's relation (1955)

    dependency on air-sea temperature difference for surf drag coefficient and thermal exchange coefficient= 0 -> no dependence on tdif= 1 -> as function of tdif

    imeteo_dragtype and imeteo_exchtype not used if l_meteo_hom=T or l_meteo_stat=T

    Return to Summary Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    77

    namelist variablesnamelist variablesnamelist variables

    WIND FIELDWIND FIELD

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    nammeteoc (C) l_meteo_stat = .true.l_meteo_hom = .true.wind_veloc = 0.0Wind_dir = 275.0file_meteo = 'bidon.dat'

    To use constant wind field or to read a file .dat

    RADIATIVE HEAT FLUX RADIATIVE HEAT FLUX

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    namthermo (S) l_sflx_radlossbot=.false.l_sflx_solarcst=.true.sflx_solarcst=0.0

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    78

    namelist variablesnamelist variablesnamelist variables

    STATE EQUATIONSTATE EQUATION

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    nmlthermo (M) rhoref=1027.34saliref=35.5tetaref=10.0l_stateeq_lin=.true.saliref_lin=35.5tetaref_lin=10.0

    3D3D3D

    THERMODYNAMICSTHERMODYNAMICSnamelistsnamelists variablesvariables cpp keycpp key observationobservation

    nmlthermo (M) rhoair=1.25chp=3986.0coext=0.1

    namthermo (S) l_sflx_rrad=.false.l_sflx_rir=.false.…

    If .false. : computation of incident SW fluxIf .false. : computation of infra-red flux

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    79

    namelist variablesnamelist variablesnamelist variables

    EQUATION OF MOVEMENTEQUATION OF MOVEMENT

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    namfrot (S) l_incbotstress=.true.botstressmax=3.0

    On progress2D

    ADVECTION OF TRACERSADVECTION OF TRACERS

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    nmladvtra (M) qmax = 8.0qmax = 8.0qmaxz = 10.0qmaxz = 10.0 3D

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    80

    namelist variablesnamelist variablesnamelist variables

    VISCOSITYVISCOSITY

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    namvisc (S) l_smagor=.false.vismin=0.1vismax=700.0cosmag=0.27fvisc=5.0sponge_nbcell=5vismul=5.0l_spongs=.false.l_spongn=.false.l_sponge=.false.l_spongw=.false.

    3Dvismin, vismax, cosmag used for l_smagor=T

    DIFFUSIONDIFFUSION

    namelistsnamelists variablesvariables cpp keycpp key observationobservationnamdiff (S) kx = 1.0

    ky = 1.0

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    81

    namelist variablesnamelist variablesnamelist variables

    TURBULENCETURBULENCE

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    namturb (S) z0bot=0.0035z0surfhminfrothmaxfrotturb_nbeq =0turb_0eq_option =2turb_2eq_option=2bgdiff=1.0e-6nzinit=1.0e-4kzinit=1.0e-4

    l_stability=.false.

    3D3D2D2D2D3D3Dif turb_nbeq=2 3D3D3D3D

    On progress

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    82

    Turbulence models

    2 equations : turb_nbeq=2

    turb_2eq_option=1 k-kl model

    turb_2eq_option=2 k-epsilon model

    turb_2eq_option=3 k-omega

    turb_2eq_option=4 generic length scale model

    Parametrization of vertical mixingParametrization of vertical mixingParametrization of vertical mixing

    ( )1nz uD

    σ

    ∂∂

    ∂∂

    ,nz kz

    , ( , , ) ; ;nz kz f k kl l k et kl computed l evaluated=

    Return to Summary Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    83

    namelist variablesnamelist variablesnamelist variables

    OFFLINEOFFLINETo simulate trajectories or substance patches without running thTo simulate trajectories or substance patches without running the e

    dynamics (previously saved in flux form) dynamics (previously saved in flux form) namelistsnamelists variablesvariables cpp keycpp key observationobservation

    namoffline (S) l_bz_offline = .true.path_offline = ‘./offline_path/'

    3D

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    84

    namelist variablesnamelist variablesnamelist variables

    NETCDF REFERENCE (OCO 1.2)NETCDF REFERENCE (OCO 1.2)

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    nmlconvention (M)

    riog_valid_min_...=-50.0riog_valid_max_...=5000.0cg_conv_title=CONFcg_conv_....

    The min/max valid limits are used to pack the values (to save them in short type) in the netCDF output file.

    (M) : the variable is inside paramain.txt(C) : the variable is inside paracom.txt(S) : the variable is inside paraspec.txt

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    85

    namelist variables parasubs.txt (1/2) namelist variablesnamelist variables parasubs.txt (1/2)parasubs.txt (1/2)

    ECOSYSTEMECOSYSTEM

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    namecosys file_outflowname_filesubsfilevardiagdate_startsubl_restart_subsl_obc_ogcm_rcfile_obc_subs_s (_n;_w ; _e)l_out_logl_cvrain_readfilel_subflxatm_readfile

    sflx_sub_atm_depth

    key_substance File defining outflowsFile defining substances

    File defining diagnoses variables

    Starting date of computation of ecosystem

    .true. If all substances are read in restart file

    .true. If substance boundary condition is read from open boundary file with name after

    Logarithm format for saving data

    .true. If concentrations in rain are reading in file

    .true. If atm. fluxes are reading in file (

    Rk: read one file per substances only for substances whom deposit (or conc. in rain) is given different to 0 in variable.dat)

    Depth until which the atmospheric flux related to substances is ditributed

    Return to Summary Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    86

    namelist variables parasubs.txt (2/2) namelist variablesnamelist variables parasubs.txt (2/2)parasubs.txt (2/2)

    ECOSYSTEMECOSYSTEM

    namelistsnamelists variablesvariables cpp keycpp key observationobservation

    namecosys l_bilan

    name_bilfil

    dtout_budgetnb_border

    l_driv-cstdt_driv

    key_substance .true. For computation of balance, stocks and fluxes

    File name where zones and borders are defined

    =‘’ if only one budget zone which cover all the domain

    Time step for budgets and fluxes output (hour)

    Number of border (=1 if name_bilfil=‘’)

    .true. If driving variables are constant in time (default)

    Time step for estimation of driving variables (used if l_driv_cst=.false.)

    Return to Summary

    Return to list of namelist variables

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    87

    available cpp keysavailable available cpp keyscpp keys

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    88

    0

    ( )1 1( ) x x

    nz uu Pa DL u fv g Ft x x D

    ζ σπρ σ

    ∂∂∂ ∂ ∂ ∂+ − = − − + + +

    ∂ ∂ ∂ ∂

    available cpp keys (1/11)available cpp keys (1/11)available cpp keys (1/11)

    UNLINEAR TERMSUNLINEAR TERMS

    DescriptionDescription Variables Variables namelistnamelist

    cpp keycpp key ObservationObservation

    centeredcentered defaultdefault

    QUICK --Dkey_dyn_adv_quickDkey_dyn_adv_quick

    QUICKEST --Dkey_dyn_adv_quickest Dkey_dyn_adv_quickest

    nonenone --Dkey_dyn_adv_linear Dkey_dyn_adv_linear

    INTERNAL PRESSURE GRADIENTINTERNAL PRESSURE GRADIENTDescriptionDescription Variables Variables

    namelistnamelistcpp keycpp key ObservationObservation

    Density jacobienDensity jacobien defaultdefault

    Density jacobien + Density jacobien + cubic spline approxcubic spline approx

    --Dkey_dyn_pg_djcsDkey_dyn_pg_djcs Shchepetkin et al. 2004Shchepetkin et al. 2004

    Variable in namelist :(M) : paramain.txt(C) : paracom.txt(S) : paraspec.txt

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    89

    available cpp keys (2/11)available cpp keys available cpp keys (2/11)(2/11)

    TIDETIDE

    DescriptionDescription Variables namelistVariables namelist cpp keycpp key ObservationObservationIslandIsland--Portugal shelf (5km)Portugal shelf (5km)Schwiderski (1980)Schwiderski (1980)

    l_tide_harmcompo=.true.l_tide_harmcompo=.true.(S)(S)

    --Dkey_tide_schwidDkey_tide_schwid defaultdefault

    FES2004 (MOGD)FES2004 (MOGD) l_tide_harmcompo=.true.l_tide_harmcompo=.true. --Dkey_tide _fes2004Dkey_tide _fes2004

    file SHOMfile SHOMChannel Atlantic FrChannel Atlantic Fr

    l_tide_harmcompo=.true.l_tide_harmcompo=.true. --Dkey_tide _shomDkey_tide _shom On progressOn progress

    0

    ( )1 1( ) x x

    nz uu Pa DL u fv g Ft x x D

    ζ σπρ σ

    ∂∂∂ ∂ ∂ ∂+ − = − − + + +

    ∂ ∂ ∂ ∂

    TIDE TIDE -- WETDRYINGWETDRYING

    DescriptionDescription Variables namelistVariables namelist cpp keycpp key ObservationObservationFlux Corrected Transport Flux Corrected Transport to keep positive water to keep positive water depths in wetdepths in wet--drying areadrying area

    --Dkey_dynh_wetdry_fctDkey_dynh_wetdry_fct

    Variable in namelist :(M) : paramain.txt(C) : paracom.txt(S) : paraspec.txt

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    90

    available cpp keys (3/11)available cpp keys available cpp keys (3/11)(3/11)

    OPEN BOUNDARY CONDITIONSOPEN BOUNDARY CONDITIONSDescriptionDescription Variables namelistVariables namelist cpp keycpp key ObservationObservation

    Rank : reading and saving Rank : reading and saving for straight open boundaryfor straight open boundary

    defaultdefault

    Rank : reading with the use Rank : reading with the use of a rotated child gridof a rotated child grid

    --Dkey_grid_rotatedDkey_grid_rotated Longitude and Longitude and latitude read latitude read from the bathy from the bathy filefile

    Rank : saving for straight Rank : saving for straight open boundary but a open boundary but a rotated child gridrotated child grid

    file_bathy_child=‘file.nc’(S)

    --Dkey_tide_saveobcrotatedDkey_tide_saveobcrotated Define Define imin_childimin_child…… variables in variables in parameter.F90parameter.F90

    Direct offline couplingDirect offline coupling Use extract tool Use extract tool to prepare your to prepare your obc fields from obc fields from the OGCM to the OGCM to your MARS your MARS configurationconfiguration

    0

    ( )1 1( ) x x

    nz uu Pa DL u fv g Ft x x D

    ζ σπρ σ

    ∂∂∂ ∂ ∂ ∂+ − = − − + + +

    ∂ ∂ ∂ ∂

    Variable in namelist :(M) : paramain.txt(C) : paracom.txt(S) : paraspec.txt

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    91

    available cpp keys (4/11)available cpp keys available cpp keys (4/11)(4/11)

    VERTICAL DIFFUSION VERTICAL DIFFUSION (nz,kz)(nz,kz)

    DescriptionDescription Variables namelistVariables namelist cpp keycpp key ObservationObservationconstantconstant turb_nbeq=0, turb_0eq_option=1 (S)turb_nbeq=0, turb_0eq_option=1 (S)

    Prandt turb_nbeq=0, turb_0eq_option=2 (S)turb_nbeq=0, turb_0eq_option=2 (S)

    QuetinQuetin turb_nbeq=0, turb_0eq_option=3 (S)turb_nbeq=0, turb_0eq_option=3 (S)

    Pacanovski et Pacanovski et Philander, 1981Philander, 1981

    turb_nbeq=0, turb_0eq_option=4 (S)turb_nbeq=0, turb_0eq_option=4 (S)

    Gaspard et al., 1990Gaspard et al., 1990 turb_nbeq=1 (S)turb_nbeq=1 (S)

    KK--klkl turb_nbeq=2, turb_2eq_option=1 (S)turb_nbeq=2, turb_2eq_option=1 (S)

    KK--epsilonepsilon turb_nbeq=2, turb_2eq_option=2 (S)turb_nbeq=2, turb_2eq_option=2 (S)

    KK--omegaomega turb_nbeq=2, turb_2eq_option=3 (S)turb_nbeq=2, turb_2eq_option=3 (S)

    Generic 2 eq modelGeneric 2 eq model turb_nbeq=2, turb_2eq_option=4 (S)turb_nbeq=2, turb_2eq_option=4 (S)

    0

    ( )1 1( ) x x

    nz uu Pa DL u fv g Ft x x D

    ζ σπρ σ

    ∂∂∂ ∂ ∂ ∂+ − = − − + + +

    ∂ ∂ ∂ ∂Variable in namelist :(M) : paramain.txt(C) : paracom.txt(S) : paraspec.txt

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    92

    available cpp keys (5/11)available cpp keys available cpp keys (5/11)(5/11)

    VISCOSITYVISCOSITY

    DescriptionDescription Variables namelistVariables namelist cpp keycpp key ObservationObservationconstantconstant L_smagor=.false. (S)L_smagor=.false. (S)

    Smagorinsky, 1963 L_smagor=.true. (S)L_smagor=.true. (S)

    Sponge layer at each open Sponge layer at each open boundaryboundary

    OPEN BOUNDARY CONDITIONSOPEN BOUNDARY CONDITIONSDescriptionDescription Variables namelistVariables namelist cpp keycpp key ObservationObservation

    Rank : reading and saving Rank : reading and saving for straight open boundaryfor straight open boundary

    defaultdefault

    Rank : reading with the use Rank : reading with the use of a rotated child gridof a rotated child grid

    --Dkey_grid_rotatedDkey_grid_rotated Longitude and Longitude and latitude read from the latitude read from the bathy filebathy file

    Rank : saving for straight Rank : saving for straight open boundary but a open boundary but a rotated child gridrotated child grid

    --Dkey_tide_saveobcrotatedDkey_tide_saveobcrotated Define imin_childDefine imin_child…… in in parameter.F90parameter.F90

    Direct offline couplingDirect offline coupling

    0

    ( )1 1( ) x x

    nz uu Pa DL u fv g Ft x x D

    ζ σπρ σ

    ∂∂∂ ∂ ∂ ∂+ − = − − + + +

    ∂ ∂ ∂ ∂

    Variable in namelist :(M) : paramain.txt(C) : paracom.txt(S) : paraspec.txt

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    93

    available cpp keys (6/11)available cpp keys available cpp keys (6/11)(6/11)1 p gD

    ρσ

    ∂= −

    STATE EQUATIONSTATE EQUATION

    DescriptionDescription Variables namelistVariables namelist cpp keycpp key ObservationObservation

    linearlinear l_stateeq_lin=.true. (M)

    l_stateeq_lin=.false. (M)

    VERTICAL DISCRETIZATIONVERTICAL DISCRETIZATION

    DescriptionDescription Variables namelistVariables namelist cpp keycpp key ObservationObservationsigma l_equisig=.true. Or specify sig for each

    level (S)generalized sigma l_equisig=.true. (S)

    hc = 5.0theta_sig=0.000001b_sig=1

    --Dkey_siggenDkey_siggen Do not changeDo not change

    let theta_sig go to let theta_sig go to zero to get pure zero to get pure sigma coordinatessigma coordinates

    Variable in namelist :(M) : paramain.txt(C) : paracom.txt(S) : paraspec.txt

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    94

    available cpp keys (7/11)available cpp keys available cpp keys (7/11)(7/11)2

    0

    ( )( ) ( ) 1yx

    p

    TT kz TD vT kD uT k D w TDT Iyx Dt x y C

    σσ ρ σ

    ∂∂ ∂∂ −∂ − ∂ −∂ ∂∂∂ ∂+ + + =∂ ∂ ∂ ∂ ∂

    å

    ADVECTION OF TRACERSADVECTION OF TRACERSDescriptionDescription cpp keycpp key ObservationObservation

    Along x and yAlong x and yQUICK/upstreamQUICK/upstreamQUICKEST scheme + ULTIMATE QUICKEST scheme + ULTIMATE limiterlimiterQ+U+MACHO splittingQ+U+MACHO splitting

    --Dkey_tssub_adv_ultimatequickestDkey_tssub_adv_ultimatequickest

    Dkey_tssub_adv_ultimatequickestmachoDkey_tssub_adv_ultimatequickestmacho

    defaultdefault

    Along zAlong zCenteredCenteredQuick/upwindQuick/upwindUpwind Compact and conservativeUpwind Compact and conservative

    --Dkey_tssub_wquickupwindDkey_tssub_wquickupwind--Dkey_tssub_wcompactDkey_tssub_wcompact

    defaultdefault

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    95

    available cpp keys (7/11)available cpp keys available cpp keys (7/11)(7/11)2

    0

    ( )( ) ( ) 1yx

    p

    TT kz TD vT kD uT k D w TDT Iyx Dt x y C

    σσ ρ σ

    ∂∂ ∂∂ −∂ − ∂ −∂ ∂∂∂ ∂+ + + =∂ ∂ ∂ ∂ ∂

    å

    DIFFUSION OF TRACERSDIFFUSION OF TRACERS

    DescriptionDescription Variables namelistVariables namelist cpp keycpp key ObservationObservationalong sigmaalong sigma defaultdefault

    along geopotentialseopotentials --Dkey_ts_diffh_geoDkey_ts_diffh_geo

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    96

    available cpp keys (8/11)available cpp keys available cpp keys (8/11)(8/11)2

    0

    ( )( ) ( ) 1yx

    p

    TT kz TD vT kD uT k D w TDT Iyx Dt x y C

    σσ ρ σ

    ∂∂ ∂∂ −∂ − ∂ −∂ ∂∂∂ ∂+ + + =∂ ∂ ∂ ∂ ∂

    å

    HEAT FLUXESHEAT FLUXESDescriptionDescription Varia namelistVaria namelist cpp keycpp key ObservationObservation

    Solar fluxBulk MAST 3 (Luyten et al, 1992)Bulk NOMADS2 (Gill, 1982)Bulk NOMADS2 (Gill, 1982)Read

    l_sflx_rsolar=.true.(S)

    -Dkey_sflx_solar_luyten-Dkey_sflx_solar_gill

    Thermal fluxSwimbank in Agoumi PhdLuyten and De Mulder (1992 )Berliand and Berliand (1952)Read l_sflx_rir=.true. (S)

    - Dkey_sflx_ir_swimbank-Dkey_sflx_ir_luyten-Dkey_sflx_ir_berliand

    Turbulent fluxesClark et al (1995), Elliot and Clark (1990)Luyten and De Mulder (1992 )Large et Yeager (2004)Fairall (2003)

    imeteo_exchtype=1 (S)

    -Dkey_sflx_turb_default-Dkey_sflx_turb_luyten-Dkey_sflx_turb_large-Dkey_sflx_turb_fairall

    Coef depends on Coef depends on diffdiff ttairair--mermer

    Variable in namelist :(M) : paramain.txt(C) : paracom.txt(S) : paraspec.txt

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    97

    available cpp keys (9/11)available cpp keys available cpp keys (9/11)(9/11)OPEN BOUNDARY CONDITIONSOPEN BOUNDARY CONDITIONS

    DescriptionDescription Varia namelistVaria namelist cpp keycpp key ObservationObservationNesting with an OGCMNesting with a previous rank or from harmonics

    l_obc_ogcm (S)l_obc_tide (S)

    Where are the open boundariesWhich obc file

    l_obc_north…(S)file_obc_ogcm_n…

    MARS standardSea surface height is prescribedGradient nul for velocity l_obc_mars (S)

    Initial and default operator

    CYCLICZonaly or meridionaly

    l_obc_cycl (S)l_obc_cycl_xl_obc_cycl_y

    Choose another operator for open boundaries that are not cyclic

    CARACTERISTICS METHOD l_obc_char (S) 2D part onlyMARS standard for 3D variables

    DIRICHLETSSH prescribed (strong condition)Velocities prescribed (weak condition)

    l_obc_diri (S)

    Variable in namelist :(M) : paramain.txt(C) : paracom.txt(S) : paraspec.txt

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    98

    available cpp keys (10/11)available cpp keys available cpp keys (10/11)(10/11)PASSIVE SUBSTANCESPASSIVE SUBSTANCES

    --Dkey_substanceDkey_substance Sequential, openMP,MPISequential, openMP,MPI

    BIOLOGYBIOLOGY--Dkey_substance Dkey_substance --Dkey_bioloDkey_biolo Sequential, openMP,MPISequential, openMP,MPI

    SEDIMENTOLOGYSEDIMENTOLOGY

    --Dkey_substance Dkey_substance --Dkey_sedimDkey_sedim Sequential, MPISequential, MPI

    CHEMISTRY OF CONTAMINANTSCHEMISTRY OF CONTAMINANTS--Dkey_substance Dkey_substance -- Dkey_contaminantDkey_contaminant

    Sequential, MPISequential, MPI

    Rq : input files and modules of sedimentology, biology and chemiRq : input files and modules of sedimentology, biology and chemistry of contaminants are stry of contaminants are distinctsdistincts

    ALL MODULESALL MODULES

    --Dkey_subs_part_eqsubdtDkey_subs_part_eqsubdt Substances with settling velocity are advected with sub time Substances with settling velocity are advected with sub time scheme. This key allows an optimization of the calculationscheme. This key allows an optimization of the calculation

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    99

    available cpp keys (11/11)available cpp keys available cpp keys (11/11)(11/11)

    AGRIF PACKAGEAGRIF PACKAGE

    -Dkey_agrif -Dkey_agrif_use-Dkey_agrif -Dkey_agrif_use – DAGRIF_MPI –Dkey_MPI_2D

    Compile with –r8 SequentialMPI

    TRAJECTOIRESTRAJECTOIRES

    -Dkey_trajec2d-Dkey_trajec3d

    2D Simulation (not maintained)3D Simulation

    Sequential, openMPSequential, openMP

    MPIMPI-Dkey_MPI_2D Several output files if

    l_out_nc4par= .false. (S)One single output file if l_out_nc4par= .true (S)

    MPI + OMPMPI + OMP-Dkey_MPI_2D -Dkey_MPIOMP Several output files if

    l_out_nc4par= .false. (S)One single output file if l_out_nc4par= .true (S)

    Variable in namelist :(M) : paramain.txt(C) : paracom.txt(S) : paraspec.txt

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    100

    Input files *.dat under $RDIR/CONF/inputs Input files *.datInput files *.dat under $RDIR/CONF/inputsunder $RDIR/CONF/inputs

    Setting up of output files : output.datSetting up of tracking points : points.datSetting up of river discharges : river.datSetting up of outflow : outflow.dat Setting up of substances (key_substance) : variable.datSetting up of budgets domains and borders : bilmat.dat

    Examples of these inputs files are also in $HOMEMARS/../EXAMPLES/

    Return to Summary

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    101

    Parametrization of the configuration : file output.dat setting up of output files

    Parametrization of the configurationParametrization of the configuration : file output.dat: file output.dat setting up of output filessetting up of output files

    The name of the file output.dat is set in paraspec.dat (file_outThe name of the file output.dat is set in paraspec.dat (file_output)put)

    Return to Summary Return to list of input files

    THREE REQUIREMENTS : THREE REQUIREMENTS : 1.1. THE MAIN OUPUT MUST BE DEFINED AT FIRSTTHE MAIN OUPUT MUST BE DEFINED AT FIRST2.2. The user can choose l_demer=.true. or l_out_precdate=.true. (botThe user can choose l_demer=.true. or l_out_precdate=.true. (both at the same time is not allowed)h at the same time is not allowed)3. The choice l_demer=.true. or l_out_precdate=.true. is possi3. The choice l_demer=.true. or l_out_precdate=.true. is possible just once inside the file output.dat.ble just once inside the file output.dat.

    ******************************************************************************************************************************************************Champs ,| the name of the output file will be cChamps ,| the name of the output file will be champs_suffix.nc, suffix being defining in paracom.txthamps_suffix.nc, suffix being defining in paracom.txt06/03/2005 00:00:00 ,| date_startout06/03/2005 00:00:00 ,| date_startout09/03/2005 00:00:00 ,| date_endout09/03/2005 00:00:00 ,| date_endout1.0d0 ,| pasor (real in double precision)1.0d0 ,| pasor (real in double precision).true. ,| l_posit.true. ,| l_posit0 421 0 501 ,| iextmin,iextmax,jextmin,jextmax0 421 0 501 ,| iextmin,iextmax,jextmin,jextmax1 30 ,| kextmin,kextmax (between 1 and 1 30 ,| kextmin,kextmax (between 1 and kmax)kmax)1 1 1 ,| i1 1 1 ,| i--step,jstep,j--step,kstep,k--stepstep.false. ,| l_filebydate.false. ,| l_filebydate.false. ,| l_out_off.false. ,| l_out_off.false. ,| l_out_precdate.false. ,| l_out_precdate.false. ,| l_demer.false. ,| l_demer.true. ,| l_out_ssh.true. ,| l_out_ssh.true. ,| l_out_ubt.true. ,| l_out_ubt.false. ,| l_out_u3d.false. ,| l_out_u3d.true. ,| l_out_sal.true. ,| l_out_sal.false. ,| l_out_temp.false. ,| l_out_temp.false. ,| l_out_wind.false. ,| l_out_wind.false. ,| l_out_visc.false. ,| l_out_visc.false. ,| l_out_turb.false. ,| l_out_turb.false. ,| l_out_atmsflx.false. ,| l_out_atmsflx******************************************************************************************************************************************************

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    102

    Points.dat Setting up of tracking points

    Points.datPoints.dat Setting up of tracking pointsSetting up of tracking points

    The name of the file points.dat is set in paraspec.dat (file_poiThe name of the file points.dat is set in paraspec.dat (file_point)nt)

    Return to SummaryReturn to list of input files

    ************************************************************************************************************************************************Point1 ,| prefix of output file namePoint1 ,| prefix of output file name06/03/1900 00:00:00 ,| starting date06/03/1900 00:00:00 ,| starting date06/03/2500 00:00:00 ,| ending date06/03/2500 00:00:00 ,| ending date600.0 ,| time step (s)600.0 ,| time step (s).true. ,| location in i,j,k (.true.) or in lon,lat,k .true. ,| location in i,j,k (.true.) or in lon,lat,k (.false.)(.false.)29 29 12 ,| location29 29 12 ,| location.true. ,| l_out_ssh_track.true. ,| l_out_ssh_track.false. ,| l_out_ubt_track.false. ,| l_out_ubt_track.true. ,| l_out_u3d_track.true. ,| l_out_u3d_track.true. ,| l_out_sal_track.true. ,| l_out_sal_track.true. ,| l_out_temp_track.true. ,| l_out_temp_track************************************************************************************************************************************************

  • Mars : Version 9.06Mars : Mars : Version 9.06Version 9.06

    lfre m

    e r

    103

    river.dat Setting up of river discharges

    river.datriver.dat Setting up of river discharges Setting up of river discharges

    The name of the file river.dat is set in paraspec.dat (file_riveThe name of the file river.dat is set in paraspec.dat (file_river)r)

    Return to SummaryReturn to list of input files

    **********************************************************************************************************************Seine Seine ,| river name,| river name.true. ,| .true. ,| location in i,j,k (.true.) or in lon,lat,k (.false.)location in i,j,k (.true.) or in lon,lat,k (.false.)142 45 12 ,| 142 45 12 ,| locationlocation100 ,| 100 ,| thickness (m) on which the outflow is distributedthickness (m) on which the outflow is distributed.false. ,| .false. ,| .true. for a stationary river discharge.true. for a stationary river discharge450.0 ,| 450.0 ,| value of the stationary river dischargevalue of the stationary river discharge../../inputs/debits/deb../../inputs/debits/deb--seineseine--nc.dat ,| nc.dat ,| river discharges datariver discharges data.true. ,| .true. ,| set to .true. for reading the river temperatureset to .true. for reading the river temperatu