From 2ade1e3fcd67d65e14535ee4ea39c18e21be78b3 Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Tue, 18 Jul 2023 14:26:59 -0400 Subject: [PATCH 1/3] doc fix: warning about units for WOD converter --- observations/obs_converters/WOD/WOD.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/observations/obs_converters/WOD/WOD.rst b/observations/obs_converters/WOD/WOD.rst index c262341e74..c476216e51 100644 --- a/observations/obs_converters/WOD/WOD.rst +++ b/observations/obs_converters/WOD/WOD.rst @@ -38,6 +38,15 @@ NCAR staff have prepared datasets already converted to DART's obs_seq file format for the World Ocean Database 2013 (WOD13) and the World Ocean Database 2009 (WOD09). +.. Warning:: + + The WOD data is in PSU, the dart observation converter ``wod_to_obs`` converts the observation to MSU. + + | PSU = g/kg + | MSU = PSU/1000 = kg/kg + + The WOD observation sequence files availiable from NCAR's RDA are in MSU. + WOD13 ~~~~~ From b458fde2219906c55adf6fae00ddc09c520ffc70 Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Tue, 18 Jul 2023 14:32:06 -0400 Subject: [PATCH 2/3] doc fix: add note about GTSPP units PSU to MSU fix type in WOD.rst warning --- observations/obs_converters/GTSPP/GTSPP.rst | 7 +++++++ observations/obs_converters/WOD/WOD.rst | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/observations/obs_converters/GTSPP/GTSPP.rst b/observations/obs_converters/GTSPP/GTSPP.rst index d2b0ea0623..9ce4894c9b 100644 --- a/observations/obs_converters/GTSPP/GTSPP.rst +++ b/observations/obs_converters/GTSPP/GTSPP.rst @@ -26,6 +26,13 @@ information (not quality control, but observation instrument error values). Ther information encoded in these files, but so far we don't have the key. The quality control values are read and only those with a QC of 1 are retained. +.. Note:: + + The GTSPP data is in PSU, the dart observation converter ``gtspp_to_obs`` converts the observations to MSU. + + | PSU = g/kg + | MSU = PSU/1000 = kg/kg + Programs -------- diff --git a/observations/obs_converters/WOD/WOD.rst b/observations/obs_converters/WOD/WOD.rst index c476216e51..ab373bbf61 100644 --- a/observations/obs_converters/WOD/WOD.rst +++ b/observations/obs_converters/WOD/WOD.rst @@ -40,7 +40,7 @@ format for the World Ocean Database 2013 (WOD13) and the World Ocean Database .. Warning:: - The WOD data is in PSU, the dart observation converter ``wod_to_obs`` converts the observation to MSU. + The WOD data is in PSU, the dart observation converter ``wod_to_obs`` converts the observations to MSU. | PSU = g/kg | MSU = PSU/1000 = kg/kg From 22829bf8dd26f2e9894fc7e559eb8e2ed4d950e8 Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Tue, 18 Jul 2023 15:08:23 -0400 Subject: [PATCH 3/3] bug-fix: convert salinity to MSU in MOM6 model_interpolate fixes #509 The WOD observation converter is in MSU. obs_def_ocean_mod.f90 does not have any non-COMMON_CODE forward operators that depend on salinty. But this unit conversion is something to keep in mind for future forward operators. --- models/MOM6/model_mod.f90 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/models/MOM6/model_mod.f90 b/models/MOM6/model_mod.f90 index 2f6f02a8cd..27aaec37f5 100644 --- a/models/MOM6/model_mod.f90 +++ b/models/MOM6/model_mod.f90 @@ -49,7 +49,7 @@ module model_mod use obs_kind_mod, only : get_index_for_quantity, QTY_U_CURRENT_COMPONENT, & QTY_V_CURRENT_COMPONENT, QTY_LAYER_THICKNESS, & - QTY_DRY_LAND + QTY_DRY_LAND, QTY_SALINITY use ensemble_manager_mod, only : ensemble_type @@ -383,6 +383,11 @@ subroutine model_interpolate(state_handle, ens_size, location, qty, expected_obs ! expected_obs = bot_val + lev_fract * (top_val - bot_val) expected_obs = expected(:,1) + lev_fract(:) * (expected(:,2) - expected(:,1)) +if (qty == QTY_SALINITY) then ! convert from PSU (model) to MSU (obersvation) + expected_obs = expected_obs/1000.0_r8 +endif + + end subroutine model_interpolate