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 CX and varobs for Surfacecloud #175

Merged
merged 40 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c139f78
Added namelist files for SurfaceCloud to both varobs and cx, and adde…
PJLevensMO May 18, 2023
df9e648
Changes for SurfaceCloud. Updated python script and run it for the ne…
PJLevensMO May 19, 2023
306761b
Remove files that should not have been changed, and some tweaks to th…
PJLevensMO May 19, 2023
afbfbfd
Add files created by running python code
PJLevensMO May 19, 2023
fea7626
Added yaml files and relevant namelist files for testing
PJLevensMO May 19, 2023
d69e14d
Change list of simulated and observed variables in surfacecloud varob…
PJLevensMO May 19, 2023
be09e25
Changed obs error for cloud fraction column to be in DerivedObsError/…
PJLevensMO May 23, 2023
eda0888
Added missing ObsValue/stationPressure field to varobs netCDF for sur…
PJLevensMO May 24, 2023
449b454
Added Cloud as derived variable
PJLevensMO May 24, 2023
556aab5
Update to CMakeLists to include tests for varfield 15 and cx upper ai…
PJLevensMO May 25, 2023
1f90a09
Small change to CMakeLists in etc directory to change order of namelists
PJLevensMO Jun 2, 2023
efbe466
Correction to varobs 15 setup
PJLevensMO Jun 2, 2023
80bbcac
Change to PLevels
PJLevensMO Jun 5, 2023
2416c73
Update cloud_layer in cxfields mod file
PJLevensMO Jun 16, 2023
d85aec6
Merge branch 'develop' into feature/surfacecloud
PJLevensMO Jul 7, 2023
502faa2
Change VarField 15 (cloud) to have use_chans instead of use_levels in…
PJLevensMO Jul 19, 2023
6d35156
New netCDF file for VarField 15 (cloud)
PJLevensMO Jul 19, 2023
a41bc85
Fix for the varobswriter for varfield cloud
PJLevensMO Jul 19, 2023
2075436
Updates to cx and varobs writer ctest yamls
PJLevensMO Jul 21, 2023
a3ffa86
Updates to ctest yaml files
PJLevensMO Jul 21, 2023
54694ad
Updates for ctest yamls
PJLevensMO Jul 21, 2023
5e43672
Update to ctest varobswriter yaml
PJLevensMO Jul 21, 2023
c403fe6
added derived obs
fabien-mo Jul 24, 2023
56a4d55
update 015_VarField_cloud.yaml (issue with missing data in ob value)
fabien-mo Jul 27, 2023
6822f1c
Cloud update
fabien-mo Jul 31, 2023
4a36ebf
Merge branch 'develop' into feature/surfacecloud
fabien-mo Aug 1, 2023
c2d4065
working for test_opsinputs_varobswriter_015_VarField_cloud
fabien-mo Aug 1, 2023
2db67f1
not sure if any better, but needed to checkout dev
fabien-mo Aug 1, 2023
7f6f225
include yaml change (missing in previous commit)
fabien-mo Aug 1, 2023
d4864e6
change to surfacecloud namelist for Cx ctest
fabien-mo Aug 2, 2023
133e112
add to cmakelist
fabien-mo Aug 2, 2023
ae8cbfd
set CXX17 standard
yaswant Aug 2, 2023
2b1a422
change cloud to cloudAmount
fabien-mo Aug 3, 2023
7456ea4
switch off cxx extensions
yaswant Aug 3, 2023
a7b8188
change name
fabien-mo Aug 7, 2023
6bf8e1d
Merge branch 'develop' into feature/surfacecloud_fabien-mo
fabien-mo Aug 7, 2023
b56d74a
Merge branch 'feature/surfacecloud_fabien-mo' into feature/surfacecloud
fabien-mo Aug 7, 2023
f8ebaf9
change in src/opsinputs/opsinputs_varobswriter_mod.F90
fabien-mo Aug 8, 2023
72f337f
fixed varobswriter_ukvnamelist_surfacecloud
fabien-mo Aug 15, 2023
810f960
Merge branch 'feature/surfacecloud_fabien-mo' into feature/surfacecloud
fabien-mo Aug 15, 2023
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
2 changes: 1 addition & 1 deletion Varfields.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
| 10 | `VarField_britemp` | `CorBriTemp(:,:)` | bias-corrected brightness temperatures | `BiasCorrObsValue/brightnessTemperature` | |
| 11 | `VarField_tskin` | `Tskin(:)` | skin temperature | `OneDVar/skinTemperature` | |
| 12 | `VarField_gpstzdelay` | `gpstzdelay(:)`| Ground based GNSS Total Zenith Delay | `BiasCorrObsValue/zenithTotalDelay` | |
| 15 | `VarField_cloud` | | | | Implement |
| 15 | `VarField_cloud` | `cloud(:,:)` | cloud fraction | `DerivedObsValue/cloudAmount`| |
| 16 | `VarField_rainrate` | | | | Implement |
| 17 | `VarField_mwemiss` | `Emissivity(:,:)` | surface emissivity | `Emiss/emissivity` | |
| 18 | `VarField_tcozone` | `TCozone(:)` | total column ozone (Du) | `MetaData/ozoneTotal` | |
Expand Down
2 changes: 1 addition & 1 deletion deps/ops/code/OpsMod_Varobs/Ops_SetupVarArray.inc
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ DO Ivar = 1, NumValidVarFields
RArrVrbl1d => Ob % AMSUb_Temp
CASE (VarField_cloud)
ObHdrVrbl = Ob % header % Cloud
ObVrblMulti => Ob % Cloud
ObVrblMulti => Ob % Cloud(:,:)
Pge_2D => Pge % Cloud
CASE (VarField_rainrate)
ObHdrVrbl = Ob % header % Rainrate
Expand Down
8 changes: 8 additions & 0 deletions etc/ukv/cx/SurfaceCloud.nl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
&CXControlNL
! Quantities for which H(x) is not calculated so GeoVaLs are used to produced CX columns.
! - multi-level
! 4 = theta, 10 = q, 12 = qcf, 254 = qcl, 407 = p, 9201 = cloud_layer
! - single-level
! 1 = pstar, 31 = seaice, 33 = orog, 9217 = CloudAmount
CxFields=1,4,10,12,31,33,254,407,9201,9217
/
3 changes: 3 additions & 0 deletions etc/ukv/varobs/SurfaceCloud.nl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
&VarobsControlNL
Varfields=15
/
2 changes: 1 addition & 1 deletion src/opsinputs/opsinputs_cxfields_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module opsinputs_cxfields_mod
character(len=*), parameter, public :: opsinputs_cxfields_RainRate_layer = opsinputs_cxfields_unknown
character(len=*), parameter, public :: opsinputs_cxfields_cloud_conv = opsinputs_cxfields_unknown
character(len=*), parameter, public :: opsinputs_cxfields_qc_conv = opsinputs_cxfields_unknown
character(len=*), parameter, public :: opsinputs_cxfields_cloud_layer = opsinputs_cxfields_unknown
character(len=*), parameter, public :: opsinputs_cxfields_cloud_layer = "cloud_layer"
character(len=*), parameter, public :: opsinputs_cxfields_ozone = opsinputs_cxfields_unknown
character(len=*), parameter, public :: opsinputs_cxfields_qcf = var_cli
character(len=*), parameter, public :: opsinputs_cxfields_qcl = var_clw
Expand Down
4 changes: 4 additions & 0 deletions src/opsinputs/opsinputs_varobswriter_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,10 @@ subroutine opsinputs_varobswriter_populateobservations( &
! TODO(someone): handle this varfield
! call Ops_Alloc(Ob % Header % AMSUb_Temp, "AMSUb_Temp", Ob % Header % NumObsLocal, Ob % AMSUb_Temp)
case (VarField_cloud)
call opsinputs_fill_fillelementtype2dfromnormalvariablewithlevels( &
Ob % Header % Cloud, "Cloud", Ob % Header % NumObsLocal, Ob % Cloud, &
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should the name Cloud match up with the name used in JCSDA-internal/ioda#1062?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not necessarily, but maybe.

The way it works in OPS is that Cloud or cloud is the field that goes into the varobs, i.e. this one, it is the cloud fraction on model levels calculated in the SurfaceCloud routine, whereas the CX field is what is called level_cloud and I think is the one Fabien has added there. I'm not 100% sure what their interaction should be in JOPA, whether they should have the same name or not.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this needs to match with the name proposed in https://github.com/JCSDA-internal/ioda/pull/1062, i.e. cloudAmount instead of Cloud.

However I am happy if you want to commit this as is, and then handle the variable name change with separate PR to ioda, ufo, opsinputs, etc?

ObsSpace, self % modlevs, "cloudAmount_", "DerivedObsValue", self % GeoVaLsAreTopToBottom, &
"cloudAmount_", "DerivedObsError")
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should be writing out from DerivedObsError here (as mentioned in https://github.com/JCSDA-internal/ufo/pull/2957). Also can I check why there is a trailing underscore after cloudAmount?

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, thanks James.
Are you suggesting to replace DerivedObsError with EffectiveError, or simply remove it completely?
The underscore were @ctgh's suggestion to ensure that when the data is on model level, we get cloudAmount_1 to _70 and not cloudAmount1.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see, that makes sense regarding the underscores, thanks for clarifying.

We would want to replace DerivedObsError with ObsErrorData I think

! TODO(someone): handle this varfield
! call Ops_Alloc(Ob % Header % Cloud, "Cloud", Ob % Header % NumObsLocal, Ob % Cloud)
case (VarField_rainrate)
Expand Down
15 changes: 15 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ ADD_WRITER_TEST(NAME varobswriter_011_VarField_tskin
ADD_WRITER_TEST(NAME varobswriter_012_VarField_gpstzdelay
YAML 012_VarField_gpstzdelay.yaml
DATA 012_VarField_gpstzdelay.nc4)
ADD_WRITER_TEST(NAME varobswriter_015_VarField_cloud
YAML 015_VarField_cloud.yaml
DATA 015_VarField_cloud.nc4)
ADD_WRITER_TEST(NAME varobswriter_017_VarField_mwemiss
YAML 017_VarField_mwemiss.yaml
NAMELIST VarObsWriterNamelists_017_VarField_mwemiss/AMSUB.nl
Expand Down Expand Up @@ -347,6 +350,10 @@ ADD_WRITER_TEST(NAME varobswriter_ukvnamelist_sonde
YAML varobswriter_ukvnamelist_sonde.yaml
NAMELIST ../../etc/ukv/varobs/Sonde.nl
DATA varobs_ukvnamelist_sonde.nc4)
ADD_WRITER_TEST(NAME varobswriter_ukvnamelist_surfacecloud
YAML varobswriter_ukvnamelist_surfacecloud.yaml
NAMELIST ../../etc/ukv/varobs/SurfaceCloud.nl
DATA varobs_ukvnamelist_surfacecloud.nc4)

### CxWriter tests

Expand Down Expand Up @@ -429,6 +436,10 @@ ADD_WRITER_TEST(NAME cxwriter_011_UpperAirCxField_P
YAML 011_UpperAirCxField_P.yaml
NAMELIST CxWriterNamelists_011_UpperAirCxField_P/AMSUB.nl
DATA 011_UpperAirCxField_P.nc4 dummy.nc4)
ADD_WRITER_TEST(NAME cxwriter_015_UpperAirCxField_cloud_layer
YAML 015_UpperAirCxField_cloud_layer.yaml
NAMELIST CxWriterNamelists_015_UpperAirCxField_cloud_layer/SurfaceCloud.nl
DATA 015_UpperAirCxField_cloud_layer.nc4 dummy.nc4)
ADD_WRITER_TEST(NAME cxwriter_029_UpperAirCxField_qcf
YAML 029_UpperAirCxField_qcf.yaml
NAMELIST CxWriterNamelists_029_UpperAirCxField_qcf/AMSUB.nl
Expand Down Expand Up @@ -618,6 +629,10 @@ ADD_WRITER_TEST(NAME cxwriter_ukvnamelist_sonde
YAML cxwriter_ukvnamelist_sonde.yaml
NAMELIST ../../etc/ukv/cx/Sonde.nl
DATA cx_ukvnamelist_sonde.nc4 dummy.nc4)
ADD_WRITER_TEST(NAME cxwriter_ukvnamelist_surfacecloud
YAML cxwriter_ukvnamelist_surfacecloud.yaml
NAMELIST ../../etc/ukv/cx/SurfaceCloud.nl
DATA cx_ukvnamelist_surfacecloud.nc4 dummy.nc4)

### Tests of auxiliary classes

Expand Down
22 changes: 21 additions & 1 deletion test/generate_unittest_netcdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ def copy_var_to_var(Group, invarname, outvarname, filename):
output_1d_simulated_var_to_netcdf('precipitableWater', 'testinput/007_VarField_tcwv.nc4')
output_2d_simulated_var_to_netcdf('brightnessTemperature', 'testinput/010_VarField_britemp.nc4', with_bias=True)
output_1d_normal_var_to_netcdf ('skinTemperature', 'OneDVar', 'testinput/011_VarField_tskin.nc4')
output_2d_normal_var_to_netcdf ('cloudAmount', 'DerivedObsValue', 'testinput/015_VarField_cloud.nc4', use_chans=True)
output_2d_normal_var_to_netcdf ('emissivity', 'Emiss', 'testinput/017_VarField_mwemiss.nc4', use_chans=True)
output_1d_normal_var_to_netcdf ('ozoneTotal', 'MetaData', 'testinput/018_VarField_tcozone.nc4')
output_1d_normal_var_to_netcdf ('sensorZenithAngle', 'MetaData', 'testinput/019_VarField_satzenith.nc4')
Expand Down Expand Up @@ -765,6 +766,14 @@ def copy_var_to_var(Group, invarname, outvarname, filename):
copy_var_to_var('ObsValue', 'potentialTemperature', 'airTemperature', 'testinput/varobs_ukvnamelist_sonde.nc4')
copy_var_to_var('ObsError', 'potentialTemperature', 'airTemperature', 'testinput/varobs_ukvnamelist_sonde.nc4')

# SurfaceCloud - UKV
output_full_varobs_to_netcdf(['MetaData/latitude',
'MetaData/longitude',
'ObsValue/stationPressure'],
['DerivedObsValue/cloudAmount', 'DerivedObsError/cloudAmount'],
[],
'testinput/varobs_ukvnamelist_surfacecloud.nc4')

# Scatwind
output_full_varobs_to_netcdf(['MetaData/latitude', 'MetaData/longitude'],
['ObsValue/windEastward', 'ObsError/windEastward', 'GrossErrorProbability/windEastward',
Expand Down Expand Up @@ -830,6 +839,7 @@ def copy_var_to_var(Group, invarname, outvarname, filename):
output_2d_geoval_to_netcdf ('specific_humidity', 'testinput/005_UpperAirCxField_q.nc4')
output_2d_geoval_to_netcdf ('air_pressure', 'testinput/033_UpperAirCxField_p_bar.nc4')
output_2d_geoval_to_netcdf ('air_pressure_levels', 'testinput/011_UpperAirCxField_P.nc4')
output_2d_geoval_to_netcdf ('cloud_layer', 'testinput/015_UpperAirCxField_cloud_layer.nc4')
output_2d_geoval_to_netcdf ('mass_content_of_cloud_ice_in_atmosphere_layer', 'testinput/029_UpperAirCxField_qcf.nc4')
output_2d_geoval_to_netcdf ('mass_content_of_cloud_liquid_water_in_atmosphere_layer', 'testinput/030_UpperAirCxField_qcl.nc4')
output_2d_geoval_to_netcdf ('cloud_volume_fraction_in_atmosphere_layer', 'testinput/031_UpperAirCxField_cloud_bulk.nc4')
Expand Down Expand Up @@ -904,7 +914,7 @@ def copy_var_to_var(Group, invarname, outvarname, filename):
'mass_content_of_cloud_liquid_water_in_atmosphere_layer', 'air_pressure_levels',
'cloud_volume_fraction_in_atmosphere_layer', 'liquid_cloud_volume_fraction_in_atmosphere_layer', 'ice_cloud_volume_fraction_in_atmosphere_layer'],
'testinput/cx_globalnamelist_ssmis.nc4')
# MWSFY3
output_full_cx_to_netcdf(['skin_temperature','ice_area_fraction','surface_altitude','surface_pressure','uwind_at_10m',
'vwind_at_10m','surface_temperature','relative_humidity_2m','surface_pressure_at_mean_sea_level'],
Expand Down Expand Up @@ -947,6 +957,16 @@ def copy_var_to_var(Group, invarname, outvarname, filename):
'ice_cloud_volume_fraction_in_atmosphere_layer'],
'testinput/cx_ukvnamelist_sonde.nc4')

# SurfaceCloud - UKV
output_full_cx_to_netcdf(['surface_altitude',
'surface_pressure',
'ice_area_fraction',
'total_cloud_amount'],
['potential_temperature', 'specific_humidity', 'air_pressure_levels', 'cloud_layer',
'mass_content_of_cloud_ice_in_atmosphere_layer',
'mass_content_of_cloud_liquid_water_in_atmosphere_layer'],
'testinput/cx_ukvnamelist_surfacecloud.nc4')

# SatTCWV
output_full_cx_to_netcdf(['surface_altitude', 'surface_pressure', 'ice_area_fraction', 'total_cloud_amount'],
['potential_temperature', 'specific_humidity', 'air_pressure_levels', 'mass_content_of_cloud_ice_in_atmosphere_layer',
Expand Down
Binary file not shown.
40 changes: 40 additions & 0 deletions test/testinput/015_UpperAirCxField_cloud_layer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
window begin: 2018-01-01T00:00:00Z
window end: 2018-01-01T01:00:00Z

observations:
- obs space:
name: SurfaceCloud
obsdatain:
engine:
type: H5File
obsfile: Data/dummy.nc4
simulated variables: [dummy]
geovals:
filename: Data/015_UpperAirCxField_cloud_layer.nc4
obs filters:
# Set the flag of observations with missing values to "pass": we want to check if these
# values are encoded correctly in the Cx file.
- filter: Reset Flags to Pass
flags_to_reset: [10, 15] # missing, Hfailed
# Reject observation 3: we want to check if it is omitted from the Cx file, as expected.
- filter: Domain Check
where:
- variable:
name: MetaData/latitude
minvalue: 0.0
- filter: Cx Writer
namelist_directory: testinput/CxWriterNamelists_015_UpperAirCxField_cloud_layer
reject_obs_with_any_variable_failing_qc: true
general_mode: debug
IC_PLevels: 5
- filter: Cx Checker
expected_surface_variables: []
expected_upper_air_variables: ["15"] # IndexCxcloud_layer
expected_main_table_columns:
- # batch 1
- ["1.10", "1.20", "1.30"] # column 1
- ["2.10", "**********", "2.30"] # column 2 (the asterisks represent a missing float)
- ["4.10", "4.20", "4.30"] # column 3
HofX: ObsValue # just a placeholder -- not used, but needed to force calls to postFilter.
benchmarkFlag: 1000 # just to keep the ObsFilters test happy
flaggedBenchmark: 0
Binary file added test/testinput/015_VarField_cloud.nc4
Binary file not shown.
58 changes: 58 additions & 0 deletions test/testinput/015_VarField_cloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
window begin: 2018-01-01T00:00:00Z
window end: 2018-01-01T02:00:00Z

observations:
- obs space:
name: SurfaceCloud
obsdatain:
engine:
type: H5File
obsfile: Data/015_VarField_cloud.nc4
simulated variables: [dummy]
channels: 1-3
obs filters:
# Set the flag of observations with missing values to "pass": we want to check if these
# values are encoded correctly in the VarObsFile.
- filter: Reset Flags to Pass
flags_to_reset: [10, 15] # missing, Hfailed
# Reject observation 3: we want to check if it is omitted from the VarObs file, as expected.
- filter: Domain Check
where:
- variable:
name: MetaData/latitude
minvalue: 0.0
- filter: VarObs Writer
namelist_directory: ../etc/ukv/varobs
general_mode: debug
IC_PLevels: 3
geovals_are_top_to_bottom: false
- filter: VarObs Checker
expected_main_table_columns:
# In the arrays below, rows denote locations and columns channels.
field: ["15", "15", "15",
"15", "15", "15",
"15", "15", "15",
"15", "15", "15"]
ob value: ["4.10000" ,"5.10000","6.10000",
"-1073741824.00000","5.20000","6.20000",
"4.30000" ,"5.30000","6.30000",
"4.40000" ,"5.40000","6.40000"]
lat: ["21.00000", "21.00000", "21.00000",
"22.00000", "22.00000", "22.00000",
"-23.00000", "-23.00000", "-23.00000",
"24.00000", "24.00000", "24.00000"]
lon: ["31.00000", "31.00000", "31.00000",
"32.00000", "32.00000", "32.00000",
"33.00000", "33.00000", "33.00000",
"34.00000", "34.00000", "34.00000"]
time: ["-3540.00000", "-3540.00000", "-3540.00000",
"-3480.00000", "-3480.00000", "-3480.00000",
"-3420.00000", "-3420.00000", "-3420.00000",
"-3360.00000", "-3360.00000", "-3360.00000"]
Callsign: ["station_1", "station_1", "station_1",
"station_2", "station_2", "station_2",
"station_3", "station_3", "station_3",
"station_4", "station_4", "station_4"]
HofX: ObsValue # just a placeholder -- not used, but needed to force calls to postFilter.
benchmarkFlag: 1000 # just to keep the ObsFilters test happy
flaggedBenchmark: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
&CXControlNL
CxFields=9201
/
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
&VarobsControlNL
Varfields=15
/
Binary file added test/testinput/cx_ukvnamelist_surfacecloud.nc4
Binary file not shown.
46 changes: 46 additions & 0 deletions test/testinput/cxwriter_ukvnamelist_surfacecloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
window begin: 2018-01-01T00:00:00Z
window end: 2018-01-01T01:00:00Z

observations:
- obs space:
name: SurfaceCloud
obsdatain:
engine:
type: H5File
obsfile: Data/dummy.nc4
simulated variables: [dummy]
geovals:
filename: Data/cx_ukvnamelist_surfacecloud.nc4
obs filters:
# Set the flag of observations with missing values to "pass": we want to check if these
# values are encoded correctly in the Cx file.
- filter: Reset Flags to Pass
flags_to_reset: [10] # missing
# Reject observation 3: we want to check if it is omitted from the Cx file, as expected.
- filter: Domain Check
where:
- variable:
name: MetaData/latitude
minvalue: 0.0
- filter: Cx Writer
namelist_directory: ../etc/ukv/cx
reject_obs_with_any_variable_failing_qc: true
general_mode: debug
geovals_are_top_to_bottom: false
- filter: Cx Checker
expected_surface_variables: ["1","2","17","24"]
expected_upper_air_variables: ["1","5","11","15","29","30"]
expected_main_table_columns:
- # observation 3 is rejected by the tests above hence only 3 (1,2,4) columns
- ["7.10","17.10","27.10","37.10","1.30","1.20","1.10","11.30",
"11.20","11.10","21.30","21.20","21.10","31.30","31.20","31.10",
"41.30","41.20","41.10","51.30","51.20","51.10"]
- ["**********","**********","**********","**********","2.30","**********","2.10","12.30",
"**********","12.10","22.30","**********","22.10","32.30","**********","32.10","42.30",
"**********","42.10","52.30","**********","52.10"]
- ["7.40","17.40","27.40","37.40","4.30","4.20","4.10","14.30",
"14.20","14.10","24.30","24.20","24.10","34.30","34.20","34.10",
"44.30","44.20","44.10","54.30","54.20","54.10"]
HofX: ObsValue # just a placeholder -- not used""but needed to force calls to postFilter.
benchmarkFlag: 1000 # just to keep the ObsFilters test happy
flaggedBenchmark: 0
Binary file not shown.
56 changes: 56 additions & 0 deletions test/testinput/varobswriter_ukvnamelist_surfacecloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
window begin: 2018-01-01T00:00:00Z
window end: 2018-01-01T02:00:00Z

observations:
- obs space:
name: SurfaceCloud
obsdatain:
engine:
type: H5File
obsfile: Data/varobs_ukvnamelist_surfacecloud.nc4
simulated variables: [stationPressure]
observed variables: [stationPressure]
derived variables: [cloudAmount]
obs filters:
# Set the flag of observations with missing values to "pass": we want to check if these
# values are encoded correctly in the VarObsFile.
- filter: Reset Flags to Pass
flags_to_reset: [10] # missing
# Blacklist all missing entries in the original profiles (i.e. observation 2)
# This must be run after the Reset Flags to Pass filter,
# which sets the flags of any missing values in the original profiles
# to 'pass'. Therefore this filter is run with the 'defer to post' option set to true.
- filter: BlackList
where:
- variable:
name: MetaData/latitude
is_not_defined:
defer to post: true
- filter: VarObs Writer
namelist_directory: ../etc/ukv/varobs
general_mode: debug
IC_PLevels: 3
reject_obs_with_all_variables_failing_qc: true
- filter: VarObs Checker
expected_main_table_columns:
# Rows are locations, columns are filter variables
# The blacklist prevents the missing ob from being written out
field: [15,15,15,
15,15,15,
15,15,15,
15,15,15]
ob value: ["1.30000","1.20000","1.10000",
"2.30000","-1073741824.00000","2.10000",
"3.30000","3.20000","3.10000",
"4.30000","4.20000","4.10000"]
lat: ["7.10000","7.10000","7.10000",
"-1073741824.00000","-1073741824.00000","-1073741824.00000",
"7.30000","7.30000","7.30000",
"7.40000","7.40000","7.40000"]
lon: ["17.10000","17.10000","17.10000",
"-1073741824.00000","-1073741824.00000","-1073741824.00000",
"17.30000","17.30000","17.30000",
"17.40000","17.40000","17.40000"]
HofX: ObsValue # just a placeholder -- not used, but needed to force calls to postFilter.
benchmarkFlag: 1000 # just to keep the ObsFilters test happy
flaggedBenchmark: 0
Loading