[ncl-talk] Confusion on GFS files in GRIB2

dr.hieronymus at posteo.net dr.hieronymus at posteo.net
Mon Mar 8 13:35:47 MST 2021


Hi,

Regarding the GFS files, I have written to NCEP. Thanks, that was a good 
idea.

When using following code:

;;; load ncl scripts/files
load "/usr/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "/usr/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "/usr/lib/ncarg/nclscripts/csm/contributed.ncl"

begin

;;; read data from grib file
grib_file = "gfs.t00z.pgrb2.0p25.f001"
fin = addfile(grib_file, "r")
varnames = getfilevarnames(fin)

print(varnames)
printVarSummary(fin->TMP_P0_L102_GLL0)

;;; get variables: level, variable, longitude, latitude
;t2m = fin->TMP_P0_L102_GLL0(:,:)
;lon = fin->lon
;lat = fin->lat

;;; convert to degrees
;t2m = t2m-273.15

end

I get the following error message:

warning:NclGRIB2: APCP_P8_L1 contains records that NCL cannot currently 
differentiate. One or more records will be ignored.
warning:NclGRIB2: ACPCP_P8_L1 contains records that NCL cannot currently 
differentiate. One or more records will be ignored.
fatal:GdsCEGrid: Invalid grid detected
fatal:NclGRIB2: Couldn't handle dimension information returned by grid 
decoding
fatal:NclGRIB2: Deleting reference to parameter because of decoding 
error
fatal:GdsCEGrid: Invalid grid detected
fatal:NclGRIB2: Couldn't handle dimension information returned by grid 
decoding
fatal:NclGRIB2: Deleting reference to parameter because of decoding 
error
...
...
...
fatal:GdsCEGrid: Invalid grid detected
fatal:NclGRIB2: Couldn't handle dimension information returned by grid 
decoding
fatal:NclGRIB2: Deleting reference to parameter because of decoding 
error
fatal:GdsCEGrid: Invalid grid detected
fatal:NclGRIB2: Couldn't handle dimension information returned by grid 
decoding
fatal:NclGRIB2: Deleting reference to parameter because of decoding 
error


Variable: varnames
Type: string
Total Size: 144 bytes
             18 values
Number of Dimensions: 1
Dimensions and sizes:	[18]
Coordinates:
(0)	lv_DBLL14_l1
(1)	lv_DBLL14_l0
(2)	lv_ISBL13
(3)	lv_ISBL12
(4)	lv_SPDL11_l1
(5)	lv_SPDL11_l0
(6)	lv_ISBL10
(7)	lv_ISBL9
(8)	lv_HTGL8
(9)	lv_ISBL7
(10)	lv_SIGL6_l1
(11)	lv_SIGL6_l0
(12)	lv_ISBL5
(13)	lv_HTGL4
(14)	lv_PVL3
(15)	lv_HTGL2
(16)	lv_AMSL1
(17)	lv_ISBL0
fatal:["Execute.c":6397]:variable (TMP_P0_L102_GLL0) is not in file 
(fin)
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 14 in 
file temperature_tmp.ncl

Do I understand correctly that ncl has detected an invalid grid? Why?

Thanks.



Am 08.03.2021 16:44 schrieb Lyndz:
> Hi,
> 
> I'm not sure if this is an ncl question. You should have directed your
> questions to the ncep help page (
> https://www.ncep.noaa.gov/mail_dataquestions/)
> 
> *[1] *As far as I know, the .anl files are analyses files and were 
> already
> assimilated with observations.
> 
> *[2]* If you want to use the forecast, then use the files with the
> following format (
> https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20210308/12/):
> 
> gfs.t12z.pgrb2.0p25.f000
> <https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20210308/12/gfs.t12z.pgrb2.0p25.f000>
> 
> gfs.t12z.pgrb2.0p25.f001
> <https://nomads.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20210308/12/gfs.t12z.pgrb2.0p25.f001>
> 
> etc..
> 
> No need to download the other files!
> 
> ncl_filedump gfs.t12z.pgrb2.0p25.f000.grb will give you the contents
> of the file.
> 
> If you want temperature, then look for the keyword "Temperature". This
> will give u information about the variables such as below:
> 
> float TMP_P0_L102_GLL0 ( lv_AMSL1, lat_0, lon_0 )
> 
>          center :       US National Weather Service - NCEP (WMC)
> 
>          production_status :    Operational products
> 
>          long_name :    Temperature
> 
>          units :        K
> 
>          _FillValue :   1e+20
> 
>          grid_type :    Latitude/longitude
> 
>          parameter_discipline_and_category :    Meteorological
> products, Temperature
> 
>          parameter_template_discipline_category_number :        ( 0, 0, 
> 0, 0 )
> 
>          level_type :   Specific altitude above mean sea level (m)
> 
>          forecast_time :        72
> 
>          forecast_time_units :  hours
> 
>          initial_time : 03/08/2021 (00:00)
> 
> The variable name is the same for other GFS files, regardless of 
> resolution.
> 
> *[3]* For documentation, check this:
> https://www.emc.ncep.noaa.gov/emc/pages/numerical_forecast_systems/gfs/documentation.php
> 
> *[4] *The files are archived in rda.ucar.edu. For the 25km GFS, for
> example, see this link:
> 
> https://rda.ucar.edu/datasets/ds084.1/#!docs
> 
> 
> 
> Hope this helps.
> 
> --Lyndz
> 
> 
> 
> On Mon, Mar 8, 2021 at 8:05 PM dr.hieronymus--- via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
> 
>> Hello,
>> 
>> I am trying to dig through GFS files in GRIB2 format on NCEP's FTP
>> server (https://www.nco.ncep.noaa.gov/pmb/products/gfs/).
>> 
>> Unfortunately, it is not very easy to get a proper overview. 
>> Therefore,
>> my first question is whether there is documentation somewhere that
>> describes the different formats/variants in detail.
>> 
>> What one quickly notice and easy understand is that the GFS files are
>> available in different resolutions (0.25°, 0.50°, 1.00°) and each GFS
>> file is described by an index file. The GFS files with 0.25° 
>> resolution
>> have an hourly granularity and the GFS files with 0.50° and 1.00°
>> resolution have a three-hourly granularity.
>> 
>> Then, there are the .anl and .f000 GFS files. I don't understand the
>> difference between .anl and .f000. Is .f000 not a forecast? 
>> Furthermore,
>> I noticed that the index files are different regarding .f000 and
>> .f001-384 (0.25°) and .f000 and .f003-384 (0.50°, 1.00°).
>> 
>> What also confuses me are the different GFS files, namely pgrb2, 
>> pgrb2b,
>> pgrb2full and sfluxgrbfFFF. What are the differences exactly? 
>> According
>> to the corresponding index files, the same physical variables are
>> available in all different GFS files. Do these variables always have 
>> the
>> same values ​​in all GFS files? Doesn't it matter which file I use 
>> when
>> I have decided on a resolution?
>> 
>> I am actually only interested in the temperature 2 meters above the
>> ground. Which file should I simply use?
>> 
>> In addition, I also wanted to know if the initial values for each 
>> model
>> run (00, 06, 12, 18) are published somewhere.
>> 
>> Thank you in advance for your help.
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk


More information about the ncl-talk mailing list