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

Functions/Subroutines

subroutine, public set_atmospheric_parameters_corrections ()
 
subroutine, public calculate_class_atmospheric_forcing (i, j, precij, sfdist, radext, cloud, temp, prec, tmin, tmax, swrad, actvap, satvap, icpevap, icpevap2, netrad, wind, swpot)
 
real function apply_classelevation_temperature_correction (i, j, temp)
 
subroutine, public calculate_subbasin_temperature (n, month, temparr)
 
subroutine, public calculate_subbasin_humidty_for_t1 (n, temparr, rharr)
 
subroutine, public calculate_subbasin_precipitation (n, temppobs, precarr, pcorricep)
 
real function get_rainfall_fraction (i, iluse, prec, temp)
 
real function get_snowfall_fraction (i, iluse, prec, temp)
 
logical function, public currently_snowing (i, prec, tempin, lim)
 
subroutine, public calculate_rain_snow_from_precipitation (i, iluse, prec, temp, snowfall, rainfall)
 
subroutine, public get_current_cloudiness (n, cmonth, cloud)
 
subroutine, public calculate_extraterrestrial_radiation (n, jday, radext)
 
subroutine calculate_shortwave_radiation (tmin, tmax, elev, radext, cloud, swrad, relswrad)
 
subroutine calculate_vapour_pressures (tmean, tmin, tmax, rhmean, rhmin, rhmax, swrad, radext, actvap, satvap)
 
subroutine calculate_net_radiation (tmean, tmin, tmax, albedo, actvap, swrad, relswrad, netrad)
 
real function saturationpressure_function (temp)
 
real function, public deltasaturationpressure_function (temp)
 
real function netlongwaveradiation_function (tmax, tmin, actvap, relswrad)
 
subroutine, public set_class_precipitation_concentration_and_load (i, iluse, iveg, ns, area, precorg, temp, prec, cprec, precload, snowfall, rainfall, watertemp, icecover)
 
subroutine set_t2_concentration_in_precipitation_on_water (prec, temp, snowfall, rainfall, watertemp, icecover, cprect2)
 
subroutine, public calculate_class_wind_transformation_factor (windtrans)
 
subroutine, public calculate_daylength (jday, lat, length)
 
subroutine, public calculate_winddirspeed (numdir, uwind, vwind, winddirint, windspeed)
 
real function windspeed_windshelter_function (wspd, wscale)
 
real function linear_snowdist_factor (wspd, wscale, wsf, wsfluse, wsfscale, wsfbias, sfdmax)
 
real function loglinear_snowdist_factor (wspd, wscale, wsf, wsfluse, wsfscale, wsfbias, sfdmax)
 
subroutine, public calculate_snowfall_distribution (i, iluse, windspeed, wsf, sfdist)
 
subroutine calculate_snowfall_distribution_twobasins (i, j, iluse, windspeed, iwsf, jwsf, isfdist, jsfdist)
 
subroutine calculate_snowfall_distribution_multibasins (i, inrange, weight, windspeed, winddirint, msfdist, sum_basinarea)
 
subroutine calculate_snowfall_distribution_subbasin_inrange (i, wind, inrange, weight)
 
subroutine calculate_nearest_downwind_subbasin (i, winddirint, inear)
 
subroutine calculate_snowfall_redistribution_fractions (i, j, wspd, localfrac, sharedfrac)
 
subroutine, public calculate_regional_snowfall_distribution (n, nc, tempobs, precarr, precij, precexpi, precimpi)
 
real function airpressure_elevationfunction (elev)
 
real function latentheat_tempfunction (temp)
 
real function psychrometric_constant (airpressure, lambda)
 
subroutine, public calculate_potential_evaporation (i, j, temp, epot, radext, swrad, netrad, actvap, satvap, wind, epotsnow)
 

Detailed Description

Subroutines for calculating current atmospheric forcing.

Function/Subroutine Documentation

◆ airpressure_elevationfunction()

real function atmospheric_processes::airpressure_elevationfunction ( real, intent(in)  elev)

Calculate air pressure (kPa) as a function of elevation, FAO(7)

Parameters
[in]elevelevation
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply_classelevation_temperature_correction()

real function atmospheric_processes::apply_classelevation_temperature_correction ( integer, intent(in)  i,
integer, intent(in)  j,
real, intent(in)  temp 
)

Apply corrections to get subbasin average temperature.

Reference ModelDescription Chapter Processes above ground (Temperature and precipitation)

Parameters
[in]icurrent subbasin
[in]jcurrent class
[in]temptemperature to apply correction to

Algoritm

Add SLC-hight dependent correction for temperature

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

◆ calculate_class_atmospheric_forcing()

subroutine, public atmospheric_processes::calculate_class_atmospheric_forcing ( integer, intent(in)  i,
integer, intent(in)  j,
real, dimension(:,:), intent(in), allocatable  precij,
real, dimension(nclass), intent(in)  sfdist,
real, intent(in)  radext,
real, intent(in)  cloud,
real, intent(out)  temp,
real, intent(out)  prec,
real, intent(out)  tmin,
real, intent(out)  tmax,
real, intent(out)  swrad,
real, intent(out)  actvap,
real, intent(out)  satvap,
real, intent(out)  icpevap,
real, intent(out)  icpevap2,
real, intent(out)  netrad,
real, intent(out)  wind,
real, intent(out)  swpot 
)

Calculate class temperature and precipitation.

Reference ModelDescription Chapter Processes above ground (Temperature and precipitation)

Parameters
[in]icurrent index of subbasin
[in]jcurrent index of class
[in]precijclass precipitation after downwind redistribution of snow (mm/timestep)
[in]sfdistsnow distribution within subbasin classes (modeloption 1 and 2)
[in]radextsubbasin extraterrestrial solar radiation (MJ/m2/day)
[in]cloudcloudiness for subbasin
[out]tempcurrent class temperature (C)
[out]preccurrent class precipitation (mm/timestep)
[out]tmincurrent daily min temperature (C)
[out]tmaxcurrent daily max temperature (C)
[out]swraddaily mean shortwave radiation (MJ/m2/ts)
[out]actvapactual vapour pressure [kPa]
[out]satvapsaturated vapour pressure [kPa]
[out]icpevapinterception losses (evaporation) [mm]
[out]icpevap2interception losses (evaporation and condensation) (can be negative) [mm]
[out]netradnet downward radiation [MJ/m2/ts]
[out]windcurrent wind speed (m/s)
[out]swpotclearsky radiation [MJ/m2/ts]

Algoritm
Set default output values for optional forcing; missing

Calculate class temperature adjusted for elevation

Calculate class precipitation adjusted for elevation and landuse bias, and calculate interception loss

Calculate class specific shortwave radiation, if needed

Calculate class specific vapor pressures and net radiation, if needed (and possibly tmin and tmax)

Set class specific windspeed

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

◆ calculate_class_wind_transformation_factor()

subroutine, public atmospheric_processes::calculate_class_wind_transformation_factor ( real, dimension(:), intent(inout), allocatable  windtrans)

Calculate transformation factor for wind speed to different height than observations.

+ Here is the caller graph for this function:

◆ calculate_daylength()

subroutine, public atmospheric_processes::calculate_daylength ( integer, intent(in)  jday,
real, intent(in)  lat,
real, intent(out)  length 
)

Calculate daylength based on latitude and julian day.

Parameters
[in]jdayCurrent julian day number
[in]latlatitude
[out]lengthday length (hours)
+ Here is the caller graph for this function:

◆ calculate_extraterrestrial_radiation()

subroutine, public atmospheric_processes::calculate_extraterrestrial_radiation ( integer, intent(in)  n,
integer, intent(in)  jday,
real, dimension(n), intent(out)  radext 
)

Calculates extraterrestrial solar radiation as a function of latitude and day of year for all subbasins in the model domain.

Parameters
[in]nnumber of subbasins
[in]jdayday of year (1-366)
[out]radextextraterrestrial solar radiation [MJ/m2/day]

Algorithm
Calculate variables needed for extraterrestrial radiation calculation; distance to sun and declination.

For every subbasin:

  • Calculate sunset hour angle, with special care for high latitudes
  • Calculate extraterrestrial radiation
+ Here is the caller graph for this function:

◆ calculate_nearest_downwind_subbasin()

subroutine atmospheric_processes::calculate_nearest_downwind_subbasin ( integer, intent(in)  i,
integer, intent(in)  winddirint,
integer, intent(out)  inear 
)

Identify the nearest downwind subbasin.

Parameters
[in]iindex current subbasin
[in]winddirintwind direction
[out]inearindex subbasin nearest downwind
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_net_radiation()

subroutine atmospheric_processes::calculate_net_radiation ( real, intent(in)  tmean,
real, intent(in)  tmin,
real, intent(in)  tmax,
real, intent(in)  albedo,
real, intent(in)  actvap,
real, intent(in)  swrad,
real, intent(in)  relswrad,
real, intent(inout)  netrad 
)

Calculates net radiation at land surface.

Parameters
[in]tmeantemperature of timestep [C] ok?
[in]tmindaily min temperature [C]
[in]tmaxdaily max temperature [C]
[in]albedoalbedo [fraction, 0-1]
[in]actvapactual vapour pressure [kPa]
[in]swraddaily mean shortwave radiation [MJ/m2/ts]
[in]relswradrelative shortwave radiation (actual/clearsky) [-]
[in,out]netradnet downward radiation [MJ/m2/ts]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_potential_evaporation()

subroutine, public atmospheric_processes::calculate_potential_evaporation ( integer, intent(in)  i,
integer, intent(in)  j,
real, intent(in)  temp,
real, intent(out)  epot,
real, intent(in)  radext,
real, intent(in)  swrad,
real, intent(in)  netrad,
real, intent(in)  actvap,
real, intent(in)  satvap,
real, intent(in)  wind,
real, intent(out)  epotsnow 
)

Calculates potential evaporation or uses a value supplied as input.

Reference ModelDescription Processes above ground (Evaporation)

Parameters
[in]iindex of current subbasin
[in]jindex of current class
[in]tempair temperature
[out]epotpotential evapotranspiration [mm/timestep]
[in]radextextraterrestrial solar radiation [MJ/m2/day]
[in]swraddownward shortwave radiation [MJ/m2/ts]
[in]netradnet downward radiation [MJ/m2/ts]
[in]actvapactual vapor pressure [kPa]
[in]satvapsaturated vapour pressure [kPa]
[in]windwind speed [m/s]
[out]epotsnowpotential evapotranspiration for snow mm/timestep

Algorithm
Set local parameters and corrections

Calculate additional input variables for the alternative PET functions

Calculate potential evaporation with the selected petmodel

Calculate potential evaporation for snow evaporation (sublimation)

Adjust potential evaporations with regional parameter cevpcorr

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

◆ calculate_rain_snow_from_precipitation()

subroutine, public atmospheric_processes::calculate_rain_snow_from_precipitation ( integer, intent(in)  i,
integer, intent(in)  iluse,
real, intent(in)  prec,
real, intent(in)  temp,
real, intent(out)  snowfall,
real, intent(out)  rainfall 
)

Subroutine for calculation amount of rainfall and snowfall from precipitaion.

Reference ModelDescription Chapter Processes above ground (Temperature and precipitation)

Parameters
[in]iindex of subbasin
[in]iluseindex of landuse
[in]precprecipitation (mm/timestep)
[in]tempair temperature (C)
[out]snowfallPrecipitation as snow (mm/timestep)
[out]rainfallPrecipitation as rain (mm/timestep)

Algorithm

Calculate rainfall and snowfall

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

◆ calculate_regional_snowfall_distribution()

subroutine, public atmospheric_processes::calculate_regional_snowfall_distribution ( integer, intent(in)  n,
integer, intent(in)  nc,
real, dimension(n), intent(in)  tempobs,
real, dimension(n), intent(inout)  precarr,
real, dimension(n,nc), intent(out)  precij,
real, dimension(n), intent(out)  precexpi,
real, dimension(n), intent(out)  precimpi 
)

Calculate distribution of falling snow between sub-basins in downwind direction. It is a simplified between sub-basin transfer of snowfall (snow drift of current snowfall).

Pseudo-code for the algorithm: Each timestep Between_subbasin_transfer_of_snow Loop over sub-basins Identify downwind subbasins based on winddirection (and possibly wind speed) and positions of subbasin centre coordinates Potentially, also assigns some kind of weights based on windspeed and distance to the downwind subbasins Calculate the snowfall distribution factors as before, but including the SLC-classes and WSF-factors in the downwind sub-basins (potentially weighted, see previous point) Sum up the snowfall distribution factors in the sub-basin and in the downwind sub-basins Derive amount of precipitation (fraction of preci) that should be transferred from the current sub-basin to the downwind sub-basins (taking into account distribution of rain and snow in the current subbasin) Loop over sub-basins Adjust the precipitation based on the transfer derived in previous loop Loop over subbasins (the normal loop) Within sub-basin snowfall distribution factors (old code) Loop over SLC-classes (old code)

So essentially, it is only a re-distribution of precipitation between sub-basins taking place before the normal sub-basin loop. No additional input data is needed � except a few new parameters.

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

◆ calculate_shortwave_radiation()

subroutine atmospheric_processes::calculate_shortwave_radiation ( real, intent(in)  tmin,
real, intent(in)  tmax,
real, intent(in)  elev,
real, intent(in)  radext,
real, intent(in)  cloud,
real, intent(inout)  swrad,
real, intent(out)  relswrad 
)

Calculates solar radiation at land surface. Calculates relative shortwave radiation and (if missing) shortwave radiation.

Parameters
[in]tmindaily minimum air temperature [C]
[in]tmaxdaily maximum air temperature [C]
[in]elevelevation [m.a.s.l]
[in]radextextraterrestrial solar radiation [MJ/m2/day]
[in]cloudcloudiness [fraction]
[in,out]swraddaily mean shortwave radiation [MJ/m2/ts]
[out]relswradrelative shortwave radiation (actual/clearsky) [-]
+ Here is the caller graph for this function:

◆ calculate_snowfall_distribution()

subroutine, public atmospheric_processes::calculate_snowfall_distribution ( integer, intent(in)  i,
integer, dimension(nclass), intent(in)  iluse,
real, intent(in)  windspeed,
real, dimension(nclass), intent(in)  wsf,
real, dimension(nclass), intent(inout)  sfdist 
)

Calculate distribution of falling snow using Winstral coefficients (WSF)

Original linear function (see HUVA reports Gustafsson et al, 2015): relative snowfall = 1. + WSFscale * (WSF + WSFbias)

Alternative log-linear option (recommended), see manuscript Clemenzi et al 2020 relative snowfall = 10 ** (WSFscale * (WSF + WSFbias))

In both cases WSFscale can be scaled by landuse WSFluse and wind speed.

The relative snowfall is normalized within each subbasin so that the subbasin mean snowfall is preserved.

Parameters
[in]isubbasin number
[in]iluseland use
[in]windspeedwind speed (m/s)
[in]wsfWinstral factors for subbasin i, all classes
[in,out]sfdistSnowfall distribution factor for class (area weighted for mass conservation)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_snowfall_distribution_multibasins()

subroutine atmospheric_processes::calculate_snowfall_distribution_multibasins ( integer, intent(in)  i,
integer, dimension(nsub), intent(in)  inrange,
real, dimension(nsub), intent(in)  weight,
real, intent(in)  windspeed,
integer, intent(in)  winddirint,
real, dimension(nsub,nclass), intent(inout)  msfdist,
real, intent(out)  sum_basinarea 
)

Multi-basin version of snowfall distribution.

Parameters
[in]isubbasin number
[in]inrangeflag subbasin within snowfall distribution range
[in]weightwindspeed and distance weight
[in]winddirintwind direction class (integer)
[in,out]msfdistSnowfall distribution factors (area weighted for mass conservation)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_snowfall_distribution_subbasin_inrange()

subroutine atmospheric_processes::calculate_snowfall_distribution_subbasin_inrange ( integer, intent(in)  i,
real, intent(in)  wind,
integer, dimension(:), intent(out)  inrange,
real, dimension(:), intent(out)  weight 
)

Identify subbasins within a distance range.

Parameters
[in]iindex current subbasin
[in]windwind speed (m/s)
[out]inrangeinteger(nsub) to flag subbasins within range
[out]weightreal(nsub) wind and distance based weight = fraction of precipitation shared with other basin (0-1)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_snowfall_distribution_twobasins()

subroutine atmospheric_processes::calculate_snowfall_distribution_twobasins ( integer, intent(in)  i,
integer, intent(in)  j,
integer, dimension(nclass), intent(in)  iluse,
real, intent(in)  windspeed,
real, dimension(nclass), intent(in)  iwsf,
real, dimension(nclass), intent(in)  jwsf,
real, dimension(nclass), intent(inout)  isfdist,
real, dimension(nclass), intent(inout)  jsfdist 
)

Calculate distribution of falling snow using Winstral coefficients (WSF)

Original linear function (see HUVA reports Gustafsson et al, 2015): relative snowfall = 1. + WSFscale * (WSF + WSFbias)

Alternative log-linear option (recommended), see manuscript Clemenzi et al 2020 relative snowfall = 10 ** (WSFscale * (WSF + WSFbias))

In both cases WSFscale can be scaled by landuse WSFluse and wind speed.

The relative snowfall is normalized within each subbasin so that the subbasin mean snowfall is preserved.

SPECIAL VERSION TO TAKE WFS FROM 2 BASINS INTO ACCOUNT

Parameters
[in]isubbasin number
[in]jsubbasin number
[in]iluseland use
[in]iwsfWinstral factors for subbasin i, all classes
[in]jwsfWinstral factors for subbasin i, all classes
[in,out]isfdistSnowfall distribution factor for class (area weighted for mass conservation)
[in,out]jsfdistSnowfall distribution factor for class (area weighted for mass conservation)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_snowfall_redistribution_fractions()

subroutine atmospheric_processes::calculate_snowfall_redistribution_fractions ( integer, intent(in)  i,
integer, intent(in)  j,
real, intent(in)  wspd,
real, intent(out)  localfrac,
real, intent(out)  sharedfrac 
)

Calculate local and shared snow redistribution fractions (~fraction of snowfall for distribution locally and regionally in the source and target subbasins)

Parameters
[in]isource subbasin
[in]jtarget subbasin
[in]wspdwind speed m/s
[out]localfracweight for source subbasin >> fraction of snowfall that will be distributed locally
[out]sharedfracweight for target subbasin >> fraction of snowfall that will be distributed between both basins
+ Here is the caller graph for this function:

◆ calculate_subbasin_humidty_for_t1()

subroutine, public atmospheric_processes::calculate_subbasin_humidty_for_t1 ( integer, intent(in)  n,
real, dimension(n), intent(in)  temparr,
real, dimension(:), intent(out)  rharr 
)

Calculate relative humidity for isotop calculations if forcing data is missing.

Reference ModelDescription Chapter Tracers (General tracer (T1))

Parameters
[in]nnumber of subbasins
[in]temparrarray of subbasin average temperature
[out]rharrarray of subbasin average relative humidty for use in isotop calcualtions

Algoritm

+ Here is the caller graph for this function:

◆ calculate_subbasin_precipitation()

subroutine, public atmospheric_processes::calculate_subbasin_precipitation ( integer, intent(in)  n,
real, dimension(n), intent(in)  temppobs,
real, dimension(n), intent(inout)  precarr,
real, dimension(n), intent(out)  pcorricep 
)

Apply corrections to get subbasin average precipitation.

Reference ModelDescription Chapter Processes above ground (Temperature and precipitation)

Parameters
[in]nnumber of subbasins
[in]temppobstemperature at precipitation input level
[in,out]precarrsubbasin average precipitation [mm/timestep]
[out]pcorricepinterception evaporation due to negative preccorr-parameter [mm/timestep]

Algoritm

Calculate average snowfall fraction

Undercatch correction factor give first correction of precarr(i)

Calculate adjustment of subbasin precipitation for regional correction and general bias.

Calculate interception as negative preccorr

Set new precipitation

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

◆ calculate_subbasin_temperature()

subroutine, public atmospheric_processes::calculate_subbasin_temperature ( integer, intent(in)  n,
integer, intent(in)  month,
real, dimension(n), intent(inout)  temparr 
)

Apply corrections to get subbasin average temperature.

Reference ModelDescription Chapter Processes above ground (Temperature and precipitation)

Parameters
[in]nnumber of subbasins
[in]monthcurrent month
[in,out]temparrsubbasin average temperature

Algoritm

Add temperature correction to current air temperature

+ Here is the caller graph for this function:

◆ calculate_vapour_pressures()

subroutine atmospheric_processes::calculate_vapour_pressures ( real, intent(in)  tmean,
real, intent(inout)  tmin,
real, intent(inout)  tmax,
real, intent(in)  rhmean,
real, intent(in)  rhmin,
real, intent(in)  rhmax,
real, intent(in)  swrad,
real, intent(in)  radext,
real, intent(out)  actvap,
real, intent(out)  satvap 
)

Calculates daily mean actual and saturated vapour pressure depending on data availability, following recommended FAO procedures.

Parameters
[in]tmeandaily mean temperature [C]? temperature of timestep
[in,out]tmindaily min temperature [C]
[in,out]tmaxdaily max temperature [C]
[in]rhmeandaily mean relative humidity [fraction 0-1]
[in]rhmindaily min relative humidity [fraction 0-1]
[in]rhmaxdaily max relative humidity [fraction 0-1]
[in]swraddaily mean shortwave radiation [MJ/m2/ts]
[in]radextextraterrestrial solar radiation [MJ/m2/day]
[out]actvapactual vapour pressure [kPa]
[out]satvapsaturated vapour pressure [kPa]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_winddirspeed()

subroutine, public atmospheric_processes::calculate_winddirspeed ( integer, intent(in)  numdir,
real, intent(in)  uwind,
real, intent(in)  vwind,
integer, intent(out)  winddirint,
real, intent(out)  windspeed 
)

Calculate wind direction (integer) and mean velocity from u(x) and v(y) components consistent with wind shelter classes.

Parameters
[in]numdirNumber of wind direction classes
[in]uwindU-wind, west to east, m/s
[in]vwindV-wind, south to north, m/s
[out]winddirintWind direction, integer class, 1 to numdir (1=northerly)
[out]windspeedWind speed in wind direction, m/s

Wind speed in wind direction

Zero windspeed - nothing to do

Wind direction in degrees, clockwise from North (meteorological definition)

Wind direction class, 1 to numdir, where class 1 is centered to the north

+ Here is the caller graph for this function:

◆ currently_snowing()

logical function, public atmospheric_processes::currently_snowing ( integer, intent(in)  i,
real, intent(in)  prec,
real, intent(in)  tempin,
real, intent(in)  lim 
)

Subroutine for checking if it is currently snowing in the subbasin. A parameter defines the limit for how large part of the subbasin must have snow for it to be sain to be snowing.

Reference ModelDescription Chapter Processes above ground (Temperature and precipitation)

Parameters
[in]iindex of subbasin
[in]precprecipitation (mm/timestep)
[in]tempinsubbasin average temperature (C)
[in]limsubbasin area fraction defining it as snowing

Algorithm

If there is no precipitation there is no snowfall

Check if forcingdata says it is snowing

Check how much of subbasin has snowfall

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

◆ deltasaturationpressure_function()

real function, public atmospheric_processes::deltasaturationpressure_function ( real, intent(in)  temp)

Slope of the saturation pressure temperature function (kPa/C)

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

◆ get_current_cloudiness()

subroutine, public atmospheric_processes::get_current_cloudiness ( integer, intent(in)  n,
integer, intent(in)  cmonth,
real, dimension(n), intent(out)  cloud 
)

Get monthly cloudiness climatology for subbasins (Geodata input)

+ Here is the caller graph for this function:

◆ get_rainfall_fraction()

real function atmospheric_processes::get_rainfall_fraction ( integer, intent(in)  i,
integer, intent(in)  iluse,
real, intent(in)  prec,
real, intent(in)  temp 
)

Subroutine for calculation snowfall fraction of precipitaion.

Reference ModelDescription Chapter Processes above ground (Temperature and precipitation)

Parameters
[in]iindex of subbasin
[in]iluseindex of landuse
[in]precprecipitation (mm/timestep)
[in]tempair temperature (C)

Algorithm

Select model for rain/snow separation and calculate rain fraction

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

◆ get_snowfall_fraction()

real function atmospheric_processes::get_snowfall_fraction ( integer, intent(in)  i,
integer, intent(in)  iluse,
real, intent(in)  prec,
real, intent(in)  temp 
)

Subroutine for calculation snowfall fraction of precipitaion.

Reference ModelDescription Chapter Processes above ground (Temperature and precipitation)

Parameters
[in]iindex of subbasin
[in]iluseindex of landuse
[in]precprecipitation (mm/timestep)
[in]tempair temperature (C)

Algorithm

Select model for rain/snow separation and calculate rain fraction

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

◆ latentheat_tempfunction()

real function atmospheric_processes::latentheat_tempfunction ( real, intent(in)  temp)
private

Calculate latent heat of vaporization (MJ kg-1) as a function of temperature.

Parameters
[in]temptemperature (C)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ linear_snowdist_factor()

real function atmospheric_processes::linear_snowdist_factor ( real, intent(in)  wspd,
real, intent(in)  wscale,
real, intent(in)  wsf,
real, intent(in)  wsfluse,
real, intent(in)  wsfscale,
real, intent(in)  wsfbias,
real, intent(in)  sfdmax 
)
private

Calculate non normalised snow (re)distribution factor by linear model.

Parameters
[in]wspdwind speed (m/s)
[in]wscalewind scaling factor
[in]wsfWinstral factor
[in]wsfluselanduse scaling factor
[in]wsfscalescaling for Winstral factor
[in]wsfbiasbias for Winstral factor
[in]sfdmaxmaximum value for sfdist
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loglinear_snowdist_factor()

real function atmospheric_processes::loglinear_snowdist_factor ( real, intent(in)  wspd,
real, intent(in)  wscale,
real, intent(in)  wsf,
real, intent(in)  wsfluse,
real, intent(in)  wsfscale,
real, intent(in)  wsfbias,
real, intent(in)  sfdmax 
)
private

Calculate non normalised snow (re)distribution factor by log-linear model.

Parameters
[in]wspdwind speed (m/s)
[in]wscalewind scaling factor
[in]wsfWinstral factor
[in]wsfluselanduse scaling factor
[in]wsfscalescaling for Winstral factor
[in]wsfbiasbias for Winstral factor
[in]sfdmaxmaximum value for sfdist
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ netlongwaveradiation_function()

real function atmospheric_processes::netlongwaveradiation_function ( real, intent(in)  tmax,
real, intent(in)  tmin,
real, intent(in)  actvap,
real, intent(in)  relswrad 
)
private

Net (upward) longwave radiation, FAO, ekv 39.

Parameters
[in]tmaxmaximum temperature of day (C)
[in]tminminimum temperature of day (C)
[in]actvapactual vapour pressure (kPa)
[in]relswradrelative shortwave radiation (actual/clearsky) [-]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ psychrometric_constant()

real function atmospheric_processes::psychrometric_constant ( real, intent(in)  airpressure,
real, intent(in)  lambda 
)
private

Calculate psychrometric constant (kPa C^-1) as a function of air pressure and latent heat of vaporization, FAO.

Parameters
[in]airpressureair pressure [kPa]
[in]lambdalatent heat of vaporization [MJ/kg]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saturationpressure_function()

real function atmospheric_processes::saturationpressure_function ( real, intent(in)  temp)

Saturation pressure (kPa) as a function of temperature in deg C, following FAO.

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

◆ set_atmospheric_parameters_corrections()

subroutine, public atmospheric_processes::set_atmospheric_parameters_corrections

Calculate basin temperature and precipitation corrections.

Consequences Module hypevariables variable basintcalt, basintempadd, basinpreccorr, basinpcurain and basinpcusnow are allocated and set.

Reference ModelDescription Chapter Processes above ground (Temperature and precipitation)

Algoritm

Set temperature altitude correction

Set temperature correction

Set precipitation height correction

Set subbasin rain and snow parameters

Replace parameter values with regional parameter estimates

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

◆ set_class_precipitation_concentration_and_load()

subroutine, public atmospheric_processes::set_class_precipitation_concentration_and_load ( integer, intent(in)  i,
integer, intent(in)  iluse,
integer, intent(in)  iveg,
integer, intent(in)  ns,
real, intent(in)  area,
real, intent(in)  precorg,
real, intent(in)  temp,
real, intent(in)  prec,
real, dimension(ns), intent(out)  cprec,
real, dimension(ns), intent(out)  precload,
real, intent(in), optional  snowfall,
real, intent(in), optional  rainfall,
real, intent(in), optional  watertemp,
real, intent(in), optional  icecover 
)

Calculate class concentration of precipitation and nutrient load.

Reference ModelDescription Chapter Processes above ground (Atmospheric deposition of nitrogen and phosphorus)

Parameters
[in]iindex of current subbasin
[in]iluseindex of current landuse
[in]ivegindex of current vegtype
[in]nsnumber of substances, array dimension
[in]areaclass area (km2)
[in]precorgprecipitation from Pobs.txt (mm/timestep)
[in]temptemperature of class (degree Celsius)
[in]precprecipitation of class (mm/timestep)
[out]cprecconcentration of precipitation (prec)
[out]precloadnutrient load of precipitation (kg/timestep)
[in]snowfallsnow fall (mm)
[in]rainfallrain fall (mm)
[in]watertemptemperature of water (C)
[in]icecoverice cover (-)

Algorithm
Set precipitation concentration from observed time series

Set wet deposition from input data (NEW)

Set isotop concentration from inital parameter if missing value found in Xobs, or if time series missing from Xobs.

Adjust concentration due to precipitation correction to keep wet deposition load

Temperature not adjusted, but set after adjustment. For lake/river depend on precipitation and ice cover

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

◆ set_t2_concentration_in_precipitation_on_water()

subroutine atmospheric_processes::set_t2_concentration_in_precipitation_on_water ( real, intent(in)  prec,
real, intent(in)  temp,
real, intent(in)  snowfall,
real, intent(in)  rainfall,
real, intent(in)  watertemp,
real, intent(in)  icecover,
real, intent(inout)  cprect2 
)

Calculate temperature(T2) "concentration" in lake/river precipitation due to ice presens. Changes the default T2 concentration, set for class.

Parameters
[in]precprecipitation
[in]tempair temperature
[in]snowfallsnow fall
[in]rainfallrain fall
[in]watertemptemperature of water
[in]icecoverice cover
[in,out]cprect2T2 concentration of precipitation
+ Here is the caller graph for this function:

◆ windspeed_windshelter_function()

real function atmospheric_processes::windspeed_windshelter_function ( real, intent(in)  wspd,
real, intent(in)  wscale 
)

Calculate windspeed impact on snow distribution windshelter factor.

Parameters
[in]wspdwind speed (m/s)
[in]wscalescaling factor
+ Here is the call graph for this function:
+ Here is the caller graph for this function: