geomodels.cli module¶
Command Line Interface (CLI) for the geomodels Python package.
- class geomodels.cli.EInfoMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
EnumEnumeration describing which king of info shall be provided.
- ALL = 'all'¶
- DATA = 'data'¶
- INFO = 'info'¶
- geomodels.cli.get_import_igrf_parser(subparsers=None) ArgumentParser[source]¶
Set up the argument parser for the import-igrf sub-command.
- geomodels.cli.get_info_parser(subparsers=None) ArgumentParser[source]¶
Set up the argument parser for the info sub-command.
- geomodels.cli.get_install_data_parser(subparsers=None) ArgumentParser[source]¶
Set up the argument parser for the install-data sub-command.
- geomodels.cli.get_parser() ArgumentParser[source]¶
Instantiate the command line argument (sub-)parser.
- geomodels.cli.import_igrf(path: str | PathLike[str], outpath: str | PathLike[str] | None = None, force: bool = False)[source]¶
Import magnetic field data from IGRF text format.
Import Spherical Harmonics coefficients for the IGRF magnetic field model from text file in IGRF standard format.
- geomodels.cli.info(mode=EInfoMode.ALL, datadir=None)[source]¶
Provide information about the installation and environment.
Information provided include: the platform, the library versions and installed data.
- geomodels.cli.install_data(model, datadir=None, base_url=None, no_progress=False)[source]¶
Download and install the data necessary for models computation.
GeoModels uses external data to perform geoid, gravity and magnetic field computations.
It is possible to install different subsets of data:
- Minimal:
only data for the default model of each kind (geoid, gravity and magnetic field) are installed,
- Recommended:
install the minimal set of data (see above) plus few additional and commonly used data (it is guaranteed that the recommended subset always includes all data that are necessary to run the test suite),
- All:
install all available data (about 670MB of disk space required),
- Geoids:
install data for all supported geoids,
- Gravity:
install data for all supported gravity models,
- Magnetic:
install data for all supported magnetic field models.
Additionally the it is possible to install data for a single model.