-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fixup ISOMIP+ land ice pressure #723
base: main
Are you sure you want to change the base?
Fixup ISOMIP+ land ice pressure #723
Conversation
TestingOcean0 and thin_film_Ocean0 test cases have been run on chrys with intel, openmpi. thin_film_wetting_Ocean0 has been run through initial_state step to verify time-varying forcing. |
@xylar Can you let me know what you think? I ended up doing something a little different from you to make the |
ref_density = constants['SHR_CONST_RHOSW'] | ||
landIcePressure, landIceDraft = compute_land_ice_pressure_and_draft( | ||
ssh=ds.ssh, modify_mask=ds.ssh < 0., ref_density=ref_density) | ||
land_ice_draft = ds.ssh |
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.
The reason I don't do this for the thin film case in Polaris is because the ocean won't want to have the SSH at the flotation height that BISICLES wants to give it. This is at least partly because BISICLES used a different reference density for the ocean (1028 instead of 1026) and partly because it has been my experience that computing the ice draft (SSH) from the land-ice pressure and the reference ocean density tends to produce the most reliable starting point for the SSH adjustment step.
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'm not sure if this will help with the state validation issues during SSH adjustment for the thin-film case but I think it might.
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 discovered that I was missing a check in my Polaris computation of land_ice_draft:
land_ice_draft = np.maximum(ds_topo.bedrockTopography,
land_ice_draft)
We obviously don't what to allow the ice draft to go deeper than the bedrock in the thin film region.
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.
If that's the case, then wouldn't we want to assign the ssh to the recomputed land ice draft for both thin film and non-thin film cases?
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.
We could certainly do that. It would dovetail better with the coupling strategy.
The reason I had been working with SSH/draft as the known quantity and land-ice pressure as the one to adjust was that this is more how we operate with static cavities with realistic topography (e.g. from BedMachine). Without wetting and drying, you can end up with too thin a water column if you are using land-ice pressure to determine SSH. But we could either adjust the grounding line if this happens. We can't adjust the minimum column thickness unless we also change the land-ice pressure because otherwise the pressure will just slam the column back down.
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 modify the bottom depth to maintain min water column thickness here:
compass/compass/ocean/tests/isomip_plus/initial_state.py
Lines 156 to 167 in b977252
# Deepen the bottom depth to maintain the minimum water-column | |
# thickness | |
min_column_thickness = section.getfloat('min_column_thickness') | |
min_layer_thickness = section.getfloat('min_layer_thickness') | |
min_levels = section.getint('minimum_levels') | |
min_column_thickness = max(min_column_thickness, | |
min_levels * min_layer_thickness) | |
min_depth = -ds.ssh + min_column_thickness | |
ds['bottomDepth'] = np.maximum(ds.bottomDepth, min_depth) | |
print(f'Adjusted bottomDepth for ' | |
f'{np.sum(ds.bottomDepth.values<min_depth.values)} cells ' | |
f'to achieve minimum column thickness of {min_column_thickness}') |
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.
Right. In my experience, the only to have things behave robustly without wetting-and-drying has been to treat the water-column thickness as the thing you know and the land-ice pressure as the thing you can adjust (in the poorly named "ssh adjustment" step). Even if you thicken the water column in the initial condition, if the land-ice pressure is too high, it will just slam right back down and try to evacuate the water column.
@xylar Does the latest commit look like what you have in mind? It results in these water column thicknesses: |
Yes exactly, that looks great to me! Are you happy with it thought? I definitely want to make sure we're on the same page. |
@xylar I'm fine with that. I can add the same thing to the time-varying forcing. I assume we keep the floating fraction the same, to mimic a case where the GL is different in MALI from MPAS-O. Do you agree? |
Right, I agree. We want to treat the floating fraction as something that is prescribed or supplied by MALI, so it doesn't get updated based on whether MPAS-Ocean thinks the cell is wet or dry. |
@xylar Following up on your question earlier: Wetting and drying is on for thin-film cases, forward and ssh-adjustment steps, so that is not the issue with ssh_adjustment failures. |
@xylar Just wanted to make sure this was still on your radar to review. No particular rush. |
Yes, I think this was where we were discussing going back to one strategy where we trust |
@xylar Right, that's worth chatting about. I was assuming we merge this PR and tackle the digging strategy in a separate PR. |
Okay, let's just focus on the thin film here and I'll make a follow-up PR to change the strategy for the non-thin-film cases. I could do a rush review tonight but it would be better if it's on my list for tomorrow. |
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 ran all of the 5 km test cases. I'm seeing a failure in initial_state
in:
ocean/isomip_plus/planar/5km/z-star/time_varying_Ocean0
because of the missing landIceDraft
variable noted below.
I'm seeing state validation failures in the performance
steps of:
ocean/isomip_plus/planar/5km/z-star/thin_film_time_varying_Ocean0
ocean/isomip_plus/planar/5km/sigma/thin_film_time_varying_Ocean0
ocean/isomip_plus/planar/5km/sigma/thin_film_wetting_Ocean0
ocean/isomip_plus/planar/5km/single_layer/thin_film_drying_Ocean0
ocean/isomip_plus/planar/5km/single_layer/thin_film_time_varying_Ocean0
ocean/isomip_plus/planar/5km/single_layer/thin_film_wetting_Ocean0
This is causing the test to hang, which is especially annoying but unrelated to this PR, of course.
I'm not sure how many of these need investigation as part of this PR and which we just let be for now and investigate going forward. That's partly because there are now a lot of tests and I'm not sure I have a good handle on when they're all supposed to be working.
3902ae8
to
0a21b83
Compare
0a21b83
to
73e20b9
Compare
@xylar FYI: I'm finding that the run hangs at the performance step of |
@cbegeman, I think the hanging itself isn't related to this PR. It seems to happen sometimes when MPAS-Ocean fails with state validation errors but I don't understand why this leads to hanging as opposed to MPAS-Ocean returning an error. But it's worth trying to fix the state validation issues so the hanging doesn't happen. |
73e20b9
to
aea2ec7
Compare
Oops! comment posted on the wrong PR |
aea2ec7
to
e285b25
Compare
@xylar I haven't yet tested all the cases, but this seems to be working now |
This PR changes the calculation of land ice pressure for ISOMIP+ thin-film test cases so that it is a function of the land ice thickness rather than land ice draft. The land ice pressure is not perfectly identical between
Ocean0
andthin_film_Ocean0
test cases, mostly because in the former case we smooth the draft and in the latter we smooth ice thickness. This PR also fixes a bug wherein the thin film region was culled from the domain.Checklist
api.rst
) has any new or modified class, method and/or functions listedTesting
in this PR) any testing that was used to verify the changes