[gradsusr] [EXTERNAL] Re: Not standard variable name
Adams, Jennifer M. (GSFC-610.2)[ADNET SYSTEMS INC]
jennifer.m.adams at nasa.gov
Thu Jul 11 08:08:43 EDT 2019
Grib data do not need aliases in the variable declaration, you can name variables anything you want – the grib codes in the levels and units fields are what matter.
Instead of
gp2e+09pv=>hgtpv2000 0 0,3,4 ** PV=2000 (Km^2/kg/s) surface Geopotential [m^2/s^2]
use
hgtpv2000 0 0,3,4 ** PV=2000 (Km^2/kg/s) surface Geopotential [m^2/s^2]
or
zspv2000 0 0,3,4 ** PV=2000 (Km^2/kg/s) surface Geopotential [m^2/s^2]
or
foo 0 0,3,4 ** PV=2000 (Km^2/kg/s) surface Geopotential [m^2/s^2]
As long as your name is lower case alphanumeric and is less than 16 characters you can call it whatever you want to.
--Jennifer
--
Jennifer Miletta Adams
ADNET Systems, Inc.
NASA/GSFC, Code 610.2
Building 32, Room S159
(301) 614-6070
From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of Jeff Duda <jeffduda319 at gmail.com>
Reply-To: GrADS Users Forum <gradsusr at gradsusr.org>
Date: Saturday, July 6, 2019 at 7:07 PM
To: GrADS Users Forum <gradsusr at gradsusr.org>
Subject: [EXTERNAL] Re: [gradsusr] Not standard variable name
You can rename variables in the control file to simpler ones that conform to naming syntax conventions. Just use the format
(grib_name)=>(new_name)
Make sure you put no spaces around the "=>"
For example, in your control file, you could do:
gp2e+09pv=>hgtpv2000 0 0,3,4 ** PV=2000 (Km^2/kg/s) surface Geopotential [m^2/s^2]
gp1p5e+09pv=>hgtpv1500 0 0,3,4 ** PV=1500 (Km^2/kg/s) surface Geopotential [m^2/s^2]
On Sat, Jul 6, 2019 at 8:10 AM iri <iri at irizone.net<mailto:iri at irizone.net>> wrote:
Hi all !
I work with the model "AROME" by Météo-France.
I download a grib2 file from
https://mf-models-on-aws.org/#arome-france/v2/2019-07-06/06/GP/pv/<https://urldefense.proofpoint.com/v2/url?u=https-3A__mf-2Dmodels-2Don-2Daws.org_-23arome-2Dfrance_v2_2019-2D07-2D06_06_GP_pv_&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=M2mFZsxo0ZoztoK2Lyoypu1kKkBVKyEoM9CXGWO42zk&m=PMweNxqkkZEIaLkbguPaXqXH5sUpkaVBZ4a-cn3AuqA&s=VUWr-WLBOWh-EbeRzwaBVqk6rUEbKJNAX5PHAql5W9k&e=> to
get PVU (1.5 and 2).
$ wgrib2 arome-france_20190706_06_GP_pv_17h.grib2
1:0:d=2019070606:GP:PV=2000 (Km^2/kg/s) surface:17 hour fcst:
2:221788:d=2019070606:GP:PV=1500 (Km^2/kg/s) surface:17 hour fcst:
$ g2ctl file.grib2 > pvu.ctl
ga-> open pvu.ctl
ga-> q file
File 1 : arome-france_20190706_06_GP_pv_17h.grib2
Descriptor: pvu.ctl
Binary: arome-france_20190706_06_GP_pv_17h.grib2
Type = Gridded
Xsize = 801 Ysize = 601 Zsize = 1 Tsize = 1 Esize = 1
Number of Variables = 2
gp2e+09pv 0 0,3,4 ** PV=2000 (Km^2/kg/s) surface Geopotential
[m^2/s^2]
gp1p5e+09pv 0 0,3,4 ** PV=1500 (Km^2/kg/s) surface Geopotential
[m^2/s^2]
ga-> d gp2e+09pv
Syntax Error: Invalid Operand
'gp2e' not a variable or function name
Error ocurred at column 1
DISPLAY error: Invalid expression
Expression = gp2e+09pv
I tried with wgrib2 -set_var, it changes only GP to HGT and the final
name in ctl becomes hgt2e+09pv
It is a logical result.
I tested with alt_g2ctl and -short option. In this case :
ga-> open pvu2.ctl
Scanning description file: pvu2.ctl
Data file arome-france_20190706_06_GP_pv_17h.grib2 is open as file 1
LON set to -8 12
LAT set to 38 53
LEV set to 1 1
Time values set: 2019:7:6:23 2019:7:6:23
E set to 1 1
ga-> q file
File 1 : arome-france_20190706_06_GP_pv_17h.grib2
Descriptor: pvu2.ctl
Binary: arome-france_20190706_06_GP_pv_17h.grib2
Type = Gridded
Xsize = 801 Ysize = 601 Zsize = 1 Tsize = 1 Esize = 1
Number of Variables = 2
v1 0 0 "GP:PV=1500 (Km^2/kg/s) surface"
v2 0 0 "GP:PV=2000 (Km^2/kg/s) surface"
ga-> d v1
Cannot contour grid - all undefined values
How can i rename gp1p5e+09pv to gp1p5e by example ?
Thank you for your help in advance.
Stephane Iri
InC + PE13
Marseille, France
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr<https://urldefense.proofpoint.com/v2/url?u=http-3A__gradsusr.org_mailman_listinfo_gradsusr&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=M2mFZsxo0ZoztoK2Lyoypu1kKkBVKyEoM9CXGWO42zk&m=PMweNxqkkZEIaLkbguPaXqXH5sUpkaVBZ4a-cn3AuqA&s=EUMtgmwFFQO8OoXP9ISOwp3xvXuG2sCE3xvqhfX3Gqk&e=>
--
Jeff Duda, Research Scientist
University of Colorado Boulder
Cooperative Institute for Research in Environmental Sciences
NOAA/OAR/ESRL/Global Systems Division
Boulder, CO
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20190711/7d1b2d13/attachment-0001.html>
More information about the gradsusr
mailing list