def _draw_subregion_diagram(evaluation, plot_config): """""" lats = plot_config['lats'] if type(lats) != type(list): lats = np.arange(lats['range_min'], lats['range_max'], lats['range_step']) lons = plot_config['lons'] if type(lons) != type(list): lons = np.arange(lons['range_min'], lons['range_max'], lons['range_step']) plots.draw_subregions(evaluation.subregions, lats, lons, plot_config['output_name'], **plot_config.get('optional_args', {}))
gridLonStep = 0.5 gridLatStep = 0.5 #Regrid print("... regrid") new_lats = np.arange(LAT_MIN, LAT_MAX, gridLatStep) new_lons = np.arange(LON_MIN, LON_MAX, gridLonStep) list_of_regions = [ Bounds(-10.0, 0.0, 29.0, 36.5, START_SUB, END_SUB), Bounds(0.0, 10.0, 29.0, 37.5, START_SUB, END_SUB), Bounds(10.0, 20.0, 25.0, 32.5, START_SUB, END_SUB), Bounds(20.0, 33.0, 25.0, 32.5, START_SUB, END_SUB), Bounds(-19.3, -10.2, 12.0, 20.0, START_SUB, END_SUB), Bounds(15.0, 30.0, 15.0, 25.0, START_SUB, END_SUB), Bounds(-10.0, 10.0, 7.3, 15.0, START_SUB, END_SUB), Bounds(-10.9, 10.0, 5.0, 7.3, START_SUB, END_SUB), Bounds(33.9, 40.0, 6.9, 15.0, START_SUB, END_SUB), Bounds(10.0, 25.0, 0.0, 10.0, START_SUB, END_SUB), Bounds(10.0, 25.0, -10.0, 0.0, START_SUB, END_SUB), Bounds(30.0, 40.0, -15.0, 0.0, START_SUB, END_SUB), Bounds(33.0, 40.0, 25.0, 35.0, START_SUB, END_SUB) ] #for plotting the subregions plotter.draw_subregions(list_of_regions, new_lats, new_lons, OUTPUT_PLOT, fmt='png')
#regridding parameters gridLonStep=0.5 gridLatStep=0.5 #Regrid print("... regrid") new_lats = np.arange(LAT_MIN, LAT_MAX, gridLatStep) new_lons = np.arange(LON_MIN, LON_MAX, gridLonStep) list_of_regions = [ Bounds(-10.0, 0.0, 29.0, 36.5, START_SUB, END_SUB), Bounds(0.0, 10.0, 29.0, 37.5, START_SUB, END_SUB), Bounds(10.0, 20.0, 25.0, 32.5, START_SUB, END_SUB), Bounds(20.0, 33.0, 25.0, 32.5, START_SUB, END_SUB), Bounds(-19.3,-10.2,12.0, 20.0, START_SUB, END_SUB), Bounds( 15.0, 30.0, 15.0, 25.0,START_SUB, END_SUB), Bounds(-10.0, 10.0, 7.3, 15.0, START_SUB, END_SUB), Bounds(-10.9, 10.0, 5.0, 7.3, START_SUB, END_SUB), Bounds(33.9, 40.0, 6.9, 15.0, START_SUB, END_SUB), Bounds(10.0, 25.0, 0.0, 10.0, START_SUB, END_SUB), Bounds(10.0, 25.0,-10.0, 0.0, START_SUB, END_SUB), Bounds(30.0, 40.0,-15.0, 0.0, START_SUB, END_SUB), Bounds(33.0, 40.0, 25.0, 35.0, START_SUB, END_SUB)] #for plotting the subregions plotter.draw_subregions(list_of_regions, new_lats, new_lons, OUTPUT_PLOT, fmt='png')