Skip to content
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

add components for surface snow data #14

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Conversation

emilyhcliu
Copy link
Collaborator

@emilyhcliu emilyhcliu commented Dec 8, 2024

This PR includes the following changes:

  1. Add mapping and Python for surface snow data
  2. Move test configuration from /spoc/dump/config to /spoc/ush/test
  3. Remove an old test configuration file
  4. Update README for test (/spoc/ush/test)
  5. Change filename convention change from bufr2ioda to bufr (more general)
  6. Fix Python coding norm errors (ctest is adding to obsForge - in progress obsForge PR #4

coordinates: "longitude latitude"
source: variables/stationIdentification
longName: "Identification of Observing Location"
units: "index"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "index" ? Should this always be used for stationIdentification?

@@ -0,0 +1,22 @@
time window:
begin: "2018-04-14T21:00:00Z"
end: "2023-12-15T03:00:00Z"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bound to include: begin

@@ -0,0 +1,20 @@
time window:
begin: "2018-04-14T21:00:00Z"
end: "2023-12-15T03:00:00Z"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bound to include: begin

container.replace('variables/totalSnowDepth', snod)
snod_upd = container.get('variables/totalSnowDepth')

masked_container = _mask_container(container, (~snod.mask))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of making those snod values equal 0, did you mean to mask them out instead? In this case you can modify the snod.mask directly (the True value means to mask out for numpy masked arrays).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rmclaren I took the sfcsno Python code from GDASApp PR #1368 and modified it to following our Python code template. I did not change how the derived variable was done. For sfcsno converter, the data is read out from BUFR (10K+ data) and then applies data filtering to remove missing data. The output file ends up with much less data (~3K).

logger = Logger('BUFR2IODA_sfcsno.py', level=log_level, colored_log=False)


def logging(comm, level, message):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to make a logging module that we can import, so that we do not need to redefine this function in every py mapping file.

We don't have to do this now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do this in my next PR.

@@ -1,5 +1,5 @@
## Test bufr_query mapping, Python converter script, and ioda configuration YAML in obsForge
This is a prototype for testing BUFR to IODA conversion and is still evolving.
This is a prototype for testing BUFR to NETCDF/IODA conversion and is still evolving.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will use this for ZARR as well... These could also be used in IODA backends too.


- bufr_satwnd_amv_goes.py
- bufr_satwnd_amv_goes.py (copied /spoc/dump/mapping)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why copying things?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a stand-alone test. So, the uses need to gather (copy) the required input files (bufr, mapping, python script, configuration files) in their working directory along with the test script (encodeBufr.sh) to run the test.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bufr_bufr_backend ? maybe rename

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have four tests:
bufr2netcdf
script2netcdf
bufr_backend
script_backend

How about we change the two backend tests to the following:
bufr_backend ---> bufr4backend
script_backend ---> script4backend

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants