metadata from loadGrid and loadADDE

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

metadata from loadGrid and loadADDE

Post by joleenf »

Hi,

I am just looking for some advice. The objects created with loadADDE and loadGrid contain both metadata and the data. However, when passed through a function, such as resample(), the metadata gets removed from the object. I have decided every time I encounter this to just get the information I need from the metadata before I run the data object through the function, or I could just create a new object when I use a function.

However, I was wondering what is the preferred method for dealing with this?

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

Re: metadata from loadGrid and loadADDE

Post by bobc »

Hi Joleen -

A couple questions:

  1. You mentioned both loadGrid and loadADDEImage. Are you sampling a grid into the domain of an image, an image into the domain of a grid, or another combination?
  2. What metadata are you referring to?

I ran some tests where created a data object of one timestep of ABI CONUS and another of ABI M1. I resampled the CONUS data into the geographical domain of the M1 data and it looks like at least some of the metadata is still there. For example, I can display a layer of the resampled data object and the layer label is correct (with a data source name and timestamp). In the past, we had an issue where metadata wasn't being propagated through IDV formulas, and this was resolved as part of Inquiry 1720. Before the changed in this inquiry, the layer label of the resampled data object wouldn't have included any text from the datasourcename and timestamp macros. I ran a similar test where I resampled a GFS 80km CONUS data object into the geographical domain of an ABI M1 image and this showed the same results.

Thanks -
Bob
User avatar
joleenf
Posts: 1120
Joined: Mon Jan 19, 2009 7:16 pm

Re: metadata from loadGrid and loadADDE

Post by joleenf »

Hi Bob,

I don't see the same results for band_wavelength in the metadata variables when using mask, or the fixed grid resample. I do see the dictionary propagate through for resample and resampleGrid.

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

Re: metadata from loadGrid and loadADDE

Post by bobc »

Hi Joleen -

Thanks for following up on this. I replicated that the formulas/methods you mentioned don't properly retain the metadata of the data object being passed through them. I wrote this up as Inquiry 2555. If there are any updates on this inquiry, I'll let you know.

Thanks again -
Bob
Post Reply