epygram.config
— Configuration: parameters, options¶
The module is used throughout the package to share constant parameters.
The standard default parameters lie below. They can be overwritten by
the user in the User config file userconfig.py
to be found under
userlocaldir
.
Installation¶
- epygram.config.installdir = '/home/mary/repositories/EPyGrAM/src/epygram'¶
Directory of epygram package install
- epygram.config.userlocaldir = '/home/mary/.epygram'¶
User customization directory
- epygram.config.epygram_colormaps = {'aspect': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/aspect.json', 'gaspect': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/gaspect.json', 'ptype': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/ptype.json', 'ptype0': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/ptype0.json', 'radar': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/radar.json', 'rr1h': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/rr1h.json', 'rr24h': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/rr24h.json', 'rr6h': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/rr6h.json'}¶
epygram Colormaps
Parameters¶
- epygram.config.default_Ptop = 0.0¶
Ptop: pressure @ summit of atmosphere. For vertical coordinates conversions.
- epygram.config.epsilon = 2.220446049250313e-16¶
Epsilon
- epygram.config.KNUMMAXRESOL = 10¶
Maximum number of truncations handled (setup spectral transforms)
- epygram.config.plotsizes = (16.0, 12.0)¶
Plots sizes (in inches)
- epygram.config.default_graphical_output = 'png'¶
Default output for apptools
Formats Specifications¶
- epygram.config.implemented_formats = ['netCDFMNH', 'netCDF', 'GRIB', 'GeoPoints', 'TIFFMF', 'HDF5SAF', 'FA', 'LFI', 'DDHLFA', 'LFA']¶
List of implemented/activated formats for the formats_factory, the list is ordered by specificity for those of the same family (e.g. FA before LFI, DDHLFA before LFA…) Removing one of these (in userconfig file) may allow an incomplete install of epygram, disabling one format. In loading order to deal with sub-libraries compatibilities (e.g. h5py after netCDF4, cf. https://github.com/Unidata/netcdf4-python/issues/1343)
FA¶
- epygram.config.FA_default_compression = {'KDMOPL': 0, 'KNBCSP': 16, 'KNBPDG': 16, 'KNGRIB': 2, 'KPUILA': 0, 'KSTRON': 0}¶
FA default compression parameters
- epygram.config.FA_default_reference_pressure = 101325.0¶
Default reference pressure coefficient for converting hybrid A coefficients in FA
- epygram.config.FA_default_geoid = {'a': 6371229.0, 'b': 6371229.0}¶
geoid of FA files in pyproj syntax
- epygram.config.FA_field_dictionaries_csv = {'default': '/home/mary/repositories/EPyGrAM/src/epygram/data/Field_Dict_FA.csv', 'user': '/home/mary/.epygram/user_Field_Dict_FA.csv'}¶
FA field dictionaries
- epygram.config.FA_fandax = True¶
FA (write) date & time precision: use FANDAR (minute) or FANDAX (second, cy40t1 onwards)
- epygram.config.FA_buffered_gauss_grid = True¶
To avoid re-computing lons/lats of Gauss Grids from FA each time needed: makes ARPEGE profiles and section extraction times acceptable (< 1min).
- epygram.config.FA_allow_MOCAGE_multivalidities = False¶
Allow MOCAGE fields to have multiple validities in file; in which case the term is decoded from the fid[2:4]
- epygram.config.FA_max_encoding = 30¶
Maximum recommended encoding for FA (KNBPDG)
- epygram.config.FA_mute_FA4py = True¶
Mute messages from FAIPAR in FA4py
LFA¶
- epygram.config.LFA_max_num_fields = 1000¶
LFA maximum number of fields
- epygram.config.LFA_maxstrlen = 200¶
LFA maximum length of strings (as in most LFA useage)
GeoPoints¶
- epygram.config.GeoPoints_lonlat_precision = 4¶
GeoPoints write precision for lon/lat
- epygram.config.GeoPoints_precision = 6¶
GeoPoints write precision for other floats
- epygram.config.GeoPoints_col_width = 12¶
GeoPoints write width of columns
GRIB¶
- epygram.config.GRIB_lowlevel_api = 'eccodes'¶
GRIB lowlevel API library to be used, among (‘eccodes’, ‘grib_api’, ‘gribapi’)
- epygram.config.GRIB_default_centre = 85¶
GRIB default production centre – write mode
- epygram.config.GRIB_epygram_samples_path = '/home/mary/repositories/EPyGrAM/src/epygram/data/grib_samples'¶
GRIB samples from epygram (treated as clone from file)
- epygram.config.satellites_local_GRIB2 = {'GOES11': 195, 'GOES12': 196, 'METEOSAT7': 192, 'METEOSAT8': 193, 'METEOSAT9': 194, 'MTSAT1': 197}¶
satellites local GRIB2 encoding
- epygram.config.sensors_local_GRIB2 = {'IMAGER': 194, 'MVIRI': 192, 'SEVIRI': 193}¶
sensors local GRIB2 encoding
- epygram.config.GRIB_packing_fatal = True¶
GRIB: errors while setting packing are fatal
- epygram.config.GRIB_ignore_validity_decoding_errors = False¶
GRIB: ignore errors while trying to decode validity
- epygram.config.GRIB_max_bitspervalue = 30¶
Maximum recommended encoding for GRIB (bitsPerValue)
- epygram.config.GRIB_force_bitspervalue = False¶
Force bitspervalue to GRIB_max_bitspervalue if requested higher
- epygram.config.GRIB_safe_indexes = '/tmp'¶
Use temporary links to workaround a bug in grib indexes set either a directory to use for that purpose (e.g. /tmp) or False not to use this option
LFI¶
- epygram.config.LFI_field_dictionaries_csv = {'default': '/home/mary/repositories/EPyGrAM/src/epygram/data/Field_Dict_LFI.csv', 'user': '/home/mary/.epygram/user_Field_Dict_LFI.csv'}¶
LFI field dictionaries
- epygram.config.LFI_default_geoid = {'a': 6371229.0, 'b': 6371229.0}¶
geoid of LFI files in pyproj syntax
netCDF¶
- epygram.config.netCDF_standard_dimensions = ['N_dimension', 'T_dimension', 'X_dimension', 'Y_dimension', 'Z_dimension']¶
netCDF standard dimensions
- epygram.config.netCDF_usualnames_for_standard_dimensions = {'N_dimension': ('N', 'n', 'transect', 'obs', 'profile', 'Number_of_points', 'gridpoints_number'), 'T_dimension': ('time', 'T', 't', 'validity', 'time_counter'), 'X_dimension': ('X', 'x', 'xx', 'nx', 'LON', 'lon', 'Nbre_lon', 'longitude', 'max_lon_number'), 'Y_dimension': ('Y', 'y', 'yy', 'ny', 'LAT', 'lat', 'Nbre_lat', 'latitude', 'lat_number'), 'Z_dimension': ('Z', 'z', 'zz', 'nz', 'level', 'nlev', 'nlevp1', 'pressure', 'hybrid-pressure', 'height', 'altitude', 'depth')}¶
netCDF usual names for standard dimensions
- epygram.config.netCDF_usualnames_for_lonlat_grids = {'X': ['LON', 'lon', 'lons', 'longitude', 'longitudes'], 'Y': ['LAT', 'lat', 'lats', 'latitude', 'latitudes']}¶
netCDF usual names for storing lon, lat grids
- epygram.config.netCDF_default_behaviour = {'H1D_is_H2D_unstructured': False, 'flatten_horizontal_grids': False, 'reverse_Yaxis': False, 'write_lonlat_grid': True}¶
netCDF default behaviour the behaviour can be updated with specific netCDF_usualnames_for_standard_dimensions, e.g. ‘X_dimension’:’nb_lon’ and eventual according grid, e.g. ‘X_grid’:’longitudes’
- epygram.config.netCDF_default_compression = 4¶
netCDF default compression
- epygram.config.netCDF_replace_dot_in_variable_names = '.'¶
netCDF, replace dots in variable names by…
- epygram.config.netCDF_default_global_attributes = {'made_with': 'epygram-1.5.2'}¶
netCDF default standard global attributes
- epygram.config.netCDF_default_variables_dtype = 'f8'¶
netCDF variables data type
- epygram.config.netCDF_default_metavariables_dtype = 'f8'¶
netCDF metavariables data type
- epygram.config.netCDF_default_variables_fill_value = -999999.9¶
netCDF variables fill value. None will make netCDF ignore existence of a _FillValue
Options¶
- epygram.config.default_geoid = {'ellps': 'WGS84'}¶
A classical default geoid for pyproj
- epygram.config.protect_unhappy_writes = False¶
Protect unhappy writes: ask before opening a new file on an existing path
- epygram.config.mask_outside = 1e+19¶
Threshold on field absolute values to mask meaningless field values
- epygram.config.pyproj_invalid_values = 1e+30¶
pyproj coordinates invalid values
- epygram.config.hide_footprints_warnings = True¶
To hide footprints warnings…
- epygram.config.prevent_swapping_legendre = 0.75¶
To raise an error if the memory needed for Legendre transforms exceeds this percentage of the available memory.
- epygram.config.footprints_proxy_as_builder = False¶
Use footprints.proxy builder to generate a field. True: more flexible, False: faster
- epygram.config.vector_symbol = 'barbs'¶
Vector graphical symbol
- epygram.config.default_figures_dpi = 150¶
Default quality for figures
- epygram.config.spectral_coeff_order = 'model'¶
ordering of spectral coefficients, with regards to arpifs spaces: ‘model’ or ‘FA’. => ‘model’: read/write by wfacilo/wfaieno,
‘FA’: read/write by wfacile/wfaienc
- epygram.config.init_at_import = False¶
To call epygram.init_env() automatically at import ! Should not be True if using Vortex !
- epygram.config.silent_guess_format = False¶
hide messages when guessing format True is dangerous, causes troubles in logging
- epygram.config.margin_points_within_Czone = 3¶
Number or margin within C-zone to generate a lonlat-included domain
- epygram.config.default_rcparams = [(('font',), {'family': 'serif'})]¶
Defaults for matplotlib rcparams
Colormaps¶
See Colormaps for illustration of the EPyGrAM colormaps.
- epygram.config.colormaps = {'aspect': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/aspect.json', 'gaspect': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/gaspect.json', 'ptype': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/ptype.json', 'ptype0': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/ptype0.json', 'radar': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/radar.json', 'rr1h': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/rr1h.json', 'rr24h': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/rr24h.json', 'rr6h': '/home/mary/repositories/EPyGrAM/src/epygram/data/colormaps/rr6h.json'}¶
colormaps gathers epygram and user colormaps
- epygram.config.usercolormaps = {}¶
In userconfig, this should be a dict whose keys are the colormap name and values the source absolute path of the colormap definition; e.g. {‘aspect’, ‘/home/mary/.epygram/aspect.json’}.