


PURPOSE: simple script to calculate melt for a DEM based on a temperature index model
using positive degree days (PDD).
-------------------------------------------------------------------
USAGE:
where: [dem] is the input topography grid
[T] is the mean annual air temperature MAAT at sealevel in degC
[minalt] is the minimum altitude to calculate melt for (default
1000)
[params] is a vector containing the 3 parameters ddf_ice, lrate, a_seas
and tau_a (degree day factor for ice[m/d degC], temperature lapse rate in deg/100m
annual temp fluctuation in degrees and length of the year in days.
Default is [8.0,0.6,5.0,365];
-------------------------------------------------------------------------
OUTPUTS:
-------------------------------------------------------------------
NOTE: only pdd_ice used atm, no seasonal perturbation etc
Melt for areas lower than [minalt] is set to 0 instead of NaN so
subgrids can be added!
See also:
Functions used:
Felix Hebeler, Geography Dept., University Zurich, Jan 2007.

0001 function m = meltpdd_simple(dem,T,minalt,params) 0002 % PURPOSE: simple script to calculate melt for a DEM based on a temperature index model 0003 % using positive degree days (PDD). 0004 % ------------------------------------------------------------------- 0005 % USAGE: 0006 % where: [dem] is the input topography grid 0007 % [T] is the mean annual air temperature MAAT at sealevel in degC 0008 % [minalt] is the minimum altitude to calculate melt for (default 0009 % 1000) 0010 % [params] is a vector containing the 3 parameters ddf_ice, lrate, a_seas 0011 % and tau_a (degree day factor for ice[m/d degC], temperature lapse rate in deg/100m 0012 % annual temp fluctuation in degrees and length of the year in days. 0013 % Default is [8.0,0.6,5.0,365]; 0014 % 0015 % ------------------------------------------------------------------------- 0016 % OUTPUTS: 0017 % 0018 % ------------------------------------------------------------------- 0019 % NOTE: only pdd_ice used atm, no seasonal perturbation etc 0020 % Melt for areas lower than [minalt] is set to 0 instead of NaN so 0021 % subgrids can be added! 0022 % 0023 % See also: 0024 % Functions used: 0025 % 0026 % Felix Hebeler, Geography Dept., University Zurich, Jan 2007. 0027 0028 0029 % default parameter values 0030 ddf_ice = 0.008; % DDF for ice in m/d degC 0031 %ddf_snow = 0.003; 0032 lrate = 0.6; % temperatur lapse rate in deg/100m 0033 a_seas = 5.0; % annual amplitude of temperature fluctuations in degrees 0034 tau_a = 365; %length of the year in days used in PDD 0035 0036 if ~exist('minalt','var') 0037 minalt=1000; 0038 end 0039 0040 if ~exist('params','var') 0041 params=[ddf_ice,lrate,a_seas,tau_a]; 0042 end 0043 0044 0045 % initialise 0046 m = T-(dem*params(2)/100); % get surface temperature for the DEM 0047 %melt=nan(12,size(dem,1),size(dem,2)); for monthly values 0048 %figure, imagesc(m) 0049 %title('Temperature') 0050 % calc melt 0051 m = m * params(1)*params(4); 0052 m(m<0)=0; 0053 m(dem<minalt)=0; 0054 %figure, imagesc(m) 0055 %title('Melt')