offset = 0 # number of years from simulation start periods = [] # not that all periods are handled within one process! # periods += [1] # periods += [3] periods += [5] # periods += [9] # periods += [10] # periods += [15] domains = 2 # domains to be processed # domains = None # process all domains # filetypes = ['srfc','xtrm','plev3d','hydro','lsm'] # filetypes to be processed # ,'rad' filetypes = ['hydro'] # filetypes to be processed grid = 'native' # check and expand WRF experiment list experiments = getExperimentList(experiments, project, 'WRF') if isinstance(domains, (np.integer,int)): domains = [domains] if isinstance(periods, (np.integer,int)): periods = [periods] # shall we do some fancy regridding on-the-fly? if grid == 'native': griddef = None else: griddef = getCommonGrid(grid) # print an announcement print('\n Computing Climatologies for WRF experiments:\n') print([exp.name for exp in experiments]) if grid != 'native': print('\nRegridding to \'{0:s}\' grid.\n'.format(grid)) print('\nOVERWRITE: {0:s}\n'.format(str(loverwrite))) # assemble argument list and do regridding args = [] # list of arguments for workers, i.e. "work packages"
# periods += [1] # periods += [3] # periods += [5] # periods += [9] # periods += [10] periods += [15] # periods += [30] # domains = 2 # domains to be processed domains = None # process all domains # WRF_filetypes = ['srfc','xtrm','plev3d','hydro','lsm','rad'] # filetypes to be processed # ,'rad' WRF_filetypes = ['hydro','xtrm','hydro','lsm','rad'] # WRF_filetypes = ['rad'] # filetypes to be processed grid = 'can1' # use native grid # check and expand WRF experiment list WRF_experiments = getExperimentList(WRF_experiments, WRF_project, 'WRF') if isinstance(domains, (np.integer,int)): domains = [domains] if isinstance(periods, (np.integer,int)): periods = [periods] # shall we do some fancy regridding on-the-fly? if not grid: griddef = None else: griddef = getCommonGrid(grid) # print an announcement print('\n Computing Climatologies for WRF experiments:\n') print([exp.name for exp in WRF_experiments]) if grid: print('\nRegridding to \'{0:s}\' grid.\n'.format(grid)) print('\nOVERWRITE: {0:s}\n'.format(str(loverwrite))) # assemble argument list and do regridding args = [] # list of arguments for workers, i.e. "work packages"
# WRF_experiments += ['max-ctrl','max-ens-A','max-ens-B','max-ens-C',] # WRF_experiments += ['max-ctrl-2050','max-ens-A-2050','max-ens-B-2050','max-ens-C-2050',] # WRF_experiments += ['max-ctrl-2100','max-ens-A-2100','max-ens-B-2100','max-ens-C-2100',] # other WRF parameters domains = 2 # domains to be processed # WRF_filetypes = ('hydro','xtrm','srfc','lsm') # filetypes to be processed WRF_filetypes = ('hydro',) # WRF_filetypes = ('const',); periods = None # station datasets to match stations = dict(EC=('precip',)) # currently there is only one type: the EC weather stations ## process arguments if isinstance(periods, (np.integer,int)): periods = [periods] # check and expand WRF experiment list WRF_experiments = getExperimentList(WRF_experiments, WRF_project, 'WRF') if isinstance(domains, (np.integer,int)): domains = [domains] # check and expand CESM experiment list CESM_experiments = getExperimentList(CESM_experiments, CESM_project, 'CESM') # expand datasets and resolutions if datasets is None: datasets = gridded_datasets # print an announcement if len(WRF_experiments) > 0: print('\n Extracting from WRF Datasets:') print([exp.name for exp in WRF_experiments]) if len(CESM_experiments) > 0: print('\n Extracting from CESM Datasets:') print([exp.name for exp in CESM_experiments]) if len(datasets) > 0: print('\n Extracting from Observational Datasets:')
# grids['arb2'] = ('d01','d02') # WRF standard ARB inner domain # grids['arb3'] = ('d01','d02','d03',) # WRF standard ARB inner domain # grids['arb3'] = ('d03',) # WRF standard ARB inner domain # # grids['ARB_small'] = ('025','05') # small custom geographic grids # # grids['ARB_large'] = ('025','05') # large custom geographic grids # grids['cesm1x1'] = None # CESM 1-deg. grid # grids['NARR'] = None # NARR grid # grids['CRU'] = None # CRU grid # grids['GPCC'] = ('025',) # GPCC LTM grid # grids['PRISM'] = None # larger PRISM grid # grids['PCIC'] = None # 1km PCIC PRISM grid ## process arguments if isinstance(periods, (np.integer, int)): periods = [periods] # check and expand WRF experiment list WRF_experiments = getExperimentList(WRF_experiments, WRF_project, 'WRF') if isinstance(domains, (np.integer, int)): domains = [domains] # check and expand CESM experiment list CESM_experiments = getExperimentList(CESM_experiments, CESM_project, 'CESM') # expand datasets and resolutions if datasets is None: datasets = gridded_datasets if unity_grid is None and 'Unity' in datasets: if WRF_project: unity_grid = import_module( 'projects.{:s}'.format(WRF_project)).unity_grid else: raise DatasetError( "Dataset 'Unity' has no native grid - please set 'unity_grid'." )
# periods += [1] # periods += [3] # periods += [5] # periods += [9] # periods += [10] periods += [15] # periods += [30] # domains = 1 # domains to be processed domains = None # process all domains # WRF_filetypes = ['srfc','xtrm','plev3d','hydro','lsm','rad'] # filetypes to be processed # ,'rad' WRF_filetypes = ['hydro', 'xtrm', 'hydro', 'lsm', 'rad'] # WRF_filetypes = ['srfc'] # filetypes to be processed grid = None # use native grid # check and expand WRF experiment list WRF_experiments = getExperimentList(WRF_experiments, WRF_project, 'WRF') if isinstance(domains, (np.integer, int)): domains = [domains] if isinstance(periods, (np.integer, int)): periods = [periods] # shall we do some fancy regridding on-the-fly? if not grid: griddef = None else: griddef = getCommonGrid(grid) # print an announcement print('\n Computing Climatologies for WRF experiments:\n') print([exp.name for exp in WRF_experiments]) if grid: print('\nRegridding to \'{0:s}\' grid.\n'.format(grid)) print('\nOVERWRITE: {0:s}\n'.format(str(loverwrite))) # assemble argument list and do regridding args = [] # list of arguments for workers, i.e. "work packages"
offset = 0 # number of years from simulation start periods = [] # not that all periods are handled within one process! # periods += [1] # periods += [3] periods += [5] # periods += [9] # periods += [10] # periods += [15] domains = 2 # domains to be processed # domains = None # process all domains # filetypes = ['srfc','xtrm','plev3d','hydro','lsm'] # filetypes to be processed # ,'rad' filetypes = ['hydro'] # filetypes to be processed grid = 'native' # check and expand WRF experiment list experiments = getExperimentList(experiments, project, 'WRF') if isinstance(domains, (np.integer, int)): domains = [domains] if isinstance(periods, (np.integer, int)): periods = [periods] # shall we do some fancy regridding on-the-fly? if grid == 'native': griddef = None else: griddef = getCommonGrid(grid) # print an announcement print('\n Computing Climatologies for WRF experiments:\n') print([exp.name for exp in experiments]) if grid != 'native': print('\nRegridding to \'{0:s}\' grid.\n'.format(grid)) print('\nOVERWRITE: {0:s}\n'.format(str(loverwrite))) # assemble argument list and do regridding