From 7c1c181359c2c1952bab3dc1c481bbdb361aa472 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Tue, 17 Sep 2024 15:56:05 -0400 Subject: [PATCH] Remove the GTS BUFR2IODA part of the snow obs prep job (#1276) This PR removed the GTS BUFR2IODA part of the snow obs prep job, and replaced it with a direct read from BUFR snow data at runtime by the JEDI executable. This PR contributes to https://github.com/NOAA-EMC/global-workflow/pull/2900 --------- Co-authored-by: Cory Martin --- .../snow/obs/config/bufr2ioda_mapping.yaml.j2 | 4 + parm/snow/obs/config/bufr_sfcsno_mapping.yaml | 75 +++++++++++++++++ parm/snow/obs/config/sfcsno_snow.yaml.j2 | 5 +- parm/snow/prep/prep_gts.yaml.j2 | 10 --- test/testinput/bufr_sfcsno_snow.yaml | 83 ------------------- 5 files changed, 82 insertions(+), 95 deletions(-) create mode 100644 parm/snow/obs/config/bufr2ioda_mapping.yaml.j2 create mode 100644 parm/snow/obs/config/bufr_sfcsno_mapping.yaml delete mode 100644 parm/snow/prep/prep_gts.yaml.j2 delete mode 100644 test/testinput/bufr_sfcsno_snow.yaml diff --git a/parm/snow/obs/config/bufr2ioda_mapping.yaml.j2 b/parm/snow/obs/config/bufr2ioda_mapping.yaml.j2 new file mode 100644 index 000000000..9340cf507 --- /dev/null +++ b/parm/snow/obs/config/bufr2ioda_mapping.yaml.j2 @@ -0,0 +1,4 @@ +mkdir: +- '{{ DATA }}/obs' +copy: +- ['{{PARMgfs}}/gdas/snow/obs/config/bufr_sfcsno_mapping.yaml', '{{ DATA }}/obs/'] diff --git a/parm/snow/obs/config/bufr_sfcsno_mapping.yaml b/parm/snow/obs/config/bufr_sfcsno_mapping.yaml new file mode 100644 index 000000000..00ab1bc7d --- /dev/null +++ b/parm/snow/obs/config/bufr_sfcsno_mapping.yaml @@ -0,0 +1,75 @@ +# (C) Copyright 2024 NOAA/NWS/NCEP/EMC +# + +bufr: + variables: + # MetaData + timestamp: + datetime: + year: "*/YEAR[1]" + month: "*/MNTH[1]" + day: "*/DAYS[1]" + hour: "*/HOUR[1]" + minute: "*/MINU[1]" + latitude: + query: "[*/CLAT, */CLATH]" + longitude: + query: "[*/CLON, */CLONH]" + stationIdentification: + query: "*/RPID" + + stationElevation: + query: "[*/SELV, */HSMSL]" + + # ObsValue + totalSnowDepth: + query: "[*/SNWSQ1/TOSD, */MTRMSC/TOSD, */STGDSNDM/TOSD]" + transforms: + - scale: 1000.0 + filters: + - bounding: + variable: totalSnowDepth + lowerBound: 0 + upperBound: 10000000 + +encoder: + variables: + + # MetaData + - name: "MetaData/dateTime" + coordinates: "longitude latitude" + source: variables/timestamp + longName: "Datetime" + units: "seconds since 1970-01-01T00:00:00Z" + + - name: "MetaData/latitude" + coordinates: "longitude latitude" + source: variables/latitude + longName: "Latitude" + units: "degree_north" + range: [-90, 90] + + - name: "MetaData/longitude" + coordinates: "longitude latitude" + source: variables/longitude + longName: "Longitude" + units: "degree_east" + range: [-180, 180] + + - name: "MetaData/stationElevation" + coordinates: "longitude latitude" + source: variables/stationElevation + longName: "Height of Station" + + - name: "MetaData/stationIdentification" + coordinates: "longitude latitude" + source: variables/stationIdentification + longName: "Identification of Observing Location" + units: "m" + + # ObsValue + - name: "ObsValue/totalSnowDepth" + coordinates: "longitude latitude" + source: variables/totalSnowDepth + longName: "Total Snow Depth" + units: "mm" diff --git a/parm/snow/obs/config/sfcsno_snow.yaml.j2 b/parm/snow/obs/config/sfcsno_snow.yaml.j2 index 443915b34..960ea8f64 100644 --- a/parm/snow/obs/config/sfcsno_snow.yaml.j2 +++ b/parm/snow/obs/config/sfcsno_snow.yaml.j2 @@ -5,8 +5,9 @@ halo size: 250e3 obsdatain: engine: - type: H5File - obsfile: '{{ DATA }}/obs/{{ OPREFIX }}sfcsno_snow.nc4' + type: bufr + obsfile: '{{ DATA }}/obs/{{ OPREFIX }}sfcsno.tm00.bufr_d' + mapping file: '{{ DATA }}/obs/bufr_sfcsno_mapping.yaml' obsdataout: engine: type: H5File diff --git a/parm/snow/prep/prep_gts.yaml.j2 b/parm/snow/prep/prep_gts.yaml.j2 deleted file mode 100644 index f91bb21e0..000000000 --- a/parm/snow/prep/prep_gts.yaml.j2 +++ /dev/null @@ -1,10 +0,0 @@ -gtsbufr: - mkdir: - - '{{ DATA }}/obs' - copy: - - ['{{ COM_OBS }}/{{ OPREFIX }}sfcsno.tm00.bufr_d', '{{ DATA }}/obs/'] -gtsioda: - copy: - - ['{{ DATA }}/{{ OPREFIX }}sfcsno_snow.nc4', '{{ COM_OBS }}/{{ OPREFIX }}sfcsno_snow.nc4'] -bufr2ioda: - sfcsno: '{{ HOMEgfs }}/sorc/gdas.cd/test/testinput/bufr_sfcsno_snow.yaml' diff --git a/test/testinput/bufr_sfcsno_snow.yaml b/test/testinput/bufr_sfcsno_snow.yaml deleted file mode 100644 index b1d663ae8..000000000 --- a/test/testinput/bufr_sfcsno_snow.yaml +++ /dev/null @@ -1,83 +0,0 @@ -# (C) Copyright 2021-2022 NOAA/NWS/NCEP/EMC -# - -observations: - - obs space: - name: bufr - - obsdatain: '{{ DATA }}/obs/{{ OPREFIX }}sfcsno.tm00.bufr_d' - - exports: - variables: - # MetaData - timestamp: - datetime: - year: "*/YEAR[1]" - month: "*/MNTH[1]" - day: "*/DAYS[1]" - hour: "*/HOUR[1]" - minute: "*/MINU[1]" - latitude: - query: "[*/CLAT, */CLATH]" - longitude: - query: "[*/CLON, */CLONH]" - stationIdentification: - query: "*/RPID" - - stationElevation: - query: "[*/SELV, */HSMSL]" - - # ObsValue - totalSnowDepth: - query: "[*/SNWSQ1/TOSD, */MTRMSC/TOSD, */STGDSNDM/TOSD]" - transforms: - - scale: 1000.0 - filters: - - bounding: - variable: totalSnowDepth - upperBound: 10000000 - - ioda: - backend: netcdf - obsdataout: '{{ DATA }}/{{ OPREFIX }}sfcsno_snow.nc4' - - variables: - - # MetaData - - name: "MetaData/dateTime" - coordinates: "longitude latitude" - source: variables/timestamp - longName: "Datetime" - units: "seconds since 1970-01-01T00:00:00Z" - - - name: "MetaData/latitude" - coordinates: "longitude latitude" - source: variables/latitude - longName: "Latitude" - units: "degree_north" - range: [-90, 90] - - - name: "MetaData/longitude" - coordinates: "longitude latitude" - source: variables/longitude - longName: "Longitude" - units: "degree_east" - range: [-180, 180] - - - name: "MetaData/stationElevation" - coordinates: "longitude latitude" - source: variables/stationElevation - longName: "Height of Station" - - - name: "MetaData/stationIdentification" - coordinates: "longitude latitude" - source: variables/stationIdentification - longName: "Identification of Observing Location" - units: "m" - - # ObsValue - - name: "ObsValue/totalSnowDepth" - coordinates: "longitude latitude" - source: variables/totalSnowDepth - longName: "Total Snow Depth" - units: "mm"