Skip to content

Commit

Permalink
Enable template 4-49 to obtain aerosol ensemble information
Browse files Browse the repository at this point in the history
  • Loading branch information
lipan-NOAA committed Aug 12, 2024
1 parent 97ea655 commit 0a26d97
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion sorc/ncep_post.fd/grib2_module.f
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
!> July 2021 | Jesse Meng | 2D decomsition
!> June 2022 | Lin Zhu | Change the dx/dy to reading in from calculating for latlon grid
!> January 2023 | Sam Trahan | Foot & meter unit conversions for IFI
!> August 2024 | Li Pan | Enable template 4-49 to obtain aerosol ensemble information
!-------------------------------------------------------------------------
module grib2_module
!
Expand Down Expand Up @@ -497,7 +498,8 @@ subroutine gengrb2msg(idisc,icatg, iparm,nprm,nlvl,fldlvl1,fldlvl2,ntrange,tinvs
use grib2_all_tables_module, only: g2sec0,g2sec1, &
g2sec4_temp0,g2sec4_temp8,g2sec4_temp9,g2sec4_temp44, &
g2sec4_temp46,g2sec4_temp48,g2sec5_temp0,g2sec5_temp2, &
g2sec5_temp3,g2sec5_temp40,get_g2_sec5packingmethod
g2sec5_temp3,g2sec5_temp40,get_g2_sec5packingmethod, &
g2sec4_temp49
!use gdtsec3, only: getgdtnum
implicit none
!
Expand All @@ -520,6 +522,7 @@ subroutine gengrb2msg(idisc,icatg, iparm,nprm,nlvl,fldlvl1,fldlvl2,ntrange,tinvs
integer, parameter :: ipdstmp4_44len=21
integer, parameter :: ipdstmp4_46len=35
integer, parameter :: ipdstmp4_48len=26
integer, parameter :: ipdstmp4_49len=29
!
integer, parameter :: idrstmplenmax=50
integer, parameter :: idrstmp5_0len=5
Expand Down Expand Up @@ -592,6 +595,8 @@ subroutine gengrb2msg(idisc,icatg, iparm,nprm,nlvl,fldlvl1,fldlvl2,ntrange,tinvs
pset%param(nprm)%pdstmpl='tmpl4_1'
elseif (trim(pset%param(nprm)%pdstmpl)=='tmpl4_8') then
pset%param(nprm)%pdstmpl='tmpl4_11'
elseif (trim(pset%param(nprm)%pdstmpl)=='tmpl4_48') then
pset%param(nprm)%pdstmpl='tmpl4_49'
endif
endif
!
Expand Down Expand Up @@ -984,6 +989,35 @@ subroutine gengrb2msg(idisc,icatg, iparm,nprm,nlvl,fldlvl1,fldlvl2,ntrange,tinvs
! print *,'aft g2sec4_temp48,name=',trim(pset%param(nprm)%shortname),&
! 'ipdstmpl48=',ipdstmpl(1:ipdstmp4_48len)

elseif(trim(pset%param(nprm)%pdstmpl)=='tmpl4_49') then
!
ipdsnum=49
ipdstmpllen=ipdstmp4_49len
call g2sec4_temp49(icatg,iparm,pset%param(nprm)%aerosol_type, &
pset%param(nprm)%typ_intvl_size, &
pset%param(nprm)%scale_fact_1st_size, &
pset%param(nprm)%scale_val_1st_size, &
pset%param(nprm)%scale_fact_2nd_size, &
pset%param(nprm)%scale_val_2nd_size, &
pset%param(nprm)%typ_intvl_wvlen, &
pset%param(nprm)%scale_fact_1st_wvlen, &
pset%param(nprm)%scale_val_1st_wvlen, &
pset%param(nprm)%scale_fact_2nd_wvlen, &
pset%param(nprm)%scale_val_2nd_wvlen, &
pset%gen_proc_type, &
pset%gen_proc,hrs_obs_cutoff,min_obs_cutoff, &
pset%time_range_unit,ifhr, &
pset%param(nprm)%fixed_sfc1_type, &
scale_fct_fixed_sfc1, &
scaled_val_fixed_sfc1, &
pset%param(nprm)%fixed_sfc2_type, &
scale_fct_fixed_sfc2, &
scaled_val_fixed_sfc2, &
pset%type_ens_fcst,perturb_num,num_ens_fcst, &
ipdstmpl(1:ipdstmpllen))
! print *,'aft g2sec4_temp49,name=',trim(pset%param(nprm)%shortname),&
! 'ipdstmpl49=',ipdstmpl(1:ipdstmp4_49len)

endif

if((modelname=='RAPR'.or.modelname=='FV3R').and.vtimeunits=='FMIN') then
Expand Down

0 comments on commit 0a26d97

Please sign in to comment.