-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakeFOREST.m
More file actions
71 lines (62 loc) · 2.35 KB
/
makeFOREST.m
File metadata and controls
71 lines (62 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
function FOREST = makeFOREST(LandCover)
% Link and Marks (1999)
% Distributed simulation of snowcover mass-
% and energy-balance in the boreal forest
% Hydrological Processes 2439-2452
%INPUT
% FOREST LandCover structure called
% fields:
% Z - m x n x L, with each layer of L corresponding to the
% fractional cover of type L, 0-1
% currently only two veg types are implemented:
% 1 - deciduous
% 2 - coniferous
% cc - m x n, static canopy cover estimate, 0-1
%OUTPUT
% FOREST structure
% .tau - canopy transmissivity coefficient
% .u - canopy extinction coefficent
% .cc - canopy cover fraction
% .h - canopy height, m
% .shd - snow holding depth, m
% .type - canopy type structure w/:
% .type.list - {1=deciduous,2=coniferous}
% .type.num_val - map of dominant type
% Allocate the transmissivity, extinction,
%fraction canopy and height grids
siz=size(LandCover.Z);
FOREST.tau=ones([siz(1) siz(2)],'single');
FOREST.u=zeros([siz(1) siz(2)],'single');
FOREST.cc=FOREST.u;
FOREST.h=FOREST.u;
deciduous_fraction=squeeze(LandCover.Z(:,:,1));
coniferous_fraction=squeeze(LandCover.Z(:,:,2));
% Set values for transmissivity
FOREST.tau(deciduous_fraction > 0 & ...
deciduous_fraction >= coniferous_fraction)=0.60;%Deciduous
FOREST.tau(coniferous_fraction > 0 & ...
coniferous_fraction >= deciduous_fraction)=0.30;%Coniferous
% Set any remaining values w/ cc>0 but tau==1 to coniferous
FOREST.tau(LandCover.cc > 0 & FOREST.tau==1)=0.30;
%classification map
FOREST.type.list={'deciduous','coniferous'};
FOREST.type.num_val=zeros(size(FOREST.tau));
FOREST.type.num_val(FOREST.tau==0.60)=1;
FOREST.type.num_val(FOREST.tau==0.30)=2;
%vegetation snow holding depth (for winds)
FOREST.shd=zeros(size(FOREST.tau));
FOREST.shd(FOREST.type.num_val==1)=12;
FOREST.shd(FOREST.type.num_val==2)=15;
% Set values for forest height
% assume veg snow holding depth = height;
FOREST.h=FOREST.shd;
%bare ground
FOREST.shd(FOREST.type.num_val~=1 & FOREST.type.num_val~=2)=0.01;
% Set values for extinction
FOREST.u(deciduous_fraction > 0 & ...
deciduous_fraction >= coniferous_fraction)=0.016;%Deciduous
FOREST.u(coniferous_fraction > 0 & ...
coniferous_fraction >= deciduous_fraction)=0.033;%Coniferous
FOREST.cc=LandCover.cc;
FOREST.tau(FOREST.cc==0)=1;
FOREST.u(FOREST.cc==0)=0;