hydroframe / Subsetting

Subsetting inputs for ParFlow to run in sub-continental watershed
2 stars 3 forks source link

Generate consolidated .py script for running ParFlow subsets #24

Open arezaii opened 3 years ago

arezaii commented 3 years ago

The current output is just a .yaml, .json, and .pfidb file that a user can then use to run ParFlow.

A nice enhancement would be to generate an additional output, a single .py file that contains all the commands to load, validate, distribute, and run the model, so a user would just need to do something like python run_my_subset.py rather than having to instantiate a Run object and run it as follows:

from parflow.tools import Run
sim = Run.from_definition(<path and filename>)
sim.validate(verbose=True)
sim.dist(sim.TopoSlopesX.FileName)
sim.dist(sim.TopoSlopesY.FileName)
sim.run(working_directory=<path>)