Skip to content

Commit 6c087cd

Browse files
authored
Add cx , varobs namelists for EPSMWS obsgroup (#246)
* add missing namelist files for EPSMWS and associated ctest * minor update to default fields * add cx test for epsmws requested by reviewer * add cx test for sternamwr too * Trigger CI
1 parent 9666742 commit 6c087cd

11 files changed

+237
-5
lines changed

deps/ops/stubs/OpsMod_Varobs/Ops_GetDefaultVarfields.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,15 +285,15 @@ SELECT CASE (ObsGroup)
285285
VarField_tcozone,VarField_solzenith,VarField_QCinfo, &
286286
VarField_clw/)
287287
CASE (ObsGroupEPSMWS) !setup for jedi
288-
Varfields(1:10) = (/Varfield_britemp,Varfield_satid,Varfield_satzenith, &
288+
Varfields(1:9) = (/Varfield_britemp,Varfield_satid,Varfield_satzenith, &
289289
Varfield_solzenith,Varfield_tskin, &
290290
Varfield_surface,Varfield_numchans,Varfield_channum, &
291-
Varfield_mwemiss, varfield_biaspredictors /)
291+
Varfield_mwemiss /)
292292
CASE (ObsGroupSternaMWR) !set up for jedi
293-
Varfields(1:10) = (/Varfield_britemp,Varfield_satid,Varfield_satzenith, &
293+
Varfields(1:9) = (/Varfield_britemp,Varfield_satid,Varfield_satzenith, &
294294
Varfield_solzenith,Varfield_tskin, &
295295
Varfield_surface,Varfield_numchans,Varfield_channum, &
296-
Varfield_mwemiss, varfield_biaspredictors /)
296+
Varfield_mwemiss /)
297297
CASE (ObsGroupRainAccum)
298298
Varfields(1:1) = (/Varfield_RainAccum/)
299299
END SELECT

etc/global/cx/EPSMWS.nl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
&CXControlNL
2+
CxFields=4,10,12,24,31,33,254,266,267,268,407,409,3209,3210,3236,3245,16222
3+
/

etc/global/varobs/EPSMWS.nl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
&VarobsControlNL
2+
Varfields=10,11,17,19,21,54,55,28,31,80
3+
/

test/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,10 @@ ADD_WRITER_TEST(NAME varobswriter_globalnamelist_sternamwr
371371
YAML varobswriter_globalnamelist_sternamwr.yaml
372372
NAMELIST ../../etc/global/varobs/SternaMWR.nl
373373
DATA varobs_globalnamelist_sternamwr.nc4)
374+
ADD_WRITER_TEST(NAME varobswriter_globalnamelist_epsmws
375+
YAML varobswriter_globalnamelist_epsmws.yaml
376+
NAMELIST ../../etc/global/varobs/EPSMWS.nl
377+
DATA varobs_globalnamelist_epsmws.nc4)
374378

375379
# Tests the UKV namelist files in the etc directory
376380

@@ -650,6 +654,14 @@ ADD_WRITER_TEST(NAME cxwriter_globalnamelist_atovs
650654
YAML cxwriter_globalnamelist_atovs.yaml
651655
NAMELIST ../../etc/global/cx/ATOVS.nl
652656
DATA cx_globalnamelist_atovs.nc4 dummy.nc4)
657+
ADD_WRITER_TEST(NAME cxwriter_globalnamelist_epsmws
658+
YAML cxwriter_globalnamelist_epsmws.yaml
659+
NAMELIST ../../etc/global/cx/EPSMWS.nl
660+
DATA cx_globalnamelist_epsmws.nc4 dummy.nc4)
661+
ADD_WRITER_TEST(NAME cxwriter_globalnamelist_sternamwr
662+
YAML cxwriter_globalnamelist_sternamwr.yaml
663+
NAMELIST ../../etc/global/cx/SternaMWR.nl
664+
DATA cx_globalnamelist_sternamwr.nc4 dummy.nc4)
653665
ADD_WRITER_TEST(NAME cxwriter_globalnamelist_ssmis
654666
YAML cxwriter_globalnamelist_ssmis.yaml
655667
NAMELIST ../../etc/global/cx/SSMIS.nl

test/generate_unittest_netcdfs.py

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,15 @@ def copy_var_to_var(Group, invarname, outvarname, filename):
832832
'thickness_850_300hPa_satid_17Predictor/brightnessTemperature'],
833833
['MetaData/surfaceQualifier', 'MetaData/satelliteIdentifier'],
834834
'testinput/varobs_globalnamelist_sternamwr.nc4')
835+
836+
# EPSMWS
837+
output_full_varobs_to_netcdf(['MetaData/latitude', 'MetaData/longitude', 'OneDVar/skinTemperature', 'MetaData/sensorZenithAngle',
838+
'MetaData/solarZenithAngle'],
839+
['ObsValue/brightnessTemperature', 'ObsError/brightnessTemperature', 'Emiss/emissivity',
840+
'BiasCorrObsValue/brightnessTemperature', 'thickness_850_300hPa_satid_13Predictor/brightnessTemperature',
841+
'thickness_850_300hPa_satid_17Predictor/brightnessTemperature'],
842+
['MetaData/surfaceQualifier', 'MetaData/satelliteIdentifier'],
843+
'testinput/varobs_globalnamelist_epsmws.nc4')
835844

836845

837846
# GNSS-RO
@@ -1106,7 +1115,22 @@ def copy_var_to_var(Group, invarname, outvarname, filename):
11061115
'cloud_liquid_water_mixing_ratio_wrt_moist_air_and_condensed_water', 'air_pressure_levels',
11071116
'cloud_volume_fraction_in_atmosphere_layer', 'liquid_cloud_volume_fraction_in_atmosphere_layer', 'ice_cloud_volume_fraction_in_atmosphere_layer'],
11081117
'testinput/cx_globalnamelist_atovs.nc4')
1109-
1118+
1119+
# EPSMWS
1120+
output_full_cx_to_netcdf(['skin_temperature_at_surface', 'ice_area_fraction', 'height_above_mean_sea_level_at_surface', 'air_pressure_at_surface', 'eastward_wind_at_10m',
1121+
'northward_wind_at_10m', 'air_temperature_at_2m', 'relative_humidity_at_2m', 'air_pressure_at_sea_level'],
1122+
['air_potential_temperature', 'water_vapor_mixing_ratio_wrt_moist_air', 'cloud_ice_mixing_ratio_wrt_moist_air_and_condensed_water',
1123+
'cloud_liquid_water_mixing_ratio_wrt_moist_air_and_condensed_water', 'air_pressure_levels',
1124+
'cloud_volume_fraction_in_atmosphere_layer', 'liquid_cloud_volume_fraction_in_atmosphere_layer', 'ice_cloud_volume_fraction_in_atmosphere_layer'],
1125+
'testinput/cx_globalnamelist_epsmws.nc4')
1126+
# SternaMWR
1127+
output_full_cx_to_netcdf(['skin_temperature_at_surface', 'ice_area_fraction', 'height_above_mean_sea_level_at_surface', 'air_pressure_at_surface', 'eastward_wind_at_10m',
1128+
'northward_wind_at_10m', 'air_temperature_at_2m', 'relative_humidity_at_2m', 'air_pressure_at_sea_level'],
1129+
['air_potential_temperature', 'water_vapor_mixing_ratio_wrt_moist_air', 'cloud_ice_mixing_ratio_wrt_moist_air_and_condensed_water',
1130+
'cloud_liquid_water_mixing_ratio_wrt_moist_air_and_condensed_water', 'air_pressure_levels',
1131+
'cloud_volume_fraction_in_atmosphere_layer', 'liquid_cloud_volume_fraction_in_atmosphere_layer', 'ice_cloud_volume_fraction_in_atmosphere_layer'],
1132+
'testinput/cx_globalnamelist_sternamwr.nc4')
1133+
11101134
# SSMIS
11111135
output_full_cx_to_netcdf(['skin_temperature_at_surface', 'ice_area_fraction', 'height_above_mean_sea_level_at_surface', 'air_pressure_at_surface', 'eastward_wind_at_10m',
11121136
'northward_wind_at_10m', 'air_temperature_at_2m', 'relative_humidity_at_2m', 'air_pressure_at_sea_level'],
16.1 KB
Binary file not shown.
16.1 KB
Binary file not shown.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
time window:
2+
begin: 2018-01-01T00:00:00Z
3+
end: 2018-01-01T01:00:00Z
4+
5+
observations:
6+
- obs space:
7+
name: EPSMWS
8+
obsdatain:
9+
engine:
10+
type: H5File
11+
obsfile: Data/dummy.nc4
12+
simulated variables: [dummy]
13+
geovals:
14+
filename: Data/cx_globalnamelist_epsmws.nc4
15+
obs filters:
16+
# Set the flag of observations with missing values to "pass": we want to check if these
17+
# values are encoded correctly in the Cx file.
18+
- filter: Reset Flags to Pass
19+
flags_to_reset: [10, 15] # missing, Hfailed
20+
# Reject observation 3: we want to check if it is omitted from the Cx file, as expected.
21+
- filter: Domain Check
22+
where:
23+
- variable:
24+
name: MetaData/latitude
25+
minvalue: 0.0
26+
- filter: Cx Writer
27+
namelist_directory: ../etc/global/cx
28+
reject_obs_with_any_variable_failing_qc: true
29+
general_mode: debug
30+
IC_PLevels: 5
31+
- filter: Cx Checker
32+
expected_surface_variables: ["1","2","3","4","5","6","13","16","17"]
33+
expected_upper_air_variables: ["1","5","11","29","30","31","34","35"]
34+
expected_main_table_columns:
35+
- # batch 1 - 9 1dvalues first ; then 2d values in expected order
36+
# observation 3 is rejected by the tests above hence only 3 (1,2,4) columns
37+
- ["27.10","37.10","67.10","77.10","47.10","57.10","7.10","87.10","17.10","1.10","1.20","1.30","11.10","11.20","11.30","41.10","41.20","41.30","21.10","21.20","21.30","31.10","31.20","31.30","51.10","51.20","51.30","71.10","71.20","71.30","61.10","61.20","61.30"] # column 1 - 1st observation
38+
- ["**********","**********","**********","**********","**********","**********","**********","**********","**********","2.10","**********","2.30","12.10","**********","12.30","42.10","**********","42.30","22.10","**********","22.30","32.10","**********","32.30","52.10","**********","52.30","72.10","**********","72.30","62.10","**********","62.30"] # column 2 - 2nd observation
39+
- ["27.40","37.40","67.40","77.40","47.40","57.40","7.40","87.40","17.40","4.10","4.20","4.30","14.10","14.20","14.30","44.10","44.20","44.30","24.10","24.20","24.30","34.10","34.20","34.30","54.10","54.20","54.30","74.10","74.20","74.30","64.10","64.20","64.30"] # column 3 - observation 4
40+
HofX: ObsValue # just a placeholder -- not used, but needed to force calls to postFilter.
41+
benchmarkFlag: 1000 # just to keep the ObsFilters test happy
42+
flaggedBenchmark: 0
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
time window:
2+
begin: 2018-01-01T00:00:00Z
3+
end: 2018-01-01T01:00:00Z
4+
5+
observations:
6+
- obs space:
7+
name: SternaMWR
8+
obsdatain:
9+
engine:
10+
type: H5File
11+
obsfile: Data/dummy.nc4
12+
simulated variables: [dummy]
13+
geovals:
14+
filename: Data/cx_globalnamelist_sternamwr.nc4
15+
obs filters:
16+
# Set the flag of observations with missing values to "pass": we want to check if these
17+
# values are encoded correctly in the Cx file.
18+
- filter: Reset Flags to Pass
19+
flags_to_reset: [10, 15] # missing, Hfailed
20+
# Reject observation 3: we want to check if it is omitted from the Cx file, as expected.
21+
- filter: Domain Check
22+
where:
23+
- variable:
24+
name: MetaData/latitude
25+
minvalue: 0.0
26+
- filter: Cx Writer
27+
namelist_directory: ../etc/global/cx
28+
reject_obs_with_any_variable_failing_qc: true
29+
general_mode: debug
30+
IC_PLevels: 5
31+
- filter: Cx Checker
32+
expected_surface_variables: ["1","2","3","4","5","6","13","16","17"]
33+
expected_upper_air_variables: ["1","5","11","29","30","31","34","35"]
34+
expected_main_table_columns:
35+
- # batch 1 - 9 1dvalues first ; then 2d values in expected order
36+
# observation 3 is rejected by the tests above hence only 3 (1,2,4) columns
37+
- ["27.10","37.10","67.10","77.10","47.10","57.10","7.10","87.10","17.10","1.10","1.20","1.30","11.10","11.20","11.30","41.10","41.20","41.30","21.10","21.20","21.30","31.10","31.20","31.30","51.10","51.20","51.30","71.10","71.20","71.30","61.10","61.20","61.30"] # column 1 - 1st observation
38+
- ["**********","**********","**********","**********","**********","**********","**********","**********","**********","2.10","**********","2.30","12.10","**********","12.30","42.10","**********","42.30","22.10","**********","22.30","32.10","**********","32.30","52.10","**********","52.30","72.10","**********","72.30","62.10","**********","62.30"] # column 2 - 2nd observation
39+
- ["27.40","37.40","67.40","77.40","47.40","57.40","7.40","87.40","17.40","4.10","4.20","4.30","14.10","14.20","14.30","44.10","44.20","44.30","24.10","24.20","24.30","34.10","34.20","34.30","54.10","54.20","54.30","74.10","74.20","74.30","64.10","64.20","64.30"] # column 3 - observation 4
40+
HofX: ObsValue # just a placeholder -- not used, but needed to force calls to postFilter.
41+
benchmarkFlag: 1000 # just to keep the ObsFilters test happy
42+
flaggedBenchmark: 0
16.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)