time field from loadGrid (ABI data)

Post any questions, ideas, or topics related to Jython and Python scripting.
Post Reply
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

time field from loadGrid (ABI data)

Post by joleenf »

Hi,

Do you know why the "times" key from loadGrid returns an empty array when using ABI data? Right now I get the timestamp for ABI data by using the ['globalAttributes']['time_coverage_start'] and then converting to a python datetime for easy formatting. Is this the preferred method or has the timestamp already been converted to a datetime somewhere else in the metadata? According to the documentation, the %timestamp% macro has been filled with the correct timestamp, but what if I am using that as part of annotate or writing to an output file and want to format in a certain way?

It also seems that in the loadGrid documentation, the "times" key was intended as a holder for the dataset time, but it is not being filled.

Joleen
User avatar
bobc
Posts: 988
Joined: Mon Nov 15, 2010 5:57 pm

Re: time field from loadGrid (ABI data)

Post by bobc »

Hi Joleen -

Thanks for bringing this up. I'm replicating that an ABI data object returned from loadGrid has a 'times' key associated with it, but it has no value. I've written this up as Inquiry 2560. I've looked all of the keys returned from loadGrid (including those in variableAttributes, globalAttributes, and metadataVariables) and none of them contain the date/time in the %timestamp% macro's format. I agree with you that having the time in this format available somewhere in the metadata would be ideal.

There's formatting done in the code modify the time_coverage_start global attribute to how it is with %timestamp%, and I'm hopeful that this string could be the value of the 'times' key. Until this is done, I think parsing time_coverage_start as you are is the way to go.

Thanks again -
Bob
Post Reply