-
Notifications
You must be signed in to change notification settings - Fork 20
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
Make surface flux fully explicit #3670
base: main
Are you sure you want to change the base?
Conversation
71b2f5c
to
fd035dc
Compare
@dennisYatunin I don't really want to create a new |
8b0dbf0
to
a88092a
Compare
84537d0
to
0d0b16e
Compare
Could you please make sure to document the feature you added? The surface conditions code is incredibly messy and we must improve clarity. |
@@ -561,6 +564,7 @@ Base.@kwdef struct AtmosModel{ | |||
sfc_temperature::ST = nothing | |||
insolation::IN = nothing | |||
surface_model::SM = nothing | |||
surface_flux_model::SFM = nothing |
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 would prefer we didn't introduce yet another "surface" model setting. It adds complexity and confusion and makes coupling harder.
All the configurations related to the surface should be in a single place (this should include sfc_temperature
and surface_albedo
) so that we can easily understand and control them, without worrying about interdependencies and interactions.
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 don't think we can avoid a new surface model. Right now whether we apply surface flux or not is controlled by vertical diffusion, which is not ideal. So we need something else to specify it. This is different from sfc_setup
as there are some cases where we want to have surface flux (for EDMF updraft calculations), but we don't want to apply the tendency. We may be able to incorporate it within sfc_setup
, but that will make surface conditions more complicated. I will talk with Dennis to see what would be the easiest and not too confusing way for this.
Yes, I will add it once I finalize the interface with Dennis. |
Purpose
Surface flux is now used as a boundary condition for vertical diffusion tendency. When using implicit diffusion, it causes errors in conservation as surface flux is accumulated in the explicit stage, but is updated in the implicit stage. This PR moves surface flux to fully explicit by adding an explicit boundary source and setting the boundary condition of diffusion flux to 0 (except for tke, which is treated slightly differently now but we are not considering tke in conservation). This should be ok as we don't take into account any Jacobian of surface flux in the implicit solver now.
Closes #3587
To-do
Content