[gradsusr] Variable Name

Jeff Duda jeffduda319 at gmail.com
Fri Jan 22 17:34:46 EST 2021


A few things:
1) There should be no reason to convert the GRIB2 file to netCDF just to
view the fields in GrADS. GrADS is entirely capable of reading GRIB2 files.
You can use g2ctl (if you don't already have it on your system, Google it
and save the text code to your own file) to write a control file based on
the GRIB2 file contents. It is very simple to operate once you have the
code.

2) It is most likely that the array names were changed in the conversion
from GRIB2 to netCDF. I presume you used the NCL utility ncl_convert2_nc.
You would need to use ncdump -h to see what the array names have become and
then write a control file based on those names instead.

Jeff Duda

On Fri, Jan 22, 2021 at 2:49 PM Jason Warren <jason at solargrafix.com> wrote:

> Hello,
>
> I downloaded a GEFS file, and I used wgrib2 to convert the file to
> netcdf format.  Using wgrib2, I looked at the variables in the grib
> file, and here is a sample:
>
> 74:13220199:d=2021012212:LHTFL:surface:0-3 hour ave fcst:ens-mean
> 75:13383726:d=2021012212:SHTFL:surface:0-3 hour ave fcst:ens-mean
> 76:13633911:d=2021012212:PWAT:entire atmosphere (considered as a single
> layer):3 hour fcst:ens-mean
> 77:13787635:d=2021012212:TCDC:entire atmosphere:0-3 hour ave fcst:ens-mean
> 78:13964039:d=2021012212:DSWRF:surface:0-3 hour ave fcst:ens-mean
> 79:14033256:d=2021012212:DLWRF:surface:0-3 hour ave fcst:ens-mean
> 80:14190680:d=2021012212:USWRF:surface:0-3 hour ave fcst:ens-mean
> 81:14279940:d=2021012212:ULWRF:surface:0-3 hour ave fcst:ens-mean
> 82:14401540:d=2021012212:ULWRF:top of atmosphere:0-3 hour ave fcst:ens-mean
> 83:14547338:d=2021012212:CAPE:180-0 mb above ground:3 hour fcst:ens-mean
> 84:14683912:d=2021012212:CIN:180-0 mb above ground:3 hour fcst:ens-mean
> 85:14774466:d=2021012212:PRMSL:mean sea level:3 hour fcst:ens-mean
>
> I tried to plot the Mean Sea Level Pressure.  In my script, I used 'd
> PRMSL', however in GrADS, I get the following error:
>
> Syntax Error:  Invalid Operand
>    'prmsl' not a variable or function name
>    Error ocurred at column 1
> DISPLAY error:  Invalid expression
>    Expression = prmsl
>
> What am I doing wrong?
>
> Thanks,
> Jason Warren
>
> _______________________________________________
> 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 Laboratory
Boulder, CO
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20210122/6b017c44/attachment.html>


More information about the gradsusr mailing list