[gradsusr] Not standard variable name
Jeff Duda
jeffduda319 at gmail.com
Sat Jul 6 18:52:01 EDT 2019
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> 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/ 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
> http://gradsusr.org/mailman/listinfo/gradsusr
>
--
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/20190706/940ccd21/attachment.html>
More information about the gradsusr
mailing list