@@ -165,6 +165,7 @@ def compare_dss(
165165def update_hydro_tidefile_with_inp (
166166 hydro_tidefile , input_file , tidefile_path , table_name
167167):
168+ """Patch an input table inside a Hydro HDF5 tidefile from a DSM2 .inp file."""
168169 from . import utils
169170
170171 utils .update_hydro_tidefile_with_inp (
@@ -193,6 +194,7 @@ def update_hydro_tidefile_with_inp(
193194 help = "period type for the data" ,
194195)
195196def create_repeating (datafile , input_file , path , units , period_type = "PER-AVER" ):
197+ """Create a repeating annual time series from a CSV template and write it to a DSS file."""
196198 # Load the input CSV file
197199 df_template_year = pd .read_csv (
198200 input_file , parse_dates = ["datetime" ], index_col = "datetime"
@@ -218,6 +220,7 @@ def create_repeating(datafile, input_file, path, units, period_type="PER-AVER"):
218220 "--end-year" , required = True , type = int , help = "End year for the extended time series"
219221)
220222def extend_repeating (datafile , cpart , end_year ):
223+ """Extend an existing repeating time series in a DSS file forward to a given end year."""
221224 matches = dss .get_matching_ts (datafile , pathname = f"///{ cpart } ///" )
222225 with dss .DSSFile (datafile , create_new = False ) as dh :
223226 for df , u , t in matches :
@@ -236,6 +239,7 @@ def extend_repeating(datafile, cpart, end_year):
236239@click .argument ("dsm2_input_filename" )
237240@click .argument ("file_field_string" )
238241def create_dsm2_input_for_cd (dss_filename , dsm2_input_filename , file_field_string ):
242+ """Generate a DSM2 .inp boundary-condition file for consumptive demand from a DSS file."""
239243 create_cd_inp .create_cd_inp (dss_filename , dsm2_input_filename , file_field_string )
240244
241245
@@ -249,13 +253,15 @@ def repeating():
249253@click .argument ("from_file" , type = click .Path (exists = True ))
250254@click .argument ("to_file" , type = click .Path (exists = False ))
251255def copy_all_dss (from_file , to_file ):
256+ """Copy all pathnames from one DSS file to another."""
252257 dssutils .copy_all (from_file , to_file )
253258
254259
255260@click .command ()
256261@click .argument ("input_file" , type = click .Path (exists = True ))
257262@click .argument ("output_file" , type = click .Path (exists = False ), required = False )
258263def pretty_print_input (input_file , output_file = None ):
264+ """Reformat (pretty-print) a DSM2 .inp echo file. Defaults to <basename>.pretty.inp."""
259265 from pydsm .input import read_input , pretty_print
260266
261267 tables = read_input (input_file )
0 commit comments