W5 Two-way Coupled Irrigation Design Document

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

This is a descriptive long title
2.Owner
3.Created 
4.Equ(error)
5.Ver(error)
6.Perf(error)
7.Val(error)
8.Approver
9.Approved Date
V2.0
 Click here for Table of Contents ...

Table of Contents




Title: Two-way coupled irrigation scheme

Requirements and Design

E3SM Watercycle Group

Date:    

Summary

Current ELM irrigation scheme assumes surface water demand is always met and ignores the surface water constraints at short time scales, leading to overestimation of surface water usage, underestimation of groundwater pumping, and unrealistic simulation of their seasonal variability. With two-way coupling, surface water irrigation is constrained by the available runoff, streamflow, and reservoir storage simulated in MOSART.


Requirements

Requirement: Coupling irrigation water withdrawal between ELM and MOSART

Date last modified: 
Contributors: Anthony CraigGuoyong Leng (Unlicensed)Tian Zhou


Each requirement is to be listed under a ”section” heading, as there will be a one-to-one correspondence between requirements, design, proposed imple- mentation and testing. Requirements should not discuss technical software issues, but rather focus on model capability. To the extent possible, require- ments should be relatively independent of each other, thus allowing a clean design solution, implementation and testing plan.


Algorithmic Formulations

Design solution: At each coupling time step, following steps will be performed: 1) ELM evaluates the soil moisture deficits and determines the irrigation demand at grid level. 2) The irrigation demand will be split into surface water and groundwater irrigation demand based on a predefined fraction. 3) The surface water demand will be sent to MOSART through coupler. 4) MOSART determines the irrigation supply based on the local runoff, streamflow, and upstream reservoir storage. 5) Irrigation supply will be sent back to ELM through the coupler. 6) ELM applies irrigation which is the sum of  the surface water irrigation supply from MOSART and groundwater irrigation which is assumed always met.   

Date last modified:
Contributors: Anthony CraigGuoyong Leng (Unlicensed)Tian Zhou.


Design and Implementation

Implementation: Pull request about this implementation (https://github.com/E3SM-Project/E3SM/pull/3074)

Date last modified: 
Contributors: Anthony CraigTian Zhou

surfrdMod.F90

Around **line 650** there are about 10 lines related to the surface water only or both surface and groundwater, as well as the `ldomain%firrig` values. If all commented out, it would be surface water only, with `ldomain%firrig` = 0.7.

CanopyHydrologyMod.F90

Around **line 456** there are a few lines about how to calculate the actual irrigation `qflx_real_irrig(p)`. When it's onw-way coupling, it equals to the demand `qflx_irrig(p)`. If two-way coupling, it's the sum of the surface water and groundwater irrigation. In either case, this vaule cannot be greater than the demand `qflx_irrig(p)`.

CanopyFluxesMod.F90

Around **line 447**, the `irrig_nsteps_per_day` is defined. This value does not have unit. It depends on the size of the time step `dtime` in second and the length of the irrigation period `irrig_length`. Currently the `irrig_length` is hard coded at **line 155** as 14400 secounds (4 hrs), starting at 6 o'clock everyday (defined by `irrig_start_time`).

Another important variable used here is the `deficit`, which is daily irrigation water need to be applied to the soil (mm). It depends on the calibratable term `ldomain%firrig(g)`.

SoilHydrologyMod.F90

This is the code that takes care of the groundwater level in the soil. I updated the **lines 717-718** by replacing the `qflx_irrig(c)*ldomain%f_grd(g) ` with `qflx_grnd_irrig_col(c)` calculated in `CanopyHydrologyMod.F90` as these two are not the same anymore.

WaterfluxType.F90

A number of new variables I created are defined here. Also around **lines 352 and 435**, the output variables in the netCDF file are also defined.

HydrologyDrainageMod.F90

I updated the `qflx_irr_demand(c)` in **line 281**. This variable is the surface water irrigation demand ready to be sent to MOSART.

clm_varctl.F90

I created a flag `tw_irr` to control one way or two way coupling. True is two way, false is one way. Need to put it in the namelist file in the future.

BalanceCheckMod.F90

Around **line 323** I updated the equation for water balance error calculations:

Planned Verification and Unit Testing 

Verification and Unit Testing: B4B tests passed

Date last modified:  
Contributors: Tian Zhou


E3SM land modeler b4b tests were performed and passed with the two-way coupling turned off. 

Planned Validation Testing 

Validation Testing: 30 year simulations with and without two-way irrigation

Date last modified: 
Contributors: Tian Zhou


A set of 30-year simulation experiments were performed with different model configurations including 1-way coupled surface water irrigation only; 1-way coupled surface water and groundwater irrigation; 2-way coupled surface water irrigation only; 2-way coupled surface water and groundwater irrigation. These simulation experiments produced reasonable results. See details in Zhou et al. (submitted)

Zhou, T; L. R. Leung; G. Leng; N. Voisin; H. Li; A. P. Craig; T. Tesfa; Y. Mao (in review). Global irrigation characteristics and effects simulated by fully coupled land surface, river, and water management models in E3SM. Journal of Advances in Modeling Earth Systems

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?