[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[IDV #BLJ-361156]: netCDF question
- Subject: [IDV #BLJ-361156]: netCDF question
- Date: Sun, 04 Feb 2007 07:30:30 -0700
Hi Mark-
> How are the derived fields determined? For example, in IDV I am looking
> at a netCDF file which was created by the gribtocdl decoder using LDM.
> I am seeing derived fields such as:
> Windspeed (from GridRelative_u and GridRelative_v)
> Flow Vectors (from GridRelative_u and GridRelative_v
> True Wind vectors (from GridRelative_u and GridRelative_v
> etc.
> I do not see these fields in the netCDF file by using ncdump. Therefore
> I have to conclude that IDV has a method in which is determines which
> derived fields to calculate and which fields to calculate them from.
> How is this done? Is there anything special I should have in my netCDF
> file in order to automatically produce these derived fields?
I'll give you the long answer so it will go into the support archives.
There is an XML file derived.xml which is used to defined the
derived parameters. For windspeed it looks like:
<derived
id="windspeed"
description="Windspeed (from %N1% & %N2%)"
label="Windspeed"
formula="DerivedGridFactory.createWindSpeed (D1, D2)">
<categories>
<category
value="inherit"
append="Derived"
childidx="0"/>
</categories>
<operands categories="GRID-2D-*;GRID-3D-*;">
<paramgroup name="u_and_v"/>
</operands>
</derived>
The operands section defines that this is valid for 2D and 3D grids
and requires a parameter group called u_and_v. u_and_v are
defined in the paramgroups.xml file:
<paramgroup name="u_and_v">
<params
p1="U"
p2="V"/>
<params
p1="u_fhg"
p2="v_fhg"/>
<params
p1="eU"
p2="eV"
label="El nino winds"/>
<params
p1="lU"
p2="lV"
label="La Nina Wind vectors"/>
<params
p1="nU"
p2="nV"
label="Normal Year Wind vectors"/>
</paramgroup>
which looks for the names of parameters to use for this group. In
this case, it's looking for parameters U and V. U and V are determined
from either the name of the variable in the file (U,V) or through
the Data Alias mechanism (most common). Looking at the latter,
(aliases.xml) we have:
<alias
name="U"
label="U component of wind"
aliases="u,U,GridRelative_u,u_sfc,u_wind,WesterlyWind,U_component_of_wind,U
_component_of_wind_height_above_ground,Wind_Velocity_U_Component,U-component_of_
wind,U_velocity"/>
<alias
name="V"
label="V component of wind"
aliases="v,V,GridRelative_v,v_sfc,v_wind,SoutherlyWind,V_component_of_wind,
V_component_of_wind_height_above_ground,Wind_Velocity_V_Component,V-component_of
_wind,V_velocity"/>
so, if you use any one of those names, it will automatically pick
that up.
However, if you choose to name your u and v components of the
wind foo and bar respectively, you can simply add them to your alias
table through the Tools->Parameter Alias Editor menu. Add foo to
the list of U aliases and bar to the list of V aliases. Then
you'll need to reload the dataset because it uses this when
the file is read in.
If you have any questions on this, let me know.
Don Murray
Ticket Details
===================
Ticket ID: BLJ-361156
Department: Support IDV
Priority: Normal
Status: Open