Skip to content
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

Fix uninitialized min_rand variable in Thompson MP when using SPP #516

Merged
merged 23 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
45a9e9b
Point to fork of ccpp-physics
JeffBeck-NOAA Apr 2, 2022
4992045
Point to fork of ccpp-physics
JeffBeck-NOAA Apr 2, 2022
ed166d7
Point to bugfix/SPP branch in fork of ccpp-physics
JeffBeck-NOAA Apr 2, 2022
ddd27eb
Pass SPP namelist entries outside of stochastic physics routines.
JeffBeck-NOAA Apr 5, 2022
5ada959
Update ccpp/physics pointer
JeffBeck-NOAA Apr 5, 2022
6fcdc04
Update ccpp/physics pointer
JeffBeck-NOAA Apr 6, 2022
c9cde94
Update ccpp/physics pointer
JeffBeck-NOAA Apr 6, 2022
b459cfa
Fixes to SPP metadata
JeffBeck-NOAA Apr 6, 2022
a4aee16
Update pointer to ccpp/physics
JeffBeck-NOAA Apr 6, 2022
9fdf4c0
Update ccpp/physics pointer
JeffBeck-NOAA Apr 7, 2022
41f5189
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into bug…
JeffBeck-NOAA Apr 7, 2022
74e3f71
Update pointer for ccpp/physics
JeffBeck-NOAA Apr 7, 2022
bdb6366
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into bug…
JeffBeck-NOAA Apr 8, 2022
776adc2
Update ccpp-physics pointer
JeffBeck-NOAA Apr 8, 2022
a115b5e
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into bug…
JeffBeck-NOAA Apr 12, 2022
62e7b4c
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into bug…
JeffBeck-NOAA Apr 12, 2022
c74ea44
Update ccpp/physics pointer
JeffBeck-NOAA Apr 12, 2022
ef82808
Add active attribute to spp_prt_list
JeffBeck-NOAA Apr 14, 2022
aeccbce
Add active metadata flag to spp_stddev_cutoff
JeffBeck-NOAA Apr 14, 2022
175d46d
Add active metadata flag for spp_var_list
JeffBeck-NOAA Apr 14, 2022
fc28d29
Update .gitmodules
JeffBeck-NOAA Apr 20, 2022
b9781c7
Update pointer for ccpp-physics
JeffBeck-NOAA Apr 20, 2022
cd07f75
Update ccpp-physics branch to main
JeffBeck-NOAA Apr 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,7 @@ module GFS_typedefs
integer :: n_var_spp
character(len=3) , pointer :: spp_var_list(:) ! dimension here must match n_var_spp in stochy_nml_def
real(kind=kind_phys), pointer :: spp_prt_list(:) ! dimension here must match n_var_spp in stochy_nml_def
real(kind=kind_phys), pointer :: spp_stddev_cutoff(:) ! dimension here must match n_var_spp in stochy_nml_def

!--- tracer handling
character(len=32), pointer :: tracer_names(:) !< array of initialized tracers from dynamic core
Expand Down Expand Up @@ -4150,8 +4151,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
if (Model%do_spp) then
allocate(Model%spp_var_list(Model%n_var_spp))
allocate(Model%spp_prt_list(Model%n_var_spp))
allocate(Model%spp_stddev_cutoff(Model%n_var_spp))
Model%spp_var_list(:) = ''
Model%spp_prt_list(:) = clear_val
Model%spp_stddev_cutoff(:) = clear_val
end if

!--- cellular automata options
Expand Down
16 changes: 13 additions & 3 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -4858,19 +4858,29 @@
dimensions = ()
type = integer
[spp_prt_list]
standard_name =magnitude_of_spp_perturbations
standard_name = magnitude_of_spp_perturbations
long_name = magnitude of spp perturbations
units = 1
dimensions = (number_of_spp_schemes_perturbed)
dimensions = (number_of_perturbed_spp_schemes)
type = real
kind = kind_phys
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JeffBeck-NOAA I think that the following should fix the GNU issue that was reported:
For each SPP variable that is conditionally allocated in GFS_typedefs.F90, (spp_prt_list, spp_stddev_cutoff, spp_var_list), please add the following metadata attribute
active = (do_stochastically_perturbed_parameterizations)

Copy link
Contributor Author

@JeffBeck-NOAA JeffBeck-NOAA Apr 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @grantfirl! This fixed the problem! I ended up having to apply it to spp_prt_list, spp_var_list, and spp_stddev_cutoff.

active = (do_stochastically_perturbed_parameterizations)
[spp_stddev_cutoff]
standard_name = magnitude_of_spp_standard_deviation_cutoff
long_name = magnitude of spp standard deviation cutoff
units = 1
dimensions = (number_of_perturbed_spp_schemes)
type = real
kind = kind_phys
active = (do_stochastically_perturbed_parameterizations)
[spp_var_list]
standard_name = perturbed_spp_schemes
long_name = perturbed spp schemes
units = none
dimensions = (number_of_spp_schemes_perturbed)
dimensions = (number_of_perturbed_spp_schemes)
type = character
kind = len=3
active = (do_stochastically_perturbed_parameterizations)
[spp_pbl]
standard_name = control_for_pbl_spp_perturbations
long_name = control for pbl spp perturbations
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics
2 changes: 1 addition & 1 deletion stochastic_physics/stochastic_physics_wrapper.F90
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr)
GFS_Control%input_nml_file, GFS_Control%fn_nml, GFS_Control%nlunit, xlon, xlat, GFS_Control%do_sppt, GFS_Control%do_shum, &
GFS_Control%do_skeb, GFS_Control%lndp_type, GFS_Control%n_var_lndp, GFS_Control%use_zmtnblck, GFS_Control%skeb_npass, &
GFS_Control%lndp_var_list, GFS_Control%lndp_prt_list, &
GFS_Control%n_var_spp, GFS_Control%spp_var_list, GFS_Control%spp_prt_list, GFS_Control%do_spp, &
GFS_Control%n_var_spp, GFS_Control%spp_var_list, GFS_Control%spp_prt_list, GFS_Control%spp_stddev_cutoff, GFS_Control%do_spp, &
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has a different order than what is in stochastic_physics/stochastic_physcs.F90
here:
GFS_Control%spp_var_list, GFS_Control%spp_prt_list, GFS_Control%spp_stddev_cutoff,

in stochastic_physics.F90:
spp_var_list_out, spp_stddev_cutoff_out, spp_prt_list_out

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JeffBeck-NOAA would you please reply to Phil?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like in stochastic_physics.F90, it has been changed to
spp_var_list_out, spp_prt_list_out, spp_stddev_cutoff_out

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pjpegion, @junwang-noaa, @ChunxiZhang-NOAA, yes, this problem was fixed.

GFS_Control%ak, GFS_Control%bk, nthreads, GFS_Control%master, GFS_Control%communicator, ierr)
if (ierr/=0) then
write(6,*) 'call to init_stochastic_physics failed'
Expand Down