Closed zhangshixuan1987 closed 1 year ago
The logical flag l_modify_bc_for_cnvg_test
in the attached commits was added to the clubb_config_flags
derived type. Upon inspection of the code, the l_modify_bc_for_cnvg_test
flag seems to act entirely within the context of clubb_driver.F90
. However, it's inclusion within clubb_config_flags
derived type forces alterations in other files in the CLUBB code, as well as in host model argument lists (as clubb_api_module
is affected as well).
I think it would be simpler and appropriate to remove l_modify_bc_for_cnvg_test
from clubb_config_flags
and make it a namelist logical, exactly like the l_modify_ic_with_cubic_int
that was introduced in #9. Not only is this approach much less intrusive, but it also allows us to turn on the modified B.C. on a case-by-case basis. Since the modified soundings are turned on only for certain cases as well, this solution seems to be a good match.
The logical flag
l_modify_bc_for_cnvg_test
in the attached commits was added to theclubb_config_flags
derived type. Upon inspection of the code, thel_modify_bc_for_cnvg_test
flag seems to act entirely within the context ofclubb_driver.F90
. However, it's inclusion withinclubb_config_flags
derived type forces alterations in other files in the CLUBB code, as well as in host model argument lists (asclubb_api_module
is affected as well).I think it would be simpler and appropriate to remove
l_modify_bc_for_cnvg_test
fromclubb_config_flags
and make it a namelist logical, exactly like thel_modify_ic_with_cubic_int
that was introduced in #9. Not only is this approach much less intrusive, but it also allows us to turn on the modified B.C. on a case-by-case basis. Since the modified soundings are turned on only for certain cases as well, this solution seems to be a good match.
Sounds good to me.
I altered the code as such and applied to the modified surface fluxes to the same group of cases that we have modified soundings for. The results are here: plot_update_bdrw.pdf.
Looks fine to me.
I should also note that when the l_modify_bc_for_cnvg_test
is turned off, we achieve bit-for-bit results (as noted in the introduction).
@bmg929 @vlarson : Hi Vince and Brian, Thank you for working on this commit. The changes sound good to me as well. @bmg929: The figures you attached look consistent with the test on my side. The noticeable changes will be seen in RICO case when l_modify_bc_for_convergence_test is turned on as this case used the quantities at bottom model level to drive the surface fluxes. Please let me know if there is no other concerns after your suggested modifications, then I will continue to submit other pull requests.
Sounds good to me. @bmg929, when you're happy with the code and results, please feel free to merge in this pull request.
Sounds good to me. @bmg929, when you're happy with the code and results, please feel free to merge in this pull request.
The code from this pull request has been merged into the main CLUBB repository.
Hi Vince and Brian (@vlarson @bmg929):
This pull request contains the code changes to implement an option to activate modified boundary conditions that are proved to be essential to obtain first-order convergence in CLUBB-SCM.
In the current default CLUBB, the quantities (e.g. wind, temperature, and humidity) at the bottom model level (usually the 2nd or 1st levels) are passed to the surface flux module to calculate the surface fluxes (e.g. wprtp and wpthlp, upwp and vpwp at the surface). When we refine the model vertical grid, the bottom model level will become closer and closer to the surface, the quantities at the 1st or 2nd model level show a strong dependence on model vertical resolution, and the development of clouds is different. The code changes in this pull request attempt to add an option that allows CLUBB to calculate the surface fluxes at a fixed 25m (currently the default setup in this pull request code) model height. The figure below show the results for RICO case with default (i.e. surface fluxes depend on resolution) and revised (surface fluxes calculated at fixed 25m model height): rico_sfc_flux_dz_dependence.pdf. You can see that the surface fluxes and development of the cloud (during hours 1.5-2.5 ) change with the model resolution in the left column, while cloud development in simulations with different resolutions becomes more consistent in the right column when the surface fluxes are calculated at fixed 25m model height.
To implement the new option, I introduced a new subroutine read_surface_var_for_bc() in src/ to obtain the surface quantities used to compute the surface fluxes. Associated code changes are also made in These code modifications results in bit-for-bit results when the model is run with default setup, see figures below:
The flag variable "l_modify_bc_for_cnvg_test" is introduced to control the use of the newly introduced option. Here, l_modify_bc_for_cnvg_test is put in the "model_setting" section in CLUBB namelist (rather than adding it to the configurable_clubb_flags_nl). The flag is set to .false. by default. The user can add " l_modify_bc_for_cnvg_test = .true." in the *.in file to activate the optional surface flux calculation. Here I run a set of test simulations with default configurations in CLUBB except with
respectively. The simulations were run on the standard grid with 60s time step.
When the l_modify_bc_for_cnvg_test = .true., the model results are non-bit-for-bit compared with the default CLUBB, but the changes are still relatively small: