pyValEIA.io.write
Functions to write standard output files.
Functions
|
Build the filename and directory for daily EIA stat files. |
|
Write the daily statistics file for model-data comparisons. |
Module Contents
- pyValEIA.io.write.build_daily_stats_filename(stime, model, obs, file_dir, **kwargs)[source]
Build the filename and directory for daily EIA stat files.
- Parameters:
- stimedatetime
day of desired file
- modelstr
Case-sensitive name of model requested (e.g., ‘NIMO’, ‘PyIRI’).
- obsstr
Name of data set requested (e.g., ‘SWARM’, ‘MADRIGAL’)
- file_dirstr
File directory
- kwargsdict
Optional kwargs by data type. Includes ‘mad_lon’, which expects longitudes of either -90 deg E or 60 deg E for Madrigal data.
- Returns:
- date_dirstr
Directory path in which file should exist (e.g., ‘file_dir/yyyy’)
- fnamestr
Filename without directory
- pyValEIA.io.write.write_daily_stats(stat_data, stime, model, obs, file_dir, **kwargs)[source]
Write the daily statistics file for model-data comparisons.
- Parameters:
- stat_datapd.DataFrame
DataFrame that includes all EIA statistics for the obs type
- stimedatetime
day of desired file
- modelstr
Case-sensitive name of model requested (e.g., ‘NIMO’, ‘PyIRI’).
- obsstr
Name of data set requested (e.g., ‘SWARM’, ‘MADRIGAL’)
- file_dirstr
File directory, if it does not exist it will use the current directory
- kwargsdict
Optional kwargs by data type. Includes ‘mad_lon’, which expects longitudes of either -90 deg E or 60 deg E for Madrigal data.