[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[THREDDS #HLI-624912]: MRMS Base Ref through Siphon



Hi,

Just looking back over this, there are a couple of other options that might 
also work for you. One is that you can access this using the server's 
collection for MRMS, and request the time from it:

from siphon.catalog import TDSCatalog
from datetime import datetime

cat = 
TDSCatalog('https://thredds.ucar.edu/thredds/catalog/grib/NCEP/MRMS/BaseRef/catalog.xml')
ds = cat.datasets['Full Collection Dataset']
ncss = ds.subset()

query = ncss.query()
query.time(time_time)
query.variables('MergedBaseReflectivityQC_altitude_above_msl')
data = ncss.get_data(query)


Another option, if you just want the latest available, is to use the server's 
automatic link to the latest dataset:

from siphon.catalog import TDSCatalog

cat = 
TDSCatalog('https://thredds.ucar.edu/thredds/catalog/grib/NCEP/MRMS/BaseRef/catalog.xml')
ds = cat.latest

ncss = ds.subset()
query = ncss.query()
query.variables('MergedBaseReflectivityQC_altitude_above_msl')
data = ncss.get_data(query)

Hope that helps,

Ryan

> > Thanks for replying so fast Zach/unidata! You seem to be everywhere, Zach...
> >
> > I've attached a version that *should* have all the riggings removed (argv
> > inputs unique to our file system, etc.) but let me know if I missed
> > anything!
> >
> >
> > address@hidden> wrote:
> >
> > > Hi!
> > >
> > > Can you share the script you've written so far to access the data, just so
> > > that I can see for sure what you're working with and trying to do? I think
> > > we should be able to set a tolerance if we can get the data into Xarray
> > > format pretty easily.
> > >
> > > Thanks,
> > > Zach Bruick
> > >
> > > > Hi,
> > > >
> > > > I'm trying to plot MRMS base ref (i.e.
> > > >
> > > http://thredds.ucar.edu/thredds/ncss/grib/NCEP/MRMS/BaseRef/MRMS_BaseReflectivity_20191021_0100.grib2/dataset.html
> > > )
> > > > via Python's Siphon package. It requires a datetime object as input.
> > > >
> > > > For most things (model analyses, etc.) this is just the top of the hour.
> > > > For the MRMS it looks like it's not just an even interval of minutes, 
> > > > but
> > > > also a random number of seconds after the minute.
> > > >
> > > > The first hour I tried plotting had times :10 seconds after the minute,
> > > but
> > > > incrementing to the next hour throws an error because that next hour's
> > > > times are apparently :13 seconds after the minute:
> > > >
> > > > Server Error (400: Requested time 2019-10-21T22:00:10Z does not 
> > > > intersect
> > > > actual time range 2019-10-21T22:00:13Z - 2019-10-21T22:58:13Z)
> > > >
> > > >
> > > > The question is... how can I write a script to pull a relevant time
> > > without
> > > > knowing what the exact time is (to the second) because the exact time
> > > > constantly fluctuates?
> > > >
> > > > Thanks,
> > >
> > >
> > >
> > > Ticket Details
> > > ===================
> > > Ticket ID: HLI-624912
> > > Department: Support Python
> > > Priority: Normal
> > > Status: Closed
> > > ===================
> > > NOTE: All email exchanges with Unidata User Support are recorded in the
> > > Unidata inquiry tracking system and then made publicly available through
> > > the web.  If you do not want to have your interactions made available in
> > > this way, you must let us know in each email you send to us.
> > >
> >
> 


Ticket Details
===================
Ticket ID: HLI-624912
Department: Support Python
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.