Skip to content

Commit

Permalink
Add hourly averaged smoke PM2.5 and dust PM10 (NOAA-EMC#917)
Browse files Browse the repository at this point in the history
* Initial commit for hourly averaged smoke and dust.

* Getting rid of an extraneous variable in fv3lam_rrfs.xml and reverting changes to modulefiles

* Reverting change in CLDRAD.f

* Updating fix file.

* Updating modulefiles with the latest installed g2tmpl.

* Updating s4.lua for latest g2tmpl.

* Updating postxconfig-NT-rrfs.txt

* Updating wcoss2 modulefile

* bump g2tmpl to 1.12.0 in ci/spack.yaml

---------

Co-authored-by: WenMeng-NOAA <[email protected]>
Co-authored-by: Wen Meng <[email protected]>
  • Loading branch information
3 people authored May 10, 2024
1 parent f7bc0cb commit 514cff0
Show file tree
Hide file tree
Showing 17 changed files with 273 additions and 19 deletions.
2 changes: 1 addition & 1 deletion ci/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spack:
- [email protected]
- [email protected]
- [email protected]
- g2tmpl@1.10.2
- g2tmpl@1.12.0
- [email protected]
- [email protected]
- [email protected]
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/gaea.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ help([[

whatis([===[Loads libraries needed for building the UPP on Gaea ]===])

prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/autofs/ncrc-svm1_proj/epic/spack-stack/spack-stack-1.6.0/envs/upp-addon-env/install/modulefiles/Core")

stack_intel_ver=os.getenv("stack_intel_ver") or "2023.1.0"
load(pathJoin("stack-intel", stack_intel_ver))
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/hera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Load environment to build UPP on hera
]])


prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/upp-addon-env/install/modulefiles/Core")

stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
load(pathJoin("stack-intel", stack_intel_ver))
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/hercules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Load environment to build UPP on hecules
]])


prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/upp-addon-env/install/modulefiles/Core")

stack_intel_ver=os.getenv("stack_intel_ver") or "2021.9.0"
load(pathJoin("stack-intel", stack_intel_ver))
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/jet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ help([[
Load environment to build UPP on Jet
]])

prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core")
prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.6.0/envs/upp-addon-env/install/modulefiles/Core")

stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
load(pathJoin("stack-intel", stack_intel_ver))
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/orion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Load environment to build UPP on orion
]])


prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.0/envs/upp-addon-env/install/modulefiles/Core")

stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2"
load(pathJoin("stack-intel", stack_intel_ver))
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/s4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- ---------------------------------------------------------------------------


prepend_path("MODULEPATH", "/data/prod/jedi/spack-stack/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/data/prod/jedi/spack-stack/spack-stack-1.6.0/envs/upp-addon-env/install/modulefiles/Core")

local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.0"
Expand Down
3 changes: 1 addition & 2 deletions modulefiles/upp_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ local ufs_modules = {
{["hdf5"] = "1.14.0"},
{["netcdf-c"] = "4.9.2"},
{["netcdf-fortran"] = "4.6.1"},
{["parallelio"] = "2.5.10"},
{["bacio"] = "2.4.1"},
{["crtm"] = "2.4.0.1"},
{["g2"] = "3.4.5"},
{["g2tmpl"] = "1.10.2"},
{["g2tmpl"] = "1.12.0"},
{["ip"] = "4.3.0"},
{["sp"] = "2.5.0"},
{["w3emc"] = "2.10.0"},
Expand Down
5 changes: 4 additions & 1 deletion modulefiles/wcoss2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ load(pathJoin("libpng", libpng_ver))
load(pathJoin("zlib", zlib_ver))

g2_ver=os.getenv("g2_ver") or "3.4.5"
g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.10.2"
g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.12.0"
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
ip_ver=os.getenv("ip_ver") or "3.3.3"
sp_ver=os.getenv("sp_ver") or "2.3.3"
Expand All @@ -45,6 +45,9 @@ load(pathJoin("nemsio", nemsio_ver))
load(pathJoin("sigio", sigio_ver))
load(pathJoin("wrf_io", wrf_io_ver))

prepend_path("MODULEPATH"," /u/wen.meng/noscrub/ncep_post/g2tmpl/libs/modulefiles/compiler/intel/19.1.3.304")
load(pathJoin("g2tmpl", g2tmpl_ver))

setenv("CC","cc")
setenv("CXX","CC")
setenv("FC","ftn")
Expand Down
30 changes: 30 additions & 0 deletions parm/post_avblflds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6994,6 +6994,21 @@
<scale>4.0</scale>
</param>

<param>
<post_avblfldidx>759</post_avblfldidx>
<shortname>AVE_SMOKE_ON_SPEC_HGT_LVL_ABOVE_GRND_8m</shortname>
<pdstmpl>tmpl4_46</pdstmpl>
<pname>MASSDEN</pname>
<stats_proc>AVE</stats_proc>
<aerosol_type>particulate_org_matter_dry</aerosol_type>
<fixed_sfc1_type>spec_hgt_lvl_above_grnd</fixed_sfc1_type>
<typ_intvl_size>smaller_than_first_limit</typ_intvl_size>
<scale_fact_1st_size>7</scale_fact_1st_size>
<scale_val_1st_size>25</scale_val_1st_size>
<level>8.</level>
<scale>6.0</scale>
</param>

<param>
<post_avblfldidx>760</post_avblfldidx>
<shortname>GSD_MIXR_ON_SPEC_HGT_LVL_ABOVE_GRND_2m</shortname>
Expand Down Expand Up @@ -7086,6 +7101,21 @@
<scale>3.0</scale>
</param>

<param>
<post_avblfldidx>771</post_avblfldidx>
<shortname>AVE_DUST_ON_SPEC_HGT_LVL_ABOVE_GRND_8m</shortname>
<pdstmpl>tmpl4_46</pdstmpl>
<pname>MASSDEN</pname>
<stats_proc>AVE</stats_proc>
<aerosol_type>dust_dry</aerosol_type>
<fixed_sfc1_type>spec_hgt_lvl_above_grnd</fixed_sfc1_type>
<level>8.</level>
<typ_intvl_size>smaller_than_first_limit</typ_intvl_size>
<scale_fact_1st_size>7</scale_fact_1st_size>
<scale_val_1st_size>100</scale_val_1st_size>
<scale>6.0</scale>
</param>

<param>
<post_avblfldidx>772</post_avblfldidx>
<shortname>INST_SWDDNI_ON_SURFACE</shortname>
Expand Down
76 changes: 75 additions & 1 deletion parm/postxconfig-NT-rrfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
5
3
229
276
278
PRSLEV
32769
ncep_nco
Expand Down Expand Up @@ -10009,6 +10009,80 @@ surface
?
?
?
759
AVE_SMOKE_ON_SPEC_HGT_LVL_ABOVE_GRND_8m
?
1
tmpl4_46
MASSDEN
?
AVE
spec_hgt_lvl_above_grnd
0
?
1
8.
?
0
?
0
?
particulate_org_matter_dry
smaller_than_first_limit
7
25
0
0.0
?
0
0.0
0
0.0
1
6.0
0
0
0
?
?
?
771
AVE_DUST_ON_SPEC_HGT_LVL_ABOVE_GRND_8m
?
1
tmpl4_46
MASSDEN
?
AVE
spec_hgt_lvl_above_grnd
0
?
1
8.
?
0
?
0
?
dust_dry
smaller_than_first_limit
7
100
0
0.0
?
0
0.0
0
0.0
1
6.0
0
0
0
?
?
?
955
DENDRITIC_LAYER_DEPTH
?
Expand Down
10 changes: 10 additions & 0 deletions parm/rrfs_postcntrl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1754,6 +1754,16 @@
<scale>5.0</scale>
</param>

<param>
<shortname>AVE_SMOKE_ON_SPEC_HGT_LVL_ABOVE_GRND_8m</shortname>
<scale>6.0</scale>
</param>

<param>
<shortname>AVE_DUST_ON_SPEC_HGT_LVL_ABOVE_GRND_8m</shortname>
<scale>6.0</scale>
</param>

<param>
<shortname>DENDRITIC_LAYER_DEPTH</shortname>
<pname>LAYTH</pname>
Expand Down
6 changes: 6 additions & 0 deletions sorc/ncep_post.fd/ALLOCATE_ALL.f
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,9 @@ SUBROUTINE ALLOCATE_ALL()
allocate(sndepac(ista_2l:iend_2u,jsta_2l:jend_2u))
allocate(mean_frp(ista_2l:iend_2u,jsta_2l:jend_2u))
allocate(hwp(ista_2l:iend_2u,jsta_2l:jend_2u))
allocate(smoke_ave(ista_2l:iend_2u,jsta_2l:jend_2u))
allocate(dust_ave(ista_2l:iend_2u,jsta_2l:jend_2u))
allocate(coarsepm_ave(ista_2l:iend_2u,jsta_2l:jend_2u))
!Initialization
!$omp parallel do private(i,j)
do j=jsta_2l,jend_2u
Expand All @@ -658,6 +661,9 @@ SUBROUTINE ALLOCATE_ALL()
sndepac(i,j)=spval
mean_frp(i,j)=spval
hwp(i,j)=spval
smoke_ave(i,j)=spval
dust_ave(i,j)=spval
coarsepm_ave(i,j)=spval
enddo
enddo
allocate(smoke(ista_2l:iend_2u,jsta_2l:jend_2u,lm,nbin_sm))
Expand Down
19 changes: 18 additions & 1 deletion sorc/ncep_post.fd/INITPOST_NETCDF.f
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
!> 2024-02-20 | Jaymes Kenyon | Add calculation of PBLHGUST (from INITPOST.F) to support RRFS 10-m wind gust diagnostic
!> 2024-03-15 | Wen Meng | Add option to read 3D soil-related variables
!> 2024-03-25 | Eric James | Enabling reading of snow melt and surface albedo from RRFS
!> 2024-04-03 | Eric James | Add reading of hourly averaged smoke and dust
!> 2024-04-23 | Eric James | Updating smoke emissions to be 3D variable (ebu_smoke)
!> 2024-05-01 | Eric James | set "prec_acc_dt1" as 15 min for RRFS
!>
Expand Down Expand Up @@ -100,7 +101,8 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d)
alwoutc,alwtoac,aswoutc,aswtoac,alwinc,aswinc,avgpotevp,snoavg, &
ti,aod550,du_aod550,ss_aod550,su_aod550,oc_aod550,bc_aod550,prate_max,maod,dustpm10, &
dustcb,bccb,occb,sulfcb,sscb,dustallcb,ssallcb,dustpm,sspm,pp25cb,pp10cb,no3cb,nh4cb,&
pwat, hwp, aqm_aod550, ltg1_max,ltg2_max,ltg3_max, hail_maxhailcast, pblhgust
pwat, hwp, aqm_aod550, ltg1_max,ltg2_max,ltg3_max, hail_maxhailcast, pblhgust, &
smoke_ave, dust_ave, coarsepm_ave
use soil, only: sldpth, sllevel, sh2o, smc, stc
use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice
use physcons_post, only: grav => con_g, fv => con_fvirt, rgas => con_rd, &
Expand Down Expand Up @@ -1078,6 +1080,21 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d)
call read_netcdf_2d_para(ncid2d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
spval,VarName,hwp(ista_2l,jsta_2l))
if(debugprint)print*,'sample ',VarName,' =',hwp(isa,jsa)
! hourly averaged smoke
VarName='smoke_ave'
call read_netcdf_2d_para(ncid3d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
spval,VarName,smoke_ave(ista_2l,jsta_2l))
if(debugprint)print*,'sample ',VarName,' =',smoke_ave(isa,jsa)
! hourly averaged dust
VarName='dust_ave'
call read_netcdf_2d_para(ncid3d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
spval,VarName,dust_ave(ista_2l,jsta_2l))
if(debugprint)print*,'sample ',VarName,' =',dust_ave(isa,jsa)
! hourly averaged coarsepm
VarName='coarsepm_ave'
call read_netcdf_2d_para(ncid3d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
spval,VarName,coarsepm_ave(ista_2l,jsta_2l))
if(debugprint)print*,'sample ',VarName,' =',coarsepm_ave(isa,jsa)
endif

! lightning threat index 1
Expand Down
Loading

0 comments on commit 514cff0

Please sign in to comment.