diff --git a/scripts/exgdas_global_marine_analysis_vrfy.py b/scripts/exgdas_global_marine_analysis_vrfy.py index 2a61994d5..122bccbc2 100755 --- a/scripts/exgdas_global_marine_analysis_vrfy.py +++ b/scripts/exgdas_global_marine_analysis_vrfy.py @@ -45,16 +45,16 @@ ####################################### data_file = os.path.join(comout, f'{RUN}.t'+cyc+'z.ocninc.nc') -config = plot_config(grid_file = grid_file, - data_file = data_file, - lats = np.arange(-60, 60, 10), - variables_zonal = ['Temp', 'Salt'], - variables_horiz = ['Temp', 'Salt', 'ave_ssh'], - allbounds = {'Temp': [-0.5, 0.5], +config = plot_config(grid_file=grid_file, + data_file=data_file, + lats=np.arange(-60, 60, 10), + variables_zonal=['Temp', 'Salt'], + variables_horiz=['Temp', 'Salt', 'ave_ssh'], + allbounds={'Temp': [-0.5, 0.5], 'Salt': [-0.1, 0.1], 'ave_ssh': [-0.1, 0.1]}, - colormap = 'RdBu', - comout = os.path.join(comout, 'vrfy', 'incr')) + colormap='RdBu', + comout=os.path.join(comout, 'vrfy', 'incr')) OcnIncPlotter = StatePlotter(config) OcnIncPlotter.plot() @@ -63,16 +63,16 @@ ####################################### data_file = os.path.join(comout, f'{RUN}.t'+cyc+'z.ice.incr.nc') -config = plot_config(grid_file = grid_file, - data_file = data_file, - lats = np.arange(-60, 60, 10), - variables_horiz = ['aicen', 'hicen', 'hsnon'], - allbounds = {'aicen': [-0.2, 0.2], +config = plot_config(grid_file=grid_file, + data_file=data_file, + lats=np.arange(-60, 60, 10), + variables_horiz=['aicen', 'hicen', 'hsnon'], + allbounds={'aicen': [-0.2, 0.2], 'hicen': [-0.5, 0.5], 'hsnon': [-0.1, 0.1]}, - colormap = 'RdBu', - projs = ['North', 'South'], - comout = os.path.join(comout, 'vrfy', 'incr')) + colormap='RdBu', + projs=['North', 'South'], + comout=os.path.join(comout, 'vrfy', 'incr')) IceIncPlotter = StatePlotter(config) IceIncPlotter.plot() @@ -81,15 +81,15 @@ ####################################### data_file = os.path.join(comout, f'{RUN}.t'+cyc+'z.iceana.nc') -config = plot_config(grid_file = grid_file, - data_file = data_file, - variables_horiz = ['aicen', 'hicen', 'hsnon'], - allbounds = {'aicen': [0.0, 1.0], +config = plot_config(grid_file=grid_file, + data_file=data_file, + variables_horiz=['aicen', 'hicen', 'hsnon'], + allbounds={'aicen': [0.0, 1.0], 'hicen': [0.0, 4.0], 'hsnon': [0.0, 0.5]}, - colormap = 'jet', - projs = ['North', 'South','Global'], - comout = os.path.join(comout, 'vrfy', 'ana')) + colormap='jet', + projs=['North', 'South','Global'], + comout=os.path.join(comout, 'vrfy', 'ana')) IceAnaPlotter = StatePlotter(config) IceAnaPlotter.plot() @@ -98,15 +98,15 @@ ####################################### data_file = os.path.join(com_ice_history, f'{RUN}.t{gcyc}z.icef006.nc') -config = plot_config(grid_file = grid_file, - data_file = data_file, - variables_horiz = ['aice_h', 'hs_h', 'hi_h'], - allbounds = {'aice_h': [0.0, 1.0], +config = plot_config(grid_file=grid_file, + data_file=data_file, + variables_horiz=['aice_h', 'hs_h', 'hi_h'], + allbounds={'aice_h': [0.0, 1.0], 'hs_h': [0.0, 4.0], 'hi_h': [0.0, 0.5]}, - colormap = 'jet', - projs = ['North', 'South','Global'], - comout = os.path.join(comout, 'vrfy', 'bkg')) + colormap='jet', + projs=['North', 'South', 'Global'], + comout=os.path.join(comout, 'vrfy', 'bkg')) IceBkgPlotter = StatePlotter(config) IceBkgPlotter.plot() @@ -115,14 +115,14 @@ ####################################### data_file = os.path.join(comout, f'{RUN}.t'+cyc+'z.ocnana.nc') -config = plot_config(grid_file = grid_file, - data_file = data_file, - variables_horiz = ['ave_ssh', 'Temp', 'Salt'], - allbounds = {'ave_ssh': [-1.8, 1.3], +config = plot_config(grid_file=grid_file, + data_file=data_file, + variables_horiz=['ave_ssh', 'Temp', 'Salt'], + allbounds={'ave_ssh': [-1.8, 1.3], 'Temp': [-1.8, 34.0], 'Salt': [30, 38]}, - colormap = 'jet', - comout = os.path.join(comout, 'vrfy', 'ana')) + colormap='jet', + comout=os.path.join(comout, 'vrfy', 'ana')) OcnAnaPlotter = StatePlotter(config) OcnAnaPlotter.plot() @@ -131,14 +131,14 @@ ####################################### data_file = os.path.join(com_ocean_history, f'{RUN}.t{gcyc}z.ocnf006.nc') -config = plot_config(grid_file = grid_file, - data_file = data_file, - variables_horiz = ['ave_ssh', 'Temp', 'Salt'], - allbounds = {'ave_ssh': [-1.8, 1.3], +config = plot_config(grid_file=grid_file, + data_file=data_file, + variables_horiz=['ave_ssh', 'Temp', 'Salt'], + allbounds={'ave_ssh': [-1.8, 1.3], 'Temp': [-1.8, 34.0], 'Salt': [30, 38]}, - colormap = 'jet', - comout = os.path.join(comout, 'vrfy', 'bkg')) + colormap='jet', + comout=os.path.join(comout, 'vrfy', 'bkg')) OcnBkgPlotter = StatePlotter(config) OcnBkgPlotter.plot() @@ -147,16 +147,16 @@ ####################################### data_file = os.path.join(comout, f'{RUN}.t'+cyc+'z.ocn.bkgerr_stddev.nc') -config = plot_config(grid_file = grid_file, - data_file = data_file, - lats = np.arange(-60, 60, 10), - variables_zonal = ['Temp', 'Salt'], - variables_horiz = ['Temp', 'Salt', 'ave_ssh'], - allbounds = {'Temp': [0, 2], +config = plot_config(grid_file=grid_file, + data_file=data_file, + lats=np.arange(-60, 60, 10), + variables_zonal=['Temp', 'Salt'], + variables_horiz=['Temp', 'Salt', 'ave_ssh'], + allbounds={'Temp': [0, 2], 'Salt': [0, 0.2], 'ave_ssh': [0, 0.1]}, - colormap = 'jet', - comout = os.path.join(comout, 'vrfy', 'bkgerr')) + colormap='jet', + comout=os.path.join(comout, 'vrfy', 'bkgerr')) BkgErrPlotter = StatePlotter(config) BkgErrPlotter.plot() diff --git a/ush/soca/soca_vrfy.py b/ush/soca/soca_vrfy.py index 5e8c9d492..90f17477a 100755 --- a/ush/soca/soca_vrfy.py +++ b/ush/soca/soca_vrfy.py @@ -23,10 +23,10 @@ def plot_config(grid_file=[], bounds=[], colormap=[], max_depth=np.nan, - max_depths = [700.0, 5000.0], + max_depths=[700.0, 5000.0], comout=[], - variables_horiz = [], - variables_zonal = [], + variables_horiz=[], + variables_zonal=[], lat=np.nan, lats=np.arange(-60, 60, 10), proj='set me', @@ -36,22 +36,22 @@ def plot_config(grid_file=[], Prepares the configuration for the plotting functions below """ config = {} - config['comout'] = comout # output directory + config['comout'] = comout # output directory config['grid file'] = grid_file config['fields file'] = data_file config['levels'] = [1] config['colormap'] = colormap config['all bounds'] = allbounds config['bounds'] = bounds - config['lats'] = lats # all the lats to plot + config['lats'] = lats # all the lats to plot config['lat'] = lat # the lat being currently plotted - config['max depths'] = max_depths # all the max depths to plot - config['max depth'] = max_depth # the max depth currently plotted - config['horiz variables'] = variables_horiz # all the vars for horiz plots - config['zonal variables'] = variables_zonal # all the vars for zonal plots - config['variable'] = variable # the variable currently plotted - config['projs'] = projs # all the projections etc. - config['proj'] = proj + config['max depths'] = max_depths # all the max depths to plot + config['max depth'] = max_depth # the max depth currently plotted + config['horiz variables'] = variables_horiz # all the vars for horiz plots + config['zonal variables'] = variables_zonal # all the vars for zonal plots + config['variable'] = variable # the variable currently plotted + config['projs'] = projs # all the projections etc. + config['proj'] = proj return config @@ -130,7 +130,7 @@ def __init__(self, config_dict): def plot(self): # Loop over variables, slices (horiz and vertical) and projections ... and whatever else is needed - + ####################################### # zonal slices