soil_moisture diagnostic mislabelled units kg kg-1 (should be kg m-2 / SMCL)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- fortran
- Domain
- data
Research direction
Start with the named STASH and JULES interface files, especially applications/lfricinputs/source/common/lfricinp_stashmaster_mod.f90 and the soil-moisture kernel files, then locate the field or diagnostic definition that writes the units attribute. Change only the soil_moisture metadata from kg kg-1 to kg m-2 and verify that generated LFRic output reports the corrected units without changing stored values.
Written by the indexing model from the issue text.
Description
Summary
The soil_moisture field is written to LFRic output/checkpoint files with a units attribute of kg kg-1, but the field is actually SMCL — soil moisture content per layer in kg m-2 (= θ · ρ_water · Δz_layer). The units metadata should be corrected to kg m-2.
Evidence that the field is kg m-2 (SMCL), not kg kg-1
soil_moisture is JULES' smcl_soilt prognostic (UM STASH 9), which is a per-layer moisture content in kg m-2, not a mass fraction:
interfaces/jules_interface/source/kernel/process_soil_kernel_mod.F90— the interface documents the argument askg m-2, and the moisture-bounding logic builds its limits asθ · dzsoil · rho_waterand compares them directly againstsoil_moisture:
This is only dimensionally consistent if!> @param[in,out] soil_moisture Soil moisture content (kg m-2) ... smc_min = 0.1_r_def * soil_moist_wilt(map_2d(1)) * dzsoil(n) * rho_water smc_max = soil_moist_sat(map_2d(1)) * dzsoil(n) * rho_watersoil_moistureiskg m-2.interfaces/jules_interface/source/kernel/jules_extra_kernel_mod.F90maps it one-to-one ontosmcl_soilt(annotatedkg m-2), andjules_exp_kernel_mod.F90copies it intosoil_layer_moisture(kg m-2).- STASH identity:
applications/lfricinputs/source/common/lfricinp_stashmaster_mod.f90—stashcode_soil_moist = 9(UM STASH 9 = SMCL,kg m-2per layer).
So the physics unambiguously treats soil_moisture as kg m-2; the kg kg-1 label on the written field is incorrect.
Where this was observed
The mislabelled units = "kg kg-1" attribute appears on soil_moisture in LFRic UGRID output — e.g. UK-domain restartLFRicAtm_* checkpoints and GAL9 global dumps.
Suggested fix
Correct the units metadata for soil_moisture (STASH 9 / smcl_soilt) in the field/diagnostic definition that drives the written attribute, from kg kg-1 to kg m-2.
Impact
Purely a metadata/label correction — the stored values are already SMCL (kg m-2) and are used correctly by the physics; only the written units string is wrong. Downstream tools that trust the units attribute (rather than the STASH/field identity) would mis-scale the data.
- Dominant language
- Fortran
- Stars
- 31
- Forks
- 118
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MetOffice/lfric_apps
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
MetOffice/lfric_apps#773 ·
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 78/100
MetOffice/lfric_apps#648 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MetOffice/lfric_apps#797 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 52/100
MetOffice/lfric_apps#793 ·
-
enhancement
MetOffice/lfric_apps#792 · 1 assignee ·
All issues in MetOffice/lfric_apps
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
open-compass/VLMEvalKit#1698 ·
-
triage:deciding
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
open-telemetry/otel-arrow#4123 · 1 reaction ·