Skip to content

Commit

Permalink
Minor changes for making ameriflux files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregory E. Maurer committed Sep 1, 2016
1 parent 558f600 commit c8a0128
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion UNM_parse_valles_met_data.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
if abs( measfreq - 24 ) <= 0.1
% hourly data - OK
fprintf( 'Data in hourly frequency, OK ...\n' );
elseif abs( measfreq - 144 ) <= 0.7
elseif abs( measfreq - 144 ) <= 1.5
% 10 minute frequency needs to be converted. Take hourly means of
% all variables except Precip, which should be summed. Create a new
% table from these hourly values.
Expand Down
10 changes: 7 additions & 3 deletions assemble_multiyear_ameriflux.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,20 @@
% parse ASCII Ameriflux files
all_data = {};

% Pop up a dialog asking user to select release folder
releasename = uigetdir(fullfile( getenv( 'FLUXROOT' ), ...
'Ameriflux_files'));
%releasename = fullfile( getenv( 'FLUXROOT' ), ...
% 'Ameriflux_files', 'FLUXNET2015');

for i = 1:numel( years );
% get this year's ameriflux data
fname = sprintf( '%s_%d_%s.txt', ...
UNM_sites_info( args.sitecode ).ameriflux, ...
years( i ), ...
args.suffix );
fprintf( 'parsing %s\n', fname );
fname = fullfile( getenv( 'FLUXROOT' ), ...
'Ameriflux_files', ...
fname );
fname = fullfile( releasename, fname );
if exist( fname )
this_data = parse_ameriflux_file( fname );

Expand Down
3 changes: 2 additions & 1 deletion retrieve_card_data/download_gapfilled_partitioned_flux.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
% make system call
[s, r] = dos(cmd);

fprintf( 'Downloading gapfilled & partitioned fluxes...' );
fprintf( 'Downloading gapfilled & partitioned fluxes...\n' );
fprintf( 'If this hangs try dos2unix.exe trick on the bash script...\n' );

% do not continue until the blocking file is removed
pause on;
Expand Down
6 changes: 3 additions & 3 deletions scripts/script_make_ameriflux.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
UNM_sites.SLand, UNM_sites.GLand, UNM_sites.PPine, UNM_sites.New_GLand};
%sitelist = {UNM_sites.JSav, ...
% UNM_sites.SLand, UNM_sites.GLand, UNM_sites.PPine, UNM_sites.MCon};
%sitelist={UNM_sites.PJ};
sitelist={UNM_sites.MCon};
% Years to create files for
yearlist = 2015;
yearlist = 2016;
% Partitioned data source
partmethod = 'eddyproc'; %'eddyproc'
% Make daily files? All AF files should be in $FLUXROOT$/Ameriflux_files
make_daily = false;
write_files = true;
write_files = false;
process_soil = false;

for i = 1:length(sitelist);
Expand Down
10 changes: 5 additions & 5 deletions scripts/script_make_qc_gf.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
sitelist = {UNM_sites.GLand, UNM_sites.SLand, UNM_sites.JSav,...
UNM_sites.PPine, UNM_sites.MCon, UNM_sites.PJ, UNM_sites.PJ_girdle, ...
UNM_sites.New_GLand };
%sitelist = {UNM_sites.PJ};
yearlist = 2015;
sitelist = {UNM_sites.PPine};
yearlist = 2016;

% True, overwrite files; False; do not overwrite
write_qc = true;
write_gf = true;
write_qc = false;
write_gf = false;
old_fluxall = false;

for i = 1:length(sitelist);
Expand All @@ -34,7 +34,7 @@
'old_fluxall', old_fluxall);

% Fill in gaps using the REddyProc package
%UNM_run_gapfiller(site, year);
UNM_run_gapfiller(site, year);
%
% Otherwise, send the resulting for_gapfilling files to
% the MPI eddyproc web service.
Expand Down

0 comments on commit c8a0128

Please sign in to comment.