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) |
Subroutines for calculating current atmospheric forcing.
real function atmospheric_processes::airpressure_elevationfunction | ( | real, intent(in) | elev | ) |
Calculate air pressure (kPa) as a function of elevation, FAO(7)
[in] | elev | elevation |
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)
[in] | i | current subbasin |
[in] | j | current class |
[in] | temp | temperature to apply correction to |
Algoritm
Add SLC-hight dependent correction for temperature
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)
[in] | i | current index of subbasin |
[in] | j | current index of class |
[in] | precij | class precipitation after downwind redistribution of snow (mm/timestep) |
[in] | sfdist | snow distribution within subbasin classes (modeloption 1 and 2) |
[in] | radext | subbasin extraterrestrial solar radiation (MJ/m2/day) |
[in] | cloud | cloudiness for subbasin |
[out] | temp | current class temperature (C) |
[out] | prec | current class precipitation (mm/timestep) |
[out] | tmin | current daily min temperature (C) |
[out] | tmax | current daily max temperature (C) |
[out] | swrad | daily mean shortwave radiation (MJ/m2/ts) |
[out] | actvap | actual vapour pressure [kPa] |
[out] | satvap | saturated vapour pressure [kPa] |
[out] | icpevap | interception losses (evaporation) [mm] |
[out] | icpevap2 | interception losses (evaporation and condensation) (can be negative) [mm] |
[out] | netrad | net downward radiation [MJ/m2/ts] |
[out] | wind | current wind speed (m/s) |
[out] | swpot | clearsky 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
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.
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.
[in] | jday | Current julian day number |
[in] | lat | latitude |
[out] | length | day length (hours) |
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.
[in] | n | number of subbasins |
[in] | jday | day of year (1-366) |
[out] | radext | extraterrestrial solar radiation [MJ/m2/day] |
Algorithm
Calculate variables needed for extraterrestrial radiation calculation; distance to sun and declination.
For every 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.
[in] | i | index current subbasin |
[in] | winddirint | wind direction |
[out] | inear | index subbasin nearest downwind |
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.
[in] | tmean | temperature of timestep [C] ok? |
[in] | tmin | daily min temperature [C] |
[in] | tmax | daily max temperature [C] |
[in] | albedo | albedo [fraction, 0-1] |
[in] | actvap | actual vapour pressure [kPa] |
[in] | swrad | daily mean shortwave radiation [MJ/m2/ts] |
[in] | relswrad | relative shortwave radiation (actual/clearsky) [-] |
[in,out] | netrad | net downward radiation [MJ/m2/ts] |
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)
[in] | i | index of current subbasin |
[in] | j | index of current class |
[in] | temp | air temperature |
[out] | epot | potential evapotranspiration [mm/timestep] |
[in] | radext | extraterrestrial solar radiation [MJ/m2/day] |
[in] | swrad | downward shortwave radiation [MJ/m2/ts] |
[in] | netrad | net downward radiation [MJ/m2/ts] |
[in] | actvap | actual vapor pressure [kPa] |
[in] | satvap | saturated vapour pressure [kPa] |
[in] | wind | wind speed [m/s] |
[out] | epotsnow | potential 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
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)
[in] | i | index of subbasin |
[in] | iluse | index of landuse |
[in] | prec | precipitation (mm/timestep) |
[in] | temp | air temperature (C) |
[out] | snowfall | Precipitation as snow (mm/timestep) |
[out] | rainfall | Precipitation as rain (mm/timestep) |
Algorithm
Calculate rainfall and snowfall
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.
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.
[in] | tmin | daily minimum air temperature [C] |
[in] | tmax | daily maximum air temperature [C] |
[in] | elev | elevation [m.a.s.l] |
[in] | radext | extraterrestrial solar radiation [MJ/m2/day] |
[in] | cloud | cloudiness [fraction] |
[in,out] | swrad | daily mean shortwave radiation [MJ/m2/ts] |
[out] | relswrad | relative shortwave radiation (actual/clearsky) [-] |
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.
[in] | i | subbasin number |
[in] | iluse | land use |
[in] | windspeed | wind speed (m/s) |
[in] | wsf | Winstral factors for subbasin i, all classes |
[in,out] | sfdist | Snowfall distribution factor for class (area weighted for mass conservation) |
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.
[in] | i | subbasin number |
[in] | inrange | flag subbasin within snowfall distribution range |
[in] | weight | windspeed and distance weight |
[in] | winddirint | wind direction class (integer) |
[in,out] | msfdist | Snowfall distribution factors (area weighted for mass conservation) |
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.
[in] | i | index current subbasin |
[in] | wind | wind speed (m/s) |
[out] | inrange | integer(nsub) to flag subbasins within range |
[out] | weight | real(nsub) wind and distance based weight = fraction of precipitation shared with other basin (0-1) |
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
[in] | i | subbasin number |
[in] | j | subbasin number |
[in] | iluse | land use |
[in] | iwsf | Winstral factors for subbasin i, all classes |
[in] | jwsf | Winstral factors for subbasin i, all classes |
[in,out] | isfdist | Snowfall distribution factor for class (area weighted for mass conservation) |
[in,out] | jsfdist | Snowfall distribution factor for class (area weighted for mass conservation) |
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)
[in] | i | source subbasin |
[in] | j | target subbasin |
[in] | wspd | wind speed m/s |
[out] | localfrac | weight for source subbasin >> fraction of snowfall that will be distributed locally |
[out] | sharedfrac | weight for target subbasin >> fraction of snowfall that will be distributed between both basins |
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))
[in] | n | number of subbasins |
[in] | temparr | array of subbasin average temperature |
[out] | rharr | array of subbasin average relative humidty for use in isotop calcualtions |
Algoritm
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)
[in] | n | number of subbasins |
[in] | temppobs | temperature at precipitation input level |
[in,out] | precarr | subbasin average precipitation [mm/timestep] |
[out] | pcorricep | interception 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
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)
[in] | n | number of subbasins |
[in] | month | current month |
[in,out] | temparr | subbasin average temperature |
Algoritm
Add temperature correction to current air temperature
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.
[in] | tmean | daily mean temperature [C]? temperature of timestep |
[in,out] | tmin | daily min temperature [C] |
[in,out] | tmax | daily max temperature [C] |
[in] | rhmean | daily mean relative humidity [fraction 0-1] |
[in] | rhmin | daily min relative humidity [fraction 0-1] |
[in] | rhmax | daily max relative humidity [fraction 0-1] |
[in] | swrad | daily mean shortwave radiation [MJ/m2/ts] |
[in] | radext | extraterrestrial solar radiation [MJ/m2/day] |
[out] | actvap | actual vapour pressure [kPa] |
[out] | satvap | saturated vapour pressure [kPa] |
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.
[in] | numdir | Number of wind direction classes |
[in] | uwind | U-wind, west to east, m/s |
[in] | vwind | V-wind, south to north, m/s |
[out] | winddirint | Wind direction, integer class, 1 to numdir (1=northerly) |
[out] | windspeed | Wind 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
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)
[in] | i | index of subbasin |
[in] | prec | precipitation (mm/timestep) |
[in] | tempin | subbasin average temperature (C) |
[in] | lim | subbasin 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
real function, public atmospheric_processes::deltasaturationpressure_function | ( | real, intent(in) | temp | ) |
Slope of the saturation pressure temperature function (kPa/C)
subroutine, public atmospheric_processes::get_current_cloudiness | ( | integer, intent(in) | n, |
integer, intent(in) | cmonth, | ||
real, dimension(n), intent(out) | cloud | ||
) |
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)
[in] | i | index of subbasin |
[in] | iluse | index of landuse |
[in] | prec | precipitation (mm/timestep) |
[in] | temp | air temperature (C) |
Algorithm
Select model for rain/snow separation and calculate rain 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)
[in] | i | index of subbasin |
[in] | iluse | index of landuse |
[in] | prec | precipitation (mm/timestep) |
[in] | temp | air temperature (C) |
Algorithm
Select model for rain/snow separation and calculate rain fraction
|
private |
Calculate latent heat of vaporization (MJ kg-1) as a function of temperature.
[in] | temp | temperature (C) |
|
private |
Calculate non normalised snow (re)distribution factor by linear model.
[in] | wspd | wind speed (m/s) |
[in] | wscale | wind scaling factor |
[in] | wsf | Winstral factor |
[in] | wsfluse | landuse scaling factor |
[in] | wsfscale | scaling for Winstral factor |
[in] | wsfbias | bias for Winstral factor |
[in] | sfdmax | maximum value for sfdist |
|
private |
Calculate non normalised snow (re)distribution factor by log-linear model.
[in] | wspd | wind speed (m/s) |
[in] | wscale | wind scaling factor |
[in] | wsf | Winstral factor |
[in] | wsfluse | landuse scaling factor |
[in] | wsfscale | scaling for Winstral factor |
[in] | wsfbias | bias for Winstral factor |
[in] | sfdmax | maximum value for sfdist |
|
private |
Net (upward) longwave radiation, FAO, ekv 39.
[in] | tmax | maximum temperature of day (C) |
[in] | tmin | minimum temperature of day (C) |
[in] | actvap | actual vapour pressure (kPa) |
[in] | relswrad | relative shortwave radiation (actual/clearsky) [-] |
|
private |
Calculate psychrometric constant (kPa C^-1) as a function of air pressure and latent heat of vaporization, FAO.
[in] | airpressure | air pressure [kPa] |
[in] | lambda | latent heat of vaporization [MJ/kg] |
real function atmospheric_processes::saturationpressure_function | ( | real, intent(in) | temp | ) |
Saturation pressure (kPa) as a function of temperature in deg C, following FAO.
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
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)
[in] | i | index of current subbasin |
[in] | iluse | index of current landuse |
[in] | iveg | index of current vegtype |
[in] | ns | number of substances, array dimension |
[in] | area | class area (km2) |
[in] | precorg | precipitation from Pobs.txt (mm/timestep) |
[in] | temp | temperature of class (degree Celsius) |
[in] | prec | precipitation of class (mm/timestep) |
[out] | cprec | concentration of precipitation (prec) |
[out] | precload | nutrient load of precipitation (kg/timestep) |
[in] | snowfall | snow fall (mm) |
[in] | rainfall | rain fall (mm) |
[in] | watertemp | temperature of water (C) |
[in] | icecover | ice 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
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.
[in] | prec | precipitation |
[in] | temp | air temperature |
[in] | snowfall | snow fall |
[in] | rainfall | rain fall |
[in] | watertemp | temperature of water |
[in] | icecover | ice cover |
[in,out] | cprect2 | T2 concentration of precipitation |
real function atmospheric_processes::windspeed_windshelter_function | ( | real, intent(in) | wspd, |
real, intent(in) | wscale | ||
) |
Calculate windspeed impact on snow distribution windshelter factor.
[in] | wspd | wind speed (m/s) |
[in] | wscale | scaling factor |