Skip to content

Commit

Permalink
Update to use more obs and GETKF for ctest
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelDegelia-NOAA committed Nov 30, 2024
1 parent 40592c2 commit 385466a
Show file tree
Hide file tree
Showing 14 changed files with 15,254 additions and 214 deletions.
27 changes: 16 additions & 11 deletions rrfs-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ include(funcs.cmake)
# FV3-JEDI tests
set(rrfs_fv3jedi_tests)
add_to_dictionary(rrfs_fv3jedi_tests "rrfs_fv3jedi_2024052700_Ens3Dvar" "fv3jedi_var.x")
add_to_dictionary(rrfs_fv3jedi_tests "rrfs_fv3jedi_2024052700_letkf" "fv3jedi_letkf.x")
add_to_dictionary(rrfs_fv3jedi_tests "rrfs_fv3jedi_2024052700_getkf_observer" "fv3jedi_letkf.x")
add_to_dictionary(rrfs_fv3jedi_tests "rrfs_fv3jedi_2024052700_getkf_solver" "fv3jedi_letkf.x")

# MPAS-JEDI tests
set(rrfs_mpasjedi_tests)
Expand All @@ -35,6 +36,7 @@ if(FV3_DYCORE)
set(RESTORE_MPI_ARGS ${MPI_ARGS})
set(MPI_ARGS "${MPI_ARGS} --exclusive")
endif()
set(MPI_ARGS "${MPI_ARGS} --time=00:30:00")

get_all_keys(rrfs_fv3jedi_tests caselist)
foreach(case ${caselist})
Expand All @@ -51,16 +53,22 @@ if(FV3_DYCORE)
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}
if ("${target_test}" STREQUAL "rrfs_fv3jedi_2024052700_getkf_solver")
ecbuild_add_test( TARGET ${target_test}
MPI 160
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${target_test}
ARGS ${target_test}.yaml
TEST_DEPENDS "rrfs_fv3jedi_2024052700_getkf_observer"
COMMAND ${exe} )
else()
ecbuild_add_test( TARGET ${target_test}
MPI 160
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${target_test}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${target_test}
ARGS ${target_test}.yaml
COMMAND ${exe} )
endif()
endforeach()

if("${MACHINE_ID}" STREQUAL "orion")
set(MPI_ARGS ${RESTORE_MPI_ARGS})
endif()
set(MPI_ARGS ${RESTORE_MPI_ARGS})

endif()

Expand Down Expand Up @@ -111,10 +119,7 @@ if(MPAS_DYCORE)
COMMAND ${exe} )
endif()
endforeach()

if("${MACHINE_ID}" STREQUAL "orion")
set(MPI_ARGS ${RESTORE_MPI_ARGS})
endif()
set(MPI_ARGS ${RESTORE_MPI_ARGS})

########################
### Bufr2ioda ctests ###
Expand Down
2 changes: 2 additions & 0 deletions rrfs-test/IODA/offline_domain_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ def shrink_boundary(points, centroid, factor=0.01):
if 'grid_lat' in grid_ds.variables and 'grid_lon' in grid_ds.variables: # FV3 grid
grid_lat = grid_ds.variables['grid_lat'][:, :]
grid_lon = grid_ds.variables['grid_lon'][:, :]
grid_lat = grid_lat.flatten()
grid_lon = grid_lon.flatten()
dycore = "FV3"
elif 'latCell' in grid_ds.variables and 'lonCell' in grid_ds.variables: # MPAS grid
grid_lat = np.degrees(grid_ds.variables['latCell'][:]) # Convert radians to degrees
Expand Down
5 changes: 2 additions & 3 deletions rrfs-test/scripts/link_fv3jedi_expr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ echo "expdir is at: ${expdir}"

${RDASApp}/ush/init.sh
cp -r ${RDASApp}/rrfs-test/testoutput ./testoutput
cp ${RDASApp}/rrfs-test/testinput/rrfs_fv3jedi_2024052700_hyb.yaml .
cp ${RDASApp}/rrfs-test/testinput/rrfs_fv3jedi_2024052700_Ens3Dvar.yaml .
cp ${RDASApp}/rrfs-test/testinput/rrfs_fv3jedi_2024052700_letkf.yaml .
cp ${RDASApp}/rrfs-test/testinput/rrfs_fv3jedi_2024052700_getkf_observer.yaml .
cp ${RDASApp}/rrfs-test/testinput/rrfs_fv3jedi_2024052700_getkf_solver.yaml .
cp ${RDASApp}/rrfs-test/testinput/rrfs_fv3jedi_2024052700_bumploc.yaml ./bumploc.yaml
sed -e "s#@RDASApp@#${RDASApp}#" ${RDASApp}/rrfs-test/scripts/templates/fv3jedi_expr/run_bump.sh > run_bump.sh
sed -e "s#@RDASApp@#${RDASApp}#" ${RDASApp}/rrfs-test/scripts/templates/fv3jedi_expr/run_jedi.sh > run_jedi.sh
Expand All @@ -29,4 +29,3 @@ ln -snf ${RDASApp}/fix/expr_data/${exprname}/Data Data
ln -snf ${RDASApp}/fix/expr_data/${exprname}/DataFix DataFix
ln -snf ${RDASApp}/fix/expr_data/${exprname}/Data_static Data_static
ln -snf ${RDASApp}/fix/expr_data/${exprname}/INPUT INPUT

6 changes: 3 additions & 3 deletions rrfs-test/scripts/templates/fv3jedi_expr/run_jedi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
RDASApp=@RDASApp@

inputfile=./rrfs_fv3jedi_2024052700_Ens3Dvar.yaml # FOR EnVar
#inputfile=./rrfs_fv3jedi_2024052700_hyb.yaml # FOR HYB
#inputfile=./rrfs_fv3jedi_2024052700_letkf.yaml # FOR LETKF
#inputfile=./rrfs_fv3jedi_2024052700_getkf_observer.yaml # FOR GETKF
#inputfile=./rrfs_fv3jedi_2024052700_getkf_solver.yaml # FOR GETKF

if [[ -s /apps/lmod/lmod/init/sh ]]; then
. /apps/lmod/lmod/init/sh
Expand All @@ -35,4 +35,4 @@ ulimit -v unlimited
ulimit -a

srun -l -n 160 ${RDASApp}/build/bin/fv3jedi_var.x ./$inputfile log.out # FOR HYB/ENVAR
#srun -l -n 160 ${RDASApp}/build/bin/fv3jedi_letkf.x ./$inputfile log.out # FOR LETKF
#srun -l -n 160 ${RDASApp}/build/bin/fv3jedi_letkf.x ./$inputfile log.out # FOR GETKF
Loading

0 comments on commit 385466a

Please sign in to comment.