Skip to content

Commit

Permalink
Namelist updates associated with new CA scales (NCAR#414)
Browse files Browse the repository at this point in the history
Improved scales of CA for P8
  • Loading branch information
lisa-bengtsson authored Nov 10, 2021
1 parent 699d1e2 commit b5bdf4c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
GFS_data%IntDiag, Init_parm, GFS_Diag)
call FV3GFS_restart_read (GFS_data, GFS_restart_var, Atm_block, GFS_control, Atmos%domain, Atm(mygrid)%flagstruct%warm_start)
if(GFS_control%do_ca .and. Atm(mygrid)%flagstruct%warm_start)then
call read_ca_restart (Atmos%domain,GFS_control%scells,GFS_control%nca,GFS_control%ncells_g,GFS_control%nca_g)
call read_ca_restart (Atmos%domain,GFS_control%ncells,GFS_control%nca,GFS_control%ncells_g,GFS_control%nca_g)
endif
! Populate the GFS_data%Statein container with the prognostic state
! in Atm_block, which contains the initial conditions/restart data.
Expand Down
28 changes: 14 additions & 14 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1113,8 +1113,8 @@ module GFS_typedefs

!---cellular automata control parameters
integer :: nca !< number of independent cellular automata
integer :: tlives !< cellular automata lifetime
integer :: scells !< cellular automata finer grid
integer :: nlives !< cellular automata lifetime
integer :: ncells !< cellular automata finer grid
integer :: nca_g !< number of independent cellular automata
integer :: nlives_g !< cellular automata lifetime
integer :: ncells_g !< cellular automata finer grid
Expand All @@ -1127,7 +1127,6 @@ module GFS_typedefs
logical :: ca_smooth !< switch for gaussian spatial filter
integer(kind=kind_dbl_prec) :: iseed_ca !< seed for random number generation in ca scheme
integer :: nspinup !< number of iterations to spin up the ca
real(kind=kind_phys) :: rcell !< threshold used for CA scheme
real(kind=kind_phys) :: nthresh !< threshold used for convection coupling
real :: ca_amplitude !< amplitude of ca trigger perturbation
integer :: nsmooth !< number of passes through smoother
Expand Down Expand Up @@ -3465,8 +3464,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

!---Cellular automaton options
integer :: nca = 1
integer :: scells = 2600
integer :: tlives = 1800
integer :: ncells = 5
integer :: nlives = 12

integer :: nca_g = 1
integer :: ncells_g = 1
integer :: nlives_g = 100
Expand All @@ -3479,7 +3479,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: ca_sgs = .false.
logical :: ca_global = .false.
logical :: ca_smooth = .false.
real(kind=kind_phys) :: rcell = 0.72
real(kind=kind_phys) :: nthresh = 18
real :: ca_amplitude = 0.35
integer :: nsmooth = 100
logical :: ca_closure = .false.
Expand Down Expand Up @@ -3628,8 +3628,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- canopy heat storage parameterization
h0facu, h0facs, &
!--- cellular automata
nca, scells, tlives, nca_g, ncells_g, nlives_g, nfracseed, &
nseed, nseed_g, rcell, do_ca, &
nca, ncells, nlives, nca_g, ncells_g, nlives_g, nfracseed, &
nseed, nseed_g, nthresh, do_ca, &
ca_sgs, ca_global,iseed_ca,ca_smooth, &
nspinup,ca_amplitude,nsmooth,ca_closure,ca_entr,ca_trigger, &
!--- IAU
Expand Down Expand Up @@ -4393,8 +4393,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
if ( .not. ca_sgs ) nca=0

Model%nca = nca
Model%scells = scells
Model%tlives = tlives
Model%ncells = ncells
Model%nlives = nlives
Model%nca_g = nca_g
Model%ncells_g = ncells_g
Model%nlives_g = nlives_g
Expand All @@ -4407,7 +4407,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%iseed_ca = iseed_ca
Model%ca_smooth = ca_smooth
Model%nspinup = nspinup
Model%rcell = rcell
Model%nthresh = nthresh
Model%ca_amplitude = ca_amplitude
Model%nsmooth = nsmooth
Model%ca_closure = ca_closure
Expand Down Expand Up @@ -5757,8 +5757,8 @@ subroutine control_print(Model)
print *, ' '
print *, 'cellular automata'
print *, ' nca : ', Model%nca
print *, ' scells : ', Model%scells
print *, ' tlives : ', Model%tlives
print *, ' ncells : ', Model%ncells
print *, ' nlives : ', Model%nlives
print *, ' nca_g : ', Model%nca_g
print *, ' ncells_g : ', Model%ncells_g
print *, ' nlives_g : ', Model%nlives_g
Expand All @@ -5771,7 +5771,7 @@ subroutine control_print(Model)
print *, ' iseed_ca : ', Model%iseed_ca
print *, ' ca_smooth : ', Model%ca_smooth
print *, ' nspinup : ', Model%nspinup
print *, ' rcell : ', Model%rcell
print *, ' nthresh : ', Model%nthresh
print *, ' ca_amplitude : ', Model%ca_amplitude
print *, ' nsmooth : ', Model%nsmooth
print *, ' ca_closure : ', Model%ca_closure
Expand Down
6 changes: 3 additions & 3 deletions stochastic_physics/stochastic_physics_wrapper.F90
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr)
call cellular_automata_sgs(GFS_Control%kdt,GFS_control%dtp,GFS_control%restart,GFS_Control%first_time_step, &
sst,lmsk,lake,condition,ca_deep_cpl,ca_turb_cpl,ca_shal_cpl, Atm(mygrid)%domain_for_coupler,nblks, &
Atm_block%isc,Atm_block%iec,Atm_block%jsc,Atm_block%jec,Atm(mygrid)%npx,Atm(mygrid)%npy, levs, &
GFS_Control%nthresh,GFS_Control%rcell,GFS_Control%tile_num,GFS_Control%nca,GFS_Control%scells,GFS_Control%tlives, &
GFS_Control%nthresh,GFS_Control%tile_num,GFS_Control%nca,GFS_Control%ncells,GFS_Control%nlives, &
GFS_Control%nfracseed, GFS_Control%nseed,GFS_Control%iseed_ca, &
GFS_Control%nspinup,GFS_Control%ca_trigger,Atm_block%blksz(1),GFS_Control%master,GFS_Control%communicator)
! Copy contiguous data back as needed
Expand All @@ -318,10 +318,10 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr)
enddo
endif
if(GFS_Control%ca_global)then
call cellular_automata_global(GFS_Control%kdt,GFS_control%restart,GFS_Control%first_time_step,ca1_cpl,ca2_cpl,ca3_cpl, &
call cellular_automata_global(GFS_Control%kdt,GFS_control%restart,GFS_Control%first_time_step,ca1_cpl,ca2_cpl,ca3_cpl, &
Atm(mygrid)%domain_for_coupler, nblks,Atm_block%isc,Atm_block%iec,Atm_block%jsc,Atm_block%jec,Atm(mygrid)%npx,Atm(mygrid)%npy,levs, &
GFS_Control%nca_g,GFS_Control%ncells_g,GFS_Control%nlives_g,GFS_Control%nfracseed,GFS_Control%nseed_g, &
GFS_Control%iseed_ca,GFS_control%tile_num,GFS_Control%ca_smooth,GFS_Control%nspinup,Atm_block%blksz(1), &
GFS_Control%iseed_ca,GFS_control%tile_num,GFS_Control%ca_smooth,GFS_Control%nspinup,Atm_block%blksz(1), &
GFS_Control%nsmooth,GFS_Control%ca_amplitude,GFS_Control%master,GFS_Control%communicator)
! Copy contiguous data back
do nb=1,nblks
Expand Down

0 comments on commit b5bdf4c

Please sign in to comment.