Personal tools

Difference between revisions of "ART"

From MohidWiki

Jump to: navigation, search
(YAML Keywords)
(mohid)
Line 63: Line 63:
  
 
   === mpi ===
 
   === mpi ===
 
 
     - `enable` - if set to `1` it will enable MPI on current run. If `0` or non existent it will default to ignore all the `mpi` block
 
     - `enable` - if set to `1` it will enable MPI on current run. If `0` or non existent it will default to ignore all the `mpi` block
 
     - `exePath` - MANDATORY IF `enable`- specifies the path to where the MOHID execution file is.
 
     - `exePath` - MANDATORY IF `enable`- specifies the path to where the MOHID execution file is.

Revision as of 11:32, 7 October 2019


About

ART (Automatic Running Tool) is a tool for managing operational models, this tool is programmed in Python and adapted from a previous C++ version. The new python version allows to operate models in windows and linux environemnts. The code can be found at XXXXXXXXXX. A short manual and the description of the keywords can be found below.

Software needed

Create YAML file

To run create_yaml:

1. Run create_yaml.exe

2. Write name of file you want to create and a file called <name>.yaml will be created

3. Specify number of model, postprocessing and preprocessing blocks desired

YAML Keywords

artconfig

- `mainPath` - MANDATORY - path to the main project, needs to exist.

- `operationalMode` - if set to `1` it sets ART mode to run as an operational model, it uses the current day on the machine and `refDaytoStart` to calculate the `startDate` and uses `daysPerRun` and `numberOfRuns` to calculate `endDate`. If set to `0` or non existent it defaults to a single run (using `startDate` and `endDate` parameters instead of calulating them).

- `runPreProcessing` - if set to `1` it will run all programs defined in the `preProcessing` block. If set to `0` or non existent it will default to not running them.

- `daysPerRun`

- `refDaytoStart` - reference day relative to current day on the machine. It sets the `startDate` for operationalMode.

- `numberOfRuns`

- `module` - defines which program ART is going to use to calculate the model. Allowed values: `mohid`, `ww3`, `wrf`.

- `runSimulation` - if set to `1` it will run the program specified in the `module` parameter. If set to `0` or non existent it will default to not running it.

- `runSimulation` - if set to `1` it will run all programs defined in the `postProcessing` block. If set to `0` or non existent it will default to not running them.

- `startDate` - start date to calculcate model in a non-operational run, ignored if `operationalMode` is set.

- `endDate` - end date to calculcate model in a non-operational run, ignored if `operationalMode` is set.

- `outputToFile` - if set to `1` it will redirect the output of the console (ART) to a file specified by `outputFilePath` parameter. If `0` or non existent it will only output to the console where it is running.bh

- `outputFilePath` - specifies the file path for which ART will output. If non existent and `outputFile` is set to `1` 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. If `sendEmail` is set to 1, it has to exist, and it has to be non-empty.

mohid

- `maxTime` - maximum time allowed for MOHID to run, if non existent it will default to `40000`.

- `exePath` - MANDATORY - specifies the path to where the MOHID execution file is.

- `outputToFile` - if set to `1` it will redirect the output of MOHID to a file specified by `outputFilePath` parameter. If `0` 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 and `outputFile` is set to `1` it will default to the path where MOHID is running.

  === mpi ===
   - `enable` - if set to `1` it will enable MPI on current run. If `0` or non existent it will default to ignore all the `mpi` block
   - `exePath` - MANDATORY IF `enable`- specifies the path to where the MOHID execution file is.
   - `totalProcessors` - number of total processors cores that mpi will use

model

- `name` - `path` - path relative to mainPath - `dt` - `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`

### discharges

- `enable` - `path` - `dateFormat`

### obc

- `enable` - `fileType` - file type of the obc file (usually hdf5 or netcdf). When not defined it defaults to `hdf5`. - `simulatedDays` - `subFolders` - if set to `1` it searches it assumes that OBC workpath is structured with subfolders for `year` if set to `2` it has subfolders `month` and `year` and if set to `3` it has `year` , `month`, and `day`. If `0` or non defined it defaults to assuming no structure inside OBC workpath. - `dateInFileName` - if set to `1` assumes date is in the files' names (uses `dateFormat`). If `0` 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 to `YYYYMMDD` - `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 become `Hydrodynamic_2019-09-12`.

- `workPath`

      1. meteo

- `enable`

   ### models
      uniqueId
   - `name`
   - `simulatedDays`
   - `fileNameFromModel`
   - `workPath`
   - `dateFormat`
   - `fileType`
      1. model.dat

Arguments used here will be put or changed in the model.dat of its domain.

- `MAXDT` - `GMTREFERENCE` - `DT_PREDICTION_INTERVAL`

      1. preprocessing:

- `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 to `1` and define `configFilePath`.
   - `configFilePath` - path to where the .dat file is. Only necessary when `datDateChange` 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 executable
       ex. `ls -l -a /samba/lusitania` → flags: "-l -a /samba/lusitania"
   - `outputToFile`
   - `outputFilePath`
      1. postprocessing:

- `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 to `1` and define `configFilePath`.
   - `configFilePath` - path to where the .dat file is. Only necessary when `datDateChange` 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 as `ls`. If you want to run a script such as `flags` parameter.
       - Example: `exePath` : `python3` ; `flags` :`/pathToScript/script.py`
   - `flags` - any flags or arguments you must give in the command line to the executable
       ex. `ls -l -a /samba/lusitania` → flags: "-l -a /samba/lusitania"
   - `outputToFile`
   - `outputFilePath`