Remove discontinuities in the balance op #885
Conversation
| if (layer_depth%val(i,j,k) < mld%val(i,j,1)) then | ||
| jac(k) = 0.0_kind_Real | ||
| end if | ||
| coef_mld = soca_tanh_filt(layer_depth%val(i,j,k),mld%val(i,j,1)) |
There was a problem hiding this comment.
I know you don't totally agree with how the nemovar balances were implemented, but I believe they set the jacobian to 0 at the surface and linearly interpolate down to the MLD, instead of such a sharp cutoff. Thoughts on trying that (someday?)
| lz = max(lz, self%scale_layer_thick*abs(hocn%val(i,j,:))) | ||
|
|
||
| ! if doing vanilla vertconv, we're done! | ||
| if (self%vanilla) return |
There was a problem hiding this comment.
whats the point of adding this flag? It's the same effect as setting Lz_mld: 0 in the yaml
There was a problem hiding this comment.
🤦♂️
🍨 ?
| dsdtmax: 0.1 | ||
| dsdzmin: 3.0e-6 | ||
| dtdzmin: 1.0e-6 | ||
| nlayers: 999 |
There was a problem hiding this comment.
@guillaumevernieres I see several different values of nlayers depending on the tests here. What values would you recommend for the real-world config?
There was a problem hiding this comment.
@travissluka We need to turn it off for the global until we properly test it and add a high latitude limit. 999 would turn it off. Omitting the kst config in the yaml to turnt kst off might be a better idea.
10 maybe in the hat10?
fd52b31 to
79b18b7
Compare
travissluka
left a comment
There was a problem hiding this comment.
Thanks for doing this. 2 minor things, but otherwise looks good. (also, would it be worthwhile to add the capability, someday, to output the jacobians so that we can look at them to help with debugging?)
- remove the
vanillastuff and use the existing paramters - instead of cramming in a
999, make it so that you can omitkstorksshtsin the yaml to turn off those sections?
Will do. Thanks for the review @travissluka . |
travissluka
left a comment
There was a problem hiding this comment.
Thanks, @guillaumevernieres
Since soca-science CI is currently broken, I'll go ahead and merge this and try to get the associate soca-sci changes merged in later today.
* Use SABER blocks chaining for training (#852) * Adapt to name changes in ufo (#867) * Use VertInterp instead of MarineVertInterp (#874) * remove linear var change from ensevariance ctest (#881) * Bugfixes for BUMP (#869) * A few fixes to the Model to Analysis variable change (#847) * Remove discontinuities in the balance op (#885) * set to min/max instead of 0 * ... * vanilla vert conv * tidy sign * removed jac_mask * tanh filt * updated yamls and test refs * merge develop and update answers after the develop history MESS i created * code tidy/removed vanilla --------- Co-authored-by: Travis Sluka <tsluka@ucar.edu> * default plots (#888) Co-authored-by: Travis Sluka <tsluka@ucar.edu> * add VADER to SOCA (#887) * add vader to build, but dont use it * add State::fromFieldSet * variablechange "uses" vader * switched to ens. templ. (#894) * Implementation of EnsMeanAndVariance (#892) * added the ensmeanandvariance app * ... --------- Co-authored-by: Travis Sluka <tsluka@ucar.edu> * Read the std. dev. instead of the variance (#896) * skip sqrt, saving optional * forgot test yaml * Update test/testinput/varchange_bkgerrsoca_stddev.yml Co-authored-by: Travis Sluka <tsluka@ucar.edu> --------- Co-authored-by: Travis Sluka <tsluka@ucar.edu> * Use the generic oops interpolator (#898) * use oops interpolation * to_fieldset_ad * forgot some halo masks * fix horizfilt * fix some test answers * letkf workaround for missing val bug * work around for getvalues test * change obs input to have 1 guaranteed land point * Update version (#899) * remove ewok repo (#889) Co-authored-by: Yannick Trémolet <30638944+ytremolet@users.noreply.github.com> * Merge B matrix-related applications (#890) * Merge B matrix-related applications * Trigger tests --------- Co-authored-by: Benjamin Menetrier <benjamin.menetrier@irit.fr> Co-authored-by: Travis Sluka <tsluka@ucar.edu> * update for VADER PR#586 (#902) * add ModelData * fix coding norms * Update CMakeLists.txt * Fix vertical gradient (#914) * a fix dvdz * Updating test references --------- Co-authored-by: Hyun-Chul.Lee <Hyun-Chul.Lee@noaa.gov> * libs in soca * Commend out dirac.x test and disable ecbuild_install_project as we did for fv3-jedi prevent the following error: -- Configuring done CMake Error in soca/src/soca/CMakeLists.txt: Target "soca" INTERFACE_LINK_DIRECTORIES property contains path: "/Users/heinzell/work/ufs-bundle/20230714/ufs-bundle-use-jedi-develop/soca/src/soca/." which is prefixed in the source directory. -- Generating done CMake Generate step failed. Build files cannot be regenerated correctly. * Apply same bug fix as for fv3-jedi to fix missing linker path for MPI libraries due to ESMF bug --------- Co-authored-by: Benjamin Menetrier <benjamin.menetrier@irit.fr> Co-authored-by: Wojciech Śmigaj <w.smigaj@gmail.com> Co-authored-by: Travis Sluka <tsluka@ucar.edu> Co-authored-by: Guillaume Vernieres <guillaume.vernieres@noaa.gov> Co-authored-by: Yannick Trémolet <30638944+ytremolet@users.noreply.github.com> Co-authored-by: Benjamin Menetrier <30638301+benjaminmenetrier@users.noreply.github.com> Co-authored-by: Kriti Bhargava <kritib@ucar.edu> Co-authored-by: Hyun-Chul.Lee <Hyun-Chul.Lee@noaa.gov> Co-authored-by: Dom Heinzeller <dom.heinzeller@icloud.com>
Description
This is not going to suddenly massively improve our forecast skills or analysis, but the filtering of the jacobians of the linearized balances was not handled properly.
What this PR does:
tanhfilterwhere
nlayersis the index at which the filter = 0.5 ... No parameter to configure the slope.vanillaoption for the vertical convolution. It's meant to by-pass a chunk of configuration that was meant to confuse people with slight dyslexia ...Issue(s) addressed
Testing
How were these changes tested?
What compilers / HPCs was it tested with?
Are the changes covered by ctests? (If not, tests should be added first.)
Dependencies
A change of
yamlconfig will be necessary in a few downstream repos (soca-sci, gdasapp, ...)