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

Merge EMC code sync into DTC_post #15

Merged
merged 12 commits into from
Oct 28, 2019
Merged
2 changes: 2 additions & 0 deletions comupp/scripts/run_unipost
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/ssmis_f20.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/seviri_m10.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/v.seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/abi_gr.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/abi_gr.SpcCoeff.bin ./

#######################################################
# 1. Run Unipost
Expand Down
2 changes: 2 additions & 0 deletions comupp/scripts/run_unipost_frames
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/ssmis_f20.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/seviri_m10.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/v.seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/abi_gr.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/abi_gr.SpcCoeff.bin ./

#######################################################
# 1. Run Unipost
Expand Down
2 changes: 2 additions & 0 deletions comupp/scripts/run_unipost_gracet
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/ssmis_f20.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/seviri_m10.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/v.seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/abi_gr.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/abi_gr.SpcCoeff.bin ./

#######################################################
# 1. Run Unipost
Expand Down
2 changes: 2 additions & 0 deletions comupp/scripts/run_unipost_minutes
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/ssmis_f20.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/seviri_m10.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/v.seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/abi_gr.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/abi_gr.SpcCoeff.bin ./

#######################################################
# 1. Run Unipost
Expand Down
2 changes: 2 additions & 0 deletions comupp/scripts/run_unipostandgempak
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/ssmis_f20.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/seviri_m10.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/v.seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/abi_gr.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/abi_gr.SpcCoeff.bin ./

#######################################################
# 1. Run Unipost
Expand Down
2 changes: 2 additions & 0 deletions comupp/scripts/run_unipostandgrads
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/ssmis_f20.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/seviri_m10.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/v.seviri_m10.SpcCoeff.bin ./
ln -fs $CRTMDIR/TauCoeff/ODPS/Big_Endian/abi_gr.TauCoeff.bin ./
ln -fs $CRTMDIR/SpcCoeff/Big_Endian/abi_gr.SpcCoeff.bin ./

#######################################################
# 1. Run Unipost
Expand Down
46 changes: 45 additions & 1 deletion comupp/src/unipost/ALLOCATE_ALL.f
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ SUBROUTINE ALLOCATE_ALL()
! 02-06-19 MIKE BALDWIN - WRF VERSION
! 11-12-16 SARAH LU - MODIFIED TO INITIALIZE AEROSOL FIELDS
! 12-01-07 SARAH LU - MODIFIED TO INITIALIZE AIR DENSITY/LAYER THICKNESS
! 15-07-04 SARAH LU - MODIFIED TO INITIALIZE SCA
! 15-07-21 Jun Wang - Add scavenging for DU, SS, OC, BC, remove
! SU diagnostic fields
! 19-07-24 Li(Kate) Zhang - Merge and update NGAC UPP for FV3-Chem
!
! USAGE: CALL MPI_FIRST
! INPUT ARGUMENT LIST:
Expand Down Expand Up @@ -94,6 +98,8 @@ SUBROUTINE ALLOCATE_ALL()
allocate(QQNR(im,jsta_2l:jend_2u,lm))
allocate(QQNWFA(im,jsta_2l:jend_2u,lm))
allocate(QQNIFA(im,jsta_2l:jend_2u,lm))
allocate(TAOD5503D(im,jsta_2l:jend_2u,lm))
allocate(AEXTC55(im,jsta_2l:jend_2u,lm))
allocate(EXTCOF55(im,jsta_2l:jend_2u,lm))
allocate(CFR(im,jsta_2l:jend_2u,lm))
allocate(CFR_RAW(im,jsta_2l:jend_2u,lm))
Expand Down Expand Up @@ -173,6 +179,20 @@ SUBROUTINE ALLOCATE_ALL()
allocate(fprate_max(im,jsta_2l:jend_2u))
allocate(up_heli_max(im,jsta_2l:jend_2u))
allocate(up_heli_max16(im,jsta_2l:jend_2u))
allocate(up_heli_min(im,jsta_2l:jend_2u))
allocate(up_heli_min16(im,jsta_2l:jend_2u))
allocate(up_heli_max02(im,jsta_2l:jend_2u))
allocate(up_heli_min02(im,jsta_2l:jend_2u))
allocate(up_heli_max03(im,jsta_2l:jend_2u))
allocate(up_heli_min03(im,jsta_2l:jend_2u))
allocate(rel_vort_max(im,jsta_2l:jend_2u))
allocate(rel_vort_max01(im,jsta_2l:jend_2u))
allocate(rel_vort_maxhy1(im,jsta_2l:jend_2u))
allocate(wspd10umax(im,jsta_2l:jend_2u))
allocate(wspd10vmax(im,jsta_2l:jend_2u))
allocate(refdm10c_max(im,jsta_2l:jend_2u))
allocate(hail_max2d(im,jsta_2l:jend_2u))
allocate(hail_maxk1(im,jsta_2l:jend_2u))
allocate(grpl_max(im,jsta_2l:jend_2u))
allocate(up_heli(im,jsta_2l:jend_2u))
allocate(up_heli16(im,jsta_2l:jend_2u))
Expand Down Expand Up @@ -255,6 +275,10 @@ SUBROUTINE ALLOCATE_ALL()
allocate(qvl1(im,jsta_2l:jend_2u))
allocate(snfden(im,jsta_2l:jend_2u))
allocate(sndepac(im,jsta_2l:jend_2u))
allocate(int_smoke(im,jsta_2l:jend_2u))
allocate(mean_frp(im,jsta_2l:jend_2u))
allocate(int_aod(im,jsta_2l:jend_2u))
allocate(smoke(im,jsta_2l:jend_2u,lm,nbin_sm))
! GSDend
allocate(rswin(im,jsta_2l:jend_2u))
allocate(swddni(im,jsta_2l:jend_2u))
Expand All @@ -267,6 +291,8 @@ SUBROUTINE ALLOCATE_ALL()
allocate(taod5502d(im,jsta_2l:jend_2u))
allocate(aerasy2d(im,jsta_2l:jend_2u))
allocate(aerssa2d(im,jsta_2l:jend_2u))
allocate(lwp(im,jsta_2l:jend_2u))
allocate(iwp(im,jsta_2l:jend_2u))
allocate(rlwin(im,jsta_2l:jend_2u))
allocate(lwdnbc(im,jsta_2l:jend_2u))
allocate(lwupbc(im,jsta_2l:jend_2u))
Expand Down Expand Up @@ -433,14 +459,18 @@ SUBROUTINE ALLOCATE_ALL()
allocate(soot(im,jsta_2l:jend_2u,lm,nbin_bc))
allocate(waso(im,jsta_2l:jend_2u,lm,nbin_oc))
allocate(suso(im,jsta_2l:jend_2u,lm,nbin_su))
allocate(pp25(im,jsta_2l:jend_2u,lm,nbin_su))
allocate(pp10(im,jsta_2l:jend_2u,lm,nbin_su))
! vrbls3d
allocate(ext(im,jsta_2l:jend_2u,lm))
allocate(asy(im,jsta_2l:jend_2u,lm))
allocate(ssa(im,jsta_2l:jend_2u,lm))
allocate(sca(im,jsta_2l:jend_2u,lm))
allocate(duem(im,jsta_2l:jend_2u,nbin_du))
allocate(dusd(im,jsta_2l:jend_2u,nbin_du))
allocate(dudp(im,jsta_2l:jend_2u,nbin_du))
allocate(duwt(im,jsta_2l:jend_2u,nbin_du))
allocate(dusv(im,jsta_2l:jend_2u,nbin_du))
allocate(suem(im,jsta_2l:jend_2u,nbin_su))
allocate(susd(im,jsta_2l:jend_2u,nbin_su))
allocate(sudp(im,jsta_2l:jend_2u,nbin_su))
Expand All @@ -449,15 +479,18 @@ SUBROUTINE ALLOCATE_ALL()
allocate(ocsd(im,jsta_2l:jend_2u,nbin_oc))
allocate(ocdp(im,jsta_2l:jend_2u,nbin_oc))
allocate(ocwt(im,jsta_2l:jend_2u,nbin_oc))
allocate(ocsv(im,jsta_2l:jend_2u,nbin_oc))
allocate(bcem(im,jsta_2l:jend_2u,nbin_bc))
allocate(bcsd(im,jsta_2l:jend_2u,nbin_bc))
allocate(bcdp(im,jsta_2l:jend_2u,nbin_bc))
allocate(bcwt(im,jsta_2l:jend_2u,nbin_bc))
allocate(bcsv(im,jsta_2l:jend_2u,nbin_bc))
allocate(ssem(im,jsta_2l:jend_2u,nbin_ss))
allocate(sssd(im,jsta_2l:jend_2u,nbin_ss))
allocate(ssdp(im,jsta_2l:jend_2u,nbin_ss))
allocate(sswt(im,jsta_2l:jend_2u,nbin_ss))
! allocate(dpres(im,jsta_2l:jend_2u,lm))
allocate(sssv(im,jsta_2l:jend_2u,nbin_ss))
!allocate(dpres(im,jsta_2l:jend_2u,lm))
allocate(rhomid(im,jsta_2l:jend_2u,lm))
! vrbls2d
allocate(dusmass(im,jsta_2l:jend_2u))
Expand All @@ -480,6 +513,17 @@ SUBROUTINE ALLOCATE_ALL()
allocate(sscmass(im,jsta_2l:jend_2u))
allocate(sssmass25(im,jsta_2l:jend_2u))
allocate(sscmass25(im,jsta_2l:jend_2u))
allocate(dustcb(im,jsta_2l:jend_2u))
allocate(occb(im,jsta_2l:jend_2u))
allocate(bccb(im,jsta_2l:jend_2u))
allocate(sulfcb(im,jsta_2l:jend_2u))
allocate(pp25cb(im,jsta_2l:jend_2u))
allocate(pp10cb(im,jsta_2l:jend_2u))
allocate(sscb(im,jsta_2l:jend_2u))
allocate(dustallcb(im,jsta_2l:jend_2u))
allocate(ssallcb(im,jsta_2l:jend_2u))
allocate(dustpm(im,jsta_2l:jend_2u))
allocate(sspm(im,jsta_2l:jend_2u))
endif
! HWRF RRTMG output
allocate(acswupt(im,jsta_2l:jend_2u))
Expand Down
55 changes: 51 additions & 4 deletions comupp/src/unipost/CALPW.f
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ SUBROUTINE CALPW(PW,IDECID)
! 02-06-19 MIKE BALDWIN - WRF VERSION
! 04-12-30 H CHUANG - UPDATE TO CALCULATE TOTAL COLUMN FOR OTHER
! HYDROMETEORS
! 11-12-14 SARAH LU - UPDATE TO CALCULATE AEROSOL OPTICAL DEPTH
! 14-11-12 SARAH LU - UPDATE TO CALCULATE AEROSOL OPTICAL DEPTH
! 15-07-02 SARAH LU - UPDATE TO CALCULATE SCATTERING AEROSOL
! OPTICAL DEPTH (18)
! 15-07-04 SARAH LU - CORRECT PW INTEGRATION FOR AOD (17)
! 15-07-10 SARAH LU - UPDATE TO CALCULATE ASYMETRY PARAMETER
! 19-07-25 Li(Kate) Zhang - MERGE SARHA LU's update for FV3-Chem
!
! USAGE: CALL CALPW(PW)
! INPUT ARGUMENT LIST:
Expand All @@ -53,7 +58,9 @@ SUBROUTINE CALPW(PW,IDECID)
!$$$
!
use vrbls3d, only: q, qqw, qqi, qqr, qqs, cwm, qqg, t, rswtt, &
train, tcucn, mcvg, pmid, o3, ext, pint, rlwtt
train, tcucn, mcvg, pmid, o3, ext, pint, rlwtt, &
taod5503d,sca, asy
use vrbls4d, only: smoke
use masks, only: htm
use params_mod, only: tfrz, gi
use ctlblk_mod, only: lm, jsta, jend, im
Expand Down Expand Up @@ -238,17 +245,57 @@ SUBROUTINE CALPW(PW,IDECID)
Qdum(I,J) = EXT(I,J,L)
ENDDO
END DO
!
! E. James - 8 Dec 2017
! FIRE SMOKE (tracer_1a FROM HRRR-SMOKE)
ELSE IF (IDECID == 18) THEN
!$omp parallel do private(i,j)
DO J=JSTA,JEND
DO I=1,IM
Qdum(I,J) = SMOKE(I,J,L,1)/1000000000.
ENDDO
END DO
!
! E. James - 8 Dec 2017
! HRRR-SMOKE AOD
ELSE IF (IDECID == 19) THEN
!$omp parallel do private(i,j)
DO J=JSTA,JEND
DO I=1,IM
Qdum(I,J) = TAOD5503D(I,J,L)
ENDDO
END DO
!LZhang -July 2019
! SCATTERING AEROSOL OPTICAL THICKNESS (GOCART V2)
ELSE IF (IDECID == 20) THEN
!$omp parallel do private(i,j)
DO J=JSTA,JEND
DO I=1,IM
Qdum(I,J) = SCA(I,J,L)
ENDDO
END DO

! ASYMMETRY PARAMETER (GOCART V2)
ELSE IF (IDECID == 21) THEN
!$omp parallel do private(i,j)
DO J=JSTA,JEND
DO I=1,IM
Qdum(I,J) = ASY(I,J,L)
ENDDO
END DO
ENDIF
!
!$omp parallel do private(i,j,dp)
DO J=JSTA,JEND
DO I=1,IM
DP = PINT(I,J,L+1) - PINT(I,J,L)
PW(I,J) = PW(I,J) + Qdum(I,J)*DP*GI*HTM(I,J,L)
DP = PINT(I,J,L+1) - PINT(I,J,L)
PW(I,J) = PW(I,J) + Qdum(I,J)*DP*GI*HTM(I,J,L)
IF (IDECID == 17) THEN
PW(I,J) = PW(I,J) + Qdum(I,J)*MAX(DP,0.)*GI*HTM(I,J,L)
ENDIF
IF (IDECID == 19) THEN
PW(I,J) = PW(I,J) + Qdum(I,J)
ENDIF
IF (IDECID == 14) PWS(I,J) = PWS(I,J) + QS(I,J)*DP*GI*HTM(I,J,L)
ENDDO
ENDDO
Expand Down
Loading