-
Notifications
You must be signed in to change notification settings - Fork 321
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
A new physically based dust emission scheme with more aeolian physics (updated) #1897
Conversation
Do a diff of the dmleung DUSTEMIS branch based off of release-clm5.0.34 to ctsm5.1.dev106 and apply the diff after updating the paths for namelist_definition and lnd_import_export.F90 in the diff. git apply -3 dust.diff Diffs with conflicts: modified: src/biogeochem/DUSTMod.F90 modified: src/biogeophys/SoilStateInitTimeConstMod.F90 modified: src/main/controlMod.F90 modified: src/cpl/mct/lnd_import_export.F90 The changes in lnd_import_export were to change a check for negative LW that seems to be removed in the latest version.
…abort, don't output USTAR as FV is already output in FrictionVelocity
…ybrid drag partitioning. (previous use of wt_lunit in DUSTMod was not working because wt_lunit was deallocated after CTSM initialization.)
…m the cesm2_3_beta09 tag
…orce the outgoing longwave radiation to be non-negative.
…to 5. (14 Nov 2022)
…to 5. (14 Nov 2022)
…on; code cleanup dmleung 14 Nov 2022
Erik enabled outputting fv (FV) in FrictionVelocityMod.F90 14 Nov 2022
…rigent's roughness data
modified clm_instMod.F90. Now CTSM can compile successfully. 31 Jan 2023
…ct (25 Feb 2023).
…gh_fct) since the stream methods is here (dmleung 31 Mar 2023)
I ran the test list for the PR as it is, and ran into a bunch of problems on cheyenne, that will need to be resolved. Hopefully, most of these issues are cascading errors from one or two problems and not a long list of individual problems. There was 57 tests that passed, do In this iteration the new scheme is hardcoded to on, so we don't have to have special tests for the new scheme. But, we want to ensure that the new scheme works in all cases so it's a good to run it in all configurations to see what it fails in.
|
@dmleung and I went over this today. I'm getting a floating point exception in the following line in the code when DEBUG=TRUE. As you can see at the top a divide by zero is already protected against. We are both going to work on this and come up with a solution that we'll agree on... if ((12_r8 - 0.5_r8 * stblty(p)) .GE. 0.001_r8) then
u_sd_slt(p) = wnd_frc_slt * (12_r8 - 0.5_r8 * stblty(p))**0.333_r8
else
u_sd_slt(p) = 0.001_r8 ! should have used 0 theoretically; used 0.001 here to avoid undefined values
end if
! threshold velocities
! Here wnd_frc_thr_slt is the fluid threshold; wnd_frc_thr_dry(p) is the dry fluid threshold; B_it*wnd_frc_thr_dry(p) is the impact threshold, -dml, 1 Mar 2021
! fluid threshold wind at 0.1 m saltation height
u_fld_thr(p) = (wnd_frc_thr_slt/k) * log(0.1_r8 / 1e-4_r8)
! impact threshold wind at 0.1 m saltation height
u_impct_thr(p) = (wnd_frc_thr_slt_it/k) * log(0.1_r8 / 1e-4_r8) ! to avoid model error
! threshold crossing rate
thr_crs_rate(p) = (exp((u_fld_thr(p)**2_r8 - u_impct_thr(p)**2_r8 - 2_r8 * u_mean_slt(p) * (u_fld_thr(p) - u_impct_thr(p))) / (2_r8 * u_sd_slt(p)**2_r8)) + 1_r8)**(-1_r8) |
…exp is going to be large and thus end up with a very small term
… that's the default and it's not needed
…nd Leung dust tests
…ssFracClayLeung2023 function
… default inactive
…or Leung 2023 dust emissions
… the nan handling inside of DustEmissions for Leung is not sufficient
…g for it (since downstream values can be corrupted if it's NaN or zero), also use shr_infnan_isnan for intrmtncy_fct
…ge tolerance to accomidate that, use asserts rather than endrun in the test code, increase fv and obu for one of the tests
… a decimal, and remove subname in favor of giving line and filename with errmsg
Tests look as expected. Izumi finished, while Derecho has some tests in the develop queue still running, but I'll let them finish and report on any problems afterwards. |
Hi, I am using the default CESM 2.1.3. I have recently read articles related to this code. I want to apply this solution to my model setup, can I know exactly how I should use the code he provided. Do I need to upload all the files in the Files Changed to the corresponding directory in my cesm. My email is [email protected] and I would appreciate any help I can get. Best wishes! |
Hi @wangbr2023 , thanks for your interest! |
This is an updated version of proposed code changes based on the recent ctsm version (ctsm5.1.dev106-7). This PR will replace the previous PR (#1712) with code changes based on the older clm version (release-clm5.0.35-14). PR #1712 will be closed later. The descriptions below are slightly modified but largely the same as those in PR #1712.
Description of changes
This is a scheme that builds upon issue #1230 and #1604 which switched CESM2's default dust emission scheme (Zender et al., 2003) to @jfkok's more physical and less empirical one (Kok et al., 2014). Based on #1230 's edits, #1604 's modifications add new aeolian physics to the Kok's scheme, most notably, by adding the roughness effect (or called drag partition effect) which discounts surface soil erosion by winds due to the presence of local-scale land-surface roughness elements (mostly plants and rocks). We use a hybrid approach to account for both roughness from rocks (with a 2-D time-invariant dataset provided by Prigent et al., 2005; 2012) and roughness from plants (time-varying, as a function of CLM's LAI). We further include the dust emission intermittency effects due to boundary-layer turbulence.
Changes in files mainly include:
src/biogeochem/DUSTMod.F90
src/biogeophys/SoilStateInitTimeConstMod.F90
(Updates on 3 Feb 2023:
Current method: reading in Prigent's small-scale roughness dataset following the streams approach)
src/cpl/share_esmf/PrigentRoughnessStreamType.F90
src/main/clm_inst.F90
bld/namelist_files/namelist_defaults_ctsm.xml
bld/CLMBuildNamelist.pm
bld/namelist_files/namelist_definition_ctsm.xml
(Old method to be removed: reading in Prigent's small-scale roughness dataset following the fsurdat approach)
src/biogeophys/SoilStateType.F90
src/main/controlMod.F90
src/main/clm_varctl.F90
bld/namelist_files/namelist_definition_ctsm.xml
user_nl_cam
user_nl_clm
Specific notes
CAM applies a source function (for Charlie Zender’s scheme) to the CLM dust emissions. In CESM, the dust emission calculation isn’t finished in CLM and is further processed in CAM before CAM calculates the transport. Because of this, when changing from Zender's scheme to our scheme one also needs to comment out the code block in CAM relevant to the source function. The relevant changes should be made in this file:
cam/src/chemistry/modal_aero/dust_model.F90
We also posted an issue (#1836 and ESCOMP/CAM#651) to propose moving the source function from CAM to CLM.
Francis Vitt has posted a PR (ESCOMP/CAM#748) to remove Zender's source function and global tuning factor from CAM (Updated on 3 Feb 2023).
Contributors other than yourself, if any:
@ekluzek
CTSM Issues Fixed (include github issue #):
Fixes #1604
Are answers expected to change (and if so in what way)? Yes
Any User Interface Changes (namelist or namelist defaults changes)?
Yes. For now, mainly
bld/namelist_files/namelist_definition_ctsm.xml
Testing performed, if any:
The changes above were used to simulate an I case (using GSWP3 met fields) and an F case (CAM6 nudged toward MERRA-2 met fields).
They have not been tested following the guideline yet.
Definition of ready: