From ee3378b9d56d5d4fa1b9e1cd16b06760ad810601 Mon Sep 17 00:00:00 2001 From: "Samuel Trahan (NOAA contractor)" <39415369+SamuelTrahanNOAA@users.noreply.github.com> Date: Fri, 23 Aug 2024 11:30:09 -0600 Subject: [PATCH] sync with head of NOAA-EMC UPP develop (#845) * send CCPP ebu_smoke to UPP ebb * upp: remove GSD_NC synonyms and rename GSD_NC fields instead * update upp hash: g2, g2tmpl, etc. * upp: correct pressure levels for hafs-ar postxconfig files * bugfix: fixed_sfc2_type defaults to fixed_sfc1_type * Add aerosol fix from Li Pan. --------- Co-authored-by: Wen Meng --- ci/spack.yaml | 13 +-- io/post_fv3.F90 | 221 ++++++++++++++++++++++++++++++++++++++++-------- upp | 2 +- 3 files changed, 197 insertions(+), 39 deletions(-) diff --git a/ci/spack.yaml b/ci/spack.yaml index 400b7e06b..32bb71616 100644 --- a/ci/spack.yaml +++ b/ci/spack.yaml @@ -11,14 +11,17 @@ # Alex Richert, 6 Dec 2023 spack: specs: - - w3emc@2.10.0 precision=4,d,8 - - ip@develop precision=4,d,8 - - sp@2.4.0 precision=4,d,8 - bacio@2.4.1 - - upp@develop - - esmf@8.4.2 + - crtm@2.4.0 + - esmf@8.6.0 - fms@2023.04 +gfs_phys +openmp +pic +quad_precision +deprecated_io constants=GFS precision=32,64 + - g2@3.5.1 + - g2tmpl@1.13.0 + - ip@4.3.0 precision=4,d,8 - netcdf-c@4.9.2 ~blosc + - netcdf-fortran@4.6.1 + - sp@2.5.0 precision=4,d,8 + - w3emc@2.10.0 precision=4,d,8 view: false concretizer: unify: true diff --git a/io/post_fv3.F90 b/io/post_fv3.F90 index 5d222497e..17b1572f1 100644 --- a/io/post_fv3.F90 +++ b/io/post_fv3.F90 @@ -505,9 +505,9 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) ! use esmf use vrbls4d, only: dust, smoke, fv3dust, coarsepm, SALT, SUSO, SOOT, & - WASO,no3,nh4, PP25, PP10 + WASO,no3,nh4, PP25, PP10, ebb use vrbls3d, only: t, q, uh, vh, wh, alpint, dpres, zint, zmid, o3, & - qqr, qqs, cwm, qqi, qqw, qqg, omga, cfr, pmid, & + qqr, qqs, cwm, qqi, qqw, qqg, qqh, omga, cfr, pmid, & q2, rlwtt, rswtt, tcucn, tcucns, train, el_pbl, & pint, exch_h, ref_10cm, qqni, qqnr, qqnw, qqnwfa, & qqnifa, effri, effrl, effrs, aextc55, taod5503d, & @@ -546,13 +546,15 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) sfcvxi, t10m, t10avg, psfcavg, akhsavg, akmsavg, & albedo, tg, prate_max, pwat, snow_acm, snow_bkt, & acgraup, graup_bucket, acfrain, frzrn_bucket, & - ltg1_max, ltg2_max, ltg3_max, ebb, hwp, & + ltg1_max, ltg2_max, ltg3_max, hwp, albedo, & aod550,du_aod550,ss_aod550,su_aod550,oc_aod550, & bc_aod550,maod, & dustpm10, dustcb, bccb, occb, sulfcb, sscb, & dustallcb, ssallcb, dustpm, sspm, pp25cb, pp10cb, & no3cb, nh4cb, dusmass, ducmass, dusmass25,ducmass25, & - snownc, graupelnc, qrmax, hail_maxhailcast + snownc, graupelnc, qrmax, hail_maxhailcast, & + smoke_ave,dust_ave,coarsepm_ave,swddif,swddni, & + xlaixy use soil, only: sldpth, sh2o, smc, stc, sllevel use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice use ctlblk_mod, only: im, jm, lm, lp1, jsta, jend, jsta_2l, jend_2u, jsta_m,jend_m, & @@ -608,7 +610,8 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) real,dimension(:), allocatable :: slat,qstl real,external::FPVSNEW real,dimension(:,:),allocatable :: dummy, p2d, t2d, q2d, qs2d, & - cw2d, cfr2d, snacc_land, snacc_ice + cw2d, cfr2d, snacc_land, snacc_ice, & + acsnom_land, acsnom_ice real,dimension(:,:,:),allocatable :: ext550 character(len=80) :: fieldname, wrtFBName, flatlon, & VarName @@ -691,15 +694,6 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) !Allocate for regional models only if(modelname=='FV3R') then allocate(ext550(ista:iend,jsta:jend,lm)) - allocate(snacc_ice(ista:iend,jsta:jend)) - allocate(snacc_land(ista:iend,jsta:jend)) - - do j=jsta,jend - do i=ista,iend - snacc_ice(i,j)=spval - snacc_land(i,j)=spval - end do - end do do l=1,lm do j=jsta,jend @@ -710,6 +704,20 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) end do endif + allocate(snacc_ice(ista:iend,jsta:jend)) + allocate(snacc_land(ista:iend,jsta:jend)) + allocate(acsnom_ice(ista:iend,jsta:jend)) + allocate(acsnom_land(ista:iend,jsta:jend)) + + do j=jsta,jend + do i=ista,iend + snacc_ice(i,j)=spval + snacc_land(i,j)=spval + acsnom_ice(i,j)=spval + acsnom_land(i,j)=spval + end do + end do + ! ! GFS doesn not yet output soil layer thickness, assign SLDPTH to be the same as nam sldpth(1) = 0.10 @@ -1007,24 +1015,46 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) enddo endif - ! biomass burning emissions - if(trim(fieldname)=='ebb_smoke_hr') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ebb,arrayr42d,fillValue,spval) + ! hourly wildfire potential + if(trim(fieldname)=='hwp_ave') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,hwp,arrayr42d,fillValue,spval) do j=jsta,jend do i=ista, iend - ebb(i,j)=arrayr42d(i,j) - if(abs(arrayr42d(i,j)-fillValue) < small) ebb(i,j)=spval + hwp(i,j)=arrayr42d(i,j) + if(abs(arrayr42d(i,j)-fillValue) < small) hwp(i,j)=spval enddo enddo endif - ! wildfire potential - if(trim(fieldname)=='hwp') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,hwp,arrayr42d,fillValue,spval) + !hourly averaged smoke + if(trim(fieldname)=='smoke_ave') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,smoke_ave,arrayr42d,fillValue,spval) do j=jsta,jend do i=ista, iend - hwp(i,j)=arrayr42d(i,j) - if(abs(arrayr42d(i,j)-fillValue) < small) hwp(i,j)=spval + smoke_ave(i,j)=arrayr42d(i,j) + if(abs(arrayr42d(i,j)-fillValue) < small) smoke_ave(i,j)=spval + enddo + enddo + endif + + !hourly averaged dust + if(trim(fieldname)=='dust_ave') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,dust_ave,arrayr42d,fillValue,spval) + do j=jsta,jend + do i=ista, iend + dust_ave(i,j)=arrayr42d(i,j) + if(abs(arrayr42d(i,j)-fillValue) < small) dust_ave(i,j)=spval + enddo + enddo + endif + + !hourly averaged coarsepm + if(trim(fieldname)=='coarsepm_ave') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,coarsepm_ave,arrayr42d,fillValue,spval) + do j=jsta,jend + do i=ista, iend + coarsepm_ave(i,j)=arrayr42d(i,j) + if(abs(arrayr42d(i,j)-fillValue) < small) coarsepm_ave(i,j)=spval enddo enddo endif @@ -1073,6 +1103,17 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) enddo endif + ! surface albedo + if(trim(fieldname)=='sfalb') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,albedo,arrayr42d,fillValue,spval) + do j=jsta,jend + do i=ista, iend + albedo(i,j)=arrayr42d(i,j) + if(abs(arrayr42d(i,j)-fillValue) < small) albedo(i,j)=spval + enddo + enddo + endif + ! surface potential T if(trim(fieldname)=='tmpsfc') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,arrayr42d,ths,fillValue,spval) @@ -2020,6 +2061,50 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) enddo endif + ! inst incoming clear sky sfc shortwave + if(trim(fieldname)=='dswrf_clr') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,rswinc,arrayr42d,fillValue,spval) + do j=jsta,jend + do i=ista, iend + rswinc(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) rswinc(i,j) = spval + enddo + enddo + endif + + ! inst incoming direct beam sfc shortwave + if(trim(fieldname)=='visbmdi') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,swddni,arrayr42d,fillValue,spval) + do j=jsta,jend + do i=ista, iend + swddni(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) swddni(i,j) = spval + enddo + enddo + endif + + ! inst incoming diffuse sfc shortwave + if(trim(fieldname)=='visdfdi') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,swddif,arrayr42d,fillValue,spval) + do j=jsta,jend + do i=ista, iend + swddif(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) swddif(i,j) = spval + enddo + enddo + endif + + ! leaf area index + if(trim(fieldname)=='xlaixy') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,xlaixy,arrayr42d,fillValue,spval) + do j=jsta,jend + do i=ista, iend + xlaixy(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) xlaixy(i,j) = spval + enddo + enddo + endif + ! time averaged incoming sfc uv-b if(trim(fieldname)=='duvb_ave') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,auvbin,arrayr42d,fillValue,spval) @@ -2316,8 +2401,6 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) enddo endif - if(modelname=='FV3R')then - !sndepac if(trim(fieldname)=='snacc_land') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,snacc_land,arrayr42d,fillvalue,spval) @@ -2338,7 +2421,25 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp) enddo endif - endif !FV3R + !snom + if(trim(fieldname)=='snom_land') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,acsnom_land,arrayr42d,fillvalue,spval) + do j=jsta,jend + do i=ista, iend + acsnom_land(i,j) = arrayr42d(i,j) + if(abs(arrayr42d(i,j)-fillvalue)