├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── codecov.yml ├── contributing.md └── pull_request_template.md ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── README.md ├── RELEASE_NOTES.md ├── bundle ├── .gitignore └── CMakeLists.txt ├── cmake ├── compiler_flags_Cray_Fortran.cmake ├── compiler_flags_GNU_CXX.cmake ├── compiler_flags_GNU_Fortran.cmake ├── compiler_flags_Intel_Fortran.cmake ├── compiler_flags_XL_Fortran.cmake └── soca_compiler_flags.cmake ├── docs ├── CMakeLists.txt ├── Doxyfile.in └── mainpage.h ├── external ├── README.md ├── icepack │ ├── CMakeLists.txt │ └── icepack_files.cmake └── mom6 │ ├── CMakeLists.txt │ └── mom6_files.cmake ├── src ├── CMakeLists.txt ├── CPPLINT.cfg ├── mains │ ├── AddIncrement.cc │ ├── CMakeLists.txt │ ├── ConvertIncrement.cc │ ├── ConvertState.cc │ ├── DiffStates.cc │ ├── EnsHofX.cc │ ├── EnsMeanAndVariance.cc │ ├── EnsRecenter.cc │ ├── ErrorCovarianceToolbox.cc │ ├── Forecast.cc │ ├── GenEnsPertB.cc │ ├── GenHybridLinearModelCoeffs.cc │ ├── GridGen.cc │ ├── GridGen.h │ ├── HofX.cc │ ├── HofX3D.cc │ ├── HybridGain.cc │ ├── IceEmul.cc │ ├── LETKF.cc │ ├── LinearizationError.cc │ ├── SetCorScales.cc │ ├── SetCorScales.h │ ├── SqrtOfVertLoc.cc │ ├── StaticBInit.cc │ └── Var.cc └── soca │ ├── AnalyticInit │ ├── AnalyticInit.cc │ ├── AnalyticInit.h │ ├── AnalyticInitFortran.h │ ├── CMakeLists.txt │ ├── soca_analytic.interface.F90 │ └── soca_analytic_mod.F90 │ ├── CMakeLists.txt │ ├── Covariance │ ├── CMakeLists.txt │ └── ErrorCovariance.h │ ├── Fields │ ├── CMakeLists.txt │ ├── Fields.cc │ ├── Fields.h │ ├── FieldsMetadata.cc │ ├── FieldsMetadata.h │ ├── soca_fields_metadata_mod.F90 │ └── soca_fields_mod.F90 │ ├── Fortran.h │ ├── Geometry │ ├── CMakeLists.txt │ ├── FmsInput.cc │ ├── FmsInput.h │ ├── Geometry.cc │ ├── Geometry.h │ ├── GeometryFortran.h │ ├── soca_geom.interface.F90 │ └── soca_geom_mod.F90 │ ├── GeometryIterator │ ├── CMakeLists.txt │ ├── GeometryIterator.cc │ └── GeometryIterator.h │ ├── Increment │ ├── CMakeLists.txt │ ├── Increment.cc │ ├── Increment.h │ ├── IncrementFortran.h │ ├── soca_increment.interface.F90 │ ├── soca_increment.reg.F90 │ └── soca_increment_mod.F90 │ ├── LinearModel │ ├── CMakeLists.txt │ └── OceanIceEmulator │ │ ├── CMakeLists.txt │ │ ├── LinearModelOceanIceEmulator.cc │ │ ├── LinearModelOceanIceEmulator.h │ │ ├── ModelTrajectory.cc │ │ └── ModelTrajectory.h │ ├── LinearVariableChange │ ├── Balance │ │ ├── Balance.cc │ │ ├── Balance.h │ │ ├── BalanceFortran.h │ │ ├── CMakeLists.txt │ │ ├── soca_balance.interface.F90 │ │ ├── soca_balance_mod.F90 │ │ ├── soca_ksshts_mod.F90 │ │ └── soca_kst_mod.F90 │ ├── Base │ │ ├── CMakeLists.txt │ │ ├── LinearVariableChangeBase.cc │ │ └── LinearVariableChangeBase.h │ ├── CMakeLists.txt │ ├── LinearModel2GeoVaLs │ │ ├── CMakeLists.txt │ │ ├── LinearModel2GeoVaLs.cc │ │ └── LinearModel2GeoVaLs.h │ ├── LinearVariableChange.cc │ └── LinearVariableChange.h │ ├── MLBalance │ ├── CMakeLists.txt │ ├── KEmul │ │ ├── BaseEmul.h │ │ ├── CMakeLists.txt │ │ ├── IceEmul.h │ │ └── IceNet.h │ ├── MLBalance.cc │ ├── MLBalance.h │ ├── MLBalanceParameters.h │ └── MLJac.h │ ├── Model │ ├── CMakeLists.txt │ └── OceanIceEmulator │ │ ├── CMakeLists.txt │ │ ├── ModelOceanIceEmulator.cc │ │ └── ModelOceanIceEmulator.h │ ├── ModelBias │ ├── CMakeLists.txt │ ├── ModelBias.h │ ├── ModelBiasCovariance.h │ └── ModelBiasIncrement.h │ ├── ModelData │ ├── CMakeLists.txt │ └── ModelData.h │ ├── ObsLocalization │ ├── CMakeLists.txt │ ├── CPPLINT.cfg │ ├── ObsLocRossby.cc │ ├── ObsLocRossby.h │ └── ObsLocRossbyParameters.h │ ├── SaberBlocks │ ├── BkgErrFilt │ │ ├── BkgErrFilt.cc │ │ ├── BkgErrFilt.h │ │ └── CMakeLists.txt │ ├── CMakeLists.txt │ ├── ParametricOceanStdDev │ │ ├── CMakeLists.txt │ │ ├── ParametricOceanStdDev.cc │ │ └── ParametricOceanStdDev.h │ └── README.md │ ├── State │ ├── CMakeLists.txt │ ├── State.cc │ ├── State.h │ ├── StateFortran.h │ ├── soca_state.interface.F90 │ ├── soca_state.reg.F90 │ └── soca_state_mod.F90 │ ├── Traits.h │ ├── Utils │ ├── CMakeLists.txt │ ├── OceanSmoother.cc │ ├── OceanSmoother.h │ ├── readNcAndInterp.cc │ ├── readNcAndInterp.h │ └── soca_utils.F90 │ └── VariableChange │ ├── Base │ ├── CMakeLists.txt │ ├── VariableChangeBase.cc │ └── VariableChangeBase.h │ ├── CMakeLists.txt │ ├── Model2Ana │ ├── CMakeLists.txt │ ├── Model2Ana.cc │ └── Model2Ana.h │ ├── Model2GeoVaLs │ ├── CMakeLists.txt │ ├── Model2GeoVaLs.F90 │ ├── Model2GeoVaLs.cc │ ├── Model2GeoVaLs.h │ └── Model2GeoVaLsFortran.h │ ├── Soca2Cice │ ├── CMakeLists.txt │ ├── Soca2Cice.F90 │ ├── Soca2Cice.cc │ ├── Soca2Cice.h │ ├── Soca2CiceFortran.h │ ├── soca_ciceutils_mod.F90 │ └── soca_soca2cice_mod.F90 │ ├── VariableChange.cc │ └── VariableChange.h ├── test ├── CMakeLists.txt ├── Data │ ├── 36x17x25 │ │ ├── MOM_input │ │ ├── input.nml │ │ ├── restarts │ │ │ ├── MOM.res.nc │ │ │ └── cice.res.nc │ │ ├── restarts_ens │ │ │ ├── ocn.enspert.lowres.ens.1.2018-04-15T00:00:00Z.PT6H.nc │ │ │ ├── ocn.enspert.lowres.ens.2.2018-04-15T00:00:00Z.PT6H.nc │ │ │ ├── ocn.enspert.lowres.ens.3.2018-04-15T00:00:00Z.PT6H.nc │ │ │ ├── ocn.enspert.lowres.ens.4.2018-04-15T00:00:00Z.PT6H.nc │ │ │ └── stddev.nc │ │ └── soca_gridspec.nc │ ├── 72x35x25 │ │ ├── INPUT │ │ │ ├── forcing_daily.nc │ │ │ ├── forcing_monthly.nc │ │ │ ├── grid_spec.nc │ │ │ ├── hycom1_25.nc │ │ │ ├── layer_coord25.nc │ │ │ ├── ocean_hgrid.nc │ │ │ ├── ocean_mosaic.nc │ │ │ └── ocean_topog.nc │ │ ├── MOM_input │ │ ├── MOM_override_bgc │ │ ├── dcdt.nc │ │ ├── history │ │ │ └── cice_history.nc │ │ ├── ice.bkgerror.nc │ │ ├── input.nml │ │ ├── input_bgc.nml │ │ ├── input_mom6solo.nml │ │ ├── ocn.bkgerror.nc │ │ ├── restarts │ │ │ ├── MOM.res.nc │ │ │ ├── NOBM.res.nc │ │ │ ├── cice.res.nc │ │ │ ├── gdas.ice.t12z.inst.f006.nc │ │ │ ├── iced.2018-04-15-00000.nc │ │ │ ├── sfc.res.nc │ │ │ └── wav.res.nc │ │ ├── restarts_ens │ │ │ ├── MOM.res.ens.1.nc │ │ │ ├── MOM.res.ens.2.nc │ │ │ ├── MOM.res.ens.3.nc │ │ │ ├── MOM.res.ens.4.nc │ │ │ ├── cice.res.ens.1.nc │ │ │ ├── cice.res.ens.2.nc │ │ │ ├── cice.res.ens.3.nc │ │ │ └── cice.res.ens.4.nc │ │ └── wav.bkgerror.nc │ ├── fields_metadata.yml │ ├── godas_sst_bgerr.nc │ ├── mlbalance │ │ ├── antarctic.pt │ │ ├── arctic.pt │ │ ├── normalization.antarctic.pt │ │ └── normalization.arctic.pt │ ├── oasim │ │ ├── abw25_morel.dat │ │ ├── acbc25_6.dat │ │ ├── atmo25b.dat │ │ ├── pic_sigma.dat │ │ └── slingo.dat │ ├── obs │ │ ├── adt.nc │ │ ├── biomass_p.nc │ │ ├── chl.nc │ │ ├── gmi_gpm_geoval.nc │ │ ├── gmi_gpm_obs.nc │ │ ├── icec.nc │ │ ├── icefb.nc │ │ ├── pace_radiance.nc │ │ ├── prof.nc │ │ ├── single_ob.nc │ │ ├── sss.nc │ │ ├── sst.nc │ │ ├── swh.nc │ │ ├── uocn_surface.nc │ │ ├── vocn_surface.nc │ │ └── zero_ob.nc │ ├── rossrad.nc │ └── workdir │ │ ├── INPUT │ │ ├── grid_spec.nc │ │ └── ocean_mosaic.nc │ │ ├── diag_table │ │ └── field_table ├── create_dcdt.py ├── executables │ ├── TestGeometry.cc │ ├── TestGeometryIterator.cc │ ├── TestGetValues.cc │ ├── TestIncrement.cc │ ├── TestLinearGetValues.cc │ ├── TestLinearModel.cc │ ├── TestModelAuxControl.cc │ ├── TestNLVariableChange.cc │ ├── TestObsLocalization.cc │ ├── TestObsLocalizations.cc │ ├── TestOceanSmoother.cc │ ├── TestState.cc │ ├── TestVariableChange.cc │ └── TestVariables.cc ├── mom6solo.py ├── testinput │ ├── 3dhyb.yml │ ├── 3dhyb_diffusion.yml │ ├── 3dhybfgat_pseudo.yml │ ├── 3dvar.yml │ ├── 3dvar_diffmlb.yml │ ├── 3dvar_lowres.yml │ ├── 3dvar_moreice.yml │ ├── 3dvar_nicas.yml │ ├── 3dvar_single_ob.yml │ ├── 3dvar_zero_ob.yml │ ├── 3dvarfgat_pseudo.yml │ ├── 4denvar.yml │ ├── 4dhybenvar.yml │ ├── 4dvar_htlm.yml │ ├── 4dvar_identity.yml │ ├── 4dvar_oceaniceemulator.yml │ ├── addincrement.yml │ ├── checkpointmodel.yml │ ├── convertincrement.yml │ ├── convertstate.yml │ ├── convertstate_changevar.yml │ ├── convertstate_soca2cice.yml │ ├── diffstates.yml │ ├── dirac_diffusion.yml │ ├── dirac_diffusion_lowres.yml │ ├── dirac_mlbalance.yml │ ├── dirac_parametric_ocean_stddev.yml │ ├── dirac_soca_cor_nicas_scales.yml │ ├── dirac_soca_cov.yml │ ├── dirac_socahyb_cov.yml │ ├── enshofx.yml │ ├── enshofx_1.yml │ ├── enshofx_2.yml │ ├── enshofx_3.yml │ ├── ensmeanandvariance.yml │ ├── enspert.yml │ ├── ensrecenter.yml │ ├── forecast_identity.yml │ ├── forecast_mom6.yml │ ├── forecast_mom6_bgc.yml │ ├── forecast_mom6_ens1.yml │ ├── forecast_mom6_ens2.yml │ ├── forecast_mom6_ens3.yml │ ├── forecast_oceaniceemulator.yml │ ├── forecast_pseudo.yml │ ├── gen_hybrid_linear_model_coeffs.yml │ ├── geometry.yml │ ├── geometry_iterator_2d.yml │ ├── geometry_iterator_3d.yml │ ├── getvalues.yml │ ├── gridgen.yml │ ├── hofx_3d.yml │ ├── hofx_4d_oceaniceemulator.yml │ ├── hofx_4d_pseudo.yml │ ├── hybridgain.yml │ ├── increment.yml │ ├── letkf.yml │ ├── letkf_split_observer.yml │ ├── letkf_split_solver.yml │ ├── linearization_error.yml │ ├── linearmodel_oceaniceemulator.yml │ ├── makeobs.yml │ ├── model.yml │ ├── obslocalization.yml │ ├── obslocalization_vertical.yml │ ├── obslocalizations.yml │ ├── obsop_name_map.yml │ ├── oceanSmoother.yml │ ├── parameters_bump_cor_nicas.yml │ ├── parameters_bump_cor_nicas_scales.yml │ ├── parameters_bump_cov.yml │ ├── parameters_bump_loc.yml │ ├── parameters_diffusion.yml │ ├── parameters_diffusion_lowres.yml │ ├── parametric_stddev.yml │ ├── setcorscales.yml │ ├── sqrtvertloc.yml │ ├── state.yml │ ├── state_moreice.yml │ ├── train_mlbalance.yml │ ├── varchange_ana2model.yml │ ├── varchange_balance.yml │ └── varchange_balance_TSSSH.yml ├── testref │ ├── 3dhyb.test │ ├── 3dhyb_diffusion.test │ ├── 3dhybfgat_pseudo.test │ ├── 3dvar.test │ ├── 3dvar_diffmlb.test │ ├── 3dvar_lowres.test │ ├── 3dvar_moreice.test │ ├── 3dvar_nicas.test │ ├── 3dvar_single_ob.test │ ├── 3dvar_zero_ob.test │ ├── 3dvarfgat_pseudo.test │ ├── 4denvar.test │ ├── 4dhybenvar.test │ ├── 4dvar_htlm.test │ ├── 4dvar_identity.test │ ├── 4dvar_oceaniceemulator.test │ ├── addincrement.test │ ├── checkpointmodel.test │ ├── convertincrement.test │ ├── convertstate.test │ ├── convertstate_changevar.test │ ├── convertstate_soca2cice.test │ ├── diffstates.test │ ├── dirac_diffusion.test │ ├── dirac_diffusion_lowres.test │ ├── dirac_mlbalance.test │ ├── dirac_parametric_ocean_stddev.test │ ├── dirac_soca_cor_nicas_scales.test │ ├── dirac_soca_cov.test │ ├── dirac_socahyb_cov.test │ ├── enshofx.test │ ├── ensmeanandvariance.test │ ├── enspert.test │ ├── ensrecenter.test │ ├── forecast_identity.test │ ├── forecast_pseudo.test │ ├── gen_hybrid_linear_model_coeffs.test │ ├── gen_hybrid_linear_model_coeffs_pseudo.test │ ├── gridgen.test │ ├── hofx_3d.test │ ├── hofx_4d_oceaniceemulator.test │ ├── hofx_4d_pseudo.test │ ├── hybridgain.test │ ├── letkf.test │ ├── letkf_split_observer.test │ ├── letkf_split_solver.test │ ├── linearization_error.test │ ├── makeobs.test │ ├── oceanSmoother.test │ ├── parameters_bump_cor_nicas.test │ ├── parameters_bump_cor_nicas_scales.test │ ├── parameters_bump_cov.test │ ├── parameters_bump_loc.test │ ├── parametric_stddev.test │ ├── setcorscales.test │ └── sqrtvertloc.test └── valgrind.sup └── tools ├── calc_scales.py ├── calc_scales.yaml ├── convert_atlas_file.py └── soca_update_restart.py /.gitattributes: -------------------------------------------------------------------------------- 1 | *.nc filter=lfs diff=lfs merge=lfs -text 2 | *.nc4 filter=lfs diff=lfs merge=lfs -text 3 | *.pt filter=lfs diff=lfs merge=lfs -text 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug, SOCA 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Description 11 | Provide a clear and concise description of what the bug is. 12 | Also give a description of what behavior you expected to happen. 13 | 14 | 15 | ### To Reproduce: 16 | What compilers/machines are you seeing this with? 17 | Give explicit steps to reproduce the behavior. 18 | 1. do this 19 | 2. then that 20 | 3. then, oops, look at the bug 21 | 22 | 23 | ## Additional context 24 | Add any other context about the problem here. 25 | Directly reference any issues or PRs in this or other repositories that this is related to, and describe how they are related. Example: 26 | - needs to be fixed also in JCSDA/oops/issues/ 27 | - needed for JCSDA/ufo/pull/ 28 | 29 | 30 | ## Output 31 | 32 | **Screenshots** 33 | If applicable, drag and drop screenshots to help explain your problem. 34 | 35 | **output logs** 36 | If applicable, include relevant output logs. 37 | Either drag and drop the entire log file here (if a long log) or 38 | 39 | ``` 40 | paste the code here (if a short section of log) 41 | ``` 42 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement, SOCA 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Description 11 | Provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | ## Solution 14 | Add a clear and concise description of what you want to happen. 15 | 16 | ## Alternatives 17 | If applicable, add a description of any alternative solutions or features you've considered. 18 | 19 | ## Related to 20 | Directly reference any issues or PRs in this or other repositories that this is related to, and describe how they are related. Example: 21 | - required to support JCSDA/oops/issues/ 22 | - needed by JCSDA/ufo/pull/ 23 | -------------------------------------------------------------------------------- /.github/codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | token: 7e489333-8f39-4b00-8377-402f46db4a15 3 | 4 | coverage: 5 | round: up 6 | status: 7 | project: 8 | default: 9 | threshold: 0.1% 10 | informational: true 11 | -------------------------------------------------------------------------------- /.github/contributing.md: -------------------------------------------------------------------------------- 1 | Please review the [JEDI-docs](https://jointcenterforsatellitedataassimilation-jedi-docs.readthedocs-hosted.com/en/latest/developer/developer_tools/index.html) for proper practices in the software development of JEDI related projects such as SOCA. -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | (Instructions: this, and all subsequent sections of text should be removed and filled in as appropriate.) 4 | Provide a detailed description of what this PR does. 5 | What bug does it fix, or what feature does it add? 6 | Is a change of answers expected from this PR? 7 | 8 | 9 | 10 | ### Issue(s) addressed 11 | 12 | Link the issues to be closed with this PR, whether in this repository, or in another repository. 13 | (Remember, issues should always be created before starting work on a PR branch!) 14 | - fixes # 15 | - fixes JCSDA/soca-bundle/issues/ 16 | 17 | 18 | 19 | ## Testing 20 | 21 | How were these changes tested? 22 | What compilers / HPCs was it tested with? 23 | Are the changes covered by ctests? (If not, tests should be added first.) 24 | 25 | 26 | 27 | ## Dependencies 28 | 29 | If testing this branch requires non-default branches in other repositories, list them. 30 | Those branches should have matching names for the automated TravisCI tests to pass 31 | 32 | Do PRs in upstream repositories need to be merged first? 33 | If so add the "waiting for other repos" label and list the upstream PRs 34 | - waiting on JCSDA/soca-bundle/pull/ 35 | - waiting on JCSDA/oops/pull/ 36 | 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.html 3 | html 4 | *.png 5 | latex 6 | 7 | *.pyc 8 | build 9 | ._* 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "external/mom6/MOM6"] 2 | path = external/mom6/MOM6 3 | url = https://github.com/NOAA-EMC/MOM6 4 | [submodule "external/icepack/Icepack"] 5 | path = external/icepack/Icepack 6 | url = https://github.com/CICE-Consortium/Icepack.git 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | JEDI encapsulation of MOM6 2 | 3 | (C) Copyright 2017-2024 UCAR. 4 | 5 | This software is licensed under the terms of the Apache Licence Version 2.0 which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | 7 | ## Building 8 | For more details about JEDI, including installation see: https://jointcenterforsatellitedataassimilation-jedi-docs.readthedocs-hosted.com/ 9 | 10 | 1. If building the MOM6 SOCA component: unlike other JEDI projects, this project contains its own bundle, it can be built as follows 11 | ``` 12 | git clone https://github.com/JCSDA/soca.git 13 | mkdir -p soca_build 14 | cd soca_build 15 | ecbuild ../soca/bundle 16 | cd soca 17 | make -j 4 18 | ``` 19 | 20 | To generate doxygen documentation for the Fortran parts of the code, use the `-DENABLE_SOCA_DOC=ON` flag when running `ecbuild`. Documentation will be generated 21 | in the `soca/docs/html` path of the build directory. 22 | 23 | See the [JEDI Documentation](https://jointcenterforsatellitedataassimilation-jedi-docs.readthedocs-hosted.com/en/latest/) for additional details on how to setup, build, and test JEDI projects. 24 | -------------------------------------------------------------------------------- /bundle/.gitignore: -------------------------------------------------------------------------------- 1 | atlas/ 2 | crtm/ 3 | fms/ 4 | gsw/ 5 | icepack/ 6 | ioda-data/ 7 | ioda/ 8 | jedicmake/ 9 | mom6/ 10 | oasim/ 11 | oops/ 12 | saber-data/ 13 | saber/ 14 | soca 15 | test-data-release/ 16 | ufo-data/ 17 | ufo/ 18 | vader/ -------------------------------------------------------------------------------- /cmake/compiler_flags_GNU_CXX.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 2018 UCAR. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | 6 | #################################################################### 7 | # FLAGS COMMON TO ALL BUILD TYPES 8 | #################################################################### 9 | 10 | if( HAVE_OMP ) 11 | set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated-declarations -fopenmp") 12 | else( ) 13 | set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated-declarations -fno-openmp") 14 | endif( ) 15 | 16 | #################################################################### 17 | # RELEASE FLAGS 18 | #################################################################### 19 | 20 | set( CMAKE_CXX_FLAGS_RELEASE "-O3" ) 21 | 22 | #################################################################### 23 | # DEBUG FLAGS 24 | #################################################################### 25 | 26 | set( CMAKE_CXX_FLAGS_DEBUG "-O0 -g" ) 27 | 28 | #################################################################### 29 | # BIT REPRODUCIBLE FLAGS 30 | #################################################################### 31 | 32 | set( CMAKE_CXX_FLAGS_BIT "-O2" ) 33 | 34 | #################################################################### 35 | # LINK FLAGS 36 | #################################################################### 37 | 38 | set( CMAKE_CXX_LINK_FLAGS "" ) 39 | 40 | #################################################################### 41 | 42 | # Meaning of flags 43 | # ---------------- 44 | # todo 45 | 46 | -------------------------------------------------------------------------------- /cmake/compiler_flags_GNU_Fortran.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 2018 UCAR. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | 6 | #################################################################### 7 | # FLAGS COMMON TO ALL BUILD TYPES 8 | #################################################################### 9 | 10 | if( HAVE_OMP ) 11 | set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fopenmp") 12 | else( ) 13 | set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-openmp") 14 | endif( ) 15 | 16 | set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -D_REAL8_ -ffree-line-length-none") 17 | 18 | #################################################################### 19 | # RELEASE FLAGS 20 | #################################################################### 21 | 22 | set( CMAKE_Fortran_FLAGS_RELEASE "-O3 -funroll-all-loops -finline-functions") 23 | 24 | #################################################################### 25 | # DEBUG FLAGS 26 | #################################################################### 27 | 28 | set( CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -fcheck=bounds -ffpe-trap=invalid,zero,overflow,underflow -fbacktrace" ) 29 | 30 | #################################################################### 31 | # BIT REPRODUCIBLE FLAGS 32 | #################################################################### 33 | 34 | set( CMAKE_Fortran_FLAGS_BIT "-O2 -funroll-all-loops -finline-functions" ) 35 | 36 | #################################################################### 37 | # LINK FLAGS 38 | #################################################################### 39 | 40 | set( CMAKE_Fortran_LINK_FLAGS "" ) 41 | 42 | #################################################################### 43 | 44 | # Meaning of flags 45 | # ---------------- 46 | # -fstack-arrays : Allocate automatic arrays on the stack (needs large stacksize!!!) 47 | # -funroll-all-loops : Unroll all loops 48 | # -fcheck=bounds : Bounds checking 49 | 50 | -------------------------------------------------------------------------------- /cmake/compiler_flags_Intel_Fortran.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 2018 UCAR. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | 6 | #################################################################### 7 | # FLAGS COMMON TO ALL BUILD TYPES 8 | #################################################################### 9 | 10 | if( HAVE_OMP ) 11 | set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qopenmp") 12 | else( ) 13 | set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qopenmp-stubs") 14 | endif( ) 15 | 16 | #################################################################### 17 | # RELEASE FLAGS 18 | #################################################################### 19 | 20 | set( CMAKE_Fortran_FLAGS_RELEASE "-O3 -ip -unroll -inline -no-heap-arrays" ) 21 | 22 | #################################################################### 23 | # DEBUG FLAGS 24 | #################################################################### 25 | 26 | set( CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -check bounds -traceback -warn -heap-arrays -fpe-all=0 -fpe:0 -check all" ) 27 | 28 | #################################################################### 29 | # BIT REPRODUCIBLE FLAGS 30 | #################################################################### 31 | 32 | set( CMAKE_Fortran_FLAGS_BIT "-O2 -ip -ipo -unroll -inline -no-heap-arrays" ) 33 | 34 | #################################################################### 35 | # LINK FLAGS 36 | #################################################################### 37 | 38 | set( CMAKE_Fortran_LINK_FLAGS "" ) 39 | 40 | #################################################################### 41 | 42 | # Meaning of flags 43 | # ---------------- 44 | # todo 45 | 46 | -------------------------------------------------------------------------------- /cmake/soca_compiler_flags.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 2018 UCAR. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | 6 | add_definitions ( -Duse_libMPI -Duse_netCDF -DSPMD ) 7 | 8 | set(CMAKE_CXX_STANDARD 17) 9 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 10 | set(CMAKE_CXX_EXTENSIONS OFF) 11 | set(CMAKE_C_STANDARD 11) 12 | set(CMAKE_C_STANDARD_REQUIRED ON) 13 | set(CMAKE_C_EXTENSIONS OFF) 14 | set(CMAKE_FORTRAN_STANDARD 08) 15 | set(CMAKE_FORTRAN_STANDARD_REQUIRED ON) 16 | set(CMAKE_FORTRAN_EXTENSIONS OFF) 17 | 18 | if( NOT CMAKE_BUILD_TYPE MATCHES "Debug" ) 19 | add_definitions( -DNDEBUG ) 20 | endif( ) 21 | 22 | ####################################################################################### 23 | # Fortran 24 | ####################################################################################### 25 | 26 | if( CMAKE_Fortran_COMPILER_ID MATCHES "GNU" ) 27 | include( compiler_flags_GNU_Fortran ) 28 | elseif( CMAKE_Fortran_COMPILER_ID MATCHES "Intel" ) 29 | include( compiler_flags_Intel_Fortran ) 30 | elseif( CMAKE_Fortran_COMPILER_ID MATCHES "XL" ) 31 | include( compiler_flags_XL_Fortran ) 32 | elseif( CMAKE_Fortran_COMPILER_ID MATCHES "Cray" ) 33 | include( compiler_flags_Cray_Fortran ) 34 | else() 35 | message( STATUS "Fortran compiler with ID ${CMAKE_CXX_COMPILER_ID} will be used with CMake default options") 36 | endif() 37 | 38 | -------------------------------------------------------------------------------- /docs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # first we can indicate the documentation build as an option and 2 | # set it to OFF by default since documenation will usually be 3 | # built at the bundle level 4 | option(ENABLE_SOCA_DOC "Build SOCA documentation" OFF) 5 | 6 | if (ENABLE_SOCA_DOC) 7 | find_package(Doxygen) 8 | if (DOXYGEN_FOUND) 9 | message(STATUS "Build SOCA Documentation") 10 | include(GNUInstallDirs) 11 | 12 | set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) 13 | set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) 14 | 15 | configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY) 16 | 17 | add_custom_target( doc_doxygen_soca ALL 18 | COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} 19 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 20 | COMMENT "Generating SOCA documentation with Doxygen" 21 | VERBATIM ) 22 | set( HTML_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/html ) 23 | install(DIRECTORY ${HTML_BUILD_DIR} DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/doc COMPONENT Documentation) 24 | else () 25 | message(WARNING "Doxygen need to be installed to generate SOCA documentation") 26 | endif () 27 | endif () 28 | -------------------------------------------------------------------------------- /docs/mainpage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // This file defines what appears on the Main Page of the documentation 4 | // generated by doxygen. The file contains no code, and does not appear 5 | // in any cpp include statement. 6 | // 7 | /*! 8 | * \mainpage SOCA MOM6 Interface to JEDI 9 | * 10 | * SOCA is the interface between the generic components of the JEDI system and MOM6. 11 | * MOM6 is developed by NOAA's Geophysical Fluid Dynamics Laboratory (GFDL). 12 | */ -------------------------------------------------------------------------------- /external/README.md: -------------------------------------------------------------------------------- 1 | # External Dependencies 2 | 3 | This directory contains external submodules used by SOCA. Currently, SOCA is the only repository in JEDI that uses these dependencies (MOM6 and Icepack), which is why they are maintained as submodules here rather than as separate forks. 4 | 5 | ## Future Improvements 6 | 7 | In the future, CMake logic should be added to handle these dependencies more efficiently when SOCA is built as part of a larger project: 8 | 9 | - When built as part of a larger project, SOCA should link to existing MOM6 and ICEPACK installations rather than rebuilding them 10 | - This would prevent duplicate builds and improve maintenance 11 | -------------------------------------------------------------------------------- /external/icepack/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The file was modified from the original wrapper in the ufs-weather-model 2 | # https://github.com/ufs-community/ufs-weather-model/blob/develop/CICE-interface/CMakeLists.txt 3 | 4 | # Too many files to list, so include them via this file 5 | include("icepack_files.cmake") 6 | 7 | # Collect source files for library 8 | list(APPEND lib_src_files 9 | ${icepack_files}) 10 | 11 | # Define a variable for the library name 12 | # (NOTE: we do not call this icepack, because, for now, only a subset of it 13 | # is being built based on what soca needs) 14 | set(LIBRARY_NAME icepack_limited) 15 | 16 | ## Create target library and set PUBLIC interfaces on the library 17 | add_library(${LIBRARY_NAME} STATIC ${lib_src_files}) 18 | set_target_properties(${LIBRARY_NAME} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod) 19 | 20 | target_include_directories(${LIBRARY_NAME} PUBLIC $ 21 | $) 22 | 23 | # ############################################################################## 24 | # ## Install 25 | # ############################################################################## 26 | install( 27 | TARGETS ${LIBRARY_NAME} 28 | EXPORT ${LIBRARY_NAME}-config 29 | LIBRARY DESTINATION lib 30 | ARCHIVE DESTINATION lib 31 | COMPONENT Library) 32 | 33 | install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIBRARY_NAME}) 34 | 35 | install(EXPORT ${LIBRARY_NAME}-config 36 | DESTINATION lib/cmake) -------------------------------------------------------------------------------- /external/icepack/icepack_files.cmake: -------------------------------------------------------------------------------- 1 | # NOTE: only the files needed by SOCA have been enabled 2 | 3 | #Icepack List: 4 | list(APPEND icepack_files 5 | # Icepack/columnphysics/icepack_aerosol.F90 6 | # Icepack/columnphysics/icepack_age.F90 7 | # Icepack/columnphysics/icepack_algae.F90 8 | # Icepack/columnphysics/icepack_atmo.F90 9 | # Icepack/columnphysics/icepack_brine.F90 10 | # Icepack/columnphysics/icepack_firstyear.F90 11 | # Icepack/columnphysics/icepack_flux.F90 12 | # Icepack/columnphysics/icepack_fsd.F90 13 | # Icepack/columnphysics/icepack_intfc.F90 14 | # Icepack/columnphysics/icepack_isotope.F90 15 | Icepack/columnphysics/icepack_itd.F90 16 | Icepack/columnphysics/icepack_kinds.F90 17 | # Icepack/columnphysics/icepack_mechred.F90 18 | # Icepack/columnphysics/icepack_meltpond_cesm.F90 19 | # Icepack/columnphysics/icepack_meltpond_lvl.F90 20 | # Icepack/columnphysics/icepack_meltpond_topo.F90 21 | Icepack/columnphysics/icepack_mushy_physics.F90 22 | # Icepack/columnphysics/icepack_ocean.F90 23 | # Icepack/columnphysics/icepack_orbital.F90 24 | Icepack/columnphysics/icepack_parameters.F90 25 | # Icepack/columnphysics/icepack_shortwave.F90 26 | # Icepack/columnphysics/icepack_therm_0layer.F90 27 | # Icepack/columnphysics/icepack_therm_bl99.F90 28 | # Icepack/columnphysics/icepack_therm_itd.F90 29 | # Icepack/columnphysics/icepack_therm_mushy.F90 30 | Icepack/columnphysics/icepack_therm_shared.F90 31 | # Icepack/columnphysics/icepack_therm_vertical.F90 32 | Icepack/columnphysics/icepack_tracers.F90 33 | Icepack/columnphysics/icepack_warnings.F90 34 | # Icepack/columnphysics/icepack_wavefracspec.F90 35 | # Icepack/columnphysics/icepack_zbgc.F90 36 | Icepack/columnphysics/icepack_zbgc_shared.F90 37 | # Icepack/columnphysics/icepack_zsalinity.F90 38 | ) -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # (C) Copyright 2017-2021 UCAR. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | 6 | add_subdirectory( soca ) 7 | add_subdirectory( mains ) 8 | 9 | # find cpplint.py provided by oops 10 | find_file(CPPLINT_PY oops_cpplint.py HINTS ${oops_BINDIR}) 11 | 12 | ecbuild_add_test( TARGET soca_coding_norms 13 | TYPE SCRIPT 14 | COMMAND ${CPPLINT_PY} 15 | ARGS --quiet --recursive ${CMAKE_CURRENT_SOURCE_DIR} 16 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) 17 | -------------------------------------------------------------------------------- /src/CPPLINT.cfg: -------------------------------------------------------------------------------- 1 | root=src 2 | linelength=100 3 | filter=-runtime/references -------------------------------------------------------------------------------- /src/mains/AddIncrement.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2020-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/AddIncrement.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | oops::AddIncrement addincrement; 16 | return run.execute(addincrement); 17 | } 18 | -------------------------------------------------------------------------------- /src/mains/ConvertIncrement.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2022 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/ConvertIncrement.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | oops::ConvertIncrement convertincrement; 16 | return run.execute(convertincrement); 17 | } 18 | -------------------------------------------------------------------------------- /src/mains/ConvertState.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/ConvertState.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | oops::ConvertState convertstate; 16 | return run.execute(convertstate); 17 | } 18 | -------------------------------------------------------------------------------- /src/mains/DiffStates.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2020-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/DiffStates.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | oops::DiffStates diffstates; 16 | return run.execute(diffstates); 17 | } 18 | -------------------------------------------------------------------------------- /src/mains/EnsHofX.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "oops/runs/EnsembleApplication.h" 9 | #include "oops/runs/HofX4D.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | #include "ufo/instantiateObsFilterFactory.h" 13 | #include "ufo/ObsTraits.h" 14 | 15 | int main(int argc, char ** argv) { 16 | oops::Run run(argc, argv); 17 | ufo::instantiateObsFilterFactory(); 18 | oops::EnsembleApplication > hofx; 19 | return run.execute(hofx); 20 | } 21 | -------------------------------------------------------------------------------- /src/mains/EnsMeanAndVariance.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2023-2023 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/EnsMeanAndVariance.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | oops::EnsMeanAndVariance ens_moments; 16 | return run.execute(ens_moments); 17 | } 18 | -------------------------------------------------------------------------------- /src/mains/EnsRecenter.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2019-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/EnsRecenter.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | oops::EnsRecenter var; 16 | return run.execute(var); 17 | } 18 | -------------------------------------------------------------------------------- /src/mains/ErrorCovarianceToolbox.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2009-2016 ECMWF. 3 | * (C) Copyright 2017-2021 UCAR. 4 | * 5 | * This software is licensed under the terms of the Apache Licence Version 2.0 6 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 7 | * In applying this licence, ECMWF does not waive the privileges and immunities 8 | * granted to it by virtue of its status as an intergovernmental organisation nor 9 | * does it submit to any jurisdiction. 10 | */ 11 | 12 | #include "oops/runs/Run.h" 13 | #include "saber/oops/ErrorCovarianceToolbox.h" 14 | #include "saber/oops/instantiateCovarFactory.h" 15 | #include "soca/Traits.h" 16 | 17 | 18 | int main(int argc, char ** argv) { 19 | oops::Run run(argc, argv); 20 | saber::instantiateCovarFactory(); 21 | saber::ErrorCovarianceToolbox ect; 22 | return run.execute(ect); 23 | } 24 | -------------------------------------------------------------------------------- /src/mains/Forecast.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/generic/instantiateModelFactory.h" 10 | #include "oops/runs/Forecast.h" 11 | #include "oops/runs/Run.h" 12 | 13 | #include "soca/Traits.h" 14 | 15 | int main(int argc, char ** argv) { 16 | oops::Run run(argc, argv); 17 | oops::instantiateModelFactory(); 18 | oops::Forecast fc; 19 | return run.execute(fc); 20 | } 21 | -------------------------------------------------------------------------------- /src/mains/GenEnsPertB.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/generic/instantiateModelFactory.h" 10 | #include "saber/oops/instantiateCovarFactory.h" 11 | #include "oops/runs/GenEnsPertB.h" 12 | #include "oops/runs/Run.h" 13 | #include "soca/Traits.h" 14 | 15 | int main(int argc, char ** argv) { 16 | oops::Run run(argc, argv); 17 | saber::instantiateCovarFactory(); 18 | oops::instantiateModelFactory(); 19 | oops::GenEnsPertB ensgen; 20 | return run.execute(ensgen); 21 | } 22 | -------------------------------------------------------------------------------- /src/mains/GenHybridLinearModelCoeffs.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2024- UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/Run.h" 10 | #include "oops/runs/GenHybridLinearModelCoeffs.h" 11 | #include "soca/Traits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | oops::GenHybridLinearModelCoeffs genHybridLinearModelCoeffs; 16 | return run.execute(genHybridLinearModelCoeffs); 17 | } 18 | -------------------------------------------------------------------------------- /src/mains/GridGen.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "mains/GridGen.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | 13 | 14 | int main(int argc, char ** argv) { 15 | oops::Run run(argc, argv); 16 | soca::GridGen makegrid; 17 | return run.execute(makegrid); 18 | } 19 | -------------------------------------------------------------------------------- /src/mains/GridGen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef MAINS_GRIDGEN_H_ 9 | #define MAINS_GRIDGEN_H_ 10 | 11 | #include 12 | 13 | #include "soca/Traits.h" 14 | 15 | #include "soca/Geometry/Geometry.h" 16 | 17 | #include "eckit/config/LocalConfiguration.h" 18 | #include "eckit/mpi/Comm.h" 19 | #include "oops/base/PostProcessor.h" 20 | #include "oops/mpi/mpi.h" 21 | #include "oops/runs/Application.h" 22 | 23 | namespace soca { 24 | 25 | class GridGen : public oops::Application { 26 | public: 27 | explicit GridGen(const eckit::mpi::Comm & comm = oops::mpi::world()) 28 | : Application(comm) {} 29 | static const std::string classname() {return "soca::GridGen";} 30 | 31 | int execute(const eckit::Configuration & fullConfig) const { 32 | // Setup resolution 33 | const eckit::LocalConfiguration geomconfig(fullConfig, "geometry"); 34 | const Geometry geom(geomconfig, this->getComm(), true); 35 | return 0; 36 | } 37 | // ----------------------------------------------------------------------------- 38 | private: 39 | std::string appname() const { 40 | return "soca::GridGen<"; 41 | } 42 | // ----------------------------------------------------------------------------- 43 | }; 44 | 45 | } // namespace soca 46 | #endif // MAINS_GRIDGEN_H_ 47 | -------------------------------------------------------------------------------- /src/mains/HofX.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2009-2016 ECMWF. 3 | * (C) Copyright 2017-2021 UCAR. 4 | * 5 | * This software is licensed under the terms of the Apache Licence Version 2.0 6 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 7 | * In applying this licence, ECMWF does not waive the privileges and immunities 8 | * granted to it by virtue of its status as an intergovernmental organisation nor 9 | * does it submit to any jurisdiction. 10 | */ 11 | 12 | #include "soca/Traits.h" 13 | 14 | #include "oops/generic/instantiateModelFactory.h" 15 | #include "oops/runs/HofX4D.h" 16 | #include "oops/runs/Run.h" 17 | #include "ufo/instantiateObsErrorFactory.h" 18 | #include "ufo/instantiateObsFilterFactory.h" 19 | #include "ufo/ObsTraits.h" 20 | 21 | int main(int argc, char ** argv) { 22 | oops::Run run(argc, argv); 23 | oops::instantiateModelFactory(); 24 | ufo::instantiateObsErrorFactory(); 25 | ufo::instantiateObsFilterFactory(); 26 | oops::HofX4D hofx; 27 | return run.execute(hofx); 28 | } 29 | -------------------------------------------------------------------------------- /src/mains/HofX3D.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/HofX3D.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | #include "ufo/instantiateObsErrorFactory.h" 13 | #include "ufo/instantiateObsFilterFactory.h" 14 | #include "ufo/ObsTraits.h" 15 | 16 | int main(int argc, char ** argv) { 17 | oops::Run run(argc, argv); 18 | ufo::instantiateObsErrorFactory(); 19 | ufo::instantiateObsFilterFactory(); 20 | oops::HofX3D hofx; 21 | return run.execute(hofx); 22 | } 23 | -------------------------------------------------------------------------------- /src/mains/HybridGain.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2019-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/HybridGain.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | oops::HybridGain var; 16 | return run.execute(var); 17 | } 18 | -------------------------------------------------------------------------------- /src/mains/LETKF.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/LocalEnsembleDA.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | #include "ufo/instantiateObsErrorFactory.h" 13 | #include "ufo/instantiateObsFilterFactory.h" 14 | #include "ufo/instantiateObsLocFactory.h" 15 | #include "ufo/ObsTraits.h" 16 | 17 | int main(int argc, char ** argv) { 18 | oops::Run run(argc, argv); 19 | ufo::instantiateObsLocFactory(); 20 | ufo::instantiateObsErrorFactory(); 21 | ufo::instantiateObsFilterFactory(); 22 | oops::LocalEnsembleDA letkf; 23 | return run.execute(letkf); 24 | } 25 | -------------------------------------------------------------------------------- /src/mains/LinearizationError.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2024- UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/Run.h" 10 | #include "oops/generic/instantiateLinearModelFactory.h" 11 | #include "oops/generic/instantiateModelFactory.h" 12 | #include "oops/runs/LinearizationError.h" 13 | #include "soca/Traits.h" 14 | 15 | int main(int argc, char ** argv) { 16 | oops::Run run(argc, argv); 17 | oops::instantiateLinearModelFactory(); 18 | oops::instantiateModelFactory(); 19 | oops::LinearizationError linearizationError; 20 | return run.execute(linearizationError); 21 | } 22 | -------------------------------------------------------------------------------- /src/mains/SetCorScales.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2022-2022 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "mains/SetCorScales.h" 10 | #include "oops/runs/Run.h" 11 | #include "soca/Traits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | soca::SetCorScales setcorscales; 16 | return run.execute(setcorscales); 17 | } 18 | -------------------------------------------------------------------------------- /src/mains/SqrtOfVertLoc.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "saber/oops/instantiateCovarFactory.h" 9 | 10 | #include "oops/generic/instantiateModelFactory.h" 11 | #include "oops/runs/Run.h" 12 | #include "oops/runs/SqrtOfVertLoc.h" 13 | #include "soca/Traits.h" 14 | 15 | int main(int argc, char ** argv) { 16 | oops::Run run(argc, argv); 17 | oops::instantiateModelFactory(); 18 | saber::instantiateCovarFactory(); 19 | oops::SqrtOfVertLoc sqrtgen; 20 | return run.execute(sqrtgen); 21 | } 22 | -------------------------------------------------------------------------------- /src/mains/StaticBInit.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | 9 | #include "oops/runs/Run.h" 10 | #include "oops/runs/StaticBInit.h" 11 | #include "soca/Traits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | oops::StaticBInit bmat; 16 | return run.execute(bmat); 17 | } 18 | -------------------------------------------------------------------------------- /src/mains/Var.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2009-2016 ECMWF. 3 | * (C) Copyright 2017-2021 UCAR. 4 | * 5 | * This software is licensed under the terms of the Apache Licence Version 2.0 6 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 7 | * In applying this licence, ECMWF does not waive the privileges and immunities 8 | * granted to it by virtue of its status as an intergovernmental organisation nor 9 | * does it submit to any jurisdiction. 10 | */ 11 | 12 | 13 | #include "oops/generic/instantiateModelFactory.h" 14 | #include "oops/runs/Run.h" 15 | #include "oops/runs/Variational.h" 16 | #include "saber/oops/instantiateCovarFactory.h" 17 | #include "soca/Traits.h" 18 | #include "ufo/instantiateObsErrorFactory.h" 19 | #include "ufo/instantiateObsFilterFactory.h" 20 | #include "ufo/ObsTraits.h" 21 | 22 | int main(int argc, char ** argv) { 23 | oops::Run run(argc, argv); 24 | oops::instantiateModelFactory(); 25 | ufo::instantiateObsErrorFactory(); 26 | ufo::instantiateObsFilterFactory(); 27 | saber::instantiateCovarFactory(); 28 | oops::Variational var; 29 | return run.execute(var); 30 | } 31 | -------------------------------------------------------------------------------- /src/soca/AnalyticInit/AnalyticInit.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/AnalyticInit/AnalyticInit.h" 9 | #include "soca/AnalyticInit/AnalyticInitFortran.h" 10 | 11 | namespace soca { 12 | 13 | static oops::AnalyticInitMaker 14 | makerAnalyticInit_("soca_ana_init"); 15 | 16 | void AnalyticInit::fillGeoVaLs(const ufo::SampledLocations & locs, 17 | ufo::GeoVaLs & geovals) const { 18 | soca_analytic_geovals_f90(geovals.toFortran(), locs); 19 | } 20 | } // namespace soca 21 | -------------------------------------------------------------------------------- /src/soca/AnalyticInit/AnalyticInit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef SOCA_ANALYTICINIT_ANALYTICINIT_H_ 9 | #define SOCA_ANALYTICINIT_ANALYTICINIT_H_ 10 | 11 | #include 12 | 13 | #include "oops/interface/AnalyticInitBase.h" 14 | 15 | #include "ufo/ObsTraits.h" 16 | 17 | namespace soca { 18 | 19 | class AnalyticInit : 20 | public oops::interface::AnalyticInitBase { 21 | public: 22 | explicit AnalyticInit(const eckit::Configuration &) {} 23 | void fillGeoVaLs(const ufo::SampledLocations &, ufo::GeoVaLs &) const override; 24 | }; 25 | 26 | } // namespace soca 27 | #endif // SOCA_ANALYTICINIT_ANALYTICINIT_H_ 28 | -------------------------------------------------------------------------------- /src/soca/AnalyticInit/AnalyticInitFortran.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef SOCA_ANALYTICINIT_ANALYTICINITFORTRAN_H_ 9 | #define SOCA_ANALYTICINIT_ANALYTICINITFORTRAN_H_ 10 | 11 | #include "soca/Fortran.h" 12 | 13 | // Forward declarations 14 | namespace ufo { 15 | class SampledLocations; 16 | } 17 | 18 | namespace soca { 19 | 20 | extern "C" { 21 | void soca_analytic_geovals_f90(F90goms &, const ufo::SampledLocations &); 22 | } 23 | } // namespace soca 24 | #endif // SOCA_ANALYTICINIT_ANALYTICINITFORTRAN_H_ 25 | -------------------------------------------------------------------------------- /src/soca/AnalyticInit/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | AnalyticInit.cc 3 | AnalyticInit.h 4 | AnalyticInitFortran.h 5 | soca_analytic_mod.F90 6 | soca_analytic.interface.F90 7 | ) -------------------------------------------------------------------------------- /src/soca/AnalyticInit/soca_analytic.interface.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 2021-2021 UCAR. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | 6 | 7 | !> C++ interfaces for soca_analytic_mod 8 | module soca_analytic_mod_c 9 | 10 | use iso_c_binding 11 | 12 | USE ufo_geovals_mod, ONLY : ufo_geovals 13 | USE ufo_geovals_mod_c, ONLY : ufo_geovals_registry 14 | USE ufo_sampled_locations_mod, ONLY : ufo_sampled_locations 15 | 16 | use soca_analytic_mod 17 | 18 | implicit none 19 | private 20 | 21 | contains 22 | 23 | !> C++ interface for soca_analytic_mod::soca_analytic_geovals() 24 | subroutine soca_analytic_geovals_c(c_key_geovals, c_locs) & 25 | bind (c,name='soca_analytic_geovals_f90') 26 | 27 | integer(c_int), intent(inout) :: c_key_geovals 28 | type(c_ptr), value, intent(in) :: c_locs 29 | 30 | type(ufo_geovals), pointer :: geovals 31 | type(ufo_sampled_locations) :: locs 32 | 33 | call ufo_geovals_registry%get(c_key_geovals, geovals) 34 | locs = ufo_sampled_locations(c_locs) 35 | 36 | call soca_analytic_geovals(geovals, locs) 37 | 38 | end subroutine 39 | 40 | end module 41 | -------------------------------------------------------------------------------- /src/soca/Covariance/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | ErrorCovariance.h 3 | ) -------------------------------------------------------------------------------- /src/soca/Covariance/ErrorCovariance.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef SOCA_COVARIANCE_ERRORCOVARIANCE_H_ 9 | #define SOCA_COVARIANCE_ERRORCOVARIANCE_H_ 10 | 11 | #include 12 | #include 13 | 14 | #include 15 | #include 16 | 17 | #include "oops/base/Variables.h" 18 | #include "oops/util/DateTime.h" 19 | #include "oops/util/ObjectCounter.h" 20 | #include "oops/util/Printable.h" 21 | 22 | // Forward declarations 23 | namespace eckit { 24 | class Configuration; 25 | } 26 | namespace soca { 27 | class Geometry; 28 | class Increment; 29 | class State; 30 | } 31 | 32 | // ---------------------------------------------------------------------------- 33 | 34 | namespace soca { 35 | 36 | // Background error covariance matrix for SOCA model. 37 | class ErrorCovariance : public util::Printable, 38 | private boost::noncopyable, 39 | private util::ObjectCounter { 40 | public: 41 | static const std::string classname() {return "soca::ErrorCovariance";} 42 | 43 | ErrorCovariance(const Geometry &, const oops::Variables &, 44 | const eckit::Configuration &, 45 | const State &, const State &) { 46 | throw eckit::NotImplemented("You should not be using SocaError, use SABER!");} 47 | ~ErrorCovariance() {} 48 | 49 | void linearize(const State &, const Geometry &) {} 50 | void multiply(const Increment &, Increment &) const {} 51 | void inverseMultiply(const Increment &, Increment &) const {} 52 | void randomize(Increment &) const {} 53 | 54 | private: 55 | void print(std::ostream &) const {} 56 | }; 57 | // ----------------------------------------------------------------------------- 58 | 59 | } // namespace soca 60 | #endif // SOCA_COVARIANCE_ERRORCOVARIANCE_H_ 61 | -------------------------------------------------------------------------------- /src/soca/Fields/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | Fields.cc 3 | Fields.h 4 | FieldsMetadata.h 5 | FieldsMetadata.cc 6 | soca_fields_metadata_mod.F90 7 | soca_fields_mod.F90 8 | ) 9 | -------------------------------------------------------------------------------- /src/soca/Fields/FieldsMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2024-2024 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | 7 | */ 8 | 9 | #pragma once 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | namespace soca { 16 | 17 | // -------------------------------------------------------------------------------------- 18 | 19 | /// Holds all the user configurable meta data associated with a single field. 20 | /// This struct contains information about the internal variable name, the 21 | /// variable name used by UFO, and the variable name used by UFO for the surface 22 | /// (if this is a 3D field). 23 | struct FieldMetadata { 24 | std::string name; ///< The soca and JEDI name. 25 | std::string nameSurface; ///< The variable name used by UFO for the surface 26 | /// (if this is a 3D field). 27 | }; 28 | 29 | // -------------------------------------------------------------------------------------- 30 | 31 | /// Metadata for the soca fields. 32 | /// A yaml file is read in containing information about the various fields. 33 | class FieldsMetadata { 34 | public: 35 | /// Constructs a FieldsMetadata object and reads metadata from a yaml file. 36 | /// @param filepath The path to the yaml file. 37 | explicit FieldsMetadata(const std::string & filepath); 38 | 39 | /// Get the metadata for a field. 40 | /// @param name The field's "name", "getvalName", or "getvalNameSurface". 41 | /// @return A reference to the FieldMetadata object. 42 | const FieldMetadata & operator[](const std::string & name) const; 43 | 44 | private: 45 | /// Map of field name(s) to FieldMetadata objects. 46 | std::map> fieldMetadata_; 47 | }; 48 | 49 | // -------------------------------------------------------------------------------------- 50 | 51 | } // namespace soca 52 | -------------------------------------------------------------------------------- /src/soca/Fortran.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef SOCA_FORTRAN_H_ 9 | #define SOCA_FORTRAN_H_ 10 | 11 | namespace soca { 12 | 13 | /// key type for soca_geom_mod::soca_geom 14 | typedef int F90geom; 15 | 16 | /// key type for soca_geom_iter_mod::soca_geom_iter 17 | typedef int F90iter; 18 | 19 | /// key type for soca_model_mod::soca_model 20 | typedef int F90model; 21 | 22 | /// key type for ufo_geovals_mod::ufo_geovals 23 | typedef int F90goms; 24 | 25 | /// key type for soca_fields_mod::soca_fields 26 | typedef int F90flds; 27 | 28 | /// key type for soca_getvalues_mod::soca_getvalues 29 | typedef int F90getval; 30 | 31 | /// key type for soca_covariance_mod::soca_cov 32 | typedef int F90bmat; 33 | 34 | /// key type for the various Fortran Transform classes. 35 | /** 36 | * \todo These are separate classes in separate registries, so they should 37 | * be separate key types 38 | */ 39 | typedef int F90balopmat; 40 | typedef int F90varchange; 41 | } // namespace soca 42 | #endif // SOCA_FORTRAN_H_ 43 | -------------------------------------------------------------------------------- /src/soca/Geometry/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | Geometry.cc 3 | Geometry.h 4 | GeometryFortran.h 5 | soca_geom_mod.F90 6 | soca_geom.interface.F90 7 | FmsInput.cc 8 | FmsInput.h 9 | ) 10 | -------------------------------------------------------------------------------- /src/soca/Geometry/FmsInput.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2020-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef SOCA_GEOMETRY_FMSINPUT_H_ 9 | #define SOCA_GEOMETRY_FMSINPUT_H_ 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include "eckit/config/Configuration.h" 20 | #include "eckit/exception/Exceptions.h" 21 | #include "eckit/mpi/Comm.h" 22 | 23 | // ----------------------------------------------------------------------------- 24 | 25 | namespace soca { 26 | 27 | /// FmsInput handles the hard-coded fms input.nml file. 28 | struct FmsInput { 29 | FmsInput(const eckit::mpi::Comm &, const eckit::Configuration & conf); 30 | FmsInput(const FmsInput &); 31 | ~FmsInput(); 32 | 33 | void updateNameList(); 34 | int getFileSN(const std::string &); 35 | 36 | const eckit::mpi::Comm & comm_; 37 | const eckit::Configuration & conf_; 38 | int inputnml_sn_; 39 | std::string inputnml_orig_; 40 | }; 41 | } // namespace soca 42 | 43 | #endif // SOCA_GEOMETRY_FMSINPUT_H_ 44 | -------------------------------------------------------------------------------- /src/soca/Geometry/GeometryFortran.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2024 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef SOCA_GEOMETRY_GEOMETRYFORTRAN_H_ 9 | #define SOCA_GEOMETRY_GEOMETRYFORTRAN_H_ 10 | 11 | #include "soca/Fortran.h" 12 | 13 | #include "oops/base/Variables.h" 14 | 15 | // Forward declarations 16 | namespace atlas { 17 | namespace field { 18 | class FieldSetImpl; 19 | class FieldImpl; 20 | } 21 | namespace functionspace { 22 | class FunctionSpaceImpl; 23 | } 24 | } 25 | namespace eckit { 26 | class Configuration; 27 | } 28 | 29 | namespace soca { 30 | 31 | extern "C" { 32 | void soca_geo_setup_f90(F90geom &, 33 | const eckit::Configuration * const &, 34 | const eckit::mpi::Comm *, 35 | const bool & gen); 36 | 37 | void soca_geo_init_atlas_f90(const F90geom &, 38 | atlas::functionspace::FunctionSpaceImpl *, 39 | atlas::field::FieldSetImpl *, 40 | const eckit::Configuration * const &, 41 | const bool & gen); 42 | void soca_geo_get_mesh_size_f90(const F90geom &, int &, int&); 43 | void soca_geo_gen_mesh_f90( 44 | const F90geom &, 45 | const int &, double[], double[], int[], int[], int[], int[], 46 | const int &, int[]); 47 | void soca_geo_delete_f90(F90geom &); 48 | void soca_geo_get_num_levels_f90(const F90geom &, const oops::Variables &, 49 | const size_t &, size_t[]); 50 | void soca_geo_write_f90(const F90geom &, const eckit::Configuration * const &); 51 | } 52 | } // namespace soca 53 | #endif // SOCA_GEOMETRY_GEOMETRYFORTRAN_H_ 54 | -------------------------------------------------------------------------------- /src/soca/GeometryIterator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | GeometryIterator.cc 3 | GeometryIterator.h 4 | ) -------------------------------------------------------------------------------- /src/soca/GeometryIterator/GeometryIterator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2019-2024 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | #include "oops/util/ObjectCounter.h" 14 | #include "oops/util/Printable.h" 15 | 16 | // Forward declarations 17 | namespace eckit { 18 | namespace geometry { 19 | class Point3; 20 | } 21 | } 22 | namespace soca { 23 | class Geometry; 24 | } 25 | 26 | namespace soca { 27 | // ----------------------------------------------------------------------------- 28 | class GeometryIterator: public util::Printable, 29 | private util::ObjectCounter { 30 | public: 31 | typedef std::forward_iterator_tag iterator_category; 32 | typedef eckit::geometry::Point3 value_type; 33 | typedef ptrdiff_t difference_type; 34 | typedef eckit::geometry::Point3 & reference; 35 | typedef eckit::geometry::Point3 * pointer; 36 | 37 | static const std::string classname() {return "soca::GeometryIterator";} 38 | 39 | GeometryIterator(const GeometryIterator &); 40 | explicit GeometryIterator(const Geometry & geom, 41 | const size_t & iindex, 42 | const size_t & kindex = -1); 43 | ~GeometryIterator(); 44 | 45 | bool operator==(const GeometryIterator &) const; 46 | bool operator!=(const GeometryIterator &) const; 47 | eckit::geometry::Point3 operator*() const; 48 | GeometryIterator& operator++(); 49 | 50 | double getFieldValue(const std::string &) const; 51 | 52 | size_t i() const {return iIndex_;} 53 | size_t k() const {return kIndex_;} 54 | 55 | private: 56 | void print(std::ostream &) const; 57 | const Geometry & geom_; 58 | size_t iIndex_; 59 | size_t kIndex_; 60 | }; 61 | 62 | } // namespace soca 63 | 64 | -------------------------------------------------------------------------------- /src/soca/Increment/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | Increment.cc 3 | Increment.h 4 | IncrementFortran.h 5 | soca_increment_mod.F90 6 | soca_increment.interface.F90 7 | soca_increment.reg.F90 8 | ) -------------------------------------------------------------------------------- /src/soca/Increment/IncrementFortran.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2020-2023 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef SOCA_INCREMENT_INCREMENTFORTRAN_H_ 9 | #define SOCA_INCREMENT_INCREMENTFORTRAN_H_ 10 | 11 | #include "oops/base/Variables.h" 12 | #include "soca/Fortran.h" 13 | 14 | // Forward declarations 15 | namespace atlas { 16 | namespace field { 17 | class FieldSetImpl; 18 | } 19 | } 20 | namespace eckit { 21 | class Configuration; 22 | } 23 | 24 | namespace util { 25 | class DateTime; 26 | class Duration; 27 | } 28 | 29 | namespace soca { 30 | 31 | extern "C" { 32 | void soca_increment_create_f90(F90flds &, const F90geom &, 33 | const oops::Variables &, 34 | const atlas::field::FieldSetImpl *); 35 | void soca_increment_delete_f90(F90flds &); 36 | void soca_increment_random_f90(const F90flds &); 37 | void soca_increment_dirac_f90(const F90flds &, 38 | const eckit::Configuration * const &); 39 | void soca_increment_read_file_f90(const F90flds &, 40 | const eckit::Configuration * const &, 41 | util::DateTime * const *); 42 | void soca_increment_write_file_f90(const F90flds &, 43 | const eckit::Configuration * const &, 44 | const util::DateTime * const *); 45 | void soca_increment_update_fields_f90(F90flds &, const oops::Variables &); 46 | void soca_increment_horiz_scales_f90(F90flds &, 47 | const eckit::Configuration * const &); 48 | void soca_increment_vert_scales_f90(F90flds &, const double &); 49 | } 50 | } // namespace soca 51 | #endif // SOCA_INCREMENT_INCREMENTFORTRAN_H_ 52 | -------------------------------------------------------------------------------- /src/soca/Increment/soca_increment.reg.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 2020-2021 UCAR 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | 6 | !> registry for soca_increment_mod::soca_increment instances for use in 7 | !! Fortran/C++ interface of soca_increment_mod_c 8 | module soca_increment_reg 9 | 10 | use soca_increment_mod 11 | 12 | implicit none 13 | private 14 | 15 | #define LISTED_TYPE soca_increment 16 | 17 | !> Linked list interface - defines registry_t type 18 | #include "oops/util/linkedList_i.f" 19 | 20 | !> Global registry for soca_increment instances 21 | type(registry_t), public :: soca_increment_registry 22 | 23 | ! ------------------------------------------------------------------------------ 24 | contains 25 | ! ------------------------------------------------------------------------------ 26 | 27 | !> Linked list implementation 28 | #include "oops/util/linkedList_c.f" 29 | 30 | end module soca_increment_reg -------------------------------------------------------------------------------- /src/soca/LinearModel/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(OceanIceEmulator) -------------------------------------------------------------------------------- /src/soca/LinearModel/OceanIceEmulator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | LinearModelOceanIceEmulator.cc 3 | LinearModelOceanIceEmulator.h 4 | ModelTrajectory.cc 5 | ModelTrajectory.h 6 | ) -------------------------------------------------------------------------------- /src/soca/LinearModel/OceanIceEmulator/ModelTrajectory.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2025 NOAA/NWS/NCEP/EMC 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/LinearModel/OceanIceEmulator/ModelTrajectory.h" 9 | 10 | #include "eckit/exception/Exceptions.h" 11 | #include "soca/State/State.h" 12 | 13 | // ----------------------------------------------------------------------------- 14 | namespace soca { 15 | // ----------------------------------------------------------------------------- 16 | ModelTrajectory::ModelTrajectory(const bool ltraj) : ltraj_(ltraj), traj_() {} 17 | // ----------------------------------------------------------------------------- 18 | ModelTrajectory::~ModelTrajectory() {} 19 | // ----------------------------------------------------------------------------- 20 | void ModelTrajectory::set(const State & xx) { 21 | if (ltraj_) traj_.push_back(new State(xx)); 22 | } 23 | // ----------------------------------------------------------------------------- 24 | const State & ModelTrajectory::get(const int ii) const { 25 | if (ii <= 0 || ii > static_cast(traj_.size())) { 26 | throw eckit::OutOfRange("Index out of bounds in ModelTrajectory::get", Here()); 27 | } 28 | return traj_[ii-1]; 29 | } 30 | // ----------------------------------------------------------------------------- 31 | 32 | } // namespace soca 33 | 34 | -------------------------------------------------------------------------------- /src/soca/LinearModel/OceanIceEmulator/ModelTrajectory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2025 NOAA/NWS/NCEP/EMC 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #pragma once 9 | 10 | 11 | #include 12 | 13 | #include 14 | 15 | #include "oops/util/ObjectCounter.h" 16 | 17 | namespace soca { 18 | class State; 19 | 20 | /// OceanIceEmulator model trajectory 21 | 22 | // ----------------------------------------------------------------------------- 23 | class ModelTrajectory: private util::ObjectCounter { 24 | public: 25 | static const std::string classname() {return "soca::ModelTrajectory";} 26 | 27 | /// Constructor, destructor 28 | explicit ModelTrajectory(const bool ltraj = true); 29 | ~ModelTrajectory(); 30 | 31 | /// Save trajectory 32 | void set(const State &); 33 | 34 | /// Get trajectory 35 | const State & get(const int) const; 36 | 37 | private: 38 | const bool ltraj_; 39 | boost::ptr_vector traj_; 40 | }; 41 | // ----------------------------------------------------------------------------- 42 | 43 | } // namespace soca 44 | 45 | -------------------------------------------------------------------------------- /src/soca/LinearVariableChange/Balance/Balance.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | #include "oops/util/DateTime.h" 14 | #include "oops/util/Printable.h" 15 | 16 | #include "soca/LinearVariableChange/Base/LinearVariableChangeBase.h" 17 | 18 | // Forward declarations 19 | namespace eckit { 20 | class Configuration; 21 | } 22 | namespace soca { 23 | class State; 24 | class Increment; 25 | class Geometry; 26 | } 27 | 28 | // ----------------------------------------------------------------------------- 29 | 30 | namespace soca { 31 | 32 | /// SOCA linear change of variable 33 | class Balance: public LinearVariableChangeBase { 34 | public: 35 | static const std::string classname() {return "soca::Balance";} 36 | 37 | explicit Balance(const State &, const State &, 38 | const Geometry &, const eckit::Configuration &); 39 | ~Balance(); 40 | 41 | /// Perform linear transforms 42 | void multiply(const Increment &, Increment &) const; 43 | void multiplyInverse(const Increment &, Increment &) const; 44 | void multiplyAD(const Increment &, Increment &) const; 45 | void multiplyInverseAD(const Increment &, Increment &) const; 46 | 47 | private: 48 | void print(std::ostream &) const override; 49 | int keyFtnConfig_; 50 | }; 51 | // ----------------------------------------------------------------------------- 52 | 53 | } // namespace soca 54 | -------------------------------------------------------------------------------- /src/soca/LinearVariableChange/Balance/BalanceFortran.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2019-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include "soca/Fortran.h" 11 | 12 | // Forward declarations 13 | namespace eckit { 14 | class Configuration; 15 | } 16 | 17 | namespace soca { 18 | 19 | extern "C" { 20 | void soca_balance_setup_f90(F90balopmat &, 21 | const eckit::Configuration * const *, 22 | const F90flds &, 23 | const F90geom &); 24 | void soca_balance_delete_f90(F90balopmat &); 25 | void soca_balance_mult_f90(const F90balopmat &, const F90balopmat &, 26 | F90balopmat &); 27 | void soca_balance_multinv_f90(const F90balopmat &, const F90balopmat &, 28 | F90balopmat &); 29 | void soca_balance_multad_f90(const F90balopmat &, const F90balopmat &, 30 | F90balopmat &); 31 | void soca_balance_multinvad_f90(const F90balopmat &, const F90balopmat &, 32 | F90balopmat &); 33 | } 34 | } // namespace soca 35 | -------------------------------------------------------------------------------- /src/soca/LinearVariableChange/Balance/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | Balance.cc 3 | Balance.h 4 | BalanceFortran.h 5 | soca_balance_mod.F90 6 | soca_balance.interface.F90 7 | soca_ksshts_mod.F90 8 | soca_kst_mod.F90 9 | ) -------------------------------------------------------------------------------- /src/soca/LinearVariableChange/Base/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | LinearVariableChangeBase.cc 3 | LinearVariableChangeBase.h 4 | ) 5 | -------------------------------------------------------------------------------- /src/soca/LinearVariableChange/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(Balance) 2 | add_subdirectory(Base) 3 | add_subdirectory(LinearModel2GeoVaLs) 4 | 5 | soca_target_sources( 6 | LinearVariableChange.cc 7 | LinearVariableChange.h 8 | ) 9 | -------------------------------------------------------------------------------- /src/soca/LinearVariableChange/LinearModel2GeoVaLs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | LinearModel2GeoVaLs.cc 3 | LinearModel2GeoVaLs.h 4 | ) 5 | -------------------------------------------------------------------------------- /src/soca/LinearVariableChange/LinearModel2GeoVaLs/LinearModel2GeoVaLs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | #include "oops/util/Printable.h" 14 | 15 | #include "soca/LinearVariableChange/Base/LinearVariableChangeBase.h" 16 | 17 | // Forward declarations 18 | namespace eckit { 19 | class Configuration; 20 | } 21 | 22 | namespace soca { 23 | class Geometry; 24 | class Increment; 25 | 26 | 27 | class LinearModel2GeoVaLs: public LinearVariableChangeBase { 28 | public: 29 | static const std::string classname() {return "soca::LinearModel2GeoVaLs";} 30 | 31 | explicit LinearModel2GeoVaLs(const State &, const State &, const Geometry &, 32 | const eckit::Configuration &); 33 | ~LinearModel2GeoVaLs(); 34 | 35 | void multiply(const Increment &, Increment &) const; 36 | void multiplyInverse(const Increment &, Increment &) const; 37 | void multiplyAD(const Increment &, Increment &) const; 38 | void multiplyInverseAD(const Increment &, Increment &) const; 39 | 40 | private: 41 | const Geometry & geom_; 42 | void print(std::ostream &) const; 43 | }; 44 | 45 | } // namespace soca 46 | -------------------------------------------------------------------------------- /src/soca/MLBalance/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(KEmul) 2 | 3 | soca_target_sources( 4 | MLBalance.cc 5 | MLBalance.h 6 | MLBalanceParameters.h 7 | MLJac.h 8 | ) 9 | -------------------------------------------------------------------------------- /src/soca/MLBalance/KEmul/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | BaseEmul.h 3 | IceEmul.h 4 | IceNet.h 5 | ) 6 | -------------------------------------------------------------------------------- /src/soca/MLBalance/MLBalanceParameters.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2024 NOAA/NWS/NCEP/EMC 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | #include "saber/blocks/SaberBlockParametersBase.h" 14 | 15 | namespace soca { 16 | 17 | // -------------------------------------------------------------------------------------- 18 | 19 | class MLBalanceParameters : public saber::SaberBlockParametersBase { 20 | OOPS_CONCRETE_PARAMETERS(MLBalanceParameters, saber::SaberBlockParametersBase) 21 | public: 22 | oops::RequiredParameter mlbalances{"ML Balances", this}; 23 | oops::Variables mandatoryActiveVars() const override { 24 | return oops::Variables({"sea_water_potential_temperature", 25 | "sea_water_salinity", 26 | "sea_surface_height_above_geoid", 27 | "sea_ice_area_fraction", 28 | "sea_ice_thickness", 29 | "sea_ice_snow_thickness"});} 30 | }; 31 | 32 | // -------------------------------------------------------------------------------------- 33 | } // namespace soca 34 | -------------------------------------------------------------------------------- /src/soca/Model/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(OceanIceEmulator) 2 | -------------------------------------------------------------------------------- /src/soca/Model/OceanIceEmulator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | ModelOceanIceEmulator.cc 3 | ModelOceanIceEmulator.h 4 | ) 5 | -------------------------------------------------------------------------------- /src/soca/ModelBias/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | ModelBias.h 3 | ModelBiasIncrement.h 4 | ModelBiasCovariance.h 5 | ) -------------------------------------------------------------------------------- /src/soca/ModelBias/ModelBiasCovariance.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef SOCA_MODELBIAS_MODELBIASCOVARIANCE_H_ 9 | #define SOCA_MODELBIAS_MODELBIASCOVARIANCE_H_ 10 | 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | #include "eckit/config/LocalConfiguration.h" 17 | #include "oops/util/ObjectCounter.h" 18 | #include "oops/util/Printable.h" 19 | 20 | // Forward declarations 21 | namespace soca { 22 | class Geometry; 23 | class ModelBias; 24 | class ModelBiasIncrement; 25 | } 26 | 27 | // ----------------------------------------------------------------------------- 28 | 29 | namespace soca { 30 | 31 | class ModelBiasCovariance : public util::Printable, 32 | private boost::noncopyable, 33 | private util::ObjectCounter { 34 | public: 35 | static const std::string classname() {return "soca::ModelBiasCovariance";} 36 | 37 | /// Constructor, destructor 38 | ModelBiasCovariance(const eckit::Configuration & conf, 39 | const Geometry &): conf_(conf) {} 40 | ~ModelBiasCovariance() {} 41 | 42 | /// Linear algebra operators 43 | void linearize(const ModelBias &, const Geometry &) {} 44 | void multiply(const ModelBiasIncrement &, ModelBiasIncrement &) const {} 45 | void inverseMultiply(const ModelBiasIncrement &, 46 | ModelBiasIncrement &) const {} 47 | void randomize(ModelBiasIncrement &) const {} 48 | 49 | const eckit::Configuration & config() const {return conf_;} 50 | 51 | private: 52 | void print(std::ostream & os) const {} 53 | const eckit::LocalConfiguration conf_; 54 | }; 55 | 56 | // ----------------------------------------------------------------------------- 57 | 58 | } // namespace soca 59 | 60 | #endif // SOCA_MODELBIAS_MODELBIASCOVARIANCE_H_ 61 | -------------------------------------------------------------------------------- /src/soca/ModelData/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | ModelData.h 3 | ) -------------------------------------------------------------------------------- /src/soca/ModelData/ModelData.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2023-2023 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include "eckit/config/LocalConfiguration.h" 13 | #include "oops/base/Variables.h" 14 | #include "oops/util/Printable.h" 15 | 16 | namespace soca { 17 | class Geometry; 18 | } 19 | 20 | // ----------------------------------------------------------------------------- 21 | 22 | namespace soca { 23 | 24 | class ModelData : public util::Printable { 25 | public: 26 | static const std::string classname() {return "soca::ModelData";} 27 | static const oops::Variables defaultVariables() { 28 | return oops::Variables(std::vector({"skin_temperature_at_surface_where_sea", 29 | "sea_water_potential_temperature", "sea_water_salinity", "sea_water_cell_thickness", 30 | "sea_surface_height_above_geoid", "sea_ice_area_fraction", 31 | "sea_ice_thickness", "Carbon_nitrogen_detritus_concentration", 32 | "Particulate_inorganic_carbon", "colored_dissolved_organic_carbon", 33 | "diatom_concentration", "chlorophyte_concentration", "cyano-bacteria_concentration", 34 | "coccolithophore_concentration", "dinoflagellate_concentration", 35 | "phaeocystis_concentration", 36 | // atmospheric variables that will be removed later 37 | "ozone_thickness", "water_vapor", "relative_humidity", 38 | "cloud_area_fraction_in_atmosphere_layer", "cloud_liquid_water_path", 39 | "aerosol_optical_thickness", "single_scattering_albedo", "asymmetry_parameter"})); 40 | } 41 | 42 | explicit ModelData(const Geometry &) {} 43 | ~ModelData() {} 44 | 45 | const eckit::LocalConfiguration modelData() const {return eckit::LocalConfiguration();} 46 | 47 | private: 48 | void print(std::ostream & os) const {} 49 | }; 50 | 51 | // ----------------------------------------------------------------------------- 52 | 53 | } // namespace soca 54 | -------------------------------------------------------------------------------- /src/soca/ObsLocalization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | ObsLocRossby.cc 3 | ObsLocRossby.h 4 | ObsLocRossbyParameters.h 5 | ) -------------------------------------------------------------------------------- /src/soca/ObsLocalization/CPPLINT.cfg: -------------------------------------------------------------------------------- 1 | filter=-runtime/references -------------------------------------------------------------------------------- /src/soca/ObsLocalization/ObsLocRossby.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/ObsLocalization/ObsLocRossby.h" 9 | #include "soca/Traits.h" 10 | 11 | #include "oops/base/ObsLocalizationBase.h" 12 | #include "ufo/ObsTraits.h" 13 | 14 | 15 | namespace soca { 16 | 17 | static oops::ObsLocalizationMaker< soca::Traits, ufo::ObsTraits, 18 | soca::ObsLocRossby> obslocrossby_("Rossby"); 19 | 20 | } // namespace soca 21 | -------------------------------------------------------------------------------- /src/soca/ObsLocalization/ObsLocRossbyParameters.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef SOCA_OBSLOCALIZATION_OBSLOCROSSBYPARAMETERS_H_ 9 | #define SOCA_OBSLOCALIZATION_OBSLOCROSSBYPARAMETERS_H_ 10 | 11 | #include "ufo/obslocalization/ObsHorLocParameters.h" 12 | 13 | namespace soca { 14 | 15 | class ObsLocRossbyParameters : public ufo::ObsHorLocParameters { 16 | OOPS_CONCRETE_PARAMETERS(ObsLocRossbyParameters, ufo::ObsHorLocParameters) 17 | 18 | public: 19 | oops::Parameter base{"base value", 0.0, this}; 20 | oops::Parameter mult{"rossby mult", 1.0, this}; 21 | oops::Parameter min_grid{"min grid mult", 1.0, this}; 22 | oops::OptionalParameter min{"min value", this}; 23 | oops::OptionalParameter max{"max value", this}; 24 | }; 25 | 26 | } // namespace soca 27 | #endif // SOCA_OBSLOCALIZATION_OBSLOCROSSBYPARAMETERS_H_ 28 | -------------------------------------------------------------------------------- /src/soca/SaberBlocks/BkgErrFilt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | BkgErrFilt.cc 3 | BkgErrFilt.h 4 | ) -------------------------------------------------------------------------------- /src/soca/SaberBlocks/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(BkgErrFilt) 2 | add_subdirectory(ParametricOceanStdDev) -------------------------------------------------------------------------------- /src/soca/SaberBlocks/ParametricOceanStdDev/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | ParametricOceanStdDev.cc 3 | ParametricOceanStdDev.h 4 | ) -------------------------------------------------------------------------------- /src/soca/SaberBlocks/README.md: -------------------------------------------------------------------------------- 1 | Everything in this folder SHOULD be generalized and moved into the SABER repo.... someday. 2 | 3 | Except The BkgErrFilt... I'm not sure we really need that one. Delete.... someday? -------------------------------------------------------------------------------- /src/soca/State/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | soca_state_mod.F90 3 | soca_state.interface.F90 4 | soca_state.reg.F90 5 | State.cc 6 | State.h 7 | StateFortran.h 8 | ) -------------------------------------------------------------------------------- /src/soca/State/StateFortran.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2020-2024 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef SOCA_STATE_STATEFORTRAN_H_ 9 | #define SOCA_STATE_STATEFORTRAN_H_ 10 | 11 | #include "soca/Fortran.h" 12 | 13 | #include "oops/base/Variables.h" 14 | 15 | // Forward declarations 16 | namespace eckit { 17 | class Configuration; 18 | } 19 | 20 | namespace util { 21 | class DateTime; 22 | } 23 | 24 | namespace soca { 25 | 26 | extern "C" { 27 | void soca_state_create_f90(F90flds &, const F90geom &, 28 | const oops::Variables &, 29 | const atlas::field::FieldSetImpl *); 30 | void soca_state_delete_f90(F90flds &); 31 | void soca_state_read_file_f90(const F90flds &, 32 | const eckit::Configuration * const &, 33 | util::DateTime * const *); 34 | void soca_state_write_file_f90(const F90flds &, 35 | const eckit::Configuration * const &, 36 | const util::DateTime * const *); 37 | void soca_state_tohgrid_f90(const F90flds &); 38 | void soca_state_analytic_f90(const F90flds &, 39 | const eckit::Configuration * const &, 40 | util::DateTime * const *); 41 | void soca_state_update_fields_f90(const F90flds &, const oops::Variables &); 42 | } 43 | } // namespace soca 44 | #endif // SOCA_STATE_STATEFORTRAN_H_ 45 | -------------------------------------------------------------------------------- /src/soca/State/soca_state.reg.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 2020-2021 UCAR 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | 6 | !> registry for soca_state_mod::soca_state instances for use in 7 | !! Fortran/C++ interfaces of soca_state_mod_c 8 | module soca_state_reg 9 | 10 | use soca_state_mod 11 | 12 | implicit none 13 | private 14 | 15 | !> Linked list interface - defines registry_t type 16 | #define LISTED_TYPE soca_state 17 | #include "oops/util/linkedList_i.f" 18 | 19 | !> Global registry for soca_state instances 20 | type(registry_t), public:: soca_state_registry 21 | 22 | ! ------------------------------------------------------------------------------ 23 | contains 24 | ! ------------------------------------------------------------------------------ 25 | 26 | !> Linked list implementation 27 | #include "oops/util/linkedList_c.f" 28 | 29 | end module soca_state_reg -------------------------------------------------------------------------------- /src/soca/State/soca_state_mod.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 2020-2024 UCAR 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | 6 | !> State fields 7 | module soca_state_mod 8 | 9 | ! soca modules 10 | use soca_fields_mod 11 | 12 | implicit none 13 | private 14 | 15 | !------------------------------------------------------------------------------- 16 | !> State fields. 17 | !! 18 | !! Any procedures that are shared with soca_increment are implemented 19 | !! in the soca_fields base class 20 | type, public, extends(soca_fields) :: soca_state 21 | 22 | end type 23 | 24 | end module 25 | -------------------------------------------------------------------------------- /src/soca/Traits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #ifndef SOCA_TRAITS_H_ 9 | #define SOCA_TRAITS_H_ 10 | 11 | #include 12 | 13 | #include "soca/Covariance/ErrorCovariance.h" 14 | #include "soca/Geometry/Geometry.h" 15 | #include "soca/GeometryIterator/GeometryIterator.h" 16 | #include "soca/Increment/Increment.h" 17 | #include "soca/LinearVariableChange/LinearVariableChange.h" 18 | #include "soca/ModelBias/ModelBias.h" 19 | #include "soca/ModelBias/ModelBiasCovariance.h" 20 | #include "soca/ModelBias/ModelBiasIncrement.h" 21 | #include "soca/ModelData/ModelData.h" 22 | #include "soca/State/State.h" 23 | #include "soca/VariableChange/VariableChange.h" 24 | 25 | namespace soca { 26 | 27 | /** 28 | * \brief The main traits structure for SOCA. 29 | * 30 | * This structure is responsible for supplying SOCA specific code to the JEDI 31 | * applications within \ref src/mains directory. 32 | */ 33 | struct Traits { 34 | static std::string name() {return "SOCA";} 35 | static std::string nameCovar() {return "SocaError";} 36 | 37 | typedef soca::Geometry Geometry; 38 | typedef soca::GeometryIterator GeometryIterator; 39 | typedef soca::State State; 40 | typedef soca::Increment Increment; 41 | typedef soca::ErrorCovariance Covariance; // Not actually used, just empty stubs 42 | 43 | typedef soca::ModelBias ModelAuxControl; 44 | typedef soca::ModelBiasIncrement ModelAuxIncrement; 45 | typedef soca::ModelBiasCovariance ModelAuxCovariance; 46 | 47 | typedef soca::LinearVariableChange LinearVariableChange; 48 | typedef soca::VariableChange VariableChange; 49 | typedef soca::ModelData ModelData; 50 | }; 51 | 52 | } // namespace soca 53 | 54 | #endif // SOCA_TRAITS_H_ 55 | -------------------------------------------------------------------------------- /src/soca/Utils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | OceanSmoother.cc 3 | OceanSmoother.h 4 | readNcAndInterp.cc 5 | readNcAndInterp.h 6 | soca_utils.F90 7 | ) 8 | -------------------------------------------------------------------------------- /src/soca/Utils/readNcAndInterp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2024-2024 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | #pragma once 8 | 9 | #include 10 | #include 11 | 12 | #include "atlas/functionspace.h" 13 | 14 | namespace soca 15 | { 16 | 17 | /// @brief Read a netCDF file and interpolate the values to the destination atlas FunctionSpace. 18 | /// 19 | /// It is assumed that variables in the input file are all 1D, and that "latitude" and "longitude" 20 | /// variables are present in addition to the variables listed in `vars`. All 21 | /// resulting fields are 2D 22 | /// 23 | /// @param filename The name of the netCDF file to read. 24 | /// @param vars A list of variable names to read in and process 25 | /// @param dstFunctionSpace The destination atlas FunctionSpace that input variables are 26 | /// interpolated to. 27 | /// @return An atlas FieldSet with the interpolated fields. 28 | atlas::FieldSet readNcAndInterp( 29 | const std::string & filename, 30 | const std::vector & vars, 31 | const atlas::FunctionSpace & dstFunctionSpace); 32 | 33 | } // namespace soca 34 | 35 | -------------------------------------------------------------------------------- /src/soca/VariableChange/Base/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | VariableChangeBase.cc 3 | VariableChangeBase.h 4 | ) 5 | -------------------------------------------------------------------------------- /src/soca/VariableChange/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(Base) 2 | add_subdirectory(Model2Ana) 3 | add_subdirectory(Model2GeoVaLs) 4 | add_subdirectory(Soca2Cice) 5 | 6 | soca_target_sources( 7 | VariableChange.cc 8 | VariableChange.h 9 | ) 10 | -------------------------------------------------------------------------------- /src/soca/VariableChange/Model2Ana/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | Model2Ana.cc 3 | Model2Ana.h 4 | ) 5 | -------------------------------------------------------------------------------- /src/soca/VariableChange/Model2Ana/Model2Ana.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "eckit/config/Configuration.h" 15 | #include "oops/base/Variables.h" 16 | #include "soca/Geometry/Geometry.h" 17 | #include "soca/Traits.h" 18 | 19 | #include "soca/VariableChange/Base/VariableChangeBase.h" 20 | 21 | // Forward declarations 22 | namespace eckit { 23 | class Configuration; 24 | } 25 | 26 | namespace soca { 27 | class Geometry; 28 | class State; 29 | 30 | // ----------------------------------------------------------------------------- 31 | /// SOCA nonlinear change of variable 32 | 33 | class Model2Ana: public VariableChangeBase { 34 | public: 35 | const std::string classname() {return "soca::Model2Ana";} 36 | 37 | Model2Ana(const Geometry &, const eckit::Configuration &); 38 | ~Model2Ana(); 39 | 40 | void changeVar(const State &, State &) const override; 41 | void changeVarInverse(const State &, State &) const override; 42 | 43 | std::vector initRotate(const eckit::Configuration & conf, 44 | const std::string & uv) const 45 | { 46 | return conf.getStringVector("rotate."+uv); 47 | } 48 | bool initInterp(const eckit::Configuration & conf) const 49 | { 50 | return conf.getBool("interp", false); 51 | } 52 | std::vector initTrans(const eckit::Configuration & conf, 53 | const std::string & trvar) const 54 | { 55 | return conf.getStringVector("log."+trvar); 56 | } 57 | 58 | private: 59 | void print(std::ostream &) const override; 60 | const oops::Variables uvars_; 61 | const oops::Variables vvars_; 62 | const bool interp_; 63 | const oops::Variables logvars_; 64 | }; 65 | // ----------------------------------------------------------------------------- 66 | } // namespace soca 67 | -------------------------------------------------------------------------------- /src/soca/VariableChange/Model2GeoVaLs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | Model2GeoVaLs.cc 3 | Model2GeoVaLs.F90 4 | Model2GeoVaLs.h 5 | Model2GeoVaLsFortran.h 6 | ) 7 | -------------------------------------------------------------------------------- /src/soca/VariableChange/Model2GeoVaLs/Model2GeoVaLs.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/VariableChange/Model2GeoVaLs/Model2GeoVaLs.h" 9 | #include "soca/VariableChange/Model2GeoVaLs/Model2GeoVaLsFortran.h" 10 | 11 | #include "oops/util/abor1_cpp.h" 12 | #include "oops/util/Timer.h" 13 | 14 | namespace soca { 15 | 16 | // ----------------------------------------------------------------------------- 17 | 18 | static VariableChangeMaker 19 | makerVariableChangeModel2GeoVaLs_("Model2GeoVaLs"); 20 | 21 | static VariableChangeMaker 22 | makerVariableChangeDefault_("default"); 23 | 24 | // ----------------------------------------------------------------------------- 25 | 26 | Model2GeoVaLs::Model2GeoVaLs(const Geometry & geom, 27 | const eckit::Configuration & conf) 28 | : geom_(geom) { 29 | util::Timer timer("soca::Model2GeoVaLs", "Model2GeoVaLs"); 30 | } 31 | 32 | // ----------------------------------------------------------------------------- 33 | 34 | Model2GeoVaLs::~Model2GeoVaLs() {} 35 | 36 | // ----------------------------------------------------------------------------- 37 | 38 | void Model2GeoVaLs::changeVar(const State & xin, State & xout) const { 39 | util::Timer timer("soca::Model2GeoVaLs", "changeVar"); 40 | soca_model2geovals_changevar_f90(geom_.toFortran(), 41 | xin.toFortran(), xout.toFortran()); 42 | } 43 | 44 | // ----------------------------------------------------------------------------- 45 | 46 | void Model2GeoVaLs::changeVarInverse(const State &, State &) const { 47 | util::abor1_cpp("Model2GeoVaLs::changeVarInverse not implemented"); 48 | } 49 | 50 | // ----------------------------------------------------------------------------- 51 | 52 | } // namespace soca 53 | -------------------------------------------------------------------------------- /src/soca/VariableChange/Model2GeoVaLs/Model2GeoVaLs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | #include "soca/Traits.h" 14 | 15 | #include "soca/VariableChange/Base/VariableChangeBase.h" 16 | 17 | namespace soca { 18 | 19 | class Model2GeoVaLs: public VariableChangeBase { 20 | public: 21 | const std::string classname() {return "soca::Model2GeoVaLs";} 22 | 23 | Model2GeoVaLs(const Geometry &, const eckit::Configuration &); 24 | ~Model2GeoVaLs(); 25 | 26 | void changeVar(const State &, State &) const override; 27 | void changeVarInverse(const State &, State &) const override; 28 | 29 | private: 30 | const Geometry & geom_; 31 | void print(std::ostream &) const override {} 32 | }; 33 | 34 | } // namespace soca 35 | -------------------------------------------------------------------------------- /src/soca/VariableChange/Model2GeoVaLs/Model2GeoVaLsFortran.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | #pragma once 8 | 9 | #include "soca/Fortran.h" 10 | 11 | namespace soca { 12 | extern "C" { 13 | void soca_model2geovals_changevar_f90(const F90geom &, 14 | const F90flds &, 15 | F90flds &); 16 | } 17 | } // namespace soca 18 | -------------------------------------------------------------------------------- /src/soca/VariableChange/Soca2Cice/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | soca_target_sources( 2 | Soca2Cice.cc 3 | Soca2Cice.F90 4 | Soca2Cice.h 5 | Soca2CiceFortran.h 6 | soca_soca2cice_mod.F90 7 | soca_ciceutils_mod.F90 8 | ) 9 | -------------------------------------------------------------------------------- /src/soca/VariableChange/Soca2Cice/Soca2CiceFortran.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2022-2022 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | #pragma once 8 | 9 | #include "soca/Fortran.h" 10 | 11 | namespace soca { 12 | extern "C" { 13 | void soca_soca2cice_setup_f90(F90varchange &, 14 | const eckit::Configuration &, 15 | const F90geom &); 16 | void soca_soca2cice_changevar_f90(const F90varchange &, 17 | const F90geom &, 18 | const F90flds &, 19 | F90flds &); 20 | } 21 | } // namespace soca 22 | -------------------------------------------------------------------------------- /src/soca/VariableChange/VariableChange.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | #include "oops/util/parameters/Parameter.h" 17 | #include "oops/util/parameters/Parameters.h" 18 | #include "oops/util/Printable.h" 19 | 20 | #include "vader/vader.h" 21 | 22 | #include "soca/VariableChange/Base/VariableChangeBase.h" 23 | 24 | // Forward declarations 25 | namespace soca { 26 | class Geometry; 27 | class State; 28 | 29 | // ----------------------------------------------------------------------------- 30 | 31 | class VariableChangeParameters : public oops::Parameters { 32 | OOPS_CONCRETE_PARAMETERS(VariableChangeParameters, oops::Parameters) 33 | public: 34 | // Wrapper to VariableChange parameters 35 | VariableChangeParametersWrapper variableChangeParametersWrapper{this}; 36 | oops::Parameter vader{"vader", {}, this}; 37 | }; 38 | 39 | // ----------------------------------------------------------------------------- 40 | 41 | class VariableChange : public util::Printable { 42 | public: 43 | static const std::string classname() {return "soca::VariableChange";} 44 | 45 | typedef VariableChangeParameters Parameters_; 46 | 47 | explicit VariableChange(const eckit::Configuration &, const Geometry &); 48 | ~VariableChange(); 49 | 50 | void changeVar(State &, const oops::Variables &) const; 51 | void changeVarInverse(State &, const oops::Variables &) const; 52 | 53 | private: 54 | void print(std::ostream &) const override; 55 | std::unique_ptr variableChange_; 56 | std::unique_ptr vader_; 57 | }; 58 | 59 | // ----------------------------------------------------------------------------- 60 | 61 | } // namespace soca 62 | -------------------------------------------------------------------------------- /test/Data/36x17x25/input.nml: -------------------------------------------------------------------------------- 1 | &MOM_input_nml 2 | output_directory = './', 3 | input_filename = 'r' 4 | restart_input_dir = 'data_static/36x17x25/INPUT/', 5 | restart_output_dir = 'RESTART/', 6 | parameter_filename = 'data_static/36x17x25/MOM_input' / 7 | 8 | &diag_manager_nml 9 | / 10 | 11 | &ocean_solo_nml 12 | months = 0 13 | days = 1 14 | date_init = 2018,4,15,0,0,0, 15 | hours = 0 16 | minutes = 0 17 | seconds = 0 18 | calendar = 'NOLEAP' / 19 | 20 | &fms_io_nml 21 | max_files_w=100 22 | checksum_required=.false. 23 | / 24 | 25 | &fms_nml 26 | clock_grain='MODULE' 27 | domains_stack_size = 2000000 28 | clock_flags='SYNC' / 29 | -------------------------------------------------------------------------------- /test/Data/36x17x25/restarts/MOM.res.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3fe76ef21d6833bf53be9cc7ead470f6d1259546d8a72f5f147901d0409788fa 3 | size 2250931 4 | -------------------------------------------------------------------------------- /test/Data/36x17x25/restarts/cice.res.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ace48c166182b1989273f83acfbc81aab3805c0635b7febfc9a05bac3a5e4d72 3 | size 25614 4 | -------------------------------------------------------------------------------- /test/Data/36x17x25/restarts_ens/ocn.enspert.lowres.ens.1.2018-04-15T00:00:00Z.PT6H.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e0583f9aa170fe07b3e54b71d03525e6f84e0f3fdaf3e342af6337c71bc57c58 3 | size 246804 4 | -------------------------------------------------------------------------------- /test/Data/36x17x25/restarts_ens/ocn.enspert.lowres.ens.2.2018-04-15T00:00:00Z.PT6H.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c52cff067b6a81cf220f248a96b4ddae3438b9d9723adf54012c7a47da69bb02 3 | size 246800 4 | -------------------------------------------------------------------------------- /test/Data/36x17x25/restarts_ens/ocn.enspert.lowres.ens.3.2018-04-15T00:00:00Z.PT6H.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f9140aaa55c5c2eff89d15795dad89370e1831a7501196b452e401997d047f90 3 | size 246800 4 | -------------------------------------------------------------------------------- /test/Data/36x17x25/restarts_ens/ocn.enspert.lowres.ens.4.2018-04-15T00:00:00Z.PT6H.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f39dbbff306230c35c5b23fbd07a13c4e2f7fcd741182a1f34808dbc988483b3 3 | size 246800 4 | -------------------------------------------------------------------------------- /test/Data/36x17x25/restarts_ens/stddev.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:68b4f33fd7efc4c23419c01a9cb9cd5a3d8b6b7e576727161142ba085f01afc9 3 | size 246948 4 | -------------------------------------------------------------------------------- /test/Data/36x17x25/soca_gridspec.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e09b731b651d1198a2d4e2162f2a342588847548a0898eeb5decae2e1967be54 3 | size 215366 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/INPUT/forcing_daily.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:60ff6a424b548d0d364b96870b9ad29d9fbf13ec3e1d68bf5119efd18cb944a2 3 | size 275125 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/INPUT/forcing_monthly.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e193413c55451c9569536af0b635b78e595c9963880e4c17a5558a016dddb848 3 | size 50663 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/INPUT/grid_spec.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5654083780007038ea9040e42b0e1f5728d90c59dfcfb2c2d1fdaf14924408b3 3 | size 2064 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/INPUT/hycom1_25.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b8923f1f201db2dffbc16d36334fdf1e6bd1c81b5e1d9b964bfa6973014051c3 3 | size 6642 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/INPUT/layer_coord25.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:deaf6a3bc882933e8c9b0b472a1fac5f917005da8fb8596ebd167c66f0e6dc20 3 | size 745 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/INPUT/ocean_hgrid.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ab342d8f7d0e214ad09d4a32fe5daaca51e388f34c89086918a97e08243afd75 3 | size 74704 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/INPUT/ocean_mosaic.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4a045b89e5a38935f078d84fa42d9e74572cbc64df5a68188909fe2a115b216f 3 | size 18928 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/INPUT/ocean_topog.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:19941bfe750511b890af06c04b630d5d899fe11877f054ea7ac3dfaee64542d8 3 | size 22403 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/MOM_override_bgc: -------------------------------------------------------------------------------- 1 | ! Blank file in which we can put "overrides" for parameters specific to 2 | ! the biogeochemistry runs 3 | USE_generic_tracer = True 4 | !---------------------------------- 5 | 6 | -------------------------------------------------------------------------------- /test/Data/72x35x25/dcdt.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2949f60a5b5e6dc42b652480d694ab37c240c2ef7a3161eff738e38674e8e29a 3 | size 28352 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/history/cice_history.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:920bc941128c8ed156217c26e1562393a79e222aff52b52174af04d4527f396e 3 | size 145964 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/ice.bkgerror.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c235d271a9d1297e494f1395c671c178254cf9fbb54c9aba59a34b370796e4db 3 | size 46818 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/input.nml: -------------------------------------------------------------------------------- 1 | &MOM_input_nml 2 | output_directory = './', 3 | input_filename = 'r' 4 | restart_input_dir = 'data_static/72x35x25/restarts/', 5 | restart_output_dir = 'RESTART/', 6 | parameter_filename = 'data_static/72x35x25/MOM_input' 7 | / 8 | 9 | &diag_manager_nml 10 | / 11 | 12 | &ocean_solo_nml 13 | months = 0 14 | days = 1 15 | date_init = 2018,4,15,0,0,0, 16 | hours = 0 17 | minutes = 0 18 | seconds = 0 19 | calendar = 'NOLEAP' / 20 | 21 | &fms_io_nml 22 | max_files_w=100 23 | checksum_required=.false. 24 | / 25 | 26 | &fms_nml 27 | clock_grain='MODULE' 28 | domains_stack_size = 2000000 29 | clock_flags='SYNC' / 30 | -------------------------------------------------------------------------------- /test/Data/72x35x25/input_bgc.nml: -------------------------------------------------------------------------------- 1 | &MOM_input_nml 2 | output_directory = './', 3 | input_filename = 'r' 4 | restart_input_dir = 'data_static/72x35x25/restarts/', 5 | restart_output_dir = 'RESTART/', 6 | parameter_filename = 'data_static/72x35x25/MOM_input', 7 | 'data_static/72x35x25/MOM_override_bgc' / 8 | 9 | &diag_manager_nml 10 | / 11 | 12 | &ocean_solo_nml 13 | months = 0 14 | days = 1 15 | date_init = 2018,4,15,0,0,0, 16 | hours = 0 17 | minutes = 0 18 | seconds = 0 19 | calendar = 'NOLEAP' / 20 | 21 | &fms_io_nml 22 | max_files_w=100 23 | checksum_required=.false. 24 | / 25 | 26 | &fms_nml 27 | clock_grain='MODULE' 28 | domains_stack_size = 2000000 29 | clock_flags='SYNC' / 30 | 31 | &generic_tracer_nml 32 | do_generic_tracer=.true. 33 | do_generic_age=.false. 34 | do_generic_COBALT=.false. 35 | do_generic_BLING=.true. 36 | do_generic_miniBLING=.false. 37 | do_generic_TOPAZ=.false. 38 | force_update_fluxes=.true. / 39 | 40 | &generic_bling_nml 41 | do_carbon=.false. 42 | bury_caco3=.false. 43 | bury_pop=.false. 44 | co2_calc='mocsy' / 45 | -------------------------------------------------------------------------------- /test/Data/72x35x25/input_mom6solo.nml: -------------------------------------------------------------------------------- 1 | &MOM_input_nml 2 | output_directory = './', 3 | input_filename = 'r' 4 | restart_input_dir = 'RESTART_IN/', 5 | restart_output_dir = 'RESTART/', 6 | parameter_filename = 'data_static/72x35x25/MOM_input', 7 | 'MOM_override' / 8 | 9 | &diag_manager_nml 10 | / 11 | 12 | &ocean_solo_nml 13 | months = 0 14 | days = 0 15 | date_init = 2018,4,15,0,0,0, 16 | hours = 24 17 | minutes = 0 18 | seconds = 0 19 | calendar = 'NOLEAP' / 20 | 21 | &fms_io_nml 22 | max_files_w=100 23 | checksum_required=.false. 24 | / 25 | 26 | &fms_nml 27 | clock_grain='MODULE' 28 | domains_stack_size = 2000000 29 | clock_flags='SYNC' / 30 | -------------------------------------------------------------------------------- /test/Data/72x35x25/ocn.bkgerror.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4378eeaad225cfbc1160a9aa1bd19bbe0610c5718e0341517e8e18ac2a3163ce 3 | size 2042696 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts/MOM.res.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d4b96d2855decb6eeb05705ee01cd51db35529d969c3050601f98c4b12582c36 3 | size 8456693 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts/NOBM.res.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:88269ebabc6529e7f184accaee8c34589e68fa82a59dc6618943aaa2d8d72324 3 | size 8179083 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts/cice.res.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a36c9bf7e67d25a8f92a2c2caabc4492e91bbd11b6621a43f43910c19be00f0c 3 | size 61652 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts/gdas.ice.t12z.inst.f006.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:67d2a60a3327f32fcc3fdfe7351c79bef457b17fc97818ca6d3fe29cc1159fbf 3 | size 972760 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts/iced.2018-04-15-00000.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4d2c8dfea4bdd8acde87842dd10023821e9172ffa11c6f279111e18a20681196 3 | size 2239028 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts/sfc.res.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:deb1ca7432073bf3d647008b398e01d4ed902df66d2e246b5e3f7073e19ed527 3 | size 82221 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts/wav.res.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f5dd3f02fb35b919799717b092a19a33e8db51b2f8ba6151a14de7d660773ee6 3 | size 61248 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts_ens/MOM.res.ens.1.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:aa16f8d808152976edf34e951e0f540170b6326899dbf59a6e37aa82052ce5e5 3 | size 7085793 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts_ens/MOM.res.ens.2.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6d42e43a11b319acbd21c5c3172e10401406052101f1e0c7cb2de3858067e24d 3 | size 7081899 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts_ens/MOM.res.ens.3.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:066f8b37d9fbd902e0995f3dbb768d14ce1356a265c967875388d46a6177205c 3 | size 7083949 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts_ens/MOM.res.ens.4.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e34a855e381048103a5ff74cf1dd962bcc76d3d1c787a3e898546c2ce716d3bb 3 | size 7083128 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts_ens/cice.res.ens.1.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b16c50acd2ee08c7d48d02a030bdced576a5fbb804dc01f662aa47b4a014a094 3 | size 59400 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts_ens/cice.res.ens.2.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a4e8f4bfec75fcab5f5e3509d15370aa62fb4de4bb0c19c548043132fcab2cec 3 | size 59365 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts_ens/cice.res.ens.3.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:16dfa0bb178fe19f0c9b8fed58a8db58d8cddecca305527a6f69d583dd4bfb86 3 | size 59356 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/restarts_ens/cice.res.ens.4.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9300068d78280cdbfe3a51b096743d3cb8826e4b9d58d88d24c7c8a5c8027355 3 | size 59408 4 | -------------------------------------------------------------------------------- /test/Data/72x35x25/wav.bkgerror.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:feb874a72eeee2287602a0450840130017264ef71216972a300382c3645e82f5 3 | size 61448 4 | -------------------------------------------------------------------------------- /test/Data/godas_sst_bgerr.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b11ebef242443cb49310fd6b22a606f504d74c2589d9086ce55930ec68b5983a 3 | size 3745065 4 | -------------------------------------------------------------------------------- /test/Data/mlbalance/antarctic.pt: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:cc2292bfee6dc4d554bbd3ed5cb03cf8bffe4bf5b9ddb4dd356d274964e39dc3 3 | size 4797 4 | -------------------------------------------------------------------------------- /test/Data/mlbalance/arctic.pt: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a6c73262507d098ced38f58141a9fcd3e160df0f12cbac095e74daede476fda5 3 | size 4682 4 | -------------------------------------------------------------------------------- /test/Data/mlbalance/normalization.antarctic.pt: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c6a26ff65aeb5d9fcbcaba8d4457596741ef57d690f281e6e98252de54ef9d60 3 | size 2499 4 | -------------------------------------------------------------------------------- /test/Data/mlbalance/normalization.arctic.pt: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:7994b4cdd48603b658db9ef34f150120ed1889782c2ba7335658af258a77921c 3 | size 2408 4 | -------------------------------------------------------------------------------- /test/Data/oasim/abw25_morel.dat: -------------------------------------------------------------------------------- 1 | Spectral seawater absorption and total scattering coefficients in 2 | units of /m. Derived from Smith and Baker 1981 (200-300 nm), and 3 | (730-800 nm), Morel et al 2007 (325-475), Pope and Fry 1997 (500-720), 4 | Circio and Petty 1951 (800nm-2.5um), and Maul 1985 (2.5-4um). 5 | Format i5,f15.4,f10.4 6 | 250 0.6112 0.0567 7 | 325 0.0218 0.0162 8 | 350 0.0081 0.0117 9 | 375 0.0057 0.0089 10 | 400 0.0047 0.0069 11 | 425 0.0049 0.0054 12 | 450 0.0085 0.0043 13 | 475 0.0117 0.0034 14 | 500 0.0215 0.0029 15 | 525 0.0407 0.0023 16 | 550 0.0550 0.0019 17 | 575 0.0849 0.0016 18 | 600 0.1995 0.0014 19 | 625 0.2850 0.0012 20 | 650 0.3512 0.0009 21 | 675 0.4559 0.0007 22 | 700 0.6433 0.0007 23 | 725 1.4449 0.0006 24 | 775 2.3900 0.0004 25 | 850 3.7382 0.0002 26 | 950 27.4805 0.0000 27 | 1050 19.3470 0.0000 28 | 1150 67.1800 0.0000 29 | 1250 94.9976 0.0000 30 | 1350 363.1256 0.0000 31 | 1450 1118.6070 0.0000 32 | 1550 944.8757 0.0000 33 | 1650 519.5995 0.0000 34 | 1750 646.7179 0.0000 35 | 1900 3768.5610 0.0000 36 | 2200 2628.0830 0.0000 37 | 2900 437623.0000 0.0000 38 | 3700 1338404.0000 0.0000 39 | -------------------------------------------------------------------------------- /test/Data/oasim/pic_sigma.dat: -------------------------------------------------------------------------------- 1 | Coccolith backscattering cross section from Gordon et al., 2009 2 | Converted to m2/mol CaCO3 using the conversion in that paper =44.2 3 | Converted to m2/mgCaCO3 4 | Converted to scattering cross section using bbprime=0.015 from 5 | Balch et al. 1996 6 | 250 0.030449 7 | 325 0.029958 8 | 350 0.029712 9 | 375 0.029467 10 | 400 0.028976 11 | 425 0.027502 12 | 450 0.026029 13 | 475 0.024556 14 | 500 0.022591 15 | 525 0.019153 16 | 550 0.015716 17 | 575 0.013997 18 | 600 0.012278 19 | 625 0.011787 20 | 650 0.011296 21 | 675 0.011541 22 | 700 0.011787 23 | 725 0.012032 24 | 775 0.012278 25 | 850 0.012278 26 | 950 0.011050 27 | 1050 0.011050 28 | 1150 0.011050 29 | 1250 0.011050 30 | 1350 0.011050 31 | 1450 0.011050 32 | 1550 0.011050 33 | 1650 0.011050 34 | 1750 0.011050 35 | 1900 0.011050 36 | 2200 0.011050 37 | 2900 0.011050 38 | 3700 0.011050 39 | -------------------------------------------------------------------------------- /test/Data/oasim/slingo.dat: -------------------------------------------------------------------------------- 1 | Slingo's (1989; J. Atmos. Sci.) parameterization for cloud radiative 2 | effects. Given are: wavelength range (um), a, b, e, f, c, d. 3 | Format(2f5.2,3x,2f6.3,2f6.3,1pe9.2,1pe8.2) 4 | 0.25 0.30 3.094 1.252 0.844 1.558 7.90E-7 3.69E-7 5 | 0.30 0.33 2.944 1.270 0.841 1.680 -6.50E-7 4.33E-7 6 | 0.33 0.36 3.308 1.246 0.839 1.946 -3.00E-7 2.36E-7 7 | 0.36 0.40 2.801 1.293 0.836 2.153 1.00E-6 0.00E0 8 | 0.40 0.44 2.668 1.307 0.840 1.881 0.00E0 0.00E0 9 | 0.44 0.48 2.698 1.315 0.820 3.004 1.00E-6 0.00E0 10 | 0.48 0.52 2.672 1.320 0.828 2.467 0.00E0 0.00E0 11 | 0.52 0.57 2.838 1.300 0.825 2.776 0.00E0 0.00E0 12 | 0.57 0.64 2.831 1.317 0.828 2.492 -1.20E-6 4.00E-7 13 | 0.64 0.69 2.895 1.315 0.818 2.989 -1.20E-7 4.40E-7 14 | 0.69 0.75 3.115 1.244 0.804 3.520 -2.70E-7 1.40E-6 15 | 0.75 0.78 2.650 1.349 0.809 3.387 2.30E-6 1.70E-6 16 | 0.78 0.87 2.622 1.362 0.806 3.355 3.30E-6 2.80E-6 17 | 0.87 1.00 2.497 1.376 0.783 5.035 9.80E-6 2.10E-5 18 | 1.00 1.10 2.632 1.365 0.784 4.745 -4.60E-5 5.00E-5 19 | 1.10 1.19 2.589 1.385 0.780 4.989 -2.80E-5 8.00E-5 20 | 1.19 1.28 2.551 1.401 0.773 5.405 6.20E-5 2.60E-4 21 | 1.28 1.53 2.463 1.420 0.754 6.555 2.40E-4 8.56E-4 22 | 1.53 1.64 2.237 1.452 0.749 6.931 1.20E-4 6.67E-4 23 | 1.64 2.13 1.970 1.501 0.740 7.469 1.20E-3 2.16E-3 24 | 2.13 2.38 1.850 1.556 0.769 5.171 1.90E-4 2.54E-3 25 | 2.38 2.91 1.579 1.611 0.851 2.814 1.23E-1 9.35E-3 26 | 2.91 3.42 1.950 1.540 0.831 6.102 4.49E-1 1.54E-3 27 | 3.42 4.00 -1.023 1.933 0.726 6.652 2.50E-2 1.22E-2 28 | -------------------------------------------------------------------------------- /test/Data/obs/adt.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c398d7783b50b68ea54fe0059ebaee02a32d1c62eb974786d7be556a81258fd4 3 | size 17935 4 | -------------------------------------------------------------------------------- /test/Data/obs/biomass_p.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9d74463500fac78e33291631e3d50310257020e431a2c4d77eb7cd4304fd172e 3 | size 29583 4 | -------------------------------------------------------------------------------- /test/Data/obs/chl.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3a393678c3fd541c248952fbcca0a452029207eb154dd16b9012ebd4583b9ced 3 | size 20770 4 | -------------------------------------------------------------------------------- /test/Data/obs/gmi_gpm_geoval.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a1295d9fad2251ae8f5e0759799b50a95449d0d2bc0104d38de95d8e7d1fcd88 3 | size 158937 4 | -------------------------------------------------------------------------------- /test/Data/obs/gmi_gpm_obs.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2e1c55fe4a2a521df99cdcb9cb802737d03980648aba44bf1d1adc763fe74c5c 3 | size 75531 4 | -------------------------------------------------------------------------------- /test/Data/obs/icec.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2e8aa3975d112b0e183b481aa4c7b3fea9b2517c1567886ec4d188bc3d1547be 3 | size 17037 4 | -------------------------------------------------------------------------------- /test/Data/obs/icefb.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ef6b007498fd962f57d2cd6c33064e93eb4ede53a87c1249f9f95170af51ab31 3 | size 27975 4 | -------------------------------------------------------------------------------- /test/Data/obs/pace_radiance.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b881f3e7f3f5c824de932a149db4f77e7e91dd114a8c5b0aab716cae7e91f8d0 3 | size 150457 4 | -------------------------------------------------------------------------------- /test/Data/obs/prof.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d7ab3af72eb067f71d3a2f62dd950359256cc92f1a26174b16ce50147ebae1c2 3 | size 27183 4 | -------------------------------------------------------------------------------- /test/Data/obs/single_ob.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a380af3faedb48a8b1b70810c5b17e02ff47ec4f2f44646e9f1ceaed7dbaf05e 3 | size 31940 4 | -------------------------------------------------------------------------------- /test/Data/obs/sss.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ab167b9e62a61a899ee155864713fb9a7a2ac27d1ffb54949ae17ab28e2d0e01 3 | size 39254 4 | -------------------------------------------------------------------------------- /test/Data/obs/sst.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0b292f05db5f28155aa8a35e418b13d934ad7dac5f5f6292f98ec15e93986fba 3 | size 20155 4 | -------------------------------------------------------------------------------- /test/Data/obs/swh.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8960f25518082713199274d80a45bcf622a677f2a8378cc667c805be70ae1436 3 | size 23299 4 | -------------------------------------------------------------------------------- /test/Data/obs/uocn_surface.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4caa648e2a5d73d25fa79708947801205e7affd859295cac7b4c930dc194930c 3 | size 52024 4 | -------------------------------------------------------------------------------- /test/Data/obs/vocn_surface.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:22058d1c74c47ff1ac428b5cbafe56a2c9276eaa137a4195e8fb37f2d29e9a53 3 | size 52024 4 | -------------------------------------------------------------------------------- /test/Data/obs/zero_ob.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e1988acda7a58819a342e7a6df526dfb6aeb627c3631070b7cf06e975ee73608 3 | size 13141 4 | -------------------------------------------------------------------------------- /test/Data/rossrad.nc: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:28b85f7f8aeaa019bdcc8afef46a9cc9ad20dd979a4c22aa4921d86319f0a9b8 3 | size 517688 4 | -------------------------------------------------------------------------------- /test/Data/workdir/INPUT/grid_spec.nc: -------------------------------------------------------------------------------- 1 | ../../72x35x25/INPUT/grid_spec.nc -------------------------------------------------------------------------------- /test/Data/workdir/INPUT/ocean_mosaic.nc: -------------------------------------------------------------------------------- 1 | ../../72x35x25/INPUT/ocean_mosaic.nc -------------------------------------------------------------------------------- /test/Data/workdir/diag_table: -------------------------------------------------------------------------------- 1 | SOCA 2 | 1950 1 1 0 0 0 3 | -------------------------------------------------------------------------------- /test/Data/workdir/field_table: -------------------------------------------------------------------------------- 1 | "TRACER", "atmos_mod", "sphum" 2 | "longname", "specific humidity" 3 | "units", "kg/kg" / 4 | 5 | "TRACER", "land_mod", "sphum" 6 | "longname", "specific humidity" 7 | "units", "kg/kg" / -------------------------------------------------------------------------------- /test/create_dcdt.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import netCDF4 3 | import numpy as np 4 | 5 | # Invent the Ice/Ocean Jacobian: dc/dt 6 | ncf=netCDF4.Dataset("data_static/72x35x25/restarts/cice.res.nc",'r') 7 | aice_mask=ncf.variables['aicen'][:] 8 | ncf.close() 9 | dcdt=-0.01*np.ones((35,72))*aice_mask 10 | 11 | # TODO remove the following, not used for anything?? 12 | # # Convert the dirac output into a mask for the dynamic height balance 13 | # ncf=netCDF4.Dataset("data_generated/ocn.balance_mask.SocaError.an.2018-04-15T00:00:00Z.nc",'r') 14 | # kmask=ncf.variables['ave_ssh'][:] 15 | # ncf.close() 16 | # kmask[kmask<0.0]=0.0 17 | # kmask=1.0-kmask 18 | 19 | # Write to file 20 | ncf=netCDF4.Dataset("data_static/72x35x25/dcdt.nc",'w') 21 | nx=ncf.createDimension('xaxis_1',72) 22 | ny=ncf.createDimension('yaxis_1',35) 23 | v1=ncf.createVariable('dcdt','f8',('yaxis_1','xaxis_1')) 24 | # v2=ncf.createVariable('kmask','f8',('yaxis_1','xaxis_1')) 25 | v1[:]=dcdt 26 | # v2[:]=kmask 27 | ncf.close() 28 | -------------------------------------------------------------------------------- /test/executables/TestGeometry.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | #include "oops/runs/Run.h" 10 | #include "test/interface/Geometry.h" 11 | 12 | int main(int argc, char ** argv) { 13 | oops::Run run(argc, argv); 14 | test::Geometry tests; 15 | return run.execute(tests); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /test/executables/TestGeometryIterator.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2019-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | #include "oops/runs/Run.h" 10 | #include "test/interface/GeometryIterator.h" 11 | 12 | int main(int argc, char ** argv) { 13 | oops::Run run(argc, argv); 14 | test::GeometryIterator tests; 15 | return run.execute(tests); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /test/executables/TestGetValues.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2020-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | #include "oops/runs/Run.h" 10 | #include "test/interface/GetValues.h" 11 | #include "ufo/ObsTraits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | test::GetValues tests; 16 | return run.execute(tests); 17 | } 18 | -------------------------------------------------------------------------------- /test/executables/TestIncrement.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | #include "oops/runs/Run.h" 10 | #include "test/interface/Increment.h" 11 | 12 | int main(int argc, char ** argv) { 13 | oops::Run run(argc, argv); 14 | test::Increment tests; 15 | return run.execute(tests); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /test/executables/TestLinearGetValues.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2020-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | #include "oops/runs/Run.h" 10 | #include "test/interface/LinearGetValues.h" 11 | #include "ufo/ObsTraits.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | test::LinearGetValues tests; 16 | return run.execute(tests); 17 | } 18 | -------------------------------------------------------------------------------- /test/executables/TestLinearModel.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2025 NOAA/NWS/NCEP/EMC 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | #include "oops/runs/Run.h" 10 | #include "test/interface/LinearModel.h" 11 | #include "saber/oops/instantiateCovarFactory.h" 12 | 13 | int main(int argc, char ** argv) { 14 | oops::Run run(argc, argv); 15 | saber::instantiateCovarFactory(); 16 | test::LinearModel tests; 17 | return run.execute(tests); 18 | } 19 | -------------------------------------------------------------------------------- /test/executables/TestModelAuxControl.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | #include "oops/runs/Run.h" 10 | #include "test/interface/ModelAuxControl.h" 11 | 12 | int main(int argc, char ** argv) { 13 | oops::Run run(argc, argv); 14 | test::ModelAuxControl tests; 15 | return run.execute(tests); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /test/executables/TestNLVariableChange.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | #include "oops/runs/Run.h" 10 | #include "test/interface/VariableChange.h" 11 | 12 | int main(int argc, char ** argv) { 13 | oops::Run run(argc, argv); 14 | test::VariableChange tests; 15 | return run.execute(tests); 16 | } 17 | -------------------------------------------------------------------------------- /test/executables/TestObsLocalization.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | 10 | #include "oops/runs/Run.h" 11 | #include "test/interface/ObsLocalization.h" 12 | #include "ufo/instantiateObsLocFactory.h" 13 | #include "ufo/ObsTraits.h" 14 | 15 | int main(int argc, char ** argv) { 16 | oops::Run run(argc, argv); 17 | ufo::instantiateObsLocFactory(); 18 | test::ObsLocalization tests; 19 | return run.execute(tests); 20 | } 21 | -------------------------------------------------------------------------------- /test/executables/TestObsLocalizations.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2021-2021 UCAR 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | 10 | #include "oops/runs/Run.h" 11 | #include "test/base/ObsLocalizations.h" 12 | #include "ufo/instantiateObsLocFactory.h" 13 | #include "ufo/ObsTraits.h" 14 | 15 | int main(int argc, char ** argv) { 16 | oops::Run run(argc, argv); 17 | ufo::instantiateObsLocFactory(); 18 | test::ObsLocalizations tests; 19 | return run.execute(tests); 20 | } 21 | -------------------------------------------------------------------------------- /test/executables/TestState.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | #include "oops/runs/Run.h" 10 | #include "test/interface/State.h" 11 | 12 | int main(int argc, char ** argv) { 13 | oops::Run run(argc, argv); 14 | test::State tests; 15 | return run.execute(tests); 16 | } 17 | -------------------------------------------------------------------------------- /test/executables/TestVariableChange.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | #include "oops/runs/Run.h" 10 | #include "test/interface/LinearVariableChange.h" 11 | 12 | int main(int argc, char ** argv) { 13 | oops::Run run(argc, argv); 14 | test::LinearVariableChange tests; 15 | return run.execute(tests); 16 | } 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/executables/TestVariables.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2017-2021 UCAR. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | */ 7 | 8 | #include "soca/Traits.h" 9 | #include "oops/runs/Run.h" 10 | #include "test/interface/Variables.h" 11 | 12 | int main(int argc, char ** argv) { 13 | oops::Run run(argc, argv); 14 | test::Variables tests; 15 | return run.execute(tests); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /test/testinput/addincrement.yml: -------------------------------------------------------------------------------- 1 | state geometry: &geom 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | increment geometry: *geom 7 | 8 | state: 9 | read_from_file: 1 10 | basename: data_static/72x35x25/restarts/ 11 | ocn_filename: MOM.res.nc 12 | ice_filename: cice.res.nc 13 | sfc_filename: sfc.res.nc 14 | date: &bkg_date 2018-04-15T00:00:00Z 15 | state variables: 16 | - sea_ice_area_fraction 17 | - sea_ice_thickness 18 | - sea_ice_snow_thickness 19 | - sea_water_salinity 20 | - sea_water_potential_temperature 21 | - sea_surface_height_above_geoid 22 | - sea_water_cell_thickness 23 | - eastward_sea_water_velocity 24 | - northward_sea_water_velocity 25 | - ocean_mixed_layer_thickness 26 | - sea_water_depth 27 | 28 | increment: 29 | read_from_file: 1 30 | basename: data_generated/3dvar/ 31 | ocn_filename: ocn.3dvar.iter1.incr.2018-04-15T00:00:00Z.nc 32 | ice_filename: ice.3dvar.iter1.incr.2018-04-15T00:00:00Z.nc 33 | date: *bkg_date 34 | added variables: 35 | - sea_ice_snow_thickness 36 | - sea_water_salinity 37 | - sea_water_potential_temperature 38 | 39 | output: 40 | datadir: data_output/ 41 | exp: addincrement 42 | type: an 43 | 44 | test: 45 | reference filename: testref/addincrement.test 46 | test output filename: testoutput/addincrement.test 47 | float relative tolerance: 1e-5 48 | float absolute tolerance: 1e-5 -------------------------------------------------------------------------------- /test/testinput/checkpointmodel.yml: -------------------------------------------------------------------------------- 1 | resolution: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | model: 7 | name: MOM6solo # TODO application currently hard coded with MOM6solo 8 | tstep: PT6H 9 | advance_mom6: 0 10 | model variables: [socn, tocn, hocn] 11 | tocn_minmax: [-1.8, 32.0] 12 | socn_minmax: [0.1, 38.0] 13 | 14 | background: 15 | read_from_file: 1 16 | date: &date 2018-04-15T00:00:00Z 17 | basename: data_static/72x35x25/restarts/ 18 | ocn_filename: MOM.res.nc 19 | state variables: [socn, tocn, hocn] 20 | 21 | analysis: 22 | read_from_file: 1 23 | date: *date 24 | basename: data_generated/3dvar/ 25 | ocn_filename: ocn.3dvar.an.2018-04-15T00:00:00Z.nc 26 | state variables: [socn, tocn, hocn] 27 | 28 | test: 29 | reference filename: testref/checkpointmodel.test 30 | test output filename: testoutput/checkpointmodel.test -------------------------------------------------------------------------------- /test/testinput/convertincrement.yml: -------------------------------------------------------------------------------- 1 | input geometry: &geom 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | output geometry: *geom 7 | 8 | linear variable change: 9 | input variables: &soca_inc_vars 10 | - sea_water_potential_temperature 11 | - sea_water_salinity 12 | - sea_surface_height_above_geoid 13 | # - sea_water_cell_thickness 14 | output variables: *soca_inc_vars 15 | linear variable changes: 16 | - linear variable change name: BalanceSOCA 17 | kst: 18 | dsdtmax: 0.0 19 | dsdzmin: 0.0 20 | dtdzmin: 0.0 21 | nlayers: 2 22 | ksshts: 23 | nlayers: 2 24 | 25 | increments: 26 | - date: 2018-04-15T00:00:00Z 27 | input variables: *soca_inc_vars 28 | input: 29 | read_from_file: 1 30 | basename: data_generated/3dvar/ 31 | ocn_filename: ocn.3dvar.iter1.incr.2018-04-15T00:00:00Z.nc 32 | date: 2018-04-15T00:00:00Z 33 | state variables: 34 | - sea_surface_height_above_geoid 35 | - sea_water_potential_temperature 36 | - sea_water_salinity 37 | - sea_water_cell_thickness 38 | trajectory: 39 | read_from_file: 1 40 | basename: data_static/72x35x25/restarts/ 41 | ocn_filename: MOM.res.nc 42 | date: 2018-04-15T00:00:00Z 43 | state variables: &soca_bg_vars 44 | - sea_surface_height_above_geoid 45 | - sea_water_potential_temperature 46 | - sea_water_salinity 47 | - sea_water_cell_thickness 48 | - sea_water_depth 49 | - ocean_mixed_layer_thickness 50 | output: 51 | datadir: data_output/ 52 | exp: convertincrement 53 | type: incr 54 | date: 2018-04-15T00:00:00Z 55 | 56 | test: 57 | reference filename: testref/convertincrement.test 58 | test output filename: testoutput/convertincrement.test 59 | float relative tolerance: 1e-4 -------------------------------------------------------------------------------- /test/testinput/convertstate.yml: -------------------------------------------------------------------------------- 1 | input geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | output geometry: 7 | geom_grid_file: data_static/36x17x25/soca_gridspec.nc 8 | mom6_input_nml: data_static/36x17x25/input.nml 9 | fields metadata: data_static/fields_metadata.yml 10 | 11 | states: 12 | - input: 13 | read_from_file: 1 14 | basename: data_static/72x35x25/restarts/ 15 | ocn_filename: MOM.res.nc 16 | ice_filename: cice.res.nc 17 | sfc_filename: sfc.res.nc 18 | date: &bkg_date 2018-04-15T00:00:00Z 19 | # NOTE: you probably shouldn't use uocn and vocn for now until grid 20 | # de-staggering is implemented 21 | state variables: 22 | - sea_surface_height_above_geoid 23 | - sea_water_potential_temperature 24 | - sea_water_salinity 25 | - sea_water_cell_thickness 26 | - sea_ice_area_fraction 27 | - sea_water_depth 28 | 29 | output: 30 | datadir: data_output/ 31 | exp: convertstate 32 | type: fc 33 | date: *bkg_date 34 | 35 | test: 36 | reference filename: testref/convertstate.test 37 | test output filename: testoutput/convertstate.test 38 | float relative tolerance: 1e-4 39 | -------------------------------------------------------------------------------- /test/testinput/convertstate_changevar.yml: -------------------------------------------------------------------------------- 1 | input geometry: &geom 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | output geometry: *geom 7 | 8 | variable change: 9 | variable change name: Model2Ana 10 | do inverse: false 11 | rotate: 12 | u: [eastward_sea_water_velocity] 13 | v: [northward_sea_water_velocity] 14 | interp: true 15 | log: 16 | var: 17 | - sea_water_salinity 18 | - mass_concentration_of_chlorophyll_in_sea_water 19 | output variables: &soca_vars 20 | - sea_surface_height_above_geoid 21 | - sea_water_potential_temperature 22 | - sea_water_salinity 23 | - eastward_sea_water_velocity 24 | - northward_sea_water_velocity 25 | - sea_water_cell_thickness 26 | - sea_ice_area_fraction 27 | - mass_concentration_of_chlorophyll_in_sea_water 28 | - sea_water_depth 29 | 30 | states: 31 | - input: 32 | read_from_file: 1 33 | basename: data_static/72x35x25/restarts/ 34 | ocn_filename: MOM.res.nc 35 | ice_filename: cice.res.nc 36 | sfc_filename: sfc.res.nc 37 | date: &bkg_date 2018-04-15T00:00:00Z 38 | state variables: *soca_vars 39 | output: 40 | datadir: data_output/ 41 | exp: convertstate_changevar 42 | type: fc 43 | date: *bkg_date 44 | - input: 45 | read_from_file: 1 46 | basename: data_static/72x35x25/restarts/ 47 | ocn_filename: MOM.res.nc 48 | ice_filename: cice.res.nc 49 | sfc_filename: sfc.res.nc 50 | date: *bkg_date 51 | state variables: *soca_vars 52 | output: 53 | datadir: data_output/ 54 | exp: convertstate_changevar.dummy_member 55 | type: fc 56 | date: *bkg_date 57 | 58 | test: 59 | reference filename: testref/convertstate_changevar.test 60 | test output filename: testoutput/convertstate_changevar.test 61 | -------------------------------------------------------------------------------- /test/testinput/convertstate_soca2cice.yml: -------------------------------------------------------------------------------- 1 | input geometry: &geom 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | output geometry: *geom 7 | 8 | variable change: 9 | variable change name: Soca2Cice 10 | arctic: 11 | rescale prior: 12 | rescale: true 13 | antarctic: 14 | seaice edge: 0.15 15 | shuffle: true 16 | rescale prior: 17 | rescale: true 18 | min hice: 0.5 19 | min hsno: 0.1 20 | cice background state: 21 | restart: data_static/72x35x25/restarts/iced.2018-04-15-00000.nc 22 | ncat: 5 23 | ice_lev: 7 24 | sno_lev: 1 25 | cice output: 26 | restart: data_output/iced.2018-04-15-00000.nc 27 | output variables: &soca_vars 28 | - sea_water_potential_temperature 29 | - sea_water_salinity 30 | - sea_water_cell_thickness 31 | - sea_ice_area_fraction 32 | - sea_ice_thickness 33 | - sea_ice_snow_thickness 34 | 35 | states: 36 | - input: 37 | read_from_file: 1 38 | basename: data_generated/3dvar/ 39 | ocn_filename: ocn.3dvar.an.2018-04-15T00:00:00Z.nc 40 | ice_filename: ice.3dvar.an.2018-04-15T00:00:00Z.nc 41 | date: &bkg_date 2018-04-15T00:00:00Z 42 | state variables: *soca_vars 43 | output: 44 | datadir: data_output/ 45 | exp: soca2cice 46 | type: fc 47 | date: *bkg_date 48 | 49 | test: 50 | reference filename: testref/convertstate_soca2cice.test 51 | test output filename: testoutput/convertstate_soca2cice.test 52 | float relative tolerance: 1e-4 53 | -------------------------------------------------------------------------------- /test/testinput/diffstates.yml: -------------------------------------------------------------------------------- 1 | state geometry: &geom 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | increment geometry: *geom 7 | 8 | state1: 9 | read_from_file: 1 10 | basename: data_static/72x35x25/restarts/ 11 | ocn_filename: MOM.res.nc 12 | ice_filename: cice.res.nc 13 | sfc_filename: sfc.res.nc 14 | date: &bkg_date 2018-04-15T00:00:00Z 15 | state variables: &state_vars 16 | - sea_ice_area_fraction 17 | - sea_ice_thickness 18 | - sea_ice_snow_thickness 19 | - sea_water_salinity 20 | - sea_water_potential_temperature 21 | - sea_surface_height_above_geoid 22 | - sea_water_cell_thickness 23 | - eastward_sea_water_velocity 24 | - northward_sea_water_velocity 25 | 26 | state2: 27 | read_from_file: 1 28 | basename: data_static/72x35x25/restarts/ 29 | ocn_filename: MOM.res.nc 30 | ice_filename: cice.res.nc 31 | sfc_filename: sfc.res.nc 32 | date: *bkg_date 33 | state variables: *state_vars 34 | 35 | output: # state1 - state2 36 | datadir: data_output/ 37 | exp: diffstates 38 | type: an 39 | 40 | test: 41 | reference filename: testref/diffstates.test 42 | test output filename: testoutput/diffstates.test 43 | -------------------------------------------------------------------------------- /test/testinput/dirac_diffusion.yml: -------------------------------------------------------------------------------- 1 | geometry: &geom 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | background: 7 | read_from_file: 1 8 | basename: data_static/72x35x25/restarts/ 9 | date: &date 2018-04-15T00:00:00Z 10 | ocn_filename: MOM.res.nc 11 | ice_filename: cice.res.nc 12 | state variables: 13 | - sea_ice_area_fraction 14 | - sea_ice_thickness 15 | - sea_water_salinity 16 | - sea_water_potential_temperature 17 | - sea_surface_height_above_geoid 18 | - sea_water_cell_thickness 19 | - ocean_mixed_layer_thickness 20 | - sea_water_depth 21 | 22 | background error: 23 | covariance model: SABER 24 | adjoint test: true 25 | saber central block: 26 | saber block name: diffusion 27 | read: 28 | groups: 29 | - variables: 30 | - sea_water_potential_temperature 31 | - sea_water_salinity 32 | multivariate strategy: univariate # or duplicated, if dealing with localization instead 33 | # the default is "univariate" 34 | horizontal: 35 | filepath: data_generated/parameters_diffusion/hz_large 36 | vertical: 37 | levels: 25 38 | filepath: data_generated/parameters_diffusion/vt_5lvls 39 | - variables: [sea_surface_height_above_geoid] 40 | horizontal: 41 | filepath: data_generated/parameters_diffusion/hz_smaller 42 | 43 | dirac: 44 | ixdir: [1, 17, 51, 31, 51, 63, 81, 14, 16, 43] 45 | iydir: [8, 21, 16, 33, 29, 26, 16, 41, 5, 43] 46 | izdir: [1, 5, 1, 1, 1, 1, 1, 1, 1, 1] 47 | ifdir: [1, 1, 3, 2, 1, 1, 1, 4, 5, 5] 48 | 49 | output dirac: 50 | datadir: data_output/ 51 | date: *date 52 | exp: dirac_diffusion_%id% 53 | type: an 54 | 55 | test: 56 | reference filename: testref/dirac_diffusion.test 57 | test output filename: testoutput/dirac_diffusion.test 58 | float relative tolerance: 2e-5 59 | -------------------------------------------------------------------------------- /test/testinput/dirac_diffusion_lowres.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_static/36x17x25/soca_gridspec.nc 3 | mom6_input_nml: data_static/36x17x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | background: 7 | read_from_file: 1 8 | basename: data_static/36x17x25/restarts/ 9 | date: &date 2018-04-15T00:00:00Z 10 | ocn_filename: MOM.res.nc 11 | ice_filename: cice.res.nc 12 | state variables: 13 | - sea_ice_area_fraction 14 | - sea_ice_thickness 15 | - sea_water_salinity 16 | - sea_water_potential_temperature 17 | - sea_surface_height_above_geoid 18 | - sea_water_cell_thickness 19 | - ocean_mixed_layer_thickness 20 | - sea_water_depth 21 | 22 | background error: 23 | covariance model: SABER 24 | adjoint test: true 25 | saber central block: 26 | saber block name: diffusion 27 | read: 28 | groups: 29 | - variables: 30 | - sea_water_potential_temperature 31 | - sea_water_salinity 32 | multivariate strategy: univariate # or duplicated, if dealing with localization instead 33 | # the default is "univariate" 34 | horizontal: 35 | filepath: data_generated/parameters_diffusion_lowres/hz_smaller 36 | vertical: 37 | levels: 25 38 | filepath: data_generated/parameters_diffusion_lowres/vt_5lvls 39 | - variables: [sea_surface_height_above_geoid] 40 | horizontal: 41 | filepath: data_generated/parameters_diffusion_lowres/hz_smaller 42 | 43 | dirac: 44 | ixdir: [1, 9, 26, 16, 26, 32, 41, 7, 8, 22] 45 | iydir: [4, 11, 8, 17, 15, 13, 8, 21, 3, 22] 46 | izdir: [1, 5, 1, 1, 1, 1, 1, 1, 1, 1] 47 | ifdir: [1, 1, 3, 2, 1, 1, 1, 4, 5, 5] 48 | 49 | output dirac: 50 | datadir: data_output/ 51 | date: *date 52 | exp: dirac_diffusion_lowres_%id% 53 | type: an 54 | 55 | test: 56 | reference filename: testref/dirac_diffusion_lowres.test 57 | test output filename: testoutput/dirac_diffusion_lowres.test -------------------------------------------------------------------------------- /test/testinput/dirac_soca_cor_nicas_scales.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | background: 7 | read_from_file: 1 8 | basename: data_static/72x35x25/restarts/ 9 | date: &date 2018-04-15T00:00:00Z 10 | ocn_filename: MOM.res.nc 11 | ice_filename: cice.res.nc 12 | state variables: 13 | - sea_water_salinity 14 | - sea_water_potential_temperature 15 | - sea_surface_height_above_geoid 16 | - sea_water_cell_thickness 17 | - sea_ice_area_fraction 18 | - sea_ice_thickness 19 | 20 | background error: 21 | covariance model: SABER 22 | saber central block: 23 | saber block name: BUMP_NICAS 24 | read: 25 | io: 26 | data directory: data_generated/parameters_bump_cor_nicas_scales 27 | files prefix: bump 28 | drivers: 29 | multivariate strategy: univariate 30 | read local nicas: true 31 | grids: 32 | - model: 33 | variables: 34 | - sea_water_salinity 35 | - sea_water_potential_temperature 36 | - model: 37 | variables: 38 | - sea_surface_height_above_geoid 39 | - sea_ice_area_fraction 40 | - sea_ice_thickness 41 | 42 | dirac: 43 | ixdir: [1, 17, 41, 31, 51, 63, 81, 14, 16, 43] 44 | iydir: [8, 21, 19, 33, 29, 26, 16, 41, 5, 43] 45 | izdir: [1, 5, 1, 1, 1, 1, 1, 1, 1, 1] 46 | ifdir: [1, 1, 3, 2, 1, 1, 1, 4, 5, 5] 47 | 48 | output dirac: 49 | datadir: data_output/ 50 | date: *date 51 | exp: dirac_soca_cor_nicas_scales%id% 52 | type: an 53 | 54 | test: 55 | reference filename: testref/dirac_soca_cor_nicas_scales.test 56 | test output filename: testoutput/dirac_soca_cor_nicas_scales.test -------------------------------------------------------------------------------- /test/testinput/enshofx.yml: -------------------------------------------------------------------------------- 1 | files: 2 | - "testinput/enshofx_1.yml" 3 | - "testinput/enshofx_2.yml" 4 | - "testinput/enshofx_3.yml" 5 | 6 | test: 7 | reference filename: testref/enshofx.test 8 | test output filename: testoutput/enshofx.test -------------------------------------------------------------------------------- /test/testinput/ensmeanandvariance.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | _file: &_file 7 | read_from_file: 1 8 | date: &date_bkg 2018-04-15T00:00:00Z 9 | basename: data_static/72x35x25/ 10 | remap_filename: data_static/72x35x25/restarts/MOM.res.nc 11 | state variables: &soca_vars 12 | - sea_ice_area_fraction 13 | - sea_ice_thickness 14 | - sea_water_salinity 15 | - sea_water_potential_temperature 16 | - eastward_sea_water_velocity 17 | - northward_sea_water_velocity 18 | - sea_surface_height_above_geoid 19 | - sea_water_cell_thickness 20 | - ocean_mixed_layer_thickness 21 | - sea_water_depth 22 | 23 | ensemble: 24 | members: 25 | - <<: *_file 26 | ocn_filename: restarts_ens/MOM.res.ens.1.nc 27 | ice_filename: restarts_ens/cice.res.ens.1.nc 28 | - <<: *_file 29 | ocn_filename: restarts_ens/MOM.res.ens.2.nc 30 | ice_filename: restarts_ens/cice.res.ens.2.nc 31 | - <<: *_file 32 | ocn_filename: restarts_ens/MOM.res.ens.3.nc 33 | ice_filename: restarts_ens/cice.res.ens.3.nc 34 | - <<: *_file 35 | ocn_filename: restarts_ens/MOM.res.ens.4.nc 36 | ice_filename: restarts_ens/cice.res.ens.4.nc 37 | 38 | variance output: 39 | datadir: data_output/ 40 | exp: variance 41 | type: fc 42 | date: *date_bkg 43 | 44 | standard deviation output: 45 | datadir: data_output/ 46 | exp: stddev 47 | type: fc 48 | date: *date_bkg 49 | 50 | mean output: 51 | datadir: data_output/ 52 | exp: mean 53 | type: fc 54 | date: *date_bkg 55 | 56 | test: 57 | reference filename: testref/ensmeanandvariance.test 58 | test output filename: testoutput/ensmeanandvariance.test 59 | float relative tolerance: 1e-3 60 | -------------------------------------------------------------------------------- /test/testinput/ensrecenter.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | recenter variables: &vars 7 | - sea_ice_area_fraction 8 | - sea_ice_thickness 9 | - sea_water_salinity 10 | - sea_water_potential_temperature 11 | - eastward_sea_water_velocity 12 | - northward_sea_water_velocity 13 | - sea_surface_height_above_geoid 14 | - sea_water_cell_thickness 15 | 16 | center: 17 | read_from_file: 1 18 | date: &date_bkg 2018-04-15T00:00:00Z 19 | basename: data_static/72x35x25/ 20 | ocn_filename: restarts/MOM.res.nc 21 | ice_filename: restarts/cice.res.nc 22 | state variables: *vars 23 | 24 | ensemble: 25 | members from template: 26 | template: 27 | read_from_file: 1 28 | date: 2018-04-15T00:00:00Z 29 | basename: data_static/72x35x25/ 30 | remap_filename: data_static/72x35x25/restarts/MOM.res.nc 31 | ocn_filename: restarts_ens/MOM.res.ens.%mem%.nc 32 | ice_filename: restarts_ens/cice.res.ens.%mem%.nc 33 | state variables: *vars 34 | pattern: %mem% 35 | nmembers: 4 36 | 37 | recentered output: 38 | datadir: data_output/ 39 | exp: ensrecenter 40 | type: ens 41 | date: *date_bkg 42 | 43 | test: 44 | reference filename: testref/ensrecenter.test 45 | test output filename: testoutput/ensrecenter.test 46 | -------------------------------------------------------------------------------- /test/testinput/forecast_identity.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | model: 7 | name: Identity 8 | tstep: PT1H 9 | model variables: &soca_vars 10 | - sea_ice_area_fraction 11 | - sea_ice_thickness 12 | - sea_water_salinity 13 | - sea_water_potential_temperature 14 | - sea_surface_height_above_geoid 15 | - sea_water_cell_thickness 16 | - net_downwelling_shortwave_radiation 17 | - upward_latent_heat_flux_in_air 18 | - upward_sensible_heat_flux_in_air 19 | - net_downwelling_longwave_radiation 20 | - friction_velocity_over_water 21 | - mass_concentration_of_chlorophyll_in_sea_water 22 | 23 | initial condition: 24 | read_from_file: 1 25 | date: 2018-04-15T00:00:00Z 26 | basename: data_static/72x35x25/restarts/ 27 | ocn_filename: MOM.res.nc 28 | ice_filename: cice.res.nc 29 | sfc_filename: sfc.res.nc 30 | state variables: *soca_vars 31 | 32 | forecast length: PT6H 33 | 34 | output: 35 | frequency: PT6H 36 | datadir: data_output/ 37 | exp: forecast_identity 38 | date: 2018-04-15T00:00:00Z 39 | type: fc 40 | 41 | test: 42 | reference filename: testref/forecast_identity.test 43 | test output filename: testoutput/forecast_identity.test -------------------------------------------------------------------------------- /test/testinput/forecast_mom6.yml: -------------------------------------------------------------------------------- 1 | mom6_input_nml: data_static/72x35x25/input_mom6solo.nml 2 | forecast length: PT24H 3 | initial condition: 4 | date: 2018-04-15T00:00:00Z 5 | ocn_filename: data_static/72x35x25/restarts/MOM.res.nc 6 | output: 7 | frequency: PT6H 8 | exp: forecast_mom6 9 | datadir: data_output/ 10 | -------------------------------------------------------------------------------- /test/testinput/forecast_mom6_bgc.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input_bgc.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | model: 7 | name: MOM6solo 8 | tstep: PT1H 9 | advance_mom6: 1 10 | model variables: &vars [cicen, hicen, socn, tocn, ssh, hocn, uocn, vocn, sw, lhf, shf, lw, us, chl, biop] 11 | 12 | initial condition: 13 | read_from_file: 1 14 | date: &date 2018-04-15T00:00:00Z 15 | basename: data_static/72x35x25/restarts/ 16 | ocn_filename: MOM.res.nc 17 | ice_filename: cice.res.nc 18 | state variables: *vars 19 | 20 | forecast length: PT6H 21 | 22 | output: 23 | frequency: PT6H 24 | datadir: data_output/ 25 | exp: forecast_mom6_bgc 26 | date: *date 27 | type: fc 28 | 29 | test: 30 | reference filename: testref/forecast_mom6_bgc.test 31 | test output filename: testoutput/forecast_mom6_bgc.test -------------------------------------------------------------------------------- /test/testinput/forecast_mom6_ens1.yml: -------------------------------------------------------------------------------- 1 | mom6_input_nml: data_static/72x35x25/input_mom6solo.nml 2 | forecast length: PT24H 3 | initial condition: 4 | date: 2018-04-15T00:00:00Z 5 | ocn_filename: data_static/72x35x25/restarts_ens/MOM.res.ens.1.nc 6 | output: 7 | frequency: PT6H 8 | datadir: data_output/ 9 | exp: fcst_ens1 10 | -------------------------------------------------------------------------------- /test/testinput/forecast_mom6_ens2.yml: -------------------------------------------------------------------------------- 1 | mom6_input_nml: data_static/72x35x25/input_mom6solo.nml 2 | forecast length: PT24H 3 | initial condition: 4 | date: 2018-04-15T00:00:00Z 5 | ocn_filename: data_static/72x35x25/restarts_ens/MOM.res.ens.2.nc 6 | output: 7 | frequency: PT6H 8 | datadir: data_output/ 9 | exp: fcst_ens2 10 | -------------------------------------------------------------------------------- /test/testinput/forecast_mom6_ens3.yml: -------------------------------------------------------------------------------- 1 | mom6_input_nml: data_static/72x35x25/input_mom6solo.nml 2 | forecast length: PT24H 3 | initial condition: 4 | date: 2018-04-15T00:00:00Z 5 | ocn_filename: data_static/72x35x25/restarts_ens/MOM.res.ens.3.nc 6 | output: 7 | frequency: PT6H 8 | datadir: data_output/ 9 | exp: fcst_ens3 10 | -------------------------------------------------------------------------------- /test/testinput/forecast_oceaniceemulator.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | model: 7 | name: ModelOceanIceEmulator 8 | tstep: PT1H 9 | model variables: &soca_vars 10 | - sea_ice_area_fraction 11 | - sea_surface_height_above_geoid 12 | 13 | initial condition: 14 | read_from_file: 1 15 | date: 2018-04-15T00:00:00Z 16 | basename: data_static/72x35x25/restarts/ 17 | ocn_filename: MOM.res.nc 18 | ice_filename: cice.res.nc 19 | sfc_filename: sfc.res.nc 20 | state variables: *soca_vars 21 | 22 | forecast length: PT6H 23 | 24 | output: 25 | frequency: PT6H 26 | datadir: data_output/ 27 | exp: forecast_oceaniceemulator 28 | date: 2018-04-15T00:00:00Z 29 | type: fc 30 | 31 | #test: 32 | # reference filename: testref/forecast_identity.test 33 | # test output filename: testoutput/forecast_identity.test -------------------------------------------------------------------------------- /test/testinput/forecast_pseudo.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | model: 7 | name: PseudoModel 8 | tstep: PT6H 9 | states: 10 | - date: 2018-04-15T06:00:00Z 11 | basename: data_generated/forecast_mom6/ 12 | ocn_filename: ocn.forecast_mom6.fc.2018-04-15T00:00:00Z.PT6H.nc 13 | read_from_file: 1 14 | - date: 2018-04-15T12:00:00Z 15 | basename: data_generated/forecast_mom6/ 16 | ocn_filename: ocn.forecast_mom6.fc.2018-04-15T00:00:00Z.PT12H.nc 17 | read_from_file: 1 18 | - date: 2018-04-15T18:00:00Z 19 | basename: data_generated/forecast_mom6/ 20 | ocn_filename: ocn.forecast_mom6.fc.2018-04-15T00:00:00Z.PT18H.nc 21 | read_from_file: 1 22 | - date: 2018-04-16T00:00:00Z 23 | basename: data_generated/forecast_mom6/ 24 | ocn_filename: ocn.forecast_mom6.fc.2018-04-15T00:00:00Z.PT24H.nc 25 | read_from_file: 1 26 | 27 | initial condition: 28 | read_from_file: 1 29 | date: &date 2018-04-15T00:00:00Z 30 | basename: data_static/72x35x25/restarts/ 31 | ocn_filename: MOM.res.nc 32 | state variables: 33 | - sea_water_salinity 34 | - sea_water_potential_temperature 35 | - sea_surface_height_above_geoid 36 | - sea_water_cell_thickness 37 | - eastward_sea_water_velocity 38 | - northward_sea_water_velocity 39 | 40 | forecast length: PT24H 41 | 42 | output: 43 | frequency: PT6H 44 | datadir: data_output/ 45 | exp: forecast_pseudo 46 | date: *date 47 | type: fc 48 | 49 | test: 50 | reference filename: testref/forecast_pseudo.test 51 | test output filename: testoutput/forecast_pseudo.test 52 | float absolute tolerance: 1e-4 53 | -------------------------------------------------------------------------------- /test/testinput/geometry.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | -------------------------------------------------------------------------------- /test/testinput/geometry_iterator_2d.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | iterator dimension: 2 6 | 7 | inc variables: 8 | - sea_ice_area_fraction 9 | - sea_ice_thickness 10 | - sea_water_salinity 11 | - sea_water_potential_temperature 12 | - eastward_sea_water_velocity 13 | - northward_sea_water_velocity 14 | - sea_surface_height_above_geoid 15 | 16 | increment test: 17 | date: &date 2018-04-15T00:00:00Z 18 | -------------------------------------------------------------------------------- /test/testinput/geometry_iterator_3d.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | iterator dimension: 3 6 | 7 | inc variables: [cicen, hicen, socn, tocn, uocn, vocn, ssh, hocn] 8 | 9 | increment test: 10 | date: &date 2018-04-15T00:00:00Z 11 | -------------------------------------------------------------------------------- /test/testinput/gridgen.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_output/soca_gridspec.72x35x25.nc 3 | save_local_domain: true 4 | mom6_input_nml: data_static/72x35x25/input.nml 5 | fields metadata: data_static/fields_metadata.yml 6 | rossby file: data_static/rossrad.nc 7 | 8 | # save the atlas mesh for viewing in gmsh 9 | gmsh save: true 10 | gmsh filename: data_output/gmsh.msh 11 | 12 | test: 13 | reference filename: testref/gridgen.test 14 | test output filename: testoutput/gridgen.test 15 | -------------------------------------------------------------------------------- /test/testinput/hofx_4d_oceaniceemulator.yml: -------------------------------------------------------------------------------- 1 | _date_begin: &date_begin 2018-04-15T00:00:00Z 2 | geometry: 3 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 4 | mom6_input_nml: data_static/72x35x25/input.nml 5 | fields metadata: data_static/fields_metadata.yml 6 | 7 | model: 8 | name: ModelOceanIceEmulator 9 | tstep: PT1H 10 | model variables: &soca_vars 11 | - sea_ice_area_fraction 12 | - sea_surface_height_above_geoid 13 | 14 | initial condition: 15 | read_from_file: 1 16 | date: *date_begin 17 | basename: data_static/72x35x25/restarts/ 18 | ocn_filename: MOM.res.nc 19 | ice_filename: cice.res.nc 20 | state variables: *soca_vars 21 | 22 | time window: 23 | begin: *date_begin 24 | length: PT24H 25 | forecast length: PT24H 26 | 27 | observations: 28 | observers: 29 | - obs space: 30 | name: ADT 31 | obsdataout: 32 | engine: 33 | type: H5File 34 | obsfile: data_output/adt.nc 35 | obsdatain: 36 | engine: 37 | type: H5File 38 | obsfile: data_static/obs/adt.nc 39 | simulated variables: [absoluteDynamicTopography] 40 | obs operator: 41 | name: ADT 42 | 43 | test: 44 | reference filename: testref/hofx_4d_oceaniceemulator.test 45 | test output filename: testoutput/hofx_4d_oceaniceemulator.out 46 | float relative tolerance: 1e-4 47 | float absolute tolerance: 1e-4 48 | -------------------------------------------------------------------------------- /test/testinput/hybridgain.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | _file: &_file 7 | read_from_file: 1 8 | date: &date_bkg 2018-04-15T00:00:00Z 9 | basename: data_static/72x35x25/ 10 | remap_filename: data_static/72x35x25/restarts/MOM.res.nc 11 | state variables: 12 | - sea_ice_area_fraction 13 | - sea_ice_thickness 14 | - sea_water_salinity 15 | - sea_water_potential_temperature 16 | - eastward_sea_water_velocity 17 | - northward_sea_water_velocity 18 | - sea_surface_height_above_geoid 19 | - sea_water_cell_thickness 20 | 21 | hybrid weights: 22 | control: 0.2 23 | ensemble: 0.8 24 | 25 | hybrid type: average analysis 26 | 27 | control: 28 | <<: *_file 29 | ocn_filename: restarts/MOM.res.nc 30 | ice_filename: restarts/cice.res.nc 31 | 32 | ensemble mean posterior: 33 | <<: *_file 34 | ocn_filename: restarts_ens/MOM.res.ens.1.nc 35 | ice_filename: restarts_ens/cice.res.ens.1.nc 36 | 37 | ensemble: 38 | - <<: *_file 39 | ocn_filename: restarts_ens/MOM.res.ens.1.nc 40 | ice_filename: restarts_ens/cice.res.ens.1.nc 41 | - <<: *_file 42 | ocn_filename: restarts_ens/MOM.res.ens.2.nc 43 | ice_filename: restarts_ens/cice.res.ens.2.nc 44 | - <<: *_file 45 | ocn_filename: restarts_ens/MOM.res.ens.3.nc 46 | ice_filename: restarts_ens/cice.res.ens.3.nc 47 | - <<: *_file 48 | ocn_filename: restarts_ens/MOM.res.ens.4.nc 49 | ice_filename: restarts_ens/cice.res.ens.4.nc 50 | 51 | recentered output: 52 | datadir: data_output/ 53 | exp: hybridgain 54 | type: ens 55 | date: *date_bkg 56 | 57 | test: 58 | reference filename: testref/hybridgain.test 59 | test output filename: testoutput/hybridgain.test -------------------------------------------------------------------------------- /test/testinput/increment.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | other geometry: 7 | geom_grid_file: data_static/36x17x25/soca_gridspec.nc 8 | mom6_input_nml: data_static/36x17x25/input.nml 9 | fields metadata: data_static/fields_metadata.yml 10 | 11 | inc variables: 12 | - sea_ice_thickness 13 | - sea_water_salinity 14 | - sea_water_potential_temperature 15 | - eastward_sea_water_velocity 16 | - northward_sea_water_velocity 17 | - sea_surface_height_above_geoid 18 | - mass_concentration_of_chlorophyll_in_sea_water 19 | - molar_concentration_of_biomass_in_sea_water_in_p_units 20 | - net_downwelling_shortwave_radiation 21 | - net_downwelling_longwave_radiation 22 | - upward_latent_heat_flux_in_air 23 | - upward_sensible_heat_flux_in_air 24 | - friction_velocity_over_water 25 | 26 | increment test: 27 | tolerance AD resolution change: 1.0e-12 28 | date: &date 2018-04-15T00:00:00Z 29 | skip rms by level test: true 30 | dirac: 31 | ixdir: [1] 32 | iydir: [8] 33 | izdir: [1] 34 | ifdir: [1] 35 | -------------------------------------------------------------------------------- /test/testinput/linearmodel_oceaniceemulator.yml: -------------------------------------------------------------------------------- 1 | analysis variables: 2 | - sea_ice_area_fraction 3 | - sea_surface_height_above_geoid 4 | 5 | background error: 6 | covariance model: SABER 7 | saber central block: 8 | saber block name: ID 9 | 10 | geometry: 11 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 12 | mom6_input_nml: data_static/72x35x25/input.nml 13 | fields metadata: data_static/fields_metadata.yml 14 | 15 | linear model: 16 | name: LinearModelOceanIceEmulator 17 | tstep: PT1H 18 | model variables: 19 | - sea_ice_area_fraction 20 | - sea_surface_height_above_geoid 21 | trajectory: 22 | model variables: 23 | - sea_ice_area_fraction 24 | - sea_surface_height_above_geoid 25 | 26 | linear model test: 27 | forecast length: PT3H 28 | tstep: PT1H 29 | first multiplier TL: 1.e-11 30 | iterations TL: 1 31 | tolerance AD: 2.0e-11 32 | tolerance TL: 1.0 33 | tolerance zero length forecast: 0.08 34 | 35 | model: 36 | name: ModelOceanIceEmulator 37 | tstep: PT1H 38 | model variables: 39 | - sea_ice_area_fraction 40 | - sea_surface_height_above_geoid 41 | 42 | model aux control: null 43 | 44 | initial condition: 45 | read_from_file: 1 46 | date: 2018-04-15T00:00:00Z 47 | basename: data_static/72x35x25/restarts/ 48 | ocn_filename: MOM.res.nc 49 | ice_filename: cice.res.nc 50 | sfc_filename: sfc.res.nc 51 | state variables: 52 | - sea_ice_area_fraction 53 | - sea_surface_height_above_geoid 54 | -------------------------------------------------------------------------------- /test/testinput/makeobs.yml: -------------------------------------------------------------------------------- 1 | forecast length: PT3H 2 | 3 | time window: 4 | begin: 2018-04-15T00:00:00Z 5 | length: PT3H 6 | 7 | geometry: 8 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 9 | mom6_input_nml: data_static/72x35x25/input.nml 10 | fields metadata: data_static/fields_metadata.yml 11 | 12 | model: 13 | name: Identity # could also do PseudoModel, if you wanted 14 | tstep: PT1H 15 | model variables: &soca_vars 16 | - sea_ice_area_fraction 17 | - sea_ice_thickness 18 | - sea_water_salinity 19 | - sea_water_potential_temperature 20 | - sea_surface_height_above_geoid 21 | - sea_water_cell_thickness 22 | - net_downwelling_shortwave_radiation 23 | - upward_latent_heat_flux_in_air 24 | - upward_sensible_heat_flux_in_air 25 | - net_downwelling_longwave_radiation 26 | - friction_velocity_over_water 27 | 28 | initial condition: 29 | read_from_file: 1 30 | date: 2018-04-15T00:00:00Z 31 | basename: data_static/72x35x25/restarts/ 32 | ocn_filename: MOM.res.nc 33 | ice_filename: cice.res.nc 34 | state variables: *soca_vars 35 | 36 | observations: 37 | observers: 38 | - obs space: 39 | name: InsituTemperature 40 | obsdataout: 41 | engine: 42 | type: H5File 43 | obsfile: data_output/prof.nc 44 | obsdatain: 45 | engine: 46 | type: H5File 47 | obsfile: data_static/obs/prof.nc 48 | simulated variables: [waterTemperature] 49 | obs operator: 50 | name: InsituTemperature 51 | obs error: 52 | covariance model: diagonal 53 | 54 | make obs: true 55 | 56 | test: 57 | reference filename: testref/makeobs.test 58 | test output filename: testoutput/makeobs.test 59 | -------------------------------------------------------------------------------- /test/testinput/model.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | model aux control: {} 7 | 8 | model test: 9 | forecast length: PT6H 10 | final norm: 387790.95408760040299967 11 | tolerance: 1e-12 12 | test reforecast: false 13 | 14 | model: 15 | name: MOM6solo 16 | tstep: PT1H 17 | advance_mom6: 1 18 | # TODO issues with ustar/us changing after a forecast of len=0 19 | # model variables: &soca_vars [cicen, hicen, socn, tocn, ssh, hocn, sw, lhf, shf, lw, us, mld, layer_depth] 20 | model variables: &soca_vars [cicen, hicen, socn, tocn, ssh, hocn, sw, lhf, shf, lw, mld, layer_depth] 21 | 22 | initial condition: 23 | read_from_file: 1 24 | date: &date 2018-04-15T00:00:00Z 25 | basename: data_static/72x35x25/restarts/ 26 | ocn_filename: MOM.res.nc 27 | ice_filename: cice.res.nc 28 | sfc_filename: sfc.res.nc 29 | state variables: *soca_vars 30 | 31 | output: 32 | frequency: PT3H 33 | datadir: Data 34 | exp: example 35 | date: *date 36 | type: fc 37 | -------------------------------------------------------------------------------- /test/testinput/obslocalizations.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_static/36x17x25/soca_gridspec.nc 3 | mom6_input_nml: data_static/36x17x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | iterator dimension: 2 6 | 7 | time window: 8 | begin: 2018-04-14T00:00:00Z 9 | end: 2018-04-16T00:00:00Z 10 | 11 | observations: 12 | - obs space: 13 | name: 'BoxCar' 14 | distribution: 15 | name: InefficientDistribution 16 | simulated variables: ['waterTemperature'] 17 | obsdatain: 18 | engine: 19 | type: H5File 20 | obsfile: data_static/obs/prof.nc 21 | obs localizations: 22 | - localization method: Horizontal Box car 23 | lengthscale: 3000e3 24 | ## NOTE: vertical localization is disabled until the 3d geometry iterator is revived 25 | # - localization method: Vertical localization 26 | # vertical lengthscale: 100 27 | # ioda vertical coordinate: depth 28 | # ioda vertical coordinate group: MetaData 29 | # localization function: Box Car 30 | 31 | observation localizations reference: 32 | gridpoints: 33 | lons: [-165.0, -175.0, -175.0] 34 | lats: [ 0.0, -40.0, 0.0] 35 | depths: [-99999, -99999, -99999] 36 | # depths: [0.0, 34.2859952, 0.0] 37 | # local nobs: [28, 0, 17] 38 | local nobs: [66, 0, 49] 39 | rms: [1.0, 1.0, 1.0] 40 | print iterator: false 41 | 42 | -------------------------------------------------------------------------------- /test/testinput/obsop_name_map.yml: -------------------------------------------------------------------------------- 1 | variable maps: 2 | - name: depthBelowWaterSurface 3 | alias: ocean_depth 4 | - name: waterTemperature 5 | alias: sea_water_temperature 6 | - name: seaSurfaceTemperature 7 | alias: sea_surface_temperature 8 | - name: salinity 9 | alias: sea_water_salinity 10 | - name: seaSurfaceSalinity 11 | alias: sea_surface_salinity 12 | - name: seaIceFraction 13 | alias: sea_ice_area_fraction 14 | - name: waterSurfaceZonalVelocity 15 | alias: surface_eastward_sea_water_velocity 16 | - name: waterSurfaceMeridionalVelocity 17 | alias: surface_northward_sea_water_velocity 18 | - name: seaSurfaceChlorophyllMassConcentration 19 | alias: sea_surface_chlorophyll 20 | - name: oceanSurfaceBiomassContent 21 | alias: sea_surface_biomass_in_p_units 22 | - name: waveHeightSignificant 23 | alias: sea_surface_wave_significant_height -------------------------------------------------------------------------------- /test/testinput/oceanSmoother.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | state: 7 | date: 2018-04-15T00:00:00Z 8 | read_from_file: 1 9 | basename: data_static/72x35x25/restarts/ 10 | ocn_filename: MOM.res.nc 11 | state variables: 12 | - sea_water_potential_temperature 13 | - sea_water_salinity 14 | - sea_surface_height_above_geoid 15 | - sea_water_cell_thickness 16 | - ocean_mixed_layer_thickness 17 | - sea_water_depth 18 | 19 | oceanSmoother: 20 | # note that all scales here are Gaussian sigmas 21 | horizontal: 22 | rossby mult: 3 23 | min grid mult: 2.0 24 | max: 300e3 25 | 26 | vertical: 27 | use mld: true 28 | mld smooth: true 29 | save diagnostics: 30 | filepath: data_output/smoother_diag 31 | 32 | 33 | output: 34 | datadir: data_output 35 | exp: oceanSmoother 36 | type: incr 37 | 38 | test: 39 | reference filename: testref/oceanSmoother.test 40 | test output filename: testoutput/oceanSmoother.test -------------------------------------------------------------------------------- /test/testinput/parameters_bump_loc.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | background: 7 | read_from_file: 1 8 | basename: data_static/72x35x25/restarts/ 9 | date: &date 2018-04-15T06:00:00Z 10 | ocn_filename: MOM.res.nc 11 | ice_filename: cice.res.nc 12 | state variables: &stateVariables 13 | - sea_ice_area_fraction 14 | - sea_ice_thickness 15 | - sea_ice_snow_thickness 16 | - sea_water_salinity 17 | - sea_water_potential_temperature 18 | - eastward_sea_water_velocity 19 | - northward_sea_water_velocity 20 | - sea_surface_height_above_geoid 21 | 22 | background error: 23 | covariance model: SABER 24 | saber central block: 25 | saber block name: BUMP_NICAS 26 | calibration: 27 | io: 28 | data directory: data_output/ 29 | files prefix: soca_bump_loc 30 | drivers: 31 | multivariate strategy: duplicated 32 | compute nicas: true 33 | write local nicas: true 34 | nicas: 35 | resolution: 6.0 36 | explicit length-scales: true 37 | horizontal length-scale: 38 | - groups: 39 | - common 40 | value: 2500000.0 41 | vertical length-scale: 42 | - groups: 43 | - common 44 | value: 500 45 | grids: 46 | - model: 47 | variables: *stateVariables 48 | 49 | test: 50 | reference filename: testref/parameters_bump_loc.test 51 | test output filename: testoutput/parameters_bump_loc.test -------------------------------------------------------------------------------- /test/testinput/parameters_diffusion.yml: -------------------------------------------------------------------------------- 1 | geometry: &geom 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | background: 7 | read_from_file: 1 8 | basename: data_static/72x35x25/restarts/ 9 | date: &date 2018-04-15T06:00:00Z 10 | ocn_filename: MOM.res.nc 11 | state variables: 12 | - sea_water_salinity 13 | - sea_water_potential_temperature 14 | - eastward_sea_water_velocity 15 | - northward_sea_water_velocity 16 | - sea_surface_height_above_geoid 17 | 18 | background error: 19 | covariance model: SABER 20 | saber central block: 21 | saber block name: diffusion 22 | calibration: 23 | normalization: 24 | iterations: 1000 #< in the real world you'll want to use 1e4 or so 25 | groups: 26 | - horizontal: 27 | model file: 28 | date: *date 29 | basename: data_generated/setcorscales/ 30 | ocn_filename: ocn.cor_rh.incr.2018-04-15T00:00:00Z.nc 31 | model variable: sea_surface_height_above_geoid 32 | write: 33 | filepath: data_output/hz_large 34 | - horizontal: 35 | fixed value: 840336.134453782 36 | mask: "interp_mask" 37 | as gaussian: true 38 | write: 39 | filepath: data_output/hz_smaller 40 | - vertical: 41 | fixed value: 5.0 42 | levels: 25 43 | mask: "interp_mask" 44 | as gaussian: true 45 | write: 46 | filepath: data_output/vt_5lvls 47 | -------------------------------------------------------------------------------- /test/testinput/parameters_diffusion_lowres.yml: -------------------------------------------------------------------------------- 1 | geometry: &geom 2 | geom_grid_file: data_static/36x17x25/soca_gridspec.nc 3 | mom6_input_nml: data_static/36x17x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | background: 7 | read_from_file: 1 8 | basename: data_static/36x17x25/restarts/ 9 | date: &date 2018-04-15T06:00:00Z 10 | ocn_filename: MOM.res.nc 11 | state variables: 12 | - sea_water_salinity 13 | - sea_water_potential_temperature 14 | - eastward_sea_water_velocity 15 | - northward_sea_water_velocity 16 | - sea_surface_height_above_geoid 17 | 18 | background error: 19 | covariance model: SABER 20 | saber central block: 21 | saber block name: diffusion 22 | calibration: 23 | normalization: 24 | iterations: 1000 #< in the real world you'll want to use 1e4 or so 25 | groups: 26 | # NOTE this is different from the high resolution case because I don't 27 | # want to bother generating a new scale file for low res 28 | # - horizontal: 29 | # model file: 30 | # date: *date 31 | # basename: data_generated/setcorscales/ 32 | # ocn_filename: ocn.cor_rh.incr.2018-04-15T00:00:00Z.nc 33 | # model variable: ssh 34 | # write: 35 | # filepath: data_output/hz_large 36 | - horizontal: 37 | fixed value: 840336.134453782 38 | mask: "interp_mask" 39 | as gaussian: true 40 | write: 41 | filepath: data_output/hz_smaller 42 | - vertical: 43 | fixed value: 5.0 44 | levels: 25 45 | mask: "interp_mask" 46 | as gaussian: true 47 | write: 48 | filepath: data_output/vt_5lvls 49 | 50 | -------------------------------------------------------------------------------- /test/testinput/parametric_stddev.yml: -------------------------------------------------------------------------------- 1 | input geometry: &geom 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | output geometry: *geom 7 | 8 | linear variable change: 9 | input variables: &soca_vars 10 | - sea_water_potential_temperature 11 | - sea_water_salinity 12 | - sea_surface_height_above_geoid 13 | - sea_water_cell_thickness 14 | output variables: *soca_vars 15 | linear variable changes: 16 | 17 | - linear variable change name: BkgErrGODAS 18 | sst_bgerr_file: data_static/godas_sst_bgerr.nc 19 | t_min: 0.1 20 | t_max: 2.0 21 | t_dz: 20.0 22 | t_efold: 500.0 23 | s_min: 0.0 24 | s_max: 0.25 25 | ssh_min: 0.0 # value at EQ 26 | ssh_max: 0.1 # value in Extratropics 27 | ssh_phi_ex: 20 # lat of transition from extratropics 28 | cicen_min: 0.1 29 | cicen_max: 0.5 30 | hicen_min: 10.0 31 | hicen_max: 100.0 32 | 33 | increments: 34 | - date: 2018-04-15T00:00:00Z 35 | input variables: *soca_vars 36 | input: 37 | Identity: 1 38 | date: 2018-04-15T00:00:00Z 39 | state variables: *soca_vars 40 | trajectory: 41 | read_from_file: 1 42 | basename: data_static/72x35x25/restarts/ 43 | ocn_filename: MOM.res.nc 44 | date: 2018-04-15T00:00:00Z 45 | state variables: 46 | - sea_surface_height_above_geoid 47 | - sea_water_potential_temperature 48 | - sea_water_salinity 49 | - sea_water_cell_thickness 50 | - sea_water_depth 51 | - ocean_mixed_layer_thickness 52 | 53 | output: 54 | datadir: data_output/ 55 | exp: parametric_stddev 56 | type: incr 57 | date: 2018-04-15T00:00:00Z 58 | 59 | test: 60 | reference filename: testref/parametric_stddev.test 61 | test output filename: testoutput/parametric_stddev.test 62 | -------------------------------------------------------------------------------- /test/testinput/setcorscales.yml: -------------------------------------------------------------------------------- 1 | resolution: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | date: 2018-04-15T00:00:00Z 7 | 8 | corr variables: 9 | - sea_water_salinity 10 | - sea_water_potential_temperature 11 | - eastward_sea_water_velocity 12 | - northward_sea_water_velocity 13 | - sea_surface_height_above_geoid 14 | - sea_ice_area_fraction 15 | - sea_ice_thickness 16 | 17 | #islands: 18 | # scale: 1000.0 # in kilometers 19 | # lat: [35.24, 35.639, 32.288] 20 | # lon: [-75.55, -75.477, -64.74] 21 | 22 | scales: 23 | vert layers: 100 # in units of layer 24 | sea_water_salinity: 25 | rossby mult: 40.0 26 | min grid mult: 5.0 27 | sea_water_potential_temperature: 28 | rossby mult: 30.0 29 | min grid mult: 6.0 30 | eastward_sea_water_velocity: 31 | rossby mult: 30.0 32 | min grid mult: 6.0 33 | northward_sea_water_velocity: 34 | rossby mult: 30.0 35 | min grid mult: 6.0 36 | sea_surface_height_above_geoid: 37 | rossby mult: 20.0 38 | min grid mult: 7.0 39 | sea_ice_area_fraction: 40 | rossby mult: 0.0 41 | min grid mult: 8.0 42 | min value: 1000000 43 | sea_ice_thickness: 44 | rossby mult: 0.0 45 | min grid mult: 9.0 46 | min value: 5000000 47 | 48 | rh output: 49 | datadir: data_output/ 50 | exp: cor_rh 51 | type: incr 52 | 53 | rv output: 54 | datadir: data_output/ 55 | exp: cor_rv 56 | type: incr 57 | 58 | test: 59 | reference filename: testref/setcorscales.test 60 | test output filename: testoutput/setcorscales.test 61 | float relative tolerance: 2e-5 62 | -------------------------------------------------------------------------------- /test/testinput/state.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | state test: 7 | statefile: 8 | read_from_file: 1 9 | date: &date 2018-04-15T00:00:00Z 10 | basename: data_static/72x35x25/restarts/ 11 | ocn_filename: MOM.res.nc 12 | ice_filename: cice.res.nc 13 | sfc_filename: sfc.res.nc 14 | state variables: &soca_vars 15 | - sea_ice_area_fraction 16 | - sea_ice_thickness 17 | - sea_water_salinity 18 | - sea_water_potential_temperature 19 | - eastward_sea_water_velocity 20 | - northward_sea_water_velocity 21 | - sea_surface_height_above_geoid 22 | - sea_water_cell_thickness 23 | - net_downwelling_shortwave_radiation 24 | - upward_latent_heat_flux_in_air 25 | - upward_sensible_heat_flux_in_air 26 | - net_downwelling_longwave_radiation 27 | - friction_velocity_over_water 28 | - ocean_mixed_layer_thickness 29 | - sea_water_depth 30 | remap_filename: data_static/72x35x25/restarts/MOM.res.nc 31 | 32 | state generate: 33 | analytic init: 34 | method: 'soca_ana_init' 35 | 36 | date: *date 37 | state variables: *soca_vars 38 | 39 | norm file: 387790.8913881866 40 | norm generated state: 359.03266600533954 41 | 42 | date: *date 43 | tolerance: 1.0e-08 44 | construct to variables: *soca_vars 45 | -------------------------------------------------------------------------------- /test/testinput/state_moreice.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata_moreice.yml 5 | 6 | state test: 7 | statefile: 8 | read_from_file: 1 9 | date: &date 2018-04-15T00:00:00Z 10 | #basename: /home/gvernier/sandboxes/jedi-bundle/soca/test/Data/72x35x25/bkg/ 11 | basename: /home/gvernier/data/bkg/ 12 | ocn_filename: gdas.ocean.t12z.inst.f006.nc 13 | ice_filename: gdas.ice.t12z.inst.f006.nc 14 | state variables: &soca_vars [socn, tocn, uocn, vocn, ssh, hocn, mld, layer_depth, cicen, hicen, hsnon, aice1_h] 15 | remap_filename: data_static/72x35x25/restarts/MOM.res.nc 16 | 17 | state generate: 18 | analytic init: 19 | method: 'soca_ana_init' 20 | 21 | date: *date 22 | state variables: *soca_vars 23 | 24 | norm file: 403962.11061534827 25 | norm generated state: 461.45212959352813 26 | 27 | date: *date 28 | tolerance: 1.0e-08 29 | construct to variables: *soca_vars 30 | -------------------------------------------------------------------------------- /test/testinput/train_mlbalance.yml: -------------------------------------------------------------------------------- 1 | ffnn: 2 | inputSize: 7 3 | outputSize: 1 4 | hiddenSize: 2 5 | 6 | training: 7 | epochs: 10000 8 | cice history: "data_static/72x35x25/history/cice_history.nc" 9 | model output: "data_output/mlbalance.pt" 10 | 11 | domain: 12 | pole: north 13 | clean data: true 14 | -------------------------------------------------------------------------------- /test/testinput/varchange_ana2model.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | variable change tests: 7 | - variable change: 8 | variable change name: Model2Ana 9 | rotate: 10 | u: [eastward_sea_water_velocity] 11 | v: [northward_sea_water_velocity] 12 | log: 13 | var: 14 | - sea_water_salinity 15 | - mass_concentration_of_chlorophyll_in_sea_water 16 | output variables: &soca_vars 17 | - sea_ice_area_fraction 18 | - sea_water_potential_temperature 19 | - sea_water_salinity 20 | - sea_water_cell_thickness 21 | - eastward_sea_water_velocity 22 | - northward_sea_water_velocity 23 | - mass_concentration_of_chlorophyll_in_sea_water 24 | state: 25 | read_from_file: 1 26 | date: 2018-04-15T00:00:00Z 27 | basename: data_static/72x35x25/restarts/ 28 | ocn_filename: MOM.res.nc 29 | ice_filename: cice.res.nc 30 | state variables: *soca_vars 31 | tolerance inverse: 1e-8 32 | -------------------------------------------------------------------------------- /test/testinput/varchange_balance.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | 7 | background: 8 | read_from_file: 1 9 | date: 2018-04-15T00:00:00Z 10 | basename: data_static/72x35x25/restarts/ 11 | ocn_filename: MOM.res.nc 12 | ice_filename: cice.res.nc 13 | state variables: &soca_vars 14 | - sea_ice_area_fraction 15 | - sea_ice_thickness 16 | - sea_water_salinity 17 | - sea_water_potential_temperature 18 | - eastward_sea_water_velocity 19 | - northward_sea_water_velocity 20 | - sea_surface_height_above_geoid 21 | - sea_water_cell_thickness 22 | - ocean_mixed_layer_thickness 23 | - sea_water_depth 24 | 25 | linear variable change tests: 26 | - tolerance inverse: 1e-12 27 | test inverse: 1 28 | linear variable change: 29 | input variables: &soca_an_vars 30 | # - sea_ice_area_fraction 31 | # - sea_ice_thickness 32 | - sea_water_salinity 33 | - sea_water_potential_temperature 34 | # - eastward_sea_water_velocity 35 | # - northward_sea_water_velocity 36 | - sea_surface_height_above_geoid 37 | output variables: *soca_an_vars 38 | linear variable changes: 39 | - linear variable change name: BalanceSOCA 40 | kst: 41 | dsdtmax: 1.0 42 | dsdzmin: 3.0e-3 43 | dtdzmin: 1.0e-3 44 | nlayers: 10 45 | ksshts: 46 | nlayers: 10 47 | dcdt: 48 | filename: data_static/72x35x25/dcdt.nc 49 | name: dcdt 50 | -------------------------------------------------------------------------------- /test/testinput/varchange_balance_TSSSH.yml: -------------------------------------------------------------------------------- 1 | geometry: 2 | geom_grid_file: data_generated/gridgen/soca_gridspec.72x35x25.nc 3 | mom6_input_nml: data_static/72x35x25/input.nml 4 | fields metadata: data_static/fields_metadata.yml 5 | 6 | background: 7 | read_from_file: 1 8 | date: 2018-04-15T00:00:00Z 9 | basename: data_static/72x35x25/restarts/ 10 | ocn_filename: MOM.res.nc 11 | state variables: 12 | - sea_water_salinity 13 | - sea_water_potential_temperature 14 | - sea_surface_height_above_geoid 15 | - sea_water_cell_thickness 16 | - ocean_mixed_layer_thickness 17 | - sea_water_depth 18 | 19 | linear variable change tests: 20 | - tolerance inverse: 1e-12 21 | test inverse: 1 22 | linear variable change: 23 | input variables: &soca_an_vars 24 | - sea_water_salinity 25 | - sea_water_potential_temperature 26 | - sea_surface_height_above_geoid 27 | output variables: *soca_an_vars 28 | linear variable changes: 29 | - linear variable change name: BalanceSOCA 30 | kst: 31 | dsdtmax: 1.0 32 | dsdzmin: 3.0e-3 33 | dtdzmin: 1.0e-3 34 | nlayers: 10 35 | ksshts: 36 | nlayers: 10 37 | 38 | -------------------------------------------------------------------------------- /test/testref/3dhybfgat_pseudo.test: -------------------------------------------------------------------------------- 1 | CostJb : Nonlinear Jb = 0.0000000000000000e+00 2 | CostJo : Nonlinear Jo(ADT) = 2.2476814235841482e+02, nobs = 99, Jo/n = 2.2703852763476244e+00, err = 1.0000000149011613e-01 3 | CostFunction: Nonlinear J = 2.2476814235841482e+02 4 | RPCGMinimizer: reduction in residual norm = 1.3279821542958451e-02 5 | CostFunction::addIncrement: Analysis: 6 | Valid time: 2018-04-15T12:00:00Z 7 | sea_ice_area_fraction min=-0.0055436533627182 max=1.0000887718458058 mean=0.1175402973460810 8 | sea_ice_thickness min=-0.2231845811459730 max=4.0326713728872239 mean=0.4658857474068551 9 | sea_water_salinity min=10.7132817362146326 max=40.4416122444350350 mean=34.5582482935720563 10 | eastward_sea_water_velocity min=-0.8226354883602678 max=0.6737206737669789 mean=-0.0001433749781897 11 | northward_sea_water_velocity min=-0.9645802473946695 max=0.9240992002698506 mean=0.0002003563361414 12 | sea_water_potential_temperature min=-1.8651223187175390 max=31.8538874655882509 mean=6.0227102746676389 13 | sea_surface_height_above_geoid min=-2.1133324246109306 max=0.8957710504752534 mean=-0.2984314032216557 14 | sea_water_cell_thickness min=0.0009999999999977 max=1345.6400000000007822 mean=128.6278147393432505 15 | ocean_mixed_layer_thickness min=2.2805545996611403 max=4593.1693891607183104 mean=191.0555656854947131 16 | sea_water_depth min=2.2805545996611403 max=5658.3062783710120129 mean=1200.5220907214948056 17 | 18 | 19 | 20 | CostJb : Nonlinear Jb = 6.4429683342020123 21 | CostJo : Nonlinear Jo(ADT) = 113.2961818352593468, nobs = 99, Jo/n = 1.1444058771238317, err = 0.1000000014901161 22 | CostFunction: Nonlinear J = 119.7391501694613538 23 | -------------------------------------------------------------------------------- /test/testref/3dvar_diffmlb.test: -------------------------------------------------------------------------------- 1 | CostJb : Nonlinear Jb = 0.0000000000000000e+00 2 | CostJo : Nonlinear Jo(SeaIceFraction) = 5.9780675099388782e+02, nobs = 89, Jo/n = 6.7169297864481781e+00, err = 1.0000000149011612e-01 3 | CostFunction: Nonlinear J = 5.9780675099388782e+02 4 | RPCGMinimizer: reduction in residual norm = 6.9578333084327329e-02 5 | CostFunction::addIncrement: Analysis: 6 | Valid time: 2018-04-15T00:00:00Z 7 | sea_ice_area_fraction min=-0.1036522281921659 max=1.5890707917345379 mean=0.1770510723993644 8 | sea_ice_thickness min=-0.0001516309943195 max=4.0319498634926729 mean=0.4765411500997312 9 | sea_ice_snow_thickness min=-0.2868864405725090 max=1.2926802129154602 mean=0.0725973325096385 10 | snow_ice_surface_temperature min=-11.8000000000000007 max=0.0000000000000000 mean=-2.9751257610129023 11 | air_temperature min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 12 | bulk_ice_salinity min=0.0000000000000000 max=5.0000000000000000 mean=4.4124371194935357 13 | sea_water_salinity min=10.7210460395083924 max=40.4416591897031168 mean=34.5442658885472085 14 | sea_water_potential_temperature min=-2.1878887257523498 max=31.7004645720657692 mean=6.0124666456320730 15 | sea_surface_height_above_geoid min=-1.9244847628277935 max=0.9272826517867588 mean=-0.2767903423591662 16 | sea_water_cell_thickness min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642064969300 17 | ocean_mixed_layer_thickness min=2.2854716757984130 max=4593.1533423819937525 mean=192.4109073940401515 18 | sea_water_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.5229536158342398 19 | 20 | 21 | 22 | CostJb : Nonlinear Jb = 1.3323617471985911 23 | CostJo : Nonlinear Jo(SeaIceFraction) = 36.2017471888988069, nobs = 89, Jo/n = 0.4067612043696495, err = 0.1000000014901161 24 | CostFunction: Nonlinear J = 37.5341089360973967 25 | -------------------------------------------------------------------------------- /test/testref/3dvar_single_ob.test: -------------------------------------------------------------------------------- 1 | CostJb : Nonlinear Jb = 0.0000000000000000e+00 2 | CostJo : Nonlinear Jo(SeaSurfaceTemp) = 2.3781317697932968e+09, nobs = 1, Jo/n = 2.3781317697932968e+09, err = 2.9000000722589903e-05 3 | CostFunction: Nonlinear J = 2.3781317697932968e+09 4 | RPCGMinimizer: reduction in residual norm = 2.0050958797774292e-16 5 | CostFunction::addIncrement: Analysis: 6 | Valid time: 2018-04-15T00:00:00Z 7 | cicen min=0.0000000000000000 max=1.0000000000000000 mean=0.1175125761012928 8 | hicen min=0.0000000000000000 max=4.0326673084246947 mean=0.4712515705773916 9 | hsnon min=0.0000000000000000 max=1.2712833951042413 mean=0.0886865877527975 10 | socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443897261524953 11 | tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0151194128791792 12 | ssh min=-1.9244847628277935 max=0.9272826517867588 mean=-0.2767903423591662 13 | hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 14 | sw min=-225.0977630615234375 max=0.0000000000000000 mean=-71.7393205198725354 15 | lhf min=-38.1373977661132812 max=256.5976562500000000 mean=42.0100402226406899 16 | shf min=-58.9492950439453125 max=201.3742980957031250 mean=6.0753344854805622 17 | lw min=0.0000000000000000 max=88.0360870361328125 mean=31.3955290035652546 18 | us min=0.0043958698226386 max=0.0196578730801191 mean=0.0086443089692577 19 | mld min=2.2854716757984130 max=4593.1533423819937525 mean=192.4109073940401515 20 | layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.5229536158392420 21 | 22 | 23 | 24 | CostJb : Nonlinear Jb = 56.8285055591061621 25 | CostJo : Nonlinear Jo(SeaSurfaceTemp) = 0.0000000018654785, nobs = 1, Jo/n = 0.0000000018654785, err = 0.0000290000007226 26 | CostFunction: Nonlinear J = 56.8285055609716423 27 | -------------------------------------------------------------------------------- /test/testref/3dvar_zero_ob.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCSDA-internal/soca/b9a89f4a2a238ca85bdf59ca9a95673f5af5e791/test/testref/3dvar_zero_ob.test -------------------------------------------------------------------------------- /test/testref/4dvar_htlm.test: -------------------------------------------------------------------------------- 1 | CostJb : Nonlinear Jb = 0.0000000000000000e+00 2 | CostJo : Nonlinear Jo(SeaSufaceTemp) = 7.5731660125378380e+02, nobs = 90, Jo/n = 8.4146289028198193e+00, err = 3.7274007248048607e-01 3 | CostFunction: Nonlinear J = 7.5731660125378380e+02 4 | RPCGMinimizer: reduction in residual norm = 1.2269874777692313e-01 5 | CostFunction::addIncrement: Analysis: 6 | Valid time: 2018-04-15T00:00:00Z 7 | sea_water_salinity min=10.7210460395083924 max=40.4416591897031168 mean=34.5437862918539409 8 | eastward_sea_water_velocity min=-0.8581693992488438 max=0.7000954286848975 mean=-0.0002411941155065 9 | northward_sea_water_velocity min=-0.7661101215480253 max=1.4377766409421606 mean=0.0020193957336148 10 | sea_water_potential_temperature min=-1.8883899372702533 max=31.7004645720658580 mean=6.0183786756706956 11 | sea_surface_height_above_geoid min=-1.9244009534418500 max=0.9547999799338502 mean=-0.2782054011933942 12 | sea_water_cell_thickness min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642064969300 13 | ocean_mixed_layer_thickness min=2.2854716757984130 max=4593.1533423819937525 mean=192.4109073940401515 14 | sea_water_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.5229536158342398 15 | 16 | 17 | 18 | CostJb : Nonlinear Jb = 37.6443326387034602 19 | CostJo : Nonlinear Jo(SeaSufaceTemp) = 608.2917122363810449, nobs = 90, Jo/n = 6.7587968026264562, err = 0.3727400724804861 20 | CostFunction: Nonlinear J = 645.9360448750844625 21 | -------------------------------------------------------------------------------- /test/testref/4dvar_identity.test: -------------------------------------------------------------------------------- 1 | CostJb : Nonlinear Jb = 0.0000000000000000e+00 2 | CostJo : Nonlinear Jo(SeaSufaceTemp) = 7.5731660125378380e+02, nobs = 90, Jo/n = 8.4146289028198193e+00, err = 3.7274007248048607e-01 3 | CostFunction: Nonlinear J = 7.5731660125378380e+02 4 | RPCGMinimizer: reduction in residual norm = 7.6550575118280284e-02 5 | CostFunction::addIncrement: Analysis: 6 | Valid time: 2018-04-15T00:00:00Z 7 | sea_water_salinity min=10.7210460395083924 max=40.4416591897031168 mean=34.5441632355969261 8 | eastward_sea_water_velocity min=-0.8581693992488438 max=0.7000954286848975 mean=-0.0002411941155065 9 | northward_sea_water_velocity min=-0.7661101215480253 max=1.4377766409421606 mean=0.0020193957336148 10 | sea_water_potential_temperature min=-1.8883899372702533 max=31.7004645720658580 mean=6.0157314614329183 11 | sea_surface_height_above_geoid min=-1.9243038762262521 max=0.9520733875505107 mean=-0.2788664096789653 12 | sea_water_cell_thickness min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642064969300 13 | ocean_mixed_layer_thickness min=2.2854716757984130 max=4593.1533423819937525 mean=192.4109073940401515 14 | sea_water_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.5229536158342398 15 | 16 | 17 | 18 | CostJb : Nonlinear Jb = 48.8761841139292841 19 | CostJo : Nonlinear Jo(SeaSufaceTemp) = 597.2848931579876535, nobs = 90, Jo/n = 6.6364988128665292, err = 0.3727400724804861 20 | CostFunction: Nonlinear J = 646.1610772719169518 21 | -------------------------------------------------------------------------------- /test/testref/4dvar_oceaniceemulator.test: -------------------------------------------------------------------------------- 1 | CostJo : Nonlinear Jo(ADT) = 8.9597419583419821e+01, nobs = 31, Jo/n = 2.8902393414006395e+00, err = 1.0000000149011612e-01 2 | CostJo : Nonlinear Jo(SeaIceFraction) = 2.1864952874790742e+02, nobs = 27, Jo/n = 8.0981306943669420e+00, err = 1.0000000149011612e-01 3 | CostFunction: Nonlinear J = 3.0824694833132725e+02 4 | RPCGMinimizer: reduction in residual norm = 1.7502645806354089e-01 5 | CostFunction::addIncrement: Analysis: 6 | Valid time: 2018-04-15T00:00:00Z 7 | sea_ice_area_fraction min=-0.0492577015407390 max=1.5885816312703911 mean=0.1663368961674055 8 | sea_surface_height_above_geoid min=-1.9223840270044554 max=0.8794616240501941 mean=-0.2888265818133443 9 | CostJo : Nonlinear Jo(ADT) = 9.7026166930794986, nobs = 31, Jo/n = 0.3129876352606290, err = 0.1000000014901161 10 | CostJo : Nonlinear Jo(SeaIceFraction) = 29.7284104264182076, nobs = 27, Jo/n = 1.1010522380154892, err = 0.1000000014901161 11 | CostFunction: Nonlinear J = 39.4310271194977062 12 | RPCGMinimizer: reduction in residual norm = 0.6251357497997215 13 | CostFunction::addIncrement: Analysis: 14 | Valid time: 2018-04-15T00:00:00Z 15 | sea_ice_area_fraction min=-0.1863903172961555 max=1.4479863227833776 mean=0.1586391947574739 16 | sea_surface_height_above_geoid min=-1.9240761838395299 max=0.8723414907497136 mean=-0.2898862656894614 17 | -------------------------------------------------------------------------------- /test/testref/checkpointmodel.test: -------------------------------------------------------------------------------- 1 | input background: 2 | 3 | Valid time: 2018-04-15T00:00:00Z 4 | socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443897261524953 5 | tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0175649583533595 6 | hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 7 | analysis: 8 | 9 | Valid time: 2018-04-15T00:00:00Z 10 | socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5444018674667745 11 | tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0192753126257168 12 | hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 13 | output background: 14 | 15 | Valid time: 2018-04-15T00:00:00Z 16 | socn min=10.7210460395083924 max=38.0000000000000000 mean=34.5397822785945863 17 | tocn min=-1.8000000000000000 max=31.7004645720658580 mean=6.0194137897063893 18 | hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 19 | -------------------------------------------------------------------------------- /test/testref/convertincrement.test: -------------------------------------------------------------------------------- 1 | Input increment: 2 | Valid time: 2018-04-15T00:00:00Z 3 | sea_water_potential_temperature min=-0.1726397003258150 max=0.1645350694511602 mean=0.0017123316993994 4 | sea_water_salinity min=-0.0003286202897516 max=0.0068500841353133 mean=0.0000100636204074 5 | sea_surface_height_above_geoid min=-0.0003733900571020 max=0.0007826177675213 mean=0.0000299393228223 6 | Trajectory state: 7 | Valid time: 2018-04-15T00:00:00Z 8 | sea_surface_height_above_geoid min=-1.9244847628277935 max=0.9272826517867588 mean=-0.2767903423591662 9 | sea_water_potential_temperature min=-1.8883899372702533 max=31.7004645720658580 mean=6.0175649583533808 10 | sea_water_salinity min=10.7210460395083924 max=40.4416591897031168 mean=34.5443897261525663 11 | sea_water_cell_thickness min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642064969300 12 | sea_water_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.5229536158342398 13 | ocean_mixed_layer_thickness min=2.2854716757984130 max=4593.1533423819937525 mean=192.4109073940401515 14 | Output increment: 15 | Valid time: 2018-04-15T00:00:00Z 16 | sea_water_potential_temperature min=-0.1726397003258150 max=0.1645350694511602 mean=0.0017123316993994 17 | sea_water_salinity min=-0.0003286202897516 max=0.0068500841353133 mean= -nan 18 | sea_surface_height_above_geoid min=-0.0051104792104075 max=0.0041695058645130 mean=0.0002683695842715 19 | -------------------------------------------------------------------------------- /test/testref/convertstate.test: -------------------------------------------------------------------------------- 1 | Input state: 2 | Valid time: 2018-04-15T00:00:00Z 3 | ssh min=-1.9244847628277935 max=0.9272826517867588 mean=-0.2767903423591662 4 | tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0175649583533808 5 | socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443897261525663 6 | hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642064969300 7 | cicen min=0.0000000000000000 max=1.0000000000000000 mean=0.1175125761012928 8 | layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.5229536158342398 9 | Output state: 10 | Valid time: 2018-04-15T00:00:00Z 11 | ssh min=-1.8506855713388524 max=0.8442079420672755 mean=-0.2901615150158708 12 | tocn min=-1.8880081892310943 max=31.7004645720658580 mean=6.1162180389259770 13 | socn min=10.7210460395083924 max=40.0637395037463619 mean=34.5214633138909051 14 | hocn min=0.0009999999999997 max=1317.6347464767752626 mean=122.1545277395309483 15 | cicen min=0.0000000000000000 max=1.0000000000000000 mean=0.1021233406411165 16 | layer_depth min=2.4434500873796825 max=5557.9038243848535785 mean=1156.1626908349519454 17 | -------------------------------------------------------------------------------- /test/testref/dirac_diffusion.test: -------------------------------------------------------------------------------- 1 | Input Dirac increment: 2 | Valid time: 2018-04-15T00:00:00Z 3 | cicen min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 4 | hicen min=0.0000000000000000 max=1.0000000000000000 mean=0.0006086427267194 5 | socn min=0.0000000000000000 max=1.0000000000000000 mean=0.0000243457090688 6 | tocn min=0.0000000000000000 max=1.0000000000000000 mean=0.0000973828362751 7 | ssh min=0.0000000000000000 max=1.0000000000000000 mean=0.0006086427267194 8 | hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 9 | mld min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 10 | layer_depth min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 11 | Adjoint test for block diffusion passed 12 | Covariance(SABER) * Increment: 13 | Valid time: 2018-04-15T00:00:00Z 14 | cicen min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 15 | hicen min=0.0000000000000000 max=1.0000000000000000 mean=0.0006086427267194 16 | socn min=0.0000000000000000 max=0.9719591576549972 mean=0.0156081038501815 17 | tocn min=0.0000000000000000 max=1.0526107352472542 mean=0.1203177071517117 18 | ssh min=0.0000000000000000 max=0.9947575154898022 mean=0.0068267320452945 19 | hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 20 | mld min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 21 | layer_depth min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 22 | -------------------------------------------------------------------------------- /test/testref/dirac_diffusion_lowres.test: -------------------------------------------------------------------------------- 1 | Input Dirac increment: 2 | Valid time: 2018-04-15T00:00:00Z 3 | cicen min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 4 | hicen min=0.0000000000000000 max=1.0000000000000000 mean=0.0022222222222222 5 | socn min=0.0000000000000000 max=1.0000000000000000 mean=0.0000888888888889 6 | tocn min=0.0000000000000000 max=1.0000000000000000 mean=0.0003555555555556 7 | ssh min=0.0000000000000000 max=1.0000000000000000 mean=0.0022222222222222 8 | hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 9 | mld min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 10 | layer_depth min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 11 | Adjoint test for block diffusion passed 12 | Covariance(SABER) * Increment: 13 | Valid time: 2018-04-15T00:00:00Z 14 | cicen min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 15 | hicen min=0.0000000000000000 max=1.0000000000000000 mean=0.0022222222222222 16 | socn min=0.0000000000000000 max=1.0006558580168403 mean=0.0038785151142866 17 | tocn min=0.0000000000000000 max=1.0341597931839670 mean=0.0105690987121606 18 | ssh min=0.0000000000000000 max=1.1021951869160305 mean=0.0063592029400633 19 | hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 20 | mld min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 21 | layer_depth min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 22 | -------------------------------------------------------------------------------- /test/testref/dirac_soca_cor_nicas_scales.test: -------------------------------------------------------------------------------- 1 | Input Dirac increment: 2 | Valid time: 2018-04-15T00:00:00Z 3 | socn min=0.0000000000000000 max=1.0000000000000000 mean=0.0000243457090688 4 | tocn min=0.0000000000000000 max=1.0000000000000000 mean=0.0000973828362751 5 | ssh min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 6 | hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 7 | cicen min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 8 | hicen min=0.0000000000000000 max=1.0000000000000000 mean=0.0006086427267194 9 | Covariance(SABER) * Increment: 10 | Valid time: 2018-04-15T00:00:00Z 11 | socn min=0.0000000000000000 max=1.0000000000000000 mean=0.0464973393926804 12 | tocn min=0.0000000000000000 max=1.5139648021098451 mean=0.3786674080183614 13 | ssh min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 14 | hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 15 | cicen min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 16 | hicen min=0.0000000000000000 max=0.9999999999999996 mean=0.3110747933581738 17 | -------------------------------------------------------------------------------- /test/testref/forecast_pseudo.test: -------------------------------------------------------------------------------- 1 | Initial state: 2 | Valid time: 2018-04-15T00:00:00Z 3 | socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443897261524953 4 | tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0175649583533595 5 | ssh min=-1.9244847628277935 max=0.9272826517867588 mean=-0.2767903423591662 6 | hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 7 | uocn min=-0.8581693992488438 max=0.7000954286848975 mean=-0.0002411941155065 8 | vocn min=-0.7661101215480253 max=1.4377766409421606 mean=0.0020193957336148 9 | Final state: 10 | Valid time: 2018-04-16T00:00:00Z 11 | socn min=10.7056187923807045 max=40.4415640625950914 mean=34.5455280967987690 12 | tocn min=-1.8856523767976110 max=32.0050377041144500 mean=6.0207241032291368 13 | ssh min=-1.8702548731363531 max=0.9165305071453603 mean=-0.2930019831575953 14 | hocn min=0.0009999999999977 max=1345.6400000000007822 mean=128.6274081582193105 15 | uocn min=-0.8367115882999979 max=0.6379804463068747 mean=0.0001031443293767 16 | vocn min=-0.7783208312855706 max=0.9385614069815588 mean=0.0010188348291616 17 | -------------------------------------------------------------------------------- /test/testref/gen_hybrid_linear_model_coeffs.test: -------------------------------------------------------------------------------- 1 | dx at 2018-04-15T06:00:00Z: 2 | Valid time: 2018-04-15T06:00:00Z 3 | socn min=-349.3229890696409257 max=9761.1377991897752509 mean=1.3439470304803303 4 | tocn min=-9570.3678289458039217 max=86212.8337375470437109 mean=2.8443282026838292 5 | dx at 2018-04-15T12:00:00Z: 6 | Valid time: 2018-04-15T12:00:00Z 7 | socn min=-8650929.5148954931646585 max=33773692.5031147077679634 mean=1031.3945647450934757 8 | tocn min=-324775259.0080191493034363 max=39077947.9163011461496353 mean=-10393.6347812929452630 9 | -------------------------------------------------------------------------------- /test/testref/gen_hybrid_linear_model_coeffs_pseudo.test: -------------------------------------------------------------------------------- 1 | dx at 2018-04-15T06:00:00Z: 2 | Valid time: 2018-04-15T06:00:00Z 3 | socn min=-11.1996877812743758 max=58.3691510634273527 mean=0.9686839207733670 4 | tocn min=-86.6567526100837568 max=190.5770397706511119 mean=1.0056387841768455 5 | dx at 2018-04-15T12:00:00Z: 6 | Valid time: 2018-04-15T12:00:00Z 7 | socn min=-55.0215861169809415 max=624.1714575291189249 mean=1.0259863856238276 8 | tocn min=-514.7353033488382152 max=416.8045947766586892 mean=1.0721350396165472 9 | -------------------------------------------------------------------------------- /test/testref/gridgen.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCSDA-internal/soca/b9a89f4a2a238ca85bdf59ca9a95673f5af5e791/test/testref/gridgen.test -------------------------------------------------------------------------------- /test/testref/hofx_4d_oceaniceemulator.test: -------------------------------------------------------------------------------- 1 | Initial state: 2 | Valid time: 2018-04-15T00:00:00Z 3 | sea_ice_area_fraction min=0.0000000000000000 max=1.0000000000000000 mean=0.1175125761012928 4 | sea_surface_height_above_geoid min=-1.9244847628277935 max=0.9272826517867588 mean=-0.2767903423591662 5 | Final state: 6 | Valid time: 2018-04-16T00:00:00Z 7 | sea_ice_area_fraction min=0.0000000000000000 max=1.0000000000000000 mean=0.1175125761012928 8 | sea_surface_height_above_geoid min=-1.9244847628277935 max=0.9272826517867588 mean=-0.2767903423591662 9 | H(x): 10 | ADT nobs= 99 Min=-1.2340413208590908, Max=1.4127157672643009, RMS=0.7473192080024911 11 | 12 | End H(x) 13 | -------------------------------------------------------------------------------- /test/testref/hofx_4d_pseudo.test: -------------------------------------------------------------------------------- 1 | Initial state: 2 | Valid time: 2018-04-15T00:00:00Z 3 | socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443897261524953 4 | tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0175649583533595 5 | ssh min=-1.9244847628277935 max=0.9272826517867588 mean=-0.2767903423591662 6 | hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 7 | uocn min=-0.8581693992488438 max=0.7000954286848975 mean=-0.0002411941155065 8 | vocn min=-0.7661101215480253 max=1.4377766409421606 mean=0.0020193957336148 9 | Final state: 10 | Valid time: 2018-04-16T00:00:00Z 11 | socn min=10.7056187923807045 max=40.4415640625950914 mean=34.5455280967987690 12 | tocn min=-1.8856523767976110 max=32.0050377041144500 mean=6.0207241032291368 13 | ssh min=-1.8702548731363531 max=0.9165305071453603 mean=-0.2930019831575953 14 | hocn min=0.0009999999999977 max=1345.6400000000007822 mean=128.6274081582193105 15 | uocn min=-0.8367115882999979 max=0.6379804463068747 mean=0.0001031443293767 16 | vocn min=-0.7783208312855706 max=0.9385614069815588 mean=0.0010188348291616 17 | H(x): 18 | SeaSurfaceTemp nobs= 199 Min=-0.7454831822417878, Max=30.6604675298451959, RMS=24.2314153657913245 19 | 20 | SeaSurfaceSalinity nobs= 100 Min=32.8825887750316710, Max=37.0674591833711347, RMS=34.7703815142737440 21 | 22 | ADT nobs= 99 Min=-1.1890419319943204, Max=1.4117215983087452, RMS=0.7391593222629287 23 | 24 | InsituTemperature nobs= 218 Min=7.8224923354291338, Max=30.4376910005011609, RMS=21.2401277395107897 25 | 26 | InsituSalinity nobs= 218 Min=34.1391348515148039, Max=36.0234290745397630, RMS=35.0263633456477308 27 | 28 | End H(x) 29 | -------------------------------------------------------------------------------- /test/testref/oceanSmoother.test: -------------------------------------------------------------------------------- 1 | random: 2 | Valid time: 2024-01-01T00:00:00Z 3 | tocn min=-4.0850852727171478 max=5.0007566326823527 mean=-0.0041427852140535 4 | smoothed random: 5 | Valid time: 2024-01-01T00:00:00Z 6 | tocn min=-1.7999697649583950 max=1.6773136898739005 mean=0.0010014455227316 7 | smoothed ones: 8 | Valid time: 2024-01-01T00:00:00Z 9 | tocn min=0.0000000000000000 max=1.0000000000000000 mean=0.7822519780888563 10 | smoothed zeros: 11 | Valid time: 2024-01-01T00:00:00Z 12 | tocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 13 | -------------------------------------------------------------------------------- /test/testref/parameters_bump_cor_nicas.test: -------------------------------------------------------------------------------- 1 | Norm of output parameter cor_rh - 1: 3.7283829153010643e+39 2 | Norm of output parameter cor_rv - 1: 3.7283829153010643e+39 3 | -------------------------------------------------------------------------------- /test/testref/parameters_bump_cor_nicas_scales.test: -------------------------------------------------------------------------------- 1 | Norm of input parameter rh - 1: 4.9042447063007183e+09 2 | Norm of input parameter rv - 1: 1.4415640549763996e+05 3 | -------------------------------------------------------------------------------- /test/testref/parameters_bump_cov.test: -------------------------------------------------------------------------------- 1 | Norm of output parameter cor_rh - 1: 4.1191801313798064e+08 2 | Norm of output parameter cor_rv - 1: 1.0291717842820867e+03 3 | Norm of output parameter stddev - 1: 5.2767346336023898e+01 4 | -------------------------------------------------------------------------------- /test/testref/parameters_bump_loc.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCSDA-internal/soca/b9a89f4a2a238ca85bdf59ca9a95673f5af5e791/test/testref/parameters_bump_loc.test -------------------------------------------------------------------------------- /test/testref/parametric_stddev.test: -------------------------------------------------------------------------------- 1 | Input increment: 2 | Valid time: 2018-04-15T00:00:00Z 3 | tocn min=1.0000000000000000 max=1.0000000000000000 mean=1.0000000000000002 4 | socn min=1.0000000000000000 max=1.0000000000000000 mean=1.0000000000000002 5 | ssh min=1.0000000000000000 max=1.0000000000000000 mean=1.0000000000000000 6 | hocn min=1.0000000000000000 max=1.0000000000000000 mean=1.0000000000000002 7 | Trajectory state: 8 | Valid time: 2018-04-15T00:00:00Z 9 | ssh min=-1.9244847628277935 max=0.9272826517867588 mean=-0.2767903423591662 10 | tocn min=-1.8883899372702533 max=31.7004645720658580 mean=6.0175649583533595 11 | socn min=10.7210460395083924 max=40.4416591897031168 mean=34.5443897261524953 12 | hocn min=0.0009999999999977 max=1345.6400000000003274 mean=128.6280642065023017 13 | layer_depth min=2.2854716757984130 max=5658.3057467114012979 mean=1200.5229536158392420 14 | mld min=2.2854716757984130 max=4593.1533423819937525 mean=192.4109073940401515 15 | Output increment: 16 | Valid time: 2018-04-15T00:00:00Z 17 | tocn min=0.1000021776320688 max=2.0000000000000000 mean=0.3713665643599134 18 | socn min=0.0250000003725388 max=0.2500000000000000 mean=0.0994849621452215 19 | ssh min=0.0038060233744357 max=0.1000000000000000 mean=0.0867897545972884 20 | hocn min=0.0000000000000000 max=0.0000000000000000 mean=0.0000000000000000 21 | -------------------------------------------------------------------------------- /test/testref/setcorscales.test: -------------------------------------------------------------------------------- 1 | Output horizontal scales: 2 | Valid time: 2018-04-15T00:00:00Z 3 | socn min=3443898.2400908078998327 max=37052173.1999848634004593 mean=10568027.2130162063986063 4 | tocn min=4132677.8881089696660638 max=27789129.8999886512756348 mean=10857106.2521346043795347 5 | uocn min=4132677.8881089696660638 max=27789129.8999886512756348 mean=10857106.2521345950663090 6 | vocn min=4132677.8881089696660638 max=27789129.8999886512756348 mean=10857106.2521345950663090 7 | ssh min=4821457.5361271305009723 max=18526086.5999924317002296 mean=11599818.0467508677393198 8 | cicen min=5510237.1841452922672033 max=15868559.2703372277319431 mean=13014697.2258340530097485 9 | hicen min=17850000.0000000000000000 max=17852129.1791293807327747 mean=17850139.9582142084836960 10 | Output vertical scales: 11 | Valid time: 2018-04-15T00:00:00Z 12 | socn min=357.0000000000000000 max=357.0000000000000000 mean=356.9999999999998863 13 | tocn min=357.0000000000000000 max=357.0000000000000000 mean=356.9999999999998863 14 | uocn min=357.0000000000000000 max=357.0000000000000000 mean=356.9999999999998295 15 | vocn min=357.0000000000000000 max=357.0000000000000000 mean=356.9999999999999432 16 | ssh min=357.0000000000000000 max=357.0000000000000000 mean=357.0000000000000000 17 | cicen min=357.0000000000000000 max=357.0000000000000000 mean=357.0000000000000000 18 | hicen min=357.0000000000000000 max=357.0000000000000000 mean=357.0000000000000000 19 | -------------------------------------------------------------------------------- /tools/calc_scales.yaml: -------------------------------------------------------------------------------- 1 | gridspec_filename: "./soca_gridspec.nc" 2 | restart_filename: "./MOM.res.nc" 3 | mld_filename: "./average_MLD.nc" 4 | output_filename: "./scales.nc" 5 | output_variable_vt: "vt" 6 | output_variable_hz: "hz" 7 | 8 | VT_MIN: 1.5 9 | VT_MAX: 10 10 | 11 | HZ_ROSSBY_MULT: 1.0 12 | HZ_MAX: 200e3 13 | HZ_MIN_GRID_MULT: 1.0 14 | --------------------------------------------------------------------------------