diff --git a/examples/all-sky/run-allsky-example.py b/examples/all-sky/run-allsky-example.py index 3d9dcac03..2b7f604a4 100644 --- a/examples/all-sky/run-allsky-example.py +++ b/examples/all-sky/run-allsky-example.py @@ -21,8 +21,6 @@ # In the local directory all_sky_exe_name = os.path.join(all_sky_dir, "rrtmgp_allsky") -input_file = os.path.join(os.environ["RRTMGP_DATA"], "examples", "all-sky", "inputs", "garand-atmos-1.nc") -atmos_file = os.path.join(all_sky_dir, "rrtmgp-allsky.nc") if __name__ == '__main__': parser = argparse.ArgumentParser( @@ -30,28 +28,27 @@ parser.add_argument("--run_command", type=str, default="", help="Prefix ('jsrun' etc.) for running commands. " "Use quote marks to enclose multi-part commands.") - parser.add_argument("--ncol", type=int, default=128, - help="Number of cloudy columns to compute " + parser.add_argument("--ncol", type=int, default=24, + help="Number of columns to compute") + parser.add_argument("--nlay", type=int, default=72, + help="Number of layers " "(every one will have the same clouds)") parser.add_argument("--nloops", type=int, default=1, help="Number of times to compute 'nloops' " "cloudy columns") args = parser.parse_args() - ncol_str = '{0:5d}'.format(args.ncol) + ncol_str = '{0:5d}'.format(args.ncol) + nlay_str = '{0:5d}'.format(args.nlay) nloops_str = '{0:5d}'.format(args.nloops) if args.run_command: print("using the run command") all_sky_exe_name = args.run_command + " " + all_sky_exe_name - os.chdir(all_sky_dir) # Remove cloudy-sky fluxes from the file containing the atmospheric profiles - shutil.copyfile(input_file, atmos_file) subprocess.run( - [all_sky_exe_name, atmos_file, lw_gas_coeffs_file, lw_clouds_coeff_file, - ncol_str, nloops_str]) + [all_sky_exe_name, ncol_str, nlay_str, nloops_str, "rrtmgp-allsky-lw-no-aerosols.nc", lw_gas_coeffs_file, lw_clouds_coeff_file]) subprocess.run( - [all_sky_exe_name, atmos_file, sw_gas_coeffs_file, sw_clouds_coeff_file, - ncol_str, nloops_str]) + [all_sky_exe_name, ncol_str, nlay_str, nloops_str, "rrtmgp-allsky-sw-no-aerosols.nc", sw_gas_coeffs_file, sw_clouds_coeff_file]) # end main