...
Section | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Getting data
The SW model still needs the ICMSH (spectral fields) and ICMGG (gridpoint) files to correctly start. In the idealized case, these are read solely to set the model's spectral and gridpoint resolution and the model will overwrite the initial state read from file (see the code in suspecb.F90).
...
Panel | |||||||
---|---|---|---|---|---|---|---|
| |||||||
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.
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. |
...
If you have access to the MARS archive at ECMWF then an example of how to retrieve single level fields for use with the SW model is:
...
Code Block | ||||
---|---|---|---|---|
| ||||
! 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 LRFRICNFPOS=false0, ! 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 LSLAGLSLPHY=truefalse, ! turn !off enableSl SLphysics schemeoption LSLPHYLSPRT=false, ! turn off Sl physics option LSPRT=false, 'virtual temperature' as spectral variable NFRHIS=10, ! turn off 'virtual! temperature'frequency asof spectralresults variableoutput LFRHISNUNDEFLD=100, ! frequency of results outputmake sure uninitialised variables are all set to zero For namelist: NAEPHYNAMARG LEPHYSNCONF=false201, ! turnselect off ECMWF Physics package (master switch) LERADI=falseshallow-water configuration LSLAG=true, ! turnenable offSL radiation scheme For namelist: NAMDYNA LGRADSP=.false., UTSTEP=1800.0, ! disablemodel de-aliasing the pressure gradient termtimestep (resolution dependent) For namelist: NAMDIMNAMPAR0 NUNDEFLDNPROC=01, ! makeonly sureuse uninitialised1 variablesMPI areprocess all set to zero | ||||
Code Block | ||||
| ||||
! Shallow-water model with Euler 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 TSTEP=300.0in 2-D. NPRGPEW=1, ! required for 2-D configurations For namelist: NAEPHY LEPHYS=false, ! turn off ECMWF !Physics reducepackage timestep for Euler stepping(master switch) REPS1LERADI=0.01false, ! turn onoff Asselin time-filtering coefficient REPS2=0.01, LHDIFFMradiation scheme For namelist: NAMDYNA LGRADSP=.false., ! disable horizontalde-aliasing diffusionthe onpressure /gradient offterm LSETTLSLRFRIC=.false., ! extrapolationsturn inoff SLRayleigh friction |
Code Block | ||||
---|---|---|---|---|
| ||||
! 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,scheme LSETTLST=.false., ! ditto For namelist: NAMCT0 NCONF=201, ! model configuration: 201 = shallow-water (see yomct0.F90) LSLAG=.false., ! turnhorizontal off semi-lagrangian schemediffusion parameters LTWOTLHDIRDIV=1.false.e15, ! see code for !further disable two-time-level SL scheme. LRFRIC=.false.description HDIRSP=1.e15, LHDIFFM=true, NDIFFACT=6, TSTEP=1800.0, ! turnmodel offtimestep Rayleigh(resolution frictiondependent) LSLPHYLSETTLS=.false.true, ! ensure SL !scheme turnis off split time-step physics LVERTFE=.falseenabled LSETTLST=true, SITR=350., ! turn off vertical finite element schemereference temperature N2DINIREFGEO=178452.0, ! reference geopotential for SW model For namelist: NAMCT0 LRFRIC=false, ! initialise 1 = Haurwitz wave,! 2turn =of realRayleigh fieldsfriction LSPRTLFPOS=.false., ! ifdisable T temperature is 'virtual temperature' LFPOS=falsefullpos post-processing N2DINI=1, ! 2D !initialisation turn off fullpos diagnostics, does not work with SW N3DINI=0,switch NCONF=201, ! select shallow-water configuration LTWOTL=true, ! no 3D initialisation NSTOP=600 enable two-time level SL scheme LSLAG=true, ! enable SL scheme LSLPHY=false, ! no.turn ofoff stepsSl tophysics runoption NFRHISLSPRT=10,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 |
Also, add a blank namelist to fort.4
for the idealized cases. Some configurations selected using N2DINI
will expect to find a namelist NAMSWE
.
Code Block |
---|
&NAMSWE
/ |
Gotchas
There are a number of issues that can cause the model to fail. Please make sure:
Code Block | ||||
---|---|---|---|---|
| ||||
! Shallow-water model with Euler 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
TSTEP=300.0, ! reduce timestep for Euler stepping
REPS1=0.01, ! turn on Asselin time-filtering coefficient
REPS2=0.01,
LHDIFFM=.false., ! horizontal diffusion on / off
LSETTLS=.false., ! extrapolations in SL scheme
LSETTLST=.false., ! ditto
For namelist: NAMCT0
NCONF=201, ! model configuration: 201 = shallow-water (see yomct0.F90)
LSLAG=.false., ! turn off semi-lagrangian scheme
LTWOTL=.false., ! disable two-time-level SL scheme.
LRFRIC=.false., ! turn off Rayleigh friction
LSLPHY=.false., ! turn off split time-step physics
LVERTFE=.false., ! turn off vertical finite element scheme
N2DINI=1, ! initialise 1 = Haurwitz wave, 2 = real fields
LSPRT=.false., ! if T temperature is 'virtual temperature'
LFPOS=false, ! turn off fullpos diagnostics, does not work with SW
N3DINI=0, ! no 3D initialisation
NSTOP=600, ! no. of steps to run
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
|
Also, add a blank namelist to fort.4
for the idealized cases. Some configurations selected using N2DINI
will expect to find a namelist NAMSWE
.
Code Block |
---|
&NAMSWE
/ |
Gotchas
There are a number of issues that can cause the model to fail. Please make sure:
Info | ||
---|---|---|
| ||
The model will fail unless the environment variable:
is set in the job script. This is because the shallow-water code uses a different set of subroutines for output and does not go through the usual code path for 3D forecasts (if NCONF=1). Otherwise the model will crash at the first output attempt. | ||
Info | ||
| ||
The model will fail unless the environment variable:
is set in the job script. This is because the shallow-water code uses a different set of subroutines for output and does not go through the usual code path for 3D forecasts (if NCONF=1). Otherwise the model will crash at the first output attempt. Users will usually see a failure from the grib_api library (typically grib_set_real8_array). |
...
Code Block | ||
---|---|---|
| ||
READ,
DATA = 'ICMSHepc9+000594',
INTERPOLATION = LINEAR FIT,
GRID = 5/5,
GAUSSIAN = REGULAR |
For more information about Metview please see Using Metview with OpenIFS or contact openifs-support@ecmwf.int.
Code changes
Warning |
---|
if running OpenIFS 38r1 (all versions), code changes are required before using the shallow water option initialized with real fields (N2DINI=3 & NCONF=201). Changes are required because the shallow-water code uses older code for reading GRIB data that was omitted from OpenIFS before the shallow-water option was made available. |
Required steps to enable shallow-water code option
REGULAR |
For more information about Metview please see Using Metview with OpenIFS or contact openifs-support@ecmwf.int.
Anchor | ||||
---|---|---|---|---|
|
Warning |
---|
if running OpenIFS 38r1 (all versions), code changes are required before using the shallow water option initialized with real fields (N2DINI=3 & NCONF=201). Changes are required because the shallow-water code uses older code for reading GRIB data that was omitted from OpenIFS before the shallow-water option was made available. |
Required steps to enable shallow-water code option
- Download the OpenIFS 38r1 shallow-water replacement source tarball: openifs38r1_sw_newsrc.tgz
(this file is also available on the OpenIFS ftp site) Make a backup copy of the OpenIFS source code in the directory where the OpenIFS model files were unpacked:
Code Block cp -r src src.orig
Delete some files that will be replaced:
Code Block rm src/openifs/dummy/decops2.f90 rm src/openifs/dummy/gribex.f90 rm src/openifs/emos/pbio/emosnum.F rm src/openifs/emos/pbio/fortint.h rm -r src/openifs/emos/gribex # delete entire 'gribex' director
Unpack the tarfile downloaded above. This will create a new directory '
src/openifs/emos/gribex
'.
Make sure the tarfile is in the top level directory that contains 'src
':Code Block # Make sure openifs38r1_sw_newsrc.tgz is in the directory that contains 'src. tar xzvf openifs38r1_sw_newsrc.tgz
Verify that '
src/openifs/emos/gribex
' exists and contains source code.- Download the OpenIFS 38r1 shallow-water replacement source tarball: openifs38r1_sw_newsrc.tgz
(this file is also available on the OpenIFS ftp site) Make a backup copy of the OpenIFS source code in the directory where the OpenIFS model files were unpacked:
Code Block cp -r src src.orig
Delete some files that will be replaced:
rm src/openifs/dummy/decops2.f90 rm src/openifs/dummy/gribex.f90 rm src/openifs/emos/pbio/emosnum.F rm src/openifs/emos/pbio/fortint.h rm -r src/openifs/emos/gribex # delete entire 'gribex' directorCode Block To compile the code if using GNU/gfortran, it may be necessary to enable the use of cray pointers.
Edit 'make/oifs.cfg
' and change:Code Block oifs.prop{fc} = $OIFS_FC
to:
Code Block oifs.prop{fc} = $OIFS_FC -fcray-pointer
...
In the routine suspecb, you can choose between idealized cases or read one level of a grib file (N2DINI is the key for this choice). suspecb is called at cnt3 level - the first part of the GP computations are done from a routine called CPG2 which is a very simplified version of the 3D GP computation, the other (lagged, mostly SL computation) are done in CPG2_LAG Both cpg2 and cpg2_lag are called by the driver routine gp_model which is also the driver routine of the 3D GP computation. - the spectral computation are done under spc with the 2D configurations calling spc2.
Info |
---|
with thanks to Nils Wedi and Sylvie Malardel, ECMWF. |
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|