User’s Guide for the Fertilizer Emission Scenario Tool for CMAQ (FEST-C) Version 1.1  

 

U.S. EPA Contract No. EP-W-09-023, “Operation of the Center for Community Air Quality Modeling and Analysis (CMAS)”

 

 

 

 

 

 

 


Prepared for:       Dr. Ellen Cooter

                              Atmospheric Exposure Integration Branch

                              Atmospheric Modeling and Analysis Division

                              USEPA/ORD/NERL

                              E243-02

                              Research Triangle Park, NC 27711

 

 

Prepared by:       Limei Ran, Verel Benson, and Dongmei Yang

                              Institute for the Environment

                              The University of North Carolina at Chapel Hill

                              Europa Center, Suite 490

                              100 Europa Dr.

                              Chapel Hill, NC 27517

                             

 

Date:                     May 30, 2014

 

Contents

1. The FEST-C System.. 1

1.1 Introduction. 1

1.2 Components. 3

1.3 Installation and Requirements. 3

1.4 Interface Launch. 4

2. File Structures for EPIC Modeling. 6

3. Scenario Management Selections under the File Menu. 14

4. The Pre-EPIC File Generation Tools. 17

4.1 BELD4 Data Generation. 19

4.2 Crop Site Info Generation. 21

4.3 WRF/CMAQ to EPIC.. 23

5. EPIC Spin-up Run Tools. 26

5.1 EPIC Site File Generation. 26

5.2 Soil Match for EPIC Spinup. 28

5.3 Management File Generation for Spinup. 29

5.4 View/Edit EPIC Inputs. 31

5.5 EPIC Runs for Spinup. 32

6. EPIC Application Run Tools. 34

6.1 Management File Generation for Application. 34

6.2 EPIC Runs for Application. 36

7. Output Processing and Visualizing Tools. 38

7.1 EPIC Yearly Extraction. 38

7.2 EPIC to CMAQ.. 40

7.3 Visualization. 43

8. Future Work. 43

Acknowledgments. 46

 

 


1. The FEST-C System

1.1 Introduction

The Fertilizer Emission Scenario Tool for CMAQ (FEST-C) (http://www.cmascenter.org/fest-c/) is a Java-based interface system that is used to simulate daily fertilizer application information using the Environmental Policy Integrated Climate (EPIC) model (http://epicapex.tamu.edu/ epic/) and to extract the EPIC daily output that is a required input for bidirectional NH3 modeling performed using the Community Multiscale Air Quality (CMAQ) modeling system (http://www.cmascenter.org/cmaq/).  The FEST-C interface system and spatial data processing tools were developed by the University of North Carolina at Chapel Hill (UNC)’s Institute for the Environment, while work on EPIC modeling for the FEST-C system was conducted by Benson Consulting.  All work was performed under contract to the U.S. EPA Office of Research and Development.

The EPA EPIC implementation requires no previous estimates of fertilizer application; it estimates daily fertilizer applications based entirely on simulated plant demand in response to local soil and weather conditions.  The FEST-C interface integrates CMAQ with EPIC through the current release of the Spatial Allocator (SA) Raster Tools system (http://www.cmascenter .org/sa-tools/) that has been developed under the Community Modeling and Analysis System (CMAS) Center.  Figure 1 displays the process diagram of FEST-C linked with the Weather Research and Forecasting (WRF) and CMAQ modeling system.  The Biogenic Emissions Landcover Database version 4 (BELD4), which is generated using the newly released BELD4 tool in the SA Raster Tools system, is consistently used in the FEST-C system as well as the WRF/CMAQ modeling system.  The WRF/CMAQ system provides daily weather inputs, optionally with nitrogen (N) deposition, to the FEST-C system.  In return, FEST-C generates initial soil and pH conditions and daily N information for specific crops assumed to reside in the agricultural land areas of the CMAQ bidirectional NH3 modeling grids.  The FEST-C system can be used in assessing not only the impacts of agricultural fertilization and management practices on air quality (NH3) and climate (N2O), but also the impacts of meteorology/climate and air quality (N deposition) on crop yield, soil erosion, and overall nitrogen-carbon-phosphorus biogeochemical status of the agricultural ecosystem. 

Figure 1. The FEST-C process diagram.

FEST-C is designed to be used for CMAQ domains in North America, particularly for domains covering the conterminous United States (U.S.) as well as the southern region of Canada where detailed crop census data are available.  The current version of the EPIC system for CMAQ has complete modeling capabilities for grids located within the U.S. To apply this system to other regions, users have to modify the databases (particularly for soil) that were created within the FEST-C system and to change the agricultural management file generation, as different regions will likely have different agricultural management practices as well as different soil data.  For areas outside the U.S., the bidirectional CMAQ internally estimates these inputs for regions in Canada and Mexico.  The system works for domains at different resolutions and in any of the four WRF projection coordinate systems: longitude/latitude, Lambert Conformal Conic, Universal Polar Stereographic, and Mercator.     

1.2 Components

The version 1.1 release of the FEST-C system, which includes Java interface programs, EPIC FORTRAN codes, and SA Raster Tools C++ programs, was developed in Linux-based operating systems.  The FEST-C Java interface is licensed under the Gnu Public License (GPL) version 3.  The downloaded FEST-C system contains the following two directories:

·         festc – contains the Java-based interface.

·         epic – stores EPIC model version 0509, which has been modified by the EPA to meet CMAQ input requirements; and related utilities and data.  The EPIC model description can be obtained from Texas A&M University (TAMU), College Station, TX (http://epicapex.tamu.edu/files/2013/02/epic0509usermanualupdated.pdf ).  The documentation of the modified EPIC modeling system for CMAQ is included in the release of the FEST-C system.  It provides detailed information on how this particular application of EPIC was developed. 

The FEST-C system requires that the SA Raster Tools system be installed on the same system where FEST-C resides.  For visualization, users can configure FEST-C to view netCDF files using the Visualization Environment for Rich Data Interpretation (VERDI) or NCVIEW.  Both the SA Raster Tools and the VERDI system and their documentation can be obtained from the CMAS web site (http://www.cmascenter.org/). 

1.3 Installation and Requirements

Assuming that the downloaded FEST-C system is installed under the ${FESTC_HOME} directory, users should perform the following steps:

1.      Modify ${FESTC_HOME}/config.properties to set:

·         work.dir – working directory.

·         epic.home – epic home directory, which should be ${FESTC_HOME}/epic.

·         sa.home – installed Spatial Allocator directory, which should be ${SA_HOME}.

·         visual.program.home – directory containing VERDI program.

·         queue.cmd – queue job submission command such as qsub or bsub.  Queue configuration (includes queue.name and queue.bigmem as well) for job submission has to be modified based on the user’s Linux system.  Comment out (place # sign in the front) the three queue configurations if user’s systems do not have batch job queuing systems.

·         queue.name – queue name.

·         queue.bigmem – big memory setup to be used by the EPIC-to-CMAQ tool.

·         debug – set to “true” to print out debug message.  It is recommended that users not change this setting.

·         allow.diff.check – set to “true” for checking consistent input in "Minimum Crop Acres" and "Fertilizer Year" fields from different subinterfaces.  It is recommended that users not change this setting.   

2.      Make a directory called “festc” under the user’s home directory, which is assumed to be ${USER_HOME}, then copy ${FESTC_HOME}/config.properties to the ${USER_HOME}/festc directory.  Change the work.dir setting if needed. 

3.      Modify ${FESTC_HOME}/festc/festc file to set:

·         FESTC_HOME to ${FESTC_HOME}/festc.

·         -Xmx1024M  to -Xmx2048M (optional) if users want to use 2 GB of RAM to run the interface.

·         JAVA path (optional) if users do not want to use the Standard Edition Runtime Environment (JRE) version 6 for Linux 32-bit systems that is included in the FEST-C release.

4.      Modify ${FESTC_HOME}/festc_setup.csh to:

·         Set the ${FESTC_HOME} and ${SA_HOME} directories.

·         Source the file in the user’s .cshrc file.

1.4 Interface Launch

The FEST-C interface facilitates the creation of the spatial associations, input files, soil initial­ization, and application processes required by EPIC.  After preliminary site information and soils are assigned to each grid cell, a 25-year “spin-up” simulation is required to generate initial soil and annual nitrogen demand conditions that represent the management system the user has defined.  These initial conditions are provided to the year-specific application and management scheme.  To launch the FEST-C interface system, type:

·         festc or ${FESTC_HOME}/festc/festc

 

The FEST-C interface allows the user to create, select, and manage different scenario manage­ment schemes under the File menu for EPIC modeling and 13 subinterface tools (see Figure 2). 

Figure 2. The FEST-C interface system.

The system is described in detail in the remaining sections of this document:

1.      BELD4 Data Generation

2.      Crop Site Info Generation

3.      WRF/CMAQ to EPIC

1.      EPIC Site File Generation

2.      Soil Match for EPIC Spin-up

3.      Management File Generation for Spin-up

4.      View/Edit EPIC Inputs

5.      EPIC Runs for Spin-up

1.      Management File Generation for Application

2.      EPIC Runs for Application

1.      EPIC Yearly Extraction

2.      EPIC to CMAQ

3.      Visualization

·         Section 8: Future Work

2. File Structures for EPIC Modeling

The EPIC model and related utilities and data are stored under the ${FESTC_HOME}/epic directory.  The file structure for EPIC modeling within the FEST-C system is displayed in Figure 3. 

Figure 3. File structure for EPIC modeling (directory names in black and files in blue)

The epic directory contains five subdirectories: model, util, common_data, scenarios, and doc. These are described below.

·         model – used to store the EPIC0509 model.  It includes one subdirectory:

-        current: contains two current EPIC models for spin-up and application simulations.  The models were developed for CMAQ modeling based on the EPIC0509 version of the EPIC model, obtained from the AgriLife Research, Blackland Research & Extension Center (http://epicapex.tamu.edu/epic/) at TAMU.  The documentation on the development of the EPIC modeling system for CMAQ is included under the ${FESTC_HOME}/epic/doc directory. 

·         util – contains utility programs developed by Benson Consulting to generate site, soil, and management input files required by EPIC. It has three subdirectories:

-        siteCreate: contains two programs used by the EPIC Site File Generation tool.  The programs will not only generate EPIC site files but also link EPIC sites (grid cell centroids) to the BELD4 crop grid assignments and the 8-digit hydrologic cataloging units (HUCs) that contain the grid cells to be used in the soil matching program.  Based on BELD4, this program assigns only those crops to a grid cell that BELD4 indicates are present at that location.  This minimizes the number of crop-specific simulations performed across large domains.

-        soilMatch: contains six soil matching programs used by the Soil Match for EPIC Spinup tool.  Soils are selected on the basis of the U.S. Department of Agriculture (USDA) Natural Resource Inventory (NRI) assignment of each crop in each 8-digit HUC to its most common HUC-8 soil type.

-        manageCreate: contains programs to create EPIC management files for spin-up and application simulations by the Management File Generation for Spinup and Management File Generation for Application tools. 

·         common_data – contains data sets needed for EPIC and utility programs.  Also provided under this subdirectory is the file EPIC_42crop_names.txt, which contains the crop names and numbers, used in the FEST-C system.  This directory has the following subdirectories:

-        BaumerSoils: contains the soil data sets (22,838 soils) built with soil parameters from the Baumer database developed by Dr. Otto Baumer of National Soil Survey Laboratory (NSSL) at USDA.  Dr. Baumer used the SOILS5 database and soil pedon data to develop the representative EPIC data sets.  Benson Consulting used this information to create a subset of soil parameters in 22,838 soil files to be used with EPIC.  Detailed information on the data set creation can be obtained from the documentation of the EPIC modeling system for CMAQ. 

-        EPIC_model: contains common data files required by EPIC spin-up and application runs in the following two subdirectories:

§  spinup – has common files used for EPIC spin-up simulations. For all crops except potatoes, the spin-up is set to run for 25 years using the EPIC statistical weather generator (see the weather generator discussion in the EPIC documenta­tion from TAMU).  We (Benson Consulting, EPA, and UNC) have arbitrarily set the starting year as 1978 in EPICCONT.DAT.  For potatoes, the spin-up is set to run for 100 years from 1903 in EPICCONT_POTATOES.DAT.

§  app – contains common files used for EPIC application simulations.  In the FEST-C system, users input the year (1 year only) for the EPIC application simulation.  When a new scenario is created, EPICCONT.DAT from this directory is copied to the scenarios/“scenario name”/share_data directory and the simulation period is changed to 2 years starting from the year previous to the simulation year.  Two years’ worth of weather data are needed to support production of fall-sown crops.  At present, the same weather is used for both years.  In the future, an option may be added to support input of two unique weather time series. 

-        gisFiles: includes U.S. counties, U.S. states plus some boundary areas in Canada and Mexico, and U.S. 8-digit HUC shapefiles and elevation and slope image files.  The readme file in the directory describes each file and associated attributes in detail. 

-        statWeath: contains weather station climate statistics files distributed with the standard EPIC package.

-        util: includes common files used by the utility programs.  This directory has two subdirectories:

§  soilMatch – has input files used by the soil matching program to create EPIC soil files for the EPIC Runs for Spinup tool.

§  manageCreate – contain files to be used in generating EPIC spin-up and application management files.  We developed management data with fertilizer types applied in 2001 and 2006 for each of 10 production regions (Northeast, Appalachia, Southeast, Lake States, Corn Belt, Delta States, Northern Plains, Southern Plains, Mountain, and Pacific) (see the region map in Cooter et al. [2012], which is listed in the “Online Resources” section of the FEST-C web site [(http://www.cmascenter.org/fest-c/]).  Fertilizer types (but not amounts) applied are based on fertilizer sales of 62 major fertilizer types by state.  Users can obtain detailed information from the docu­mentation for the EPIC modeling system for CMAQ.  It is recommended that 2001 be used for applications prior to 2006, and that 2006 be used for applications from 2006 through 2010.  In the future, a 2011 fertilizer type file will be created to coincide with the released 2011 National Land Cover Data (NLCD).  Fertilizer types applied are used by the EPIC management file generation for application, and they are stored under the following two subdirectories: 

·         2001: for 2001 fertilizer year management file generation. 

·         2006: for 2006 fertilizer year management file generation. 

In both cases, regional fertilizer data information is stored under the directory:

-        regionFert 

·         scenarios – contains EPIC application scenarios and is described separately below this bulleted list.

·         doc – contains documents on the EPIC modeling system for CMAQ (EPA_EPIC_application_v1_10252013.pdf). 

 

In general, users should not change the data files described in the above directories.  All files generated by users’ applications are stored under the ${FESTC_HOME}/epic/scenarios directory.  When the user creates a scenario by selecting “New Scenario” under the File menu, the following items are created:

·         scenariosInfo – stores information for the created scenario, which is assumed to be named by the user as “scenario name”.  This directory contains:

-        “scenario name”: an XML file that stores the scenario information. 

-        logs: directory containing the script file used to create (or copy or delete as well) the scenario and execution log file.

·         “scenario name” – scenario directory that will contain all generated files for this scenario.

Under each scenario directory, the following directories are created for EPIC modeling:

·         share_data – contains all data sets generated for EPIC modeling and to be used by all crops modeled.  After users generate EPIC site files and daily weather, it will contain the following two subdirectories: 

-        SIT: contains EPIC site files.

-        dailyWETH: contains daily weather and N files for EPIC modeling.

·         scripts – stores script and log files created to run the tools within the FEST-C interface.  All tools are executed through the Linux queue system.  Users should always check the log file to make sure that the queue job completed correctly.  Unwanted files under this directory should be cleaned out periodically. 

·         work_dir – contains some intermediate or temporary files created by the FEST-C tools.  Currently, not many files are created under this directory. 

·         21 crop dirs (ALFALFA, BARLEY, BEANS, CANOLA, CORNG, CORNS, COTTON, EBEANS, HAY, OATS, OTHER, OTHGRASS, PEANUTS, POTATOES, RICE, RYE, SORGHUMG, SORGHUMS, SOYBEANS, SWHEAT, WWHEAT) – the 21 crop directories are created by the EPIC Site File Generation tool.  Under each crop directory there are many files that are created for generating EPIC input files.  The spinup and app subdirectories described below are also created from management file generation and EPIC runs for spin-up and application:

-        spinup: contains files created from the EPIC management file generation and EPIC runs for spin-up tools.  It contains the following three subdirectories:

§  manage – contains EPIC run files and EPIC site management files created by the Management File Generation for Spinup tool.  Management files are contained under the following subdirectory:

-        OPC: contains the management schedule for each domain grid cell containing rain-fed and irrigated crop.  Variables (schedule) can be interpreted using the documentation for the EPIC modeling system for CMAQ.

§  rainf – contains files for each domain grid cell containing the particular crop that were created by the EPIC Runs for Spinup tool from rain-fed crops.  It contains the following output directories (see the EPIC documentation from TAMU):

-        DFA: daily fertilizer and other output.

-        NCM: monthly fertilizer and other output.

-        NCS: monthly soil output.

-        OUT: standard EPIC output file that contains various budget tables and summaries of the simulation that are useful for debugging.

-        SOL: soil output files that are used as initial values for the application.

-        TNA: annual fertilizer and other outputs.

-        TNS: annual soil output.

§  irr – contains files for each domain grid cell containing the particular crop that were created by the EPIC Runs for Spinup tool from irrigated crops.  It contains the following output directories:

-        DFA: daily fertilizer and other output.

-        NCM: monthly fertilizer and other output.

-        NCS: monthly soil output.

-        OUT: standard EPIC output file that contains various budget tables and summaries of the simulation that are useful for debugging.

-        SOL: soil output files.

-        TNA: annual fertilizer and other outputs that are useful for debugging.

-        TNS: annual soil output.

-        app: contains files created from the management file generation and EPIC runs for application tools.  It contains the following three subdirectories:

§  manage – contains EPIC run files and EPIC site management files created by the Management File Generation for Application tool.  Management files are contained under the following subdirectory:

-        OPC: contains the management schedule for each domain grid cell containing rain-fed and irrigated crop.  Variables (schedule) can be interpreted using the documentation for the EPIC modeling system for CMAQ.

§  rainf – contains files created by the EPIC Runs for Application tool from rain-fed crops.  It contains the following output directories (see the EPIC documentation from TAMU):

-        DFA: daily fertilizer and other output.

-        NCM: monthly fertilizer and other output.

-        NCS: monthly soil output.

-        OUT: standard EPIC output file that contains various budget tables and summaries of the simulation (useful for debugging).

-        SOL: soil output files.

-        TNA: annual fertilizer and other outputs.

-        TNS: annual soil output.

§  irr – contains files created by the EPIC Runs for Application tool from rain-fed crops.  It contains the following output directories:

-        DFA: daily fertilizer and other output.

-        NCM: monthly fertilizer and other output.

-        NCS: monthly soil output.

-        OUT: standard EPIC output file that contains various budget tables and summaries of the simulation (useful for debugging).

-        SOL: soil output files.

-        TNA: annual fertilizer and other output.

-        TNS: annual soil output.

·         output4CMAQ – stores EPIC output files and extracted netCDF files for quality assurance (QA) and CMAQ bidirectional NH3 modeling.  This directory contains the two following subdirectories:

-        spinup: contains all files created from EPIC spin-up simulations for CMAQ.  It contains the following three subdirectories:

§  5years – contains extracted average EPIC output for each crop from the last five years of the spin-up simulation.  Files are named as “BELD4 Crop Number”.dat (see Table 1 in Section 4.1 for crop numbers). 

§  daily – stores daily EPIC output files for the EPIC spin-up simulation of each crop.  “BELD4 Crop Number”.NCS is for soil output and “BELD4 Crop Number”.NCD is for fertilizer and other daily output. 

§  toCMAQ – contains created netCDF files with EPIC spin-up output for selected modeling grid cells with crop data.  The netCDF output files are created using the FEST-C tools by extracting data files stored under the 5years or daily directories listed above.

-        app: stores files created from EPIC application simulations for CMAQ.  It contains the following three subdirectories:

§  year – contains extracted average EPIC output for the EPIC application year.  Files are named as “BELD4 Crop Number”.dat. 

§  daily – stores daily EPIC output files for the EPIC application simulation of each crop.  “BELD4 Crop Number”.NCS is for soil output and “BELD4 Crop Number”.NCD is for fertilizer and other daily output. 

§  toCMAQ – contains created netCDF files with EPIC application simulation results for selected modeling grid cells with crop data.  The netCDF output files are created using the FEST-C tools by extracting data files stored under the year or daily directories listed above.

3. Scenario Management Selections under the File Menu

 

There are five scenario management selections (as well as Exit) under the File menu at the upper left of the FEST-C tool bar: Open Scenario, New Scenario, Copy Scenario, Save Scenario, and Delete Scenario. Each of these is described below.

·         Open Scenario – to open an already-created scenario. Users always need to either open or create (see next bullet) a scenario to work on.  Users can select any one of the scenarios under the ${FESTC_HOME}/epic/scenarios/scenariosInfo directory.  After users open a scenario, information for the scenario, such as the domain description, will be automatically filled in by the FEST-C tool interface.  Within the FEST-C system, users have to work within a scenario to execute any of the tools except the Visualization tool.  Figure 4 shows the interface used to open the test case created in the FEST-C system (The test_case scenario is described at the beginning of Section 4).

·         New Scenario – to create a new scenario (versus opening one that’s already been created). In creating a new scenario, the user has to provide the following information for a CMAQ modeling domain and EPIC simulation year (see Figure 5):

-        Rows, Columns: the number of rows and columns for the domain.

-        XCellSize, YCellSize: x and y resolution for the grid cell.

-        XMin, YMin: x and y coordinates of the lower left corner of the lower left grid cell.  Users can often find this information in the GRIDDESC file in the Meteorology-Chemistry Interface Processor (MCIP) output.

 

 

Figure 4. Open Scenario selection window used to open the test_case scenario.

Figure 5. New Scenario selection window with input to create the test_case scenario within FEST-C.

 

-        Proj4Projection: domain projection defined in Proj4 format (see details at http://www.remotesensing.org/geotiff/proj_list/).  The interface sets the Lambert Conformal Conic projection, which is used by the CMAQ U.S. 12-km domain as the default.  Users can change it to any projection supported for CMAQ modeling.

-        Grid Name: user-supplied name for the domain, using no more than 16 alphanumeric characters and no spaces. 

-        Simulation Year: year (YYYY) for the EPIC simulation.  FEST-C is designed to simulate yearly fertilizer application information for CMAQ bidirectional NH3 modeling.

-        NLCD/MODIS Data Year: year (YYYY) for the NLCD/MODIS land cover data used for the EPIC simulation.  NLCD/MODIS land cover data are required in the EPIC simulation within FEST-C for CMAQ bidirectional NH3 modeling.  Currently, users can select 2001 or 2006 NLCD/MODIS data year.  2011 NLCD/MODIS data selection will be added to the system in the future.

-        Scenario Name: name for the scenario, using alphanumeric characters and no spaces.

When a new scenario is created, the following files and directories are created:

-        ${FESTC_HOME}/epic/scenarios/scenariosInfo/“scenario name”: XML file to store the scenario information.

-        ${FESTC_HOME}/epic/“scenario name”: directory to store all generated information for this scenario.  Some subdirectories are also generated under this scenario directory (see Section 2 for file structures).

-        ${FESTC_HOME}/epic/“scenario name”/share_data/EPICCONT.DAT: contains EPIC constant parameters.  The simulation period is a two-year period starting with the year before the simulation year.

·         Copy Scenario – to copy an existing scenario under the ${FESTC_HOME}/epic/ scenarios/scenariosInfo directory to a new scenario with a defined simulation year, which can be the same as or different from the existing scenario year (see Figure 6).  Note that if the existing scenario contains many crop simulations, this action can take a long time to complete in a background queue job. 

·         Save Scenario – to save a scenario after a user has worked on it.  Only the input information for the scenario tool interfaces is saved.  When the user performs the FEST-C tool actions, generated files are always saved under different directories, described in Section 2. 

 

Figure 6. Copy Scenario selection window.

 

·         Delete Scenario – to delete a scenario.  This is also run as a background submission and can take some time. All directories and subdirectories for that scenario are deleted completely.

·         Exit – to exit the FEST-C interface.  You will be asked if you want to save the scenario you were working on before exiting the tool.

The action performed by making a selection under the File menu (e.g., copy, create, delete) is executed by a script file through the queue job. The script and log files are stored under the ${FESTC_HOME}/epic/scenarios/scenariosInfo/logs directory.  Users should check the log files under the directory to make sure that the selected action completely correctly.

4. The Pre-EPIC File Generation Tools

 

Before describing the various FEST-C tools in Sections 4 through 7, we must first discuss the test_case scenario in the FEST-C system, because we use this scenario to demonstrate the input and output components on the tool interface.  The test_case scenario is a small 12-km domain with 25 rows and 25 columns in the CMAQ standard projection.  The domain is located in the northwest corner of Iowa and crosses into Minnesota, South Dakota, and Nebraska.  Figure 7 illustrates the domain grid cells with the identification numbers (GRIDID) used in the FEST-C system; colors are used to indicate the crop percentage for each grid cell as generated from 2006 NLCD data.  All 625 (25´25) 12-km grid cells in this test domain have crop coverage, and most of them have more than 75% crop coverage. 

 

Figure 7. FEST-C test_case scenario 12-km domain in the U.S. northern Central Plains. Associated with each grid cell is an identification number (GRIDID) and a color that indicates crop coverage percentage.  The domain’s cells are numbered from 1 for the lower left corner cell to 625 for the upper right corner cell.

 

In Section 4, we discuss the first three tools in the FEST-C interface: the BELD4 Data Generation tool, the Crop Site Info Generation tool, and the WRF/CMAQ-to-EPIC tool. These are used to prepare site crop and spatial data for EPIC input file generation and to generate required daily weather data and optional nitrogen deposition data for the EPIC simulation year.  All three tools were developed in the SA Raster Tools system.

4.1 BELD4 Data Generation

EPIC modeling for a CMAQ domain requires BELD4 data, which are used for selecting grid cells with crop coverage.  The BELD4 Data Generation tool allows users to compute the BELD4 dataset for a selected scenario.  For detailed information on it, users can consult the SA Raster Tools documentation: http://www.cmascenter.org/sa-tools/documentation/4.0/html/Raster_Users_Guide_4_0.htm.

Figure 8 shows the interface used to compute the BELD4 dataset for the test_case scenario. 

Figure 8. The BELD4 Data Generation tool interface for the test_case scenario.

Before running this tool, users need only to make sure that the following two entries are correct for their scenarios:

·         NLCD/MODIS Data Year – the year defined when creating the scenario; it can be either 2001 or 2006.  Processed 2001 and 2006 crop tables from the U.S. and Canada are stored under the ${SA_HOME}/data directory for this tool.  The 42 rain-fed and irrigated crops generated from the BELD4 tool and modeled in the FEST-C system are displayed in Table 1.  In addition to crop numbers used in BELD4 (new version of BELD), the table also lists BELD3 (older version) numbers, because we started building the FEST-C system using the BELD3 data.  Crop numbers used in EPIC modeling often follow the BELD3 crop numbers (from 22 to 63), but the output files from EPIC modeling for use in CMAQ use the BELD4 crop numbers (from 1 to 42).  If a new crop is to be modeled in the FEST-C system, new crop tables under the SA data directory have to be generated and the BELD4 tool has to be modified as well.

Table 1. The 42 rain-fed and irrigated crops modeled in the FEST-C system.

BELD4

BELD3

Crop Name

BELD4

BELD3

Crop Name

BELD4

BELD3

Crop Name

1

22

Hay

15

36

Cotton

29

50

SorghumSilage

2

23

Hay_ir

16

37

Cotton_ir

30

51

SorghumSilage_ir

3

24

Alfalfa

17

38

Oats

31

52

Soybeans

4

25

Alfalfa_ir

18

39

Oats_ir

32

53

Soybeans_ir

5

26

Other_Grass

19

40

Peanuts

33

54

Wheat_Spring

6

27

Other_Grass_ir

20

41

Peanuts_ir

34

55

Wheat_Spring_ir

7

28

Barley

21

42

Potatoes

35

56

Wheat_Winter

8

29

Barley_ir

22

43

Potatoes_ir

36

57

Wheat_Winter_ir

9

30

BeansEdible

23

44

Rice

37

58

Other_Crop

10

31

BeansEdible_ir

24

45

Rice_ir

38

59

Other_Crop_ir

11

32

CornGrain

25

46

Rye

39

60

Canola

12

33

CornGrain_ir

26

47

Rye_ir

40

61

Canola_ir

13

34

CornSilage

27

48

SorghumGrain

41

62

Beans

14

35

CornSilage_ir

28

49

SorghumGrain_ir

42

63

Beans_ir

 

·         NLCD/MODIS List File – set to the fixed-format text file that contains downloaded NLCD land use, imperviousness, and canopy data files and downloaded tiled MODIS land cover (MCD12Q1) data sets.  The interface sets the file ${SA_HOME}/data/ nlcd_modis_files_{NLCD/MODIS Data Year}.txt as the default file.  Users need to download NLCD and MODIS land cover data sets and modify the text file accordingly using the paths and names for the downloaded data sets.  The text file has to have the same fixed titles and format as in the default file.  If users want to generate a 2001 BELD4 data set, 2001 NLCD and MODIS land cover data sets have to be downloaded from the NLCD web site (http://imsdemo.cr.usgs.gov/webappcontent/mrlc/nlcdrlc.php) and MODIS land products web site (https://lpdaac.usgs.gov/products/modis_products_ table/mcd12q1 ), and the nlcd_modis_files_2001.txt list file has to be modified following the format in this sample file. 

When the Run button on the BELD4 Data Generation tool interface is clicked, a csh script file is generated under the ${FESTC_HOME}/epic/scenarios/”scenario name”/scripts directory.  This file is submitted to the system as a queue job after the user clicks OK, and a log file for the job execution will be generated after the queue job is finished.  Users should always check for error messages in the log file, based on the information provided in the Message Box (shown in Figure 8). 

 

The outputs produced by the tool are the following two files, which are stored under the ${FESTC_HOME}/epic/scenarios/”scenario name”/share_data directory:

·         beld4_{Gird Name}_{NLCD/MODIS Data Year}.nc (beld4_TESTGRIDS_2006.nc for the test_case scenario) – a netCDF file containing gridded percentage data for imperviousness, canopy, 194 tree species, 40 NLCD/MODIS land cover classes, and 42 BELD4 crops.  This domain- and resolution-specific data file is a required input to the Crop Site Info Generation tool discussed in the next section. 

·         beld4_{Grid Name}_{ NLCD/MODIS Data Year}.txt (beld4_TESTGRIDS_2006.txt for the test_case scenario) – a text table containing gridded percentage data for impervious­ness, canopy, and 40 NLCD/MODIS land cover classes for a specific domain and grid resolution.

4.2 Crop Site Info Generation

The Crop Site Info Generation tool is used to compute EPIC site (grid cells) and crop informa­tion for EPIC modeling.  The tool processes spatial boundary shapefiles and elevation and slope image data to generate site infor­mation data needed in EPIC modeling.  Figure 9 displays the tool interface used to compute the crop site information for the test_case scenario.  The tool uses the spatial data sets stored under ${FESTC_HOME}/epic/common_data/gisFiles and input files from the ${SA_HOME}/data directory.  Before running this tool, users need only to choose the following two entries for this tool:

 

Figure 9. The Crop Site Info Generation tool interface used for the test_case scenario.

·         BELD4 netCDF File – this is often the BELD4 netCDF file generated using the previous tool.  The file name should be of the form beld4_{Gird Name}_{NLCD/MODIS Data Year}.nc (beld4_TESTGRIDS_2006.nc for the test_case scenario).  If this file does not exist, the interface will indicate this after Run is clicked.  If this is the case, users need to either run the previous tool to generate this data set or input anywhere within the computer system a BELD4 netCDF file that is based on the same domain as the domain of the scenarios with which the users are working.

·         Minimum Crop Acres – this is the minimum crop area for at least one of the 42 possible crops in a grid cell if the grid cell is to be selected for EPIC simulation.  The default is set to 40 acres, which is what we have used for CMAQ 12-km grid modeling; this is intended to represent the smallest commercially viable farm size.  For finer grid resolutions or for domains in which smaller commercial enterprises make up a significant fraction of farms (e.g., orchards, some vegetable and specialty crops), users may need to reduce this minimum to adequately characterize the distribution of agricultural lands.  Doing so may increase the number of simulated grid cells (sites), which can also increase run time. 

After Run has been clicked and the queue job has completed, users should check the log file under their scenario’s scripts directory to see whether any errors occurred during execution.

The tool generates the following two text output files stored under ${FESTC_HOME}/epic/ scenarios/”scenario name”/share_data:

·         EPICSites_Info.csv – contains the GRIDID, XLONG, YLAT, ELEVATION, SLOPE_P, HUC8, REG10, STFIPS, CNTYFIPS, GRASS, CROPS, CROP_P, COUNTRY, and COUNTRY-PROVINCE items used for creating EPIC site files.

·         EPICSites_Crop.csv – contains the GRIDID, acreages of 42 possible crops within each grid cell, COUNTRY, and HUC8 items used in EPIC site and soil file generation. 

4.3 WRF/CMAQ to EPIC

The WRF/CMAQ-to-EPIC tool is used to generate EPIC daily weather data and, if the option is selected, N deposition input files to be used in EPIC application simulations.  The tool reads EPIC grid cell information stored in the EPICSites_Info.csv file generated using the previous tool.  It extracts EPIC daily weather input data from WRF simulation output.  There are three options currently available for the inclusion of daily atmospheric data: (1) no N deposition, (2) the original EPIC default (assumes a constant N concentration of 0.8 ppm in precipitation and no dry deposition), and (3) CMAQ hourly output files (DRYDEP, WETDEP1) from a previous CMAQ run (unidirectional or bidirectional).[*] In the vicinity of areas receiving significant atmospheric dry deposition, such as areas immediately surrounding large animal feeding operations, this information can impact EPIC biogeochemistry and subsequent estimates of plant N application needs.  If speciated N deposition is available, oxidized wet and dry deposition are assumed to enter the EPIC soil nitrate pool, and reduced wet and dry deposition is assumed to enter the EPIC soil ammonium pool.  If CMAQ hourly output files are used, the MCIP and CMAQ domains must be the same as the domain defined in the EPIC scenario.  Figure 10 shows this tool interface as used for the test_case scenario. 

Figure 10. The WRF/CMAQ-to-EPIC tool interface used for the test_case scenario.

Before running this tool, users have to provide input for the following three items in the interface:

·         MCIP Data Directory – this directory contains processed WRF files output by MCIP for the EPIC simulation year.  This tool requires only MCIP METCRO2D output files.  METCRO2D output files have to have names of the format METCRO2D*{DATE} in which * can be any nondigit characters and {DATE} can be in one of four date formats: YYYYMMDD, YYMMDD, YYYYDDD, or YYDDD (e.g., METCRO2D_051226 )

·         Deposition Selection – used to select one of the following three options:

-        CMAQ deposition directory: select this option to use CMAQ deposition output files.  If this is selected, users have to set the CMAQ deposition file directory in the next field on the interface.

-        Default: this option assumes that the N mixing ratio is 0.8 ppm for wet oxidized N deposition.  The tool computes wet oxidized N deposition based only on rainfall, and other N deposition variables are assumed to be zero.

-        Zero: this option assumes that there is no atmospheric N.

·         CMAQ Deposition Directory – used to set the directory containing the CMAQ dry and wet deposition output files for the simulation year if “CMAQ deposition directory” was chosen in the previous field.  The dry and wet deposition file names must contain the string “DRYDEP” or “WETDEP”.  In addition, the deposition file names must end with “*{DATE}” in the format that is described for the MCIP files above (e.g., an MCIP file can be named as METCRO2D_20030416 and the deposition files can be named CCTM_M2f_v14soa_v3.4beta3_2003.DRYDEP.20030416 and CCTM_M2f_v14soa_v3.4beta3_2003.WETDEP1.20030416) 

After Run has been clicked and the queue job has finished, users should check the log file under their scenario’s scripts directory to see whether any errors occurred during execution.  The tool generates the following three output files stored under ${FESTC_HOME}/epic/ scenarios/”scenario name”/share_data:

·         dailyWETH/“GRIDID”.dly – daily weather and N files for each selected grid cell for EPIC modeling.  “GRIDID” is the identification number for a selected grid cell (see Figure 7).  Each daily file contains 14 formatted data items (listed in Table 2) to be used in the EPIC runs for the simulation year (same as the weather year).  This daily weather file is duplicated for the year before the simulation year because we run the EPIC model for a two-year period using daily time steps. 

·         EPICW2YR.2YR – daily weather file list to be used in EPIC application modeling.  It is defined in ${FESTC_HOME}/epic/common_data/EPIC_model/app/EPICFILE.DAT.

·         site_weather_dep_${YEAR}0101_to_${YEAR}1231.nc – a single netCDF file with daily time steps for the simulation year.  It contains extracted daily weather and N deposition data for the EPIC grid cells in the EPICSites_Info.csv file.  Users can use the Visualization tool (discussed in Section 7) to display the values of a selected variable spatially. 

 

Table 2. EPIC daily weather and nitrogen deposition variables.

Index

Variable

Index

Variable

1

Year

8

Daily Average Relative Humidity

2

Month

9

Daily Average 10-m Wind Speed (m s-1)

3

Day

10

Daily Total Wet Oxidized N (g/ha)

4

Daily Total Radiation (MJ m2)

11

Daily Total Wet Reduced N (g/ha)

5

Daily Maximum 2-m Temperature (C)

12

Daily Total Dry Oxidized N (g/ha)

6

Daily minimum 2-m temperature (C)

13

Daily Total Dry Reduced N (g/ha)

7

Daily Total Precipitation (mm)

14

Daily Total Wet Organic N (g/ha)

5. EPIC Spin-up Run Tools

 

Users must run EPIC spin-up simulations to generate soil files and initial annual plant N demand data, which are used in EPIC application-year simulations.  Described in this section are the five EPIC spin-up run tools: EPIC Site File Generation, Soil Match for EPIC Spinup, Management File Generation for Spinup, View/Edit EPIC Inputs, and View/Edit EPIC Inputs. Users can use these tools sequentially to generate files needed for EPIC spin-up simulations.  (Note: Although there are 42 rain-fed and irrigated crops in the FEST-C system, the current system is not yet set to model the DRY BEANS (BEANS) crop; users should therefore not select BEANS in running the FEST-C tools.)  Users can obtain detailed information on building the EPIC databases using developed programs from the documentation for the EPIC modeling system for CMAQ, and on the file formats and parameter descriptions from the EPIC model documentation from TAMU (http://epicapex.tamu.edu/files/ 2013/02/epic0509usermanualupdated.pdf).   

5.1 EPIC Site File Generation

The EPIC Site File Generation tool uses the FORTRAN programs stored under ${FESTC_HOME}/epic/util/siteCreate.  This tool generates EPIC site files for the selected grid cells with the minimum crop acreage limit criterion.  It also creates 21 crop directories with a crop site list file that is to be used in the other tools.  Figure 11 displays the tool interface for the test_case scenario.  As explained in Section 4.2, users can change the Minimum Crop Acres if the 40-acre limit is too large for their modeling domain’s grid cells.     

Figure 11. The EPIC Site File Generation interface for the test_case scenario.

After the queue job run has finished, users should check the log file under their scenario’s scripts directory to see whether any errors occurred during execution.  The tool generates the following files and directories:

·         “scenario name”/share_data/SIT/“GRIDID”0.SIT – EPIC site files to be used for all EPIC crop modeling.  A description of the file format can be obtained from the EPIC model documentation.

·         “scenario name”/share_data/SITELIST.DAT – EPIC site list file for all crops to be used in EPIC modeling.

·         “scenario name”/“crop name”/“crop name”-LIST.DAT – EPIC site list for the particular crop, to be used in the Soil Match for EPIC Spinup tool discussed in the following section.  If there are no grid cells that contain that crop, this file will be empty.

5.2 Soil Match for EPIC Spinup

The Soil Match for EPIC Spinup tool selects a soil for each crop within a grid cell and creates the EPIC soil file.  The EPIC soil datasets are built to represent the sample point soils selected for USDA NRI data points at the HUC-8 spatial scale. This tool links built EPIC soil datasets contained in the BaumerSoils subdirectory to the soil series from the USDA NRI for the crop and grid cell.  It uses the FORTRAN programs stored under ${FESTC_HOME}/epic/util /soilMatch with the common data files stored under ${FESTC_HOME}/epic/common_data/ util/soilMatch and the generated soil list data under each crop directory.  Figure 12 shows the tool interface used to match soils for all crops except BEANS (as explained at the beginning of Section 5) for the current version of FEST-C.  After selecting the crops, users click the Run button to run the tool in the queue.  After the job has finished, users should check the queue job and log file in the “scenario name”/scripts directory, based on the information provided in the Message Box (shown in Figure 12). 

 

The tool generates many output files under each crop directory, but most of them are inter­mediate files.  The final data file created for the EPIC spin-up simulation is “scenario name”/ “crop name”/SOILLIST.DAT, which contains the matched BaumerSoils soil file with other parameters for each grid cell under each crop directory.

Figure 12. The Soil Match for EPIC Spinup tool interface used for the test_case scenario.
Users can select single or multiple crops (except BEANS, for the current FEST-C version).

5.3 Management File Generation for Spinup

The Management File Generation for Spinup tool interface is used to create the EPIC manage­ment for each crop within a grid cell. The EPICRUN file that has the linkages for the grid cell, statistical weather and wind files, soil files, and management files is also created for the rain-fed and irrigated forms of the crop.  This tool uses the FORTRAN program ManGenSU.exe stored under ${FESTC_HOME}/epic/util/manageCreate with the common data files stored under ${FESTC_HOME}/epic/common_data/util/manageCreate and many other data files generated under each crop directory.  Figure 13 shows the tool interface used to generate management files for the test_case scenario. 

Figure 13. The Management File Generation for Spinup tool used for the test_case scenario.

Users need to make sure that the following two fields are selected correctly:

·         Fertilizer Year – select either 2001 or 2006 for choosing the correct common data sets stored under ${FESTC_HOME}/epic/common_data/util/manageCreate. 

·         Selected Crops – select one crop or multiple crops (except BEANS).

After the user clicks the Run button and then “OK”, a queue job to generate management files for each selected crop is submitted.  After the job has finished, users should check the queue job and log file in the “scenario name”/scripts directory, based on the information provided in the Message Box (shown in Figure 13).

There are many output files generated under each crop, but many of these are used just for verification. The tool generates the following files to be used for the EPIC spin-up simulations under the directory “scenario name”/“crop name”/spinup/manage for each crop:

·         EPICRUNFILERAIN.DAT – EPIC run file for rain-fed spin-up simulation of this crop.

·         EPICRUNFILEIRR.DAT – EPIC run file for irrigated spin-up simulation of this crop.

·         GRIDS_OPC.DAT – the list of management file names to be used in EPIC modeling.

·         OPC/“GRIDID”0“BELD3 Crop Number”.OPC – grid cell EPIC management files under the OPC directory.  Table 1 in Section 4.1 lists the crop numbers in the BELD data. 

5.4 View/Edit EPIC Inputs

The View/Edit EPIC Inputs interface allows users to view or edit five main EPIC simulation files (listed in Figure 14).  Users generally do not need to edit these files, but viewing them can be helpful for debugging. The user has to select a crop first and then select the EPIC simulation type.  The simulation type can be SPINUP if the Management File Generation for Spinup tool (previous section) has been executed for the selected crop; or the user can select the simulation type APP after the Management File Generation for Application tool (discussed in Section 6.1) has been executed for the crop. Figure 14 shows the View/Edit EPIC Inputs tool interface for the test_case scenario. 

Figure 14. The View/Edit EPIC Inputs tool for the test_case scenario.

5.5 EPIC Runs for Spinup

The EPIC Runs for Spinup tool interface is used to run the EPIC model for spin-up (EPIC0509su.exe program), which is stored under the directory ${FESTC_HOME}/epic/model/current. The tool uses input files stored primarily in the following directories:

·         ${FESTC_HOME}/epic/common_data/EPIC_model/spinup – for the common model input files.

·         ${FESTC_HOME}/epic/scenarios/“scenario name”/share_data – for site files and list file.

·         ${FESTC_HOME}/epic/common_data/statWeath – for observed climate station statistical data (see http://epicapex.tamu.edu/epic/)

·         ${FESTC_HOME}/epic/scenarios/“scenario name”/“crop name”/spinup/manage – for the run files, management files, and management list file.

·         ${FESTC_HOME}/epic/scenarios/“scenario name”/ “crop name” – for the soil list file.

Spin-up simulations are performed primarily to generate EPIC soil files to be used as initial conditions in the application run for the simulation year.  As discussed in Section 2, the spin-up simulation is run for 25 years starting from 1978 for all crops except potatoes; for potatoes it is run for 100 years starting from 1903.  Figure 15 displays the tool interface used for the test_case scenario.  Users can select one or more crops (except BEANS) for the simulation.  After clicking the Run button, a script file is generated to run the rain-fed and irrigated EPIC spin-up simula­tions for each crop.  The user submits the script file to the queue by clicking OK.  After the job has finished, users should check the queue job and log file in the “scenario name”/scripts directory, based on the information provided in the Message Box (shown in Figure 15). 

Figure 15. The EPIC Runs for Spinup tool used for the test_case scenario.

The tool generates many directories and files for each crop.  The original EPIC output files are stored under the two following subdirectories in the “scenario name”/“crop name”/spinup directory:

·         rainf – contains output from EPIC rain-fed spin-up simulations for this crop.

·         irr – contains output from EPIC irrigated spin-up simulations for this crop. 

In both cases, soil files to be used in the EPIC application simulation are:

-        SOL/“GRIDID”0“BELD3 Crop Number”.SOL 

The output data created for CMAQ modeling are used primarily for QA purposes, and are stored under the following two directories in the “scenario name”/output4CMAQ/spinup directory:

·         5years – contains average EPIC output data from the last five years of the spin-up simulations for the crops. 

·         daily – stores daily EPIC output data from EPIC spin-up runs for the crops simulated. 

6. EPIC Application Run Tools

After users complete the EPIC simulations for spin-up, they can proceed to the EPIC application run tools for the simulation year.  The spin-up simulations need to be run only once for a given domain and grid resolution—in other words, the initial conditions can be re-used for multiple application years. The first step in running an EPIC application is to generate management files for the application year (as described in Section 6.1).  The application management program needs to be run only once for a given domain and grid resolution; it is not year-specific.  The user can then run the EPIC model for the application year  (as described in Section 6.2) if the daily weather and N deposition files for the scenario have already been generated using the tool described in Section 4.3. 

6.1 Management File Generation for Application

The Management File Generation for Application tool interface is used to create (1) the EPIC management files for each crop to be used in the EPIC application-year modeling; and (2) the EPICRUN file for the rain-fed and irrigated simulations, which contains the linkages for the statistical weather and wind files, the soil files, and the management files for EPIC grid cells.  The tool uses the FORTRAN program ManGenFERT.exe stored under the ${FESTC_HOME}/ epic/util/manageCreate directory with the common data files stored under ${FESTC_HOME} /epic/common_data/util/manageCreate and many other data files generated under each crop directory.  Figure 16 shows the tool interface used to generate management files for the test_case scenario.  The user needs to make sure that the following two entries are selected correctly:

·         Fertilizer Year – select 2001 or 2006.  The common management and fertilizer data sets created under the ${FESTC_HOME}/epic/common_data/util/manageCreate will be used accordingly.  This management tool uses the created fertilizer data types for the 10 crop production regions. 

·         Selected Crops – select one or more crops (except BEANS).

After clicking the Run button, a script file is generated to compute the management files for the selected crops.  The user submits the script file to the queue by clicking OK.  After the job has finished, users should check the queue job and log file in the “scenario name”/scripts directory, based on the information provided in the Message Box (shown in Figure 16). 

 

 

Figure 16. The Management File Generation for Application tool interface used
for the test_case scenario.

The tool will generate many output files under each crop, but many of these are used just for verification. The tool generates the following files under the “scenario name”/“crop name”/app/manage directory:

·         EPICRUNFILERAINDW.DAT – EPIC run file for rain-fed application simulation.

·         EPICRUNFILEIRRDW.DAT – EPIC run file for irrigated application simulation.

·         GRIDS_OPC.DAT – the list of management file names to be used in EPIC modeling.

·         OPC/“GRIDID”0“BELD3 Crop Number”.OPC – grid cell EPIC management files under the OPC directory.  Table 1 in Section 4.1 lists the crop numbers in the BELD data. 

6.2 EPIC Runs for Application

The EPIC Runs for Application tool interface is used to run the EPIC model for the simulation year (EPIC0509app.exe program), which is stored under the directory ${FESTC_HOME}/epic/ model/current.  However, the user must already have generated the site daily weather and N deposition files using the WRF/CMAQ-to-EPIC tool interface (see Section 4.3).  The EPIC Runs for Application tool uses input files stored primarily in the following directories:

·         ${FESTC_HOME}/epic/common_data/EPIC_model/app – for the common model input files.

·         ${FESTC_HOME}/epic/scenarios/“scenario name”/share_data – for the EPICCONT.DAT file, site files, and site list file, and daily weather and N deposition files and weather list file. 

·          ${FESTC_HOME}/epic/common_data/statWeath – for observed climate station statistical data.

·         ${FESTC_HOME}/epic/scenarios/“scenario name”/ “crop name” /app/manage – for the run files, management files, and management list file.

·         ${FESTC_HOME}/epic/scenarios/“scenario name”/ “crop name”/spinup/rainf/SOL – for the soil files to be used in the rain-fed simulations.

·         ${FESTC_HOME}/epic/scenarios/“scenario name”/ “crop name”/spinup/irr/SOL – for the soil files to be used in the irrigated simulations.

Figure 17 shows the tool interface used for the test_case scenario.  The Simulation Year is defined when the user creates the scenario.  Users can select one or multiple crops (except BEANS) for the simulation.  After clicking the Run button, a script file is generated to run the rain-fed and irrigated EPIC application simulations for each crop.  The EPIC application simulations will run for a two-year period (the previous year and the simulation year) using the same daily weather and N deposition files for the simulation year; the two-year period is needed in order to simulate a full growing season for fall-sown crops. The user submits the script file to the queue by clicking OK.  After the job has finished, users should check the queue job and log file in the “scenario name”/scripts directory, based on the information provided in the Message Box (shown in Figure 17). 

 

Figure 17. The EPIC Runs for Application tool interface used for the test_case scenario.

The tool generates many directories and files for each crop.  The original EPIC output files are stored under the following two subdirectories in the “scenario name”/“crop name”/app directory:

·         rainf – contains output from EPIC rain-fed application simulations for this crop. 

·         irr – contains output from EPIC irrigated application simulations for this crop. 

The output data created for CMAQ modeling are stored under the following two subdirectories in the “scenario name”/output4CMAQ/app directory:

·         year – contains average EPIC output data for the simulation year (one year) run for the crops simulated.  These data are used primarily for QA purposes.

·         daily – stores daily EPIC output data from EPIC application runs for the crops simulated.  These data are used to extract the input for CMAQ bidirectional NH3 modeling.

7. Output Processing and Visualizing Tools

EPIC is a site-based model that generates output in formatted text files.  In the domain-based EPIC modeling within FEST-C, the crops in each grid cell are modeled individually.  Thus, there are many text output files generated for each crop in each grid cell selected for EPIC modeling.  In this section we first describe the EPIC Yearly Extraction tool and the EPIC-to-CMAQ tool. Developed in the SA Raster Tools system, these two tools extract yearly or daily EPIC output variables into NetCDF-format files for QA purposes and for CMAQ modeling.  We then discuss the Visualization tool interface, which allows users to prepare spatial views of the EPIC output variables in the created NetCDF files over their modeling scenario domain. 

7.1 EPIC Yearly Extraction

The EPIC Yearly Extraction tool is used to extract 31 crop-specific variables and 22 crop-area-weighted variables into two NetCDF files from the yearly average EPIC output files for all simulated crops within the grid cells that were selected.  The output from this tool is used primarily for QA purposes, to make sure that the EPIC simulation results appear to be spatially reasonable over the domain area.  Figure 18 shows the tool interface used for the test_case scenario.  The only item users need to select is Output Type:

·         EPIC SPINUP – select this to extract yearly average variables from the EPIC spin-up simulations. Yearly average variables from the last five years of the simulations are from the output stored under the “scenario name”/output4CMAQ/spinup/5years directory. 

·         EPIC APP – select this to extract yearly average variables from the EPIC simulations for the application year.  The yearly average variables are from the output stored under the “scenario name”/output4CMAQ/app/year directory.   

 

Figure 18.  The EPIC Yearly Extraction tool interface used for the test_case scenario.

 

Table 3 lists all of the variables that are in the two EPIC output files created by the tool:  epic2cmaq_year.nc (crop-specific output) and epic2cmaq_year_total.nc (crop-weighted output). These files are stored in one of the following two directories:

·         ${FESTC_HOME}/epic/scenarios/“scenario name”/output4CMAQ/spinup/ toCMAQ – if the EPIC SPINUP output type was selected.

·         ${FESTC_HOME}/epic/scenarios/“scenario name”/output4CMAQ/app/toCMAQ if the EPIC APP output type was selected.

Users should check the log file under their scenario’s scripts directory to see whether any errors occurred when the tool was run.

 

If the user is visualizing the data using the VERDI tool for visualization, there is no time dimension.  Data layers are assigned to individual crops (see Table 1 in Section 4.1 for the BELD crop numbers). 

Table 3. EPIC yearly extraction output variables.

epic2cmaq_year.nc - crop specific output

 

 

 

Index

Name

Variable

Index

Name

Variable

1

GMN

N Mineralized (kg/ha)

17

DN2

Denitrification_N2 (kg/ha)

2

NMN

Humus Mineralization (kg/ha)

18

YLDG

Grain Yield (t/ha)

3

NFIX

N Fixation (kg/ha)

19

T_YLDG

T - Grain Yield (1000ton)

4

NITR

Nitrification (kg/ha)

20

YLDF

Forage Yield (t/ha)

5

AVOL

N Volatilization (kg/ha)

21

T_YLDF

T - Forage Yield (1000ton)

6

DN

Denitrification (kg/ha)

22

YLN

N Used by Crop (kg/ha)

7

YON

N Loss with Sediment (kg/ha)

23

YLP

P Used by Crop (kg/ha)

8

QNO3

N Loss in Surface Runoff (kg/ha)

24

FTN

N Applied (kg/ha)

9

SSFN

N in Subsurface Flow (kg/ha)

25

FTP

P Applied (kg/ha)

10

PRKN

N Loss in Percolate (kg/ha)

26

IRGA

Irrigation Volume Applied (mm)

11

FNO

Organic N Fertilizer (kg/ha)

27

WS

Water Stress Days (days)

12

FNO3

N Fertilizer Nitrate (kg/ha)

28

NS

N Stress Days (days)

13

FNH3

N Fertilizer Ammonia (kg/ha)

29

IPLD

Planting Date (Julian Date)

14

OCPD

Organic Carbon in Plow Layer (mt/ha)

30

IGMD

Germination Date (Julian Date)

15

TOC

Organic Carbon in Soil Profile (mt/ha)

31

IHVD

Harvest Date (Julian Date)

16

TNO3

Total NO3 in Soil Profile (kg/ha)

 

 

 

 

 

 

 

 

 

epic2cmaq_year_total.nc - crop weighted output

 

 

 

Index

Name

Variable

Index

Name

Variable

1

T_GMN

N Mineralized (mt - metric ton)

12

T_FNO3

N Fertilizer Nitrate (mt)

2

T_NMN

Humus Mineralization (mt)

13

T_FNH3

N Fertilizer Ammonia (mt)

3

T_NFIX

N Fixation (mt)

14

T_OCPD

Organic Carbon in Plow Layer (1000mt)

4

T_NITR

Nitrification (mt)

15

T_TOC

Organic Carbon in Soil Profile (1000mt)

5

T_AVOL

N Volatilization (mt)

16

T_TNO3

Total NO3 in Soil Profile (mt)

6

T_DN

Denitrification (mt)

17

T_DN2

Denitrification_N2 (mt)

7

T_YON

N Loss with Sediment (mt)

18

T_YLN

N Used by Crop (mt)

8

T_QNO3

N Loss in Surface Runoff (mt)

19

T_YLP

P Used by Crop (mt)

9

T_SSFN

N in Subsurface Flow (mt)

20

T_FTN

N Applied (mt)

10

T_PRKN

N Loss in Percolate (mt)

21

T_FTP

P Applied (mt)

11

T_FNO

Organic N Fertilizer (mt)

22

T_IRGA

Irrigation Volume Applied (mm)

 

7.2 EPIC to CMAQ

The EPIC-to-CMAQ tool is used to extract 13 variables from EPIC soil output files and 59 variables from EPIC daily output files into NetCDF files for all simulated crops within the grid cells that were selected.  The output from this tool is used as input to CMAQ bidirectional NH3 modeling over the domain area.  Figure 19 shows the tool interface used for the test_case scenario.  The user needs to input only one item:

·         Output File Prefix – this is used as the file prefix for all of the NetCDF output file names. 

Figure 19. The EPIC-to-CMAQ tool interface used for the test_case scenario.

The following output files produced by the tool are stored under the ${FESTC_HOME}/epic/ scenarios/“scenario name”/output4CMAQ/app/toCMAQ directory:

·         Output File Prefix”_soil.nc – soil output file that contains 13 soil variables extracted from the EPIC soil output files (“scenario name”/output4CMAQ /app/daily/“BELD4 Crop Number”.NCS); these variables are listed in Table 4.  Layer1 and Layer2 are for the soil depth from 0 to 1 cm and from 1 cm to 100 cm, respectively.

·         Output File Prefix”_timeYYYYMMDD.nc – daily NetCDF files for the simulation year.  A daily NetCDF file contains 59 variables extracted from the EPIC daily output files (“scenario name”/output4CMAQ /app/daily/“BELD4 Crop Number”.NCD”); these variables are listed in Table 5.  Layer1, Layer2, and Layert are for the soil depth from 0 to 1 cm, from 1 cm to 100 cm, and from 0 cm to the full Baumer soil profile depth, which can be more than 1 m.

 

Table 4. EPIC-to-CMAQ soil output variables.

Index

Name

Soil Variable

Index

Name

Soil Variable

1

L1_SoilNum

Soil Number (none)

8

L2_Bulk_D

Layer2 Bulk Density (t/m**3)

2

L1_Bulk_D

Layer1 Bulk Density (t/m**3)

9

L2_Wilt_P

Layer2 Wilting Point (m/m)

3

L1_Wilt_P

Layer1 Wilting Point(m/m)

10

 L2_Field_C

Layer2 Field Capacity (m/m)

4

L1_Field_C

Layer1 Field Capacity (m/m)

11

L2_Porocity

Layer2 Porocity (%)

5

L1_Porocity

Layer1 Porocity (%)

12

L2_PH

Layer2 PH (none)

6

L1_PH

Layer1 PH (none)

13

L2_Cation

Layer2 Cation Ex (cmol/kg)

7

L1_Cation

Layer1 Cation Ex (cmol/kg )

 

 

 

 

Table 5. EPIC-to-CMAQ daily output variables.

Index

Name

Variable

Index

Name

Variable

1

QNO3

N Loss in Surface Runoff (kg/ha)

31

L2_NH3

Layer2 Ammonia (kg/ha)

2

SSFN

N in Subsurface Flow (kg/ha)

32

L2_ON

Layer2 Organic N (kg/ha)

3

PRKN

N LOss in Percolate (kg/ha)

33

L2_P

Layer2 Mineral P (kg/ha)

4

DN

Denitrification (kg/ha)

34

L2_OP

Layer2 Organic P (kg/ha)

5

DN2*

N2O Emission (hg/ha)

35

L2_C

Layer2 Carbon (kg/ha)

6

AVOL*

NH3 Emission (kg/ha)

36

L2_NITR

Layer2 N in NO3 (kg/ha)

7

HMN

OC Change by Soil Respiration (kg/ha)

37

T1_DEP

Layert Depth (m)

8

NFIX

N Fixation (kg/ha)

38

T1_BD

Layert Bulk Density (t/m**3)

9

APP_Rate

Fertilizer App. Rate (kg/ha)

39

T1_NO3

Layert Nitrate (kg/ha)

10

APP_DEPTH

Fertilizer App. Depth (m)

40

T1_NH3

Layert Ammonia (kg/ha)

11

NO3

Mineral N (kg/ha)

41

T1_ON

Layert Organic N (kg/ha)

12

NH3

Ammonia (kg/ha)

42

 T1_P

Layert Mineral P (kg/ha)

13

ON

Organic N (kg/ha)

43

T1_OP

Layert Organic P (kg/ha)

14

MP

Mineral P (kg/ha)

44

T1_C

Layert Carbon (kg/ha)

15

OP

Organic P (kg/ha)

45

T1_NITR

Layert N in NO3 (kg/ha)

16

HUSC

Heat Unit Schedule (none)

46

L1_ANO3

Layer1 NO3-N AppRate (kg/ha)

17

HU_BASE0

Base Heat Unit (none)

47

L1_ANH3

Layer1 NH3-N AppRate (kg/ha)

18

HU_FRAC

Heat Unit fraction (none)

48

L1_AON

Layer1 ON AppRate (kg/ha)

19

L1_DEP

Layer1 Depth (m)

49

L1_AMP

Layer1 MP AppRate (kg/ha)

20

L1_BD

Layer1 Bulk Density (t/m**3)

50

L1_AOP

Layer1 OP AppRate (kg/ha)

21

L1_NO3

Layer1 Nitrate (kg/ha)

51

L2_ANO3

Layer2 NO3-N AppRate (kg/ha)

22

L1_NH3

Layer1 Ammonia (kg/ha)

52

L2_ANH3

Layer2 NH3-N AppRate (kg/ha)

23

 L1_ON

Layer1 Organic N (kg/ha)

53

L2_AON

Layer2 ON AppRate (kg/ha)

24

L1_P

Layer1 Mineral P (kg/ha)

54

L2_AMP

Layer2 MP AppRate (kg/ha)

25

L1_OP

Layer1 Organic P (kg/ha)

55

L2_AOP

Layer2 OP AppRate (kg/ha)

26

L1_C

Layer1 Carbon (kg/ha)

56

UN1

N Uptake by Crop (kg/ha)

27

L1_NITR

Layer1 N in NO3 (kg/ha)

57

HUI

Heat Unit Index (none)

28

L2_DEP

Layer2 Depth (m)

58

LAI

Leaf Area Index (none)

29

L2_BD

Layer2 Bulk Density (t/m**3)

59

CPHT

Crop Height (m)

30

L2_NO3

Layer2 Nitrate (kg/ha)

 

 

 

*Variable is not used at this time.  DN2 is currently under revision, and AVOL is an initial estimate that is revised within the bidirectional CMAQ.

 

When the user clicks the Run button, a script file is generated under the scenario’s scripts directory.  The script file is submitted to the queue for execution after the user clicks OK.  A CMAQ-ready file is generated for each day and is viewable in VERDI.  After the queue job has completed, users should check the log file under the scripts directory to see whether any errors occurred during execution.

7.3 Visualization

The Visualization tool interface is used to invoke the VERDI interface to view a selected NetCDF data set.  Figure 20 shows the appearance of the tool interface before an input file has been selected.  Users can select the data type on the left side of the interface window and then by browse through the file systems to select a NetCDF file created or used within the FEST-C system (e.g., an EPIC output NetCDF file created by the previous two tools, a BELD4 data set, MCIP and CMAQ data sets, a daily weather and N deposition NetCDF output file).  Clicking the Display button invokes the VERDI interface to visualize the selected NetCDF file.  Note: For this to work properly, the user has to have set the VERDI system in the FEST-C configuration file config.properties (see Section 1.3).  Information on how to use the VERDI system can be obtained from the CMAS VERDI site: http://www.cmascenter.org/verdi/. 

8. Future Work

A newer version of the EPIC model in modular format (EPIC v1102) is being adapted to the EPA application format and will be added into the FEST-C system after thorough testing and evaluation.  This new version of EPIC has an improved treatment of N modeling.  In addition, we will continue to improve the land use data using the released 2011 NLCD data.  This will be accompanied by an updated fertilizer type scenario, also keyed to 2011.  We are also exploring the possibility of moving to computing crop land use data directly from USDA National Agricultural Statistics Service (NASS) Cropland Data Layer (CDL) data.  This would provide higher-resolution information; however, these data do not include some information that is critical for using EPIC (such as differentiation between irrigated and rain-fed crops), so further exploration is needed. 

 

 

Figure 20. The Visualization tool interface.

 

In the near-term, we anticipate developing a long-term average daily wet and dry deposition data layer that can be used in spin-up or application simulations.  A notice will be posted on the CMAS web site when that data layer is ready for release. 

We are also helping the EPA apply the FEST-C system to address multimedia (air, land, water) questions related to biofuels production and climate change.  We are exploring using FEST-C to study not only the effects of agricultural practices (e.g., fertilizing and management practices) on air quality (NH3), climate (N2O), and climate change, but also the effects of meteorology and climate on agricultural productivity, soil erosion, water quantity, and water quality.


 

Acknowledgments

The development of the FEST-C system is being sponsored and directed by the U.S. EPA’s Atmospheric Modeling and Analysis Division (AMAD) under two U.S. EPA contracts: EP‑W‑09‑023, “Operation of the Center for Community Air Quality Modeling and Analysis (CMAS),” and EP‑D-12-044, “Emissions, Air Quality, and Meteorological Modeling Support (EMAQ).” We thank Dr. Ellen Cooter, the EPA Work Assignment Manager for the work described in this document, for her leadership on this project.  We also greatly appreciate the continuing and generous intellectual support we have received from Dr. Jimmy R. Williams at Texas A&M AgriLife Research, Blackland Research & Extension Center (Temple, TX).  We thank Joe Slater, Manager of Fertilizer/AG Lime Control Services, University of Missouri Agricultural Experiment Station at Columbia, MO, for his invaluable insights regarding fertilizer sales and use.  Finally, we thank Dr. Qun He for his design and support on the FEST-C interface development. 



[*]In the future, a fourth option will be added that provides a field of daily multiyear average wet and dry speciated CMAQ atmospheric deposition.