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 converting satwnd amv goes data from bufr dump to ioda. #13

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

Conversation

emilyhcliu
Copy link
Collaborator

@emilyhcliu emilyhcliu commented Nov 19, 2024

Add components for converting satwnd amv goes data from bufr dump to ioda.

dump/mapping

  • bufr2ioda mapping file
  • bufr2ioda Python converter

dump/config

  • IODA configuration test YAML for script backend
  • IODA configuration test YAML for bufr backend

/ush/test

  • bufr2ioda.sh
  • README.md

Notes: The test shell script (bufr2ioda.sh) can test the following for each obs type:

  • bufr2netcdf ---> convert bufr to NetCDF IODA format using bufr-query with mapping file
  • script2netcdf ---> convert bufr to NetCDF IODA format using bufr-query with mapping file and python interface
  • bufr_backend ---> convert bufr to IODA in IODA backend with mapping file
  • script_backend ---> convert bufr to IODA in IODA backend with mapping file and Python script

@@ -0,0 +1,58 @@
time window:
begin: "2018-04-14T21:00:00Z"
Copy link
Collaborator

Choose a reason for hiding this comment

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

just noting that we will want to template these if they are not in a fixed 'test' directory

./build.sh
```

- Clone wxflow (no need to build)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let me include wxflow in the obsForge clone

@@ -0,0 +1,206 @@
#!/bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

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

general question, @emilyhcliu , do we want to set up ctests so that a user just needs to run ctest to test like we do for JEDI repos?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. We will add CTests in obsForge.


bufr2ioda.sh "" "" "" "" "" script2netcdf" 0

bufr2ioda.sh "" "" "" "" "" bufr_backend" 12

Choose a reason for hiding this comment

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

Can we use named inputs? Otherwise, in order to give the final input we have to type all others.

rmclaren
rmclaren previously approved these changes Nov 25, 2024
Copy link
Collaborator

@rmclaren rmclaren left a comment

Choose a reason for hiding this comment

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

@rmclaren Should the script "bufr2ioda.sh" be called "bufr2netcdf.sh"?
This test script can handle four cases with or without MPI.

  1. bufr2netcdf (bufr-query)
  2. scrtip2netcdf (bufr-query)
  3. bufr_backend (bufr-query+ioda)
  4. script2_backend (bufr-query+ioda)

It covers tests for bufr-query and ioda. Do you have any suggestion for a better name?

This is a shell script to help team members test their converters.
We will add CTESTs for these tests in obsForge.

@rmclaren
Copy link
Collaborator

@emilyhcliu Dunno, maybe encodeBufr.sh or runBufr.sh (since we it for testing the second option might make sense (?).

@emilyhcliu
Copy link
Collaborator Author

@emilyhcliu Dunno, maybe encodeBufr.sh or runBufr.sh (since we it for testing the second option might make sense (?).

I will use encodeBufr.sh. Thanks.


end_time = time.time()
running_time = end_time - start_time
logging(comm, 'INFO', f'Total running time: {running_time}')

Choose a reason for hiding this comment

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

Should we consider adding runtimes to the all subroutines in case we're curious if there are hang ups?

- Get the help page for usage

```
bufrioda.sh -h

Choose a reason for hiding this comment

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

This should be encodeBufr.sh


./build.sh
```

Copy link

@nicholasesposito nicholasesposito Nov 26, 2024

Choose a reason for hiding this comment

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

Recommend adding here a line saying to mkdir a testinput directory in sorc/spoc/ush/test and also moving your input file here. The encodeBufr.sh does not do this (though it does make testoutput). Might be worth having encodeBufr.sh doing it too.

# ===============
# Set file paths
# ===============
ioda_config_yaml="${work_dir}/bufr2ioda_${mode}_${obstype}.yaml"

Choose a reason for hiding this comment

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

Suggest adding lines to move the appropriate files to the work_dir from their original locations. Written as is, the script looks for ioda_config_yaml, mapping_file, and input_file which are not already there.

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.

7 participants