Skip to content

Commit

Permalink
Merge branch 'develop' into feature/update_prepbufr2ioda_yamls
Browse files Browse the repository at this point in the history
  • Loading branch information
guoqing-noaa authored Oct 4, 2024
2 parents 91b5bc7 + 689818a commit b10d41d
Show file tree
Hide file tree
Showing 43 changed files with 8,747 additions and 696 deletions.
1 change: 0 additions & 1 deletion fix/expr_data/mpas_2024052700/ref

This file was deleted.

25 changes: 19 additions & 6 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 Down Expand Up @@ -48,6 +50,7 @@ if(FV3_DYCORE)
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)
file(COPY ${src_yaml}/${case}.yaml DESTINATION ${casedir} )
set(target_test ${case})
ecbuild_add_test( TARGET ${target_test}
Expand Down Expand Up @@ -85,6 +88,7 @@ if(FV3_DYCORE)
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})
Expand All @@ -94,11 +98,20 @@ if(FV3_DYCORE)
file(COPY ${bl_FILES} DESTINATION ${casedir})
file(COPY ${src_yaml}/${case}.yaml DESTINATION ${casedir})
set(target_test ${case})
ecbuild_add_test( TARGET ${target_test}
if ("${target_test}" STREQUAL "rrfs_mpasjedi_2024052700_getkf_solver")
ecbuild_add_test( TARGET ${target_test}
MPI 120
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${target_test}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${target_test}
ARGS ${target_test}.yaml
TEST_DEPENDS "rrfs_mpasjedi_2024052700_getkf_observer"
COMMAND ${exe} )
else()
ecbuild_add_test( TARGET ${target_test}
MPI 120
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${target_test}
ARGS ${target_test}.yaml
COMMAND ${exe} )
endif()
endforeach()

if("${MACHINE_ID}" STREQUAL "orion")
Expand Down
9 changes: 6 additions & 3 deletions rrfs-test/scripts/link_mpasjedi_expr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ echo "expdir is at: ${expdir}"

${RDASApp}/ush/init.sh
ln -snf ${RDASApp}/fix/physics/* .
mkdir -p graphinfo stream_list
mkdir -p graphinfo stream_list testoutput
ln -snf ${RDASApp}/fix/graphinfo/* graphinfo/
ln -snf ${RDASApp}/rrfs-test/testoutput/* testoutput/
cp -rp ${RDASApp}/fix/stream_list/* stream_list/
cp ${RDASApp}/sorc/mpas-jedi/test/testinput/obsop_name_map.yaml .
cp ${RDASApp}/sorc/mpas-jedi/test/testinput/namelists/keptvars.yaml .
Expand All @@ -32,6 +33,8 @@ cp ${RDASApp}/rrfs-test/testinput/streams.atmosphere .
cp ${RDASApp}/rrfs-test/testinput/rrfs_mpasjedi_2024052700_Ens3Dvar.yaml .
cp ${RDASApp}/rrfs-test/testinput/rrfs_mpasjedi_2024052700_letkf.yaml .
cp ${RDASApp}/rrfs-test/testinput/rrfs_mpasjedi_2024052700_getkf.yaml .
cp ${RDASApp}/rrfs-test/testinput/rrfs_mpasjedi_2024052700_getkf_observer.yaml .
cp ${RDASApp}/rrfs-test/testinput/rrfs_mpasjedi_2024052700_getkf_solver.yaml .
if [[ "${exprname}" == "atl_2024052700" ]]; then
sed -i -e "s/conus12km_mpas.graph/atl12km.graph/" ./namelist.atmosphere
sed -i -e "s/conus12km-401km11levels/atl12km-401km11levels/" ./rrfs_mpasjedi_2024052700_Ens3Dvar.yaml
Expand All @@ -44,11 +47,11 @@ cp ${RDASApp}/rrfs-test/ush/mpasjedi_spread.py .

mkdir -p data
cd data
mkdir -p bumploc bkg obs ens ref
mkdir -p bumploc bkg obs ens
ln -snf ${RDASApp}/fix/bumploc/${BUMPLOC} bumploc/${BUMPLOC}
ln -snf ${RDASApp}/fix/expr_data/${exprname}/bkg/restart.2024-05-27_00.00.00.nc .
ln -snf ${RDASApp}/fix/expr_data/${exprname}/bkg/restart.2024-05-27_00.00.00.nc static.nc
ln -snf ${RDASApp}/fix/expr_data/${exprname}/obs/* obs/
ln -snf ${RDASApp}/fix/expr_data/${exprname}/ens/* ens/
ln -snf ${RDASApp}/fix/expr_data/${exprname}/ref/* ref/
ln -snf ${RDASApp}/fix/crtm/2.4.0 crtm

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
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
2 changes: 1 addition & 1 deletion rrfs-test/testinput/rrfs_mpasjedi_2024052700_getkf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ output: # for outputting mean posterior
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_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: ../rundir-rrfs_mpasjedi_2024052700_getkf_observer/adpupa_hofx.nc4
obsdataout:
engine:
type: H5File
obsfile: ./adpupa_hofx_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.$Y-$M-$D_$h.$m.$s.nc
stream name: background

output: # for outputting mean posterior
filename: ./ana.$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
2 changes: 1 addition & 1 deletion rrfs-test/testinput/rrfs_mpasjedi_2024052700_letkf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ output: # for outputting mean posterior
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
57 changes: 57 additions & 0 deletions rrfs-test/testoutput/rrfs-fv3jedi-hyb.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Norm of input parameter StdDev: 9.4986412011183896e-01
CostJb : Nonlinear Jb = 0.0000000000000000e+00
CostJo : Nonlinear Jo(Aircraft) = 1.6277063866803385e+02, nobs = 197, Jo/n = 8.2624689679204999e-01, err = 2.2878461627138713e+00
CostJo : Nonlinear Jo(sonde) = 4.6083942594316369e+01, nobs = 96, Jo/n = 4.8004106869079549e-01, err = 1.2699158479229833e+00
CostJo : Nonlinear Jo(sonde) = 3.5136386636656073e+02, nobs = 492, Jo/n = 7.1415419993203400e-01, err = 2.6485332421855685e+00 (Monitoring only)
CostFunction: Nonlinear J = 2.0885458126235022e+02
DRPCGMinimizer: reduction in residual norm = 2.7824421531180651e-03
CostFunction::addIncrement: Analysis:
----------------------------------------------------------------------------------------------------
State print | number of fields = 10 | cube sphere face size: C396
eastward_wind | Min:-2.4172478440722166e+01 Max:+5.8744213104248047e+01 RMS:+1.1074254228003721e+01
northward_wind | Min:-4.6842254638671875e+01 Max:+6.7075992762060139e+01 RMS:+9.1575337935866052e+00
u_component_of_native_D_grid_wind | Min:-5.8205993652343750e+01 Max:+2.7109228988747304e+01 RMS:+1.1163967556309810e+01
v_component_of_native_D_grid_wind | Min:-6.8115785512445697e+01 Max:+4.6548946380615234e+01 RMS:+9.0728668941041590e+00
air_temperature | Min:+1.9858006286621094e+02 Max:+3.1420623779296875e+02 RMS:+2.6052094626363748e+02
air_pressure_thickness | Min:+2.0438423156738281e+02 Max:+3.3835468750000000e+03 RMS:+1.8520940188066577e+03
specific_humidity | Min:+9.9999997171806854e-10 Max:+1.9826183095574379e-02 RMS:+5.6389210501995727e-03
cloud_liquid_ice | Min:+0.0000000000000000e+00 Max:+1.1363915032580437e+38 RMS:+1.8745365416579955e+36
cloud_liquid_water | Min:+0.0000000000000000e+00 Max:+1.1363915032580437e+38 RMS:+2.0899721915550581e+36
ozone_mass_mixing_ratio | Min:+4.0375940812964473e-08 Max:+1.6066782336565666e-05 RMS:+2.8037513171416430e-06
----------------------------------------------------------------------------------------------------





Norm of input parameter StdDev: 0.949864120111839
CostJb : Nonlinear Jb = 0.9028632742725768
CostJo : Nonlinear Jo(Aircraft) = 46.00808938648616, nobs = 197, Jo/n = 0.2335436009466303, err = 2.287846162713871
CostJo : Nonlinear Jo(sonde) = 31.20243554366136, nobs = 96, Jo/n = 0.3250253702464725, err = 1.269915847922983
CostJo : Nonlinear Jo(sonde) = 346.8911603390688, nobs = 492, Jo/n = 0.7050633340224977, err = 2.648533242185569 (Monitoring only)
CostFunction: Nonlinear J = 78.1133882044201
DRPCGMinimizer: reduction in residual norm = 0.005966881060084853
CostFunction::addIncrement: Analysis:
----------------------------------------------------------------------------------------------------
State print | number of fields = 10 | cube sphere face size: C396
eastward_wind | Min:-2.4171419042986830e+01 Max:+5.8744213104248047e+01 RMS:+1.1074256913053947e+01
northward_wind | Min:-4.6842254638671875e+01 Max:+6.7075992766887268e+01 RMS:+9.1575456881565902e+00
u_component_of_native_D_grid_wind | Min:-5.8205993652343750e+01 Max:+2.7108462492609508e+01 RMS:+1.1163970275632899e+01
v_component_of_native_D_grid_wind | Min:-6.8115785523746766e+01 Max:+4.6548946380615234e+01 RMS:+9.0728787561097732e+00
air_temperature | Min:+1.9858006286621094e+02 Max:+3.1420623779296875e+02 RMS:+2.6052095318275576e+02
air_pressure_thickness | Min:+2.0438423156738281e+02 Max:+3.3835468750000000e+03 RMS:+1.8520940211705904e+03
specific_humidity | Min:+9.9999997171806854e-10 Max:+1.9826183095574379e-02 RMS:+5.6389233413203753e-03
cloud_liquid_ice | Min:+0.0000000000000000e+00 Max:+1.1376105630346728e+38 RMS:+1.8745015174562462e+36
cloud_liquid_water | Min:+0.0000000000000000e+00 Max:+1.1376105630346728e+38 RMS:+2.0875908498287738e+36
ozone_mass_mixing_ratio | Min:+4.0375940812964473e-08 Max:+1.6066782336565666e-05 RMS:+2.8037513646290239e-06
----------------------------------------------------------------------------------------------------





CostJb : Nonlinear Jb = 0.9033093522182356
CostJo : Nonlinear Jo(Aircraft) = 45.9756432627705, nobs = 197, Jo/n = 0.2333788998110178, err = 2.287846162713871
CostJo : Nonlinear Jo(sonde) = 31.21293388165803, nobs = 96, Jo/n = 0.3251347279339378, err = 1.269915847922983
CostJo : Nonlinear Jo(sonde) = 346.9156273098469, nobs = 492, Jo/n = 0.7051130636379003, err = 2.648533242185569 (Monitoring only)
CostFunction: Nonlinear J = 78.09188649664675
Loading

0 comments on commit b10d41d

Please sign in to comment.