16.1. cppdefs.h

This file defines the CPP keys that are used by the the C-preprocessor when compiling CROCO. The C-preprocessor selects the different parts of the Fortran code which needs to be compiled depending on the defined CPP options. These options are separated in two parts: the basic option keys in cppdefs.h and the advanced options keys in cppdefs_dev.h.

CPP keys define the case: test case, realistic case, as well as the numerical schemes, parameterizations, and modules used, and the forcing and boundary conditions.

  • Configuration

CPP options

Description

BASIN

Must be defined for running the Basin example

CANYON_A

Must be defined for running the Canyon_A example

CANYON_B

Must be defined for running the Canyon_B example

EQUATOR

Must be defined for running the Equator example

GRAV_ADJ

Must be defined for running the Gravitational Adjustment example

ACOUSTIC

Must be defined for running the accoustic example

INNERSHELF

Must be defined for running the Inner Shelf example

OVERFLOW

Must be defined for running the Gravitational/Overflow example

SEAMOUNT

Must be defined for running the Seamount example

SHELFRONT

Must be defined for running the Shelf Front example

SOLITON

Must be defined for running the Equatorial Rossby Wave example

UPWELLING

Must be defined for running the Upwelling example

INTERNAL

Must be defined for running the Internal tides example

VORTEX

Must be defined for running the Baroclinic Vortex example

JET

Must be defined for running the Jet example

THACKER

Must be defined for running the Thacker example

TANK

Must be defined for running the Tank example

S2DV

Must be defined for running the S2DV example

RIP

Must be defined for running the Rip current example

SHOREFACE

Must be defined for running the Shoreface example

SWASH

Must be defined for running the Swash example

REGIONAL

Must be defined if running realistic regional simulations

  • Prallelisation

CPP options

Description

OPENMP

Activate Open-MP parallelization protocol

MPI

Activate MPI parallelization protocol

PARALLEL_FILES

Activate parallel I/O writing

XIOS

Use external server for output

AUTOTILING

Activate subdomains partitionning optimization

  • Nesting

CPP options

Description

AGRIF

Activate nesting capabilities (1-WAY by default)

AGRIF_2WAY

Activate 2-WAY nesting (update parent solution by child solution)

  • Open Boundary Conditions

CPP options

Description

OBC_EAST

Open eastern boundary

OBC_WEST

Open western boundary

OBC_SOUTH

Open southern boundary

OBC_NORTH

Open northern boundary

  • Tides

CPP options

Description

TIDES

Activate tidal forcing at open boundaries

SSH_TIDES

process and use tidal sea level data

UV_TIDES

process and use tidal current data

TIDERAMP

Apply ramping on tidal forcing (1 day) at initialization
Warning! This should be undefined if restarting the model
  • Applications

CPP options

Description

BIOLOGY

Activate biogeochemical modeling

FLOATS

Activate floats

STATIONS

Store high frequency model outputs at stations

PASSIVE_TRACER

Add a passive tracer

SEDIMENT

Activate sediment modeling

BBL

Activate bottom boundary layer parametrization

  • Grid Configuration

CPP options

Description

CURVGRID

Activate curvilinear coordinate transformation

SPHERICAL

Activate longitude/latitude grid positioning

MASKING

Activate land masking

WET_DRY

Activate wetting-Drying scheme

NEW_S_COORD

Choose new vertical S-coordinates

  • Model Dynamics

CPP options

Description

SOLVE3D

solve 3D primitive equations

UV_COR

Activate Coriolis terms

UV_ADV

Activate advection terms

NBQ

Activate non-boussinesq option

  • Lateral Momentum Advection

CPP options

Description

DV_UP3

Activate 3rd-order upstream biased advection scheme

UV_HADV_UP5

Activate 5th-order upstream biased advection scheme

UV_HADV_C2

Activate 2nd-order centred advection scheme
(should be used with explicit momentum mixing)

UV_HADV_C4

Activate 4th-order centred advection scheme
(should be used with explicit momentum mixing)

UV_HADV_C6

Activate 6th-order centred advection scheme
(should be used with explicit momentum mixing)

UV_HADV_WENO5

Activate WENO 5th-order advection scheme

UV_HADV_TVD

Activate Total Variation Diminushing scheme

  • Lateral Momentum Mixing

CPP options

Description

UV_MIX_GEO

Activate mixing on geopotential (constant depth) surfaces

UV_MIX_S

Activate mixing on iso-sigma (constant sigma) surfaces

UV_VIS2

Activate Laplacian horizontal mixing of momentum

UV_VIS4

Activate Bilaplacian horizontal mixing of momentum

UV_VIS_SMAGO

Activate Smagorinsky parametrization of turbulent viscosity
(only with UV_VIS2)

UV_VIS_SMAGO3D

Activate 3D Smagorinsky parametrization of turbulent viscosity

  • Lateral Tracer Advection

CPP options

Description

TS_HADV_UP3

3rd-order upstream biased advection scheme

TS_HADV_RSUP3

Split and rotated 3rd-order upstream biased advection scheme

TS_HADV_UP5

5th-order upstream biased advection scheme

TS_HADV_RSUP5

Split and rotated 5th-order upstream biased advection scheme
with reduced dispersion/diffustion

TS_HADV_C4

4th-order centred advection scheme

TS_HADV_C6

Activate 6th-order centred advection scheme

TS_HADV_WENO5

5th-order WENOZ quasi-monotonic advection scheme for all tracers

BIO_HADV_WENO5

5th-order WENOZ quasi-monotone advection scheme for
passive tracers (including biology and sediment tracers)
  • Lateral Tracer Mixing

CPP options

Description

TS_MIX_ISO

Activate mixing along isopycnal (isoneutral) surfaces

TS_MIX_GEO

Activate mixing along geopotential surfaces

TS_MIX_S

Activate mixing along iso-sigma surfaces

TS_DIF2

Activate Laplacian horizontal mixing of tracer

TS_DIF4

Activate Bilaplacian horizontal mixing of tracer

TS_MIX_IMP

Activate stabilizing correction of rotated diffusion
(used with TS_MIX_ISO and TS_MIX_GEO)
  • Nudging

CPP options

Description

ZNUDGING

Activate nudging layer for zeta.

M2NUDGING

Activate nudging layer for barotropic velocities.

M3NUDGING

Activate nudging layer for baroclinic velocities.

TNUDGING

Activate nudging layer for tracer.

ROBUST_DIAG

Activate strong tracer nudging in the interior for diagnostic simulations

  • Vertical Mixing

CPP options

Description

BODYFORCE

Apply surface and bottom stresses as body-forces

ANA_VMIX

Activate analytical viscosity/diffusivity coefficients

BVF_MIXING

Activate a simple mixing scheme based on the Brunt-Väisälä frequency

LMD_MIXING

Activate Large/McWilliams/Doney mixing (turbulent closure for
interior and planetary boundary layers) with following options

LMD_SKPP

Activate surface boundary layer KPP mixing

LMD_BKPP

Activate bottom boundary layer KPP mixing

LMD_RIMIX

Activate shear instability interior mixing

LMD_CONVEC

Activate convection interior mixing

LMD_DDMIX

Activate double diffusion interior mixing

LMD_NONLOCAL

Activate nonlocal transport for SKPP

GLS_MIXING

Activate Generic Length Scale scheme as implemented by Warner et al.
(2005), default is k-kl (see below)

GLS_MIX2017

Activate Generic Length Scale scheme with a sligthly different
implementation (under test), default is k-epsilon (see below)

GLS_KKL

Activate K-KL (K=TKE; L=length Scale) as in Mellor-Yamada 2.5 (1974)

GLS_KOMEGA

Activate K-OMEGA (OMEGA=frequency of TKE dissipation) originating
from Kolmogorov (1942)

GLS_KEPSILON

Activate K-EPSILON (EPSILON=TKE dissipation) as in Jones and Launder (1972)

GLS_GEN

Activate generic model of Umlauf and Burchard (2003)

  • Equation of State

CPP options

Description

SALINITY

Activate salinity as an active tracer

NONLIN_EOS

Activate nonlinear equation of state

SPLIT_EOS

Activate the split of the nonlinear equation of state in adiabatic
and compressible parts for reduction of pressure gradient errors
  • Surface Forcing

CPP options

Description

BULK_FLUX

Activate bulk formulation for surface heat fluxes

BULK_FAIRALL

Choose Fairall formulation (default: COAMPS formulation)

BULK_EP

Add in bulk formulation for fresh water fluxes

BULK_LW

Add in long-wave radiation feedback from model SST

BULK_SMFLUX

Add in bulk formulation for surface momentum fluxes

SST_SKIN

Activate skin sst computation (Zeng & Beljaars, 2005)

ONLINE

Read native files and perform online interpolation on ROMS grid
(default cubic interpolation)

QCORRECTION

Activate linearized bulk formulation providing heat flux correction
dQdSST for nudging towards model SST

SFLX_CORR

Activate freshwater flux correction around model SSS

ANA_DIURNAL_SW

Activate analytical diurnal modulation of short wave radiations
(only appropriate if there is no diurnal cycle in data)
  • Coupling

CPP options

Description

OW_COUPLING

Activate Ocean-Wave coupling

OA_COUPLING

Activate Ocean-Atmosphere coupling

OA_MCT

Use OASIS-MCT for coupling

  • Sponge Layer

CPP options

Description

SPONGE

Activate areas of enhanced viscosity and diffusivity
near lateral open boundaries.

SPONGE_GRID

Automatic setting of the sponge width and value

SPONGE_DIF2

Sponge on tracers (default)

SPONGE_VIS2

Sponge on momentum (default)

SPONGE_SED

Sponge on sediment (default)

  • Lateral forcing

CPP options

Description

CLIMATOLOGY

Activate processing of 2D/3D climatological data for
nudging layers and open boundary forcing

ZCLIMATOLOGY

Activate processing of sea level

M2CLIMATOLOGY

Activate processing of barotropic velocities

M3CLIMATOLOGY

Activate processing of baroclinic velocities

TCLIMATOLOGY

Activate processing of tracers

ZNUDGING

Activate nudging layer for sea level

M2NUDGING

Activate nudging layer for barotropic velocities

M3NUDGING

Activate nudging layer for baroclinic velocities

TNUDGING

Activate nudging layer for tracers

ROBUST_DIAG

Activate nudging over the whole domain

FRC_BRY

Activate processing of 1D/2D climatological or
simulation/reanalysis data at open boundary points

Z_FRC_BRY

Activate open boundary forcing for sea level

M2_FRC_BRY

Activate open boundary forcing for barotropic velocities

M3_FRC_BRY

Activate open boundary forcing for baroclinic velocities

T_FRC_BRY

Activate open boundary forcing for tracers

  • Bottom Forcing

CPP options

Description

ANA_BSFLUX

Activate analytical bottom salinity flux (generally 0)

ANA_BTFLUX

Activate analytical bottom temperature flux (generally 0)

  • Point Sources - Rivers

CPP options

Description

PSOURCE

Activate point sources (rivers)

ANA_PSOURCE

use analytical vertical profiles for point sources
(set in set_global_definitions.h)

PSOURCE_NCFILE

Read variable river transports in netcdf file

PSOURCE_NCFILE_TS

Read variable river concentration in netcdf file

  • Open boundary conditions II

CPP options

Description

OBC_VOLCONS

Activate mass conservation enforcement at open boundaries
(with OBC_M2ORLANSKI)

OBC_M2SPECIFIED

Activate specified open boundary conditions for barotropic velocities

OBC_M2ORLANSKI

Activate radiative open boundary conditions for barotropic velocities

OBC_M2FLATHER

Activate Flather open boundary conditions for barotropic velocities

OBC_M2CHARACT

Activate open boundary conditions based on characteristic methods
barotropic velocities

OBC_M3SPECIFIED

Activate specified open boundary conditions for baroclinic velocities

OBC_M3ORLANSKI

Activate radiative open boundary conditions for baroclinic velocities

OBC_TSPECIFIED

Activate specified open boundary conditions for tracers

OBC_TORLANSKI

Activate radiative open boundary conditions for tracers

OBC_TUPWIND

Activate upwind open boundary conditions for tracers

  • I/O - Diagnostics

CPP options

Description

AVERAGES

Process and output time-averaged data

AVERAGES_K

Process and output time-averaged vertical mixing

DIAGNOSTICS_TS

Store and output budget terms of the tracer equations

DIAGNOSTICS_TS_ADV

Choose advection rather than transport formulation for tracer budgets

DIAGNOSTICS_TS_MLD

Integrate tracer budgets over the mixed-layer depth

DIAGNOSTICS_UV

Store and output budget terms of the momentum equations

XIOS

Use XIOS IO server

  • Biogeochemical models

CPP options

Description

PISCES

Activate 24-component PISCES biogeochemical model

BIO_NChlPZD

Activate 5-component NPZD type model

BIO_N2PZD2

Activate 7-component NPZD type model

BIO_BioEBUS

Activate 12-component NPZD type model

  • Sediment Dynamics

CPP options

Description

ANA_SEDIMENT

Set analytical sediment ripple and bed parameters

ANA_WWAVE

Analytical (constant) wave (hs,Tp,Dir) values.

SUSPLOAD

Activate suspended load transport

BEDLOAD

Activate bedload transport

MORPHODYN

Activate morphodynamics

ANA_BPFLUX

Set kinematic bottom flux of sediment tracer (if different from 0)

SLOPE_NEMETH

Nemeth formulation for avalanching ( Nemeth et al, 2006)

SLOPE_LESSER

Lesser formulation for avalanching (Lesser et al, 2004)

BEDLOAD_SOULSBY

Soulsby formulation for bedload ( Soulsby, R.L. and J.S. Damgaard, 2005)

BEDLOAD_MPM

Meyer-Peter-Muller formulation for bedload (Meyer-Peter, E. and R. Muller, 1948)

  • Bottom Boundary Layer

CPP options

Description

ANA_WWAVE

Set analytical wave forcing

ANA_BSEDIM

Set analytical bed parameters (if SEDIMENT is undefined)

Z0_BL

Compute bedload roughness for ripple predictor and sediment purposes

Z0_RIP

Determine bedform roughness ripple height and ripple length
for sandy beds

Z0_BIO

Determine (biogenic) bedform roughness ripple height and ripple
length for silty beds
  • Wave-Current interactions

CPP options

Description

MRL_WCI

Set wave-current interaction model

ANA_WWAVE

Analytical values for waves

WAVE_OFFLINE

Set-wave offline (read from file) forcing

WKB_WWAVE

Set WKB wave model

OW_COUPLING

Set wave coupling for WWIII (to install separately)

MRL_CEW

Set current feedback on waves

WKB_OBC_WEST

Set East/West/North/South offshore forcing for WKB model

ANA_BRY_WKB

Analytical boundary wave foring (from croco.in)

WAVE_BREAK_CT93

Thornton and Guza (1983, JGR) wave breaking (for WKB)

WAVE_BREAK_TG86

Church and Thornton (1993, Coastal Eng.) wave breaking (for WKB)

WAVE_BREAK_TG86A

Another Church and Thornton formulation

WAVE_ROLLER

Set wave roller model

WAVE_STREAMING

Set bottom wave streaming

WAVE_FRICTION

Set bottom friction in WKB model (used for streaming)

WAVE_RAMP

Set wave forcing ramp using wave_ramp parameter