Hi Mike-
On 7/6/16 10:14 AM, Mike Umscheid - NOAA Federal wrote:
I'm running into a problem when it comes to aliases. I would like to break
up a system alias, like "TEMP", into two aliases called "TEMP_2M" and
"TEMP_PRES", or something like that. I have a number of model dataset
sources I'm writing jython scripts for, and I would like to be able to
write code to call only, say 2-meter temperature. The problem is, the
system alias TEMP is an alias for both pressure level AND 2D level fields,
like 2-meter (i.e. Temperature_height_above_ground).
If I try to create a new user alias for something like TEMP_2M, I cannot
include "Temperature_height_above_ground", because it is locked into the
system alias "TEMP". There is no way for the user to change this... either
remove that particular parameter out of the system alias, or override with
the system "TEMP_2M". There needs to be a way for the user to be able to
totally override the system aliases, if one so chooses. I run into the
same issue for U and V wind when it comes to pressure level and
non-pressure level fields. Thanks!
When we developed the parameter aliases, we made the conscious decision
to add new aliases to the existing aliases, but don't have an easy
override mechanism. I understand why you would want to do this.
Right now, the only way to do this would be to recreate the aliases.xml
in your local defaults directory (e.g. ~/.unidata/idv/DefaultIdv) so you
would have all of the system aliases and remove the TEMP alias and add
your others. Then, edit the idv.rbi file there and change:
<!-- Where to find the parameter aliases -->
<resources name="idv.resource.aliases" loadmore="true">
</resources>
to be:
<!-- Where to find the parameter aliases -->
<resources name="idv.resource.aliases" loadmore="false">
<resource location="%USERPATH%/aliases.xml"/>
</resources>
The loadmore="false" says to only load this instance and ignore the site
and system resources (and any in plugins that you might use). The
problem with this is that when Unidata updates the system aliases, you
won't get any new ones unless you redo the local ones with each release.
A "better" solution (and I'm just thinking out loud now) might be to add
an override attribute to an alias and then if this is set to true, only
those aliases would be used for a variable name. Then you could set the
TEMP alias to be blank and add your TEMP_2M and TEMP_PRES aliases.
There could be a checkbox in the alias editor to set the flag. This
would require some work on Unidata's part so you'd have to go through
the proper channels to request that. But, you have a good use case.
Don
--
Don Murray
NOAA/ESRL/PSD and CU-CIRES
303-497-3596
http://www.esrl.noaa.gov/psd/people/don.murray/