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

JEDI increment write to cubed sphere history #983

Merged
merged 13 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ background:
field table filename: ./fv3jedi/field_table
akbk: ./fv3jedi/akbk.nc4
layout:
- ${{ layout_x }}
- ${{ layout_y }}
npx: ${{ npx_ges }}
npy: ${{ npy_ges }}
npz: ${{ npz_ges }}
- {{ layout_x }}
- {{ layout_y }}
npx: {{ npx_ges }}
npy: {{ npy_ges }}
npz: {{ npz_ges }}
field metadata override: ./fv3jedi/fv3jedi_fieldmetadata_restart.yaml
input:
datapath: ./bkg
Expand All @@ -33,11 +33,11 @@ jedi increment:
field table filename: ./fv3jedi/field_table
akbk: ./fv3jedi/akbk.nc4
layout:
- ${{ layout_x }}
- ${{ layout_y }}
npx: ${{ npx_ges }}
npy: ${{ npy_ges }}
npz: ${{ npz_ges }}
- {{ layout_x }}
- {{ layout_y }}
npx: {{ npx_ges }}
npy: {{ npy_ges }}
npz: {{ npz_ges }}
field metadata override: ./fv3jedi/fv3jedi_fieldmetadata_history.yaml
input:
filetype: cube sphere history
Expand All @@ -50,11 +50,11 @@ fv3 increment:
field table filename: ./fv3jedi/field_table
akbk: ./fv3jedi/akbk.nc4
layout:
- ${{ layout_x }}
- ${{ layout_y }}
npx: ${{ npx_ges }}
npy: ${{ npy_ges }}
npz: ${{ npz_ges }}
- {{ layout_x }}
- {{ layout_y }}
npx: {{ npx_ges }}
npy: {{ npy_ges }}
npz: {{ npz_ges }}
field metadata override: ./fv3jedi/fv3jedi_fieldmetadata_fv3inc.yaml
output:
filetype: auxgrid
Expand Down
9 changes: 5 additions & 4 deletions parm/atm/variational/3dvar_drpcg.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ final:
increment:
output:
state component:
filetype: auxgrid
gridtype: gaussian
filename: ./anl/atminc.
filetype: cube sphere history
filename: ./anl/atminc.{{ current_cycle | to_fv3time }}.nc4
provider: ufs
fields to write: [ugrd,vgrd,tmp,pressfc,spfh,icmr,clwmr,o3mr]
geometry:
fms initialization:
namelist filename: ./fv3jedi/fmsmpp.nml
Expand All @@ -98,4 +99,4 @@ final:
npx: {{ npx_anl }}
npy: {{ npy_anl }}
npz: {{ npz_anl }}
field metadata override: ./fv3jedi/fv3jedi_fieldmetadata_restart.yaml
field metadata override: ./fv3jedi/fv3jedi_fieldmetadata_history.yaml
8 changes: 4 additions & 4 deletions test/fv3jedi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test/fv3jedi/testoutput)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test/fv3jedi/fv3jedi)

# Test YAMLs
file(CREATE_LINK ${PROJECT_SOURCE_DIR}/test/fv3jedi/testinput/gdasapp_fv3jedi_jediinc2fv3.yaml ${PROJECT_BINARY_DIR}/test/fv3jedi/testinput/gdasapp_fv3jedi_jediinc2fv3.yaml SYMBOLIC)
file(CREATE_LINK ${PROJECT_SOURCE_DIR}/test/fv3jedi/testinput/gdasapp_fv3jedi_fv3inc.yaml ${PROJECT_BINARY_DIR}/test/fv3jedi/testinput/gdasapp_fv3jedi_fv3inc.yaml SYMBOLIC)

# Test reference files
file(CREATE_LINK ${PROJECT_SOURCE_DIR}/test/fv3jedi/testoutput/gdasapp_fv3jedi_jediinc2fv3.ref ${PROJECT_BINARY_DIR}/test/fv3jedi/testoutput/gdasapp_fv3jedi_jediinc2fv3.ref SYMBOLIC)
file(CREATE_LINK ${PROJECT_SOURCE_DIR}/test/fv3jedi/testoutput/gdasapp_fv3jedi_fv3inc.ref ${PROJECT_BINARY_DIR}/test/fv3jedi/testoutput/gdasapp_fv3jedi_fv3inc.ref SYMBOLIC)

# FV3 files
file(CREATE_LINK ${PROJECT_SOURCE_DIR}/parm/io/fv3jedi_fieldmetadata_fv3inc.yaml ${PROJECT_BINARY_DIR}/test/fv3jedi/fv3jedi/fv3jedi_fieldmetadata_fv3inc.yaml SYMBOLIC)
Expand All @@ -17,7 +17,7 @@ file(CREATE_LINK ${PROJECT_SOURCE_DIR}/sorc/fv3-jedi/test/Data/fv3files/fmsmpp.n
file(CREATE_LINK ${PROJECT_SOURCE_DIR}/sorc/fv3-jedi/test/Data/fv3files/field_table_gfdl ${PROJECT_BINARY_DIR}/test/fv3jedi/fv3jedi/field_table_gfdl SYMBOLIC)

# Tests
add_test(NAME test_gdasapp_fv3jedi_jediinc2fv3
COMMAND srun -n6 ${CMAKE_BINARY_DIR}/bin/gdas_fv3jedi_jediinc2fv3.x ${PROJECT_BINARY_DIR}/test/fv3jedi/testinput/gdasapp_fv3jedi_jediinc2fv3.yaml
add_test(NAME test_gdasapp_fv3jedi_fv3inc
COMMAND srun -n6 ${CMAKE_BINARY_DIR}/bin/gdas_fv3jedi_fv3inc.x ${PROJECT_BINARY_DIR}/test/fv3jedi/testinput/gdasapp_fv3jedi_fv3inc.yaml
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/fv3jedi)

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fv3 increment:
provider: ufs

test:
reference filename: testoutput/gdasapp_fv3jedi_jediinc2fv3.ref
test output filename: testoutput/gdasapp_fv3jedi_jediinc2fv3.test.out
reference filename: testoutput/gdasapp_fv3jedi_fv3inc.ref
test output filename: testoutput/gdasapp_fv3jedi_fv3inc.test.out
float relative tolerance: 1.0e-3

8 changes: 4 additions & 4 deletions utils/fv3jedi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Increment post processing
ecbuild_add_executable( TARGET gdas_fv3jedi_jediinc2fv3.x
SOURCES gdas_fv3jedi_jediinc2fv3.cc gdas_fv3jedi_jediinc2fv3.h)
target_compile_features( gdas_fv3jedi_jediinc2fv3.x PUBLIC cxx_std_17)
target_link_libraries( gdas_fv3jedi_jediinc2fv3.x PUBLIC NetCDF::NetCDF_CXX oops fv3jedi)
ecbuild_add_executable( TARGET fv3jedi_fv3inc.x
SOURCES fv3jedi_fv3inc.cc fv3jedi_fv3inc.h)
target_compile_features( fv3jedi_fv3inc.x PUBLIC cxx_std_17)
target_link_libraries( fv3jedi_fv3inc.x PUBLIC NetCDF::NetCDF_CXX oops fv3jedi)
8 changes: 8 additions & 0 deletions utils/fv3jedi/fv3jedi_fv3inc.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include "fv3jedi_fv3inc.h"
#include "oops/runs/Run.h"

int main(int argc, char ** argv) {
oops::Run run(argc, argv);
gdasapp::fv3inc fv3inc;
return run.execute(fv3inc);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
namespace gdasapp {

// Main application class
class jediinc2fv3 : public oops::Application {
class fv3inc : public oops::Application {
public:
explicit jediinc2fv3(const eckit::mpi::Comm & comm = oops::mpi::world())
explicit fv3inc(const eckit::mpi::Comm & comm = oops::mpi::world())
: Application(comm) {}
static const std::string classname() {return "gdasapp::jediinc2fv3";}
static const std::string classname() {return "gdasapp::fv3inc";}

int execute(const eckit::Configuration & fullConfig, bool validate) const {
// Setup variable change
Expand Down Expand Up @@ -83,7 +83,7 @@ namespace gdasapp {

private:
std::string appname() const {
return "gdasapp::jediinc2fv3";
return "gdasapp::fv3inc";
}
};
} // namespace gdasapp
8 changes: 0 additions & 8 deletions utils/fv3jedi/gdas_fv3jedi_jediinc2fv3.cc

This file was deleted.

Loading