Skip to content

slf_int2d

Luc DURON edited this page Apr 6, 2023 · 1 revision
usage: slf_int2d.py [-h] [--force] [--verbose] [--var VAR [VAR ...]]
                    [-o OUTPATTERN] [--sep SEP] [--digits DIGITS]
                    resname csv_filename

@brief:
* Interpolate values at given points in a 2D unstructured mesh (with triangular elements)
* VOIR slf_int2d_v2 pour en csv différent et surtout plus rapide

@warnings:
* target point is outside the model => value of the nearest node is taken
* target point is exactly at a node location => node value is taken (no interpolation is required)
* target point is at the boundary of two elements => interpolation

@features:
* Deux exports possibles (le choix est fait en spécifiant l'extension du fichier de sortie `OUTPATTERN`) :
** export en _csv_ en un seul fichier contenant les colonnes ['id', 'X', 'Y', 'time'] et une colonne par variable à traiter
** export en _xlsx_ avec une variable par onglet et un point par colonne

@info:
* Format du fichier CSV d'entrée :
** 3 columns (id, x, y) with colon (';') separator
** header is compulsory but order of column may vary
** id must be unique and is a string or an integer

positional arguments:
  resname               Serafin input filename
  csv_filename          filename with a set of points (columns: id,x,y)

options:
  -h, --help            show this help message and exit
  --force, -f           force output overwrite (default: False)
  --verbose, -v         increase output verbosity (default: False)
  --var VAR [VAR ...]   list of 2D or 3D variables (see table) (default: None)
  -o OUTPATTERN, --outpattern OUTPATTERN
                        CSV output filename pattern (without variable suffix
                        and extension) (default: None)
  --sep SEP             CSV separator (default: ;)
  --digits DIGITS       significant digit for exported values (default: 4)
Clone this wiki locally