The command line¶
fluxatlas INPUT --list
fluxatlas INPUT -o atlas.html --vars TA,PREC
fluxatlas INPUT -o atlas.html --var TA=air_temp --qc TA=TA_FLAG
python -m fluxatlas is the same entry point.
The command line is a thin wrapper over fluxatlas.atlas. Nothing is computed in it that a
caller using the library would have to write again.
Naming the variables¶
There are two ways to say which variables to build, and one call can use both.
--vars KEY[,KEY...]Names canonical keys and lets the registry find the columns. Use it where the file uses FLUXNET names (
TA_F,P_F,SW_IN_F, and so on). Repeatable, and comma-separated lists work.--var KEY=COLUMNNames the column outright, which is what a file with its own naming needs.
--qc KEY=COLUMNadds the quality flag beside it (0 measured, above 0 modelled).--factor KEY=NUMBERconverts the column onto the canonical unit. Both refine a--varmapping and are an error without one.
--list prints what the registry can find in a file. Run it first to see whether --vars will do.
Naming nothing builds every registry variable the file can supply.
Examples¶
# What does this file carry? Read from the header, so it is quick on a large file.
fluxatlas record.csv --list
# Everything the registry finds, written beside the input as <SITE>_atlas.html
fluxatlas record.csv
# Two variables, named by canonical key
fluxatlas record.csv -o atlas.html --vars TA,PREC
# A file with its own column names
fluxatlas record.parquet -o atlas.html --var TA=air_temp --qc TA=TA_FLAG
# A column published in Pa, converted onto the canonical kPa
fluxatlas record.parquet -o atlas.html --var VPD=vpd_pa --factor VPD=0.001
# Two half-years instead of four seasons, and a smaller file
fluxatlas record.csv -o atlas.html --seasons DJFMAM --no-hourly
File size¶
--no-hourly drops the hourly arrays behind the day panel’s diurnal charts. They are most of the
output: a twenty-one-year FULLSET page with them runs to about 6 MB. Dropping them costs the
diurnal composites and nothing else.
Every option¶
Build an atlas page from a half-hourly FLUXNET-standardized file.
usage: fluxatlas [-h] [-o OUT] [--vars KEY[,KEY...]] [--var KEY=COLUMN]
[--qc KEY=COLUMN] [--factor KEY=NUMBER] [--seasons MONTHS]
[--site SITE] [--site-long SITE_LONG]
[--first-year FIRST_YEAR] [--last-year LAST_YEAR]
[--no-hourly] [--title TITLE] [--list] [--open] [-q]
input
Positional Arguments¶
- input
the half-hourly input file (.csv or .parquet)
Named Arguments¶
- -o, --out
output HTML file; the default is <SITE>_atlas.html beside the input
- --vars
canonical variables to build, with their columns found by the registry (TA, PREC, SW_IN, VPD, RH, SWC, NEE, GPP, RECO, LE, H). Repeatable.
- --var
name the column that supplies a variable, for a file that does not use FLUXNET names. Repeatable.
- --qc
the quality flag beside a –var column: 0 measured, above 0 modelled. Repeatable.
- --factor
multiply a –var column onto the canonical unit, e.g. –factor VPD=0.001 for Pa to kPa. Repeatable.
- --seasons
the first season, as month initials (DJF, JJA) or numbers (12,1,2). The rest of the year is divided into seasons of the same length, so DJF gives the usual four and DJFMAM gives two half-years. Use ‘none’ for a site whose year has no seasons. Default: DJF
Default:
'DJF'- --site
site identifier; the default is read from the file name
- --site-long
longer site description for the page
Default:
''- --first-year
first year to include
- --last-year
last year to include
- --no-hourly
leave out the hourly arrays behind the day panel’s diurnal charts, which are most of the file size
Default:
False- --title
page title; the default names the site and the span
- --list
print the variables the registry can find in the file, and exit
Default:
False- --open
open the finished page in the default browser
Default:
False- -q, --quiet
print nothing but errors
Default:
False
- examples:
fluxatlas record.csv –list fluxatlas record.csv -o atlas.html fluxatlas record.csv -o atlas.html –vars TA,PREC fluxatlas record.parquet -o atlas.html –var TA=air_temp –qc TA=TA_FLAG fluxatlas record.parquet -o atlas.html –var VPD=vpd_pa –factor VPD=0.001
Errors¶
An argument error, an unknown canonical key, a --qc or --factor that refines nothing, a missing
input file, or an invalid --seasons value: each exits with a message and a non-zero status. The
season value is checked before the file is opened, so a typo does not first cost a read of several
hundred megabytes.