Frozen precip corrector via clipping#1305
Conversation
…precip is what is used by the energy corrector
|
With the corrector we're strongly under-predicting non/zero-one values and over-predicting the edge values. I think for this task we particularly want to propagate gradients through the clip. It would be nice to see what that does to the result, before we use it (but I don't think blocks review/merge of the feature). |
Considering I need to re-run the baseline training I will re-run this training with the propagate gradients through the clip feature one to see how much this makes a difference. |
| # Clip frozen precipitation against the (possibly corrected) total | ||
| # precipitation rate. Done here, after the budget correction, so the | ||
| # ceiling is the final precipitation rate. | ||
| frozen_clip = _clip_frozen_precipitation({**gen_data, **corrected}) |
There was a problem hiding this comment.
I don't have strong opinions either way, but as implemented this changes the behavior of existing steppers (probably not that many of them out there that predict frozen precipitation still). An alternative would be to have this off by default (and maybe then explicitly turn it on in the baseline config). Not sure if the extra config arg is really worth it or not.
There was a problem hiding this comment.
Yeah that was what I previous had but I can't imagine anyone would want this off even for old check points. Right now only ACE-SHiELD+ is a public ckpt with frozen precip.
@spencerkclark is it possible for you to run this feature with your ACE-SHiELD+ ckpt. If you can just run a 10 day forecast saving PRATEsfc and total_frozen_precip with and without this feature, I can run it through my notebook. I suspect that this feature will actually help your fraction_of_precip_that_is_frozen without even needing to retrain but I also want to confirm it. What I did just realize is this will affect the model behavior as this happens before the energy correctors (and thus can affect the model evolution) so we should confirm this doesn't break your ckpt. Can you also run a 1000 year simulation with this (you shouldn't have to save any output)?
There was a problem hiding this comment.
Thanks, yes, I agree this is important to take a look at. I'll run the experiments you suggest and maybe a couple others.
ACE can produce frozen precipitation (
total_frozen_precipitation_rate) exceeding the total precipitation rate (PRATEsfc), which is unphysical since frozen precipitation is a component of total precipitation. This PR clips frozen precipitation to the total precipitation rate (downstream of the correctors that can changePRATEsfc), but upstream of the energy correctors which utilizestotal_frozen_precipitation_rate.Here is the impact of the correctors show as the fraction of PRATEsfc that is frozen precipitation

For more analysis see this notebook.
Changes:
fme.core.corrector.atmosphere.MoistureBudgetCorrection: after closing the moisture budget, clip total_frozen_precipitation_rate to the corrected PRATEsfc when frozen precipitation is predicted. This runs before any total-energy-budget correction, since frozen precipitation contributes to the surface energy flux via the latent heat of freezing.
fme.core.atmosphere_data.AtmosphereData: add a set_frozen_precipitation_rate setter to support the clip.
Tests added
Resolves #1269