![]() | ![]() | Home | ![]() | My BADC | ![]() | Data | ![]() | Search | ![]() | Community | ![]() | Help | ![]() |
![]() | News | Conferences | Trajectory Service | ![]() |
The following utilities are provided to accompany the BADC Unified Model ancillary file service, in order to assist with generating rotated grids for use with limited area modelling.
Grid chooser utility: Prompts for inputs describing the grid in a user-friendly format (i.e. true location position of centre, direction of grid north, size and spacing of grid), and outputs the grid parameters in the format used by the model (location of pole, coordinates in rotated grid). Implemented in Python.
Grid display utility: Takes grid parameters in the format used by the model, and generates screen plots and a netCDF CF file showing the true position of the grid points. Implemented in IDL.
After downloading the software and unpacking the tar file,
Change to directory grid_chooser and invoke
./choosegrid.py to run the grid chooser utility.
Change to directory grid_display, start IDL, and type
showgrid to run the grid display utility.
If you do not have IDL licences, you can run the precompiled version using
the IDL virtual machine (VM), which
can be downloaded without charge. After
installing the VM, type "idl -rt=showgrid.sav" to run the
utility.
In both cases, follow the on-screen prompts.
This example uses a limited-area grid over New Zealand.
Here is an example session. User input is shown in bold.
% cd grid_chooser/
% ./choosegrid.py
BADC rotated grid chooser (version 1.0)
-------------------------
This utility accompanies the BADC UM file ancillary service, and suggests
the parameters for the rotated grid (e.g. position of pole), given the
desired centre and related parameters.
Enter true longitude at centre: 173.5
Enter true latitude at centre: -41.
Enter bearing of grid north (clockwise from true north) at centre: 30.
Enter number of grid longitudes (columns): 31
Enter number of grid latitudes (rows): 81
Enter grid spacing in km at centre: 20.
Grid parameters
---------------
Your inputs:
True coordinates of centre: lon = 173.5, lat = -41.0
Bearing of grid north at centre: 30.0
Number of lons: 31, of lats: 81
Outputs:
First point at lon = 147.395202297, lat = -7.19457284735
Rotated pole at lon = 214.848679071, lat = 40.8134031252
Longitude spacing = latitude spacing = 0.179864321184
------------
Here are the relevant numbers in a form to paste directly into the
prompts of the rotated grid display utility.
81
31
-7.19457284735
147.395202297
40.8134031252
214.848679071
0.179864321184
0.179864321184
------------
Here is an example session. Again user input is shown in bold. In this case, the values previously returned by the grid chooser utility (see above) are pasted into the prompts as suggested.
% cd ../grid_display/
% idl
IDL> showgrid
-----------------------------------------------------------------------
BADC rotated grid display utility (version 1.0)
---------------------------------
This program accompanies the BADC UM ancillary file service,
and enables you to test the parameters of your rotated grid.
Enter the grid parameters, as you would enter them for the ancillary
file service, and a screen plot and a netCDF datafile will be generated
showing the true location of the grid points.
-----------------------------------------------------------------------
Number of rows: : 81
Number of columns: : 31
First latitude: : -7.19457284735
First longitude: : 147.395202297
Rotated pole latitude: : 40.8134031252
Rotated pole longitude: : 214.848679071
Latitude spacing: : 0.179864321184
Longitude spacing: : 0.179864321184
[plot generated - see below]
Output file "grid.nc" created
Press enter to finish: :
Here is a screenshot image showing the limited area region on a global map and on an enlarged map (click to enlarge; not all gridpoints are visible on the reduced version).
And here is the output netCDF file: download
or view ncdump output.
![]() | Home | Contact | Disclaimer | Last Modified:
| ![]() |