Add qsat_scaled_names to SharedGlobalMeanRemovalConfig#1256
Open
mcgibbon wants to merge 2 commits into
Open
Conversation
Standalone physics helper exposing the Bolton (1980) formula for saturation vapor pressure over liquid water given temperature in Kelvin. Will be used by an upcoming extension to SharedGlobalMeanRemovalConfig.
Listed fields are multiplied by qsat(reference_mean) / qsat(sample_mean_of_reference_field) in forward_transform and divided back in inverse_transform, where qsat is the Bolton (1980) saturation vapor pressure as a function of temperature in Kelvin. This is intended for humidity-like fields whose saturation value scales with the reference temperature; the per-sample ratio brings them closer to a temperature-invariant input distribution. The new list is independent of ``field_names``: temperature-like fields still get the additive offset; humidity-like fields get the multiplicative qsat ratio. Default empty preserves existing behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shared global mean removal transform shifts temperature-like fields by a per-sample offset, but humidity-like fields scale multiplicatively with saturation vapor pressure rather than shifting additively with temperature. This PR adds a
qsat_scaled_namesoption toSharedGlobalMeanRemovalConfigso humidity fields can be scaled by the ratioqsat(reference_mean) / qsat(sample_mean)inforward_transformand divided back ininverse_transform, using the Bolton (1980) saturation vapor pressure formula. The default (empty list) leaves existing behavior unchanged.Changes:
fme.core.humidity.bolton_saturation_vapor_pressure: new helper computing Bolton (1980) saturation vapor pressure over liquid water (hPa) from temperature in Kelvinfme.core.step.global_mean_removal.SharedGlobalMeanRemovalConfig/SharedGlobalMeanRemoval: newqsat_scaled_namesfield; listed fields are multiplied by the per-sample qsat ratio inforward_transformand unscaled ininverse_transform, with name validation warnings matchingfield_namesTests added
If dependencies changed, "deps only" image rebuilt and "latest_deps_only_image.txt" file updated