#WIP BUILDING Go to buildscripts and run .bat (Windows-based) or .sh (Unix-based). Requires a python 3 version.
Install Pyinstaller
```pip install pyinstaller```
Note: Some python builds are case sensitive and in those cases might be necessary to write:
```pip install PyInstaller```
Go to the root of the project. Every single dependency needs to be installed. To do that do:
pip install -r python/requirements.txt
To compile:
pyinstaller --onefile python/art.py
The compiled exe will be on the dist
folder.
All parameters values that have text should be surrounded with quotes.
****mainPath: "/ekman1raid/MARPOCS_LasPalmas/"
All paths to folders should end on a dash. mainPath: "/ekman1raid/MARPOCS_LasPalmas/"
mainPath
- MANDATORY - path to the main project, needs to exist.operationalMode
- if set to1
it sets ART mode to run as an operational model, it uses the current day on the machine andrefDaytoStart
to calculate thestartDate
and usesdaysPerRun
andnumberOfRuns
to calculateendDate
. If set to0
or non existent it defaults to a single run (usingstartDate
andendDate
parameters instead of calulating them).runPreProcessing
- if set to1
it will run all programs defined in thepreProcessing
block. If set to0
or non existent it will default to not running them.daysPerRun
refDaytoStart
- reference day relative to current day on the machine. It sets thestartDate
for operationalMode.numberOfRuns
module
- defines which program ART is going to use to calculate the model. Allowed values:mohid
,ww3
,wrf
.runSimulation
- if set to1
it will run the program specified in themodule
parameter. If set to0
or non existent it will default to not running it.runSimulation
- if set to1
it will run all programs defined in thepostProcessing
block. If set to0
or non existent it will default to not running them.startDate
- start date to calculcate model in a non-operational run, ignored ifoperationalMode
is set.endDate
- end date to calculcate model in a non-operational run, ignored ifoperationalMode
is set.outputToFile
- if set to1
it will redirect the output of the console (ART) to a file specified byoutputFilePath
parameter. If0
or non existent it will only output to the console where it is running.bhoutputFilePath
- specifies the file path for which ART will output. If non existent andoutputFile
is set to1
it will default to the path where ART is running.sendEmail
- if set to 1 it will enable sending emails upon the completion of MOHID runs. If 0 it disables that option.email
- list of strings that specify the address(es) of the person the email is sent to. IfsendEmail
is set to 1, it has to exist, and it has to be non-empty.
-
maxTime
- maximum time allowed for MOHID to run, if non existent it will default to40000
. -
exePath
- MANDATORY - specifies the path to where the MOHID execution file is.outputToFile
- if set to1
it will redirect the output of MOHID to a file specified byoutputFilePath
parameter. If0
or non existent it will only output to the console where it is running.outputFilePath
- specifies the file path for which MOHID will output. If non existent andoutputFile
is set to1
it will default to the path where MOHID is running.enable
- if set to1
it will enable MPI on current run. If0
or non existent it will default to ignore all thempi
blockexePath
- MANDATORY IFenable
- specifies the path to where the MOHID execution file is.totalProcessors
- number of total processors cores that mpi will use
name
path
- path relative to mainPathdt
storagePath
resultsList
- defined as a list['Hydrodynamic_surface', 'WaterProperties']
. When used makes so that the Backup of the results is only made if the file name is in the list. If this parameter is not present the behavior will default to backup all files.hasSolutionFromFile
enable
path
dateFormat
-
enable
-
fileType
- file type of the obc file (usually hdf5 or netcdf). When not defined it defaults tohdf5
. -
simulatedDays
-
subFolders
- if set to1
it searches it assumes that OBC workpath is structured with subfolders foryear
if set to2
it has subfoldersmonth
andyear
and if set to3
it hasyear
,month
, andday
. If0
or non defined it defaults to assuming no structure inside OBC workpath. -
dateInFileName
- if set to1
assumes date is in the files' names (usesdateFormat
). If0
or non defined it defaults to not having date on the obc files. -
dateFormat
- determines the date format for the obc files' names. If not defined it defaults toYYYYMMDD
-
files
- list of files you want from the OBC workpath['Hydrodynamic', 'WaterProperties']
it can be costumized with date variables%Yi, %Mi, %di
for initial year, initial month and initial day and also%Yf, %Mf, %df
for final year, final month and final day.Example:
['Hydrodynamic_%Yi-%Mi-%di']
will becomeHydrodynamic_2019-09-12
. -
workPath
-
enable
uniqueId
name
simulatedDays
fileNameFromModel
workPath
dateFormat
fileType
Arguments used here will be put or changed in the model.dat of its domain.
MAXDT
GMTREFERENCE
DT_PREDICTION_INTERVAL
name of block
- must be unique within the preprocessing block-
run
-
workingDirectory
- sets the workingDirectory of the Pre Processing tool the one desired. -
datDateChange
- if the .dat of the script needs to change it START and END set this parameter to1
and defineconfigFilePath
. -
configFilePath
- path to where the .dat file is. Only necessary whendatDateChange
is enabled. -
exePath
- mandatory - path to the executable that you want to run before the simutaltion -
flags
- any flags or arguments you must give in the command line to the executableex.
ls -l -a /samba/lusitania
→ flags: "-l -a /samba/lusitania" -
outputToFile
-
outputFilePath
-
name of block
- must be unique within the preprocessing block-
run
-
workingDirectory
- sets the workingDirectory of the postProcessing tool the one desired. -
datDateChange
- if the .dat of the script needs to change it START and END set this parameter to1
and defineconfigFilePath
. -
configFilePath
- path to where the .dat file is. Only necessary whendatDateChange
is enabled. -
exePath
- mandatory - path to the executable that you want to run after the simutaltion. Can also be used to run a shell command such asls
. If you want to run a script such asflags
parameter.- Example:
exePath
:python3
;flags
:/pathToScript/script.py
- Example:
-
flags
- any flags or arguments you must give in the command line to the executableex.
ls -l -a /samba/lusitania
→ flags: "-l -a /samba/lusitania" -
outputToFile
-
outputFilePath
-
ROOT
ROOT_SRT
SURF_DAT
SURF_HDF
DOMAIN
WQDATA
- MOHIDWater
IN_BATIM
AIRW_DAT
AIRW_HDF
AIRW_FIN
AIRW_INI
BOT_DAT
BOT_HDF
BOT_FIN
BOT_INI
IN_DAD3D
OUT_DESF
OUT_FIN
IN_CNDI
IN_TURB
TURB_HDF
DISPQUAL
EUL_HDF
EUL_FIN
EUL_INI
PARTIC_DATA
PARTIC_HDF
PARTIC_FIN
PARTIC_INI
FREE_DAT
DISCHARG
BENTHOS_DATA
ASSIMILA_DAT
ASSIMILA_HDF
TURBO_GOTM
TURBO_FIN
TURBO_INI
- MOHIDLand
IN_BASIN
BASIN_DATA
BASIN_HDF
BASIN_FIN
BASIN_INI
BASIN_GEOMETRY
DRAINAGE_NETWORK
DRAINAGE_NETWORK_HDF
DRAINAGE_NETWORK_FIN
DRAINAGE_NETWORK_INI
POROUS_DATA
POROUS_HDF
POROUS_FIN
POROUS_INI
POROUS_ASC
RUNOFF_DATA
RUNOFF_HDF
RUNOFF_FIN
RUNOFF_INI
VEGETATION_DATA
VEGETATION_HDF
VEGETATION_FIN
VEGETATION_INI
RUNOFF_PROP_DATA
RUNOFF_PROP_HDF
RUNOFF_PROP_FIN
RUNOFF_PROP_INI
POROUS_PROP_DATA
POROUS_PROP_HDF
POROUS_PROP_FIN
POROUS_PROP_INI
SQ_DATA
DT_LOG