YAML and Python script for the AHI CSR BUFR#45
YAML and Python script for the AHI CSR BUFR#45PraveenKumar-NOAA wants to merge 35 commits intodevelopfrom
Conversation
…ow pycodestye (#30) **This PR updates two things:** - Update mapping file and Python script for IASI, CrIS , ATMS Update the following to IASI:** 1. Rename mtiasi to iasi 2. Change logging to self.log.warning 3. Add map_path function Add new data type - cris-fsr** Update the following for ATMS:** 1. Change logging to self.log.warning 2. Add map_path function - Add Python coding norm check (pycodestyle) --- this is an initial implementation so we have a coding norm check for Python script. This will be updated to use pytest in another PR To use it: - Load obsforge modules (~eliu/modules/env_obsforge.sh) - go to ./sorc/spoc/build - ctest -VV -R spoc_python_coding_norms - Modify all Python scripts to follow pycodestyle (ctest to be added in another PR soon) (No change in science)
This PR addes two files for ASCAT - mapping YAML - Python script --- pass Python coding norm check Notes: - This PR should be tested with [bufr-query PR #73](NOAA-EMC/bufr-query#73) - A new PR will be opened to modify the standalone AMV converters accordingly after this PR is merged. ASCAT data processing has the following features: - Convert wind speed and direction to u and v wind components - Add obs type (290) Documentation is in Sphinx style Test: script2netcdf validated Validation plots IODA windEastward  GSI windEastward  IODA windNorthward  GSI windNorthward  --------- Co-authored-by: Emily Liu <eliu@hercules-login-4.hpc.msstate.edu> Co-authored-by: Emily Liu <eliu@hercules-login-3.hpc.msstate.edu>
This PR adds two files for SSMIS - mapping YAML - Python script --- pass Python coding norm test Notes: - This PR should be tested with [bufr-query PR #74](NOAA-EMC/bufr-query#74) SSMIS data processing has the following features: - spatial averaging (this is implemented in bufr-query variable transform) and it can be used by activated the feature from YAML - Add new variables via the obs builder Python API - satellite ascending/descending orbit flag (1 for ascending and -1 for descending) - solar zenith and azimuth angles (use pysolar) Notes: - Documentation is in Sphnix style (following discussion in Issue #35 ) - SSMIS data conversion includes spatial averaging. Therefore the processing can only run with one MPI task. - The solar angles calculation is done using pysolar. The functions used do not support vectors. Therefore, the calculation of solar angles are implemented with multiprocessing (e.g., one MPI task and spawned with 12 CPUs) ``` srun -n 1 --cpus_per_tasks=12 python bufr_ssmis.py ``` or ``` export CPUS_PER_TASKS=12 python bufr_ssmis.py`` ``` Test: script2netcdf validated Plots for output netCDF from SSMIS converter    --------- Co-authored-by: Emily Liu <eliu@hercules-login-3.hpc.msstate.edu> Co-authored-by: Emily Liu <eliu@hercules-login-4.hpc.msstate.edu>
|
|
||
| - name: "source" | ||
| type: string | ||
| value: "U.S. National Weather Service, National Centres for Environmental Prediction (NCEP)" |
There was a problem hiding this comment.
"Centers" not Centres
|
|
||
| - name: "providerFullName" | ||
| type: string | ||
| value: "Japan Meteorological Agencyi (JMA)" |
| category: ["h8"] | ||
| cache categories: # optional | ||
| - ["h8"] | ||
| - ["h9"] |
There was a problem hiding this comment.
Am I correct in assuming we're not doing h9?
There was a problem hiding this comment.
@nicholasesposito thanks for pointing this. We need both, h8 and h9. The backend YAMls were updated for this change.
### This PR updates the YAML and Python scripts for SSMIS ATMS, IASI and CrIS For all four sensors: 1. Simplify the handling of missing categories using the `add_dummy_variable` function 2. Use `map_path` from import.obs_builder for ATMS, CrIS, and IASI 3. Remove "type: netcdf" from the encoder section in the YAML 4. Updates `globals` in YAML 5. The output files were validated against the IODA validator with ObsSpace.yaml; new variables were added to obsSpace.yaml. This validator checks if the variables in the file follow IODA convention in terms of name, unit, and dimension. Here is an example of the output from running the ioda validator for SSMIS output ``` Reading YAML from ../obsForge/sorc/ioda/share/ioda/yaml/validation/ObsSpace.yaml Processing data file: ./testoutput/2024021900/script2netcdf/gdas.t00z.ssmis_f17.tm00.nc Verifying that all required groups exist Verifying group MetaData Verifying group ObsValue Verifying group / Verifying dimension names Verifying variable information Variable MetaData/earthSurfaceType Variable MetaData/sensorZenithAngle Variable MetaData/satelliteIdentifier Variable MetaData/sensorScanPosition Variable MetaData/longitude Variable MetaData/latitude Variable MetaData/sensorViewAngle Variable MetaData/scanLineNumber Variable MetaData/solarZenithAngle Variable MetaData/sensorChannelNumber Variable MetaData/satelliteAscendingFlag Variable MetaData/sensorAzimuthAngle Variable MetaData/rainFlag Variable MetaData/dateTime Variable MetaData/solarAzimuthAngle Variable ObsValue/brightnessTemperature Final results: # errors: 0 # warnings: 0 ``` Notes: - SSMIS specific - ssmis conversion uses updated `comupte_solar_angles` which is under review in [bufr-query PR #96](NOAA-EMC/bufr-query#96) - The update of ObsSpace.yaml from IODA is ongoing. We will add new variables in the [ObsSpace.yaml ](https://github.com/JCSDA-internal/ioda/blob/feature/ObsSpace_Validator/share/ioda/yaml/validation/ObsSpace.yaml)in IODA branch feature/ObsSpace_Validator Specific to IASI and CrIS Modifications made to cloud related variables - `cloudHeight`, `cloudCoverTotal`, `fractionOfClearInFOV`: - change group from `MetaData` to `ObsValue` - change variable type from `int` to `float` - scale the variables so they range between 0 and 1 - change `ObsValue/radiance` to `ObsValue/spectralRadiance` and unit accordingly The above changes are to following IODA convention. These changes do not alter the results (scientific) --------- Co-authored-by: Emily Liu <eliu@hercules-login-3.hpc.msstate.edu> Co-authored-by: Emily Liu <eliu@hercules-login-4.hpc.msstate.edu>
|
@PraveenKumar-NOAA This is because your YAML file does not include the dimension section in the encoder section. Here is the example from ATMS: spoc/dump/mapping/bufr_atms.yaml Lines 75 to 80 in 369e647 |
| encoder: | ||
|
|
There was a problem hiding this comment.
You need to include dimension section
Here is the example from ATMS:
spoc/dump/mapping/bufr_atms.yaml
Lines 75 to 80 in 369e647
@emilyhcliu thanks. A dimension section is added in the encoder section for the Channel dimension, there are 12 Channels. |
|
@emilyhcliu A brightness temperature plot has been created for the HIMAWARI-8 CLEAR SKY RADIANCES channel and added to the following issue: #41. This completes the validation for this converter, as the test input BUFR file contains only HIMAWARI-8 data. |
…m Praveen.Kumar (#101) This PR have 2 updates. 1. Enable extraction of redistribution‑restriction metadata by adding restrictionFlag (RSRD) and restrictionExpiration (EXPRSRD) to the BUFR→IODA conversion. This ensures downstream restriction‑filter logic has the required fields available in MetaData. 2. Add modified IODA-Converters that originally from Praveen in PRs (#45, #55, #61, #62, #69). --------- Co-authored-by: hyundeok choi <hyundeok.choi@clogin09.cactus.wcoss2.ncep.noaa.gov> Co-authored-by: hyundeok choi <hyundeok.choi@clogin04.cactus.wcoss2.ncep.noaa.gov> Co-authored-by: Cory Martin <cory.r.martin@noaa.gov> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: hyundeok choi <hyundeok.choi@clogin02.cactus.wcoss2.ncep.noaa.gov> Co-authored-by: hyundeok choi <hyundeok.choi@clogin06.cactus.wcoss2.ncep.noaa.gov> Co-authored-by: hyundeok choi <hyundeok.choi@clogin08.cactus.wcoss2.ncep.noaa.gov>
This PR introduces the following files for the AHI CSR BUFR converter:
Testing and Validation
All four workflows (bufr2netcdf, bufr4backend, script2netcdf, and script4backend) were executed and tested using serial execution.
Validation tests were completed for the following variables:
-- brightnessTemperature
-- cloudAmount
The validation was performed by comparing the input BUFR files and the corresponding output IODA files. Additional details can be found in #41.
Python Coding Standards
Variable Naming Validation
All these variables have been removed from the YAML file, except clearSkyStandardDeviation, which still needs to be added to the ObsSpace.yaml file.