1. introduction - the national space science … dsc.docx · web viewquality model. static input...

43
Stand-alone BDSNP Soil NO module User’s Guide Version 1.0 Rui Zhang, Ben Lash, Quazi Rasool and Daniel Cohan Department of Civil & Environmental Engineering Rice University Houston, TX USA Contact: [email protected] 1

Upload: ngodat

Post on 05-May-2018

215 views

Category:

Documents


2 download

TRANSCRIPT

Stand-alone BDSNP Soil NO module

User’s GuideVersion 1.0

Rui Zhang, Ben Lash, Quazi Rasool and Daniel Cohan

Department of Civil & Environmental EngineeringRice University

Houston, TX USAContact: [email protected]

August 2015

1

Table of Contents1. Introduction..............................................................................................................................................5

1.1 How to use this document..........................................................................................................5

1.2 BDSNP module overview............................................................................................................5

1.3 BDSNP software and operating system prerequisites.............................................7

2. Software installation........................................................................................................................7

2.1 Introduction...................................................................................................................................... 7

2.2 Program structure..........................................................................................................................8

2.3 Installing IOAPI and NetCDF libraries...................................................................................9

2.4 Build stand-alone BDSNP executable..................................................................................10

3. Test BDSNP benchmark case.....................................................................................................10

3.1 Run benchmark case on 12km CONUS domain..............................................................10

3.2 Key I/O environment variables in BDSNP module.......................................................11

3.2.1 SOILBIOME: soil biome type map................................................................................11

3.2.2 SOILCLIMATE: arid/non-arid climate map.............................................................13

The input file $SOILCLIMATE provides the arid and non-arid region classification over simulation domain, which will be used in the BDSNP module to determine the soil moisture scaling factor gθ for soil NO emissions. For the modeling grid classified as ‘arid’ region, the maximum moisture scaling factor is corresponding with the water-filled pore spaceθ value equal to 0.2; while for the ‘non-arid’ modeling grid, the maximum moisture scaling factor corresponds with θ=0.3 (Hudman et al., 2012)...............................................................13

3.2.3 NFERT: fertilizer map........................................................................................................14

3.2.4 NDEP: archive nitrogen deposition file.....................................................................15

3.2.5 GRIDDEC: domain description......................................................................................16

3.2.6 METCRO2D: meteorology file........................................................................................17

3.2.7 SOILINSTATE/SOILOUT: restart file...........................................................................18

3.2.8 BDSNPOUT: soil NO emission output file.................................................................19

4. Create specific case run using BDSNP module..................................................................19

4.1 Regridding static input files...............................................................................................20

4.2 Prepare meteorology file by MCIP..................................................................................22

5. BDSNP module further development....................................................................................22

5.1 Change emission factor for soil biome...............................................................................22

5.2 Replace fertilizer file with EPIC outputs............................................................................22

2

Reference..................................................................................................................................................... 27

Appendix...................................................................................................................................................... 28

Appendix A. Sample setting script of ‘setcase.csh’................................................................28

Appendix B. Sample run script for BDSNP soil NO benchmark case............................29

Appendix C. Mapping table used to create the soil biome map based on NLCD40 MODIS land cover categories.........................................................................................................31

Appendix D. Spatial map of five climate zone over CMAQ CONUS 12km domain based on Köppen-Geiger climate classification.....................................................................32

Appendix E. Sample of soil biome emission factor setting include file.......................33

3

List of Tables

Table 1 List of key I/O environment variables in BDSNP model.....................................14Table 2 List of 24 soil biome emission factor from Steinkamp and Lawrence (2010).....15Table 3 List of output variables from SOILINSTATE (restart file)..................................16

List of Figures

Figure 1 Flow chart of inline/offline BDSNP module.........................................................6Figure 2 Soil biome map over continental US (4km resolution).......................................13Figure 3 Arid (blue) and non-arid (red) region over Continental US (12km resolution). .14Figure 4 Daily variation of total N from fertilizer over continual US from Potter et al. (2011).................................................................................................................................15Figure 5 Soil N reservoir from deposition from benchmark case over continental US (resolution 12km)...............................................................................................................16Figure 6 Spatial distribution of daily mean soil NO emission rate from benchmark case...........................................................................................................................................19Figure 7 Regridding biome map from 4km CONUS files to 12km Texas domain...........22Figure 8 Comparison of spatial pattern of fertilizer N input from Potter et al. (2010) and EPIC simulation.................................................................................................................23

4

1. Introduction 1.1 How to use this documentThis guide instructs potential users to build and run the stand-alone BDSNP module to simulate NO emissions from soil for climate and air quality applications. This document is written in a relatively ad hoc order so that the reader can choose individual sections for reference based on their own purpose (e.g. background knowledge, software installation, real case implantation, future model update). However, the first time user is recommended to read through Section 1 first.Comments on how to improve the documentation are encouraged.

1.2 BDSNP module overviewThe Berkeley-Dalhousie Soil NOx Parameterization (BDSNP) previously has been implemented in a global chemical transport model (GEOS-Chem) to update the soil nitrogen oxide emission estimates (Hudman et al., 2010, 2012). Compared to the soil NO emission module (Yienger and Levy 1995; YL95) currently coded in biogenic emission models such as BEIS3 and MEGAN, the BDSNP scheme has a more continuous soil temperature/moisture dependence function and simulates higher magnitude pulses after dry soil is wetted by precipitation.

Based on the BDSNP scheme, soil NO emissions at each modeling grid and timestep are determined by the base emission varied by the biome type and the available soil nitrogen (either form the fertilizer implementation during the growing season or the nitrogen dry/wet deposition from the atmosphere), the soil temperature and moisture response function, the soil pulsing after precipitation, and the canopy reduction due to the resistance. The algorithm for canopy reduction was proposed by Wang et al. (1998) in GEOS-Chem to consider a more physical basis based on wind speed, turbulence, canopy structure, deposition constants and other physical variables.

NOemission flux=A (biome , soil nitrogen) × f (T ) × g (θ ) × pluse (dry period )× Canopy Reduction(LAI , biome , met )

Benjamin Lash at Rice University (Lash, 2015) successfully implemented the BDSNP code from GEOS-Chem into the Community Multiscale Air Quality (CMAQ) modeling system and produced the online soil NO emission estimates using the soil temperature/moisture information from the Pleim-Xiu land surface model (Pleim and Xiu, 2003). However, the inline BDSNP module at CMAQ is computationally expensive and is not cross-platform applicable. For example, BDSNP has not been implemented in the CAMx air quality model. Therefore, an offline (stand-alone) version of BDSNP module (stand-alone BDSNP) is developed by Dr. Rui Zhang.

From the software engineering point view, Figure 1 provides the flow chart of the BDSNP scheme implementation with the option to run inline or offline with the air quality model. Static input files such as arid/non-arid climate zone, soil biome type

5

(must be consistent with the type of the soil emission factors given by Steinkamp and Lawrence (2011)) and global fertilizer pool from Potter et al. (2010) are needed to determine the soil base emission value at each modeling grid. Soil moisture and temperature as well as some meteorological variables such as radiation, wind and air pressure are needed (from weather models) to drive the BDSNP to representing the occurrence of pulsing and the process of canopy reduction. The major difference with the option of inline and offline BDSNP model is the approach to deal with the available nitrogen pool from the soil. For the inline BDSNP model (the dash line), the dry or wet deposition process considered in air quality model will continuously update the available nitrogen from the atmosphere to the ground; for the stand-alone BDSNP model (the solid line), only the generic daily nitrogen pool from deposition process are used. Since soil nitrogen pool needs a long time to build up to reach the quasi-steady state in the model, a new series of SOILINSTATE files are needed in the stand-alone BDSNP model to provide the generic daily variation of N deposition. Here, we performed a full year CMAQ simulation over the 12km continental U.S. modeling domain in 2005 and recorded their daily total soil N reservoir from deposition for further usage. Simulating soil NO emissions for a region outside North America or for a period with sharply different N deposition rates from 2005 will require development of a new set of SOILINSTATE files. However, it should be noted that in our in-line CMAQ simulations of soil NO, the soil N reservoir from deposition is responsible for only about 10 percent of emissions.

Figure 1: Flow chart of inline/offline BDSNP module

6

The inline BDSNP module with CMAQ initially used the soil biome map directly re-gridded from global atmospheric chemistry model GEOS-Chem, which is too coarse for regional model implementation. The biome map is related with the land use/ land cover (LU/LC) classification and Köppen-Geiger climate zone definition (Kottek et al., 2006) and will determine the base soil NO emission strength. A new soil biome spatial map based on 4-km CONUS 40-category 2006 NLCD-MODIS land use classification (NLCD40) and climate zone definition is created to replace the GEOS-Chem biome map to better represent the up-to-date LU/LC change with finer details. The required mapping the 40 categories to the categories for which emission rates were reported by Steinkamp and Lawrence (2011).

1.3 BDSNP software and operating system prerequisitesIt should be noted that running this version of stand-alone BDSNP model requires the working knowledge of Unix operating system and FORTRAN programming language as prerequisites (e.g, how to unzip/untar files, install libraries, link files, and implement basic commands within Unix, and understand basic Shell script to invoke FORTRAN executables). If you need to regrid the BDSNP input files (e.g. 4-km soil biome map and 12-km deposition archive) to a preferred simulation domain, then you further may need the knowledge/access to Python computer language and ESRI ArcMAP software or know how to use open-source software such as the spatial allocator developed by UNC (www.ie.unc.edu/cempd/projects/mims/spatial/).

The system and software requirements for installing and running stand-alone BDSNP v.1.0 are as follows:

Linux/Unix operation system Shell scripting language FORTRAN 90 compiler (e.g. PGI) NetCDF v3.6.0 or greater IOAPI v3.1 MCIP v3.6 or greater

The program and provided test case has been successfully tested on a GNU/Linux x86_64 machine with PGI compiler.

2. Software installation2.1 IntroductionThe stand-alone BDSNP module software installation is fairly straightforward on the supported Linux platforms. After unzipping the programing the downloading required libraries and packages, you can refer to the simple steps given below to install and compile the program. Installing NetCDF and IOAPI libraries is needed first to compile to BDSNP executables.

7

2.2 Program structureThe first step is to download the provided program compressed file “BDSNP_SA_V1.0.tar.gz” and untar/unzip the file on designated working directory:

>$tar –xzf BDSNP_SA_V1.0.tar.gz

The folder structure of the BDSNP module is shown as the below tree list:

$/work/dsc1/rz10/BDSNP_SA_V1.0 . |-bin/ |-biome_ncld2006_4km/ |-inputs/ |---DEP |---FERT |---MAP |---MET |-lib/ |---IOAPI |---NETCDF |-outputs/ |-README |-setcase.csh |-src/ |-testdata/ |-work/

File ‘README’ documents the summary of program and basic instruction on how to run this model. Folder ‘bin’ contained the executables compiled from the source code. Folder ‘biome_ncld2006_4km’ contains the 4km CONUS biome map. Folder ‘inputs’ is the place to put all the required input files for BDSNP module, which include four sub-folders, namely ‘DEP’, ‘FERT’, ‘MAP’, and ‘MET’. More details about the inputs preparation are given in Section 4. Folder ‘lib’ contains the needed libraries, i.e. NetCDF and IOAPI. Folder ‘outputs’ is the place for model outputs. Cshell script ‘setcase.csh’ is the overall control script to setting the folder environment variables. Folder ‘src’ contains the raw FORTRAN code. Folder ‘testdata’ contain the benchmark inputs and outputs for the user test. Folder ‘work’ contains the run scripts.

Before installing libraries and compiling the program executables, you should first change the script ‘setcase.csh’ by setting your current working directory as the $BDSNPHOME (the sample script of the ‘setcase.csh’ is attached in Appendix A):

$setenv BDSNPHOME [your-current-working-path]

After changing the script, you need to source it to invoke the folder environment variables:

8

>$source ./setcase.csh

2.3 Installing IOAPI and NetCDF librariesThe NetCDF v3.6.0 or greater can be downloaded at:http://www.unidata.ucar.edu/downloads/netcdf/index.jspThe IOAPI v3.1 can be downloaded at:http://www.cmascenter.org/

Registration may be needed before downloading these packages and corresponding user’s guides. Users are highly recommended to refer to their user’s guide for installing the packages.

For NetCDF, there are two ways to install it on Linux/Unix. One is to install the pre-build binary package with the compatible version for your operation system (e.g. Linux2_x86_64pg_gcc_nomp). The other way is to install it from the tar.gz file. Once download the compressed file, untar it and go to the netcdf directory and type the following commands:

>$./configure --prefix=[path-to-netcdf-install]>$make check install

More detail instruction on the installation of NetCDF can be found at:http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-- install/‐Once the NetCDF is installed successfully, you need to set the environment variables to the location where you install it:

>$setenv NETCDF [path-to-netcdf-install]>$setenv NETCDF_LIB ${NETCDF}/lib>$PATH ${NETCDF}/bin:${PATH}>$LD_LIBRARY_PATH ${NETCDF_LIB}:${LD_LIBRARY_PATH}

Then, you need to copy the compiled library ‘libnetcdf.a’ and ‘libnetcdff.a’ to the folder $BDSNPLIB/NETCDF.

The similar steps are needed to install ioapi on your working system if not have. Be caution to same complier and compile flags should be used for compiling NetCDF and IOAPI. The detail instruction on the installation of IOAPI can be found at:http://www.baronams.com/products/ioapi/AVAIL.html

Again, the corresponding environment variables should be set after successful install the IOAPI:

>$setenv IOAPI [path-to-ioapi-install]>$setenv IOAPI_LIB ${IOAPI}/lib>$PATH ${IOAPI}/bin:${PATH}

9

>$LD_LIBRARY_PATH ${IOAPI_LIB}:${LD_LIBRARY_PATH}

Also copy the compiled library ‘libioapi.a’ to the folder $ BDSNPLIB/IOAPI.

2.4 Build stand-alone BDSNP executableGo the directory $BDSNPSRC and change the ‘Makefile’ file by setting the new lib and include paths as the installed NetCDF and IOAPI directories:

>$ source $BDSNPHOME/setcase.csh>$ cd $BDSNPSRC>$ vi Makefile

Change the lines in ‘Makefile’ as following as save the change:LIB = -L${BDSNPLIB}/IOAPI –lioapi \ -L${BDSNPLIB}/NETCDF –lnetcdff –lnetcdfINCLUDE = -I${NETCDF}/include –I${IOAPI}/ioapi/fixed_srcPROGRAM=${BDSNPEXE}/NOX_BDSNP.exe

>$make >& log.bulid_BDSNP &

If success, you can find the executable ‘NOX_BDSNP.exe’ ready to use at the path $BDSNPEXE.

3. Test BDSNP benchmark caseA benchmark case with the 12km continental U.S. (CONUS) domain setting is provided for the comparison of outputs by first time users. The inputs and outputs data are provided at $BDSNPHOME/testdata. The user can utilize those data to test the functionality and understand the key input/output (I/O) environment variables setting of the BDSNP module.

3.1 Run benchmark case on 12km CONUS domainGo the $BDSNPWORK and you can find a sample run script to run the 12km CONUS benchmark case on the simulation date June 27, 2011 (Julian date 2011178). The contents of the demo script are attached as Appendix B. For the benchmark run, no changes are needed for the run script but make sure the setting paths of the input files in the sample script are at the correct location. Type the following commands to prepare the input files for the benchmark run:

>$source $BDSNPHOME/setcase.csh>$cd $BDSNPWORK>$cp $BDSNPHOME/testcase/BIOME_benchmark.nc $BDSNPINP/MAP>$cp $BDSNPHOME/testcase/SOILCLIAMTE_benchmark.nc $BDSNPINP/MAP>$cp $BDSNPHOME/testcase/NDEP_2005_CMAQ_benchmark.nc $BDSNPINP/DEP

10

>$cp $BDSNPHOME/testcase/SOILFERT_2005_CMAQ_benchmark.nc $BDSNPINP/FERT

>$cp $BDSNPHOME/testcase/METCRO2D_2011178_benchmark.nc $BDSNPINP/MET

>$cp $BDSNPHOME/testcase/SOILINSTATE_2011177_benchmark.nc $BDSNPOUT/

After putting the benchmark input files in the correct location, you can invoke the run script by typing:

>$./run.BDSNP_soil_NO_benchmark.csh &

If the program run successfully, you can find two output files under the directory $BDSNPOUT, with the name ‘B3GTS_NO_BDSNP_2011178_benchmark.nc’ and ‘SOILINSTATE_2011178_benchmark.nc’ respectively. Those two output files can be compared with the reference outputs located at $BDSNPHOME/testdata directory (‘B3GTS_NO_BDSNP_benchmark.nc’ and ‘SOILINSTATE_benchmark.nc’) using visualization tools such as VERDI (http://www.cmascenter.org/verdi) or IDL (www.exelisvis.com/ProductsServices/IDL.aspx).

3.2 Key I/O environment variables in BDSNP module

Understanding the input/output (I/O) environment variables defined in BDSNP module is crucial for the real case implementation and further model development if needed. There are seven key input environment variables and two key output environment variables in current version of soil NO BDSNP module. Table 1 summarizes their names and corresponding functionalities. Each I/O environment variable is generally elaborated in sequence for following subsections.

3.2.1 SOILBIOME: soil biome type map

Based on several field studies for soil NO flux (SNOX) measurement (Stehfest and Bouwman, 2006), different biome type has different NO emission factors under different soil conditions (wet or dry) over different sampling geographic locations (or climate zones). Steinkamp and Lawrence (2011) complied those worldwide emission factors (a dataset consisting of 112 articles with 583 field measurements of SNOx covering the period from 1976 to 2010) and regrouped them into 24 soil biome type base on MODIS land cover category as well as Köppen climate zone classifications (Kottek et al., 2006) and reported them into the mean values (arithmetic or geometric). Those soil NO emission factors (wet) implemented in the current version of stand-alone BDSNP module are listed in Table 2.

The folder ‘$BDSNPHOME/biome_ncld2006_4km’ provides the 4-km resolution soil biome map product over the continental U.S. This fine soil biome map is generated from the 30-arc-second (approximately 1 kilometer) NCLD2006 dataset with 40

11

category land cover/land use classifications. A mapping algorithm table (see Appendix C) was created to connect the land use category to soil biome type (Table 2) based on best available knowledge. For the categories with identical names, such as ‘evergreen needleleaf forest’, ‘deciduous needleleaf forest’, ‘mixed forest’, ‘savannas’ and ‘grassland’, the mapping is direct. Categories in NLCD40 which are subsets of the corresponding biome category are consolidated into one category by addition. For example, ‘permanent snow and ice’ and ‘perennial ice-snow’ in NLCD40 are combined to form ‘snow and ice’; ‘developed open space’, ‘developed low intensity’, ‘developed medium intensity’, and ’developed high intensity’ are added to form ‘urban and built-up lands’. For the categories appearing only in NLCD40, the mapping algorithm is determined by referring to the CMAQ mapping scheme, which is documented in each of the CSQY_DATA_* files under the MECHS/ directory at the CMAQ source code release. One of the examples is to map ‘lichens’ and ‘moss’ in NLCD40 to the category ‘grassland’ in soil biome. Furthermore, a model resolution compatible Köppen climate zone classification (Kottek et al., 2006) is needed to allocate different emission factor for the same biome type (e.g. ‘grassland’) at different locations. There are five climate zone classifications, namely A: equatorial, B: arid, C: warm temperature, D: snow, E: polar. A 12-km CONUS model resolution climate zone classification map (see Appendix D) is also created using the Spatial Allocator based on the county level text file climate zone documentation as the surrogate (http://koeppen-geiger.vu-wien.ac.at/data/KoeppenGeiger.UScounty.txt).

Figure 2 provides the spatial pattern of the 24 soil biome map in 4km resolution over CONUS domain. The corresponding 1-24 category type names are provided in Table 2. Only regridding is needed for specific modeling domain implementation due to the fine texture details (see section 4.1 for detailed procedures).

12

Figure 2 Soil biome map over continental US (4km resolution)

3.2.2 SOILCLIMATE: arid/non-arid climate map

The input file $SOILCLIMATE provides the arid and non-arid region classification over the simulation domain, which will be used in the BDSNP module to determine the soil moisture scaling factor g (θ ) for soil NO emissions. For the modeling grid classified as ‘arid’ region, the maximum moisture scaling factor corresponds with the water-filled pore space(θ ) value equal to 0.2; while for the ‘non-arid’ modeling grid, the maximum moisture scaling factor corresponds with θ=0.3 (Hudman et al., 2012).

The 12km resolution CONUS arid/non-arid climate map was also provided here (file name ‘SOILCLIMATE_benchmark.nc’ which is located in the folder ‘$BDSNPHOME/testdata/’). The users can regrid this static field into the designed modeling domain. Figure 3 show the distribution of arid/non-arid climate map over continental US with the blue color corresponding with the arid region while red color corresponding with the non-arid region.

13

Figure 3 Arid (blue) and non-arid (red) region over Continental US (12km resolution)

3.2.3 NFERT: fertilizer map

In the BDSNP stand-alone model, the environment variable $NFERT provides the path of the file with the daily nitrogen input from fertilizer implementation in addition to the base emission from soil biome. The benchmark case fertilizer information given here (file name ‘SOILFERT_2006_benchmark.nc’ located in the folder ‘$BDSNPHOME/testdata/’) is the regridded product from the global GEOS-Chem BDSNP implementation (Hudman et al. 2012) to 12km resolution CONUS domain. Hudman et al. (2012) used a global fertilizer database from Potter et al. (2010) and assumed 37% of fertilizer and manure N is available (1.8 Tg N yr -1) for potential emission. Figure 4 provides the day-by-day variation of total fertilizer implementation over CONUS during a year and shows the typical cycle between growing season and non-growing season.

14

Figure 4 Daily variation of total N from fertilizer over continental US from Potter et al. (2011)

Without updating, any parameterization of soil NO based on fertilizer will be out of date within a decade. The integration of the BDSNP and the Environmental Policy Integrated Climate (EPIC) fertilizer model (Cooter et al. 2012) is one possible state-of-the-science approach for enabling dynamic representation of year-specific fertilizer fields (see section 5.2).

3.2.4 NDEP: archive nitrogen deposition file

For the stand-alone module, the nitrogen available from wet or dry deposition cannot be calculated instantaneously through the air quality model but needs to be determined from offline, pre-computed files. Ben Lash (2015) implemented the BDSNP module in CMAQ and conducted the whole year 2005 simulation over 12km CONUS domain using the emission and meteorology files provided by EPA. The daily available soil N reservoir from deposition was recorded in the restart file $SOILINSTATE (see section 3.2.7). The path of environment variable $NEDP should be set as the path of previous day’s $SOILINSTATE archived deposition file. The whole year 2005 restart files have been archived as the generic deposition fields. For real case usage, the users need to regrid the deposition fields into the designed simulation domains and assume the total amount of soil N from deposition at the same geographic locations over the selected period is comparable with the CMAQ simulation results in year 2005 during corresponding dates, or scale as desired.

15

Figure 5 provides an example of the spatial distribution of available nitrogen from deposition in the benchmark case on a single day (file ‘NDEP_2005_CMAQ_benchmark.nc’ located at the folder ‘$BDSNPHOME/testdata/’).

Figure 5 Soil N reservoir from deposition from benchmark case over continental US (resolution 12km)

3.2.5 GRIDDEC: domain description

The environment variable $GRIDDESC gives the paths of text input files for the grid description on the configuration of designed simulation domain. The format of $GRIDESC is the same as CMAQ setting in the IO/API library.

For the benchmark case application (file ‘GRIDDESC_EPA_CONUS_12km’ located at folder $BDSNPRUN), the domain configuration is set as following:

' '

'12CONUS'

2 33.000 45.000 -97.000 -97.000 40.000

' '

'12US2'

16

'12CONUS' -2412000.000 -1620000.000 12000.000 12000.000 396 246 1

' '

where in line 2, ‘12CONUS’ is the logic name in I/O API library for the domain projection configuration. In line 3, ‘2’ is the $GDTYP3D in I/O API library to determine the projection type, which in here is Lambert Conformal Conic. ’33.000’ and ’45.000’ are corresponding with the $P_ALP3D and $P_BET3D in I/O API library to determine the 1st and 2nd true latitude. The first value ‘-97.000’ in line 3 is the $P_GAM3D parameter in I/O API library to determine the central meridian longitude (with the West in negative value). The second value ‘-97.000’ in line 3 is the $XCENT3D in I/O API library, which represents the center longitude. Correspondingly, ’40.000’ is the $YCENT3D in I/O API library for the center latitude. The value ‘12US’ in line 5 is the logic name $GDNAM3D for the simulation domain name in I/O API library. In line 6, the values ‘-2412000.000’ and ‘-1620000.000’ are corresponding to the $XORIG3D and $YORIG3D in I/O API library to determine the distance in meters (m) from the center point of domain the lower left grid point at x (column) and y (row) directions. The values ’12000.000’ and ‘12000.000’ are corresponding to the $XCELL3D and $YCELL3D in I/O API library to set the domain resolution at each modeling gird in meters. The values ‘396’, 246’, ‘1’ are corresponding to the $NCOLS3D, $NROWS3D, $NTHIK3D in I/O API library to set the 3D modeling grid number in the x (column), y (row), and z (layer) dimension respectively.

3.2.6 METCRO2D: meteorology file

Environment variable $METCRO2D provides the path of meteorological variables needed for the stand-alone BDSNP module. The meteorology file is in NetCDF format and is normally run by the meteorological model (e.g., WRF) and MCIP (see section 4.2). A total of nine meteorological variables are needed in the BDSNP module:

(1) Surface temperature (in K) at 2-m, used to calculate canopy reduction factor:Canopy Reduction(LAI ,biome , met )

(2) Ground reaching solar radiation (in W/m2), used to calculate canopy reduction factor

(3) Surface pressure (in Pa), used to calculate canopy reduction factor(4) Soil moisture (in m3/m3), used to calculate the dry period and pulsing

strength p ul se (dry period ) and scale the base emission by soil moisture response function: g (θ )

(5) Soil temperature (in K), used to scale the base emission by soil temperature response function: f (T )

(6) Surface snow cover, used to calculate canopy reduction factor(7) Wind speed (in m/s) at 10m, used to calculate canopy reduction factor(8) Cloud fraction in modeling grid, used to calculate canopy reduction factor

17

(9) Leaf area index, used to calculate canopy reduction factor

It should be noticed that, in this version of the model, the Pleim-Xiu land surface model (2003) should be selected when running the meteorological model (e.g., WRF) and MCIP to provide the diagnosed soil temperature and moisture fields.

3.2.7 SOILINSTATE/SOILOUT: restart file

Environment variables $SOILINSTATE and $SOILOUT are identical and both point to the path of the restart file generated by the stand-alone BDSNP module (see Appendix B for the demo run script setting). It contains the previous day’s soil moisture, pulsing factor, and dry period information for continuous run as well as several diagnostic variables for further model verification and analysis. Table 3 lists all four restart variables and nine diagnostic variables and their corresponding attributes. The output variables provides the breakdown of each process in stand-alone BDSNP to impact the final soil NO emission estimates, namely the biome base emission (A_DIAG), fertilizer implement amount (AFERT_DIAFG), soil nitrogen pool from deposition (NDEPRES), pulse factor (PFACTOR) and the canopy reduction factor (CRFAVG). For each modeling grid, higher biome base emission plus higher fertilizer implementation and higher available N from deposition will result in higher potential to produce soil NO. The pulse factor depends on soil moisture and the antecedent dry period. The scaling factor CRFAVG represents the loss of NO to the plant canopy before entering the broader atmosphere.

One of the analyses that can be done with the diagnostic output variables is to calculate the fraction of NO emissions resulting from soil biome base emissions (BIOME), fertilizer application (FERT), and N deposition (NDEP). These fractions sum to 1.

The following formulas can be used to calculate those fractions:

FBIOME=ADIAG /(A DIAG+AFERT DIAG)

FFERT=NRES¿

(NDEPES+NRES¿)× AFERT DIAG /(A DIAG+AFERT DIAG)

FNDEP=NDEPES

(NDEPES+NRES¿)× AFERT DIAG/( ADIAG+ AFERT DIAG)

3.2.8 BDSNPOUT: soil NO emission output file

The environment variable $BDSNPOUT is used to set the output path and file name for the hourly soil NO estimation from BDSNP module. The user can choose the output unit for the soil NO emission rate either in terms of mass (Ng/s) or moles (mol/s). Figure 6 shows the spatial distribution of daily mean soil NO emission rate

18

from the benchmark case. For the simulation day, the emission hot spots correlated well with locations that have either biome types with high base emission factors(e.g. evergreen broadleaf forest around Mississippi), high fertilizer application rates (e.g. cropland region near Iowa and Kansas), or high N deposition (e.g. central California).

Figure 6 Spatial distribution of daily mean soil NO emission rate from benchmark case

4. Create specific case run using BDSNP moduleTo run a specific case using the BDSNP module, the user needs to prepare the entire model domain consistent input files listed in Table 1, which include soil biome map, arid/non-arid climate region map, archived daily N deposition fields, domain configuration description file, meteorological outputs in NetCDF format from MCIP as well as a restart file. After preparing all the needed input files, the user needs to modify the run script file (see Appendix B for demo) to accommodate the changes for those key I/O environment variable settings and make sure all the inputs are located at the correct paths ($BDSNPINP). Then, the user can invoke the model by typing:

>$ source $BDSNPHOME/setcase.csh>$ cd $BDSNPRUN>$./run.BDSNP_soil_NO_[your_case].csh &

19

If run successfully, the outputs from the stand-alone BDSNP module can be found at $BDSNPOUT and the log files for the simulation can be found at $BDSNPLOG.

The following two subsections gives some details on how to generate the static input files by regridding the provided data in this package to the user defined domains (especially for the soil biome map and arid/non-arid climate classification ) and how to prepare the needed meteorological variables through MCIP.

4.1Regridding static input files

Different methods can be used to mapping the static files from one domain configuration to another. For commercial user has the ArcGIS installed, it can be easily achieved by using the toolbox in ArcGIS and Python program if need. For detail instruction, please assort to corresponding tutorial materials.

Here we describe how to use the open-source software as EPA spatial allocator (www.ie.unc.edu/cempd/projects/mims/sptial) to do the regridding. No matter what regridding tools are chosen to use, two principles are highly recommended to ensure optimal results: (1) keep a consistent projection type from the old to new domain. In the folder $BDSNPHOME/biome_ncld2006_4km, the 4km resolution CONUS soil biome map NetCDF file uses the Lambert conformal projection configuration; (2) If possible, always map from finer resolution to coarser resolution to keep the detailed texture.

The detailed instructions on how to download, install and operate EPA spatial allocator can be found at the link: http://www.ie.unc.edu/cempd/projects/mims/spatial/Spatial_Allocator_UG.pdf. We use the sample case to regrid the 4km CONUS biome map to 12km TCEQ SIP modeling domain to demonstrate the procedures:

Step 1. After downloading the EPA spatial allocator, follow the READ allocated at $SA_HOME to set the system by modifying the script $SA_HOME/bin/sa_setup.csh

Step 2. Prepare all the needed libraries for the spatial allocator and recompile the executables if needed. The needed libraries are: PROJ4 for raster tool, NetCDF for C and C++, HDF 4 and HDF5, GEOS, GDAL for raster spatial allocator, and ANN.Step 3. Prepare the grid description files for the old and new domains. For the sample case, the GRIDDESC.txt file is like following:' ''NCLD2006' 2 33.000 45.000 -97.000 -97.000 40.000'TCEQ3dom' 2 33.000 45.000 -97.000 -97.000 40.000' ''tx_12km'

20

'TCEQ3dom' -984000.000 -1632000.000 12000.000 12000.000 149 110 1‘CONUS_4km’‘NCLD2006’ -2412000.000 -1620000.000 4000.000 4000.000 1416 936 1' 'The meaning of each value in the GRIDDESC can be found in section 3.2.5.

Step 4. Go to the folder $SA_HOME/scripts to modify the sample run script ‘alloc_ioapi_to_new_mapproj.csh’ to update the corresponding environment variables, especially to make sure the grid name and projection name of input and output (‘INPUT(OUTPUT)_GRID_NAME’ and ‘INPUT(OUTPUT)_FILE_MAP_PRJN’) should be indetial to the settings in GRIDDESC.txt in Step 3. When selecting the methods to allocate the data, be sure to set variable ALLOC_MODE_FILE as ‘ALL_AVERGE’ instead of ‘ALL_AGGREGATE’ since either for the mapping of biome or air/non-aird climate region, no need to aggregate the values from old domain to new domain.

Step 5. Invoke the run script and it will call the executable ‘alloctor.exe’ located at $SA_HOME/bin to do the domain resampling and mapping. The regridding process calls the library from GDAL for raster spatial allocator to do the transformation. The regrid static files located at $SA_HOME/output.

Figure 7 provides the comparison of the 4km CONUS biome map to the TCEQ SIP Texas 12km domain.

Figure 7 Regridding biome map from 4km CONUS files to 12km Texas domain

4.2Prepare meteorology file by MCIP

The Meteorology-Chemistry Interface Processor (MCIP) links meteorological models such as MM5 and WRF with the Chemical Transport Model (CTM) of the Models-3 Community Multiscale Air Quality (CMAQ) modeling system to provide a complete set of meteorological data needed for air quality simulations. Detailed instructions on MCIP download, install and operation can be found at

21

http://www.cmascenter.org/. When setting up the MCIP runs, you need to make sure the domain configuration is identical to other static input files (e.g. GRIDDEC.txt in section 4.1) and the weather model use the Pleim-Xiu land surface model (2003). The BDSNP stand-alone module needed meteorological variables (see Table 1) can be found at the surface diagnostic outputs with the logic name METCRO2D.

5. BDSNP module further development 5.1 Change emission factor for soil biome

The default emission factors for soil biomes used in the current version of module release are the North American geometric mean values reported by Steinkamp and Lawrence (2010) (see ‘EF3’ in Table 2). An external text include file named ‘EF_BIOME.EXT’ located at the folder ${BDSNPSRC} (see Appendix E) is prepared here for the ease of sensitivity study by simply changing the corresponding value for biome category without changing the source code and recompile the executables.

5.2 Replace fertilizer file with EPIC outputs

The default daily fertilizer map is generated from the global database reported by Potter et al. (2010), which is relatively coarse resolution and the out-of-date information (national-level fertilizer data from 1994 to 2001). One of the alternatives to provide the fertilizer map is to use the Fertilizer Emission Scenario Tool for CMAQ (FEST-C, http://www.epa.gov/amad/Tools/festC.html) to consider the different cropland farm management system scenarios and to drive the Environmental Policy Integrated Climate model (EPIC) simulations. Figure 8 provides the comparison of default fertilizer map (see section 3.2.3, from file $BDSNPHOME/testdate/SOILFERT_2006_benchmark.nc) and N fertilizer map from 12km EPIC outputs (considering the weighted sum of fertilizer application rate for ammonia ‘T1_NH3’, nitrate ‘T1_NO3’ and organic nitrogen ‘T1_ON’) over continental US on July 3. Clearly, it has the similar pattern as Potter N inputs but represents more details and more up-to-date information.

22

Figure 8 Comparison of spatial pattern of fertilizer N input from Potter et al. (2010) and EPIC simulation

23

Table 1 List of key I/O environment variables in BDSNP model

Environment Variable

Description Note

SOILBIOME [Input file]: soil biome map for model domain, 24 category based on NLCD2006 and Köppen climate zone

SOILCLIMATE [Input file]: arid and non-arid region in model domainNFERT [Input file]: fertilizer map for model domain *can be replaced by

EPIC results, see section 4.2

NDEP [Input file]: nitrogen deposition from previous CMAQ simulations

*current use the 2005 CMAQ results on 12km CONUS domains

GRIDDESC [Input file]: set the domain size and projection informationMETCRO2D [Input file]: meteorology fields in NetCDF format from

MCIP for model domain, which include the parameters:(1) TMEP2-surface temperature(2) RGRND-solar radiation(3) PRSFC-surface pressure(4) SOIM1-soil moisture(5) SOIT1-soil temperature(6) SNOCOV-snow cover(7) WSPD10-10m wind speed(8) CFRAC-cloud fraction(9) LAI-leaf area index

*soil condition including moisture and temperature must be diagnosed by choosing Pleim-Xiu LSM model (2003) in WRF runs

SOILINSTATE [Input file]: restart file provides the pulsing factor, dry period, soil moisture and deposition for continuous run as well as other model diagnostic parameters

*see details in Table 3

BDSNPOUT [Output file]: hourly soil NO emission flux in ‘g/s’ or ‘mol/s’ simulated from BDSNP module

SOILOUT [Output file]: same format as ‘SOILINSTATE’

24

Table 2 List of 24 soil biome emission factor from Steinkamp and Lawrence (2010)

ID MODIS land cover

Köppen main

climate(1)

EF1(world

geometric mean)

EF2(world

arithmeticmean)

EF3(North

American)

123456789101112131415161718192021222324

WaterPermanent wetland

Snow and iceBarren

UnclassifiedBarren

Closed shrublandOpen shrublandOpen shrubland

GrasslandSavannahSavannahGrassland

Woody savannahMixed forest

Evergr. broadl. forestDec. broadl. forestDec. needle. forest

Evergr. Needle. forestDec. broadl. forest

Evergr. broadl. forestCropland

Urban and build-up landsCropland/nat. veg. mosaic

------

D,E--

A,B,C--

A,B,CD,ED,ED,E

A,B,CA,B,C

----

C,D,EC,D,E

----

A,BA,B------

00000

0.060.090.090.010.840.840.240.420.620.030.360.360.351.660.080.440.570.570.57

00000

0.060.210.210.011.051.050.971.780.740.140.950.950.954.600.131.143.133.133.14

00000

0.060.050.090.010.620.840.240.370.620.000.360.610.351.660.080.440.330.570.57

(1). A-equatorial, B-arid, C-warm temperature, D-snow, E-polar (see Appendix D for spatial map)

25

Output Variable Unit Variable Description NotesPFACTOR -- NO emission current pulse factor

DRYPERIOD hr Length of the dry period *used for continuous BDSNP run

NDEPRES Ng/m2 Soil N reservoir from deposition *used for continuous BDSNP run

SOILMPREV m3/m3 Soil moisture for previous time step

*used for continuous BDSNP run

THETA_DIAG -- Moisture WFPS with value [0 1] *diagnostic para.

WET_TERM_DIAG -- Moisture scale factor *diagnostic para.

TEMP_DIAG K Temperature in last simulation hour

*diagnostic para.

A_DIAG -- Base emission from soil biome type

*diagnostic para.

NRES_FERT_DIAG -- NRES fertilizer only *diagnostic para.

AFERT_DIAG -- Fertilizer emission factor *diagnostic para.NDEPRATE_DIAG -- Daily average N deposition rate *used for

continuous BDSNP run

CRFAVG -- Daily average canopy reduction factor

*diagnostic para.

PLUSEAVG -- Daily average pulse factor *diagnostic para.

Table 3 List of output variables from SOILINSTATE (restart file)

26

Reference

Cooter, E. J., Bash, J.O., Benson, V., and Ran, L. (2012) Linking agricultural crop management and air quality models for regional to national-scale nitrogen assessments. Biogeosciences, 9, no. 10: 4023-4035.

Hudman, R. C., Russell, A.R., Valin, L.C., and Cohen, R.C. (2010) Interannual variability in soil nitric oxide emissions over the United States as viewed from space. Atmospheric Chemistry and Physics, 10, 9943-9952.

Hudman, R. C., Moore, N. E., Mebust, A. K., Martin, R. V., Russell, A. R., Valin, L. C., and Cohen, R. C. (2012) Steps towards a mechanistic model of global soil nitric oxide emissions: implementation and space based-constraints, Atmospheric Chemistry and Physics, 12, 7779-7795, doi:10.5194/acp-12-7779-2012.

Kottek, M., Grieser, J., Beck, C., Rudolf, B., and Rubel, F. (2006) World Map of the Köppen-Geiger climate classification updated. Meteorologische Zeitshrift, 15, 259-263. DOI: 10.1127/0941-2948/2006/0130.

Lash, Ben (2014). Implementing an improved soil NOx parametrization in the Community Multiscale Air Quality model: implications for air pollution, Master thesis, Department of Civil and Environmental Engineering, Rice University.

Pleim, J. E and A. Xiu (2003). Development of a land surface model. Part II: data assimilation. Journal of Applied Meteorology, 42(12), 1811-1822.

Potter, P., Navin, R., Elena M. B., and Simon D. D. (2010) Characterizing the spatial patterns of global fertilizer application and manure production. Earth Interactions, 14, no. 2: 1-22.

Stehfest, E. and Bouwman, L. (2006) N2O and NO emission from agricultural fields and soils under natural vegetation: summarizing available measurement data and modeling of global annual emissions. Nutrient Cycling in Agroecosystems, 74(3), 207-228. doi: 10.1007/s10705-006-9000-7.

Steinkamp, J. and Lawrence, M. G. (2011) Improvement and evaluation of simulated global biogenic soil NO emissions in an AC-GCM. Atmospheric Chemistry and Physics, 11(12), 6063–6082. doi:10.5194/acp-11-6063-2011.

Wang, Y., Jacob, D. J., and Logan, J. A. (1998) Global simulation of tropospheric O3-NOx-hydrocarbon chemistry: 1. Model formulation. Journal of Geophysical Research-Atmospheres, 103, 10713–10725.

27

Yienger, J. J. and Levy, H. (1995) Empirical-model of global soil-biogenic NOx emissions. Journal of Geophysical Research-Atmospheres, 100(D6), 11447-11464. doi: 10.1029/95jd00370.

28

AppendixAppendix A. Sample setting script of ‘setcase.csh’

#setenv BDSNPHOME /work/dsc1/rz10/BDSNP_SA_V1.0setenv BDSNPSRC $BDSNPHOME/srcsetenv BDSNPLIB $BDSNPHOME/libsetenv BDSNPEXE $BDSNPHOME/binsetenv BDSNPRUN $BDSNPHOME/worksetenv BDSNPINP $BDSNPHOME/inputsetenv BDSNPOUT $BDSNPHOME/outputsetenv BDSNPLOG $BDSNPHOME/work/logdir

if ( ! -e $BDSNPINP ) then mkdir -p $BDSNPINP/MAP mkdir -p $BDSNPINP/MET mkdir -p $BDSNPINP/FERT mkdir -p $BDSNPINP/DEPendifif ( ! -e $BDSNPLOG ) mkdir -p $BDSNPLOG

29

Appendix B. Sample run script for BDSNP soil NO benchmark case

#!/bin/csh ## Stand-alone BDSNP Soil NO module V1.0#

## !!! CHANGE setcase.csh to make $BDSNPHOME as your install directory## Source the case foldersource $cwd/../setcase.csh

################## USER DEFINE ##################### Grid definitionsetenv GRIDDEC $BDSNPWORK/GRIDDESCsetenv GDNAM3D 12US2## Episode choose in Julian dateset STJD = 201178set ENJD = 201178

## Soil biome and arid/nonarid map data directorysetenv MAPDIR $BDSNPINP/MAP

## MCIP input directory setenv METDIR $BDSNPINP/MET

## Fertilizer input directorysetenv FERTDIR $BDSNPINP/FERT

## Nitrogen deposition input directorysetenv DEPDIR $BDSNPINP/DEP

## NFERT filesetenv NFERT $FERTDIR/SOILFERT_2005_benchmark.nc

## NDEP filesetenv NDEP $DEPDIR/NDEP_2005_CMAQ_benchmark.nc

## SOILBIOME filesetenv SOILBIOM $MAPDIR/BIOME_benchmark.nc

## SOILCLIMATE filesetenv SOILCLIMATE $MAPDIR/SOILCLIMATE_benchmark.nc

## Program directorysetenv EXE $BDSNPEXE/NOX_BDSNP.exe

30

## Choose whether start cold runsetenv COLDSTART N################# End USER DEFINE ################

## Run BDSNP

set CJD = $STJD#loop between the episode periodwhile ( $CJD <= $ENJD )

if ( $COLDSTART == 'Y' ) then## METCRO2D setenv METCRO2D $METDIR/METCRO2D_${CJD}_benchmark.nc## NO output from BDSNP module setenv BDSNPOUT $BDSNPOUT/B3GTS_NO_BDSNP_${CJD}_benchmark.nc## diagnostic and continue file setenv SOILOUT $BDSNPOUT/SOILINSTATE_${CJD}_benchmark.nc if ( -e $BDSNPOUT ) rm -f $BDSNPOUT

time $EXEC >& $BDSNPLOG/log.run.BDSNP.$CJD.txt

else # continous run set PJD = `./yj_pre $CJD`## METCRO2D setenv METCRO2D $METDIR/METCRO2D_${CJD}_benchmark.nc## SOILIN continuous file set SOILIN = $BDSNPOUT/SOILINSTATE_${PJD}.nc## NO output from BDSNP module setenv BDSNPOUT $BDSNPOUT/B3GTS_NO_BDSNP_${CJD}_benchmark.nc## diagnostic and continue file setenv SOILOUT $BDSNPOUT/SOILINSTATE_${CJD}.nc if ( -e $BDSNPOUT ) rm -f $BDSNPOUT

time $EXEC >& $BDSNPLOG/log.run.BDSNP.$CJD.txt

@ CJD++end # End while CJD

31

Appendix C. Mapping table used to create the soil biome map based on NLCD40 MODIS land cover categories

ID NLCD40 MODIS CATEGORY (40) ID SOIL BIOME CATEGORY (24)

1 Evergreen Needleleaf Forest 19 Evergr. Needel. Foresst

2 Evergreen Broadleaf Forest 16 and 21 Evergr. Broadl. Forest

3 Deciduous Needleleaf Forest 18 Dec. Needel. Forest

4 Deciduous Broadleaf Forest 17 and 20 Dec. Broadl. Forest

5 Mixed Forests 15 Mixed Forest

6 Closed Shrublands 7 Closed shurb

7 Open Shrublands 8 and 9 Open shrubland

8 Woody Savannas 14 Woody savannah

9 Savannas 11 and 12 Savannah

10 Grasslands 10 and 13 Grassland

11 Permanent Wetlands 2 Permanent Wetland

12 Croplands 22 Cropland

13 Urban and Built Up 23 Urban and build-up lands

14 Cropland-Natural Vegetation Mosaic 24 Cropland/nat. veg. mosaic

15 Permanent Snow and Ice 3 Snow and ice

16 Barren or Sparsely Vegetated 6 Barren

17 IGBP Water 1 Water

18 Unclassified 1 Water

19 Fill value 1 Water

20 Open Water 1 Water

21 Perennial Ice-Snow 3 Snow and ice

22 Developed Open Space 23 Urban and build-up lands

23 Developed Low Intensity 23 Urban and build-up lands

24 Developed Medium Intensity 23 Urban and build-up lands

25 Developed High Intensity 23 Urban and build-up lands

26 Barren Land (Rock-Sand-Clay) 24 Cropland/nat. veg. mosaic

27 Unconsolidated Shore 24 Cropland/nat. veg. mosaic

28 Deciduous Forest 16 and 21 Evergr. Broadl. Forest

29 Evergreen Forest 19 Evergr. Needel. Foresst

30 Mixed Forest 15 Mixed Forest

31 Dwarf Scrub 8 and 9 Open shrubland

32 Shrub-Scrub 8 and 9 Open shrubland

33 Grassland-Herbaceous 10 and 13 Grassland

34 Sedge-Herbaceous 14 Woody savannah

35 Lichens 10 and 13 Grassland

36 Moss 10 and 13 Grassland

37 Pasture-Hay 24 Cropland/nat. veg. mosaic

38 Cultivated Crops 22 Cropland

39 Woody Wetlands 2 Permanent Wetland

40 Emergent Herbaceous Wetlands 2 Permanent Wetland

32

Appendix D. Spatial map of five climate zone over CMAQ CONUS 12km domain based on Köppen-Geiger climate classification

33

Appendix E. Sample of soil biome emission factor setting include file

${BDSNPSRC}/EF_BIOME.EXT

SPC,CATEGORY,EFW,1,0.00PW,2,0.00SI,3,0.00B_DE,4,0.00U,5,0.00B_ABC,6,0.06CS,7,0.09OS_ABC,8,0.09OS_DE,9,0.01G_DE,10,0.84S_DE,11,0.84S_ABC,12,0.24G_ABC,13,0.42WS,14,0.62MF,15,0.03EBF_CDE,16,0.36DBF_CDE,17,0.36DNF_AB,18,0.35ENF,19,1.66DBF_AB,20,0.08EBF_AB,21,0.44C,22,0.57UBL,23,0.57CVM,24,0.57

34