satmo.preprocessors module¶
-
satmo.preprocessors.
bz2_compress
(source, destination, compresslevel=3, overwrite=False)[source]¶ Unpacks data compressed with bz2
Utility function to bz2 compress data
Parameters: - source (str) – the filename to compress
- destination (str) – the destination directory, filename will be set automatically
- compresslevel (int) – Compression level
- overwrite (bool) – If false, check whether file already exists and returns its name
Returns: The filename of the bz2 compressed file
Return type: str
-
satmo.preprocessors.
bz2_unpack
(source, destination, overwrite=False)[source]¶ Unpacks data compressed with bz2
Utility function to unpack bz2 compressed data The function only works if a single file is compressed
Parameters: - source (str) – the filename of the archive
- destination (str) – the destination directory, filename will be set automatically
- overwrite (bool) – If false, check whether file already exists and returns its name
Returns: The filename of the unpacked file
Return type: str
-
satmo.preprocessors.
getanc
(x)[source]¶ Wrapper for the getanc.py seadas utility
Parameters: x (str) – filename of a L1 file Returns: The path to the generated (and moved) .anc text file Return type: str
-
satmo.preprocessors.
l2gen
(x, var_list, suite, data_root, get_anc=True)[source]¶ Wrapper to run seadas l2gen on L1A data
Run l2gen for modis and viirs data. All intermediary files are automatically generated in the case of MODIS; if input is a viirs L1A file, there must be a corresponding GEO file in the same folder.
Parameters: - x (str) – Path to input L1A file
- var_list (list) – List of strings representing the variables to process
- suite (str) – Output L2 suite name
- data_root (str) – Root of the local data archive
- get_anc (bool) – Download ancillary data for improved atmospheric correction. Defaults to True.
Returns: file name of the generated L2 file
Return type: str