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 ctest for ground-based gnss ipw product #1539

Merged
merged 14 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ if( iodaconv_bufr_query_ENABLED )
testinput/rtma_ADPUPA.prepbufr
testinput/bufr_ncep_rtma_adpupa.yaml
testinput/rtma.t00z.adpupa.tm00.bufr_d
testinput/obs.20240806T00Z.ipw_gnssgb.ncep.bufr
)

list( APPEND test_output
Expand Down Expand Up @@ -384,6 +385,7 @@ if( iodaconv_bufr_query_ENABLED )
testoutput/rtma_ru.t0000z.aircar_NC004004.tm00.nc
testoutput/gdas.t00z.rtma_adpupa.prepbufr.nc
testoutput/rtma.t00z.adpupa.tm00.nc
testoutput/20240805T00Z_PT1M_ipw_gnssgb_ncep.nc
)
endif()

Expand Down Expand Up @@ -1836,6 +1838,15 @@ if(iodaconv_bufr_query_ENABLED)
rtma.t00z.adpupa.tm00.nc ${IODA_CONV_COMP_TOL_ZERO}
DEPENDS bufr2ioda.x )

ecbuild_add_test( TARGET test_iodaconv_bufr_ncep_gpsipw
TYPE SCRIPT
COMMAND bash
ARGS ${CMAKE_BINARY_DIR}/bin/iodaconv_comp.sh
netcdf
"${CMAKE_BINARY_DIR}/bin/bufr2ioda.x testinput/bufr_gpsipw.yaml"
20240805T00Z_PT1M_ipw_gnssgb_ncep.nc ${IODA_CONV_COMP_TOL_ZERO}
DEPENDS bufr2ioda.x )

# FIXME: Greg Thompson
# ecbuild_add_test( TARGET test_iodaconv_bufr_aircar
# TYPE SCRIPT
Expand Down
83 changes: 83 additions & 0 deletions test/testinput/bufr_gpsipw.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# (C) Copyright 2022 NOAA/NWS/NCEP/EMC
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
# (C) Copyright 2022 NOAA/NWS/NCEP/EMC
# (C) Copyright 2024 NOAA/NWS/NCEP/EMC

#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.

observations:
- obs space:
name: bufr
obsdatain: "./testinput/obs.20240806T00Z.ipw_gnssgb.ncep.bufr"

exports:
variables:
# MetaData
timestamp:
datetime:
year: "*/YEAR"
month: "*/MNTH"
day: "*/DAYS"
hour: "*/HOUR"
minute: "*/MINU"

latitude:
query: "*/CLATH"

longitude:
query: "*/CLONH"

stationName:
query: "*/STSN"

heightOfStation:
query: "*/SELV"

# ObsValue
precipitableWater:
query: "*/TPWT"
BenjaminRuston marked this conversation as resolved.
Show resolved Hide resolved
type: float

ioda:
backend: netcdf
obsdataout: "./testrun/20240805T00Z_PT1M_ipw_gnssgb_ncep.nc"

globals:
- name: "platformCommonName"
type: string
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mrixlam ,,, hearing from @gthompsnJCSDA that adding a line like the but type: float to the precipitableWater should force float

Copy link

Choose a reason for hiding this comment

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

Hi @BenjaminRuston we previously tried "type: float" for the variables section but it didnt work. But you are right. When I removed "type: float" from the variables section to the exports section, it works. The converted file now have float values for precipitableWater.

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'm confused @mrixlam I just tried this with and w/o the type: float

when I added it, I got floats it worked correctly:
range(/ObsValue/precipitableWater): [2.299999952316284, 72.0999984741211]

when removed it output the integer values:
range(/ObsValue/precipitableWater): [2, 72]

so going to add it in... please confirm

value: "GPSIPW"

- name: "platformLongDescription"
type: string
value: "M TYPE 012-003 GPS - Integrated Precipitable Water"

variables:
# MetaData
- name: "MetaData/dateTime"
source: variables/timestamp
longName: "Datetime"
units: "seconds since 1970-01-01T00:00:00Z"

- name: "MetaData/latitude"
source: variables/latitude
longName: "Latitude"
units: "degree_north"
range: [-90, 90]

- name: "MetaData/longitude"
source: variables/longitude
longName: "Longitude"
units: "degree_east"

- name: "MetaData/stationIdentification"
source: variables/stationName
longName: "Station Identification"

- name: "MetaData/heightOfStation"
source: variables/heightOfStation
longName: "Height of Station"
units: "m"

# ObsValue
- name: "ObsValue/precipitableWater"
source: variables/precipitableWater
longName: "GPS IPW"
units: "kg m-2"
Binary file not shown.
3 changes: 3 additions & 0 deletions test/testinput/obs.20240806T00Z.ipw_gnssgb.ncep.bufr
Git LFS file not shown
3 changes: 3 additions & 0 deletions test/testoutput/20240805T00Z_PT1M_ipw_gnssgb_ncep.nc
Git LFS file not shown
3 changes: 3 additions & 0 deletions test/testoutput/20240806T00Z_ipw_gnssgb_ncep.nc
Git LFS file not shown