-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CX and varobs for Surfacecloud (#175)
* Added namelist files for SurfaceCloud to both varobs and cx, and added varobs writer functionality to provide obs value and relevant obs error * Changes for SurfaceCloud. Updated python script and run it for the new settings. Added Varfield 15 (cloud) and have needed to add Cx field cloud_layer too. Added first attempt at cxwriter and varobswriter yaml files for SurfaceCloud. * Remove files that should not have been changed, and some tweaks to the python script for SurfaceCloud tests * Add files created by running python code * Added yaml files and relevant namelist files for testing * Change list of simulated and observed variables in surfacecloud varobswriter * Changed obs error for cloud fraction column to be in DerivedObsError/CloudError * Added missing ObsValue/stationPressure field to varobs netCDF for surfacecloud * Added Cloud as derived variable * Update to CMakeLists to include tests for varfield 15 and cx upper air field 15 * Small change to CMakeLists in etc directory to change order of namelists * Correction to varobs 15 setup * Change to PLevels * Update cloud_layer in cxfields mod file * Change VarField 15 (cloud) to have use_chans instead of use_levels in unit test * New netCDF file for VarField 15 (cloud) * Fix for the varobswriter for varfield cloud * Updates to cx and varobs writer ctest yamls * Updates to ctest yaml files * Updates for ctest yamls * Update to ctest varobswriter yaml * added derived obs * update 015_VarField_cloud.yaml (issue with missing data in ob value) * Cloud update * working for test_opsinputs_varobswriter_015_VarField_cloud * not sure if any better, but needed to checkout dev * include yaml change (missing in previous commit) * change to surfacecloud namelist for Cx ctest * add to cmakelist * set CXX17 standard * change cloud to cloudAmount * switch off cxx extensions * change name * change in src/opsinputs/opsinputs_varobswriter_mod.F90 * fixed varobswriter_ukvnamelist_surfacecloud --------- Co-authored-by: fabien-mo <[email protected]> Co-authored-by: Yaswant Pradhan <[email protected]>
- Loading branch information
1 parent
d0a04be
commit 65e4e93
Showing
18 changed files
with
260 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
&VarobsControlNL | ||
Varfields=15 | ||
/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
3 changes: 3 additions & 0 deletions
3
test/testinput/CxWriterNamelists_015_UpperAirCxField_cloud_layer/SurfaceCloud.nl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
&CXControlNL | ||
CxFields=9201 | ||
/ |
3 changes: 3 additions & 0 deletions
3
test/testinput/VarObsWriterNamelists_015_VarField_cloud/SurfaceCloud.nl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
&VarobsControlNL | ||
Varfields=15 | ||
/ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
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: [cloud_layer, cloudAmount] | ||
observed variables: [] | ||
derived variables: [cloud_layer, cloudAmount] | ||
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] # 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: ["11.30000","11.20000","11.10000", | ||
"12.30000","-1073741824.00000","12.10000", | ||
"13.30000","13.20000","13.10000", | ||
"14.30000","14.20000","14.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 |