From f69301e93016be48ea2d2ec7ba86f61fe81dce52 Mon Sep 17 00:00:00 2001 From: jprestop Date: Fri, 9 Jan 2026 15:46:32 -0700 Subject: [PATCH 1/4] Added if (surflayerSelector == 1) around queryFloatParameter for surflayer_wq --- SRC/HYDRO_CORE/hydro_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SRC/HYDRO_CORE/hydro_core.c b/SRC/HYDRO_CORE/hydro_core.c index 33084d3..a6e9dbf 100644 --- a/SRC/HYDRO_CORE/hydro_core.c +++ b/SRC/HYDRO_CORE/hydro_core.c @@ -527,7 +527,9 @@ int hydro_coreGetParams(){ errorCode = queryFloatParameter("moistureCondTscale", &moistureCondTscale, 1e-4, 1000.0, PARAM_MANDATORY); errorCode = queryIntegerParameter("moistureCondBasePres", &moistureCondBasePres, 0, 1, PARAM_MANDATORY); errorCode = queryFloatParameter("moistureMPcallTscale", &moistureMPcallTscale, 1e-4, 1000.0, PARAM_MANDATORY); - errorCode = queryFloatParameter("surflayer_wq", &surflayer_wq, -5e+0, 5e+0, PARAM_MANDATORY); + if (surflayerSelector == 1){ + errorCode = queryFloatParameter("surflayer_wq", &surflayer_wq, -5e+0, 5e+0, PARAM_MANDATORY); + } if (surflayerSelector == 2){ errorCode = queryFloatParameter("surflayer_qr", &surflayer_qr, -1e+1, 1e+1, PARAM_MANDATORY); errorCode = queryIntegerParameter("surflayer_qskin_input", &surflayer_qskin_input, 0, 1, PARAM_OPTIONAL); From ce5a1c16e94f651c67d832536aa08560176ca9b1 Mon Sep 17 00:00:00 2001 From: jprestop Date: Fri, 9 Jan 2026 15:52:21 -0700 Subject: [PATCH 2/4] Removed atmosphere_boundary_layer_thickness as a standard name for Inverse Obukhov length --- SRC/HYDRO_CORE/hydro_core.c | 2 +- scripts/python_utilities/post-processing/field_attributes.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SRC/HYDRO_CORE/hydro_core.c b/SRC/HYDRO_CORE/hydro_core.c index a6e9dbf..a89c97f 100644 --- a/SRC/HYDRO_CORE/hydro_core.c +++ b/SRC/HYDRO_CORE/hydro_core.c @@ -3436,7 +3436,7 @@ int hydro_coreAddFieldAttributes(char *fieldName, int isForcing) { {"qskin", "kg kg-1", "Surface skin water vapor mixing ratio", NULL}, {"z0m", "m", "Roughness length for momentum", "surface_roughness_length_for_momentum_in_air"}, {"z0t", "m", "Roughness length for heat", "surface_roughness_length_for_heat_in_air"}, - {"invOblen", "m-1", "Inverse Obukhov length", "atmosphere_boundary_layer_thickness"}, + {"invOblen", "m-1", "Inverse Obukhov length", NULL}, {"CanopyLAD", "m-1", "Leaf area density", "leaf_area_density"}, {"SeaMask", "-", "Sea mask", "sea_area_fraction"}, {NULL, NULL, NULL, NULL} // End marker diff --git a/scripts/python_utilities/post-processing/field_attributes.json b/scripts/python_utilities/post-processing/field_attributes.json index 8fffaab..e65c2e9 100644 --- a/scripts/python_utilities/post-processing/field_attributes.json +++ b/scripts/python_utilities/post-processing/field_attributes.json @@ -29,7 +29,7 @@ "qskin": ["kg kg-1", "Surface skin water vapor mixing ratio", null], "z0m": ["m", "Roughness length for momentum", "surface_roughness_length_for_momentum_in_air"], "z0t": ["m", "Roughness length for heat", "surface_roughness_length_for_heat_in_air"], - "invOblen": ["m-1", "Inverse Obukhov length", "atmosphere_boundary_layer_thickness"], + "invOblen": ["m-1", "Inverse Obukhov length", null], "cellpert_amp": ["K", "Cell perturbation amplitude", null], "cellpert_nts": ["-", "Cell perturbation number of time steps", null], "cellpert_ktop": ["-", "Cell perturbation top grid level", null], From eb60ffedd096369d73d518e935b84c9b9f09a69a Mon Sep 17 00:00:00 2001 From: jprestop Date: Fri, 9 Jan 2026 16:04:50 -0700 Subject: [PATCH 3/4] Corrected the units for qflux --- SRC/HYDRO_CORE/hydro_core.c | 2 +- scripts/python_utilities/post-processing/field_attributes.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SRC/HYDRO_CORE/hydro_core.c b/SRC/HYDRO_CORE/hydro_core.c index a89c97f..198fa19 100644 --- a/SRC/HYDRO_CORE/hydro_core.c +++ b/SRC/HYDRO_CORE/hydro_core.c @@ -3431,7 +3431,7 @@ int hydro_coreAddFieldAttributes(char *fieldName, int isForcing) { {"ql", "g kg-1", "Cloud liquid water mixing ratio", "cloud_liquid_water_mixing_ratio"}, {"fricVel", "m s-1", "Surface friction velocity", "surface_friction_velocity"}, {"htFlux", "K m s-1", "Surface sensible heat flux", "surface_upward_sensible_heat_flux"}, - {"qFlux", "kg kg-1 m s-1", "Surface latent heat flux", "surface_upward_latent_heat_flux"}, + {"qFlux", "g kg-1 m s-1", "Surface latent heat flux", "surface_upward_latent_heat_flux"}, {"tskin", "K", "Surface skin temperature", "surface_temperature"}, {"qskin", "kg kg-1", "Surface skin water vapor mixing ratio", NULL}, {"z0m", "m", "Roughness length for momentum", "surface_roughness_length_for_momentum_in_air"}, diff --git a/scripts/python_utilities/post-processing/field_attributes.json b/scripts/python_utilities/post-processing/field_attributes.json index e65c2e9..fb52a69 100644 --- a/scripts/python_utilities/post-processing/field_attributes.json +++ b/scripts/python_utilities/post-processing/field_attributes.json @@ -24,7 +24,7 @@ "ql": ["g kg-1", "Cloud liquid water mixing ratio", "cloud_liquid_water_mixing_ratio"], "fricVel": ["m s-1", "Surface friction velocity", "surface_friction_velocity"], "htFlux": ["K m s-1", "Surface sensible heat flux", "surface_upward_sensible_heat_flux"], - "qFlux": ["kg kg-1 m s-1", "Surface latent heat flux", "surface_upward_latent_heat_flux"], + "qFlux": ["g kg-1 m s-1", "Surface latent heat flux", "surface_upward_latent_heat_flux"], "tskin": ["K", "Surface skin temperature", "surface_temperature"], "qskin": ["kg kg-1", "Surface skin water vapor mixing ratio", null], "z0m": ["m", "Roughness length for momentum", "surface_roughness_length_for_momentum_in_air"], From d7d586c8ad12279c34a0ead14c868aa887ed472c Mon Sep 17 00:00:00 2001 From: jprestop Date: Fri, 9 Jan 2026 16:06:57 -0700 Subject: [PATCH 4/4] Corrected the units for qskin --- SRC/HYDRO_CORE/hydro_core.c | 2 +- scripts/python_utilities/post-processing/field_attributes.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SRC/HYDRO_CORE/hydro_core.c b/SRC/HYDRO_CORE/hydro_core.c index 198fa19..ff1a951 100644 --- a/SRC/HYDRO_CORE/hydro_core.c +++ b/SRC/HYDRO_CORE/hydro_core.c @@ -3433,7 +3433,7 @@ int hydro_coreAddFieldAttributes(char *fieldName, int isForcing) { {"htFlux", "K m s-1", "Surface sensible heat flux", "surface_upward_sensible_heat_flux"}, {"qFlux", "g kg-1 m s-1", "Surface latent heat flux", "surface_upward_latent_heat_flux"}, {"tskin", "K", "Surface skin temperature", "surface_temperature"}, - {"qskin", "kg kg-1", "Surface skin water vapor mixing ratio", NULL}, + {"qskin", "g kg-1", "Surface skin water vapor mixing ratio", NULL}, {"z0m", "m", "Roughness length for momentum", "surface_roughness_length_for_momentum_in_air"}, {"z0t", "m", "Roughness length for heat", "surface_roughness_length_for_heat_in_air"}, {"invOblen", "m-1", "Inverse Obukhov length", NULL}, diff --git a/scripts/python_utilities/post-processing/field_attributes.json b/scripts/python_utilities/post-processing/field_attributes.json index fb52a69..03fa39a 100644 --- a/scripts/python_utilities/post-processing/field_attributes.json +++ b/scripts/python_utilities/post-processing/field_attributes.json @@ -26,7 +26,7 @@ "htFlux": ["K m s-1", "Surface sensible heat flux", "surface_upward_sensible_heat_flux"], "qFlux": ["g kg-1 m s-1", "Surface latent heat flux", "surface_upward_latent_heat_flux"], "tskin": ["K", "Surface skin temperature", "surface_temperature"], - "qskin": ["kg kg-1", "Surface skin water vapor mixing ratio", null], + "qskin": ["g kg-1", "Surface skin water vapor mixing ratio", null], "z0m": ["m", "Roughness length for momentum", "surface_roughness_length_for_momentum_in_air"], "z0t": ["m", "Roughness length for heat", "surface_roughness_length_for_heat_in_air"], "invOblen": ["m-1", "Inverse Obukhov length", null],