<div dir="ltr">You can rename variables in the control file to simpler ones that conform to naming syntax conventions. Just use the format<div>(grib_name)=>(new_name)</div><div>Make sure you put no spaces around the "=>"</div><div><br></div><div>For example, in your control file, you could do:</div><div>gp2e+09pv=>hgtpv2000 0 0,3,4 ** PV=2000 (Km^2/kg/s) surface Geopotential [m^2/s^2]<br>gp1p5e+09pv=>hgtpv1500 0 0,3,4 ** PV=1500 (Km^2/kg/s) surface Geopotential [m^2/s^2] <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 6, 2019 at 8:10 AM iri <<a href="mailto:iri@irizone.net">iri@irizone.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all !<br>
<br>
I work with the model "AROME" by Météo-France.<br>
I download a grib2 file from<br>
<a href="https://mf-models-on-aws.org/#arome-france/v2/2019-07-06/06/GP/pv/" rel="noreferrer" target="_blank">https://mf-models-on-aws.org/#arome-france/v2/2019-07-06/06/GP/pv/</a> to<br>
get PVU (1.5 and 2).<br>
<br>
$ wgrib2 arome-france_20190706_06_GP_pv_17h.grib2<br>
1:0:d=2019070606:GP:PV=2000 (Km^2/kg/s) surface:17 hour fcst:<br>
2:221788:d=2019070606:GP:PV=1500 (Km^2/kg/s) surface:17 hour fcst:<br>
<br>
$ g2ctl file.grib2 > pvu.ctl<br>
<br>
ga-> open pvu.ctl<br>
<br>
ga-> q file<br>
File 1 : arome-france_20190706_06_GP_pv_17h.grib2<br>
Descriptor: pvu.ctl<br>
Binary: arome-france_20190706_06_GP_pv_17h.grib2<br>
Type = Gridded<br>
Xsize = 801 Ysize = 601 Zsize = 1 Tsize = 1 Esize = 1<br>
Number of Variables = 2<br>
gp2e+09pv 0 0,3,4 ** PV=2000 (Km^2/kg/s) surface Geopotential<br>
[m^2/s^2]<br>
gp1p5e+09pv 0 0,3,4 ** PV=1500 (Km^2/kg/s) surface Geopotential<br>
[m^2/s^2]<br>
<br>
ga-> d gp2e+09pv<br>
Syntax Error: Invalid Operand<br>
'gp2e' not a variable or function name<br>
Error ocurred at column 1<br>
DISPLAY error: Invalid expression<br>
Expression = gp2e+09pv<br>
<br>
I tried with wgrib2 -set_var, it changes only GP to HGT and the final<br>
name in ctl becomes hgt2e+09pv<br>
It is a logical result.<br>
<br>
I tested with alt_g2ctl and -short option. In this case :<br>
<br>
ga-> open pvu2.ctl<br>
Scanning description file: pvu2.ctl<br>
Data file arome-france_20190706_06_GP_pv_17h.grib2 is open as file 1<br>
LON set to -8 12<br>
LAT set to 38 53<br>
LEV set to 1 1<br>
Time values set: 2019:7:6:23 2019:7:6:23<br>
E set to 1 1<br>
<br>
ga-> q file<br>
File 1 : arome-france_20190706_06_GP_pv_17h.grib2<br>
Descriptor: pvu2.ctl<br>
Binary: arome-france_20190706_06_GP_pv_17h.grib2<br>
Type = Gridded<br>
Xsize = 801 Ysize = 601 Zsize = 1 Tsize = 1 Esize = 1<br>
Number of Variables = 2<br>
v1 0 0 "GP:PV=1500 (Km^2/kg/s) surface"<br>
v2 0 0 "GP:PV=2000 (Km^2/kg/s) surface"<br>
<br>
ga-> d v1<br>
Cannot contour grid - all undefined values<br>
<br>
How can i rename gp1p5e+09pv to gp1p5e by example ?<br>
<br>
Thank you for your help in advance.<br>
<br>
Stephane Iri<br>
InC + PE13<br>
Marseille, France<br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font size="2"><span>Jeff Duda, Research Scientist</span></font></div><div dir="ltr"><font size="2"><span></span></font>University of Colorado Boulder</div><div dir="ltr"><font size="2"><span></span></font>Cooperative Institute for Research in Environmental Sciences</div><div dir="ltr">NOAA/OAR/ESRL/Global Systems Division<br><font size="2"><span>
<span>Boulder, CO<br></span></span></font>
</div></div></div></div></div></div></div></div>