"""Random climate run with -1 K on the directories made by run_config.py. Same as the '_random_m1' run of run_config.py, without redoing the preprocessing. Usage: .cluster_env/run.sh python claude/flowline_dx/run_extra.py """ from oggm import cfg, utils, workflow, tasks, GlacierDirectory from run_config import HERE, RGI_IDS, Y0, HALFSIZE, NYEARS, SEED cfg.initialize(logging_level='WARNING') cfg.PARAMS['use_multiprocessing'] = False cfg.PARAMS['store_model_geometry'] = True for dx in [1, 2, 4]: for b in [10, 30, 50]: name = f'dx{dx}_b{b}' cfg.PARAMS['flowline_dx'] = dx cfg.PARAMS['elevation_band_flowline_binsize'] = b base = HERE / 'work' / name / 'per_glacier' gdirs = [GlacierDirectory(rid, base_dir=str(base)) for rid in RGI_IDS] workflow.execute_entity_task(tasks.run_random_climate, gdirs, nyears=NYEARS, y0=Y0, halfsize=HALFSIZE, seed=SEED, temperature_bias=-1, output_filesuffix='_random_m1') utils.compile_run_output(gdirs, input_filesuffix='_random_m1', path=str(HERE / 'output' / f'run_random_m1_{name}.nc')) print('done', name)