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

[AWIPS #XZH-451289]: simple edex-cloud.undidata.ucar.edu question



Hi Mike,

I'm glad you've been able to make some progress.  Let me see if I can help with
your current questions.

> 1) ...I have not been able to plot for different forecast hours for a 
> specific 
> model run. In fact, I haven't been able to figure out how to see or specify
> particular forecast hours in the DataAccessLayer.

> when I try this line, and print statement, I get the available model runs
> repeated hundreds of times
-> ----------
> times = DataAccessLayer.getAvailableTimes(request, refTimeOnly=False)
> print("Times are: ",times)

> *Times are: [<DataTime instance: 2021-08-27 00:00:00 >, <DataTime
> instance: 2021-08-27 00:00:00 >, <DataTime instance: 2021-08-27 00:00:00 >,
> <DataTime instance: 2021-08-27 00:00:00 >, <DataTime instance: 2021-08-27
> 00:00:00 >, <DataTime instance: 2021-08-27 00:00:00 >, <DataTime instance:
> 2021-08-27 06:00:00 >, <DataTime instance: 2021-08-27 00:00:00 >,*
> (this goes on and on......)

So this output, should actually vary.  I mean even the output you've pasted in 
here has at least two times: 
 2020-08-27 00:00:00
 2020-08-27 06:00:00

If you print out the content of the variable cycles, you'll see the unique 
values:
 cycles = DataAccessLayer.getAvailableTimes(request, True)
 print('cycles', cycles)

So, that will give you the times of available data for unique ref times.  And 
then 
from there, when you go to request the forecast data, you can pick which cycle 
you're
interested in.  The current notebook always selects the last time in that cycle 
array:

  fcstRun = DataAccessLayer.getForecastRun(cycles[-1], times)

But you can change the index on that cycles[-1] call to the getForecastRun 
method.
Does this help at all?


> 2) How can I ask which models are available. I see in the code GFS is
> specified:

> forecastModel = "GFS"

> I've tried this, but don't know how to specify indentifierKey:
> *awips.dataaccess.DataAccessLayer.getIdentifierValues(request, identifierKey)*

> This again seems like a catch 22 because the sample code is adding an
> identifier, but how do you know what they are in the first place?

For this issue, if you look at the line after the one setting the forecastModel
variable,  you'll see:
  request.addIdentifier("reportType", forecastModel)
So, what you're really asking is what are all the values for the identifier 
"reportType".
You can get that answer by adding the following line to your notebook:
  print('reportType vals:', DataAccessLayer.getIdentifierValues(request, 
'reportType')

This will give you the following output:
  reportType vals: ['ETA', 'GFS']
Where ETA is actually NAM 80km, and GFS is obviously the GFS.

Let me know if I've helped clarify your questions.  The available times data is 
always
a bit confusing for me and I'm not entirely sure I have a great handle on it, 
but 
hopefully I can help you get to what you need.
Thanks.


--Shay Carter

She/Her/Hers
AWIPS Software Engineer
UCAR - Unidata

If you're interested, please feel free to fill out a survey about the support 
you receive: 
https://docs.google.com/forms/d/e/1FAIpQLSeDIkdk8qUMgq8ZdM4jhP-ubJPUOr-mJMQgxInwoAWoV5QcOw/viewform

Ticket Details
===================
Ticket ID: XZH-451289
Department: Support AWIPS
Priority: Urgent
Status: Open
===================
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.