Difference between revisions of "Configuring MOM"

(Imported from Wikispaces)
 
m (Adjust some monospace font spans)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
 +
[[Category:MOM]]
 +
 
This page outlines basic configuration of MOM4 experiments.
 
This page outlines basic configuration of MOM4 experiments.
  
=MOM4/5 Configuration Files=  
+
= MOM4/5 Configuration Files =
  
 
MOM4 configuration is managed primarily through four text files:
 
MOM4 configuration is managed primarily through four text files:
  
* <span style="font-family:monospace">input.nml</span>: Principal configuration
+
*<span style="font-family:monospace">input.nml</span>: Principal configuration  
* <span style="font-family:monospace">diag_table</span>: Diagnostic output management
+
*<span style="font-family:monospace">diag_table</span>: Diagnostic output management  
* <span style="font-family:monospace">data_table</span>: Input and boundary condition data field management
+
*<span style="font-family:monospace">data_table</span>: Input and boundary condition data field management  
* <span style="font-family:monospace">field_table</span>: Initial condition and advection scheme configuration
+
*<span style="font-family:monospace">field_table</span>: Initial condition and advection scheme configuration  
  
=Basic Configuration=  
+
= Basic Configuration =
  
==Setting the simulation time==  
+
== Setting the simulation time ==
  
 
Simulation time (or integration time) is set in the <span style="font-family:monospace">input.nml}} namelist file, in either {{ocean_solo_nml}} (for ocean-only runs) or {{coupler_nml</span> (for coupled runs).
 
Simulation time (or integration time) is set in the <span style="font-family:monospace">input.nml}} namelist file, in either {{ocean_solo_nml}} (for ocean-only runs) or {{coupler_nml</span> (for coupled runs).
Line 19: Line 22:
  
 
An example <span style="font-family:monospace">ocean_solo_nml</span> namelist record is shown below:
 
An example <span style="font-family:monospace">ocean_solo_nml</span> namelist record is shown below:
<syntaxhighlight lang=fortran>
+
'"`UNIQ--syntaxhighlight-00000001-QINU`"'
&ocean_solo_nml
 
    date_init = 1980,1,1,0,0,0
 
    calendar = 'julian'
 
 
 
    months  = 0
 
    days    = 2
 
    hours  = 0
 
    minutes = 0
 
    seconds = 0
 
 
 
    dt_cpld = 86400
 
/
 
</syntaxhighlight>
 
 
The major namelist fields are described below:
 
The major namelist fields are described below:
  
Line 48: Line 38:
  
 
An example <span style="font-family:monospace">coupler_nml</span> record follows a similar structure:
 
An example <span style="font-family:monospace">coupler_nml</span> record follows a similar structure:
<syntaxhighlight lang=fortran>
+
'"`UNIQ--syntaxhighlight-00000002-QINU`"'
&coupler_nml
 
    current_date = 1980,1,1,0,0,0
 
    calendar = 'noleap'
 
    months = 12
 
 
 
    do_atmos = .false.
 
    do_land  = .false.
 
    do_ice  = .true.
 
    do_ocean = .true.
 
 
 
    dt_cpld = 1800
 
    dt_atmos = 1800
 
/
 
</syntaxhighlight>
 
 
Many of the fields are identical to the <span style="font-family:monospace">ocean_solo_nml</span> fields. The new or modified fields are listed below:
 
Many of the fields are identical to the <span style="font-family:monospace">ocean_solo_nml</span> fields. The new or modified fields are listed below:
  
* <span style="font-family:monospace">current_date}}: Simulation start time, similar to {{date_init}} in {{ocean_solo_nml}} (in this case, the timestamp override file is named {{coupler.res</span>)
+
* <span style="font-family:monospace">current_date</span>: Simulation start time, similar to {{date_init}} in <span style="font-family:monospace">ocean_solo_nml</span> (in this case, the timestamp override file is named <span style="font-family:monospace">coupler.res</span>)
* <span style="font-family:monospace">do_atmos}}, {{do_land</span>, etc.: Use to enable or disable submodel components
+
* <span style="font-family:monospace">do_atmos</span>, <span style="font-family:monospace">do_land</span>, etc.: Use to enable or disable submodel components
 
* <span style="font-family:monospace">dt_atmos</span>: Atmospheric model timestep (in seconds), including its coupling to land and ice (or the "fast" coupling timestep)
 
* <span style="font-family:monospace">dt_atmos</span>: Atmospheric model timestep (in seconds), including its coupling to land and ice (or the "fast" coupling timestep)
* <span style="font-family:monospace">dt_cpld}}: Ocean-atmosphere coupling (or the "slow" coupling timestep). This must be a multiple of {{dt_atmos}} and {{dt_ocean</span>.
+
* <span style="font-family:monospace">dt_cpld</span>: Ocean-atmosphere coupling (or the "slow" coupling timestep). This must be a multiple of <span style="font-family:monospace">dt_atmos</span> and <span style="font-family:monospace">dt_ocean</span>.
  
 
==Timestep configuration==  
 
==Timestep configuration==  
  
 
The predominant numerical parameter in model configuration is timestep size. MOM4 timestepping is configured in the <span style="font-family:monospace">ocean_model_nml</span> namelist record. An example record is provided below:
 
The predominant numerical parameter in model configuration is timestep size. MOM4 timestepping is configured in the <span style="font-family:monospace">ocean_model_nml</span> namelist record. An example record is provided below:
<syntaxhighlight lang=fortran>
+
'"`UNIQ--syntaxhighlight-00000003-QINU`"'
&ocean_model_nml
 
    dt_ocean = 10800
 
    vertical_coordinate = 'zstar'
 
    barotropic_split = 60
 
/
 
</syntaxhighlight>
 
 
Some typical timestep settings are as follows:
 
Some typical timestep settings are as follows:
  
Line 89: Line 59:
 
** <span style="font-family:monospace">pstar</span>: Quasi-horizontal pressure
 
** <span style="font-family:monospace">pstar</span>: Quasi-horizontal pressure
  
* <span style="font-family:monospace">barotropic_split}}: Split timestepping between the ocean free surface (or barotropic) and internal (or baroclinic) flow. A barotropic timestep of 60 means that there are sixty free surface timesteps per model timesteps (set by {{dt_ocean</span>).
+
* <span style="font-family:monospace">barotropic_split</span>: Split timestepping between the ocean free surface (or barotropic) and internal (or baroclinic) flow. A barotropic timestep of 60 means that there are sixty free surface timesteps per model timesteps (set by <span style="font-family:monospace">dt_ocean</span>).
  
 
=Advanced Configuration=  
 
=Advanced Configuration=  
Line 102: Line 72:
  
 
Example <span style="font-family:monospace">data_table</span> record:
 
Example <span style="font-family:monospace">data_table</span> record:
<syntaxhighlight lang=fortran>
+
'"`UNIQ--syntaxhighlight-00000004-QINU`"'
"OCN", "u_flux", "taux", "INPUT/stress.nc", .true., 1.0
 
</syntaxhighlight>
 
 
* <span style="font-family:monospace">"OCN"}}: Identifies the class of the field. It contains one of the following values: {{ATM}}, {{OCN}}, {{LND}}, {{ICE</span>
 
* <span style="font-family:monospace">"OCN"}}: Identifies the class of the field. It contains one of the following values: {{ATM}}, {{OCN}}, {{LND}}, {{ICE</span>
 
* <span style="font-family:monospace">"u_flux"</span>: The field variable name as defined in MOM4.
 
* <span style="font-family:monospace">"u_flux"</span>: The field variable name as defined in MOM4.
Line 111: Line 79:
 
* <span style="font-family:monospace">.true.}}: Indicates whether or not the field is on the the ocean model grid. A value of {{.false.</span> indicates that it does not match the model grid and requires interpolation (as computed by MOM).
 
* <span style="font-family:monospace">.true.}}: Indicates whether or not the field is on the the ocean model grid. A value of {{.false.</span> indicates that it does not match the model grid and requires interpolation (as computed by MOM).
 
* <span style="font-family:monospace">1.0}}: A rescaling factor applied to the field. A value of {{1.0}} indicates no rescaling, while a value of {{0.</span> will set all values to zero.
 
* <span style="font-family:monospace">1.0}}: A rescaling factor applied to the field. A value of {{1.0}} indicates no rescaling, while a value of {{0.</span> will set all values to zero.
 +
 +
[[Category:MOM]]

Latest revision as of 00:19, 29 August 2022


This page outlines basic configuration of MOM4 experiments.

MOM4/5 Configuration Files

MOM4 configuration is managed primarily through four text files:

  • input.nml: Principal configuration
  • diag_table: Diagnostic output management
  • data_table: Input and boundary condition data field management
  • field_table: Initial condition and advection scheme configuration

Basic Configuration

Setting the simulation time

Simulation time (or integration time) is set in the input.nml}} namelist file, in either Template:Ocean solo nml (for ocean-only runs) or {{coupler_nml (for coupled runs).

Ocean-only (solo) configuration

An example ocean_solo_nml namelist record is shown below: ?'"`UNIQ--syntaxhighlight-00000001-QINU`"'? The major namelist fields are described below:

  • date_init}}: Simulation start time (if no {{ocean_solo.res timestamp is present, such as from a previous simulation, then this field is ignored)
  • calendar: Simulation calendar type. Four calendars are supported:
    • gregorian: Modern calendar will full leap-year support
    • julian: 365-day calendar with 4-year leap years
    • noleap: 365-day calendar with no leap years
    • thirty_day: 30-day months (or 360 days per year)
  • months}}, {{days, etc.: Simulation (or integration) time
  • dt_cpld: Timestep (in seconds) to external data fields (usually atmospheric)

Coupled configuration

An example coupler_nml record follows a similar structure: ?'"`UNIQ--syntaxhighlight-00000002-QINU`"'? Many of the fields are identical to the ocean_solo_nml fields. The new or modified fields are listed below:

  • current_date: Simulation start time, similar to Template:Date init in ocean_solo_nml (in this case, the timestamp override file is named coupler.res)
  • do_atmos, do_land, etc.: Use to enable or disable submodel components
  • dt_atmos: Atmospheric model timestep (in seconds), including its coupling to land and ice (or the "fast" coupling timestep)
  • dt_cpld: Ocean-atmosphere coupling (or the "slow" coupling timestep). This must be a multiple of dt_atmos and dt_ocean.

Timestep configuration

The predominant numerical parameter in model configuration is timestep size. MOM4 timestepping is configured in the ocean_model_nml namelist record. An example record is provided below: ?'"`UNIQ--syntaxhighlight-00000003-QINU`"'? Some typical timestep settings are as follows:

  • dt_ocean: Ocean model timestep size (in seconds)
  • vertical_coordinate: Vertical coordinate type, the most common options are listed below:
    • geopotential: Geopotential (equivalent to depth in many cases)
    • zstar: Quasi-horizontal depth
    • pressure: Pressure-based vertical coordiante
    • pstar: Quasi-horizontal pressure
  • barotropic_split: Split timestepping between the ocean free surface (or barotropic) and internal (or baroclinic) flow. A barotropic timestep of 60 means that there are sixty free surface timesteps per model timesteps (set by dt_ocean).

Advanced Configuration

A typical input.nml file will usually contain a large number of namelist records, sometimes as many as 100 for fully coupled models. Much of the configuration settings are determined through experiment design, which is a nontrivial task and often a subject of ongoing research.

data_table

The data_table file is used to supply a MOM experiment with external data forcing fields, such as surface winds or radiative heating.

Note that MOM usually expects external fields to be in netCDF format, and that the grid variables must be formatted in a particular manner.

Example data_table record: ?'"`UNIQ--syntaxhighlight-00000004-QINU`"'?

  • "OCN"}}: Identifies the class of the field. It contains one of the following values: Template:ATM, Template:OCN, Template:LND, {{ICE
  • "u_flux": The field variable name as defined in MOM4.
  • "taux": The field variable name as defined in the netCDF provided by the user.
  • "INPUT/stress.nc": The path (including filename) for the netCDF file containing the forcing field. Local paths can be used.
  • .true.}}: Indicates whether or not the field is on the the ocean model grid. A value of {{.false. indicates that it does not match the model grid and requires interpolation (as computed by MOM).
  • 1.0}}: A rescaling factor applied to the field. A value of Template:1.0 indicates no rescaling, while a value of {{0. will set all values to zero.