-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #170 initial commit. Only reads in an empty yaml config file
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
metplotpy/contributed/stratosphere_diagnostics/stratospheric_diagnostics_plot.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
""" | ||
Plotting for Stratosphere diagnostics | ||
""" | ||
__author__ = 'Zach D. Lawrence (CIRES/CU, NOAA/PSL), modified by Minna Win (NCAR)' | ||
|
||
import xarray as xr | ||
import numpy as np | ||
from matplotlib import pyplot as plt | ||
from metcalcpy.pre_processing.directional_means import meridional_mean | ||
from metcalcpy.pre_processing.directional_means import zonal_mean | ||
import yaml | ||
from metplotpy.plots import util | ||
|
||
def main(config_filename=None): | ||
# Retrieve the contents of the custom config file to over-ride | ||
# or augment settings defined by the default config file. | ||
if not config_filename: | ||
config_file = util.read_config_from_command_line() | ||
else: | ||
config_file = config_filename | ||
with open(config_file, 'r') as stream: | ||
try: | ||
docs = yaml.load(stream, Loader=yaml.FullLoader) | ||
except yaml.YAMLError as exc: | ||
print(exc) | ||
|
||
try: | ||
pass | ||
except ValueError as val_er: | ||
print(val_er) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |