GEM offers the possibilities of running global uniform (up to version 4), global YinYang (starting version 4) and limited area (LAM) grids. Have a look at the grid types.
The grid is specified in the file 'gem_settings.nml' in the namelist 'grid'. This GEM grid specification parameters link explains how to define the parameters. Alternatively, see below.
You have to set variables for the
Grid type
First thing to do is to set 'Grd_typ_S' to the grid type you want:
Grd_typ_S='GU' | : | Global Uniform grid - not used anymore | |
Grd_typ_S='GY' | : | Global YinYang grid | |
Grd_typ_S='LU' | : | Limited area, Uniform |
Grid rotation (optional)
Next specify whether your grid is to be rotated or not (if not just skip this paragraph).
Four variables are used to define the rotation of the grid. They define two points:
- The first point will be the new center of your grid (at the grid(!) equator and the grid(!) 180° longitude).
- The second point is any other point on the grid(!) equator east of the center and will therefore set the rotation of the grid equator wrt the real equator in the first point.
Both points are specified in latitudes and longitudes of the real globe. For example:
Grd_xlon2 = -10.00 , Grd_xlat2 = 0.00 ,
To create a grid that is shifted but not rotated in the center point Grd_xlat2 and Grd_xlon2 should get set the following way:
Grd_xlat2 = 0.,
Grd_xlon2 = Grd_xlon1 + 90. => You need to set it to the value 'Grd_xlon1 + 90.', do not actually put 'Grd_xlon1' here!!!
Number of grid points and grid size
Global uniform grid
It is enough to specify the total number of points. The model will then calculate size of the grid boxes automatically.
Grd_ni | : | total number of grid points in x-direction | |
Grd_nj | : | total number of grid points in y-direction |
Global Yin-Yang grid
One only needs to specify the core/free number of points in y-direction (Grd_nj) as well as the "overlap" in degrees (Grd_overlap). The model will calculate the number of points in x-direction as well as the size of the grid boxes automatically from that.
Grd_nj | : | core/free number of grid points in y-direction Including overlap!!! => Number of points covering 90°+2*Grd_overlap | |
Grd_overlap | : | overlap in degrees(!) |
Note that there is no blending/merging area, also called Davies sponge, in Yin-Yang grids, which means that the free area is the same as the core area!
To specify a Yin-Yang grid one should only specify 'Grd_nj' and 'Grd_overlap'. 'Grd_ni' will get calculated automatically using the following equation:
Grd_ni = ( (Grd_nj - 1) * 3 ) + 1
This means the overlap is 3 times larger on the left and right border of each LAM grid than at the top and bottom! This is done because the solver needs the grids to be 3 times larger in x- than in y-direction (minus 1 point).
An overlap is needed because the two LAM grids will give different answers in the overlap region and the larger the overlap region the easier it is for the solver to find the common solution.
To learn more about Yin-Yang grids have a look at the following wiki page: Yin-Yang grid
LAM grid
Specify the total number of points and the size of the grid boxes in degrees.
If possible, insure that the total number of grid points in x-direction matches the FFT criteria. This will speed up your simulation by up to 10 %.
Grd_ni | : | core(!) number of grid points in x-direction (including blending but excluding pilot area) | |
Grd_nj | : | core(!) number of grid points in y-direction (including blending but excluding pilot area) | |
Grd_dx | : | grid size in x-direction in degrees | |
Grd_dy | : | grid size in y-direction in degrees |
Location of limited area (just for LAM grids)
The only thing left now when setting up a LAM grid is to specify where the limited area is located on the rotated grid.
Grd_iref | : | reference point in limited area region, x-grid coordinate | |
Grd_jref | : | reference point in limited area region, y-grid coordinate | |
Grd_latr | : | location of reference point in "grid latitude" | |
Grd_lonr | : | location of reference point in "grid longitude" |
Click here to find out how to set blending and pilot area (halo).
FFT criteria
To fulfill the FFT criteria the number of grid points in x-direction, excluding the pilot zone, must be a multiple of 2, 3, and 5. Use the findfft GEMCLIM script to find the possible numbers of grid points fulfilling the FFT criteria.
Again you need to insure that the model environment is set.
Then you can use findfft:
findfft | -min | : | minimum number of grid points, default 150 | |
-max | : | maximum number of grid points, default 250 |
This command will then print all "good" values you can use for 'Grd_ni' and 'Grd_nj' (can be different) between the range you specified with 'min' and 'max'.
Verify your grid
After having specified a grid in the file 'gem_settings.nml' you can have a look at the grid you specified using the grille script - see description below.
In the directory in which you have your file 'gem_settings.nml' simply type :
grille -xrec
or, if you just want to see the free grid:
grille -xrec -grid free
'grille'
The command 'grille' reads the namelist 'grid' from an input file and :
1. creates 3 files with the corresponding tictacs of the:
a) model grid (tape1_model) - this file is needed as input to GenPhysX!!!
b) core grid (tape1_core)
c) free_grid (tape1_free)
2. opens 'xrec' with the domain specified in 'grid' - only if requested - see table below.
These are the keys that can get used with the command:
key | description |
---|---|
-nml | name of namelist file, 'gem_settings.nml' is the default |
-xrec | open xrec showing the chosen (see '-grid') domain |
-grid | domain to plot: free, core or model (default) |
-topo | add topography to tape files |
-geophy | name of geophys file containing 'ME' and 'MG' used for xrec plot default: ~data/Geophys/geo_801x600 |
After having specified a grid in the file 'gem_settings.nml' you can have a look at the grid you specified using the grille script.
In the directory in which you have your file 'gem_settings.nml' simply type :
grille -xrec
This command will open 'xrec' with three fields of your grid:
LA | : | Latitudes | |
LO | : | Longitudes | |
ME | : | Mountain heights |