[R] National Weather Service Data

Roy Mendelssohn - NOAA Federal roy@mende|@@ohn @end|ng |rom no@@@gov
Wed Jul 8 18:43:34 CEST 2020


I would suggest looking at the NOMADS page for information on what is available through NOMADS:

https://nomads.ncep.noaa.gov

-Roy


> On Jul 8, 2020, at 8:19 AM, Philip <herd_dog using cox.net> wrote:
> 
> Thanks again for confirming that the wgrib2 software loaded correctly.  I have been making good progress finding variables related to low level winds such as the HGT series that, as you know, converts millibars to altitude MSL.
> 
> The next step is to look at Rapid Refresh (RAP).  Can you direct me to someplace that has the names of the forecast models - equivalent to gfs_0p50 for the Global Forecast System?
> 
> Thanks.
> 
> -----Original Message----- From: Roy Mendelssohn - NOAA Federal
> Sent: Monday, July 6, 2020 6:35 PM
> To: Philip
> Subject: Re: [R] National Weather Service Data
> 
> Skimming the docs seems to assume a lot of knowledge of the data.  The best I can see there are two temperature variables:
> 
>> tmpsfc (surface air temperature, K)
>> tmp2m (air temperature at 2m, K)
> 
> and one relative humidity:
> 
>> rh2m (relative humidity at 2m, %)
> 
> Depending on what you are after,  you might find it easier to use the UAF ERDDAP server (https://upwell.pfeg.noaa.gov/erddap/griddap/ncep_global.html) and 'rerddap' to get the data.  'rerddap' will read in the data into a nice tibble,  I also think the documentation is clearer with some nice vignettes and the ability to get info about the data.  For example the command
> 
>> rerddap::info('ncep_global')
> 
> returns:
> 
> 
>> <ERDDAP info> ncep_global
>> Base URL: https://upwell.pfeg.noaa.gov/erddap/
>> Dimensions (range):
>>     time: (2011-05-06T12:00:00Z, 2020-07-08T12:00:00Z)
>>     latitude: (-90.0, 90.0)
>>     longitude: (0.0, 359.5)
>> Variables:
>>     dlwrfsfc:
>>         Units: W m-2
>>     dswrfsfc:
>>         Units: W m-2
>>     pratesfc:
>>         Units: kg m-2 s-1
>>     prmslmsl:
>>         Units: Pa
>>     rh2m:
>>         Units: %
>>     tmp2m:
>>         Units: K
>>     tmpsfc:
>>         Units: K
>>     ugrd10m:
>>         Units: m s-1
>>     vgrd10m:
>>         Units: m s-1
> 
> which would have answered a lot of your questions.  If you had saved that command to a variable  there would be a lot more information,  that is just the summary.
> 
> HTH,
> 
> -Roy
> 
>> 
>> On Jul 6, 2020, at 5:47 PM, Philip <herd_dog using cox.net> wrote:
>> 
>> Thanks for getting back to me.  It is good to know that I am on the right track.
>> 
>> I understand now that the output byte location of the data in the grib2 file not the actual data which in this case would be the 2 am forecast six hours into the future.  Can you advise me which of the examples in Dr. Bowman's rNOMADS documentation will get me the tem[perature and relative humidity data?
>> 
>> Philip.
>> 
>> -----Original Message----- From: Roy Mendelssohn - NOAA Federal
>> Sent: Monday, July 6, 2020 10:43 AM
>> To: Philip
>> Cc: stephen sefick ; r-help
>> Subject: Re: [R] National Weather Service Data
>> 
>> Hi Philip:
>> 
>> Results look correct to me.  This might help you:
>> 
>> https://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/default_inv.html
>> 
>> -Roy
>> 
>> 
>>> On Jul 6, 2020, at 9:29 AM, Philip <herd_dog using cox.net> wrote:
>>> 
>>> I am trying to access National Weather Service forecasting data through the rNOMADS package.  I’m not sure if the Weather Service software – grib2 – loaded correctly.  Second, some of the examples in the rNOMADS documentation seem to run correctly but I’m not sure what the output means.  Any anvise would be greatly appreciated.
>>> 
>>> 1 - I tried to load the wgrib2 software from instructions in the following website:
>>> 
>>> https://bovineaerospace.wordpress.com/2015/04/26/how-to-install-rnomads-with-grib-file-support-on-windows/
>>> 
>>> 2 – the instructions say that if it loaded correctly I should get a laundry list similar to what is below from the command:  >system(“wgrib2”).
>>> 
>>> 
>>> 
>>> The list I get looks different.  Below is the first 20 or so entries. How can I check to see if the wgrib2 loaded correctly?
>>> 
>>> wgrib2 v0.1.9.9 9/2013 Wesley Ebisuzaki, Reinoud Bokhorst, Jaakko Hyvätti, Dusan Jovic, Kristian Nilssen, Karl Pfeiffer, Pablo Romero, Manfred Schwarb, Arlindo da Silva, Niklas Sondell, Sergey Varlamov
>>> -0xSec           inv  X      Hex dump of section X (0..8)
>>> -MM              inv         reference time MM
>>> -N_ens           inv         number of ensemble members
>>> -RT              inv         type of reference Time
>>> -S               inv         simple inventory with minutes and seconds (subject to change)
>>> -Sec0            inv         contents of section0
>>> -Sec3            inv         contents of section 3 (Grid Definition Section)
>>> -Sec4            inv         Sec 4 values (Product definition section)
>>> -Sec5            inv         Sec 5 values (Data representation section)
>>> -Sec6            inv         show bit-map section
>>> -Sec_len         inv         length of various grib sections
>>> -T               inv         reference time YYYYMMDDHHMMSS
>>> -V               inv         diagnostic output
>>> -VT              inv         verf time = reference_time + forecast_time (YYYYMMDDHHMMSS)
>>> -YY              inv         reference time YYYY
>>> 
>>> 3 – As I said, some of the documentation examples work and for some I get error messages.  Below is an example of one that seemed to work but I don’t understand the output.
>>> 
>>> #GribInfo - page 20
>>> urlsOut <- CrawlModels(abbrev="gfs_0p50",depth=2)
>>> ModelParameters <- ParseModelPage(urlsOut[2])#[1] is most recent model
>>> MyPred <- ModelParameters$pred[grep("06$",ModelParameters$pred)]
>>> Levels <- c("2_m_above_ground","800_mb")
>>> Variables <- c("TMP","RH")
>>> GribInfo <- GribGrab(urlsOut[2],MyPred,Levels,Variables)
>>> GribInv <- GribInfo(GribInfo[[1]]$file.name,"grib2")
>>> 
>>> The command GribInv$inventory returns:
>>> 
>>> $inventory
>>> [1] "1:0:d=2020070606:TMP:800 mb:6 hour fcst:" "2:148450:d=2020070606:RH:800 mb:6 hour fcst:"
>>> [3] "3:414132:d=2020070606:TMP:2 m above ground:6 hour fcst:" "4:571266:d=2020070606:RH:2 m above ground:6 hour fcst:"
>>> 
>>> This is supposed to be temperature and relative humidity 2 meters above the ground and at 800 milibars for 2020 – July 6 – at ZULU time 0600. But I have no idea what the numbers 414132 – second line – mean.
>>> 
>>> Any advise would be greatly appreciated.
>>> 
>>> Philip Heinrich
>>> 
>>> From: stephen sefick
>>> Sent: Thursday, July 2, 2020 3:20 PM
>>> To: Philip
>>> Cc: r-help
>>> Subject: Re: [R] National Weather Service Data
>>> 
>>> I am unfamiliar with Rnomads. Could you provide a minimal reproducable example? You are more likely to receive help this way.
>>> 
>>> 
>>> On Thu, Jul 2, 2020, 18:06 Philip <herd_dog using cox.net> wrote:
>>> 
>>> Is anyone out there familiar with rNOMADS?  It is a package to get into National Weather Service forecasting data with R?
>>> 
>>> I'm not sure the Weather Service software named wgrib2 loaded correctly because some of the stuff won't run and I can't make much sense out of some of the output.
>>> 
>>> Thanks.
>>>        [[alternative HTML version deleted]]
>>> 
>>> ______________________________________________
>>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>> 
>>> [[alternative HTML version deleted]]
>>> 
>>> ______________________________________________
>>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>> 
>> **********************
>> "The contents of this message do not reflect any position of the U.S. Government or NOAA."
>> **********************
>> Roy Mendelssohn
>> Supervisory Operations Research Analyst
>> NOAA/NMFS
>> Environmental Research Division
>> Southwest Fisheries Science Center
>> ***Note new street address***
>> 110 McAllister Way
>> Santa Cruz, CA 95060
>> Phone: (831)-420-3666
>> Fax: (831) 420-3980
>> e-mail: Roy.Mendelssohn using noaa.gov www: https://www.pfeg.noaa.gov/
>> 
>> "Old age and treachery will overcome youth and skill."
>> "From those who have been given much, much will be expected"
>> "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
>> 
> 
> **********************
> "The contents of this message do not reflect any position of the U.S. Government or NOAA."
> **********************
> Roy Mendelssohn
> Supervisory Operations Research Analyst
> NOAA/NMFS
> Environmental Research Division
> Southwest Fisheries Science Center
> ***Note new street address***
> 110 McAllister Way
> Santa Cruz, CA 95060
> Phone: (831)-420-3666
> Fax: (831) 420-3980
> e-mail: Roy.Mendelssohn using noaa.gov www: https://www.pfeg.noaa.gov/
> 
> "Old age and treachery will overcome youth and skill."
> "From those who have been given much, much will be expected"
> "the arc of the moral universe is long, but it bends toward justice" -MLK Jr.
> 

**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: Roy.Mendelssohn using noaa.gov www: https://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.



More information about the R-help mailing list