<div dir="ltr"><div><div>When you post, it is best to include the version of NCL you are using.<br><br>==<br></div>That said ... I doubt is is a version issue.<br><br>When NCL sees<br>      y=file1->u-component_of_wind_<wbr>height_above_ground<br></div><div>it interprets it as<br><br></div><div>      y= file1->u    ... minus ...(component_of_wind_<wbr>height_above_ground)<br><br></div><div>The minus sign [ - ] is the issue. The same for<br><br>       z=file1->VAR0-3-198_FROM_59-0--1<br><br></div><div>       z= file1->VAR0 minus 3 -198_FROM_59 minus 0 mimus-minus 1<br>===<br></div><div>This is eaplined in the reference manual<br><br></div><div>To read these variables, enclose a string within $ syntax<br>  <br>      y=file1->$"u-component_of_wind_<wbr>height_above_ground"$<br></div><div>      z=ile1->$"VAR0-3-198_FROM_59-0--1"$<br><br><br></div><div>Good luck<br></div><div>     <br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 24, 2017 at 5:31 PM, Ian Wittmeyer <span dir="ltr"><<a href="mailto:iwittmeyer@gmail.com" target="_blank">iwittmeyer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
<br>
I am successful reading most variables from HRRR netcdf files with an NCL script, but reading a few variables causes errors.<br>
The HRRR netcdf files were downloaded from the NCAR thredds-jumbo server with use of the netcdf subset service.<br>
<br>
<br>
<br>
The following line works fine:<br>
<br>
x=file1->Relative_humidity_<wbr>height_above_ground<br>
<br>
<br>
The following line generates an error:<br>
<br>
y=file1->u-component_of_wind_<wbr>height_above_ground<br>
<br>
here’s the ncl error:<br>
<br>
fatal:Either file (file1) isn't defined or variable (u) is not a variable in the file<br>
fatal:["Execute.c":8575]:<wbr>Execute: Error occurred at or near line 28 in file a.ncl<br>
<br>
<br>
<br>
The following line generates a different error:<br>
<br>
z=file1->VAR0-3-198_FROM_59-0–<wbr>1_msl<br>
<br>
here’s the ncl error:<br>
<br>
fatal:syntax error: line 27 in file a.ncl before or near _FROM_59<br>
   mslp=file1->VAR0-3-198_FROM_59<br>
------------------------------<wbr>-^<br>
<br>
fatal:Syntax Error in block, block not executed<br>
fatal:error at line 29 in file a.ncl<br>
<br>
<br>
<br>
Relevant header information from the netcdf file:<br>
<br>
       float Relative_humidity_height_<wbr>above_ground(time4, height_above_ground6, y, x) ;<br>
               Relative_humidity_height_<wbr>above_ground:long_name = "Relative humidity @ Specified height level above ground" ;<br>
               Relative_humidity_height_<wbr>above_ground:units = "%" ;<br>
               Relative_humidity_height_<wbr>above_ground:Grib_Variable_Id = "VAR_0-1-1_L103" ;<br>
               Relative_humidity_height_<wbr>above_ground:Grib2_Parameter = 0, 1, 1 ;<br>
               Relative_humidity_height_<wbr>above_ground:Grib2_Parameter_<wbr>Discipline = "Meteorological products" ;<br>
               Relative_humidity_height_<wbr>above_ground:Grib2_Parameter_<wbr>Category = "Moisture" ;<br>
               Relative_humidity_height_<wbr>above_ground:Grib2_Parameter_<wbr>Name = "Relative humidity" ;<br>
               Relative_humidity_height_<wbr>above_ground:Grib2_Level_Type = 103 ;<br>
               Relative_humidity_height_<wbr>above_ground:Grib2_Level_Desc = "Specified height level above ground" ;<br>
               Relative_humidity_height_<wbr>above_ground:Grib2_Generating_<wbr>Process_Type = "Forecast" ;<br>
               Relative_humidity_height_<wbr>above_ground:coordinates = "reftime time4 height_above_ground6 y x " ;<br>
               Relative_humidity_height_<wbr>above_ground:grid_mapping = "LambertConformal_1059X1799-<wbr>38p51N-97p49W" ;<br>
       float u-component_of_wind_height_<wbr>above_ground(time6, height_above_ground2, y, x) ;<br>
               u-component_of_wind_height_<wbr>above_ground:long_name = "u-component of wind @ Specified height level above ground" ;<br>
               u-component_of_wind_height_<wbr>above_ground:units = "m/s" ;<br>
               u-component_of_wind_height_<wbr>above_ground:Grib_Variable_Id = "VAR_0-2-2_L103" ;<br>
               u-component_of_wind_height_<wbr>above_ground:Grib2_Parameter = 0, 2, 2 ;<br>
               u-component_of_wind_height_<wbr>above_ground:Grib2_Parameter_<wbr>Discipline = "Meteorological products" ;<br>
               u-component_of_wind_height_<wbr>above_ground:Grib2_Parameter_<wbr>Category = "Momentum" ;<br>
               u-component_of_wind_height_<wbr>above_ground:Grib2_Parameter_<wbr>Name = "u-component of wind" ;<br>
               u-component_of_wind_height_<wbr>above_ground:Grib2_Level_Type = 103 ;<br>
               u-component_of_wind_height_<wbr>above_ground:Grib2_Level_Desc = "Specified height level above ground" ;<br>
               u-component_of_wind_height_<wbr>above_ground:Grib2_Generating_<wbr>Process_Type = "Forecast" ;<br>
               u-component_of_wind_height_<wbr>above_ground:coordinates = "reftime time6 height_above_ground2 y x " ;<br>
               u-component_of_wind_height_<wbr>above_ground:grid_mapping = "LambertConformal_1059X1799-<wbr>38p51N-97p49W" ;<br>
       float VAR0-3-198_FROM_59-0--1_msl(<wbr>time4, y, x) ;<br>
               VAR0-3-198_FROM_59-0--1_msl:<wbr>long_name = "Unknown Parameter 0-3-198 @ Mean sea level" ;<br>
               VAR0-3-198_FROM_59-0--1_msl:<wbr>units = "" ;<br>
               VAR0-3-198_FROM_59-0--1_msl:<wbr>Grib_Variable_Id = "VAR_0-3-198_L101" ;<br>
               VAR0-3-198_FROM_59-0--1_msl:<wbr>Grib2_Parameter = 0, 3, 198 ;<br>
               VAR0-3-198_FROM_59-0--1_msl:<wbr>Grib2_Parameter_Discipline = "Meteorological products" ;<br>
               VAR0-3-198_FROM_59-0--1_msl:<wbr>Grib2_Parameter_Category = "Mass" ;<br>
               VAR0-3-198_FROM_59-0--1_msl:<wbr>Grib2_Level_Type = 101 ;<br>
               VAR0-3-198_FROM_59-0--1_msl:<wbr>Grib2_Level_Desc = "Mean sea level" ;<br>
               VAR0-3-198_FROM_59-0--1_msl:<wbr>Grib2_Generating_Process_Type = "Forecast" ;<br>
               VAR0-3-198_FROM_59-0--1_msl:<wbr>coordinates = "reftime time4 y x " ;<br>
               VAR0-3-198_FROM_59-0--1_msl:<wbr>grid_mapping = "LambertConformal_1059X1799-<wbr>38p51N-97p49W” ;<br>
<br>
<br>
Any idea why I am getting these errors?<br>
<br>
Thank you,<br>
<br>
Ian Wittmeyer<br>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br></div>