-
Notifications
You must be signed in to change notification settings - Fork 6
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
Improved deposition parametrisation #134
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for this PR. Adding the new parametrizations is really appreciated.
At the same time, the PR is overwhelming huge and does a lot of things. (new drydep, new wetdep, different outputs, dockerfiles, ...).
While it is scientifically interesting to see how different schemes work, this is operationally irrelevant and will make debugging very complicated, in particular if schemas are woven inside each other, if/switch statements occur too many places and variables are used in some cases, but defined in all.
Unless the different schemes can be separated clearly into files of their own, so that I don't need to see them unless I want to, I only want to have the minimum set of schemes implemented in the operational model.
Concerning the size of this PR, we will need a few rounds before it will be accepted.
integer, parameter, public :: DRYDEP_SCHEME_EMEP = 3 | ||
integer, parameter, public :: DRYDEP_SCHEME_ZHANG = 4 | ||
integer, parameter, public :: DRYDEP_SCHEME_EMERSON = 5 | ||
|
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 is no advantage in having 5 different ddep version inside of the operational snap-code. We will need ~2 different settings at the same time depending on available input.
DRYDEP_OLD hasn't been use in > 10years and should be removed.
only one of EMEP/ZHANG/EMERSON should be available in the standard-code.
else | ||
! Revised Emerson et al. (2020) | ||
EIM = 0.4 * (stokes / (0.8 + stokes)) ** 1.7 | ||
endif |
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.
spaghetti-code with too many options. The different schemes should not be intermingled, even if they have similarities. It should be very easy to read what scheme we are using.
if (drydep_scheme == DRYDEP_SCHEME_EMEP) then | ||
error stop "Reading of dry deposition is not implemented for netCDF" | ||
endif | ||
end subroutine |
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.
Does this work when we have no landclass file, i.e. with DRYDEP_NEW which we will need for most NWP-drivers.
wetdep_subcloud_scheme_t(2, "Bartnicki") | ||
type(wetdep_subcloud_scheme_t), parameter, public :: WETDEP_SUBCLOUD_SCHEME_CONVENTIONAL = & | ||
wetdep_subcloud_scheme_t(3, "Conventional") | ||
|
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.
Only two schemes needed: one with 2d precipitation one with 3d precipitation.
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 still need to discuss if we need all ddep/wdep schemes which makes will not be used.
@@ -88,9 +147,9 @@ subroutine drydep2(tstep, part) | |||
deprate = 1.0 - exp(-tstep*(0.008)/h) | |||
else if (def_comp(m)%radiusmym <= 10.0) then | |||
! particle 0.05<r<10 | |||
deprate = 1.0 - exp(-tstep*(0.002)/h) | |||
deprate = 1.0 - exp(-tstep*(0.002+part%grv)/h) | |||
else |
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.
Can you make 0.002 and 0.008 parameters, e.g.
real, parameter :: vc_gas = 0.008 ! ddep velocity for gasses in m/s
real, parameter :: vc_part = 0.002 ! ddep velocity for particles in m/s
real(real64) :: raero | ||
|
||
real(real64), parameter :: ka = 0.4 | ||
real(real64), parameter :: z = 30 ! Assumed height of surface/constant flux layer |
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.
is z in line 171 == h in line 138? Should be one parameter for the complete ddep-code.
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.
And should be related to real, parameter, public :: surface_height_sigma = 0.996
in snaptabML ?
end function | ||
|
||
pure elemental subroutine drydep_emep_vd(surface_pressure, t2m, yflux, xflux, z0, & | ||
hflux, leaf_area_index, diam, density, classnr, vd_dep, & |
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.
It is extremely useful to have a permalink/doi to the corresponding paper in the code
stokes = vs * ustar / (grav * A) | ||
else | ||
! ??????? | ||
stokes = vs * ustar * ustar / (grav * ny) |
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.
! water surface
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.
Thanks for adding the new meteorological parameters.
All meteorological parameters should be declared in snapmetML.f90 so they can be found easily.
Since old ecemep files don't have the new parameters, we will have problems with our archive for the next 25 days and with older runs saved elsewhere. It would be an advantage to have these parameters as optional.
We would like to use these new fields also for other met-inputs, in particular for ec_det but also for era5, so they shouldn't be hardcoded to ecemep.
The parametrisation is still not enabled in the snap.input files created by the frontend, which will come in a separate PR |
This is the parametrisation dry deposition and wet deposition as implemented in the two papers. All schemes are selectable through the input file, but will require specialised input for dry deposition and wet deposition in the form of an ancillary landuse file and arome meteorology.
This PR will be followed up by adapting to different sources of meteorology.