-
Notifications
You must be signed in to change notification settings - Fork 9
Remove discontinuities in the balance op #885
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
Changes from 8 commits
8484154
dd0c5b9
2fce3cf
a77d360
6ceb6d2
2ae9fda
0bfd935
79b18b7
7ccd65d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,7 @@ module soca_vertconv_mod | |
| real(kind=kind_real) :: lz_min !> Vertical decorrelation minimum [m] | ||
| real(kind=kind_real) :: lz_mld !> if /= 0, Use MLD to calculate Lz | ||
| real(kind=kind_real) :: lz_mld_max !> if calculating Lz from MLD, max value to use | ||
| logical :: vanilla !> if true, only use the layer scaling | ||
| real(kind=kind_real) :: scale_layer_thick !> Set the minimum decorrelation scale | ||
| !> as a multiple of the layer thickness | ||
| type(soca_state), pointer :: bkg !> Background | ||
|
|
@@ -67,6 +68,10 @@ subroutine soca_conv_setup (self, bkg, geom, f_conf) | |
| if ( self%lz_mld /= 0) & | ||
| call f_conf%get_or_die("Lz_mld_max", self%lz_mld_max ) | ||
| call f_conf%get_or_die("scale_layer_thick", self%scale_layer_thick ) | ||
| self%vanilla = .false. | ||
| if ( f_conf%has("vanilla") ) then | ||
| call f_conf%get_or_die("vanilla", self%vanilla ) | ||
| end if | ||
|
|
||
| ! Associate background and geometry | ||
| self%bkg => bkg | ||
|
|
@@ -100,6 +105,9 @@ subroutine soca_calc_lz(self, i, j, lz) | |
| lz = self%lz_min | ||
| lz = max(lz, self%scale_layer_thick*abs(hocn%val(i,j,:))) | ||
|
|
||
| ! if doing vanilla vertconv, we're done! | ||
| if (self%vanilla) return | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whats the point of adding this flag? It's the same effect as setting
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤦♂️ |
||
|
|
||
| ! if the upper Lz should be calculated from the MLD | ||
| ! interpolate values from top to bottom of ML | ||
| if ( self%lz_mld /= 0 ) then | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,10 +72,13 @@ cost function: | |
| scale_layer_thick: 1.5 | ||
|
|
||
| - linear variable change name: BalanceSOCA | ||
| dsdtmax: 0.1 | ||
| dsdzmin: 3.0e-6 | ||
| dtdzmin: 1.0e-6 | ||
| nlayers: 2 | ||
| kst: | ||
| dsdtmax: 0.1 | ||
| dsdzmin: 3.0e-6 | ||
| dtdzmin: 1.0e-6 | ||
| nlayers: 999 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @guillaumevernieres I see several different values of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @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. |
||
| ksshts: | ||
| nlayers: 10 | ||
| dcdt: | ||
| filename: data_static/72x35x25/dcdt.nc | ||
| name: dcdt | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.