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

Correct metadata name/unit/dimension #170

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
67 changes: 25 additions & 42 deletions gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,7 @@ module GFS_typedefs
!--- tracer handling
character(len=32), pointer :: tracer_names(:) !< array of initialized tracers from dynamic core
integer :: ntrac !< number of tracers
character(len=20), pointer :: fscav_aero(:) !< aerosol scavenging factors
Copy link
Collaborator

Choose a reason for hiding this comment

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

As far as I can see, all changes to GFS_typedefs.F90 need to be reverted.

#ifdef CCPP
integer :: ntracp1 !< number of tracers plus one
integer :: nqrimef !< tracer index for mass weighted rime factor
Expand All @@ -1080,7 +1081,7 @@ module GFS_typedefs
integer :: ntchm !< number of chemical tracers
integer :: ntchs !< tracer index for first chemical tracer
logical, pointer :: ntdiag(:) => null() !< array to control diagnostics for chemical tracers
real(kind=kind_phys), pointer :: fscav(:) => null() !< array of aerosol scavenging coefficients
real(kind=kind_phys), pointer :: fscav_sas(:) => null() !< coefficients for aerosol scavenging in samfdeep/samfshal

!--- derived totals for phy_f*d
integer :: ntot2d !< total number of variables for phyf2d
Expand Down Expand Up @@ -1773,7 +1774,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: fm10_ocean(:) => null() !<
real (kind=kind_phys) :: frain !<
real (kind=kind_phys), pointer :: frland(:) => null() !<
real (kind=kind_phys), pointer :: fscav(:) => null() !<
real (kind=kind_phys), pointer :: fscav_cs(:) => null() !< fraction of tracer scavenged in cs_conv
real (kind=kind_phys), pointer :: fswtr(:) => null() !<
real (kind=kind_phys), pointer :: gabsbdlw(:) => null() !<
real (kind=kind_phys), pointer :: gabsbdlw_ice(:) => null() !<
Expand Down Expand Up @@ -1986,6 +1987,8 @@ module GFS_typedefs
! RRTMGP
integer :: ipsdlw0 !<
integer :: ipsdsw0 !<
real (kind=kind_phys), pointer :: pcldtaulw(:,:) => null() !<
real (kind=kind_phys), pointer :: pcldtausw(:,:) => null() !<
real (kind=kind_phys), pointer :: sktp1r(:) => null() !<
real (kind=kind_phys), pointer :: p_lay(:,:) => null() !<
real (kind=kind_phys), pointer :: p_lev(:,:) => null() !<
Expand Down Expand Up @@ -2054,14 +2057,6 @@ module GFS_typedefs
type(ty_source_func_lw) :: sources !< RRTMGP DDT
#endif

!-- HWRF physics: dry mixing ratios
real (kind=kind_phys), pointer :: qv_r(:,:) => null() !<
real (kind=kind_phys), pointer :: qc_r(:,:) => null() !<
real (kind=kind_phys), pointer :: qi_r(:,:) => null() !<
real (kind=kind_phys), pointer :: qr_r(:,:) => null() !<
real (kind=kind_phys), pointer :: qs_r(:,:) => null() !<
real (kind=kind_phys), pointer :: qg_r(:,:) => null() !<

!-- GSD drag suite
real (kind=kind_phys), pointer :: varss(:) => null() !<
real (kind=kind_phys), pointer :: ocss(:) => null() !<
Expand All @@ -2072,7 +2067,6 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: f_rain (:,:) => null() !<
real (kind=kind_phys), pointer :: f_ice (:,:) => null() !<
real (kind=kind_phys), pointer :: f_rimef (:,:) => null() !<
real (kind=kind_phys), pointer :: cwm (:,:) => null() !<


contains
Expand Down Expand Up @@ -4100,33 +4094,33 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
endif

! -- setup aerosol scavenging factors
allocate(Model%fscav(Model%ntchm))
allocate(Model%fscav_sas(Model%ntchm))
if (Model%ntchm > 0) then
! -- initialize to default
Model%fscav = 0.6_kind_phys
Model%fscav_sas = 0.6_kind_phys
n = get_tracer_index(Model%tracer_names, 'seas1', Model%me, Model%master, Model%debug) - Model%ntchs + 1
if (n > 0) Model%fscav(n) = 1.0_kind_phys
if (n > 0) Model%fscav_sas(n) = 1.0_kind_phys
n = get_tracer_index(Model%tracer_names, 'seas2', Model%me, Model%master, Model%debug) - Model%ntchs + 1
if (n > 0) Model%fscav(n) = 1.0_kind_phys
if (n > 0) Model%fscav_sas(n) = 1.0_kind_phys
n = get_tracer_index(Model%tracer_names, 'seas3', Model%me, Model%master, Model%debug) - Model%ntchs + 1
if (n > 0) Model%fscav(n) = 1.0_kind_phys
if (n > 0) Model%fscav_sas(n) = 1.0_kind_phys
n = get_tracer_index(Model%tracer_names, 'seas4', Model%me, Model%master, Model%debug) - Model%ntchs + 1
if (n > 0) Model%fscav(n) = 1.0_kind_phys
if (n > 0) Model%fscav_sas(n) = 1.0_kind_phys
n = get_tracer_index(Model%tracer_names, 'seas5', Model%me, Model%master, Model%debug) - Model%ntchs + 1
if (n > 0) Model%fscav(n) = 1.0_kind_phys
if (n > 0) Model%fscav_sas(n) = 1.0_kind_phys
! -- read factors from namelist
do i = 1, size(fscav_aero)
j = index(fscav_aero(i),":")
if (j > 1) then
read(fscav_aero(i)(j+1:), *, iostat=ios) tem
if (ios /= 0) cycle
if (adjustl(fscav_aero(i)(:j-1)) == "*") then
Model%fscav = tem
Model%fscav_sas = tem
exit
else
n = get_tracer_index(Model%tracer_names, adjustl(fscav_aero(i)(:j-1)), Model%me, Model%master, Model%debug) &
- Model%ntchs + 1
if (n > 0) Model%fscav(n) = tem
if (n > 0) Model%fscav_sas(n) = tem
endif
endif
enddo
Expand Down Expand Up @@ -5116,7 +5110,8 @@ subroutine control_print(Model)
print *, ' ntia : ', Model%ntia
print *, ' ntchm : ', Model%ntchm
print *, ' ntchs : ', Model%ntchs
print *, ' fscav : ', Model%fscav
print *, ' fscav_aero : ', Model%fscav_aero
print *, ' fscav_sas : ', Model%fscav_sas
print *, ' '
print *, 'derived totals for phy_f*d'
print *, ' ntot2d : ', Model%ntot2d
Expand Down Expand Up @@ -6261,7 +6256,7 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%fm10_land (IM))
allocate (Interstitial%fm10_ocean (IM))
allocate (Interstitial%frland (IM))
allocate (Interstitial%fscav (Interstitial%nscav))
allocate (Interstitial%fscav_cs (Interstitial%nscav))
allocate (Interstitial%fswtr (Interstitial%nscav))
allocate (Interstitial%gabsbdlw (IM))
allocate (Interstitial%gabsbdlw_ice (IM))
Expand Down Expand Up @@ -6400,6 +6395,8 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%sktp1r (IM))
allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1))
if (Model%do_RRTMGP) then
allocate (Interstitial%pcldtaulw (IM, Model%levs))
allocate (Interstitial%pcldtausw (IM, Model%levs))
allocate (Interstitial%tracer (IM, Model%levs,Model%ntrac))
allocate (Interstitial%tv_lay (IM, Model%levs))
allocate (Interstitial%relhum (IM, Model%levs))
Expand Down Expand Up @@ -6493,19 +6490,10 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%cnv_nice (IM,Model%levs))
end if
if (Model%imp_physics == Model%imp_physics_fer_hires) then
!--- if HWRF physics?
allocate (Interstitial%qv_r (IM,Model%levs))
allocate (Interstitial%qc_r (IM,Model%levs))
allocate (Interstitial%qi_r (IM,Model%levs))
allocate (Interstitial%qr_r (IM,Model%levs))
allocate (Interstitial%qs_r (IM,Model%levs))
allocate (Interstitial%qg_r (IM,Model%levs))

!--- Ferrier-Aligo MP scheme
allocate (Interstitial%f_ice (IM,Model%levs))
allocate (Interstitial%f_rain (IM,Model%levs))
allocate (Interstitial%f_rimef (IM,Model%levs))
allocate (Interstitial%cwm (IM,Model%levs))
end if
if (Model%do_shoc) then
if (.not. associated(Interstitial%qrn)) allocate (Interstitial%qrn (IM,Model%levs))
Expand Down Expand Up @@ -6758,21 +6746,16 @@ subroutine interstitial_rad_reset (Interstitial, Model)

! F-A scheme
if (Model%imp_physics == Model%imp_physics_fer_hires) then
Interstitial%qv_r = clear_val
Interstitial%qc_r = clear_val
Interstitial%qi_r = clear_val
Interstitial%qr_r = clear_val
Interstitial%qs_r = clear_val
Interstitial%qg_r = clear_val
if(Model%spec_adv) then
Interstitial%f_ice = clear_val
Interstitial%f_rain = clear_val
Interstitial%f_rimef = clear_val
Interstitial%cwm = clear_val
end if
end if

if (Model%do_RRTMGP) then
Interstitial%pcldtaulw = clear_val
Interstitial%pcldtausw = clear_val
Interstitial%tracer = clear_val
Interstitial%tv_lay = clear_val
Interstitial%relhum = clear_val
Expand Down Expand Up @@ -6910,7 +6893,7 @@ subroutine interstitial_phys_reset (Interstitial, Model)
Interstitial%fm10_land = huge
Interstitial%fm10_ocean = huge
Interstitial%frland = clear_val
Interstitial%fscav = clear_val
Interstitial%fscav_cs = clear_val
Interstitial%fswtr = clear_val
Interstitial%gabsbdlw = clear_val
Interstitial%gabsbdlw_ice = clear_val
Expand Down Expand Up @@ -7074,7 +7057,6 @@ subroutine interstitial_phys_reset (Interstitial, Model)
Interstitial%f_ice = clear_val
Interstitial%f_rain = clear_val
Interstitial%f_rimef = clear_val
Interstitial%cwm = clear_val
end if
if (Model%do_shoc) then
Interstitial%qrn = clear_val
Expand Down Expand Up @@ -7237,7 +7219,7 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
write (0,*) 'sum(Interstitial%fm10_ocean ) = ', sum(Interstitial%fm10_ocean )
write (0,*) 'Interstitial%frain = ', Interstitial%frain
write (0,*) 'sum(Interstitial%frland ) = ', sum(Interstitial%frland )
write (0,*) 'sum(Interstitial%fscav ) = ', sum(Interstitial%fscav )
write (0,*) 'sum(Interstitial%fscav_cs ) = ', sum(Interstitial%fscav_cs )
write (0,*) 'sum(Interstitial%fswtr ) = ', sum(Interstitial%fswtr )
write (0,*) 'sum(Interstitial%gabsbdlw ) = ', sum(Interstitial%gabsbdlw )
write (0,*) 'sum(Interstitial%gabsbdlw_ice ) = ', sum(Interstitial%gabsbdlw_ice )
Expand Down Expand Up @@ -7415,7 +7397,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
write (0,*) 'sum(Interstitial%f_ice ) = ', sum(Interstitial%f_ice )
write (0,*) 'sum(Interstitial%f_rain ) = ', sum(Interstitial%f_rain )
write (0,*) 'sum(Interstitial%f_rimef ) = ', sum(Interstitial%f_rimef )
write (0,*) 'sum(Interstitial%cwm ) = ', sum(Interstitial%cwm )
else if (Model%imp_physics == Model%imp_physics_mg) then
write (0,*) 'Interstitial_print: values specific to MG microphysics'
write (0,*) 'sum(Interstitial%ncgl ) = ', sum(Interstitial%ncgl )
Expand Down Expand Up @@ -7450,6 +7431,8 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
end if
! RRTMGP
if (Model%do_RRTMGP) then
write (0,*) 'sum(Interstitial%pcldtaulw ) = ', sum(Interstitial%pcldtaulw )
write (0,*) 'sum(Interstitial%pcldtausw ) = ', sum(Interstitial%pcldtausw )
write (0,*) 'sum(Interstitial%aerosolslw ) = ', sum(Interstitial%aerosolslw )
write (0,*) 'sum(Interstitial%aerosolssw ) = ', sum(Interstitial%aerosolssw )
write (0,*) 'sum(Interstitial%cld_frac ) = ', sum(Interstitial%cld_frac )
Expand Down
Loading