Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Confirmed.

...

Section


Column


Info

OpenIFS includes a number of idealised configurations. In this article we explain how to:

  • setup and run a shallow-water model
  • set idealized (e.g. Rossby-Haurwitz wave) or real single level field.
  • enable semi-Lagrangian or Euler timestepping
  • create the initial fields

Configuration

The shallow-water (SW) configuration is one of several that exist in OpenIFS (and IFS). The configuration is set by the variable NCONF in namelist NAMCT0 (see yomct0.F90). The normal 3D primitive equation configuration uses NCONF=1.

For the 2D SW configuration, NCONF=201.

The 2D SW model can be initialised in various idealized states or from a single level real field. This initialisation is controlled by another variable, N2DINI in the namelist NAMCT0.

As these idealized configurations are primarily research tools, they may vary from one major model release to another and not all options found in the code are guaranteed to work.

N2DINI = 1 in NAMCT0 will initialise the Rossby-Haurwitz wave case (Williamson et al, J. Comput. Phys., 1992).
N2DINI = 3 in NAMCT0 will initialise the SW model with real fields read from GRIB.

The reader is invited to look in suspecb.F90 to see what other initialisation options as possible (N2DINI=42 does not work).

Although there is mention of NCONF=202 (the Vorticity Equation configuration) in the code, this does not work.

Warning
titleWarning: code changes required for OpenIFS 38r1

OpenIFS 38r1 (all versions) require code changes in order to be able to run with N2DINI=3 (initialized with real fields). Please see Code Changes below.



Column

Image RemovedImage Added

Panel
bgColorwhite
titleBGColor#f0f0f0
titleOn this page...
Table of Contents
maxLevel2



...

Panel
bgColorwhite
titleBGColor#f0f0f0
titleCreating initial fields from existing GRIB files

The GRIB files from an existing experiment can also be used to create initial files for the shallow-water model. In the following example, the initial files from the T21 test case distributed with the OpenIFS tarfile are used.

Code Block
titleExtract starting files from existing experiment
collapsetrue
#  Extract a single level (level 1) for the shallow water model
#  and change the experiment id in the file.

expid="epc8"
newid="sw01"

grib_copy -w level=1,shortName=vo ICMSHepc8INITICMSH${expid}INIT tmp
grib_set -s experimentVersionNumber=epc9"$newid" -w experimentVersionNumber=epc8"$expid" tmp vo.grb

grib_copy -w level=1,shortName=d  ICMSHepc8INITICMSH${expid}INIT tmp
grib_set -s experimentVersionNumber=epc9"$newid" -w experimentVersionNumber=epc8"$expid" tmp d.grb

grib_copy -w shortName=z          ICMSHepc8INIT ICMSH${expid}INIT z.grb

#  Combine the 3 files to form the spectral initial file
cat vo.grb d.grb z.grb  > ICMSHepc9INIT ICMSH${newid}INIT

#  Create gridpoint file (stl1 is used in this example)
grib_copy -w shortName=stl1 ICMGGepc8INITICMGG${expid}INIT gg.grb
grib_set -s experimentVersionNumber=epc9${newid} -w experimentVersionNumber=epc8${expid} gg.grb ICMGGepc9INITICMGG${newid}INIT

For idealized configurations the field in the initial data file is used correctly set the grid. The actual values are overwritten by the model code to set the idealized start. Hence stl1 is used in this example to for the initial gridpoint file because its values will be overwritten and not used to initialize the model fields.

...

Code Block
titlesemi-Lagrangian advection namelist (43r3)
collapsetrue
!  Shallow-water model with semi-Lagrangian advection.
!  The variables below must be set in order to correctly configure
!  the shallow-water model.
!  Other variables (if present) can be left as-is.

For namelist : NAMDYN
 HDIRVOR=1.e15,        ! horizontal diffusion parameters
 HDIRDIV=1.e15,        ! see code for further description
 HDIRSP=1.e15,
 LHDIFFM=true,
 NDIFFACT=6,
 TSTEP=1800.0,         ! model timestep (resolution dependent)
 LSETTLS=true,         ! ensure SL scheme is enabled
 LSETTLST=true,
 SITR=350.,            ! reference temperature
 REFGEO=78452.0,       ! reference geopotential for SWshallow-water model

For namelist: NAMCT0
 NFPOS=0,              ! disable fullpos post-processing
 N2DINI=1,             ! 2D initialisation switch
 LTWOTL=true,          ! enable two-time level SL scheme
 LSLPHY=false,         ! turn off Sl physics option
 LSPRT=false,          ! turn off 'virtual temperature' as spectral variable
 NFRHIS=10,            ! frequency of results output

For namelist: NAMARG
 NCONF=201 NUNDEFLD=0,            ! selectmake shallow-water configurationsure uninitialised variables are all set to zero

For namelist: NAMARG
 NCONF=201,            ! select shallow-water configuration
 LSLAG=true,           ! enable SL scheme
 UTSTEP=1800.0,         ! model timestep (resolution dependent)

For namelist: NAMPAR0
 NPROC=1,              ! only use 1 MPI process in 2-D.
 NPRGPEW=1,            ! required for 2-D configurations

For namelist: NAEPHY
 LEPHYS=false,           ! turn off ECMWF Physics package (master switch)
 LERADI=false,           ! turn off radiation scheme

For namelist: NAMDYNA
 LGRADSP=.false.,        ! disable de-aliasing the pressure gradient term
 LRFRIC=false,         ! turn off Rayleigh friction

For namelist: NAMDIM
  NUNDEFLD=0,            ! make sure uninitialised variables are all set to zero


Code Block
titlesemi-Lagrangian advection namelist (40r1)
collapsetrue
!  Shallow-water model with semi-Lagrangian advection.
!  The variables below must be set in order to correctly configure
!  the shallow-water model.
!  Other variables (if present) can be left as-is.

For namelist : NAMDYN
 HDIRVOR=1.e15,        ! horizontal diffusion parameters
 HDIRDIV=1.e15,        ! see code for further description
 HDIRSP=1.e15,
 LHDIFFM=true,
 NDIFFACT=6,
 TSTEP=1800.0,         ! model timestep (resolution dependent)
 LSETTLS=true,         ! ensure SL scheme is enabled
 LSETTLST=true,
 SITR=350.,            ! reference temperature
 REFGEO=78452.0,       ! reference geopotential for SW model

For namelist: NAMCT0
 LRFRIC=false,         ! turn of Rayleigh friction
 LFPOS=false,          ! disable fullpos post-processing
 N2DINI=1,             ! 2D initialisation switch
 NCONF=201,            ! select shallow-water configuration
 LTWOTL=true,          ! enable two-time level SL scheme
 LSLAG=true,           ! enable SL scheme
 LSLPHY=false,         ! turn off Sl physics option
 LSPRT=false,          ! turn off 'virtual temperature' as spectral variable
 NFRHIS=10,            ! frequency of results output

For namelist: NAEPHY
 LEPHYS=false,           ! turn off ECMWF Physics package (master switch)
 LERADI=false,           ! turn off radiation scheme

For namelist: NAMDYNA
 LGRADSP=.false.,        ! disable de-aliasing the pressure gradient term

For namelist: NAMDIM
  NUNDEFLD=0,            ! make sure uninitialised variables are all set to zero

...

For more information about Metview please see Using Metview with OpenIFS or contact openifs-support@ecmwf.int.

...