Open NicWayand opened 9 years ago
Here is a half completed scaling function (copied from DHSVM V2.8)
function WS_out = scale_WS(WS_in,z_in,z_out,scaling_method)
% Input % % WS_in - 1XL Scaler Wind speed % z_in - Height in meters of WS_in % z_out - Height in meters of WS_out % scaling_method - Method used to scale Wind speed % 1 - Logrithmic % 2 - Exponential % % Output % % WS_out - 1XL Scaler Wind speed, scaled up to z_out
%% CODE
Z0_SNOW = 0.01; % Snow roughness (m)
% Calc factor if scaling_method == 1 % Logrithmic (depends on surface roughness) if z_in > z_out Ftcr = log((z_out + Z0_SNOW) / Z0_SNOW) / log(z_in / Z0_SNOW); % DHSVM, no over story, with Snow else % Flip inputs, and then take 1 over Fct to get correct scalling both ways Ftcr = log((z_in + Z0_SNOW) / Z0_SNOW) / log(z_out / Z0_SNOW); % DHSVM, no over story, with Snow Ftcr = 1/Ftcr; end % Ftcr = log(z_out) / log(z_in); % BAD method, elseif scaling_method == 2 % Exponential error('add here') end
% Calc new Wind speed WS_out = WS_in .* Ftcr;
% END
It is assumed that the wind speed forcing is at the height of the radiometer (?). But it may not be, requiring some adjustment via a logarithmic profile so that the wind speed cutoffs are appropriate.