-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataContainer Functions #10
Comments
@emilyhcliu This is a thornier issue than I thought originally. I'm trying to think of a good way to merge data like this in order to keep things consistent. We can talk about the details later. |
One question about all_sub_categories()
There are three categories for IASI: metop-a, metop-b and ,metop-c I expect that the following output from
But, I got the following:
Why do we get lists inside of a list? |
This is because you can categorize (split) on several parameters. So for example you could define two splits, satellite ID and hour. In which case you would get a list |
@rmclaren Can we have some method to break down the container like the following: |
Good news. For the satwind case, the BUFR contains g16 and g17. But, my mapping file defines three categories (g16, g17, g18). So, the output g18 should be empty with headers only. This also worked!! So, I am closing issue #6 - about creating empty data file with header only for categories in BUFR but defined in the mapping file. Now, I realize that it is a good thing to create an empty data file with headers only under the circumstances described in the issue. |
@emilyhcliu Working on extending the DataContainer with a function to get the category data as you suggested.. |
@emilyhcliu Added functions to feature/data_container_split branch. Here is a sample: def test_highlevel_subcontainer():
DATA_PATH = 'testinput/data/gdas.t12z.1bamua.tm00.bufr_d'
YAML_PATH = 'testinput/bufrtest_amua_ta_mapping.yaml'
container = bufr.Parser(DATA_PATH, YAML_PATH).parse()
subcontainer = container.get_sub_container(('metop-a',))
assert np.allclose(subcontainer.get('variables/antennaTemperature'),
container.get('variables/antennaTemperature', ('metop-a',))) |
The way to do the combining of the different IASI data would be to create a new DataContainer and then to add the data from the 3 cases manually. Basically resize the smaller arrays (the ones with less channels) to the larger size, or trim the larger one down to the smaller sized arrays. Make sure that the channels line up though (wavelengths for each channel for each data source line up) when you do this... |
@rmclaren I need your suggestion for the following data conversion case:
For IASI data, there are three BUFR sources, each with its mapping file, but they all map to the same IODA variable fields.
Three containers need to be combined into one container (container = container1 + container2 + container3)
The target container dimension for 2D variables is [Location1+Location2+Locaion3, 616)
So, the variables in container2 & container3, which have channels in the dimension, will need to be reorganized (from 500 to 616)
The variables that need to be modified are:
variables/sensorChannelNumner
andvariables/spectralRadiance
For container2, I have modified these two variables so that their dimensions changed from [Location2, 500] to [Location2, 616]
For container3, I have modified these two variables so that their dimensions changed from [Location3, 500 to [Location3, 616]
I tried
DataContainer.replace
:I got the following error message:
The error message was expected since I was trying to add data with dimension [Location2, 616] to a data path with dimension [Location2, 500].
@rmclaren Do you have any suggestions?
The text was updated successfully, but these errors were encountered: