Leverage changes from EMC to use updated stochastic physics#81
Leverage changes from EMC to use updated stochastic physics#81MingjingTong-NOAA wants to merge 2 commits into
Conversation
lharris4
left a comment
There was a problem hiding this comment.
Thank you for submitting this code for review. I do believe that there is a lot of complexity added to the SHiELD physics driver for a mostly self-contained module, and in particular a number of options and variables could be moved within the stochastic_physics_wrapper module.
| print *, 'basic control parameters' | ||
| print *, ' me : ', Model%me | ||
| print *, ' master : ', Model%master | ||
| print *, ' communicator : ', Model%communicator%mpi_val |
There was a problem hiding this comment.
I am concerned about adding MPI communicators to the physics, as much of the SHiELD physics doesn't manage its own communication. If this is specific to the stochastic physics, then it should be contained in that module. @bensonr can you comment on this?
There was a problem hiding this comment.
I've removed MPI communicators from physics and changed stochastic physics code to define communicator inside the that module.
|
|
||
| real(kind=kind_phys) :: rbcr !< Critical Richardson Number in the PBL scheme | ||
| logical :: mix_precip !< Whether to apply PBL mixing to precipitating hydrometeors | ||
| logical :: cap_evap !< Whether to apply limiter to evaperation from latent heat flux |
There was a problem hiding this comment.
Thank you for explicitly adding this option
| integer :: nca !< number of independent cellular automata | ||
| integer :: nlives !< cellular automata lifetime | ||
| integer :: ncells !< cellular automata finer grid | ||
| integer :: nca_g !< number of independent cellular automata |
There was a problem hiding this comment.
Eventually the stochastic physics options should go in a separate stochastic_physics_nml
There was a problem hiding this comment.
Current only three stochastic physics namelist variables are used. We can make this change when we explore other options of stochastic physics.
| !< ivegsrc = 2 => UMD (13 category) | ||
| integer :: isot !< isot = 0 => Zobler soil type ( 9 category) | ||
| !< isot = 1 => STATSGO soil type (19 category) | ||
| real(kind=kind_phys), pointer :: pores(:) => null() !< max soil moisture for a given soil type for land surface model |
There was a problem hiding this comment.
Variables only used within stochastic_physics_wrapper would ideally be contained entirely within that module, possibly in a datatype defined for that module.
There was a problem hiding this comment.
I adopted pores and resid from UFS. They are from land surface models not entirely with in stochastic_physics_wrapper. I will leave it there for future applying perturbations to land state.
| @@ -2654,36 +2723,48 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & | |||
| !---Cellular automaton options | |||
There was a problem hiding this comment.
What do these CA parameters do? In particular pert_radtend is referenced from GFS_physics_driver.F90 and a brief explanation would be helpful to understand the driver logic.
There was a problem hiding this comment.
The meaning of those variables has been added
| @@ -1,5 +1,6 @@ | |||
| module GFS_typedefs | |||
|
|
|||
| use mpi_f08 | |||
There was a problem hiding this comment.
All MPI related functionalities should be done through FMS
There was a problem hiding this comment.
@JosephMouallem Can you show me an example how to do this through FMS? Thanks.
There was a problem hiding this comment.
@MingjingTong-NOAA You could directly import any related mpi functionality from fms modules, their name usually start with mpp_, here is an example:
use mpp_mod, only: mpp_pe, mpp_sync_self, mpp_sync, ...
If you could let me know what is needed here, I can point you to the right calls.
There was a problem hiding this comment.
@JosephMouallem I need to pass a MPI communicator to stochastic physics routines. Please take a look at stochastic_physics/stochastic_physics_wrapper.F90 to see how I pass the communicator. The subroutines called in stochastic_physics/stochastic_physics_wrapper.F90 can be found here /gpfs/f6/bil-coastal-gfdl/scratch/Mingjing.Tong/SHiELD/shield_da_merge/SHiELD_SRC/stochastic_physics/
Thanks.
There was a problem hiding this comment.
I've removed the MPI communicator from physics.
| type GFS_init_type | ||
| integer :: me !< my MPI-rank | ||
| integer :: master !< master MPI-rank | ||
| type(MPI_Comm) :: fcst_mpi_comm !< forecast tasks mpi communicator |
|
|
||
| integer :: me !< MPI rank designator | ||
| integer :: master !< MPI rank of master atmosphere processor | ||
| type(MPI_Comm) :: communicator !< MPI communicator |
There was a problem hiding this comment.
Same comment as above and for all related code that follows.
| logical :: param_update_flag | ||
|
|
||
| #ifdef _OPENMP | ||
| nthreads = omp_get_max_threads() |
There was a problem hiding this comment.
I think this should be done upstream and not here
…c namelist parameters, pass nthreads into stochastic_physics/stochastic_physics_wrapper.F90 from upstream routine
lharris4
left a comment
There was a problem hiding this comment.
I think this is good. I'm a bit concerned about the profusion of new variables but the SHiELD physics needs a general cleaning up anyway.
|
@JosephMouallem @laurenchilutti can you take a look at @MingjingTong-NOAA's PR? |
Description
This PR include changes made to use updated stochastic physics
Fixes # (issue)
A forecast test was run to compare with the main branch and the results are bit-wise identical.
Checklist:
Please check all whether they apply or not