Re: determine if Native grid or not?

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Thu, 17 Jan 2008 12:20:41 -0700

Erik,

The term, "native", as used in the context of NCL graphics, actually
refers to
how the data is plotted. A native grid plot is one in which the map
projection and
map limits are set to correspond exactly with the grid the data is
supplied on.

When drawn as a native grid plot, the data points form a rectilinear
grid that
fills the viewport, and no transformation is required to warp the
data locations to
the shape of map projection. You could think of it as the map being
warped to
fit the natural shape of the data. It is normally much faster,
especially when the
data is in a projection such as Lambert Conformal that requires 2D
coordinate
arrays.

The grid in the file you list below is cylindrical equidistant, also
known as platte carre,
or simply lat/lon. It requires only 1D coordinates to represent
because each row in the
data array has a single latitude and each column has a single
longitude. But it can be drawn
using its native projection like any other data with geographical
coordinates. To do
so you would sent mpProjection to CylindricalEquidistant and set the
map limits to
the boundaries of the data. Because it uses 1D coordinates you would
not in fact need
to use the "corners" limit mode (although you could). You could
instead use the "latlon"
limit mode setting the mp[Min|Max][Lat|Lat]F resources to the
boundary lats and lons,
which in this case are equal to the Lo1,La1, Lo2, La2 attributes.

Of course these data can be shown in other projections as well, but
then it would not
be a "native" grid plot.

I hope this is not too confusing.
  -dave

On Jan 17, 2008, at 9:46 AM, ern_at_student.matnat.uio.no wrote:

> Hi All,
> I have some questions regarding how to determine if some data is on a
> Native grid projection or not, both in general as well as on a
> particular
> grib-file from a mm5-run.
>
> 1) From the ncl-manual
> http://www.ncl.ucar.edu/Document/Manuals/graphics_man.pdf
> I understood that if the file contains an attribute such as "grid
> type",
> it is on Native Grid. Is that correct? Is that always valid?
> So, if I run for example ncl_filedump and there is an attribute called
> "grid type" it should be on native grid?
>
>
>
> 2) Running ncl_filedump on my mm5-grib file I get the following:
>
> $ ncl_filedump
> DAG/20071112/gribs_d03/gribfile_d3.2007111218.f38.U10SLP.latlon.grib
> Copyright (C) 1995-2007 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 5.0.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> Variable: f (file variable)
>
> filename: gribfile_d3.2007111218.f38.U10SLP.latlon
> path:
> DAG/20071112/gribs_d03/gribfile_d3.2007111218.f38.U10SLP.latlon
> file global attributes:
> dimensions:
> g0_lat_0 = 46
> g0_lon_1 = 69
> variables:
> float PRES_GDS0_GPML ( g0_lat_0, g0_lon_1 )
> center : Athens
> long_name : Pressure
> units : Pa
> _FillValue : -999
> level_indicator : 103
> gds_grid_type : 0
> parameter_table_version : 1
> parameter_number : 1
> level : 0
> forecast_time : 38
> forecast_time_units : hours
> initial_time : 11/12/2007 (18:00)
>
> float U_GRD_GDS0_HTGL ( g0_lat_0, g0_lon_1 )
> center : Athens
> long_name : u-component of wind
> units : m/s
> _FillValue : -999
> level_indicator : 105
> gds_grid_type : 0
> parameter_table_version : 1
> parameter_number : 33
> level : 10
> forecast_time : 38
> forecast_time_units : hours
> initial_time : 11/12/2007 (18:00)
>
> float V_GRD_GDS0_HTGL ( g0_lat_0, g0_lon_1 )
> center : Athens
> long_name : v-component of wind
> units : m/s
> _FillValue : -999
> level_indicator : 105
> gds_grid_type : 0
> parameter_table_version : 1
> parameter_number : 34
> level : 10
> forecast_time : 38
> forecast_time_units : hours
> initial_time : 11/12/2007 (18:00)
>
> float g0_lat_0 ( g0_lat_0 )
> long_name : latitude
> GridType : Cylindrical Equidistant Projection Grid
> units : degrees_north
> Dj : 0.04
> Di : 0.04
> Lo2 : 1.82
> La2 : 40.2
> Lo1 : -0.9
> La1 : 38.4
>
> float g0_lon_1 ( g0_lon_1 )
> long_name : longitude
> GridType : Cylindrical Equidistant Projection Grid
> units : degrees_east
> Dj : 0.04
> Di : 0.04
> Lo2 : 1.82
> La2 : 40.2
> Lo1 : -0.9
> La1 : 38.4
>
>
>
>
>
>
> For example:
> for the variable "PRES_GDS0_GPML" there is "gds_grid_type : 0"
> and for "float g0_lat_0" there is "GridType : Cylindrical
> Equidistant
> Projection Grid"
>
> a) Is this enough information to tell if it is on Native grid or not?
> b) Is it the "float g0_lat_0's GridType" that is important
> here, or
> maybe
> "PRES_GDS0_GPML's gds_grid_type" as well?
> c) If this file is on a Native Cylindrical Equidistant Projection
> Grid,
> does it matter what kind of mpProjection I use? (as long as I use
> 'res_at_mpLimitMode = "Corners" ')
>
> Thanks a lot for any advices on this!
> /Erik
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jan 17 2008 - 12:20:41 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 17 2008 - 12:33:19 MST