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 ctests for running GETKF in split mode and move reference files into repo #175

Merged
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
47d1596
Remove -t, always build tests, and add option for super exe
SamuelDegelia-NOAA Sep 12, 2024
78e08a6
Add -j options for number of build jobs
SamuelDegelia-NOAA Sep 12, 2024
e65c875
Remove old comment
SamuelDegelia-NOAA Sep 12, 2024
1045e42
Clarify -h message
SamuelDegelia-NOAA Sep 12, 2024
48fcd28
Remove ADD_RRFS_TESTS from rrfs-test cmake
SamuelDegelia-NOAA Sep 12, 2024
7225c95
First commit
SamuelDegelia-NOAA Sep 17, 2024
79389ca
Merge remote-tracking branch 'upstream/develop' into feature/split_ge…
SamuelDegelia-NOAA Sep 17, 2024
bac00a3
Include test ref in repo and update yamls
SamuelDegelia-NOAA Sep 17, 2024
af26857
Link testoutput into expr and add dependency for getkf_solver test
SamuelDegelia-NOAA Sep 18, 2024
0ff56e0
Merge branch 'develop' into feature/split_getkf_test
SamuelDegelia-NOAA Sep 18, 2024
19dd917
Run ctests in parallel using run_rrfs_tests.sh
SamuelDegelia-NOAA Sep 18, 2024
61338e7
Reconfigure to have all ctests run in unique directories
SamuelDegelia-NOAA Sep 19, 2024
d01a118
Reset cmake to older version
SamuelDegelia-NOAA Sep 19, 2024
897a1d1
Bug fix
SamuelDegelia-NOAA Sep 19, 2024
28d4c3f
Fix white space
SamuelDegelia-NOAA Sep 20, 2024
e44637a
Remove linking of ref data
SamuelDegelia-NOAA Sep 20, 2024
3a1eb0f
Merge branch 'develop' into feature/split_getkf_test
SamuelDegelia-NOAA Sep 24, 2024
84dd120
Add back in -j8 option after updating with develop
SamuelDegelia-NOAA Sep 24, 2024
f7ff439
Merge branch 'develop' into feature/split_getkf_test
guoqing-noaa Sep 26, 2024
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
1 change: 0 additions & 1 deletion fix/expr_data/mpas_2024052700/ref

This file was deleted.

66 changes: 35 additions & 31 deletions rrfs-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ add_to_dictionary(rrfs_fv3jedi_tests "rrfs_fv3jedi_letkf_2022052619" "fv3jedi_

# MPAS-JEDI tests
set(rrfs_mpasjedi_tests)
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_Ens3Dvar" "mpasjedi_variational.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_letkf" "mpasjedi_enkf.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_getkf" "mpasjedi_enkf.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_bumploc" "mpasjedi_error_covariance_toolbox.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_Ens3Dvar" "mpasjedi_variational.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_letkf" "mpasjedi_enkf.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_getkf" "mpasjedi_enkf.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_getkf_observer" "mpasjedi_enkf.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_getkf_solver" "mpasjedi_enkf.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_bumploc" "mpasjedi_error_covariance_toolbox.x")

message(STATUS "Use test data from rrfs-test-data repository")
set (rrfs-test_data_local "${CMAKE_SOURCE_DIR}/rrfs-test-data/")
Expand All @@ -37,22 +39,23 @@ if(FV3_DYCORE)
endif()

get_all_keys(rrfs_fv3jedi_tests caselist)
set(casedir "${CMAKE_CURRENT_BINARY_DIR}/rundir-rrfs_fv3jedi_2022052619")
set(src_casedir "${rrfs-test_data_local}/rrfs-data_fv3jedi_2022052619")
if (NOT EXISTS "${casedir}")
file(MAKE_DIRECTORY ${casedir})
endif()
file(CREATE_LINK ${src_casedir}/DataFix ${casedir}/DataFix SYMBOLIC)
file(CREATE_LINK ${src_casedir}/Data_static ${casedir}/Data_static SYMBOLIC)
file(CREATE_LINK ${src_casedir}/INPUT ${casedir}/INPUT SYMBOLIC)
file(CREATE_LINK ${src_casedir}/Data ${casedir}/Data SYMBOLIC)
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/rrfs-test/testoutput ${casedir}/testoutput SYMBOLIC)
foreach(case ${caselist})
get_from_dictionary(rrfs_fv3jedi_tests case exe)
set(casedir "${CMAKE_CURRENT_BINARY_DIR}/rundir-${case}")
set(src_casedir "${rrfs-test_data_local}/rrfs-data_fv3jedi_2022052619")
if (NOT EXISTS "${casedir}")
file(MAKE_DIRECTORY ${casedir})
endif()
file(CREATE_LINK ${src_casedir}/DataFix ${casedir}/DataFix SYMBOLIC)
file(CREATE_LINK ${src_casedir}/Data_static ${casedir}/Data_static SYMBOLIC)
file(CREATE_LINK ${src_casedir}/INPUT ${casedir}/INPUT SYMBOLIC)
file(CREATE_LINK ${src_casedir}/Data ${casedir}/Data SYMBOLIC)
file(COPY ${src_yaml}/${case}.yaml DESTINATION ${casedir} )
set(target_test ${case})
ecbuild_add_test( TARGET ${target_test}
MPI 80
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${target_test}
WORKING_DIRECTORY ${casedir}
guoqing-noaa marked this conversation as resolved.
Show resolved Hide resolved
ARGS ${target_test}.yaml
COMMAND ${exe} )
endforeach()
Expand All @@ -75,28 +78,29 @@ if(FV3_DYCORE)
set(MPI_ARGS "${MPI_ARGS} --ntasks-per-node=4")

get_all_keys(rrfs_mpasjedi_tests caselist)
set(casedir "${CMAKE_CURRENT_BINARY_DIR}/rundir-rrfs_mpasjedi_2024052700")
set(src_casedir "${rrfs-test_data_local}/rrfs-data_mpasjedi_2024052700")
if (NOT EXISTS "${casedir}")
file(MAKE_DIRECTORY ${casedir})
endif()
file(CREATE_LINK ${src_casedir}/data ${casedir}/data SYMBOLIC)
file(CREATE_LINK ${src_casedir}/graphinfo ${casedir}/graphinfo SYMBOLIC)
file(CREATE_LINK ${src_casedir}/stream_list ${casedir}/stream_list SYMBOLIC)
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/rrfs-test/testoutput ${casedir}/testoutput SYMBOLIC)
file(COPY ${src_casedir}/streams.atmosphere DESTINATION ${casedir})
file(COPY ${src_casedir}/namelist.atmosphere DESTINATION ${casedir})
file(COPY ${src_casedir}/geovars.yaml DESTINATION ${casedir})
file(COPY ${src_casedir}/keptvars.yaml DESTINATION ${casedir})
file(COPY ${src_casedir}/obsop_name_map.yaml DESTINATION ${casedir})
file(GLOB bl_FILES "${src_casedir}/*.*BL")
file(COPY ${bl_FILES} DESTINATION ${casedir})
foreach(case ${caselist})
get_from_dictionary(rrfs_mpasjedi_tests case exe)
set(casedir "${CMAKE_CURRENT_BINARY_DIR}/rundir-${case}")
set(src_casedir "${rrfs-test_data_local}/rrfs-data_mpasjedi_2024052700")
if (NOT EXISTS "${casedir}")
file(MAKE_DIRECTORY ${casedir})
endif()
file(CREATE_LINK ${src_casedir}/data ${casedir}/data SYMBOLIC)
file(CREATE_LINK ${src_casedir}/graphinfo ${casedir}/graphinfo SYMBOLIC)
file(CREATE_LINK ${src_casedir}/stream_list ${casedir}/stream_list SYMBOLIC)
file(COPY ${src_casedir}/streams.atmosphere DESTINATION ${casedir})
file(COPY ${src_casedir}/namelist.atmosphere DESTINATION ${casedir})
file(COPY ${src_casedir}/geovars.yaml DESTINATION ${casedir})
file(COPY ${src_casedir}/keptvars.yaml DESTINATION ${casedir})
file(COPY ${src_casedir}/obsop_name_map.yaml DESTINATION ${casedir})
file(GLOB bl_FILES "${src_casedir}/*.*BL")
file(COPY ${bl_FILES} DESTINATION ${casedir})
file(COPY ${src_yaml}/${case}.yaml DESTINATION ${casedir})
file(COPY ${src_yaml}/${case}.yaml DESTINATION ${casedir})
set(target_test ${case})
ecbuild_add_test( TARGET ${target_test}
MPI 120
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${target_test}
WORKING_DIRECTORY ${casedir}
ARGS ${target_test}.yaml
COMMAND ${exe} )
endforeach()
Expand Down
2 changes: 1 addition & 1 deletion rrfs-test/testinput/rrfs_fv3jedi_hyb_2022052619.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ output:
prefix: hybens3dvar-fv3_lam-C775 #Ens3dvar-fv3_lam-C775
frequency: PT1H
test:
reference filename: Data/testinput/rrfs-fv3jedi-hyb.ref
reference filename: testoutput/rrfs-fv3jedi-hyb.ref
test output filename: rrfs-fv3jedi-hyb.out
float relative tolerance: 1.0e-3
float absolute tolerance: 1.0e-6
Expand Down
2 changes: 1 addition & 1 deletion rrfs-test/testinput/rrfs_fv3jedi_letkf_2022052619.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ output: # for outputting mean posterior
prefix: letkf-meanposterior-fv3_lam-C775

test:
reference filename: Data/testinput/rrfs-fv3jedi-letkf.ref
reference filename: testoutput/rrfs-fv3jedi-letkf.ref
test output filename: ./rrfs-fv3jedi-letkf.out
float relative tolerance: 1.0e-3
float absolute tolerance: 1.0e-6
Expand Down
2 changes: 1 addition & 1 deletion rrfs-test/testinput/rrfs_mpasjedi_2024052700_Ens3Dvar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ cost function:
defer to post: true

test:
reference filename: data/ref/rrfs-mpasjedi-ens3dvar.ref
reference filename: testoutput/rrfs-mpasjedi-ens3dvar.ref
guoqing-noaa marked this conversation as resolved.
Show resolved Hide resolved
test output filename: ./rrfs-mpasjedi-ens3dvar.out
float relative tolerance: 1.0e-3
float absolute tolerance: 1.0e-6
2 changes: 1 addition & 1 deletion rrfs-test/testinput/rrfs_mpasjedi_2024052700_bumploc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ background error:
stream name: control

test:
reference filename: data/ref/rrfs-mpasjedi-bump.ref
reference filename: testoutput/rrfs-mpasjedi-bump.ref
test output filename: ./rrfs-mpasjedi-bump.out
float relative tolerance: 1.0e-5
float absolute tolerance: 1.0e-6
Expand Down
6 changes: 3 additions & 3 deletions rrfs-test/testinput/rrfs_mpasjedi_2024052700_getkf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ local ensemble DA:
mult: 1.1

output mean prior:
filename: ./bkg.$Y-$M-$D_$h.$m.$s.nc
filename: ./bkg_getkf.$Y-$M-$D_$h.$m.$s.nc
stream name: background

output: # for outputting mean posterior
filename: ./ana.$Y-$M-$D_$h.$m.$s.nc
filename: ./ana_getkf.$Y-$M-$D_$h.$m.$s.nc
stream name: analysis

test:
reference filename: data/ref/rrfs-mpasjedi-getkf.ref
reference filename: testoutput/rrfs-mpasjedi-getkf.ref
test output filename: ./rrfs-mpasjedi-getkf.out
float relative tolerance: 1.0e-3
float absolute tolerance: 1.0e-6
81 changes: 81 additions & 0 deletions rrfs-test/testinput/rrfs_mpasjedi_2024052700_getkf_observer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
_member: &memberConfig
date: &analysisDate '2024-05-27T00:00:00Z'
state variables: [spechum,surface_pressure,temperature,uReconstructMeridional,uReconstructZonal,theta,rho,u,qv,pressure,landmask,xice,snowc,skintemp,ivgtyp,isltyp,snowh,vegfra,u10,v10,lai,smois,tslb,pressure_p,qc,qi,qg,qr,qs,cldfrac]
stream name: ensemble

geometry:
nml_file: ./namelist.atmosphere
streams_file: ./streams.atmosphere
deallocate non-da fields: true
interpolation type: unstructured
iterator dimension: 2

increment variables: [temperature, spechum, uReconstructZonal, uReconstructMeridional, surface_pressure]

background:
members from template:
template:
<<: *memberConfig
filename: ./data/ens/mem%iMember%/restart.2024-05-27_00.00.00.nc
pattern: %iMember%
start: 1
zero padding: 2
nmembers: 30

observations:
observers:
- obs space:
name: sonde
distribution:
name: RoundRobin
obsdatain:
engine:
type: H5File
obsfile: data/obs/rap.t00z.singleobs.ADPUPA.tm00.nc4
obsdataout:
engine:
type: H5File
obsfile: ./adpupa_getkf_hofx.nc4
simulated variables: [airTemperature]
observed variables: [airTemperature]
obs operator:
name: VertInterp
obs error:
covariance model: diagonal
obs localizations:
- localization method: Horizontal Gaspari-Cohn
lengthscale: 300e3 # orig
obs filters:
- filter: Perform Action
filter variables:
- name: airTemperature
action:
name: assign error
error parameter: 1.2 # K
defer to post: true

driver:
run as observer only: true
update obs config with geometry info: false

time window:
begin: 2024-05-26T23:00:00Z
length: PT2H

local ensemble DA:
solver: GETKF
use linear observer: true
vertical localization: # current settings use 12 modulated members
fraction of retained variance: 0.850
lengthscale: 0.55
lengthscale units: logp
inflation:
rtps: 0.95
rtpp: 0.6
mult: 1.1

test:
reference filename: testoutput/rrfs-mpasjedi-getkf-observer.ref
test output filename: ./rrfs-mpasjedi-getkf-observer.out
float relative tolerance: 1.0e-3
float absolute tolerance: 1.0e-6
93 changes: 93 additions & 0 deletions rrfs-test/testinput/rrfs_mpasjedi_2024052700_getkf_solver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
_member: &memberConfig
date: &analysisDate '2024-05-27T00:00:00Z'
state variables: [spechum,surface_pressure,temperature,uReconstructMeridional,uReconstructZonal,theta,rho,u,qv,pressure,landmask,xice,snowc,skintemp,ivgtyp,isltyp,snowh,vegfra,u10,v10,lai,smois,tslb,pressure_p,qc,qi,qg,qr,qs,cldfrac]
stream name: ensemble

geometry:
nml_file: ./namelist.atmosphere
streams_file: ./streams.atmosphere
deallocate non-da fields: true
interpolation type: unstructured
iterator dimension: 2

increment variables: [temperature, spechum, uReconstructZonal, uReconstructMeridional, surface_pressure]

background:
members from template:
template:
<<: *memberConfig
filename: ./data/ens/mem%iMember%/restart.2024-05-27_00.00.00.nc
pattern: %iMember%
start: 1
zero padding: 2
nmembers: 30

observations:
observers:
- obs space:
name: sonde
distribution:
name: Halo
halo size: 1000e3
obsdatain:
engine:
type: H5File
obsfile: ./adpupa_getkf_hofx.nc4
obsdataout:
engine:
type: H5File
obsfile: ./adpupa_getkf_solver.nc4
simulated variables: [airTemperature]
observed variables: [airTemperature]
obs operator:
name: VertInterp
obs error:
covariance model: diagonal
obs localizations:
- localization method: Horizontal Gaspari-Cohn
lengthscale: 300e3 # orig
obs filters:
- filter: Perform Action
filter variables:
- name: airTemperature
action:
name: assign error
error parameter: 1.2 # K
defer to post: true

driver:
read HX from disk: true
save posterior ensemble: false
save prior mean: true
save posterior mean: true
do posterior observer: true

time window:
begin: 2024-05-26T23:00:00Z
length: PT2H

local ensemble DA:
solver: GETKF
use linear observer: true
vertical localization: # current settings use 12 modulated members
fraction of retained variance: 0.850
lengthscale: 0.55
lengthscale units: logp
inflation:
rtps: 0.95
rtpp: 0.6
mult: 1.1

output mean prior:
filename: ./bkg_getkf_split.$Y-$M-$D_$h.$m.$s.nc
stream name: background

output: # for outputting mean posterior
filename: ./ana_getkf_split.$Y-$M-$D_$h.$m.$s.nc
stream name: analysis

test:
reference filename: testoutput/rrfs-mpasjedi-getkf-solver.ref
test output filename: ./rrfs-mpasjedi-getkf-solver.out
float relative tolerance: 1.0e-3
float absolute tolerance: 1.0e-6
6 changes: 3 additions & 3 deletions rrfs-test/testinput/rrfs_mpasjedi_2024052700_letkf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ local ensemble DA:
mult: 1.1

output mean prior:
filename: ./bkg.$Y-$M-$D_$h.$m.$s.nc
filename: ./bkg_letkf.$Y-$M-$D_$h.$m.$s.nc
stream name: background

output: # for outputting mean posterior
filename: ./ana.$Y-$M-$D_$h.$m.$s.nc
filename: ./ana_letkf.$Y-$M-$D_$h.$m.$s.nc
stream name: analysis

test:
reference filename: data/ref/rrfs-mpasjedi-letkf.ref
reference filename: testoutput/rrfs-mpasjedi-letkf.ref
test output filename: ./rrfs-mpasjedi-letkf.out
float relative tolerance: 1.0e-3
float absolute tolerance: 1.0e-6
Loading
Loading