[ncl-talk] reading certain HRRR netdf variables causes errors

Ian Wittmeyer iwittmeyer at gmail.com
Fri Nov 24 17:31:15 MST 2017


Hi,


I am successful reading most variables from HRRR netcdf files with an NCL script, but reading a few variables causes errors.
The HRRR netcdf files were downloaded from the NCAR thredds-jumbo server with use of the netcdf subset service.



The following line works fine:

x=file1->Relative_humidity_height_above_ground


The following line generates an error:

y=file1->u-component_of_wind_height_above_ground

here’s the ncl error:

fatal:Either file (file1) isn't defined or variable (u) is not a variable in the file
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 28 in file a.ncl



The following line generates a different error:

z=file1->VAR0-3-198_FROM_59-0–1_msl

here’s the ncl error:

fatal:syntax error: line 27 in file a.ncl before or near _FROM_59 
   mslp=file1->VAR0-3-198_FROM_59
-------------------------------^

fatal:Syntax Error in block, block not executed
fatal:error at line 29 in file a.ncl



Relevant header information from the netcdf file:

       float Relative_humidity_height_above_ground(time4, height_above_ground6, y, x) ;
               Relative_humidity_height_above_ground:long_name = "Relative humidity @ Specified height level above ground" ;
               Relative_humidity_height_above_ground:units = "%" ;
               Relative_humidity_height_above_ground:Grib_Variable_Id = "VAR_0-1-1_L103" ;
               Relative_humidity_height_above_ground:Grib2_Parameter = 0, 1, 1 ;
               Relative_humidity_height_above_ground:Grib2_Parameter_Discipline = "Meteorological products" ;
               Relative_humidity_height_above_ground:Grib2_Parameter_Category = "Moisture" ;
               Relative_humidity_height_above_ground:Grib2_Parameter_Name = "Relative humidity" ;
               Relative_humidity_height_above_ground:Grib2_Level_Type = 103 ;
               Relative_humidity_height_above_ground:Grib2_Level_Desc = "Specified height level above ground" ;
               Relative_humidity_height_above_ground:Grib2_Generating_Process_Type = "Forecast" ;
               Relative_humidity_height_above_ground:coordinates = "reftime time4 height_above_ground6 y x " ;
               Relative_humidity_height_above_ground:grid_mapping = "LambertConformal_1059X1799-38p51N-97p49W" ;
       float u-component_of_wind_height_above_ground(time6, height_above_ground2, y, x) ;
               u-component_of_wind_height_above_ground:long_name = "u-component of wind @ Specified height level above ground" ;
               u-component_of_wind_height_above_ground:units = "m/s" ;
               u-component_of_wind_height_above_ground:Grib_Variable_Id = "VAR_0-2-2_L103" ;
               u-component_of_wind_height_above_ground:Grib2_Parameter = 0, 2, 2 ;
               u-component_of_wind_height_above_ground:Grib2_Parameter_Discipline = "Meteorological products" ;
               u-component_of_wind_height_above_ground:Grib2_Parameter_Category = "Momentum" ;
               u-component_of_wind_height_above_ground:Grib2_Parameter_Name = "u-component of wind" ;
               u-component_of_wind_height_above_ground:Grib2_Level_Type = 103 ;
               u-component_of_wind_height_above_ground:Grib2_Level_Desc = "Specified height level above ground" ;
               u-component_of_wind_height_above_ground:Grib2_Generating_Process_Type = "Forecast" ;
               u-component_of_wind_height_above_ground:coordinates = "reftime time6 height_above_ground2 y x " ;
               u-component_of_wind_height_above_ground:grid_mapping = "LambertConformal_1059X1799-38p51N-97p49W" ;
       float VAR0-3-198_FROM_59-0--1_msl(time4, y, x) ;
               VAR0-3-198_FROM_59-0--1_msl:long_name = "Unknown Parameter 0-3-198 @ Mean sea level" ;
               VAR0-3-198_FROM_59-0--1_msl:units = "" ;
               VAR0-3-198_FROM_59-0--1_msl:Grib_Variable_Id = "VAR_0-3-198_L101" ;
               VAR0-3-198_FROM_59-0--1_msl:Grib2_Parameter = 0, 3, 198 ;
               VAR0-3-198_FROM_59-0--1_msl:Grib2_Parameter_Discipline = "Meteorological products" ;
               VAR0-3-198_FROM_59-0--1_msl:Grib2_Parameter_Category = "Mass" ;
               VAR0-3-198_FROM_59-0--1_msl:Grib2_Level_Type = 101 ;
               VAR0-3-198_FROM_59-0--1_msl:Grib2_Level_Desc = "Mean sea level" ;
               VAR0-3-198_FROM_59-0--1_msl:Grib2_Generating_Process_Type = "Forecast" ;
               VAR0-3-198_FROM_59-0--1_msl:coordinates = "reftime time4 y x " ;
               VAR0-3-198_FROM_59-0--1_msl:grid_mapping = "LambertConformal_1059X1799-38p51N-97p49W” ;


Any idea why I am getting these errors?

Thank you,

Ian Wittmeyer



More information about the ncl-talk mailing list