-
Notifications
You must be signed in to change notification settings - Fork 390
Surface thickness flux spreading in MPAS-O #323
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
Surface thickness flux spreading in MPAS-O #323
Conversation
c149dff to
ab28828
Compare
|
I rebased on @maltrud please look at the |
| - fracAbsorbedPrecEvapIce * (rainFlux(iCell) + evaporationFlux(iCell)) * & | ||
| activeTracers(indexTempFlux,1,iCell)/rho_sw & | ||
| - fracAbsorbedRunoff * surfaceThicknessFluxRunoff(iCell) * ( & | ||
| + min(activeTracers(indexTempFlux,1,iCell),0.0_RKIND) )/rho_sw |
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.
Shouldn't freshwater fluxes from land ice also be included here?
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 guess sea-ice fluxes aren't included so maybe not, but what's special about rain and evap?
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 pretty sure we want to include all these other surfaceThicknessFlux terms that this change removes:
https://github.com/MPAS-Dev/MPAS-Model/blob/ocean/develop/src/core_ocean/shared/mpas_ocn_surface_bulk_forcing.F#L299-L300
https://github.com/MPAS-Dev/MPAS-Model/blob/ocean/develop/src/core_ocean/shared/mpas_ocn_surface_land_ice_fluxes.F#L269
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 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.
In looking at this a bit, I agree with @xylar here. I think the problem is that @maltrud is talking about the thickness flux spreading, but Xylar raises an important point that there is still a bug in the non local flux for KPP, which is more appropriate to #305 . Landice and seaice freshwater do get added to the heat flux and thickness flux such that the heat content doesn't change, but we need to correct for that additional flux to retain a net zero flux for KPP. As the code is right now a seaice or landice freshwater flux will create an artificially strong surface buoyancy flux which would reduce mixing.
|
An extra line needs to be added here: |
|
@xylar , for the first question, the effect of land ice is already included in activeTracersSurfaceFlux(indexTempFlux,iCell) so doesn't need to be handled explicitly. for the second question, evap and precip are forced to have water entering/leaving at the local SST (instead of at 0C as it was before). we account for that added heat with an additional surface heat flux in activeTracersSurfaceFlux(indexTempFlux,iCell). but this flux doesn't change buoyancy (only heat content) so we have to remove it from the buoyancy flux. |
|
@maltrud, your comment refers to KPP? Okay, I'll defer to you and desist on that. |
|
The issue remains that |
|
@xylar , for the third question, i chose not to touch land ice fluxes. i don't think that what i've done would change the land ice flux treatment at all. if you believe that it would be beneficial to treat land ice fluxes differently than they are now following a similar procedure, that's up to you. |
|
@xylar ok i just saw your message about needing to modify stuff under land ice--i'll check that. |
Because |
| -100.0_RKIND) ) | ||
| fracAbsorbedPrecEvapIce = 1.0_RKIND - exp( max(-layerThickness(1, iCell) / & | ||
| config_flux_attenuation_coefficient_prec_evap_ice, -100.0_RKIND) ) | ||
|
|
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 we need a third fracAbsorbed for all other thickness fluxes that are not being spread, otherwise we will not have a balance of heat fluxes and the corresponding cooling from the layer expansion from the thickness flux. Similar to my comment below.
|
yes, i was incorrect before. instead of saying i chose not to modify land ice treatment, i should have said i chose not to exempt land ice from being treated the same as other (non-runoff) thickness fluxes. if you'd like to add another attenuation scale for land ice fluxes, go ahead and do that. this PR is for water cycle, so ice cavities won't be enabled. for testing with ice cavities enabled, one can set the attenuation scale back to 0.001 to get the previous behaviour. |
|
@maltrud, if you look carefully at the line I posted before, which I will share again: With this PR, that functionality is broken unless the same treatment is added for the new |
|
ok, there are too many issues to be solved before the freeze. maybe this will get in later, maybe not. |
|
@maltrud, I'm sorry for my tone last night. As @mark-petersen kindly pointed out to me, I probably shouldn't be responding to pull requests at 1 am. It seems like @vanroekel was fine with the KPP changes made here (the remaining concerns about fluxes from land ice and sea ice seem unrelated to this PR). The only remaining change I needed was the addition of this one line: surfaceFluxAttenuationCoefficientPrecEvapIce(iCell) = config_land_ice_flux_attenuation_coefficientbelow the line: I got frustrated because it didn't seem like I was making myself very clear on this and that the runs with ice shelves might get broken in the haste to get the PR in before the code freeze. But the fix is simple enough that a quick nightly test could confirm that no harm is done once the above line is added. If you wan to push for this to happen before the code freeze, I'd support that. I'll do what I can to make sure ice-shelf runs aren't negatively affected. |
|
It was still worth having a PR with the code and issues raised for later reference. No harm done. Mat, don't worry about it now, but after you return we should discuss what is worth merging versus adding to a development list for later. @maltrud, could you please comment here on what simulations you ran with the thickness flux spreading, what parameter values you used, and what differences you saw? Were there improvements that would indicate that thickness flux spreading should be on by default in V2 simulations? |
|
@mark-petersen i did simulations with an attenuation scale 0.001, 10., and 50. meters. there were significant improvements in the 50m case, but i'm no longer fully confident in the results due to possible energy conservation issues. they're likely quite small errors, but i need to fix that before definitively saying it should be implemented in v2, especially since it won't be ready by july 15. |
This PR allows ocean surface thickness fluxes into/out of the ocean due to precipitation, evaporation, ice formation/melt, and ice runoff to be spread out vertically in a manner analogous to what is done currently for just liquid runoff. there is a new namelist variable that sets the e-folding scale of the vertical spreading profile.
this capability was added to reduce the sometimes unrealistically large vertical stability due to dumping large amounts of fresh water only in the top layer of the model.