Skip to content
Snippets Groups Projects

Resolve "Run snow annual map refactoring"

Merged Aurore Dupuis requested to merge 54-run-snow-annual-map-refactoring into develop
2 files
+ 21
22
Compare changes
  • Side-by-side
  • Inline
Files
2
  • 532093fe
    #54 - Fix build_snow_annual_map_json.py · 532093fe
    Aurore Dupuis authored
@@ -50,22 +50,21 @@ def main():
the snow_annual_map (DD/MM/YYYY) (mandatory)")
parser.add_argument("date_stop", help="Stop of the date range for which we want to generate \
the snow_annual_map (DD/MM/YYYY) (mandatory)")
parser.add_argument("log", help="Log output and error to files (std***.log). (optional, default is True)")
parser.add_argument("log_stdout", help="Log output (std***.log). (optional, default is path_out/log_stdout.log)")
parser.add_argument("log_stderr", help="Log error (std***.log). (optional, default is path_out/log_sterr.log)")
parser.add_argument("mode", help="The processing mode to use, RUNTIME to obtain only output products faster, \
DEBUG to obtain all intermediate files (optional, default is RUNTIME)")
parser.add_argument("path_tmp", help="Path where to store temporary files, (optional, default is path_out/tmp)")
parser.add_argument("date_margin", help="The margin outside the date range to use for better interpolation results \
parser.add_argument("--disable_log", help="Disable logging", action="store_true")
parser.add_argument("--log_stdout", help="Log output (std***.log). (optional, default is path_out/log_stdout.log)")
parser.add_argument("--log_stderr", help="Log error (std***.log). (optional, default is path_out/log_sterr.log)")
parser.add_argument("--debug", help="Enable debug mode", action="store_true")
parser.add_argument("--path_tmp", help="Path where to store temporary files, (optional, default is path_out/tmp)")
parser.add_argument("--date_margin", help="The margin outside the date range to use for better interpolation results \
(in days) (optional)")
parser.add_argument("use_densification", help="Activate the densification using snow products from \
heterogeneous sensors (optional, default is False)")
parser.add_argument("densification_products_list", help="The densification list, containing the paths to \
parser.add_argument("--use_densification", help="Activate the densification using snow products from \
heterogeneous sensors", action="store_false")
parser.add_argument("--densification_products_list", help="The densification list, containing the paths to \
heterogenous snow products from heterogeneous sensors \
(optional)")
parser.add_argument("ram", help="Maximum number of RAM memory used by the program. (optional)")
parser.add_argument("nb_threads", help="Maximum number of threads use by the program. (optional)")
parser.add_argument("output_dates_filename", help="Output dates list. (optional)")
parser.add_argument("--ram", help="Maximum number of RAM memory used by the program. (optional)")
parser.add_argument("--nb_threads", help="Maximum number of threads use by the program. (optional)")
parser.add_argument("--output_dates_filename", help="Output dates list. (optional)")
args = parser.parse_args()
@@ -104,20 +103,20 @@ def main():
os.makedirs(path_out)
# overwrite template default values
if args.log is not None:
jsonData["log"] = args.log
if args.disable_log is not None:
jsonData["log"] = False
if args.log_stdout is not None:
jsonData["log_stdout"] = args.log_stdout
if args.log_stderr is not None:
jsonData["log_stderr"] = args.log_stderr
if args.mode is not None:
jsonData["mode"] = args.mode
if args.debug is not None:
jsonData["mode"] = "DEBUG"
if args.path_tmp is not None:
jsonData["path_tmp"] = args.path_tmp
if args.date_margin is not None:
jsonData["date_margin"] = args.date_margin
if args.use_densification is not None:
jsonData["use_densification"] = args.use_densification
jsonData["use_densification"] = True
if args.densification_products_list is not None:
jsonData["densification_products_list"] = args.densification_products_list
if args.ram is not None:
Loading