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 |
Irrigation calculations in HYPE.
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)
[in] | i | index of subbasin |
[in] | j | index of slc-class |
[in,out] | soilstate | Soil states |
[out] | appirr | applied irrigation (mm) |
[out] | appirrmass | mass 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
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.
[in] | i | index of current subbasin |
[in] | na | number of aquifers |
[in] | temp | temperature |
[in] | rh | relative humuidity (-) |
[in,out] | q | flow in main river (m3/s) |
[in,out] | lakew | lake water stage (ilake,olake) (mm) |
[in,out] | riverv | river volume (type 2) (m3) |
[in] | accpw | irrigation water need for this subbasin (m3/timestep) =sum(pwn(i,:)) |
[in,out] | irrnetloss | accumulated irrigation losses (m3/timestep) |
[out] | gwabstr | groundwater abstraction for irrigation (m3/timestep) |
[out] | ldabstr | local dam water abstraction for irrigation (m3/timestep) |
[out] | lrabstr | local river water abstraction for irrigation (m3/timestep) |
[out] | rsabstr | regional surface water abstraction for irrigation in other subbasins (m3/timestep) |
[in] | cq | concentration of flow in main river (typically mg/L) |
[out] | irrsinkmass | mass of substances in the irrigation sink in this subbasin (typically in kg) |
[in] | cilake | concentration laketype 1 (typically mg/L) |
[in] | colake | concentration laketype 2 (typically mg/L) |
[in] | criver | concentration river type 2 (typically mg/L) |
[in] | soilstate | Soil states |
[in,out] | aquiferstate | Aquifer states |
[in,out] | nextirrigation | irrigation for next time step (mm/timestep) |
[in,out] | cnextirrigation | concentration irrigation next time step |
[out] | wblirrflows | irrigations flows needed for water balance output (m3/timestep) |
[in,out] | wbrirrflows | irrigations flows needed for water balance output, regional sources (m3/timestep) |
[out] | wbrirrevap | irrigations flows needed for water balance output, regional sources evaporation (m3/timestep) |
[in,out] | aquiferloss | accumulated aquifer removal (m3/timestep) |
[out] | dampabstr | main river damping box water abstraction for irrigation (m3/timestep) |
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.
[in] | i | index of subbasin |
[in] | j | index of slc-class |
[in] | area | class area (km2) |
[in] | sswcorrpar | parameter for scaling of irrigation threshold (-) |
[in] | immdeppar | parameter for target immersion depth (mm) |
[in] | iwdfracpar | parameter for scaling of irrigation water demand relative to threshold (-) |
[in] | wdpar | parameter for constant water demand (mm/timestep) |
[in] | soil | soil moisture per soil layer (mm) |
[in] | wpl | wilting point per soil layer (mm) |
[in] | fcl | field capacity per soil layer (mm) |
[in] | epl | efficient porosity per soil layer (mm) |
[in] | epot | potential evapotranspiration (mm/timestep) |
[in] | miscstate | Misc states (whole structure as input because miscstategsbegin might not be allocated) |
[out] | iwdv | subbasin irrigation water demand for the soil (volume) (m3/timestep) |
[out] | sswtout | stress 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))
Set output variables
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)
[in] | k | index in cropdata |
[in] | jday | current day number/julian day |
[in] | bday | current planting day |
[out] | kcb | basal crop coefficient |
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.
/li Check if secondary crop is irrigated
subroutine irrigation_module::get_irrigation_parameters | ( | integer, intent(in) | isb, |
real, dimension(5), intent(out) | irrigationpar | ||
) |
Set current parameter values for irrigation calculation.
[in] | isb | index of subbasin |
[out] | irrigationpar | parameter values used by 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.
[in] | n | number of subbasin (nsub) |
[in] | nc | number of classes (nclass) |
Algorithm
First call, first simulation:
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
[in] | nsubst | Number of substances |
[in,out] | miscstate | Misc states |
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)
[in,out] | conc | concentration of water abstracted from the source (typically in mg/L) |
[in] | cirrsinkpar | irrsink parameter (-) |
[in] | abstr | amount of water abstracted from the source (m3) |
[in,out] | sinkmass | mass of the withdrawn substances in this sink (typically in kg/timestep) |
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
[in] | n | number 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
|
private |
Concentration of irrigation object (numsubstances,nclass,nsub)
|
private |
|
private |
Plant water deficit for irrigated classes (mm) (nclass,nsub)
|
private |
Water to be applied at this timestep for irrigated classes (mm) (nclass,nsub)
|
private |
Index to irrigation variable (nsub)
|
private |
Irrigation type for class (0=no irrigation) (nclass)
|
private |
Number of subbasins which has this subbasin as a source of regional water for irrigation (nsub)
|
private |
Water demand at regional source for the local subbasin (m3) (nsub)
|
private |
Index i of subbasins which has this subbasin as a source of regional water for irrigation (max number of collectors,nsub)
|
private |
Index i of subbasin which is the source of regional water for irrigation (nsub)
|
private |
Total water demand at regional source (m3) (nsub)