jameshalgren/wrf_hydro_nwm_public

Create a python document that allows running the code with multiple options

Opened this issue · 0 comments

The current document defines the options available to compute the inland routing in the channel. It will be useful to have another document that allows the user to run multiple options using flags or arguments.

Expected Behavior

In a similar project we have a document that contains all the functions to run the program. There is an additional document that reads as argument the options to run the program. For example we can have a single call:

usage: OWP_inland_routing.py [-h HELP] [-a APPROACH] [-s START_DATE]
[-e END_DATE] [-S SYNTHETIC_HYDROGRAPH_OPTION] [-o] [-d] [-a]
[-w] instance

Current Behavior

Such option is not available at this time

Possible Solution

Create a new python document with argparse.ArgumentParser

parser = argparse.ArgumentParser(description=describe, formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('instance', help='A number between 0 and 2046, selects the gage to process from ref_nwis.nc', type=partial(checkInRange, 0, 2046))

Steps to Reproduce (for bugs)

  1. The program should produce the same response every time we run the the same options
  2. It should facilitate the evaluation of multiple test cases
  3. It should help to detect if there are problems in the code or execution