Running the model

If the compilation was successful, you will have all necessary files to run Bedymo in the run-folder of the Bedymo source root directory. In particular, you will find there:

  • The main executable bedymo.x. Use this executable to run Bedymo without GUI.

  • An example configuration file bedymo_std.nml showcasing one of the predefined standard setups.

  • A python module bedymo*.so. This python module makes the core controls as well as the model variables available as a python module. This python module also provides the basis for the GUI.

  • A python runscript runscript.py, showing how to run the model (without GUI) and access model variables through python.

  • A python runscript bedymo_gui.py which provides model controls through a GUI.

In this folder you can run the model by simply executing either the main executable ./bedymo.x. It will the start running the example setup in the configuration file. For each run, Bedymo will write both a status log and a report, called bedymo_status.XXXX.log and bedymo_report.XXXX.log, where XXXX is an increasing counter of model simulations.

The status log contains a line for each time step in the execution, containing the time step count, time step in seconds, and lead time in seconds followed by a number of internal diagnostics that can help debug the model.

The report file provides brief summary of the model simulation, with start and end dates, name of the host on which the model was run, compile-time information, and a copy of the model configuration. The report files are designed such that they are valid model configuration files, so they can be used to rerun the model with the same configuration.

Finally, if so specified in the model configuration, Bedymo will produce a bedymo_result.nc output file. Note that the result file is NOT protected against accidental overwrites as the report and status files, its file name does not include the XXXX counter. So if you run the model several times in the same folder and need to keep the output, you will need to manually rename/move the output file. This is to avoid the model filling up (even large) disk areas by accident.

Running with BedymoGUI

Alternatively, in order to start the GUI, you only need to execute the provided script via python bedymo_gui.py. Currently, the namelist and initialisation used for BedymoGUI is hardcoded in the script to be the default file names bedymo_std.nml and bedymo_init.nc. If you need to change these file names, you can do so in the script, just look for the line containing the call to the init_bedymo() function and adapt as required.

_images/BedymoGUI_screenshot.png

The GUI contains both a large plot area displaying the selected model field, as well as a number of control panels, see screenshot below. These control panels allow to:

  • Control which variable and level is shown in the plot area.

  • Control the model (start & stop integration, single-step).

  • Display some most relevant sections of the model configuration.

The model controls also allow to extend the model run beyond the configured number of time steps/lead time in the model configuration bedymo_std.nml. Access to all other configuration variables is read-only.

Using a predefined standard setup

Bedymo comes with a set of standard setups to illustrate its capabilities. They are also well-suited to be the basis for your own model setups. The available setups are in the run_config folder. They are

  • bedymo_std.nml.pe_cyclogenesis: An initial baroclinic zone balanced by a jet in a zonally periodic mid-latitude channel. A small initial perturbation triggers the development of a primary and secondary cyclone. The integration stops after 10 days.

  • bedymo_std.nml.pe_channel: As above, but including temperature relaxation to replenish the baroclinicity used by the growing cyclones. With the relaxation, the model arrives at a state that is roughly statistically stationary after about 300-500 days. The integration stops after 1000 days.

  • bedymo_std.nml.pe_mount: A mid-laititude channel without initial baroclinicity but a surface pressure gradient balanced by homogeneous geostrophic winds. The model domain contains an isolated Gaussian mountain which triggers a stationary planetary wave it its lee.

  • bedymo_std.nml.pe_coupled_matsuno_gill: A coupled setup using the slab ocean with equatorial beta-plane. The atmosphere is initialised by balanced homogeneous easterlies, the slab ocean with an isolated Gaussian SST anomaly which triggers a Matsuno-Gill type response in the tropical atmosphere. In this default setup, the atmospheric flow does not induce currents in the ocean.

Most of the setups also have a QG variant with qg instead of pe in the file name.

A detailled description of each standard setup is in Available standard setups.

Switching between QG and PE

To switch between QG and PE for any setup, three configuration items need to be adapted:

  • dt in the numerics namelist. As there are no inertia gravity waves in QG, we can use a much longer time step to speed up the simulation. For 100 km horizontal resolution, the standard setups use time steps of 180 seconds for PE and 1200 seconds for QG.

  • ladv_prog and ladv_vert in the physics namelist. Only for PE, horizontal advection is by the prognosed horizontal wind components (ladv_prog = T) and vertical advection is enabled (ladv_vert = T).

Full model configuration

Once you are comfortable to run the predefined model setups, feel free to adapt the configuration to your needs. The model can be configured through a configuration file, typically called bedymo_std.ntml. This file contain several Fortran namelists, each containing configuration variables as key-value pairs. The following tables describe the namelists one by one.

Shared configuration for all model components

The models namelist

Which of the available model components are to be used for the simulation?

Configuration key

Type

Description

latmos_bedymo

logical

Use the combined QG/PE atmospheric model?

latmos_bedymope

logical

Use the optimised PE atmospheric model (currently defunct)?

latmos_add_trace

logical

Use the atmospheric tracer module?

locean_slab

logical

Use the slab-ocean module?

The numerics namelist

The name list defines parameters used in the time integration and advection.

Configuration key

Type

Description

nt

integer

Number of time levels for prognostic variables.

dt

integer

Model time step in seconds.

alpha

real

Coefficient of the Robert-Asselin-Williams filter for leap frog.

adv_order_max

integer

Numerical order used for the discretisation of the advection.

int_scheme_id

integer

ID for the time integration scheme.

The timectrl namelist

The name list defines parameters that control time-related aspects, in particular the length of the simulation and the output interval.

Configuration key

Type

Description

lout

logical

Save simulation results (i.e. write a netCDF file)?

loutinit

logical

Save initialisation?

loutend

logical

Save end of model run?

tstop

integer

If above zero, number of time steps to run.

tsstop

integer

If above zero, length of simulation in seconds.

dtout

integer

Interval between two outputs, in seconds.

The grid namelist

The name list defines the common grid used for all models and the initialisation program.

Configuration key

Type

Description

nx

integer

Number of grid points in x-direction.

ny

integer

Number of grid points in y-direction.

nz

integer

Number of grid points in z-direction.

dx

real

Grid distance in x-direction in meters.

dy

real

Grid distance in y-direction in meters.

ztop

real

The altitude of the model top in meters.

lcoriolis

logical

Enable Coriolis force?

lbetaeffect

logical

Enable beta-Effect for Coriolis force?

fcor

real

Primary Corliolis parameter \(f_0\).

betacor

real

Secondary Coriolis parameter \(\beta\).

latbdrtyp_ew

integer

Boundary type ID for eastern and western boundaries.

latbdrtyp_sn

integer

Boundary type ID for southern and northern boundaries.

The topo namelist

The name list defines the common topography used for all models and the initialisation program.

Configuration key

Type

Description

top_surftyp

integer

If above zero, surface type ID for the topography.

top_amp

real

Amplitude parameter for the topography surface.

top_lx

real

If above zero, length scale in x-direction for the topography surface.

top_ly

real

If above zero, length scale in y-direction for the topography surface.

top_cx

integer

If above zero, center point index in x-direction for the topography surface.

top_cy

integer

If above zero, center point index in y-direction for the topography surface.

The metio namelist

The name list defines output parameters used for all models and the initialisation program. This name list will only take effect if lout is set in the timectrl name list.

Configuration key

Type

Description

loutbdr

logical

Save additional helper boundary points outside the model domain?

lcoards_compatible

logical

Make sure the results netCDF file adheres to the COARDS standard?

Configuration specific to a model component

The following namelists are specific one of the model components. If the corresponding component is not activated in the models-namelist described above, the corresponding namelists will be ignored.

The physics namelist

This namelist configures the combined QG/PE-model which can be activated with latmos_bedymo=T.

Configuration key

Type

Description

init_type

integer

Initialisation ID for one of the standard model setups.

lbasic

logical

Add a basic-state flow to the model setup, as for example from the confluence-shear model used to study frontogenesis in an idealised framework.

basic_type

integer

Basic state flow ID.

lforce

logical

Apply diabatic or prescribed forcing to the temperature tendency?

ladv

logical

Enable advection (applies to all variables)?

ladv_const

logical

Keep advection constant at its initial value?

ladv_ageo

logical

Enable ageostrophic advection (for SG)?

ladv_prog

logical

Enable prognostic advection (for PE)?

ladv_vert

logical

Enable vertical advection (for PE)?

lthermal_pres

logical

Enable thermal influence of pressure/geopotential fields?

lanelastic

logical

Disregard horizontal variations in density in the PE model?

lsurf_friction

logical

Enable linear friction in the lowest model level(s)?

ldamp

logical

Enable \(\nabla^2\)-damping?

vert_profile_type

integer

Initial stratification profile ID.

ekman_coeff

real

Linear friction parameter.

damp_coeff

real

Damping parameter.

relax_coeff

real

Relaxation coefficient for temperature relaxation.

swamp_depth

real

Currently unused.

The tracer namelist

The name list configures the optional tracer component, which can be added to one of the atmospheric models and activated by setting latmos_add_trace=T in the models name list.

Configuration key

Type

Description

lhumidity

logical

Add three tracer variables with suggestive names for a future convection parameterisation.

lpassive

logical

Enable passive tracers additional to the humidity-related ones?

npas

integer

Number of passive tracers to add.

The slabocean namelist

The name list configures the optional slab ocean component, which can be added to one of the atmospheric models.

This name list will only take effect if locean_slab is set in the models name list.

Configuration key

Type

Description

lcurrent_ekman

logical

Enable ocean advection by Ekman currents?

lcurrent_prescribed

logical

Enable ocean advection by prescribed currents?

lreservoir_prescribed

logical

Enable upwelling with rescribed reservoir temperature?

lrelaxation

logical

Enable ocean temperature relaxation?

relaxation_coeff

real

Ocean temperature relaxation coefficient.

drag_coeff

real

Ocean-atmosphere momentum exchange coefficient.

sh_exchange_coeff

real

Ocean-atmosphere heat exchange coefficient.

mixed_layer_depth

real

Depth of the slab ocean layer.