Skip to content

Commit db4ff39

Browse files
author
Gregory E. Maurer
committed
Making RBD ustar filter switch more apparent
1 parent 7351363 commit db4ff39

File tree

3 files changed

+50
-10
lines changed

3 files changed

+50
-10
lines changed

UNM_RemoveBadData.m

+15-2
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,17 @@
101101

102102
draw_plots = args.Results.draw_plots;
103103

104+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
105+
% USTAR filter switch
106+
% If this is set to false, the ustar filter for fluxes is turned off
107+
% (this is desireable for making ameriflux files)
108+
% See line 1272 to see where this takes affect (its pretty hacky)
109+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
110+
ustar_filter_switch = false;
111+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112+
%
113+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
114+
104115

105116
data_for_analyses = 0; %1 to output file with data sorted for specific analyses
106117
ET_gap_filler = 0; %run ET gap-filler program
@@ -1258,8 +1269,10 @@
12581269
if iteration > 1
12591270

12601271
% Remove values with low U*
1261-
1262-
ustar_lim = 0;
1272+
% Only happens if switch is set to true
1273+
if ~ustar_filter_switch
1274+
ustar_lim = 0;
1275+
end
12631276
ustarflag = find(u_star < ustar_lim);
12641277
removed_ustar = length(ustarflag);
12651278
decimal_day_nan(ustarflag) = NaN;

scripts/script_make_ameriflux.m

+34-7
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,46 @@
11
%close all;
22
%clear all;
33
%
4-
sitelist = {UNM_sites.MCon, UNM_sites.JSav, UNM_sites.PJ, UNM_sites.PJ_girdle, ...
5-
UNM_sites.SLand, UNM_sites.GLand, UNM_sites.PPine, UNM_sites.New_GLand};
6-
%sitelist = {UNM_sites.JSav, ...
7-
% UNM_sites.SLand, UNM_sites.GLand, UNM_sites.PPine, UNM_sites.MCon};
8-
sitelist={UNM_sites.MCon};
4+
5+
sitelist_1 = {UNM_sites.MCon, UNM_sites.JSav, UNM_sites.PJ, UNM_sites.PJ_girdle, ...
6+
UNM_sites.SLand, UNM_sites.GLand, UNM_sites.PPine, UNM_sites.New_GLand};
7+
yearlist_1 = 2010:2015;
8+
9+
sitelist_2 = {UNM_sites.JSav, ...
10+
UNM_sites.SLand, UNM_sites.GLand, UNM_sites.PPine, UNM_sites.MCon};
11+
yearlist_2 = 2007:2009;
12+
13+
sitelist_3={UNM_sites.PJ};
914
% Years to create files for
10-
yearlist = 2016;
15+
yearlist_3 = 2008:2009;
16+
17+
sitelist_4 = {UNM_sites.PJ_girdle}
18+
yearlist = 2009 ;
1119
% Partitioned data source
1220
partmethod = 'eddyproc'; %'Reddyproc'
1321
% Make daily files? All AF files should be in $FLUXROOT$/Ameriflux_files
1422
make_daily = false;
15-
write_files = false;
23+
write_files = true;
1624
process_soil = false;
1725

26+
for k = 1:4
27+
% Automatically cycles through earlier site years to account for
28+
% different startup dates.
29+
switch k
30+
case 1
31+
sitelist = sitelist_1;
32+
yearlist = yearlist_1;
33+
case 2
34+
sitelist = sitelist_2;
35+
yearlist = yearlist_2;
36+
case 3
37+
sitelist = sitelist_3;
38+
yearlist = yearlist_3;
39+
case 4
40+
sitelist = sitelist_4;
41+
yearlist = yearlist_4;
42+
end
43+
1844
for i = 1:length(sitelist);
1945
%close all;
2046
for j = 1:length(yearlist);
@@ -47,4 +73,5 @@
4773
close all;
4874
clear sitecode;
4975
end
76+
end
5077

scripts/script_make_qc_gf.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
sitelist = {UNM_sites.GLand, UNM_sites.SLand, UNM_sites.JSav,...
55
UNM_sites.PPine, UNM_sites.MCon, UNM_sites.PJ, UNM_sites.PJ_girdle, ...
66
UNM_sites.New_GLand };
7-
sitelist = {UNM_sites.PPine};
7+
sitelist = {UNM_sites.New};
88
yearlist = 2016;
99

1010
% True, overwrite files; False; do not overwrite

0 commit comments

Comments
 (0)