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

Config and mapping files for ADPUPA prepBUFR #17

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

Conversation

PraveenKumar-NOAA
Copy link

@PraveenKumar-NOAA PraveenKumar-NOAA commented Dec 17, 2024

This PR adds following config/ and mapping/ files for the ADPUPA prepBUFR:

  • config/bufr_bufr_backend_adpupa_prepbufr.yaml
  • config/bufr_script_backend_adpupa_prepbufr.yaml
  • mapping/bufr_adpupa_prepbufr.py
  • mapping/bufr_adpupa_prepbufr_mapping.yaml

All of the four jobs (bufr2netcdf, script2netcdf, bufr_backend, script_backend) were run and tested using serial and parallel execution with nproc=2.

Copy link

@nicholasesposito nicholasesposito left a comment

Choose a reason for hiding this comment

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

Some things need to be addressed.

#!/usr/bin/env python3
import os
import sys
sys.path.append('/scratch1/NCEPDEV/da/Praveen.Singh/HERA/bufr-query/build/lib')

Choose a reason for hiding this comment

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

Get rid of these sys.path.append lines.

Copy link
Author

Choose a reason for hiding this comment

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

@nicholasesposito thanks, removed these lines.

log_method(message)


#def Compute_dateTime(cycleTimeSinceEpoch, hrdr):

Choose a reason for hiding this comment

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

dateTime should stay in. For the regular mapping yaml, @emilyhcliu and I discussed and said that DHR should determine dateTime if the script is not being used, BUT the script is being used, dateTime should be computed using the script.

Copy link
Author

Choose a reason for hiding this comment

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

@nicholasesposito added a Python subroutine to compute dateTime in the Python script.

if update:
# Define the variables to be added in a list of dictionaries
variables = [
#{

Choose a reason for hiding this comment

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

Delete comments.

logging(comm, 'DEBUG', f'Do ps ObsError calculations')
poe = container.get('variables/pressureError')
psoe = np.full(poe.shape[0], poe.fill_value)
psoe = np.where(cat == 0, poe, psoe)

Choose a reason for hiding this comment

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

Is it possible to define these (and the corresponding container.replace) as a method? There so many repeat codes here.

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


def logging(comm, level, message):

Choose a reason for hiding this comment

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

Should we put this method into a util file and import it from the util file? I guess we need to use it many times.

Choose a reason for hiding this comment

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

It's been lightly discussed but I don't think we fully decided to do this, though it may make sense.

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