-
Notifications
You must be signed in to change notification settings - Fork 434
New spatially-variable horizontal upwind capability #7371
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
New spatially-variable horizontal upwind capability #7371
Conversation
TestingParabolic bowl test has been run and found to have similar convergence and error. Drying slope ramp test also qualitatively similar when ramp extends from thin film thickness to 1m and upwinded to centered transitions between water column thickness of 1m - 5m. IcoswISC240/WOA23/performance_test runs with diffs when spatially variable upwinding is on between 5m - 50m Passes the e3sm_cryo_developer suite on Chrysalis with the feature off Passes the |
@sbrus89 Would you mind giving the code a look and letting me know whether you would be satisfied for this to go in without the results of your hurricane test? |
@sbrus89 Let me know if you have any questions about this PR |
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.
@cbegeman, This looks good by inspection. I just have one minor comment. Sorry for the delay on the review.
@@ -985,7 +985,43 @@ subroutine ocn_diagnostic_solve_layerThicknessEdge(normalVelocity, & | |||
#endif | |||
|
|||
end if | |||
|
|||
if (config_use_spatially_variable_upwind) then |
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.
There should probably be a check to make sure in the init routine to require config_thickness_flux_type = 'upwind'
with config_use_spatially_variable_upwind=.true.
. I suppose there's no harm in leaving config_use_spatially_variable_upwind=.true.
on for config_thickness_flux_type = 'centered'
, but right now it will silently do a needless interpolation between the same values.
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.
Good point. I'll add that.
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.
@sbrus89 This check is in case (thickEdgeFluxUpwind)
so I don't think there is a needless interpolation. Let me know if you see something that I don't.
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.
Ah, you're right; I missed that. Thanks!
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 think this looks good so far! It needs a stealth test. @cbegeman, would you like help adding one?
I'm going to test this out with a short (5 day) SORRMr4 run where I'm writing out |
@xylar Go for it. If you want upwinding to be on, just make sure that the upwinding range isn't below the minimum wct for that mesh. |
Very good point! |
@cbegeman, I tried to run with:
The run is here:
It crashed about 10 minutes in with a state validation error. I can debug on Friday if needed but probably won't get to it before then. Just wanted to point it out in case you want to look into it earlier. I'll run the same test without upwinding to make completely sure it works.
|
de06dc1
to
d692dad
Compare
@xylar I'll see if I can run compass's |
Ah, that certainly does seem plausible. If so, just running with super short time steps is worth a go. Update: Reducing the time step even to 10 seconds from 10 minutes didn't help. I'm seeing a crash around 0001-01-01_01:10:00 in every simulation. (So about 40 minutes in, as the simulation appears to start at 30 minutes into day 1.) I misspoke above. I'm also seeing annoying hangs without the job ending as reported in: |
@cbegeman, I tried running:
I'm seeing errors like:
This is pointing at the line:
I verified that the test runs fine when I remove
But that didn't change the results (perhaps unsurprisingly). I suspect we might be seeing negative layer thicknesses or something like that, but I haven't yet dived deeper. Let me know if you have thoughts on this. |
@xylar Using the split_explicit time integrator, the IcoswISC mesh passes (1 month simulation) while the SORRM mesh still fails. Instability with the SORRM mesh likely does not indicate an issue with this feature but rather that we also need wetting-and-drying to be active. As such, I think we can proceed with making this a stealth feature. |
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.
@cbegeman, sounds good to me.
I reran:
./create_test SMS_D_Ld1.TL319_IcoswISC30E3r5.GMPAS-JRA1p5.chrysalis_intel.mpaso-upwind_advection --wait
and with the switch to split-explicit time stepping, it now works for me, too.
I agree that we can investigate SORRM further in combination with wetting-and-drying updates that you have waiting in the wings.
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.
Approved based on inspection and others' testing.
@cbegeman -- if this is a stealth feature, we need to add a test to the e3sm_ocnice_stealth_features suite? Or does this reuse the SMS_D_Ld1.T62_oQU240.GMPAS-IAF.mpaso-upwind_advection test that's already there? |
@cbegeman -- does this PR need the scripts run to make the bld files consistent with Registry? I don't see changes to build-namelist |
It does reuse that case. I think it fulfills testing upwind advection to apply upwinding to part of the domain with spatially vairable upwinding. |
@cbegeman -- yes, it's necessary to make changes to build-namelist. The build-namelist-section file doesn't actually get used for anything but is mostly a product of the generate_e3sm_namelist_files script. It has to get mirrored in build-namelist itself to actually be used. |
@jonbob Thanks! I seem to frequently forget at least one of the many places to update the namelist! |
#7371) New spatially-variable horizontal upwind capability Here we add a new capability to transition between centered and upwinded horizontal thickness advection as a function of column thickness. Formerly, either thickness advection was centered or upwinded everywhere. With this PR, when config_use_spatially_variable_upwinding is .true., advection is fully upwinded when the column thickness is less than config_spatially_variable_upwind_hmin and fully centered when column thickness is greater than config_spatially_variable_upwind_hmax. Between these values, there is a linear transition layerThickEdgeFlux [NML] [BFB] stealth feature
Passes:
with expected NML DIFFs. Also successfully ran:
merged to next |
merged to master and expected NML DIFFs blessed on all machine except pm-cpu, which has yet to report |
also blessed on pm-cpu |
Thank you for all your testing and moving this forward, @jonbob! |
Here we add a new capability to transition between centered and upwinded horizontal thickness advection as a function of column thickness.
Formerly, either thickness advection was centered or upwinded everywhere. With this PR, when
config_use_spatially_variable_upwinding
is.true.
, advection is fully upwinded when the column thickness is less thanconfig_spatially_variable_upwind_hmin
and fully centered when column thickness is greater thanconfig_spatially_variable_upwind_hmax
. Between these values, there is a linear transitionlayerThickEdgeFlux
[NML]
[BFB] stealth feature