# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: pyRHESSys
#     language: python
#     name: pyrhessys
# ---

import json
import pkg_resources

PARAMETER_PATH = pkg_resources.resource_filename(
        __name__, 'parameter_meta.json')
with open(PARAMETER_PATH, 'r') as f:
    PARAMETER_META = json.load(f)
FILE_PATH = pkg_resources.resource_filename(
        __name__, 'file_name.json')
with open(FILE_PATH, 'r') as f:
    FILE_NAME = json.load(f)

P = PARAMETER_META
F = FILE_NAME

P

rhessys_run_cmd = ''.join(['{} -st {} -ed {}'.format(fman_dir, fman_dir),
                       ' -v {}:{}'.format(settings_path, settings_path),
                       ' -v {}:{}'.format(input_path, input_path),
                       ' -v {}:{} '.format(output_path, output_path),
                       " --entrypoint '/bin/bash' ",
                       self.executable,
                       '  -c "',
                       run_cmd, '"'])

rhessys_run_cmd = ''.join(['{} -st {} -ed {}'.format(P['version'], P['start_date'], P['end_date']),
                           ' -b -newcaprise -capr {} -gwtoriparian - capMax {}'.format(P['capr'], P['capMax']),
                           ' -slowDrain -leafDarkRespScalar {}'.format(P['leafDarkRespScalar']),
                           ' -frootRespScalar {} -leafDarkRespScalar {}'.format(P['frootRespScalar'],P['leafDarkRespScalar']),
                           ' -t tecfiles{} -w worldfiles{} -whdr worldfiles{}'.format(F['tecfiles'],F['worldfiles1'],F['worldfiles2']),
                           ' -r flows{} -rtx {}'.format(F['flows'], P['rtz']),
                           ' -pre output{} -s {} {} {} -sv {} {} -gw {} {}'.format(F['prefix'], P['rtz'], P['s1'], P['s2'], P['s3'], P['sv1'], P['sv2'], P['gw1'], P['gw2'])                          
                          ])

rhessys_run_cmd



# %pylab inline
import pyrhessys

import pyrhessys as rs

r = rs.Simulation("aa", "bb")

r.clim

rs.Simulation.

r.run("local")



StarcoderdataJupyterScriptsDedupFiltered