(https://github.com/maretec/ART/tree/v2)
#WIP BUILDING Go to buildscripts folder 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 to1it sets ART mode to run as an operational model, it uses the current day on the machine andrefDaytoStartto calculate thestartDateand usesdaysPerRunandnumberOfRunsto calculateendDate. If set to0or non existent it defaults to a single run (usingstartDateandendDateparameters instead of calulating them).runPreProcessing- if set to1it will run all programs defined in thepreProcessingblock. If set to0or non existent it will default to not running them.daysPerRunrefDaytoStart- reference day relative to current day on the machine. It sets thestartDatefor operationalMode.numberOfRunsmodule- defines which program ART is going to use to calculate the model. Allowed values:mohid,ww3,wrf.runSimulation- if set to1it will run the program specified in themoduleparameter. If set to0or non existent it will default to not running it.runSimulation- if set to1it will run all programs defined in thepostProcessingblock. If set to0or non existent it will default to not running them.startDate- start date to calculcate model in a non-operational run, ignored ifoperationalModeis set.endDate- end date to calculcate model in a non-operational run, ignored ifoperationalModeis set.outputToFile- if set to1it will redirect the output of the console (ART) to a file specified byoutputFilePathparameter. If0or 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 andoutputFileis set to1it 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. IfsendEmailis 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 to1it will redirect the output of MOHID to a file specified byoutputFilePathparameter. If0or 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 andoutputFileis set to1it will default to the path where MOHID is running.-
enable- if set to1it will enable MPI on current run. If0or non existent it will default to ignore all thempiblock -
exePath- MANDATORY IFenable- specifies the path to where the MOHID execution file is. -
totalProcessors- number of total processors cores that mpi will use -
RUN_MOHID_CONSOLIDATION- if set to1will run mohid_domain_composition exe. if set to0permit a bypass to begin next run in less time and copie every files needed to domain_composition.exe run, with external program. Default: 1 -
DOMAIN_CONSOLIDATION_EXE- Name of Domain_composition.exe executable. Default: DomainDecompositionConsolidation.exe
-
namepath- path relative to mainPathdtstoragePathresultsList- 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
enablepathdateFormat
-
enable -
fileType- file type of the obc file (usually hdf5 or netcdf). When not defined it defaults tohdf5. -
simulatedDays -
subFolders- if set to1it searches it assumes that OBC workpath is structured with subfolders foryearif set to2it has subfoldersmonthandyearand if set to3it hasyear,month, andday. If0or non defined it defaults to assuming no structure inside OBC workpath. -
dateInFileName- if set to1assumes date is in the files' names (usesdateFormat). If0or 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, %difor initial year, initial month and initial day and also%Yf, %Mf, %dffor final year, final month and final day.Example:
['Hydrodynamic_%Yi-%Mi-%di']will becomeHydrodynamic_2019-09-12. -
workPath
-
enableuniqueIdnamesimulatedDaysfileNameFromModelworkPathdateFormatfileType
Arguments used here will be put or changed in the model.dat of its domain.
MAXDTGMTREFERENCEDT_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 to1and defineconfigFilePath. -
configFilePath- path to where the .dat file is. Only necessary whendatDateChangeis 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 to1and defineconfigFilePath. -
configFilePath- path to where the .dat file is. Only necessary whendatDateChangeis 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 asflagsparameter.- 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
-
ROOTROOT_SRTSURF_DATSURF_HDFDOMAINWQDATA- MOHIDWater
IN_BATIMAIRW_DATAIRW_HDFAIRW_FINAIRW_INIBOT_DATBOT_HDFBOT_FINBOT_INIIN_DAD3DOUT_DESFOUT_FININ_CNDIIN_TURBTURB_HDFDISPQUALEUL_HDFEUL_FINEUL_INIPARTIC_DATAPARTIC_HDFPARTIC_FINPARTIC_INIFREE_DATDISCHARGBENTHOS_DATAASSIMILA_DATASSIMILA_HDFTURBO_GOTMTURBO_FINTURBO_INI
- MOHIDLand
IN_BASINBASIN_DATABASIN_HDFBASIN_FINBASIN_INIBASIN_GEOMETRYDRAINAGE_NETWORKDRAINAGE_NETWORK_HDFDRAINAGE_NETWORK_FINDRAINAGE_NETWORK_INIPOROUS_DATAPOROUS_HDFPOROUS_FINPOROUS_INIPOROUS_ASCRUNOFF_DATARUNOFF_HDFRUNOFF_FINRUNOFF_INIVEGETATION_DATAVEGETATION_HDFVEGETATION_FINVEGETATION_INIRUNOFF_PROP_DATARUNOFF_PROP_HDFRUNOFF_PROP_FINRUNOFF_PROP_INIPOROUS_PROP_DATAPOROUS_PROP_HDFPOROUS_PROP_FINPOROUS_PROP_INISQ_DATADT_LOG