lstid_processing.model.io
Process standard SAMI3 output files.
Functions
|
Create concatonated files from SAMI3 output f1, f2, f3 files. |
|
Load a concatonated file SAMI3 file into an xarray Dataset. |
|
Download SAMI3 files from the public NRL directory. |
Module Contents
- lstid_processing.model.io.create_concat_files(sami3_dir, output_dir, run_name, date_list=None, samp_period=300, min_period=1800, max_period=7200, nl_inds=None, nf_inds=None, key_inds=None)[source]
Create concatonated files from SAMI3 output f1, f2, f3 files.
- Parameters:
- sami3_dirstr
Directory where the SAMI3 f1, f2, and f3 files exist
- output_dirstr
Directory to which the concatonated files will be output
- run_namestr
Run name to use to distinguish the output files
- date_listlist-like or NoneType
List containing string specifying the YYYYDDD to concatonate. If None, will use [‘2014084’, ‘2014085’]. (default=None)
- samp_periodint
Sample period for model data in seconds (default=300)
- min_periodint
Minimum period for relative variations in seconds (default=1800)
- max_periodint
Maximum period for relative variations in seconds (default=7200)
- nl_indslist-like or NoneType
List of nl indices at which variations will be computed, if None uses [26, 26] (default=None)
- nf_indslist-like or NoneType
List of nl indices at which variations will be computed, if None uses [44, 58] (default=None)
- key_indslist-like or NoneType
Key to assign to the nl/nf index pairs, if None uses [‘c’, ‘d’] (default=None)
- Returns:
- samixr.Dataset
Concatonated dataset with relative and maxima included
Notes
Adds variations at the 26 March 2014 DMSP and C/NOFS conjugate locations.
- lstid_processing.model.io.load_concat_file(filename)[source]
Load a concatonated file SAMI3 file into an xarray Dataset.
- Parameters:
- filenamestr
Filename with full path.
- Returns:
- samixr.Dataset
An xarray Dataset with model data and fixed times
- lstid_processing.model.io.download_nrl_files(outdir, filename=None, nrl_site='https://map.nrl.navy.mil/map/pub/nrl/lstids/')[source]
Download SAMI3 files from the public NRL directory.
- Parameters:
- outdirstr
Directory to which data will be saved
- filenamestr or NoneType
Desired file to download or None to get all of them (default=None)
- nrl_sitestr
URL hosting the SAMI3 files (default=’https://map.nrl.navy.mil/map/pub/nrl/lstids’)
- Returns:
- model_nameslist
List of model run names with their destination directory
- Raises:
- ValueError
If outdir does not exist.