Initialize a new x2sys track database.
x2sys_init is the starting point for anyone wishing to use x2sys; it initializes a set of data bases that are particular to one kind of track data. These data, their associated data bases, and key parameters are given a short-hand notation called an x2sys TAG. The TAG keeps track of settings such as file format, whether the data are geographic or not, and the binning resolution for track indices.
Before you can run x2sys_init you must set the environmental parameter X2SYS_HOME to a directory where you have write permission, which is where x2sys can keep track of your settings.
Full option list at https://docs.generic-mapping-tools.org/latest/supplements/x2sys/x2sys_init.html
D = fmtfile
E = suffix
F = force
G = discontinuity
I = spacing
N = units
R = region
V = verbose
W = gap
j = distcalc
tag (str) – The unique name of this data type x2sys TAG.
fmtfile (str) –
Format definition file prefix for this data set [See Format Definition Files for more information]. Specify full path if the file is not in the current directory.
Some file formats already have definition files premade. These include:
mgd77 (for plain ASCII MGD77 data files)
mgd77+ (for enhanced MGD77+ netCDF files)
gmt (for old mgg supplement binary files)
xy (for plain ASCII x, y tables)
xyz (same, with one z-column)
geo (for plain ASCII longitude, latitude files)
geoz (same, with one z-column).
suffix (str) – Specifies the file extension (suffix) for these data files. If not given we use the format definition file prefix as the suffix (see fmtfile).
discontinuity (str) –
d|gSelects geographical coordinates. Append d for discontinuity at the Dateline (makes longitude go from -180 to + 180) or g for discontinuity at Greenwich (makes longitude go from 0 to 360 [Default]). If not given we assume the data are Cartesian.
spacing (str or list) –
dx[/dy]x_inc [and optionally y_inc] is the grid spacing. Append m to indicate minutes or s to indicate seconds for geographic data. These spacings refer to the binning used in the track bin-index data base.
d|sunit. Sets the units used for distance and speed when requested by other programs. Append d for distance or s for speed, then give the desired unit as:
c - Cartesian userdist or userdist/usertime
e - meters or m/s
f - feet or feet/s
k - km or kms/hr
m - miles or miles/hr
n - nautical miles or knots
u - survey feet or survey feet/s
units=["dk", "se"](km and m/s) if discontinuity is set, and
units=["dc", "sc"]otherwise (Cartesian units).
verbose (str) –
Select verbosity level [Default is w], which modulates the messages written to stderr. Choose among 7 levels of verbosity:
q - Quiet, not even fatal error messages are produced
e - Error messages only
w - Warnings [Default]
t - Timings (report runtimes for time-intensive algorthms);
i - Informational messages (same as “verbose=True”)
c - Compatibility warnings
d - Debugging messages
gap (str or list) –
t|dgap. Give t or d and append the corresponding maximum time gap (in user units; this is typically seconds [Infinity]), or distance (for units, see units) gap [Infinity]) allowed between the two data points immediately on either side of a crossover. If these limits are exceeded then a data gap is assumed and no COE will be determined.
distcalc (str) –
e|f|g. Determine how spherical distances are calculated.
e - Ellipsoidal (or geodesic) mode
f - Flat Earth mode
g - Great circle distance [Default]
All spherical distance calculations depend on the current ellipsoid (PROJ_ELLIPSOID), the definition of the mean radius (PROJ_MEAN_RADIUS), and the specification of latitude type (PROJ_AUX_LATITUDE). Geodesic distance calculations is also controlled by method (PROJ_GEODESIC).