HYPE
All Classes Namespaces Files Functions Variables Pages
Functions/Subroutines | Variables
irrigation_module Module Reference

Functions/Subroutines

subroutine, public initiate_irrigation (n, nc)
 
subroutine find_irrigated_classes ()
 
subroutine set_regional_irrigation (n)
 
subroutine, public initiate_timestep_irrigation (nsubst, miscstate)
 
subroutine, public calculate_irrigation_water_demand (i, j, area, sswcorrpar, immdeppar, iwdfracpar, wdpar, soil, wpl, fcl, epl, epot, miscstate, iwdv, sswtout)
 
subroutine calculate_kcb (k, jday, bday, kcb)
 
subroutine, public apply_irrigation (i, j, soilstate, appirr, appirrmass)
 
subroutine get_irrigation_parameters (isb, irrigationpar)
 
subroutine, public calculate_irrigation (i, na, temp, rh, q, lakew, riverv, accpw, irrnetloss, gwabstr, ldabstr, lrabstr, rsabstr, cq, irrsinkmass, cilake, colake, criver, soilstate, aquiferstate, nextirrigation, cnextirrigation, wblirrflows, wbrirrflows, wbrirrevap, aquiferloss, dampabstr)
 
subroutine irrigation_abstraction_sink (conc, cirrsinkpar, abstr, sinkmass)
 

Variables

character(len=44), dimension(2) errstring
 
integer, dimension(:), allocatable regirrwat_source
 
integer, dimension(:,:), allocatable regirrwat_collectors
 
integer, dimension(:), allocatable nregirrwat_collectors
 
integer, dimension(:), allocatable irrindex
 
integer, dimension(:), allocatable irrtype
 
real, dimension(:), allocatable totaldemand_regsrc
 
real, dimension(:), allocatable regionaldemand
 
real, dimension(:,:), allocatable fieldneed
 
real, dimension(:,:), allocatable irrigation
 
real, dimension(:,:,:), allocatable cirrigation
 

Detailed Description

Irrigation calculations in HYPE.

Function/Subroutine Documentation

◆ apply_irrigation()

subroutine, public irrigation_module::apply_irrigation ( integer, intent(in)  i,
integer, intent(in)  j,
type(soilstatetype), intent(inout)  soilstate,
real, intent(out)  appirr,
real, dimension(numsubstances), intent(out)  appirrmass 
)

Add irrigation water to the top soil layer of a class.

Reference ModelDescription Water management (Irrigation - Irrigation water application)

Parameters
[in]iindex of subbasin
[in]jindex of slc-class
[in,out]soilstateSoil states
[out]appirrapplied irrigation (mm)
[out]appirrmassmass of applied irrigation (kg/timestep if the conc is in mg/L)

Algorithm
Initialisations

Add irrigation to first soil layer

Accumulate applied water for subbasin print out

+ Here is the caller graph for this function:

◆ calculate_irrigation()

subroutine, public irrigation_module::calculate_irrigation ( integer, intent(in)  i,
integer, intent(in)  na,
real, intent(in)  temp,
real, intent(in)  rh,
real, intent(inout)  q,
real, dimension(2), intent(inout)  lakew,
real, intent(inout)  riverv,
real, intent(in)  accpw,
real, dimension(nsub), intent(inout)  irrnetloss,
real, intent(out)  gwabstr,
real, intent(out)  ldabstr,
real, intent(out)  lrabstr,
real, intent(out)  rsabstr,
real, dimension(numsubstances), intent(in)  cq,
real, dimension(numsubstances), intent(out)  irrsinkmass,
real, dimension(numsubstances), intent(in)  cilake,
real, dimension(numsubstances), intent(in)  colake,
real, dimension(numsubstances), intent(in)  criver,
type(soilstatetype), intent(in)  soilstate,
type(aquiferstatetype), intent(inout)  aquiferstate,
real, dimension(nclass,nsub), intent(inout)  nextirrigation,
real, dimension(numsubstances,nclass,nsub), intent(inout)  cnextirrigation,
real, dimension(7), intent(out)  wblirrflows,
real, dimension(nsub,4), intent(inout)  wbrirrflows,
real, dimension(nsub), intent(out)  wbrirrevap,
real, dimension(na), intent(inout)  aquiferloss,
real, intent(out)  dampabstr 
)

Calculate irrigation water withdrawal and losses on the way to the irrigated field for a subbasin. Called from model once per timestep/subbasin.

Reference ModelDescription Water management (Irrigation - Irrigation water withdrawal, Irrigation water application)

Consequences Module irrigation_module variables totaldemand_regsrc, regionaldemand, and fieldneed may change.

Parameters
[in]iindex of current subbasin
[in]nanumber of aquifers
[in]temptemperature
[in]rhrelative humuidity (-)
[in,out]qflow in main river (m3/s)
[in,out]lakewlake water stage (ilake,olake) (mm)
[in,out]rivervriver volume (type 2) (m3)
[in]accpwirrigation water need for this subbasin (m3/timestep) =sum(pwn(i,:))
[in,out]irrnetlossaccumulated irrigation losses (m3/timestep)
[out]gwabstrgroundwater abstraction for irrigation (m3/timestep)
[out]ldabstrlocal dam water abstraction for irrigation (m3/timestep)
[out]lrabstrlocal river water abstraction for irrigation (m3/timestep)
[out]rsabstrregional surface water abstraction for irrigation in other subbasins (m3/timestep)
[in]cqconcentration of flow in main river (typically mg/L)
[out]irrsinkmassmass of substances in the irrigation sink in this subbasin (typically in kg)
[in]cilakeconcentration laketype 1 (typically mg/L)
[in]colakeconcentration laketype 2 (typically mg/L)
[in]criverconcentration river type 2 (typically mg/L)
[in]soilstateSoil states
[in,out]aquiferstateAquifer states
[in,out]nextirrigationirrigation for next time step (mm/timestep)
[in,out]cnextirrigationconcentration irrigation next time step
[out]wblirrflowsirrigations flows needed for water balance output (m3/timestep)
[in,out]wbrirrflowsirrigations flows needed for water balance output, regional sources (m3/timestep)
[out]wbrirrevapirrigations flows needed for water balance output, regional sources evaporation (m3/timestep)
[in,out]aquiferlossaccumulated aquifer removal (m3/timestep)
[out]dampabstrmain river damping box water abstraction for irrigation (m3/timestep)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_irrigation_water_demand()

subroutine, public irrigation_module::calculate_irrigation_water_demand ( integer, intent(in)  i,
integer, intent(in)  j,
real, intent(in)  area,
real, intent(in)  sswcorrpar,
real, intent(in)  immdeppar,
real, intent(in)  iwdfracpar,
real, intent(in)  wdpar,
real, dimension(maxsoillayers), intent(in)  soil,
real, dimension(maxsoillayers), intent(in)  wpl,
real, dimension(maxsoillayers), intent(in)  fcl,
real, dimension(maxsoillayers), intent(in)  epl,
real, intent(in)  epot,
type(miscstatetype), intent(in)  miscstate,
real, intent(out)  iwdv,
real, intent(out)  sswtout 
)

Calculate irrigation water demand of this class this timestep. Called from model once per timestep/subbasin/land class.

Reference ModelDescription Water management (Irrigation - Irrigation water demand)

Consequences Module irrigation_module variable fieldneed is set.

Parameters
[in]iindex of subbasin
[in]jindex of slc-class
[in]areaclass area (km2)
[in]sswcorrparparameter for scaling of irrigation threshold (-)
[in]immdepparparameter for target immersion depth (mm)
[in]iwdfracparparameter for scaling of irrigation water demand relative to threshold (-)
[in]wdparparameter for constant water demand (mm/timestep)
[in]soilsoil moisture per soil layer (mm)
[in]wplwilting point per soil layer (mm)
[in]fclfield capacity per soil layer (mm)
[in]eplefficient porosity per soil layer (mm)
[in]epotpotential evapotranspiration (mm/timestep)
[in]miscstateMisc states (whole structure as input because miscstategsbegin might not be allocated)
[out]iwdvsubbasin irrigation water demand for the soil (volume) (m3/timestep)
[out]sswtoutstress threshold (mm)

Algorithm

Check if the class is irrigated today

Calculate current basal crop coefficient, kcb-value

Calculate soil moisture stress threshold

Depending on irrigation and crop type:

Calculate irrigation water demand for immersed crop irrigation

Calculate irrigation water demand by "soil moisture of root zone" based irrigation (outside immersion period (and for non-immersed crops))

  • Irrigation water demand of layer, mm/timestep
  • Sum irrigation water demand for the root zone layers

Set output variables

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_kcb()

subroutine irrigation_module::calculate_kcb ( integer, intent(in)  k,
integer, intent(in)  jday,
integer, intent(in)  bday,
real, intent(out)  kcb 
)

Calculate basal crop coefficient, kcb-parameter Equation 66 from Allen et al. (1998) FAO Irrigation and Drainage Paper No.56 Reference ModelDescription Water management (Irrigation - Irrigation water demand)

Parameters
[in]kindex in cropdata
[in]jdaycurrent day number/julian day
[in]bdaycurrent planting day
[out]kcbbasal crop coefficient
+ Here is the caller graph for this function:

◆ find_irrigated_classes()

subroutine irrigation_module::find_irrigated_classes

Determine which classes are irrigated. An irrigated class is determined by CropData columns plantday and imm_start.

Consequences Module irrigation_module variable irrtype is set

Set default value; not irrigated class.

For every class; check if irrigated class in any region.

  • Check if main crop is irrigated

/li Check if secondary crop is irrigated

+ Here is the caller graph for this function:

◆ get_irrigation_parameters()

subroutine irrigation_module::get_irrigation_parameters ( integer, intent(in)  isb,
real, dimension(5), intent(out)  irrigationpar 
)

Set current parameter values for irrigation calculation.

Parameters
[in]isbindex of subbasin
[out]irrigationparparameter values used by irrigation
+ Here is the caller graph for this function:

◆ initiate_irrigation()

subroutine, public irrigation_module::initiate_irrigation ( integer, intent(in)  n,
integer, intent(in)  nc 
)

Initiation of irrigation. Calculated irrigation network. Called from initiate_model once per simulation.

Parameters
[in]nnumber of subbasin (nsub)
[in]ncnumber of classes (nclass)

Algorithm
First call, first simulation:

  • Allocate variables for irrigation calculation
  • Set irrtype for irrigated classes
  • Set regional irrigation coupling and sources
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initiate_timestep_irrigation()

subroutine, public irrigation_module::initiate_timestep_irrigation ( integer, intent(in)  nsubst,
type(miscstatetype), intent(inout)  miscstate 
)

Consequences Module irrigation_module variables totaldemand_regsrc, regionaldemand, fieldneed, irrigation and cirrigation are set

Parameters
[in]nsubstNumber of substances
[in,out]miscstateMisc states
+ Here is the caller graph for this function:

◆ irrigation_abstraction_sink()

subroutine irrigation_module::irrigation_abstraction_sink ( real, dimension(numsubstances), intent(inout)  conc,
real, intent(in)  cirrsinkpar,
real, intent(in)  abstr,
real, dimension(numsubstances), intent(inout)  sinkmass 
)

Change concentration of the water abstracted for irrigation from all sources (rivers, lakes/dams, groundwater) This simulates a settlement basin at the point of the withdrawal.

Reference ModelDescription Water management (Irrigation - Irrigation water withdrawal)

Parameters
[in,out]concconcentration of water abstracted from the source (typically in mg/L)
[in]cirrsinkparirrsink parameter (-)
[in]abstramount of water abstracted from the source (m3)
[in,out]sinkmassmass of the withdrawn substances in this sink (typically in kg/timestep)
+ Here is the caller graph for this function:

◆ set_regional_irrigation()

subroutine irrigation_module::set_regional_irrigation ( integer, intent(in)  n)

Calculate index arrays for the regional source and the irrigation variable. Count number of collectors from each regional source.

Consequences Module irrigation_module variables irrindex and regirrwat_source are set

Parameters
[in]nnumber of subbasin (nsub)

Initialize local subbasin index of irrigation data

Set index to find irrigation parameters for subbasins, and subbasins of irrigation data

Set index of regional source for subbasins with regional source, and count the number of collectors from each source.

Determine collectors for all subbasins, i.e. which subbasins has this as a regional source of irrigation

+ Here is the caller graph for this function:

Variable Documentation

◆ cirrigation

real, dimension(:,:,:), allocatable irrigation_module::cirrigation
private

Concentration of irrigation object (numsubstances,nclass,nsub)

◆ errstring

character(len=44), dimension(2) irrigation_module::errstring
private

◆ fieldneed

real, dimension(:,:), allocatable irrigation_module::fieldneed
private

Plant water deficit for irrigated classes (mm) (nclass,nsub)

◆ irrigation

real, dimension(:,:), allocatable irrigation_module::irrigation
private

Water to be applied at this timestep for irrigated classes (mm) (nclass,nsub)

◆ irrindex

integer, dimension(:), allocatable irrigation_module::irrindex
private

Index to irrigation variable (nsub)

◆ irrtype

integer, dimension(:), allocatable irrigation_module::irrtype
private

Irrigation type for class (0=no irrigation) (nclass)

◆ nregirrwat_collectors

integer, dimension(:), allocatable irrigation_module::nregirrwat_collectors
private

Number of subbasins which has this subbasin as a source of regional water for irrigation (nsub)

◆ regionaldemand

real, dimension(:), allocatable irrigation_module::regionaldemand
private

Water demand at regional source for the local subbasin (m3) (nsub)

◆ regirrwat_collectors

integer, dimension(:,:), allocatable irrigation_module::regirrwat_collectors
private

Index i of subbasins which has this subbasin as a source of regional water for irrigation (max number of collectors,nsub)

◆ regirrwat_source

integer, dimension(:), allocatable irrigation_module::regirrwat_source
private

Index i of subbasin which is the source of regional water for irrigation (nsub)

◆ totaldemand_regsrc

real, dimension(:), allocatable irrigation_module::totaldemand_regsrc
private

Total water demand at regional source (m3) (nsub)