Skip to content

Commit

Permalink
Minor fix to paths for loading MDC files
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanDavies19 committed Dec 11, 2024
1 parent 4dce27f commit 64ff604
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions moorpy/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ def __init__(self, file="", dirname="", rootname="", depth=0, rho=1025, g=9.81,
if self.qs==0: # if the mooring system is desired to be used as a portrayal of MoorDyn data
# Load main mooring file
if Fortran:
self.loadData(dirname, rootname, sep='.MD.')
self.loadData(dirname, rootname, sep='.MD')
else:
self.loadData(dirname, rootname, sep='_')
self.loadData(dirname, rootname, sep='')

if len(file)==0 or len(rootname)==0:
raise ValueError("The MoorDyn input file name and the root name of the MoorDyn output files (e.g. the .fst file name without extension) need to be given.")
Expand Down Expand Up @@ -3450,7 +3450,7 @@ def loadData(self, dirname, rootname, sep='.MD.'):
'''

# Temporarily storing all data in main output file in system.data ..... probably will want to change this at some point
if path.exists(dirname+rootname+'.MD.out'):
if path.exists(dirname+rootname+sep+'.out'):

self.data, self.ch, self.channels, self.units = read_mooring_file(dirname+rootname+sep, "out") # remember number starts on 1 rather than 0

Expand Down

0 comments on commit 64ff604

Please sign in to comment.