Skip to content

Commit

Permalink
Merge pull request #4 from noaa-oar-arl/develop
Browse files Browse the repository at this point in the history
Develop merge to master
  • Loading branch information
drnimbusrain authored Nov 11, 2020
2 parents 456fee5 + 740e311 commit e6fd8fd
Show file tree
Hide file tree
Showing 30 changed files with 342 additions and 276 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ The variables listed here are set by the user in the NACC run script, and they a
- `IFVIIRS_GVF [default: False]`
Logical to choose if the vegetation fraction is taken from FV3 or VIIRS GVF.
- `False`: Use FV3 vegetation fraction
- `True`: Use VIIRS GVF
- `True`: Use VIIRS GVF
- `IFENGSHA_DUST [default: False]`
Logical to choose if the NOAA-ARL Fengsha Windblown dust is used in CMAQ: based on input soil parameters in "GeoFile" and output in METCRO2D file.
- `False`: Do not input/output Fengsha WB Dust soil parameters
- `True`: Input/output of Fengsha WB Dust soil parameters
- `MCIP_START [format: YYYY-MM-DD-HH:MM:SS.SSSS]`
Beginning date and time (UTC) of data to output from NACC. The start date and time must be contained within the input data from WRF or FV3-GFS.
- `MCIP_END [format: YYYY-MM-DD-HH:MM:SS.SSSS]`
Expand Down Expand Up @@ -175,7 +179,7 @@ cd $NACC_home/serial/scripts
|InMetFiles|netCDF (WRF or FV3-GFS)|List of WRF or FV3-GFS output files for input to NACC|required|
|InSfcFiles|netCDF (FV3-GFS)|List of FV3-GFS output files for input to NACC|required (only FV3-GFS)|
|InGeoFile|netCDF (WRFor FV3-GFS)|Output from WRF Geogrid processor|optional; only required if fractional land use, LAI, etc are not part of the WRF or FV3-GFS output. Offline Pre-processed NOAA-ARL "geofiles" with LAI and LANDUSEF (based on 12-month climatological IGBP-MODIS) for the global GFSv16 Gaussian NetCDF Grid are available via FTP by request (Contact: Patrick C. Campbell; [email protected])|
|InVIIRSFile|netCDF (FV3-GFS)|Input from VIIRS GVF data |optional|
|InVIIRSFile|netCDF (FV3-GFS)|Input from VIIRS GVF data |optional; only if global NetCDF VIIRS Input file is provided (Contact: Patrick C. Campbell; [email protected])|

**Table 2. NACC output files**

Expand Down
11 changes: 6 additions & 5 deletions parallel/scripts/run-nacc-fv3.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ NTIMES=73
export NODES=12

APPL=aqm.t12z
InMetDir=/gpfs/hps2/ptmp/Patrick.C.Campbell/gfsv16/v16rt2/2020083112/gfs.20200831/12/atmos/
InMetDir=/gpfs/hps2/ptmp/Patrick.C.Campbell/NACC_FV3GFS16_runs/sens5_nacc_cmaq531_nofire_fengsha/com/aqm/prod/aqm.20190826
InGeoDir=/gpfs/hps3/emc/naqfc/noscrub/Youhua.Tang/nwdev/NAQFC-WCOSS/fix
InVIIRSDir=/gpfs/hps3/emc/naqfc/noscrub/Patrick.C.Campbell/viirs_gvf_test/grib2
OutDir=/gpfs/hps2/ptmp/$USER/NACC-VIIRS-Test/output_viirs_gvf
OutDir=/gpfs/hps2/ptmp/$USER/NACC-VIIRS-Test/output_fengsha_test
ProgDir=/gpfs/hps3/emc/naqfc/noscrub/Patrick.C.Campbell/NACC/parallel/src

if [ ! -s $InMetDir ]; then
Expand Down Expand Up @@ -73,9 +73,10 @@ cat>namelist.mcip<<!
lwout = 1
luvbout = 1
ifdiag_pbl = .FALSE.
ifviirs_gvf = .TRUE.
mcip_start = "2020-08-31-12:00:00.0000"
mcip_end = "2020-09-02-13:00:00.0000"
ifviirs_gvf = .FALSE.
iffengsha_dust = .FALSE.
mcip_start = "2019-08-26-12:00:00.0000"
mcip_end = "2019-08-29-13:00:00.0000"
intvl = 60
coordnam = "FV3_RPO"
grdnam = "FV3_CONUS"
Expand Down
48 changes: 29 additions & 19 deletions parallel/src/alloc_ctm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ SUBROUTINE alloc_ctm
INTEGER :: nwr
INTEGER :: nsoil2d
INTEGER :: npxwrf41

INTEGER :: nfengsha
INTEGER :: ntke
INTEGER :: npv
INTEGER :: nwout
Expand Down Expand Up @@ -209,7 +209,14 @@ SUBROUTINE alloc_ctm
npxwrf41 = 0
ENDIF

nfld2dxyt = 34 + nwr + nsoil2d + npxwrf41
IF ( iffengsha_dust ) THEN
nfengsha = 5 ! CLAYF, SANDF, DRAG, SSM, UTHR
ELSE
nfengsha = 0
ENDIF


nfld2dxyt = 29 + nwr + nsoil2d + npxwrf41 + nfengsha

ALLOCATE ( fld2dxyt ( nfld2dxyt ) )

Expand Down Expand Up @@ -246,31 +253,34 @@ 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(34+nwr)
c_wr => fld2dxyt(29+nwr)
ENDIF

IF ( ifsoil ) THEN
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)
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)
ENDIF

IF ( ifpxwrf41 ) THEN
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)
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)
ENDIF

IF ( ( iffengsha_dust ) ) THEN
c_clayf => fld2dxyt(29+nwr+nsoil2d+npxwrf41+1)
c_sandf => fld2dxyt(29+nwr+nsoil2d+npxwrf41+2)
c_drag => fld2dxyt(29+nwr+nsoil2d+npxwrf41+3)
c_ssm => fld2dxyt(29+nwr+nsoil2d+npxwrf41+4)
c_uthr => fld2dxyt(29+nwr+nsoil2d+npxwrf41+5)
ENDIF

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

IF ( ( iffengsha_dust ) ) THEN
IF ( ifclayf ) THEN ! clay fraction available
ALLOCATE ( clayf (met_nx, met_ny) )
ENDIF
Expand All @@ -225,6 +226,7 @@ SUBROUTINE alloc_met
IF ( ifuthr ) THEN ! threshold velocity available
ALLOCATE ( uthr (met_nx, met_ny) )
ENDIF
ENDIF

IF ( ifmol ) THEN ! Monin-Obukhov length available
ALLOCATE ( mol (ix, jy) )
Expand Down
12 changes: 7 additions & 5 deletions parallel/src/alloc_x.f90
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,13 @@ 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) )
IF ( ( iffengsha_dust ) ) THEN
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) )
ENDIF
ALLOCATE ( xveg (ncols_x, nrows_x) )

ALLOCATE ( xwstar (ncols_x, nrows_x) )
Expand Down
12 changes: 7 additions & 5 deletions parallel/src/ctmproc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,13 @@ 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)
IF ( ( iffengsha_dust ) ) THEN
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)
ENDIF
c_seaice%fld(col,row) = xseaice(c,r)
c_snowh%fld(col,row) = xsnowh(c,r)

Expand Down
10 changes: 5 additions & 5 deletions parallel/src/dealloc_x.f90
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ SUBROUTINE dealloc_x
DEALLOCATE ( xrgrnd )
DEALLOCATE ( xwr )
DEALLOCATE ( xlai )
DEALLOCATE ( xclayf )
DEALLOCATE ( xsandf )
DEALLOCATE ( xdrag )
DEALLOCATE ( xssm )
DEALLOCATE ( xuthr )
IF ( ALLOCATED ( xclayf ) ) DEALLOCATE ( xclayf )
IF ( ALLOCATED ( xsandf ) ) DEALLOCATE ( xsandf )
IF ( ALLOCATED ( xdrag ) ) DEALLOCATE ( xdrag )
IF ( ALLOCATED ( xssm ) ) DEALLOCATE ( xssm )
IF ( ALLOCATED ( xuthr ) ) DEALLOCATE ( xuthr )
DEALLOCATE ( xveg )

DEALLOCATE ( xwstar )
Expand Down
110 changes: 56 additions & 54 deletions parallel/src/init_ctm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -641,60 +641,62 @@ 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
IF ( ( iffengsha_dust ) ) THEN
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
ENDIF

c_seaice%fld = fillreal
c_seaice%fldname = 'SEAICE'
Expand Down
9 changes: 6 additions & 3 deletions parallel/src/init_x.f90
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ 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 All @@ -138,6 +135,12 @@ SUBROUTINE init_x
xwspd10 (:,:) = fillreal ; xwstar (:,:) = fillreal
xzruf (:,:) = fillreal

IF ( ( iffengsha_dust ) ) THEN
xclayf (:,:) = fillreal ; xsandf (:,:) = fillreal
xdrag (:,:) = fillreal ; xssm (:,:) = fillreal
xuthr (:,:) = fillreal
ENDIF

IF ( met_hybrid >= 0 ) THEN
xmuhyb(:,:) = fillreal
ENDIF
Expand Down
Loading

0 comments on commit e6fd8fd

Please sign in to comment.