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

[python #DVT-547480]: help on NCSS



Hi,

Siphon is not looking at individual files, but rather the THREDDS Data Server 
is a providing access to a virtual dataset that combines the output from 
multiple files.

If you're having trouble accessing certain times, the data may not be 
available, you may need to adjust the call to `datetime.utcnow()`. If I try to 
request data beyond the time available in the dataset, I get:

HTTPError: Error accessing 
http://thredds.ucar.edu/thredds/ncss/grib/NCEP/GFS/Global_0p25deg/Best?var=Temperature_surface&time=2019-06-03T15%3A09%3A58.848943&west=-111&east=-100&south=35&north=43&accept=netcdf4
Server Error (400: Requested time 2019-06-03T15:09:58.848Z does not intersect 
actual time range 2019-05-13T00:00:00Z - 2019-06-01T12:00:00Z)

This took a lot of work for me to hit however. Can you send me the actual error 
you receive so we can identify whether this is actually a problem with the 
server?

Thanks,

Ryan

> HI,
> 
> Thanks for providing the example NCSS_Cartopy_Example.py. I ran it, and it 
> works fine. However, I wonder
> how I should modify the code after
> query.lonlat_box(north=43, south=35, east=-100, 
> west=-111).time(datetime.utcnow())
> query.accept('netcdf4')
> query.variables('Temperature_surface')
> when I try
> 
> data = ncss.get_data(query)
> if there is no file at the given time. At present, it breaks and just stop 
> there. I wonder if I can check if the remote file at the given
> time exists first, and if it exists, the I can use data = 
> ncss.get_data(query) to fetch it.
> 
> Thanks for your kind help.


Ticket Details
===================
Ticket ID: DVT-547480
Department: Support Python
Priority: Low
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.