Grid Datablade Demos

  1. Introduction
  2. GET-GIEF form
    1. Spatial Interpolation
    2. Retrieving points along a future flight path
    3. Re-projection
  3. Retrieving a several levels at once: a post
  4. Retrieving 3D cube
  5. Retrieving 4D cube
  6. References

  

Introduction

Metcast/Grid datablade interface is functional to run a the first five retrieveal Use cases [Use-cases] -- and a few extra use cases. You can really extract a subgrid of a grid, at the same or a different resolution, at the same or a different projection. I must emphasize that you can store the result of a COAMPS model in its native Lambert-Conformal projection, and retrieve the grid in the same Lambert-Conformal projection -- or in the uniform Lat-Lon (Equidistant-Cylindrical) projection. To my knowledge, the latter has not been possible until now. You can also request an interpolation to a particular time moment or a particular level. This has not been possible before. Furthermore, The users can really retrieve 'posts' as well as 3D and the full 4D cubes.

I must emphasize that most of the functionality described on this page has never been possible before.

The code has been checked into the CVS Repository. The code has many comments, which you are encouraged to read. In particular, gief-serve.scm [gief-serve.scm] is a Metcast query module and the MBL executor. The file test-gief-serve.scm [test-gief-serve.scm] is a regression test suite that checks the first five query use cases. The test cases include the corresponding MBL expressions.


  

GET-GIEF form

There is also a primitive user interface, the [GET-GIEF] form. The web page is just a helper to compose a query and to display the results in a legible form. If you press a 'Show MBL' button, you can see the MBL request that the script generates and submits. You can cut that MBL expression and paste it into a Metcast client of your choice. If you press a Retrieve button, you will see the result. The datablade sends the resulting grid in a GIEF (NetCDF) format. Since that binary format is not very suitable for viewing, the GUI script employs a ncdump program to convert the binary NetCDF file into something humanly legible. At least you should be able to see the dimensions of the grid and its parameters.

The get-gief form is not terribly user friendly. You might encounter some errors, even 500 Server errors . Most of the time, they are _your_ errors. You must've submitted a request that doesn't make sense or isn't implemented yet.

You can run the form as it is filled in. Just press the Retrieve button.

The field Reference time is not mandatory, provided that the valid time is specified as an absolute timestamp. If you open the above form, clear the field Reference time , and press the Retrieve button, you'll still get the data.

If the reference time is omitted, the Metcast server returns the results of the latest applicable model run. That is, the server looks through the results of the specified model with the desired parameter (e.g., "Air Pressure") for the desired valid times and by specified originator, model runtime name and geometry name (if given). The result for the latest available reference time is returned. Perhaps this will be the most frequent mode of query. Still, clients who are interested in a specific model run, can do that too.


  

Spatial Interpolation

To check the interpolation, replace 1000 with 995 for example, in the Levels field on the form. If you just press the Retrieve button, you'll see a message that nothing was found to satisfy the request. If you change the Match mode in the z column from Exact to Nearest neighbor and then press Retrieve , you'll get the grid, whose meta-data show that the grid indeed corresponds to the 995 MB level.


  

Retrieving points along a future flight path

You can interpolate in time, too. What's more, you can retrieve any point in an interpolated lat-lon-time-z grid. For example, open the get-gief form and set:
Valid time is... to Hours Relative Ref Time
Valid time to 0
Levels to 1000
Match mode to time linear , z linear
Latitude to 20 and 20
Longitude to -120 and -120

Press Retrieve . You'll get the grid with only one point. Now, get back to the form and change:
Valid time to 0.5 (which corresponds to is, 2002-05-20T12:30)
Levels to 998
Latitude to 21.5 and 21.5

Press Retrieve . You get another point, at the specified lat/lon/time/pressure-level. Go back, change:Valid time to 1.5 (which corresponds to is, 2002-05-20T13:30)
Levels to 990
Latitude to 23.3 and 23.3
and get yet another point. You can thus ask the datablade for data for any point along the planned flight path.

The datablade currently supports nearest-neighbor and linear interpolations. Other interpolations methods can be plugged in.


  

Re-projection

To test re-projection, fill the form as follows:Model Name to COAMPS_E_PAC
Levels to 1000
Match mode to time Exact , z Exact
Leave the other fields as they are. Press Retrieve . Observe in the output that the srtext attribute says

     PROJCS["Africa_Lambert_Conformal_Conic" ....

That is, you received a lambert-conformal grid, in the "native" projection of the COAMPS model. Observe that the affine_transformation attribute says:

     :affine_transformation = 0., 0., 0., 2076.92307692308...

Here 2076.92 is the resolution of the returned grid, 2+ km per grid point at one of the standard latitudes.

Go back to the form, and set:Target Resolution to 5000 and 5000
Latitude to 18 and 20
Longitude to -135 and -120
Press Retrieve . Observe that now :affine_transformation attribute says the grid resolution is 5000 m.

Go back to the form, and set:Target Resolution to 0.1 and 0.1
Projection to Uniform LatLon
Press Retrieve . Observe the the result is now in the Uniform LatLon Projection. Most of the resulting grid is empty, because the original grid does not cover the whole georectangle.


  

Retrieving a several levels at once: a post

You can query for several levels at once. Open the get-gief form and set:Levels to 1000 995 990
Match mode to time linear , z linear
Latitude to 20 and 20 Longitude to -120 and -120
Press Retrieve and obtain a NetCDF document with three values: the post -- the set of data for several vertical levels for a single point on the globe. Post is one of the most frequently requested features.


  

Retrieving 3D cube

If you go back to the form and set:Latitude to 20 and 25 Longitude to -120 and -115
and press Retrieve again, you'll get a set of points for a 3D cube: lat/lon/elevation (pressure level, actually). Many visualization and mission-planning systems prefer such data cube. I must emphasize that this data cube came in one NetCDF file in response to a single request. Previously, to retrieve such a data cube, a client had to make several requests, receive 2D slices of such cube, and reconstruct the cube on his own.


  

Retrieving 4D cube

But we can do even better: go back to the form, setValid time is... to Hours Relative Ref Time
Valid time to 0 1 2 3
and Press Retrieve . Note that you get the resulting NetCDF file has 4 time slices, 3 level slices, 6 rows and 6 columns. You received the full 4D cube.


  

References

[GET-GIEF]
<http://zowie.metnet.navy.mil/cgi-bin/oleg/get-gief>

[Use-cases] Grid database Use Cases

[gief-serve.scm] Mserver/server/code/gief-serve.scm
in the Metcast CVS Repository

[test-gief-serve.scm] Mserver/server/codetest-gief-serve.scm
in the Metcast CVS Repository

[Grid-datablade] Grid datablade development notes
<http://www.metnet.navy.mil/~hofschnr/>


Last updated December 12, 2002

Converted from SXML by SXML->HTML

$Id: Grid-demos.scm,v 1.1 2002/12/12 19:45:51 oleg Exp oleg $