Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: clamping is applied only when variables are written #734

Open
kdraeder opened this issue Sep 9, 2024 · 6 comments
Open
Assignees
Labels
Documentation Improvements or additions to documentation Enhancement New feature or request Minor Minor functionality, non-critical data; easy fix QCEFF quantile conserving filters state_structure notes on refactoring of state_structure_mod

Comments

@kdraeder
Copy link
Contributor

kdraeder commented Sep 9, 2024

What's the issue?

Any clamping values are provided in the model_nml in the definition of the state vector,
which implies to me that variables put into the state vector will be clamped.
But clamping happens only during the output of the updated state.

Where did you find the issue?

I discovered it by trying to start an assimilation with state files that had values that were out of bounds
for the QCEFF algorithms I chose, and trying to fix that using clamping.
I didn't find this limitation in the documentation when searching for several variations of "clamp",
so I think that it should be added somewhere easily findable.

What needs to be fixed?

A note in the state_structure page might be enough.
Since users encounter clamping in model_mod and its namelist, the model_mod module page would also be a candidate for a comment.

Suggestions for improvement

It would also be handy if clamping could be applied to the fields as they're read in.
The alternative is to fix the state files before they are read, which can be cumbersome
and another source of mistakes.
Or would it work to put those files through an "assimilation" that did not assimilate or evaluate any obs,
and didn't inflate the ensemble, so that the new fields were identical except for the clamping?
I tried this, but the BNRH algorithm is still finding negatives in the field values and stopping.
I guess it doesn't know that it has no work to do. The case where I tested this is
/glade/derecho/scratch/raeder/Rean_BNRH_debugSST/run and
/glade/work/raeder/Exp/Rean_BNRH_debugSST_git/Rean_BNRH_debugSST

Anything else we should know?

Include any other relevant details, such as references, screenshots, or related discussions.

@kdraeder kdraeder added Documentation Improvements or additions to documentation Enhancement New feature or request Minor Minor functionality, non-critical data; easy fix state_structure notes on refactoring of state_structure_mod QCEFF quantile conserving filters labels Sep 9, 2024
@kdraeder kdraeder self-assigned this Sep 9, 2024
@hkershaw-brown
Copy link
Member

Hi @kdraeder. This is a known issue #477
Is this something you and @jlaucar are working on?
There was some discussion when Ben Gaubert was using QCEFF with CAM Chem about needing to cycle after clamping, (because clamping isn't respecting the distribution in the same way the QCEFF does), rather than just clamping and then using the QCEFF.

@kdraeder
Copy link
Contributor Author

Huh. I searched for "is:issue clamping" and 477 didn't show up.
Should I move this content to that one?

Yes, I'm setting up a QCEFF version of the CAM6 Reanalysis and using an initial ensemble from it.
It has negative values and I'm looking for a way to fix it that will be reliable and easy to use in the future,
since this seems to be not an isolated use case. But Jeff needs results soon, so I may have to resort
to using NCO tools (or ...) to fix these files.

@hkershaw-brown
Copy link
Member

use NCO

@kdraeder
Copy link
Contributor Author

Full speed ahead!

Is there anything from this issue that would be useful in #477?
If not, go ahead and close it.

@hkershaw-brown
Copy link
Member

hkershaw-brown commented Sep 13, 2024

BNRH encountering negative values (barely; -10^-156)

see #681 (maybe) #709 #717

@hkershaw-brown
Copy link
Member

related, model_nml that have clamp_or_fail "fail" is ignored.
#624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation Enhancement New feature or request Minor Minor functionality, non-critical data; easy fix QCEFF quantile conserving filters state_structure notes on refactoring of state_structure_mod
Projects
None yet
Development

No branches or pull requests

3 participants