Skip to content

Commit

Permalink
Merge pull request #1 from noaa-oar-arl/fengsha
Browse files Browse the repository at this point in the history
Fengsha
  • Loading branch information
drnimbusrain authored Jul 7, 2020
2 parents c5382e0 + ff75c94 commit 0bbf180
Show file tree
Hide file tree
Showing 37 changed files with 1,195 additions and 33 deletions.
8 changes: 4 additions & 4 deletions parallel/scripts/run-nacc-fv3.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ NTIMES=73
export NODES=12

APPL=aqm.t12z
InMetDir=/gpfs/hps2/ptmp/$USER/fv3gfs_v16_test/12z_hourly
InMetDir=/gpfs/hps2/ptmp/$USER/NACC-Fengsha-Test
InGeoDir=$InMetDir
OutDir=/gpfs/hps2/ptmp/$USER/fv3gfs_v16_test/output
OutDir=/gpfs/hps2/ptmp/$USER/NACC-Fengsha-Test/output_nofengsha
ProgDir=/gpfs/hps3/emc/naqfc/noscrub/Patrick.C.Campbell/NACC/parallel/src

if [ ! -s $InMetDir ]; then
Expand Down Expand Up @@ -70,8 +70,8 @@ cat>namelist.mcip<<!
lpv = 0
lwout = 1
luvbout = 1
mcip_start = "2019-07-12-12:00:00.0000"
mcip_end = "2019-07-15-13:00:00.0000"
mcip_start = "2019-07-22-12:00:00.0000"
mcip_end = "2019-07-25-13:00:00.0000"
intvl = 60
coordnam = "FV3_RPO"
grdnam = "FV3_CONUS"
Expand Down
31 changes: 18 additions & 13 deletions parallel/src/alloc_ctm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ SUBROUTINE alloc_ctm
npxwrf41 = 0
ENDIF

nfld2dxyt = 29 + nwr + nsoil2d + npxwrf41
nfld2dxyt = 34 + nwr + nsoil2d + npxwrf41

ALLOCATE ( fld2dxyt ( nfld2dxyt ) )

Expand Down Expand Up @@ -246,26 +246,31 @@ SUBROUTINE alloc_ctm
c_lai => fld2dxyt(27)
c_seaice => fld2dxyt(28)
c_snowh => fld2dxyt(29)
c_clayf => fld2dxyt(30)
c_sandf => fld2dxyt(31)
c_drag => fld2dxyt(32)
c_ssm => fld2dxyt(33)
c_uthr => fld2dxyt(34)

IF ( ifwr ) THEN
c_wr => fld2dxyt(29+nwr)
c_wr => fld2dxyt(34+nwr)
ENDIF

IF ( ifsoil ) THEN
c_soim1 => fld2dxyt(29+nwr+1)
c_soim2 => fld2dxyt(29+nwr+2)
c_soit1 => fld2dxyt(29+nwr+3)
c_soit2 => fld2dxyt(29+nwr+4)
c_sltyp => fld2dxyt(29+nwr+5)
c_soim1 => fld2dxyt(34+nwr+1)
c_soim2 => fld2dxyt(34+nwr+2)
c_soit1 => fld2dxyt(34+nwr+3)
c_soit2 => fld2dxyt(34+nwr+4)
c_sltyp => fld2dxyt(34+nwr+5)
ENDIF

IF ( ifpxwrf41 ) THEN
c_wsat_px => fld2dxyt(29+nwr+nsoil2d+1)
c_wfc_px => fld2dxyt(29+nwr+nsoil2d+2)
c_wwlt_px => fld2dxyt(29+nwr+nsoil2d+3)
c_csand_px => fld2dxyt(29+nwr+nsoil2d+4)
c_fmsand_px => fld2dxyt(29+nwr+nsoil2d+5)
c_clay_px => fld2dxyt(29+nwr+nsoil2d+6)
c_wsat_px => fld2dxyt(34+nwr+nsoil2d+1)
c_wfc_px => fld2dxyt(34+nwr+nsoil2d+2)
c_wwlt_px => fld2dxyt(34+nwr+nsoil2d+3)
c_csand_px => fld2dxyt(34+nwr+nsoil2d+4)
c_fmsand_px => fld2dxyt(34+nwr+nsoil2d+5)
c_clay_px => fld2dxyt(34+nwr+nsoil2d+6)
ENDIF

!-------------------------------------------------------------------------------
Expand Down
20 changes: 20 additions & 0 deletions parallel/src/alloc_met.f90
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,26 @@ SUBROUTINE alloc_met
ALLOCATE ( lai (ix, jy) )
ENDIF

IF ( ifclayf ) THEN ! clay fraction available
ALLOCATE ( clayf (met_nx, met_ny) )
ENDIF

IF ( ifsandf ) THEN ! sand fraction available
ALLOCATE ( sandf (met_nx, met_ny) )
ENDIF

IF ( ifdrag ) THEN ! drag paritiion available
ALLOCATE ( drag (met_nx, met_ny) )
ENDIF

IF ( ifssm ) THEN ! sediment supply map available
ALLOCATE ( ssm (met_nx, met_ny) )
ENDIF

IF ( ifuthr ) THEN ! threshold velocity available
ALLOCATE ( uthr (met_nx, met_ny) )
ENDIF

IF ( ifmol ) THEN ! Monin-Obukhov length available
ALLOCATE ( mol (ix, jy) )
ENDIF
Expand Down
5 changes: 5 additions & 0 deletions parallel/src/alloc_x.f90
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ SUBROUTINE alloc_x
ALLOCATE ( xrgrnd (ncols_x, nrows_x) )
ALLOCATE ( xwr (ncols_x, nrows_x) )
ALLOCATE ( xlai (ncols_x, nrows_x) )
ALLOCATE ( xclayf (ncols_x, nrows_x) )
ALLOCATE ( xsandf (ncols_x, nrows_x) )
ALLOCATE ( xdrag (ncols_x, nrows_x) )
ALLOCATE ( xssm (ncols_x, nrows_x) )
ALLOCATE ( xuthr (ncols_x, nrows_x) )
ALLOCATE ( xveg (ncols_x, nrows_x) )

ALLOCATE ( xwstar (ncols_x, nrows_x) )
Expand Down
5 changes: 5 additions & 0 deletions parallel/src/ctmproc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ END SUBROUTINE collapx
c_snocov%fld(col,row) = xsnocov(c,r)
c_veg%fld(col,row) = xveg(c,r)
c_lai%fld(col,row) = xlai(c,r)
c_clayf%fld(col,row) = xclayf(c,r)
c_sandf%fld(col,row) = xsandf(c,r)
c_drag%fld(col,row) = xdrag(c,r)
c_ssm%fld(col,row) = xssm(c,r)
c_uthr%fld(col,row) = xuthr(c,r)
c_seaice%fld(col,row) = xseaice(c,r)
c_snowh%fld(col,row) = xsnowh(c,r)

Expand Down
5 changes: 5 additions & 0 deletions parallel/src/ctmvars_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ MODULE ctmvars
TYPE(fld2ddata), POINTER :: c_snocov
TYPE(fld2ddata), POINTER :: c_veg
TYPE(fld2ddata), POINTER :: c_lai
TYPE(fld2ddata), POINTER :: c_clayf
TYPE(fld2ddata), POINTER :: c_sandf
TYPE(fld2ddata), POINTER :: c_drag
TYPE(fld2ddata), POINTER :: c_ssm
TYPE(fld2ddata), POINTER :: c_uthr
TYPE(fld2ddata), POINTER :: c_seaice
TYPE(fld2ddata), POINTER :: c_snowh
TYPE(fld2ddata), POINTER :: c_wr
Expand Down
6 changes: 6 additions & 0 deletions parallel/src/dealloc_ctm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ SUBROUTINE dealloc_ctm
NULLIFY ( c_lai )
NULLIFY ( c_seaice )
NULLIFY ( c_snowh )
NULLIFY ( c_clayf )
NULLIFY ( c_sandf )
NULLIFY ( c_drag )
NULLIFY ( c_ssm )
NULLIFY ( c_uthr )

IF ( ASSOCIATED ( c_wr ) ) NULLIFY ( c_wr )
IF ( ASSOCIATED ( c_soim1 ) ) NULLIFY ( c_soim1 )
IF ( ASSOCIATED ( c_soim2 ) ) NULLIFY ( c_soim2 )
Expand Down
5 changes: 5 additions & 0 deletions parallel/src/dealloc_met.f90
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ SUBROUTINE dealloc_met

IF ( ALLOCATED ( isltyp ) ) DEALLOCATE ( isltyp )
IF ( ALLOCATED ( lai ) ) DEALLOCATE ( lai )
IF ( ALLOCATED ( clayf ) ) DEALLOCATE ( clayf )
IF ( ALLOCATED ( sandf ) ) DEALLOCATE ( sandf )
IF ( ALLOCATED ( drag ) ) DEALLOCATE ( drag )
IF ( ALLOCATED ( ssm ) ) DEALLOCATE ( ssm )
IF ( ALLOCATED ( uthr ) ) DEALLOCATE ( uthr )
IF ( ALLOCATED ( mol ) ) DEALLOCATE ( mol )
IF ( ALLOCATED ( ra ) ) DEALLOCATE ( ra )
IF ( ALLOCATED ( rstom ) ) DEALLOCATE ( rstom )
Expand Down
5 changes: 5 additions & 0 deletions parallel/src/dealloc_x.f90
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ SUBROUTINE dealloc_x
DEALLOCATE ( xrgrnd )
DEALLOCATE ( xwr )
DEALLOCATE ( xlai )
DEALLOCATE ( xclayf )
DEALLOCATE ( xsandf )
DEALLOCATE ( xdrag )
DEALLOCATE ( xssm )
DEALLOCATE ( xuthr )
DEALLOCATE ( xveg )

DEALLOCATE ( xwstar )
Expand Down
55 changes: 55 additions & 0 deletions parallel/src/init_ctm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,61 @@ SUBROUTINE init_ctm
c_lai%iend(1) = nx
c_lai%iend(2) = ny

c_clayf%fld = fillreal
c_clayf%fldname = 'CLAYF'
c_clayf%long_name = 'soil clay fraction'
c_clayf%units = '1'
c_clayf%dimnames(1) = 'nx'
c_clayf%dimnames(2) = 'ny'
c_clayf%istart(1) = 1
c_clayf%istart(2) = 1
c_clayf%iend(1) = nx
c_clayf%iend(2) = ny

c_sandf%fld = fillreal
c_sandf%fldname = 'SANDF'
c_sandf%long_name = 'soil sand fraction'
c_sandf%units = '1'
c_sandf%dimnames(1) = 'nx'
c_sandf%dimnames(2) = 'ny'
c_sandf%istart(1) = 1
c_sandf%istart(2) = 1
c_sandf%iend(1) = nx
c_sandf%iend(2) = ny

c_drag%fld = fillreal
c_drag%fldname = 'DRAG'
c_drag%long_name = 'drag partition'
c_drag%units = '1'
c_drag%dimnames(1) = 'nx'
c_drag%dimnames(2) = 'ny'
c_drag%istart(1) = 1
c_drag%istart(2) = 1
c_drag%iend(1) = nx
c_drag%iend(2) = ny

c_ssm%fld = fillreal
c_ssm%fldname = 'SSM'
c_ssm%long_name = 'sediment supply map'
c_ssm%units = '1'
c_ssm%dimnames(1) = 'nx'
c_ssm%dimnames(2) = 'ny'
c_ssm%istart(1) = 1
c_ssm%istart(2) = 1
c_ssm%iend(1) = nx
c_ssm%iend(2) = ny

c_uthr%fld = fillreal
c_uthr%fldname = 'UTHR'
c_uthr%long_name = 'threshold velocity'
c_uthr%units = 'm s-1'
c_uthr%dimnames(1) = 'nx'
c_uthr%dimnames(2) = 'ny'
c_uthr%istart(1) = 1
c_uthr%istart(2) = 1
c_uthr%iend(1) = nx
c_uthr%iend(2) = ny

c_seaice%fld = fillreal
c_seaice%fldname = 'SEAICE'
c_seaice%long_name = 'sea ice'
Expand Down
5 changes: 5 additions & 0 deletions parallel/src/init_met.f90
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ SUBROUTINE init_met
IF ( ALLOCATED ( coriolis ) ) coriolis (:,:) = 0.0
IF ( ALLOCATED ( isltyp ) ) isltyp (:,:) = 0
IF ( ALLOCATED ( lai ) ) lai (:,:) = 0.0
IF ( ALLOCATED ( clayf ) ) clayf (:,:) = 0.0
IF ( ALLOCATED ( sandf ) ) sandf (:,:) = 0.0
IF ( ALLOCATED ( drag ) ) drag (:,:) = 0.0
IF ( ALLOCATED ( ssm ) ) ssm (:,:) = 0.0
IF ( ALLOCATED ( uthr ) ) uthr (:,:) = 0.0
IF ( ALLOCATED ( mol ) ) mol (:,:) = 0.0
IF ( ALLOCATED ( qfx ) ) qfx (:,:) = 0.0
IF ( ALLOCATED ( ra ) ) ra (:,:) = 0.0
Expand Down
3 changes: 3 additions & 0 deletions parallel/src/init_x.f90
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ SUBROUTINE init_x
xdenss (:,:) = fillreal ; xdluse (:,:) = fillreal
xglw (:,:) = fillreal ; xgsw (:,:) = fillreal
xhfx (:,:) = fillreal ; xlai (:,:) = fillreal
xclayf (:,:) = fillreal ; xsandf (:,:) = fillreal
xdrag (:,:) = fillreal ; xssm (:,:) = fillreal
xuthr (:,:) = fillreal
xlatc (:,:) = fillreal ; xlatd (:,:) = fillreal
xlatu (:,:) = fillreal ; xlatv (:,:) = fillreal
xlh (:,:) = fillreal ; xlonc (:,:) = fillreal
Expand Down
10 changes: 10 additions & 0 deletions parallel/src/mcipparm_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@ MODULE mcipparm
LOGICAL :: ifkfradextras ! KF-radiative feedbacks extra arrays?
LOGICAL :: iflai ! leaf area index in input file?
LOGICAL :: iflaiwrfout ! is leaf area index in WRF history?
LOGICAL :: ifclayf ! soil clay fraction in input file?
LOGICAL :: ifclayfwrfout ! soil clay fraction in WRF history?
LOGICAL :: ifsandf ! soil sand fraction in input file?
LOGICAL :: ifsandfwrfout ! soil sand fraction in WRF history?
LOGICAL :: ifdrag ! drag partition in input file?
LOGICAL :: ifdragwrfout ! drag partition in WRF history?
LOGICAL :: ifssm ! sediment supply map in input file?
LOGICAL :: ifssmwrfout ! sediment supply map in WRF history?
LOGICAL :: ifuthr ! threshold velocity in input file?
LOGICAL :: ifuthrwrfout ! threshold velocity in WRF history?
LOGICAL :: iflufrc ! fractional land use available?
LOGICAL :: ifluwrfout ! is fractional land use in WRF history?
LOGICAL :: iflu2wrfout ! is fractional land use 2 in WRF history?
Expand Down
21 changes: 21 additions & 0 deletions parallel/src/metvars2ctm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,27 @@ END SUBROUTINE layht

ENDIF ! iflai

!Fengsha dust variables
IF ( ifclayf) THEN
xclayf(:,:) = clayf(sc:ec,sr:er)
ENDIF

IF ( ifsandf) THEN
xsandf(:,:) = sandf(sc:ec,sr:er)
ENDIF

IF ( ifdrag) THEN
xdrag(:,:) = drag(sc:ec,sr:er)
ENDIF

IF ( ifssm) THEN
xssm(:,:) = ssm(sc:ec,sr:er)
ENDIF

IF ( ifuthr) THEN
xuthr(:,:) = uthr(sc:ec,sr:er)
ENDIF

IF ( ifveg ) THEN
xveg (:,:) = veg (sc:ec,sr:er)
ELSE
Expand Down
5 changes: 5 additions & 0 deletions parallel/src/metvars_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ MODULE metvars
INTEGER, ALLOCATABLE :: irnold ( : , : )
INTEGER, ALLOCATABLE :: isltyp ( : , : )
REAL, ALLOCATABLE :: lai ( : , : )
REAL, ALLOCATABLE :: clayf ( : , : )
REAL, ALLOCATABLE :: sandf ( : , : )
REAL, ALLOCATABLE :: drag ( : , : )
REAL, ALLOCATABLE :: ssm ( : , : )
REAL, ALLOCATABLE :: uthr ( : , : )
REAL, ALLOCATABLE :: lai_mos ( : , : , : )
REAL, ALLOCATABLE :: lai_px ( : , : )
REAL, ALLOCATABLE :: landmask ( : , : )
Expand Down
Loading

0 comments on commit 0bbf180

Please sign in to comment.