ts_param.reference_data_path = obs_ts ts_param.test_data_path = ts_path ts_param.test_name = casename ts_param.start_yr = "1980" ts_param.end_yr = "2014" streamflow_param = StreamflowParameter() streamflow_param.reference_data_path = obs_ts streamflow_param.test_data_path = ts_path streamflow_param.test_start_yr = "1980" streamflow_param.test_end_yr = "2014" # Streamflow gauge station data range from year 1986 to 1995 streamflow_param.ref_start_yr = "1986" streamflow_param.ref_end_yr = "1995" # runner.sets_to_run = [ "lat_lon", "zonal_mean_xy", "zonal_mean_2d", "polar", "cosp_histogram", "meridional_mean_2d", "enso_diags", "qbo", "area_mean_time_series", "diurnal_cycle", "streamflow", ] runner.run_diags( [param, enso_param, qbo_param, ts_param, dc_param, streamflow_param])
qbo_param = QboParameter() qbo_param.reference_data_path = os.path.join( data_prefix, "obs_for_e3sm_diags/time-series/") qbo_param.test_data_path = os.path.join( data_prefix, "test_model_data_for_acme_diags/time-series/E3SM_v1/") qbo_param.test_name = "e3sm_v1" qbo_param.start_yr = "1990" qbo_param.end_yr = "1999" ts_param = AreaMeanTimeSeriesParameter() ts_param.reference_data_path = os.path.join(data_prefix, "obs_for_e3sm_diags/time-series/") ts_param.test_data_path = os.path.join( data_prefix, "test_model_data_for_acme_diags/time-series/E3SM_v1/") ts_param.test_name = "e3sm_v1" ts_param.start_yr = "1990" ts_param.end_yr = "1999" runner.sets_to_run = [ "lat_lon", "zonal_mean_xy", "zonal_mean_2d", "polar", "cosp_histogram", "meridional_mean_2d", "enso_diags", "qbo", "area_mean_time_series", ] runner.run_diags([param, enso_param, qbo_param, ts_param])
"/global/cfs/cdirs/e3sm/e3sm_diags/obs_for_e3sm_diags/climatology/") param.test_data_path = ( "/global/cfs/cdirs/e3sm/e3sm_diags/test_model_data_for_acme_diags/climatology/" ) # Name of the test model data, used to find the climo files. param.test_name = "20161118.beta0.FC5COSP.ne30_ne30.edison" # An optional, shorter name to be used instead of the test_name. param.short_test_name = "beta0.FC5COSP.ne30" # What plotsets to run the diags on. param.sets = ["lat_lon"] # Name of the folder where the results are stored. # Change `prefix` to use your directory. prefix = "/global/cfs/cdirs/e3sm/www/<your directory>/examples" param.results_dir = os.path.join(prefix, "ex5_model_to_obs") # Below are more optional arguments. # 'mpl' is to create matplotlib plots, 'vcs' is for vcs plots. param.backend = "mpl" # Title of the difference plots. param.diff_title = "Model - Obs." # Save the netcdf files for each of the ref, test, and diff plot. param.save_netcdf = True # For running with multiprocessing. # param.multiprocessing = True # param.num_workers = 32 runner.sets_to_run = ["lat_lon"] runner.run_diags([param])
def run_all_sets(html_prefix, d): param = CoreParameter() param.reference_data_path = d["obs_climo"] param.test_data_path = d["test_climo"] param.test_name = "20161118.beta0.FC5COSP.ne30_ne30.edison" param.seasons = [ "ANN", "JJA", ] # Default setting: seasons = ["ANN", "DJF", "MAM", "JJA", "SON"] param.results_dir = os.path.join(html_prefix, "v2_3_0_all_sets") param.multiprocessing = True param.num_workers = 30 # Set specific parameters for new sets enso_param = EnsoDiagsParameter() enso_param.reference_data_path = d["obs_ts"] enso_param.test_data_path = d["test_ts"] enso_param.test_name = "e3sm_v1" enso_param.start_yr = "1990" enso_param.end_yr = "1999" qbo_param = QboParameter() qbo_param.reference_data_path = d["obs_ts"] qbo_param.test_data_path = d["test_ts"] qbo_param.test_name = "e3sm_v1" qbo_param.start_yr = "1990" qbo_param.end_yr = "1999" ts_param = AreaMeanTimeSeriesParameter() ts_param.reference_data_path = d["obs_ts"] ts_param.test_data_path = d["test_ts"] ts_param.test_name = "e3sm_v1" ts_param.start_yr = "1990" ts_param.end_yr = "1999" dc_param = DiurnalCycleParameter() dc_param.reference_data_path = d["dc_obs_climo"] dc_param.test_data_path = d["dc_test_climo"] dc_param.test_name = "20180215.DECKv1b_H1.ne30_oEC.edison" dc_param.short_test_name = "DECKv1b_H1.ne30_oEC" # Plotting diurnal cycle amplitude on different scales. Default is True dc_param.normalize_test_amp = False streamflow_param = StreamflowParameter() streamflow_param.reference_data_path = d["streamflow_obs_ts"] streamflow_param.test_data_path = d["streamflow_test_ts"] streamflow_param.test_name = "20180215.DECKv1b_H1.ne30_oEC.edison" streamflow_param.test_start_yr = "1980" streamflow_param.test_end_yr = "2014" # Streamflow gauge station data range from year 1986 to 1995 streamflow_param.ref_start_yr = "1986" streamflow_param.ref_end_yr = "1995" runner.sets_to_run = [ "lat_lon", "zonal_mean_xy", "zonal_mean_2d", "polar", "cosp_histogram", "meridional_mean_2d", "enso_diags", "qbo", "area_mean_time_series", "diurnal_cycle", "streamflow", ] runner.run_diags( [param, enso_param, qbo_param, ts_param, dc_param, streamflow_param] ) return param.results_dir
from e3sm_diags.parameter.zonal_mean_2d_parameter import ZonalMean2dParameter from e3sm_diags.run import runner param = CoreParameter() param.reference_data_path = ( "/global/cfs/cdirs/e3sm/e3sm_diags/obs_for_e3sm_diags/climatology/" ) param.test_data_path = ( "/global/cfs/cdirs/e3sm/e3sm_diags/test_model_data_for_acme_diags/climatology/" ) param.test_name = "20161118.beta0.FC5COSP.ne30_ne30.edison" param.seasons = ["ANN"] # Name of the folder where the results are stored. # Change `prefix` to use your directory. prefix = "/global/cfs/cdirs/e3sm/www/<your directory>/examples" param.results_dir = os.path.join(prefix, "ex6_zonal_mean_2d_and_lat_lon_demo") # Uncomment the two lines below to just # run the diags with T and PRECT. # param.selectors += ['variables'] # param.variables = ['T', 'PRECT'] # The new changes are below. zonal_mean_2d_param = ZonalMean2dParameter() zonal_mean_2d_param.plevs = [10.0, 20.0, 30.0] runner.sets_to_run = ["zonal_mean_2d", "lat_lon"] runner.run_diags([param, zonal_mean_2d_param])