Skip to content

Commit

Permalink
Merge branch 'NOAA-EMC:develop' into feature/hercules
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA committed Jan 9, 2024
2 parents 4bb1fbf + 69b1eb4 commit 23453d7
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 59 deletions.
39 changes: 23 additions & 16 deletions parm/land/obs/config/adpsfc_snow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,22 @@ obs localizations:
max nobs: 50
- localization method: Vertical Brasnett
vertical lengthscale: 700
obs filters:
obs pre filters:
- filter: Perform Action
filter variables:
- name: totalSnowDepth
action:
name: assign error
error parameter: 40.0
- filter: Variable Assignment
assignments:
- name: GrossErrorProbability/totalSnowDepth
type: float
value: 0.02
- name: BkgError/totalSnowDepth_background_error
type: float
value: 30.0
obs prior filters:
- filter: Bounds Check
filter variables:
- name: totalSnowDepth
Expand All @@ -37,7 +52,7 @@ obs filters:
- filter: Domain Check
where:
- variable:
name: MetaData/height
name: MetaData/stationElevation
minvalue: -999.0
- filter: Domain Check # land only
where:
Expand All @@ -57,12 +72,18 @@ obs filters:
name: MetaData/stationIdentification
is_in: [71120,71397,71621,71727,71816]
size where true: 5
obs post filters:
- filter: Background Check # gross error check
filter variables:
- name: totalSnowDepth
threshold: 6.25
action:
name: reject
- filter: Temporal Thinning
min_spacing: '{{ LAND_WINDOW_LENGTH }}'
seed_time: '{{ current_cycle | to_isotime }}'
category_variable:
name: MetaData/stationIdentification
- filter: Met Office Buddy Check
filter variables:
- name: totalSnowDepth
Expand All @@ -86,18 +107,4 @@ obs filters:
damping_factor_1: 1.0
damping_factor_2: 1.0
background_error_group: BkgError
- filter: Perform Action
filter variables:
- name: totalSnowDepth
action:
name: assign error
error parameter: 40.0
- filter: Variable Assignment
assignments:
- name: GrossErrorProbability/totalSnowDepth
type: float
value: 0.02
- name: BkgError/totalSnowDepth_background_error
type: float
value: 30.0

45 changes: 23 additions & 22 deletions parm/land/obs/config/snocvr_snow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,22 @@ obs localizations:
max nobs: 50
- localization method: Vertical Brasnett
vertical lengthscale: 700
obs filters:
obs pre filters:
- filter: Perform Action
filter variables:
- name: totalSnowDepth
action:
name: assign error
error parameter: 40.0
- filter: Variable Assignment
assignments:
- name: GrossErrorProbability/totalSnowDepth
type: float
value: 0.02
- name: BkgError/totalSnowDepth_background_error
type: float
value: 30.0
obs prior filters:
- filter: Bounds Check
filter variables:
- name: totalSnowDepth
Expand All @@ -37,7 +52,7 @@ obs filters:
- filter: Domain Check
where:
- variable:
name: MetaData/height
name: MetaData/stationElevation
minvalue: -999.0
- filter: Domain Check # land only
where:
Expand All @@ -51,17 +66,18 @@ obs filters:
name: GeoVaLs/vtype
minvalue: 14.5
maxvalue: 15.5
- filter: Temporal Thinning
min_spacing: '{{ LAND_WINDOW_LENGTH }}'
seed_time: '{{ current_cycle | to_isotime }}'
category_variable:
name: MetaData/stationIdentification
obs post filters:
- filter: Background Check # gross error check
filter variables:
- name: totalSnowDepth
threshold: 6.25
action:
name: reject
- filter: Temporal Thinning
min_spacing: '{{ LAND_WINDOW_LENGTH }}'
seed_time: '{{ current_cycle | to_isotime }}'
category_variable:
name: MetaData/stationIdentification
- filter: Met Office Buddy Check
filter variables:
- name: totalSnowDepth
Expand All @@ -85,18 +101,3 @@ obs filters:
damping_factor_1: 1.0
damping_factor_2: 1.0
background_error_group: BkgError
- filter: Perform Action
filter variables:
- name: totalSnowDepth
action:
name: assign error
error parameter: 40.0
- filter: Variable Assignment
assignments:
- name: GrossErrorProbability/totalSnowDepth
type: float
value: 0.02
- name: BkgError/totalSnowDepth_background_error
type: float
value: 30.0

3 changes: 0 additions & 3 deletions parm/land/prep/prep_gts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ gtsbufr:
- $(DATA)/obs
copy:
- [{{ COM_OBS }}/{{ OPREFIX }}adpsfc.tm00.bufr_d, {{ DATA }}/obs/]
- [{{ COM_OBS }}/{{ OPREFIX }}snocvr.tm00.bufr_d, {{ DATA }}/obs/]
gtsioda:
copy:
- [{{ DATA }}/{{ OPREFIX }}adpsfc_snow.nc4, {{ COM_OBS }}/{{ OPREFIX }}adpsfc_snow.nc4]
- [{{ DATA }}/{{ OPREFIX }}snocvr_snow.nc4, {{ COM_OBS }}/{{ OPREFIX }}snocvr_snow.nc4]
bufr2ioda:
adpsfc: {{ HOMEgfs }}/sorc/gdas.cd/test/testinput/bufr_adpsfc_snow.yaml
snocvr: {{ HOMEgfs }}/sorc/gdas.cd/test/testinput/bufr_snocvr_snow.yaml
2 changes: 1 addition & 1 deletion parm/land/prep/prep_ims.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ calcfims:
- [$(COM_OBS)/$(OPREFIX)IMS4km_to_FV3_mapping.$(CASE)_oro_data.nc, $(DATA)/obs/IMS4km_to_FV3_mapping.$(CASE)_oro_data.nc]
ims2ioda:
copy:
- [$(DATA)/ims_snow_{{ current_cycle | to_YMDH }}.nc4, $(COM_OBS)/$(OPREFIX)ims_snow.nc4]
- [$(DATA)/ims_snow_{{ current_cycle | to_YMDH }}.nc4, $(DATA)/obs/$(OPREFIX)ims_snow.nc4]

6 changes: 3 additions & 3 deletions test/testinput/bufr_adpsfc_snow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ observations:
stationIdentification:
query: "*/RPID"

height:
stationElevation:
query: "[*/SELV, */HSMSL]"

# ObsValue
Expand Down Expand Up @@ -64,9 +64,9 @@ observations:
units: "degree_east"
range: [-180, 180]

- name: "MetaData/height"
- name: "MetaData/stationElevation"
coordinates: "longitude latitude"
source: variables/height
source: variables/stationElevation
longName: "Height of Station"

- name: "MetaData/stationIdentification"
Expand Down
6 changes: 3 additions & 3 deletions test/testinput/bufr_snocvr_snow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ observations:
stationIdentification:
query: "*/WGOSLID"

height:
stationElevation:
query: "[*/SELV, */HSMSL]"

# ObsValue
Expand Down Expand Up @@ -64,9 +64,9 @@ observations:
units: "degree_east"
range: [-180, 180]

- name: "MetaData/height"
- name: "MetaData/stationElevation"
coordinates: "longitude latitude"
source: variables/height
source: variables/stationElevation
longName: "Height of Station"

- name: "MetaData/stationIdentification"
Expand Down
Empty file modified ush/ioda/bufr2ioda/bufr2ioda_subpfl_argo_profiles.py
100644 → 100755
Empty file.
8 changes: 2 additions & 6 deletions utils/obsproc/Ghrsst2Ioda.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ namespace gdasapp {
fullConfig_.get("bounds.min", sstMin);
float sstMax;
fullConfig_.get("bounds.max", sstMax);
if ( sstUnits == "C" ) {
sstMin += 273.15;
sstMax += 273.15;
}

// Open the NetCDF file in read-only mode
netCDF::NcFile ncFile(fileName, netCDF::NcFile::read);
Expand Down Expand Up @@ -135,9 +131,9 @@ namespace gdasapp {
preqc[i][j] = 5 - static_cast<int>(sstPreQC[0][i][j]);

// bias corrected sst, regressed to the drifter depth
sst[i][j] = static_cast<float>(sstObsVal[index]) * sstScaleFactor + sstOffSet
// Remove added sstOffSet for Celsius
sst[i][j] = static_cast<float>(sstObsVal[index]) * sstScaleFactor
- static_cast<float>(sstObsBias[index]) * biasScaleFactor;

// mask
if (sst[i][j] >= sstMin && sst[i][j] <= sstMax && preqc[i][j] ==0) {
mask[i][j] = 1;
Expand Down
3 changes: 2 additions & 1 deletion utils/obsproc/NetCDFToIodaConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ namespace gdasapp {
ioda::Variable iodaDatetime =
ogrp.vars.createWithScales<int64_t>("MetaData/dateTime",
{ogrp.vars["Location"]}, long_params);
iodaDatetime.atts.add<std::string>("units", {iodaVarsAll.referenceDate_}, {1});
// TODO(MD): Make sure units with iodaVarsAll when applying mpi
iodaDatetime.atts.add<std::string>("units", {iodaVars.referenceDate_}, {1});
ioda::Variable iodaLat =
ogrp.vars.createWithScales<float>("MetaData/latitude",
{ogrp.vars["Location"]}, float_params);
Expand Down
1 change: 0 additions & 1 deletion utils/test/testinput/gdas_ghrsst2ioda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ binning:
stride: 2
min number of obs: 1
bounds:
units: C
min: -3.0
max: 50.0
output file: ghrsst_sst_mb_20210701.ioda.nc
Expand Down
6 changes: 3 additions & 3 deletions utils/test/testref/ghrsst2ioda.test
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Reading: [ghrsst_sst_mb_202107010000.nc4,ghrsst_sst_mb_202107010100.nc4]
seconds since 1981-01-01T00:00:00Z
obsVal:
Min: 276.708
Max: 281.714
Sum: 10051.7
Min: 3.558
Max: 8.5635
Sum: 218.297
obsError:
Min: 0.32
Max: 0.61
Expand Down

0 comments on commit 23453d7

Please sign in to comment.