|
RHESSysCalibrator
2.1.0
|
Class for setting up, and storing modeling session and run information in a sqlite-base DB. More...
Public Member Functions | |
| def | migrateDbToCurrentVersion (cls, db_path) |
| DO NOT CALL THIS FUNCTION UNLESS YOU KNOW WHAT YOU ARE DOING. More... | |
| def | getDbVersion (cls, db_path) |
| def | __init__ (self, db_path) |
| Initialize the DB. More... | |
| def | __del__ (self) |
| def | close (self) |
| def | getMostRecentSessionID (self) |
| Returns the ID of the session most recently inserted by the given instance of ModelRunnerDB. More... | |
| def | insertSession (self, user, project, notes, iterations, processes, basedir, cmd_proto) |
| Creates a new session with a starttime of the current time, and a status of 'submitted'. More... | |
| def | updateSessionEndtime (self, id, endtime, status) |
| Updates the end time and the status of the given session. More... | |
| def | getMostRecentRunID (self, session_id) |
| Returns the ID of the run most recently inserted by the given instance of ModelRunnerDB. More... | |
| def | insertRun (self, session_id, worldfile, param_s1, param_s2, param_s3, param_sv1, param_sv2, param_gw1, param_gw2, param_vgsen1, param_vgsen2, param_vgsen3, param_svalt1, param_svalt2, cmd_raw, output_path, job_id) |
| Creates a new run with a starttime of the current time, and a status of 'PEND'. More... | |
| def | updateRunEndtime (self, id, endtime, status) |
| Updates the end time and the status of the given run. More... | |
| def | getRunStatus (self, id) |
| Gets the status of the given run. More... | |
| def | updateRunStatus |
| Updates the status of the given run. More... | |
| def | updateRunJobId (self, id, job_id) |
| Updates the job_id of the given run. More... | |
| def | insertPostProcess |
| Creates post process entry for a particular session. More... | |
| def | insertRunFitnessResults |
| Set fitness results of a model run for a particular post process entry. More... | |
| def | getRun (self, run_id) |
| Get the run with the supplied ID. More... | |
| def | getRunsInSession |
| Get all runs associated with a session. More... | |
| def | getRunInSession (self, session_id, job_id) |
| Get all runs associated with a session. More... | |
| def | getSession (self, session_id) |
| Get the session with the supplied ID. More... | |
| def | getSessions (self) |
| Get all sessions in the DB. More... | |
| def | getPostProcessForSession (self, session_id) |
| Get the post process entries associated with a session. More... | |
| def | getPostProcess (self, postprocess_id) |
| Get the post process entries associated with a session. More... | |
| def | getRunFitnessForPostProcess (self, postprocess_id) |
| Get the run fitness entries associated with a post process entry. More... | |
| def | getRunsInPostProcess |
| Get all runs, and their runfitness data, associated with post process entry. More... | |
| def | exportRunsAndFitnessInPostProcess |
| Write all runs, and their runfitness data, associated with post process entry to a file-like object in CSV format. More... | |
| def | migrateDbToCurrentVersion (cls, db_path) |
| DO NOT CALL THIS FUNCTION UNLESS YOU KNOW WHAT YOU ARE DOING. More... | |
| def | getDbVersion (cls, db_path) |
| def | __init__ (self, db_path) |
| Initialize the DB. More... | |
| def | __del__ (self) |
| def | close (self) |
| def | getMostRecentSessionID (self) |
| Returns the ID of the session most recently inserted by the given instance of ModelRunnerDB. More... | |
| def | insertSession (self, user, project, notes, iterations, processes, basedir, cmd_proto) |
| Creates a new session with a starttime of the current time, and a status of 'submitted'. More... | |
| def | updateSessionEndtime (self, id, endtime, status) |
| Updates the end time and the status of the given session. More... | |
| def | getMostRecentRunID (self, session_id) |
| Returns the ID of the run most recently inserted by the given instance of ModelRunnerDB. More... | |
| def | insertRun (self, session_id, worldfile, param_s1, param_s2, param_s3, param_sv1, param_sv2, param_gw1, param_gw2, param_vgsen1, param_vgsen2, param_vgsen3, param_svalt1, param_svalt2, cmd_raw, output_path, job_id) |
| Creates a new run with a starttime of the current time, and a status of 'PEND'. More... | |
| def | updateRunEndtime (self, id, endtime, status) |
| Updates the end time and the status of the given run. More... | |
| def | getRunStatus (self, id) |
| Gets the status of the given run. More... | |
| def | updateRunStatus |
| Updates the status of the given run. More... | |
| def | updateRunJobId (self, id, job_id) |
| Updates the job_id of the given run. More... | |
| def | insertPostProcess |
| Creates post process entry for a particular session. More... | |
| def | insertRunFitnessResults |
| Set fitness results of a model run for a particular post process entry. More... | |
| def | getRun (self, run_id) |
| Get the run with the supplied ID. More... | |
| def | getRunsInSession |
| Get all runs associated with a session. More... | |
| def | getRunInSession (self, session_id, job_id) |
| Get all runs associated with a session. More... | |
| def | getSession (self, session_id) |
| Get the session with the supplied ID. More... | |
| def | getSessions (self) |
| Get all sessions in the DB. More... | |
| def | getPostProcessForSession (self, session_id) |
| Get the post process entries associated with a session. More... | |
| def | getPostProcess (self, postprocess_id) |
| Get the post process entries associated with a session. More... | |
| def | getRunFitnessForPostProcess (self, postprocess_id) |
| Get the run fitness entries associated with a post process entry. More... | |
| def | getRunsInPostProcess |
| Get all runs, and their runfitness data, associated with post process entry. More... | |
| def | exportRunsAndFitnessInPostProcess |
| Write all runs, and their runfitness data, associated with post process entry to a file-like object in CSV format. More... | |
| def | migrateDbToCurrentVersion (cls, db_path) |
| DO NOT CALL THIS FUNCTION UNLESS YOU KNOW WHAT YOU ARE DOING. More... | |
| def | getDbVersion (cls, db_path) |
| def | __init__ (self, db_path) |
| Initialize the DB. More... | |
| def | __del__ (self) |
| def | close (self) |
| def | getMostRecentSessionID (self) |
| Returns the ID of the session most recently inserted by the given instance of ModelRunnerDB. More... | |
| def | insertSession (self, user, project, notes, iterations, processes, basedir, cmd_proto) |
| Creates a new session with a starttime of the current time, and a status of 'submitted'. More... | |
| def | updateSessionEndtime (self, id, endtime, status) |
| Updates the end time and the status of the given session. More... | |
| def | getMostRecentRunID (self, session_id) |
| Returns the ID of the run most recently inserted by the given instance of ModelRunnerDB. More... | |
| def | insertRun (self, session_id, worldfile, param_s1, param_s2, param_s3, param_sv1, param_sv2, param_gw1, param_gw2, param_vgsen1, param_vgsen2, param_vgsen3, param_svalt1, param_svalt2, cmd_raw, output_path, job_id) |
| Creates a new run with a starttime of the current time, and a status of 'PEND'. More... | |
| def | updateRunEndtime (self, id, endtime, status) |
| Updates the end time and the status of the given run. More... | |
| def | getRunStatus (self, id) |
| Gets the status of the given run. More... | |
| def | updateRunStatus |
| Updates the status of the given run. More... | |
| def | updateRunJobId (self, id, job_id) |
| Updates the job_id of the given run. More... | |
| def | insertPostProcess |
| Creates post process entry for a particular session. More... | |
| def | insertRunFitnessResults |
| Set fitness results of a model run for a particular post process entry. More... | |
| def | getRun (self, run_id) |
| Get the run with the supplied ID. More... | |
| def | getRunsInSession |
| Get all runs associated with a session. More... | |
| def | getRunInSession (self, session_id, job_id) |
| Get all runs associated with a session. More... | |
| def | getSession (self, session_id) |
| Get the session with the supplied ID. More... | |
| def | getSessions (self) |
| Get all sessions in the DB. More... | |
| def | getPostProcessForSession (self, session_id) |
| Get the post process entries associated with a session. More... | |
| def | getPostProcess (self, postprocess_id) |
| Get the post process entries associated with a session. More... | |
| def | getRunFitnessForPostProcess (self, postprocess_id) |
| Get the run fitness entries associated with a post process entry. More... | |
| def | getRunsInPostProcess |
| Get all runs, and their runfitness data, associated with post process entry. More... | |
| def | exportRunsAndFitnessInPostProcess |
| Write all runs, and their runfitness data, associated with post process entry to a file-like object in CSV format. More... | |
Public Attributes | |
| version | |
Static Public Attributes | |
| float | DB_VERSION = 2.0 |
| string | ELEM_SEP = '|' |
Class for setting up, and storing modeling session and run information in a sqlite-base DB.
A model runner DB stores information about modeling sessions. A session is composed of one or more modeling runs. There is a one-to-many relationship between sessions and runs (i.e. a session can be associated with many runs, but a run can only be associated with a single session). Details about calibration run post-processing are stored in the postprocess table.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.__init__ | ( | self, | |
| db_path | |||
| ) |
Initialize the DB.
Will create a connection to the sqlite DB pointed to by db_path
Exception if database needs to be migrated to latest version.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.__del__ | ( | self | ) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.__init__ | ( | self, | |
| db_path | |||
| ) |
Initialize the DB.
Will create a connection to the sqlite DB pointed to by db_path
Exception if database needs to be migrated to latest version.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.__del__ | ( | self | ) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.__init__ | ( | self, | |
| db_path | |||
| ) |
Initialize the DB.
Will create a connection to the sqlite DB pointed to by db_path
Exception if database needs to be migrated to latest version.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.__del__ | ( | self | ) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.close | ( | self | ) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.close | ( | self | ) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.close | ( | self | ) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.exportRunsAndFitnessInPostProcess | ( | self, | |
| postprocess_id, | |||
| outfile, | |||
sep = ', |
|||
header = True |
|||
| ) |
Write all runs, and their runfitness data, associated with post process entry to a file-like object in CSV format.
| postprocess_id | Integer representing the post process entry whose list of runs we want |
| outfile | File-like object to which CSV-formatted output should be written. Note, caller is responsible for closing outfile. |
Exception if no runs for postprocess_id were found
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.exportRunsAndFitnessInPostProcess | ( | self, | |
| postprocess_id, | |||
| outfile, | |||
sep = ', |
|||
header = True |
|||
| ) |
Write all runs, and their runfitness data, associated with post process entry to a file-like object in CSV format.
| postprocess_id | Integer representing the post process entry whose list of runs we want |
| outfile | File-like object to which CSV-formatted output should be written. Note, caller is responsible for closing outfile. |
Exception if no runs for postprocess_id were found
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.exportRunsAndFitnessInPostProcess | ( | self, | |
| postprocess_id, | |||
| outfile, | |||
sep = ', |
|||
header = True |
|||
| ) |
Write all runs, and their runfitness data, associated with post process entry to a file-like object in CSV format.
| postprocess_id | Integer representing the post process entry whose list of runs we want |
| outfile | File-like object to which CSV-formatted output should be written. Note, caller is responsible for closing outfile. |
Exception if no runs for postprocess_id were found
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getDbVersion | ( | cls, | |
| db_path | |||
| ) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getDbVersion | ( | cls, | |
| db_path | |||
| ) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getDbVersion | ( | cls, | |
| db_path | |||
| ) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getMostRecentRunID | ( | self, | |
| session_id | |||
| ) |
Returns the ID of the run most recently inserted by the given instance of ModelRunnerDB.
Note: if another process has active connections to the underlying sqlite database, the run ID returned will not be the same as the the run ID of the last run inserted by a given instance of ModelRunnerDB, as the other processes may have done in insert into the run table after the most recent insert done by a given instance of ModelRunnerDB.
| session_id | Integer representing the session associated with this run |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getMostRecentRunID | ( | self, | |
| session_id | |||
| ) |
Returns the ID of the run most recently inserted by the given instance of ModelRunnerDB.
Note: if another process has active connections to the underlying sqlite database, the run ID returned will not be the same as the the run ID of the last run inserted by a given instance of ModelRunnerDB, as the other processes may have done in insert into the run table after the most recent insert done by a given instance of ModelRunnerDB.
| session_id | Integer representing the session associated with this run |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getMostRecentRunID | ( | self, | |
| session_id | |||
| ) |
Returns the ID of the run most recently inserted by the given instance of ModelRunnerDB.
Note: if another process has active connections to the underlying sqlite database, the run ID returned will not be the same as the the run ID of the last run inserted by a given instance of ModelRunnerDB, as the other processes may have done in insert into the run table after the most recent insert done by a given instance of ModelRunnerDB.
| session_id | Integer representing the session associated with this run |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getMostRecentSessionID | ( | self | ) |
Returns the ID of the session most recently inserted by the given instance of ModelRunnerDB.
Note: if another process has active connections to the underlying sqlite database, the session ID returned will not be the same as the the session ID of the last session inserted by a given instance of ModelRunnerDB, as the other processes may have done in insert into the session table after the most recent insert done by a given instance of ModelRunnerDB.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getMostRecentSessionID | ( | self | ) |
Returns the ID of the session most recently inserted by the given instance of ModelRunnerDB.
Note: if another process has active connections to the underlying sqlite database, the session ID returned will not be the same as the the session ID of the last session inserted by a given instance of ModelRunnerDB, as the other processes may have done in insert into the session table after the most recent insert done by a given instance of ModelRunnerDB.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getMostRecentSessionID | ( | self | ) |
Returns the ID of the session most recently inserted by the given instance of ModelRunnerDB.
Note: if another process has active connections to the underlying sqlite database, the session ID returned will not be the same as the the session ID of the last session inserted by a given instance of ModelRunnerDB, as the other processes may have done in insert into the session table after the most recent insert done by a given instance of ModelRunnerDB.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getPostProcess | ( | self, | |
| postprocess_id | |||
| ) |
Get the post process entries associated with a session.
| postprocess_id | Integer representing The ID of the post process entry |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getPostProcess | ( | self, | |
| postprocess_id | |||
| ) |
Get the post process entries associated with a session.
| postprocess_id | Integer representing The ID of the post process entry |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getPostProcess | ( | self, | |
| postprocess_id | |||
| ) |
Get the post process entries associated with a session.
| postprocess_id | Integer representing The ID of the post process entry |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getPostProcessForSession | ( | self, | |
| session_id | |||
| ) |
Get the post process entries associated with a session.
| session_id | Integer representing the ID of the session whose post process entries are to be fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getPostProcessForSession | ( | self, | |
| session_id | |||
| ) |
Get the post process entries associated with a session.
| session_id | Integer representing the ID of the session whose post process entries are to be fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getPostProcessForSession | ( | self, | |
| session_id | |||
| ) |
Get the post process entries associated with a session.
| session_id | Integer representing the ID of the session whose post process entries are to be fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRun | ( | self, | |
| run_id | |||
| ) |
Get the run with the supplied ID.
| run_id | Integer representing ID of the run to fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRun | ( | self, | |
| run_id | |||
| ) |
Get the run with the supplied ID.
| run_id | Integer representing ID of the run to fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRun | ( | self, | |
| run_id | |||
| ) |
Get the run with the supplied ID.
| run_id | Integer representing ID of the run to fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunFitnessForPostProcess | ( | self, | |
| postprocess_id | |||
| ) |
Get the run fitness entries associated with a post process entry.
| postprocess_id | Integer representing the ID of the post process entry whose run fitness entries are to be fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunFitnessForPostProcess | ( | self, | |
| postprocess_id | |||
| ) |
Get the run fitness entries associated with a post process entry.
| postprocess_id | Integer representing the ID of the post process entry whose run fitness entries are to be fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunFitnessForPostProcess | ( | self, | |
| postprocess_id | |||
| ) |
Get the run fitness entries associated with a post process entry.
| postprocess_id | Integer representing the ID of the post process entry whose run fitness entries are to be fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunInSession | ( | self, | |
| session_id, | |||
| job_id | |||
| ) |
Get all runs associated with a session.
| session_id | Integer representing the session whose list of runs we want |
| job_id | String representing job ID of run to retrieve |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunInSession | ( | self, | |
| session_id, | |||
| job_id | |||
| ) |
Get all runs associated with a session.
| session_id | Integer representing the session whose list of runs we want |
| job_id | String representing job ID of run to retrieve |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunInSession | ( | self, | |
| session_id, | |||
| job_id | |||
| ) |
Get all runs associated with a session.
| session_id | Integer representing the session whose list of runs we want |
| job_id | String representing job ID of run to retrieve |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunsInPostProcess | ( | self, | |
| postprocess_id, | |||
where_clause = None |
|||
| ) |
Get all runs, and their runfitness data, associated with post process entry.
| postprocess_id | Integer representing the post process entry whose list of runs we want |
| where_clause | String representing SQLite3 where clause used to restrict runfitness records returned. |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunsInPostProcess | ( | self, | |
| postprocess_id, | |||
where_clause = None |
|||
| ) |
Get all runs, and their runfitness data, associated with post process entry.
| postprocess_id | Integer representing the post process entry whose list of runs we want |
| where_clause | String representing SQLite3 where clause used to restrict runfitness records returned. |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunsInPostProcess | ( | self, | |
| postprocess_id, | |||
where_clause = None |
|||
| ) |
Get all runs, and their runfitness data, associated with post process entry.
| postprocess_id | Integer representing the post process entry whose list of runs we want |
| where_clause | String representing SQLite3 where clause used to restrict runfitness records returned. |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunsInSession | ( | self, | |
| session_id, | |||
where_clause = None |
|||
| ) |
Get all runs associated with a session.
| session_id | Integer representing the session whose list of runs we want |
| where_clause | String representing SQLite3 where clause used to restrict runs returned. |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunsInSession | ( | self, | |
| session_id, | |||
where_clause = None |
|||
| ) |
Get all runs associated with a session.
| session_id | Integer representing the session whose list of runs we want |
| where_clause | String representing SQLite3 where clause used to restrict runs returned. |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunsInSession | ( | self, | |
| session_id, | |||
where_clause = None |
|||
| ) |
Get all runs associated with a session.
| session_id | Integer representing the session whose list of runs we want |
| where_clause | String representing SQLite3 where clause used to restrict runs returned. |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunStatus | ( | self, | |
| id | |||
| ) |
Gets the status of the given run.
| id | Integer representing the ID of the run to update |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunStatus | ( | self, | |
| id | |||
| ) |
Gets the status of the given run.
| id | Integer representing the ID of the run to update |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getRunStatus | ( | self, | |
| id | |||
| ) |
Gets the status of the given run.
| id | Integer representing the ID of the run to update |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getSession | ( | self, | |
| session_id | |||
| ) |
Get the session with the supplied ID.
| session_id | Integer representing the ID of the session to fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getSession | ( | self, | |
| session_id | |||
| ) |
Get the session with the supplied ID.
| session_id | Integer representing the ID of the session to fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getSession | ( | self, | |
| session_id | |||
| ) |
Get the session with the supplied ID.
| session_id | Integer representing the ID of the session to fetch from the DB |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getSessions | ( | self | ) |
Get all sessions in the DB.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getSessions | ( | self | ) |
Get all sessions in the DB.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.getSessions | ( | self | ) |
Get all sessions in the DB.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertPostProcess | ( | self, | |
| session_id, | |||
| obs_filename, | |||
| fitness_period, | |||
exclude_date_ranges = None, |
|||
obs_runoff_ratio = None, |
|||
options = None |
|||
| ) |
Creates post process entry for a particular session.
| session_id | Integer representing the ID of the session for which to create a post process entry |
| obs_filename | String representing the name of the observation file used to calculate fitness statistics for model runs |
| fitness_period | String indicating time step over which all fitness results were calculated. One of: daily, monthly, yearly |
| exclude_date_ranges | List of tuples of dates representing data to be exluded from fitness calculations |
| obs_runoff_ratio | Float representing runoff / precipitation for observed data |
| options | Dict<String, String> representing user-defined post process options |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertPostProcess | ( | self, | |
| session_id, | |||
| obs_filename, | |||
| fitness_period, | |||
exclude_date_ranges = None, |
|||
obs_runoff_ratio = None, |
|||
options = None |
|||
| ) |
Creates post process entry for a particular session.
| session_id | Integer representing the ID of the session for which to create a post process entry |
| obs_filename | String representing the name of the observation file used to calculate fitness statistics for model runs |
| fitness_period | String indicating time step over which all fitness results were calculated. One of: daily, monthly, yearly |
| exclude_date_ranges | List of tuples of dates representing data to be exluded from fitness calculations |
| obs_runoff_ratio | Float representing runoff / precipitation for observed data |
| options | Dict<String, String> representing user-defined post process options |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertPostProcess | ( | self, | |
| session_id, | |||
| obs_filename, | |||
| fitness_period, | |||
exclude_date_ranges = None, |
|||
obs_runoff_ratio = None, |
|||
options = None |
|||
| ) |
Creates post process entry for a particular session.
| session_id | Integer representing the ID of the session for which to create a post process entry |
| obs_filename | String representing the name of the observation file used to calculate fitness statistics for model runs |
| fitness_period | String indicating time step over which all fitness results were calculated. One of: daily, monthly, yearly |
| exclude_date_ranges | List of tuples of dates representing data to be exluded from fitness calculations |
| obs_runoff_ratio | Float representing runoff / precipitation for observed data |
| options | Dict<String, String> representing user-defined post process options |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertRun | ( | self, | |
| session_id, | |||
| worldfile, | |||
| param_s1, | |||
| param_s2, | |||
| param_s3, | |||
| param_sv1, | |||
| param_sv2, | |||
| param_gw1, | |||
| param_gw2, | |||
| param_vgsen1, | |||
| param_vgsen2, | |||
| param_vgsen3, | |||
| param_svalt1, | |||
| param_svalt2, | |||
| cmd_raw, | |||
| output_path, | |||
| job_id | |||
| ) |
Creates a new run with a starttime of the current time, and a status of 'PEND'.
Note: you must specify as null (None) any of the param_* arguments that are no used in the run.
Arguments:
| session_id | Integer representing session to associate this run with |
| worldfile | String representing name of worldfile associated with this run |
| s1 | Double: decay of hydraulic conductivity with depth (m) |
| s2 | Double: surface hydraulic conductivity (K) |
| s3 | Double: soil depth (OPTIONAL; default=None) |
| sv1 | Double: m to vertical drainage |
| sv2 | Double: K to vertical drainage |
| gw1 | Double: hillslope sat_to_gw_coeff (amount of water moving from saturated to groundwater store) |
| gw2 | Double: hillslope gw_loss_coeff (amount of water moving from groundwater to the stream) |
| vgsen1 | Double: Multiplies specific leaf area (SLA – ratio of leaf area to dry weight) |
| vgsen2 | Double: Multiplies ratio of shaded to sunlit leaf area |
| vgsen3 | Double: changes allocation of net photosynthate based on current LAI (only appl. if using Dickenson C allocation if not using Dickenson, set to 1.0) |
| svalt1 | Double: Multiplies psi air entry pressure |
| svalt2 | Double: Multiplies pore size |
| cmd_raw | String representing the raw command that invoked this run of RHESSys |
| output_path | String representing the dir where results for this run are stored |
| job_id | String representing the job ID associated with this run |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertRun | ( | self, | |
| session_id, | |||
| worldfile, | |||
| param_s1, | |||
| param_s2, | |||
| param_s3, | |||
| param_sv1, | |||
| param_sv2, | |||
| param_gw1, | |||
| param_gw2, | |||
| param_vgsen1, | |||
| param_vgsen2, | |||
| param_vgsen3, | |||
| param_svalt1, | |||
| param_svalt2, | |||
| cmd_raw, | |||
| output_path, | |||
| job_id | |||
| ) |
Creates a new run with a starttime of the current time, and a status of 'PEND'.
Note: you must specify as null (None) any of the param_* arguments that are no used in the run.
Arguments:
| session_id | Integer representing session to associate this run with |
| worldfile | String representing name of worldfile associated with this run |
| s1 | Double: decay of hydraulic conductivity with depth (m) |
| s2 | Double: surface hydraulic conductivity (K) |
| s3 | Double: soil depth (OPTIONAL; default=None) |
| sv1 | Double: m to vertical drainage |
| sv2 | Double: K to vertical drainage |
| gw1 | Double: hillslope sat_to_gw_coeff (amount of water moving from saturated to groundwater store) |
| gw2 | Double: hillslope gw_loss_coeff (amount of water moving from groundwater to the stream) |
| vgsen1 | Double: Multiplies specific leaf area (SLA – ratio of leaf area to dry weight) |
| vgsen2 | Double: Multiplies ratio of shaded to sunlit leaf area |
| vgsen3 | Double: changes allocation of net photosynthate based on current LAI (only appl. if using Dickenson C allocation if not using Dickenson, set to 1.0) |
| svalt1 | Double: Multiplies psi air entry pressure |
| svalt2 | Double: Multiplies pore size |
| cmd_raw | String representing the raw command that invoked this run of RHESSys |
| output_path | String representing the dir where results for this run are stored |
| job_id | String representing the job ID associated with this run |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertRun | ( | self, | |
| session_id, | |||
| worldfile, | |||
| param_s1, | |||
| param_s2, | |||
| param_s3, | |||
| param_sv1, | |||
| param_sv2, | |||
| param_gw1, | |||
| param_gw2, | |||
| param_vgsen1, | |||
| param_vgsen2, | |||
| param_vgsen3, | |||
| param_svalt1, | |||
| param_svalt2, | |||
| cmd_raw, | |||
| output_path, | |||
| job_id | |||
| ) |
Creates a new run with a starttime of the current time, and a status of 'PEND'.
Note: you must specify as null (None) any of the param_* arguments that are no used in the run.
Arguments:
| session_id | Integer representing session to associate this run with |
| worldfile | String representing name of worldfile associated with this run |
| s1 | Double: decay of hydraulic conductivity with depth (m) |
| s2 | Double: surface hydraulic conductivity (K) |
| s3 | Double: soil depth (OPTIONAL; default=None) |
| sv1 | Double: m to vertical drainage |
| sv2 | Double: K to vertical drainage |
| gw1 | Double: hillslope sat_to_gw_coeff (amount of water moving from saturated to groundwater store) |
| gw2 | Double: hillslope gw_loss_coeff (amount of water moving from groundwater to the stream) |
| vgsen1 | Double: Multiplies specific leaf area (SLA – ratio of leaf area to dry weight) |
| vgsen2 | Double: Multiplies ratio of shaded to sunlit leaf area |
| vgsen3 | Double: changes allocation of net photosynthate based on current LAI (only appl. if using Dickenson C allocation if not using Dickenson, set to 1.0) |
| svalt1 | Double: Multiplies psi air entry pressure |
| svalt2 | Double: Multiplies pore size |
| cmd_raw | String representing the raw command that invoked this run of RHESSys |
| output_path | String representing the dir where results for this run are stored |
| job_id | String representing the job ID associated with this run |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertRunFitnessResults | ( | self, | |
| postprocess_id, | |||
| run_id, | |||
nse = None, |
|||
nse_log = None, |
|||
pbias = None, |
|||
rsr = None, |
|||
runoff_ratio = None, |
|||
userfitness = None |
|||
| ) |
Set fitness results of a model run for a particular post process entry.
| postprocess_id | Integer representing The ID of the post process entry |
| run_id | Integer representing The ID of the run whose fitness results are to be update |
| fitness_period | String indicating time step over which all fitness results were calculated. One of: daily, monthly, yearly |
| nse | Double: Nash-Sutcliffe efficiency of streamflow |
| nse_log | Double: Nash-Sutcliffe efficiency log(streamflow) |
| pbias | Double: Percent bias |
| rsr | Double: RMSE / STDEV_obs |
| runoff_ratio | Float representing runoff / precipitation for the model run output |
| userfitness | Dict<String, Float> representing user-defined fitness parameters for the run. |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertRunFitnessResults | ( | self, | |
| postprocess_id, | |||
| run_id, | |||
nse = None, |
|||
nse_log = None, |
|||
pbias = None, |
|||
rsr = None, |
|||
runoff_ratio = None, |
|||
userfitness = None |
|||
| ) |
Set fitness results of a model run for a particular post process entry.
| postprocess_id | Integer representing The ID of the post process entry |
| run_id | Integer representing The ID of the run whose fitness results are to be update |
| fitness_period | String indicating time step over which all fitness results were calculated. One of: daily, monthly, yearly |
| nse | Double: Nash-Sutcliffe efficiency of streamflow |
| nse_log | Double: Nash-Sutcliffe efficiency log(streamflow) |
| pbias | Double: Percent bias |
| rsr | Double: RMSE / STDEV_obs |
| runoff_ratio | Float representing runoff / precipitation for the model run output |
| userfitness | Dict<String, Float> representing user-defined fitness parameters for the run. |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertRunFitnessResults | ( | self, | |
| postprocess_id, | |||
| run_id, | |||
nse = None, |
|||
nse_log = None, |
|||
pbias = None, |
|||
rsr = None, |
|||
runoff_ratio = None, |
|||
userfitness = None |
|||
| ) |
Set fitness results of a model run for a particular post process entry.
| postprocess_id | Integer representing The ID of the post process entry |
| run_id | Integer representing The ID of the run whose fitness results are to be update |
| fitness_period | String indicating time step over which all fitness results were calculated. One of: daily, monthly, yearly |
| nse | Double: Nash-Sutcliffe efficiency of streamflow |
| nse_log | Double: Nash-Sutcliffe efficiency log(streamflow) |
| pbias | Double: Percent bias |
| rsr | Double: RMSE / STDEV_obs |
| runoff_ratio | Float representing runoff / precipitation for the model run output |
| userfitness | Dict<String, Float> representing user-defined fitness parameters for the run. |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertSession | ( | self, | |
| user, | |||
| project, | |||
| notes, | |||
| iterations, | |||
| processes, | |||
| basedir, | |||
| cmd_proto | |||
| ) |
Creates a new session with a starttime of the current time, and a status of 'submitted'.
| user | String representing the username of the user who is submitting jobs |
| project | String representing a short description of the project this modeling session is associated with |
| notes | String representing a description of the calibraton session |
| iterations | Integer representing the number of iterations to calibrate each world file |
| processes | Integer representing the number of simultaneous processes (jobs) to submit |
| basedir | String representing the basedir where run results are stored |
| cmd_proto | String representing the command template for running RHESSys |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertSession | ( | self, | |
| user, | |||
| project, | |||
| notes, | |||
| iterations, | |||
| processes, | |||
| basedir, | |||
| cmd_proto | |||
| ) |
Creates a new session with a starttime of the current time, and a status of 'submitted'.
| user | String representing the username of the user who is submitting jobs |
| project | String representing a short description of the project this modeling session is associated with |
| notes | String representing a description of the calibraton session |
| iterations | Integer representing the number of iterations to calibrate each world file |
| processes | Integer representing the number of simultaneous processes (jobs) to submit |
| basedir | String representing the basedir where run results are stored |
| cmd_proto | String representing the command template for running RHESSys |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.insertSession | ( | self, | |
| user, | |||
| project, | |||
| notes, | |||
| iterations, | |||
| processes, | |||
| basedir, | |||
| cmd_proto | |||
| ) |
Creates a new session with a starttime of the current time, and a status of 'submitted'.
| user | String representing the username of the user who is submitting jobs |
| project | String representing a short description of the project this modeling session is associated with |
| notes | String representing a description of the calibraton session |
| iterations | Integer representing the number of iterations to calibrate each world file |
| processes | Integer representing the number of simultaneous processes (jobs) to submit |
| basedir | String representing the basedir where run results are stored |
| cmd_proto | String representing the command template for running RHESSys |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.migrateDbToCurrentVersion | ( | cls, | |
| db_path | |||
| ) |
DO NOT CALL THIS FUNCTION UNLESS YOU KNOW WHAT YOU ARE DOING.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.migrateDbToCurrentVersion | ( | cls, | |
| db_path | |||
| ) |
DO NOT CALL THIS FUNCTION UNLESS YOU KNOW WHAT YOU ARE DOING.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.migrateDbToCurrentVersion | ( | cls, | |
| db_path | |||
| ) |
DO NOT CALL THIS FUNCTION UNLESS YOU KNOW WHAT YOU ARE DOING.
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateRunEndtime | ( | self, | |
| id, | |||
| endtime, | |||
| status | |||
| ) |
Updates the end time and the status of the given run.
| id | Integer representing the ID of the run to update |
| endtime | datetime representing the end time of the run (in UTC not local time) |
| status | String: one of: PEND, RUN, PUSP, USUSP, SSUSP, DONE, EXIT, UNKWN, WAIT, ZOMBI |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateRunEndtime | ( | self, | |
| id, | |||
| endtime, | |||
| status | |||
| ) |
Updates the end time and the status of the given run.
| id | Integer representing the ID of the run to update |
| endtime | datetime representing the end time of the run (in UTC not local time) |
| status | String: one of: PEND, RUN, PUSP, USUSP, SSUSP, DONE, EXIT, UNKWN, WAIT, ZOMBI |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateRunEndtime | ( | self, | |
| id, | |||
| endtime, | |||
| status | |||
| ) |
Updates the end time and the status of the given run.
| id | Integer representing the ID of the run to update |
| endtime | datetime representing the end time of the run (in UTC not local time) |
| status | String: one of: PEND, RUN, PUSP, USUSP, SSUSP, DONE, EXIT, UNKWN, WAIT, ZOMBI |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateRunJobId | ( | self, | |
| id, | |||
| job_id | |||
| ) |
Updates the job_id of the given run.
| id | Integer representing the ID of the run to update |
| job_id | String representing the job ID of the run |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateRunJobId | ( | self, | |
| id, | |||
| job_id | |||
| ) |
Updates the job_id of the given run.
| id | Integer representing the ID of the run to update |
| job_id | String representing the job ID of the run |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateRunJobId | ( | self, | |
| id, | |||
| job_id | |||
| ) |
Updates the job_id of the given run.
| id | Integer representing the ID of the run to update |
| job_id | String representing the job ID of the run |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateRunStatus | ( | self, | |
| id, | |||
| status, | |||
endtime = None |
|||
| ) |
Updates the status of the given run.
If endtime is not None, will update endtime as well as status
| id | Integer representing the ID of the run to update |
| status | String: one of: PEND, RUN, PUSP, USUSP, SSUSP, DONE, EXIT, UNKWN, WAIT, ZOMBI |
| endtime | datetime representing the end time of the run (in UTC not local time) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateRunStatus | ( | self, | |
| id, | |||
| status, | |||
endtime = None |
|||
| ) |
Updates the status of the given run.
If endtime is not None, will update endtime as well as status
| id | Integer representing the ID of the run to update |
| status | String: one of: PEND, RUN, PUSP, USUSP, SSUSP, DONE, EXIT, UNKWN, WAIT, ZOMBI |
| endtime | datetime representing the end time of the run (in UTC not local time) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateRunStatus | ( | self, | |
| id, | |||
| status, | |||
endtime = None |
|||
| ) |
Updates the status of the given run.
If endtime is not None, will update endtime as well as status
| id | Integer representing the ID of the run to update |
| status | String: one of: PEND, RUN, PUSP, USUSP, SSUSP, DONE, EXIT, UNKWN, WAIT, ZOMBI |
| endtime | datetime representing the end time of the run (in UTC not local time) |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateSessionEndtime | ( | self, | |
| id, | |||
| endtime, | |||
| status | |||
| ) |
Updates the end time and the status of the given session.
| id | Integer representing the ID of the session to update |
| endtime | datetime representing the end time of the session (in UTC not local time) |
| status | String: one of: submitted, complete, aborted |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateSessionEndtime | ( | self, | |
| id, | |||
| endtime, | |||
| status | |||
| ) |
Updates the end time and the status of the given session.
| id | Integer representing the ID of the session to update |
| endtime | datetime representing the end time of the session (in UTC not local time) |
| status | String: one of: submitted, complete, aborted |
| def rhessyscalibrator.model_runner_db2.ModelRunnerDB2.updateSessionEndtime | ( | self, | |
| id, | |||
| endtime, | |||
| status | |||
| ) |
Updates the end time and the status of the given session.
| id | Integer representing the ID of the session to update |
| endtime | datetime representing the end time of the session (in UTC not local time) |
| status | String: one of: submitted, complete, aborted |
|
static |
|
static |
| rhessyscalibrator.model_runner_db2.ModelRunnerDB2.version |
1.8.10