Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The Design Document page provides a description of the algorithms, implementation and planned testing including unit, verification, validation and performance testing. Please read  Step 1.3 Performance Expectations that explains feature documentation requirements from the performance group point of view. 

Design Document

 Click here for instructions to fill up the table below ......

The first table in Design Document gives overview of this document, from this info the Design Documents Overview page is automatically created.

In the overview table below 4.Equ means Equations and Algorithms, 5.Ver means Verification, 6.Perf - Performance, 7. Val - Validation

  • Equations: Document the equations that are being solved and describe algorithms
  • Verification Plans: Define tests that will be run to show that implementation is correct and robust. Involve unit tests to cover range of inputs as well as benchmarks.
  • Performance expectations: Explain the expected performance impact from this development
  • Validation Plans: Document what process-based, stand-alone component, and coupled model runs will be performed, and with what metrics will be used to assess validity

Use the symbols below (copy and paste) to indicate if the section is in progress or done or not started.

In the table below 4.Equ means Equations and Algorithms, 5.Ver means Verification, 6.Perf - Performance, 7. Val - Validation,   (tick) - competed, (warning) - in progress, (error) - not done

Overview table for the owner and an approver of this feature

1.Description

Flow of Agricultural Nitrogen
2.OwnerBeth Drewniak
3.Created 
4.Equ(error)
5.Ver(error)
6.Perf(error)
7.Val(error)
8.Approver
9.Approved Date
 Click here for Table of Contents ...

Table of Contents



Title: bbye/lnd/fertilizer: Flow of Agriculture Nitrogen

Requirements and Design

E3SM Land  Group

Date:   

Summary

The purpose of this code is to add NH3 emissions from fertilizer and livestock waste under different environmental conditions. Volatilization of ammonia is a major pathway of nutrient loss in ecosystems and is the largest emission source of atmospheric NH3. Atmospheric emission, transport, and deposition of NH3 is an important component of the nitrogen cycle, and is sensitive to environmental conditions which are not captured with static emission inventories. This code includes volatilization of NH3 from both livestock manure and synthetic fertilizer as documented in Riddick et al. (2016) and Vira et al. (2020). I will include some of the major requirements in the following design documentation, but full details can be found in the published manuscripts linked. There are several modes that FAN can operate with: fan_on (emission calculation only), fan_soil (fan coupled to the soil biogeochemistry), fan_atm (fan coupled to the atmosphere only) and fan_full (coupled to both atmosphere and soil). Of these modes, only fan_on and fan_atm will be scientifically validated as fan_soil and fan_full do not have nitrogen balance checks between ELM and FAN (the N is balanced within FAN and ELM independently). FAN includes manure applications to grasslands; NH3 emissions are calculated at the sub-grid level separately for grasslands and managed crop.

This code also includes updates to the cropland fertilizer subroutines. Modifications include a gridded synthetic fertilizer dataset of both nitrogen and phosphorous for each crop type, as opposed to the current fixed rates of nitrogen only. These changes are incorporated into the surface dataset and include modifications to the mksurfdat tool for generating surface input data. The fixed fertilizer rate that was used previously will be converted to a manure input, which will be replaced by the FAN stream data when FAN is on. FAN will always use the ELM synthetic fertilizer data inputs and timing of fertilizer application.


Requirements


Requirement: Calculate NH3 emissions from manure and synthetic fertilizer application

Date last modified:    
Contributors: Beth Drewniak


This feature will bring in the code modifications to calculate NH3 emissions from agriculture, titled the Flow of Agriculture Nitrogen (FAN), which was originally written and tested by Peter Hess and Julius Vira. Emissions include fertilizer applied to agriculture and pastures in the form of manure and synthetic fertilizer. Manure emissions are broken into several components - barns and storage, grazing, and manure applied as slurry. Synthetic nitrogen fertilizer is separated into urea and other fertilizer.

Requirement: Couple new emissions with atmospheric model and biogeochemistry model

Date last modified:    
Contributors: Beth Drewniak


The default version of the FAN model just calculates emissions and is not coupled to the rest of the E3SM. Options need to be added to include coupling to EAM so atmospheric chemistry can be performed, and coupling to ELM biogeochemistry to tie in with the nitrogen cycle for plants and soil. Although the coupling options will be available to users, they are not validated and therefore considered use at your own risk.

Requirement: Add gridded synthetic fertilizer application for nitrogen and phosphorus

Date last modified:    
Contributors: Beth Drewniak


In order to improve NH3 emission calculations, the synthetic fertilizer for agriculture needed to be updated. This includes a more robust fertilizer application that varies with grid cell and crop type rather than with only crop type. Since phosphorus was not included in fertilizer applications previously, phosphorus fertilizer was also added. Since new crop types are included as placeholders in ELM, the gridded fertilizer datasets include data for all the new crop types (when available) based on Mueller et al., 2012. When the FAN model is not in use, a manure application will also be applied (nitrogen only). When FAN is turned on, the FAN input dataset for manure application is used.


Algorithmic Formulations

Design solution: short-description-of-proposed-solution-here

Date last modified:// date 
Contributors: (add your name to this list if it does not appear)


For each requirement, there is a design solution that is intended to meet that requirement. Design solutions can include detailed technical discussions of PDEs, algorithms, solvers and similar, as well as technical discussion of performance issues. In general, this section should steer away from a detailed discussion of low-level software issues such as variable declarations, interfaces and sequencing.


Design and Implementation

Implementation: Add two subroutines that calculate emissions

Date last modified:  
Contributors: Beth Drewniak


This section should detail the plan for implementing the design solution for requirement XXX. In general, this section is software-centric with a focus on software implementation. Pseudo code is appropriate in this section. Links to actual source code are appropriate. Project management items, such as svn branches, timelines and staffing are also appropriate. How do we typeset pseudo code?

Implementation: Updates to cime to couple with atmosphere and ELM to couple with biogeochemistry

Date last modified:  
Contributors: Beth Drewniak


This section should detail the plan for implementing the design solution for requirement XXX. In general, this section is software-centric with a focus on software implementation. Pseudo code is appropriate in this section. Links to actual source code are appropriate. Project management items, such as svn branches, timelines and staffing are also appropriate. How do we typeset pseudo code?

Implementation: Add gridded fertilizer data into the surface data with options to mksurfdat for users to generate any resolution required

Date last modified:  

Contributors: Beth Drewniak


This section should detail the plan for implementing the design solution for requirement XXX. In general, this section is software-centric with a focus on software implementation. Pseudo code is appropriate in this section. Links to actual source code are appropriate. Project management items, such as svn branches, timelines and staffing are also appropriate. How do we typeset pseudo code?


Planned Verification and Unit Testing 

Verification and Unit Testing: short-desciption-of-testing-here

Date last modified:  
Contributors: (add your name to this list if it does not appear)


How will XXX be tested? i.e. how will be we know when we have met requirement XXX. Will these unit tests be included in the ongoing going forward?

Planned Validation Testing 

Validation Testing: short-desciption-of-testing-here

Date last modified:
Contributors: (add your name to this list if it does not appear)


How will XXX be tested? What observational or other dataset will be used?  i.e. how will be we know when we have met requirement XXX. Will these unit tests be included in the ongoing going forward?

Planned Performance Testing 

Performance Testing: short-desciption-of-testing-here

Date last modified:
Contributors: (add your name to this list if it does not appear)


How will XXX be tested? i.e. how will be we know when we have met requirement XXX. Will these unit tests be included in the ongoing going forward?







  • No labels