From d2c4ea28bc456fe49e2a1946dfc81cb87691cae5 Mon Sep 17 00:00:00 2001 From: Antonio Leblanc Date: Fri, 20 Nov 2026 01:02:31 -0300 Subject: [PATCH] tools: move the Meso-NH workflow scripts to tools/mesonh/ preprocessing/, postprocessing/, 3nestFFCASE/ and sampleUses.py move together, so the imports between them still work from tools/mesonh/. tools/README.md becomes an index; the Meso-NH text moves to tools/mesonh/README.md. Nothing deleted, no script code changed. --- .gitignore | 2 +- docs/source/user_guide/landscape_file.rst | 2 +- tests/python/test_genforefirecase.py | 4 +- tools/README.md | 233 +---------------- .../3nestFFCASE/000_ARCH/2MHGETECMWFBC | 0 .../3nestFFCASE/000_ARCH/FFMNH.yml | 0 .../3nestFFCASE/000_ARCH/GETECMWFBC | 0 .../3nestFFCASE/000_ARCH/JOBARCHIVE | 0 .../{ => mesonh}/3nestFFCASE/001_pgd/MAKE_PGD | 0 .../{ => mesonh}/3nestFFCASE/001_pgd/RUN_PGD | 0 .../{ => mesonh}/3nestFFCASE/001_pgd/cleanDir | 0 .../3nestFFCASE/002_real/MAKE_PREAL | 0 .../3nestFFCASE/002_real/RUN_REAL | 0 .../3nestFFCASE/002_real/cleanDir | 0 .../3nestFFCASE/003_run/MAKE_RUN1 | 0 .../3nestFFCASE/003_run/RUN_MESONH_120p | 0 .../{ => mesonh}/3nestFFCASE/003_run/cleanDir | 0 .../3nestFFCASE/004_SpawnReal/MAKE_SPAWNREAL | 0 .../3nestFFCASE/004_SpawnReal/RUN_SPAWN_REAL | 0 .../3nestFFCASE/004_SpawnReal/cleanDir | 0 .../005_SpawnReal/MAKE_SPAWNREAL23 | 0 .../3nestFFCASE/005_SpawnReal/RUN_SPAWN_REAL | 0 .../3nestFFCASE/005_SpawnReal/cleanDir | 0 .../3nestFFCASE/006_runff/ForeFire/Params.ff | 0 .../3nestFFCASE/006_runff/ForeFire/fuels.ff | 0 .../3nestFFCASE/006_runff/ForeFire/run.ff | 0 .../3nestFFCASE/006_runff/MAKE_RUNFF | 0 .../3nestFFCASE/006_runff/RUN_MNH_100p | 0 .../3nestFFCASE/006_runff/cleanDir | 0 .../3nestFFCASE/006_runff/sbatchRunVtkFilesM1 | 2 +- .../3nestFFCASE/006_runff/sbatchRunVtkFilesM2 | 2 +- .../3nestFFCASE/006_runff/sbatchRunVtkFilesM3 | 2 +- .../3nestFFCASE/RESULTS/README.md | 0 .../3nestFFCASE/makeRunFromTemplate | 4 +- tools/mesonh/README.md | 238 ++++++++++++++++++ .../MNHCDF_to_FFNC_atmodataset.py | 0 tools/{ => mesonh}/postprocessing/__init__.py | 0 .../postprocessing/atmo_fire_plotsFrom.py | 0 .../postprocessing/diag_arrays.py | 0 .../postprocessing/extractSurfaceInXarray.py | 0 .../{ => mesonh}/postprocessing/genDomain.py | 0 .../{ => mesonh}/postprocessing/pMNHFF2VTK.py | 0 .../{ => mesonh}/postprocessing/pMNHFF2vdb.py | 0 .../{ => mesonh}/postprocessing/pMNHFF2vti.py | 0 .../postprocessing/plotFireFiles.py | 0 .../postprocessing/plotcontour.py | 0 tools/{ => mesonh}/postprocessing/sciplots.py | 0 tools/{ => mesonh}/postprocessing/sounding.py | 0 tools/{ => mesonh}/preprocessing/PGD2Init.py | 0 .../preprocessing/PRE_IDEA1.pattern | 0 .../preprocessing/clickImageToLocation.py | 0 .../extract_from_eu_land_cover.py | 0 .../{ => mesonh}/preprocessing/ffToGeoJson.py | 0 .../preprocessing/fireObs2ATime.py | 0 .../preprocessing/genForeFireCase.py | 0 .../preprocessing/genPrepIdeal.py | 0 .../{ => mesonh}/preprocessing/geo_to_kml.py | 0 .../preprocessing/getBGFromCFCase.py | 0 .../{ => mesonh}/preprocessing/indexRVB.html | 0 tools/{ => mesonh}/preprocessing/kmlDomain.py | 0 .../preprocessing/learnFuelTifPng.py | 0 .../{ => mesonh}/preprocessing/lidar2fuel.py | 0 .../preprocessing/prealCF2Case.py | 0 .../preprocessing/satImage2fuel.py | 0 .../preprocessing/tifToPngFuel.py | 0 tools/{ => mesonh}/preprocessing/upDirHDR.py | 0 tools/{ => mesonh}/sampleUses.py | 0 67 files changed, 248 insertions(+), 241 deletions(-) rename tools/{ => mesonh}/3nestFFCASE/000_ARCH/2MHGETECMWFBC (100%) rename tools/{ => mesonh}/3nestFFCASE/000_ARCH/FFMNH.yml (100%) rename tools/{ => mesonh}/3nestFFCASE/000_ARCH/GETECMWFBC (100%) rename tools/{ => mesonh}/3nestFFCASE/000_ARCH/JOBARCHIVE (100%) rename tools/{ => mesonh}/3nestFFCASE/001_pgd/MAKE_PGD (100%) rename tools/{ => mesonh}/3nestFFCASE/001_pgd/RUN_PGD (100%) rename tools/{ => mesonh}/3nestFFCASE/001_pgd/cleanDir (100%) rename tools/{ => mesonh}/3nestFFCASE/002_real/MAKE_PREAL (100%) rename tools/{ => mesonh}/3nestFFCASE/002_real/RUN_REAL (100%) rename tools/{ => mesonh}/3nestFFCASE/002_real/cleanDir (100%) rename tools/{ => mesonh}/3nestFFCASE/003_run/MAKE_RUN1 (100%) rename tools/{ => mesonh}/3nestFFCASE/003_run/RUN_MESONH_120p (100%) rename tools/{ => mesonh}/3nestFFCASE/003_run/cleanDir (100%) rename tools/{ => mesonh}/3nestFFCASE/004_SpawnReal/MAKE_SPAWNREAL (100%) rename tools/{ => mesonh}/3nestFFCASE/004_SpawnReal/RUN_SPAWN_REAL (100%) rename tools/{ => mesonh}/3nestFFCASE/004_SpawnReal/cleanDir (100%) rename tools/{ => mesonh}/3nestFFCASE/005_SpawnReal/MAKE_SPAWNREAL23 (100%) rename tools/{ => mesonh}/3nestFFCASE/005_SpawnReal/RUN_SPAWN_REAL (100%) rename tools/{ => mesonh}/3nestFFCASE/005_SpawnReal/cleanDir (100%) rename tools/{ => mesonh}/3nestFFCASE/006_runff/ForeFire/Params.ff (100%) rename tools/{ => mesonh}/3nestFFCASE/006_runff/ForeFire/fuels.ff (100%) rename tools/{ => mesonh}/3nestFFCASE/006_runff/ForeFire/run.ff (100%) rename tools/{ => mesonh}/3nestFFCASE/006_runff/MAKE_RUNFF (100%) rename tools/{ => mesonh}/3nestFFCASE/006_runff/RUN_MNH_100p (100%) rename tools/{ => mesonh}/3nestFFCASE/006_runff/cleanDir (100%) rename tools/{ => mesonh}/3nestFFCASE/006_runff/sbatchRunVtkFilesM1 (80%) rename tools/{ => mesonh}/3nestFFCASE/006_runff/sbatchRunVtkFilesM2 (80%) rename tools/{ => mesonh}/3nestFFCASE/006_runff/sbatchRunVtkFilesM3 (80%) rename tools/{ => mesonh}/3nestFFCASE/RESULTS/README.md (100%) rename tools/{ => mesonh}/3nestFFCASE/makeRunFromTemplate (79%) create mode 100644 tools/mesonh/README.md rename tools/{ => mesonh}/postprocessing/MNHCDF_to_FFNC_atmodataset.py (100%) rename tools/{ => mesonh}/postprocessing/__init__.py (100%) rename tools/{ => mesonh}/postprocessing/atmo_fire_plotsFrom.py (100%) rename tools/{ => mesonh}/postprocessing/diag_arrays.py (100%) rename tools/{ => mesonh}/postprocessing/extractSurfaceInXarray.py (100%) rename tools/{ => mesonh}/postprocessing/genDomain.py (100%) rename tools/{ => mesonh}/postprocessing/pMNHFF2VTK.py (100%) rename tools/{ => mesonh}/postprocessing/pMNHFF2vdb.py (100%) rename tools/{ => mesonh}/postprocessing/pMNHFF2vti.py (100%) rename tools/{ => mesonh}/postprocessing/plotFireFiles.py (100%) rename tools/{ => mesonh}/postprocessing/plotcontour.py (100%) rename tools/{ => mesonh}/postprocessing/sciplots.py (100%) rename tools/{ => mesonh}/postprocessing/sounding.py (100%) rename tools/{ => mesonh}/preprocessing/PGD2Init.py (100%) rename tools/{ => mesonh}/preprocessing/PRE_IDEA1.pattern (100%) rename tools/{ => mesonh}/preprocessing/clickImageToLocation.py (100%) rename tools/{ => mesonh}/preprocessing/extract_from_eu_land_cover.py (100%) rename tools/{ => mesonh}/preprocessing/ffToGeoJson.py (100%) rename tools/{ => mesonh}/preprocessing/fireObs2ATime.py (100%) rename tools/{ => mesonh}/preprocessing/genForeFireCase.py (100%) rename tools/{ => mesonh}/preprocessing/genPrepIdeal.py (100%) rename tools/{ => mesonh}/preprocessing/geo_to_kml.py (100%) rename tools/{ => mesonh}/preprocessing/getBGFromCFCase.py (100%) rename tools/{ => mesonh}/preprocessing/indexRVB.html (100%) rename tools/{ => mesonh}/preprocessing/kmlDomain.py (100%) rename tools/{ => mesonh}/preprocessing/learnFuelTifPng.py (100%) rename tools/{ => mesonh}/preprocessing/lidar2fuel.py (100%) rename tools/{ => mesonh}/preprocessing/prealCF2Case.py (100%) rename tools/{ => mesonh}/preprocessing/satImage2fuel.py (100%) rename tools/{ => mesonh}/preprocessing/tifToPngFuel.py (100%) rename tools/{ => mesonh}/preprocessing/upDirHDR.py (100%) rename tools/{ => mesonh}/sampleUses.py (100%) diff --git a/.gitignore b/.gitignore index 32e91f5f..e05dcc3e 100644 --- a/.gitignore +++ b/.gitignore @@ -42,7 +42,7 @@ docs/doxygen/html build.sh #tools -tools/postprocessing/loadInParaview.py +tools/mesonh/postprocessing/loadInParaview.py tests/config_firecast_local.bash tools/config_firecast_local.bash tools/ai diff --git a/docs/source/user_guide/landscape_file.rst b/docs/source/user_guide/landscape_file.rst index 5c66a32e..e1434c9d 100644 --- a/docs/source/user_guide/landscape_file.rst +++ b/docs/source/user_guide/landscape_file.rst @@ -53,7 +53,7 @@ If no wind variable is present in the NetCDF file, supply wind via ``addScalarLa Creating a Landscape File from Python ------------------------------------- -The helper ``tools/preprocessing/genForeFireCase.py`` builds a compliant NetCDF file directly from NumPy arrays: +The helper ``tools/mesonh/preprocessing/genForeFireCase.py`` builds a compliant NetCDF file directly from NumPy arrays: .. code-block:: python diff --git a/tests/python/test_genforefirecase.py b/tests/python/test_genforefirecase.py index 83697879..28aa4398 100644 --- a/tests/python/test_genforefirecase.py +++ b/tests/python/test_genforefirecase.py @@ -1,4 +1,4 @@ -"""Smoke test for tools/preprocessing/genForeFireCase.py. +"""Smoke test for tools/mesonh/preprocessing/genForeFireCase.py. The landscape file is the thing standing between a new user and their first simulation, so this checks the whole path rather than the writer alone: build @@ -21,7 +21,7 @@ sys.path.insert(0, os.path.join( os.path.dirname(os.path.abspath(__file__)), "..", "..", - "tools", "preprocessing")) + "tools", "mesonh", "preprocessing")) import numpy as np # noqa: E402 from netCDF4 import Dataset # noqa: E402 diff --git a/tools/README.md b/tools/README.md index decc8092..297a02cc 100644 --- a/tools/README.md +++ b/tools/README.md @@ -8,236 +8,5 @@ Scripts and pages that users run around ForeFire. Build and CI helpers live in | `htdocs/` | Web pages served by `listenHTTP[]` from `$FOREFIREHOME/tools/htdocs`; see `htdocs/README.md` | | `tiles/` | `fftile.py` writes and inspects `.fftile` landscapes; see `tiles/README.md` | | `wildfire_ROS_models/` | Python rate of spread models and `.ffann` export; see its `README.md` | -| `preprocessing/` | Landscape and Meso-NH case preparation (below) | -| `postprocessing/` | VTK export and plots of ForeFire and Meso-NH outputs (below) | -| `3nestFFCASE/` | Template of a three-nest Meso-NH case for SLURM, with site-specific paths | -| `sampleUses.py` | Example chaining the pre and postprocessing steps of a Meso-NH case | +| `mesonh/` | Pre and postprocessing scripts and a SLURM case template for runs coupled with Meso-NH; see `mesonh/README.md` | | `TODO.md` | Planned tools | - -The rest of this page covers the Meso-NH workflow. These scripts create the -files needed to run a simulation coupled with Meso-NH. To couple, also edit -the `&NAM_FOREFIRE` namelist in the EXSEG file. The Meso-NH guide -(`docs/source/user_guide/mesonh.rst`) walks through a full coupled run. - -# Preprocessing Scripts - -List of preprocessing scripts: -- ***clickImageToLocation.py*** sets the coordinates for the Init.ff file -- ***genForeFireCase.py*** writes the **NetCDFfile** landscape (fuel, elevation, wind, flux models) from numpy arrays -- ***genPrepIdeal.py*** fills `PRE_IDEA1.pattern` into the `PRE_IDEA1.nam` namelist of a Meso-NH ideal case -- ***kmlDomain.py*** extracts kml files from a netcdf file -- ***PGD2Init.py*** creates the **InitFile**=Init.ff in the **ForeFireDataDirectory** directory -- ***prealCF2Case.py*** creates the **NetCDFfile**=data.nc file in the **ForeFireDataDirectory** directory - - -### genForeFireCase - -Lives in `preprocessing/genForeFireCase.py` and contains the preprocessing -routine *FiretoNC*, used to generate a packed data landscape in cdf format for -ForeFire. - -**Usage:** FiretoNC(filename, file name - domainProperties, the domain extension (map matching forefire parameters SWx, SWy, SWz, Lx, Ly, Lz, t0, Lt) - parametersProperties, the simulation date and duration. All of date, duration, refYear, refDay, year, month and day are required - fuelModelMap, a numpy integer array containing the indexes of fuel type - elevation=None, a numpy real array with the elevation - wind=None, a map with a "zonal" and "meridian" numpy real array values - fluxModelMap=None): a map with a ("table" and "name" ) and fMap "data" numpy int array values containing indices to the corresponding flux model - -Field arrays are indexed outermost axis first: `(NY, NX)`, or `(NZ, NY, NX)` -and `(NT, NZ, NY, NX)` when they vary with height or time — the same -convention `prealCF2Case.py` uses. - -`tests/python/test_genforefirecase.py` builds a landscape, loads it and runs a -short simulation; it doubles as a worked example. - - -### PGD2Init - -Creates the **InitFile**=Init.ff in the **ForeFireDataDirectory** directory. -The **InitFile** file contains the location of the fire front at initialization (non-parallel init). -**Usage:** PGD2Init.py inMNH_PGD_File.nc lat lon startTimeInseconds > pathtoForeFireDataDirectory/Init.ff -- INPUT: - - inMNH_PGD_File.nc (ex:/001_pgd/PGD_D80mA.nc) - - lat lon : latitude and longitude (ex: 39.7556 -8.1736) - - time of ignition in seconds (ex: 50000) -- OUTPUT: - - the **InitFile**=Init.ff file in the **ForeFireDataDirectory** - - - - -### prealCF2Case - -creates the **NetCDFfile** file containing the data needed by the simulation (data.nc), otput uses the *FiretoNC* routine - -**Usage:** a Python module, not a command. From `tools/`: -```python -from preprocessing.prealCF2Case import PGD2Case -PGD2Case(pgd_path, png_path, out_path, dateStartDom) -``` -- `pgd_path`: the Meso-NH PGD file (`inMNH_PGD_File.nc`) -- `png_path`: the png on which the fuel distribution is constructed -- `out_path`: the data.nc file to write -- `dateStartDom`: the start date of the domain - -`sampleUses.py` shows it in a full case. - -ouutput is generated from the *FiretoNC* routine in *genForeFireCase.py* - -reads dimensions from the PGD imput file - -example of NetCDF "data.nc": -``` -dimensions: - DIMX = 302 ; - DIMY = 302 ; - DIMZ = 1 ; - DIMT = 1 ; -variables: - int fuel(DIMT, DIMZ, DIMY, DIMX) ; - fuel:type = "fuel" ; - int heatFlux(DIMT, DIMZ, DIMY, DIMX) ; - heatFlux:type = "flux" ; - heatFlux:model0name = "heatFluxBasic" ; - heatFlux:indices = 0 ; - int vaporFlux(DIMT, DIMZ, DIMY, DIMX) ; - vaporFlux:type = "flux" ; - vaporFlux:model1name = "vaporFluxBasic" ; - vaporFlux:indices = 1 ; - char domain ; - domain:type = "domain" ; - domain:SWx = 288520. ; - domain:SWy = 282520. ; - domain:SWz = 0 ; - domain:Lx = 24160. ; - domain:Ly = 24160. ; - domain:Lz = 0 ; - domain:t0 = 0 ; - domain:Lt = Infinityf ; - char parameters ; - parameters:type = "parameters" ; - parameters:projectionproperties = "41.551998,8.828396,41.551998,8.828396" ; - parameters:date = "2017-06-17_14:00:00" ; - parameters:duration = 100000 ; - parameters:projection = "OPENMAP" ; - parameters:refYear = 2017 ; - parameters:refDay = 168 ; - -// global attributes: - :version = "FF.1.0" ; -``` -TO BE IMPLEMENTED: -- a routine that given the coordinates, extract a colormap for fuels -- we need to translate the colormap in integer numbers - -## kmlDomain -creates the kml file showing the geographical domain extensions starting from a netCDF domain - -**Usage:** -``` -python3 kmlDomain.py PGDFile > kmlfile -``` -- INPUT: the netCDF containing the informations of the modelled domain (ex: *KTEST_2D/001_pgd/PGD_D160mA.nc*) -- OUTPUT:the desired kml file (ex: *KTEST_2D/001_pgd/kmlD160.kml*) - - -# Postprocessing Scripts - -List of postprocessing scripts: -- ***pMNHFF2VTK.py*** -- ***plotcontour.py*** - -`ffToGeoJson.py` (GeoJSON and KML export) lives in `preprocessing/`. - -## pMNHFF2VTK - -Builds vtk from forefire outputs for parallels runs - -**Usage:** - -python PathtoScript pathtoForefireOutput pathForefireOutputGeom pathtodirOutput -- on a single node: - - computes all steps: - -``` - python3 $FOREFIREHOME/tools/postprocessing/pMNHFF2VTK.py MODEL3/output ForeFire/Outputs/output vtkout3/* -``` - - - computes step number n=4 - -``` - python3 $FOREFIREHOME/tools/postprocessing/pMNHFF2VTK.py MODEL3/output ForeFire/Outputs/output vtkout3/ -steps 4 5 -``` - -- on multiple nodes (SLURM): -you should launch pMNHFF2VTK by an opportune script (**sbatchRunVtkFilesM3** for model 3) - -example of script: -``` -seqSTEP=$1 -stepLength=$2 -startSTEP=$(($stepLength * $SLURM_ARRAY_TASK_ID)) -endSTEP=$(($stepLength * ($SLURM_ARRAY_TASK_ID + 1) )) -echo "ID $SLURM_ARRAY_TASK_ID computing $startSTEP to $endSTEP" - -for i in `seq ${startSTEP} ${seqSTEP} ${endSTEP}`; -do -srun -n1 --exclusive python3 $FOREFIREHOME/tools/postprocessing/pMNHFF2VTK.py MODEL3/output ForeFire/Outputs/output vtkout3/ -steps $i $(($i + $seqSTEP)) & -done -wait -``` -run with `sbatch --array=0-2 script_vtk_array 2 10` : will launch 3 tasks SLURMID (0, 1 and 2) of 10 steps each consisting of 10/2 srun processes of length 2 on each task - so ID 0 will compute 0-2 3-4 5-6 7-8 9-10 - so ID 1 will compute 11-12 13-14 15-16 17-18 19-20 - so ID 2 will compute 21-22 23-24 25-26 27-28 29-30 - Typically fo 2000 outputs on 10 tasks : "sbatch --array=0-9 script_vtk_array 20 200" - -When all steps are computed, run another time: -``` - python3 $FOREFIREHOME/tools/postprocessing/pMNHFF2VTK.py MODEL3/output ForeFire/Outputs/output vtkout3/ -``` - -with that all time steps will be synchronized with Meso-NH time. - -# Troubleshooting coupled runs - -## When launching a simulation do always the following steps - -- check that all directories called in RUN_MNH_Nproc are really there, otherwise this will cause errors difficult to debug: - -``` - ~/runMNH -rm -rf MODEL/* -rm -rf vtkout/* -rm -rf ForeFire/Outputs/* -rm -rf parallel/*.domain* -rm -rf parallel/1/* -rm -rf parallel/0/* - - -ln -sf ../001_pgd/PGD_D* . -ln -sf ../002_real/AND1.* . -ln -sf ../003_run/JUL19.1.RUN1D.008* . -#ln -sf ../004_SpawnReal/AND2.* . -#ln -sf ../005_SpawnReal/AND3.* . - -``` -- When launching the simultaions, sometiles bmap is not good!! check with -``` -grep bmap | logfile.out -``` -if everything is ok you will have something of the type: -``` - Domain 0 size:202:202:52 coord:24240:24240 my bmap is 2424:2424 res 10:10 -``` -then you can comment the following line in the RUN_MNH script to avoid such problem in the future: -``` -rm -rf parallel/*.domain* -``` - -- The vtk postprocesser pMNHFF2VTK gives the error: -``` -found no domains -``` -if is so you should move all the output.1* output.2* ... (with the exception of the output.0* files) in a new directory *pathForefireOutputGeom* and use that one in the post processing diff --git a/tools/3nestFFCASE/000_ARCH/2MHGETECMWFBC b/tools/mesonh/3nestFFCASE/000_ARCH/2MHGETECMWFBC similarity index 100% rename from tools/3nestFFCASE/000_ARCH/2MHGETECMWFBC rename to tools/mesonh/3nestFFCASE/000_ARCH/2MHGETECMWFBC diff --git a/tools/3nestFFCASE/000_ARCH/FFMNH.yml b/tools/mesonh/3nestFFCASE/000_ARCH/FFMNH.yml similarity index 100% rename from tools/3nestFFCASE/000_ARCH/FFMNH.yml rename to tools/mesonh/3nestFFCASE/000_ARCH/FFMNH.yml diff --git a/tools/3nestFFCASE/000_ARCH/GETECMWFBC b/tools/mesonh/3nestFFCASE/000_ARCH/GETECMWFBC similarity index 100% rename from tools/3nestFFCASE/000_ARCH/GETECMWFBC rename to tools/mesonh/3nestFFCASE/000_ARCH/GETECMWFBC diff --git a/tools/3nestFFCASE/000_ARCH/JOBARCHIVE b/tools/mesonh/3nestFFCASE/000_ARCH/JOBARCHIVE similarity index 100% rename from tools/3nestFFCASE/000_ARCH/JOBARCHIVE rename to tools/mesonh/3nestFFCASE/000_ARCH/JOBARCHIVE diff --git a/tools/3nestFFCASE/001_pgd/MAKE_PGD b/tools/mesonh/3nestFFCASE/001_pgd/MAKE_PGD similarity index 100% rename from tools/3nestFFCASE/001_pgd/MAKE_PGD rename to tools/mesonh/3nestFFCASE/001_pgd/MAKE_PGD diff --git a/tools/3nestFFCASE/001_pgd/RUN_PGD b/tools/mesonh/3nestFFCASE/001_pgd/RUN_PGD similarity index 100% rename from tools/3nestFFCASE/001_pgd/RUN_PGD rename to tools/mesonh/3nestFFCASE/001_pgd/RUN_PGD diff --git a/tools/3nestFFCASE/001_pgd/cleanDir b/tools/mesonh/3nestFFCASE/001_pgd/cleanDir similarity index 100% rename from tools/3nestFFCASE/001_pgd/cleanDir rename to tools/mesonh/3nestFFCASE/001_pgd/cleanDir diff --git a/tools/3nestFFCASE/002_real/MAKE_PREAL b/tools/mesonh/3nestFFCASE/002_real/MAKE_PREAL similarity index 100% rename from tools/3nestFFCASE/002_real/MAKE_PREAL rename to tools/mesonh/3nestFFCASE/002_real/MAKE_PREAL diff --git a/tools/3nestFFCASE/002_real/RUN_REAL b/tools/mesonh/3nestFFCASE/002_real/RUN_REAL similarity index 100% rename from tools/3nestFFCASE/002_real/RUN_REAL rename to tools/mesonh/3nestFFCASE/002_real/RUN_REAL diff --git a/tools/3nestFFCASE/002_real/cleanDir b/tools/mesonh/3nestFFCASE/002_real/cleanDir similarity index 100% rename from tools/3nestFFCASE/002_real/cleanDir rename to tools/mesonh/3nestFFCASE/002_real/cleanDir diff --git a/tools/3nestFFCASE/003_run/MAKE_RUN1 b/tools/mesonh/3nestFFCASE/003_run/MAKE_RUN1 similarity index 100% rename from tools/3nestFFCASE/003_run/MAKE_RUN1 rename to tools/mesonh/3nestFFCASE/003_run/MAKE_RUN1 diff --git a/tools/3nestFFCASE/003_run/RUN_MESONH_120p b/tools/mesonh/3nestFFCASE/003_run/RUN_MESONH_120p similarity index 100% rename from tools/3nestFFCASE/003_run/RUN_MESONH_120p rename to tools/mesonh/3nestFFCASE/003_run/RUN_MESONH_120p diff --git a/tools/3nestFFCASE/003_run/cleanDir b/tools/mesonh/3nestFFCASE/003_run/cleanDir similarity index 100% rename from tools/3nestFFCASE/003_run/cleanDir rename to tools/mesonh/3nestFFCASE/003_run/cleanDir diff --git a/tools/3nestFFCASE/004_SpawnReal/MAKE_SPAWNREAL b/tools/mesonh/3nestFFCASE/004_SpawnReal/MAKE_SPAWNREAL similarity index 100% rename from tools/3nestFFCASE/004_SpawnReal/MAKE_SPAWNREAL rename to tools/mesonh/3nestFFCASE/004_SpawnReal/MAKE_SPAWNREAL diff --git a/tools/3nestFFCASE/004_SpawnReal/RUN_SPAWN_REAL b/tools/mesonh/3nestFFCASE/004_SpawnReal/RUN_SPAWN_REAL similarity index 100% rename from tools/3nestFFCASE/004_SpawnReal/RUN_SPAWN_REAL rename to tools/mesonh/3nestFFCASE/004_SpawnReal/RUN_SPAWN_REAL diff --git a/tools/3nestFFCASE/004_SpawnReal/cleanDir b/tools/mesonh/3nestFFCASE/004_SpawnReal/cleanDir similarity index 100% rename from tools/3nestFFCASE/004_SpawnReal/cleanDir rename to tools/mesonh/3nestFFCASE/004_SpawnReal/cleanDir diff --git a/tools/3nestFFCASE/005_SpawnReal/MAKE_SPAWNREAL23 b/tools/mesonh/3nestFFCASE/005_SpawnReal/MAKE_SPAWNREAL23 similarity index 100% rename from tools/3nestFFCASE/005_SpawnReal/MAKE_SPAWNREAL23 rename to tools/mesonh/3nestFFCASE/005_SpawnReal/MAKE_SPAWNREAL23 diff --git a/tools/3nestFFCASE/005_SpawnReal/RUN_SPAWN_REAL b/tools/mesonh/3nestFFCASE/005_SpawnReal/RUN_SPAWN_REAL similarity index 100% rename from tools/3nestFFCASE/005_SpawnReal/RUN_SPAWN_REAL rename to tools/mesonh/3nestFFCASE/005_SpawnReal/RUN_SPAWN_REAL diff --git a/tools/3nestFFCASE/005_SpawnReal/cleanDir b/tools/mesonh/3nestFFCASE/005_SpawnReal/cleanDir similarity index 100% rename from tools/3nestFFCASE/005_SpawnReal/cleanDir rename to tools/mesonh/3nestFFCASE/005_SpawnReal/cleanDir diff --git a/tools/3nestFFCASE/006_runff/ForeFire/Params.ff b/tools/mesonh/3nestFFCASE/006_runff/ForeFire/Params.ff similarity index 100% rename from tools/3nestFFCASE/006_runff/ForeFire/Params.ff rename to tools/mesonh/3nestFFCASE/006_runff/ForeFire/Params.ff diff --git a/tools/3nestFFCASE/006_runff/ForeFire/fuels.ff b/tools/mesonh/3nestFFCASE/006_runff/ForeFire/fuels.ff similarity index 100% rename from tools/3nestFFCASE/006_runff/ForeFire/fuels.ff rename to tools/mesonh/3nestFFCASE/006_runff/ForeFire/fuels.ff diff --git a/tools/3nestFFCASE/006_runff/ForeFire/run.ff b/tools/mesonh/3nestFFCASE/006_runff/ForeFire/run.ff similarity index 100% rename from tools/3nestFFCASE/006_runff/ForeFire/run.ff rename to tools/mesonh/3nestFFCASE/006_runff/ForeFire/run.ff diff --git a/tools/3nestFFCASE/006_runff/MAKE_RUNFF b/tools/mesonh/3nestFFCASE/006_runff/MAKE_RUNFF similarity index 100% rename from tools/3nestFFCASE/006_runff/MAKE_RUNFF rename to tools/mesonh/3nestFFCASE/006_runff/MAKE_RUNFF diff --git a/tools/3nestFFCASE/006_runff/RUN_MNH_100p b/tools/mesonh/3nestFFCASE/006_runff/RUN_MNH_100p similarity index 100% rename from tools/3nestFFCASE/006_runff/RUN_MNH_100p rename to tools/mesonh/3nestFFCASE/006_runff/RUN_MNH_100p diff --git a/tools/3nestFFCASE/006_runff/cleanDir b/tools/mesonh/3nestFFCASE/006_runff/cleanDir similarity index 100% rename from tools/3nestFFCASE/006_runff/cleanDir rename to tools/mesonh/3nestFFCASE/006_runff/cleanDir diff --git a/tools/3nestFFCASE/006_runff/sbatchRunVtkFilesM1 b/tools/mesonh/3nestFFCASE/006_runff/sbatchRunVtkFilesM1 similarity index 80% rename from tools/3nestFFCASE/006_runff/sbatchRunVtkFilesM1 rename to tools/mesonh/3nestFFCASE/006_runff/sbatchRunVtkFilesM1 index 5b36946d..215c2b81 100644 --- a/tools/3nestFFCASE/006_runff/sbatchRunVtkFilesM1 +++ b/tools/mesonh/3nestFFCASE/006_runff/sbatchRunVtkFilesM1 @@ -30,7 +30,7 @@ echo "ID $SLURM_ARRAY_TASK_ID computing $startSTEP to $endSTEP" for i in `seq ${startSTEP} ${seqSTEP} ${endSTEP}`; do -srun -n1 --exclusive python3.9 ~/soft/firefront/tools/postprocessing/pMNHFF2VTK.py MODEL1/output ForeFire/OutputsM1150/output vtkout1/ -steps $i $(($i + $seqSTEP)) & +srun -n1 --exclusive python3.9 ~/soft/firefront/tools/mesonh/postprocessing/pMNHFF2VTK.py MODEL1/output ForeFire/OutputsM1150/output vtkout1/ -steps $i $(($i + $seqSTEP)) & done wait diff --git a/tools/3nestFFCASE/006_runff/sbatchRunVtkFilesM2 b/tools/mesonh/3nestFFCASE/006_runff/sbatchRunVtkFilesM2 similarity index 80% rename from tools/3nestFFCASE/006_runff/sbatchRunVtkFilesM2 rename to tools/mesonh/3nestFFCASE/006_runff/sbatchRunVtkFilesM2 index 92e7bf7b..5fb9231c 100644 --- a/tools/3nestFFCASE/006_runff/sbatchRunVtkFilesM2 +++ b/tools/mesonh/3nestFFCASE/006_runff/sbatchRunVtkFilesM2 @@ -31,7 +31,7 @@ echo "ID $SLURM_ARRAY_TASK_ID computing $startSTEP to $endSTEP" for i in `seq ${startSTEP} ${seqSTEP} ${endSTEP}`; do -srun -n1 --exclusive python3.9 ~/soft/firefront/tools/postprocessing/pMNHFF2VTK.py MODEL2/output ForeFire/OutputsM2150/output vtkout2/ -steps $i $(($i + $seqSTEP)) & +srun -n1 --exclusive python3.9 ~/soft/firefront/tools/mesonh/postprocessing/pMNHFF2VTK.py MODEL2/output ForeFire/OutputsM2150/output vtkout2/ -steps $i $(($i + $seqSTEP)) & done wait diff --git a/tools/3nestFFCASE/006_runff/sbatchRunVtkFilesM3 b/tools/mesonh/3nestFFCASE/006_runff/sbatchRunVtkFilesM3 similarity index 80% rename from tools/3nestFFCASE/006_runff/sbatchRunVtkFilesM3 rename to tools/mesonh/3nestFFCASE/006_runff/sbatchRunVtkFilesM3 index afc622a8..c3794fae 100644 --- a/tools/3nestFFCASE/006_runff/sbatchRunVtkFilesM3 +++ b/tools/mesonh/3nestFFCASE/006_runff/sbatchRunVtkFilesM3 @@ -30,7 +30,7 @@ echo "ID $SLURM_ARRAY_TASK_ID computing $startSTEP to $endSTEP" for i in `seq ${startSTEP} ${seqSTEP} ${endSTEP}`; do -srun -n1 --exclusive python3.9 ~/soft/firefront/tools/postprocessing/pMNHFF2VTK.py MODEL3/output ForeFire/Outputs/output vtkout3/ -steps $i $(($i + $seqSTEP)) & +srun -n1 --exclusive python3.9 ~/soft/firefront/tools/mesonh/postprocessing/pMNHFF2VTK.py MODEL3/output ForeFire/Outputs/output vtkout3/ -steps $i $(($i + $seqSTEP)) & done wait diff --git a/tools/3nestFFCASE/RESULTS/README.md b/tools/mesonh/3nestFFCASE/RESULTS/README.md similarity index 100% rename from tools/3nestFFCASE/RESULTS/README.md rename to tools/mesonh/3nestFFCASE/RESULTS/README.md diff --git a/tools/3nestFFCASE/makeRunFromTemplate b/tools/mesonh/3nestFFCASE/makeRunFromTemplate similarity index 79% rename from tools/3nestFFCASE/makeRunFromTemplate rename to tools/mesonh/3nestFFCASE/makeRunFromTemplate index 587074ab..94f40756 100644 --- a/tools/3nestFFCASE/makeRunFromTemplate +++ b/tools/mesonh/3nestFFCASE/makeRunFromTemplate @@ -21,7 +21,7 @@ bash RUN_PGD PRE_PGD1.nam_2000m bash RUN_PGD PRE_PGD1.nam_400m bash RUN_PGD PRE_PGD1.nam_80m bash RUN_PGDNEST -# recommencer en generant les KML /tools/preprocessing/kmlDomains.py et trouver la bonne emprise du domaine en changeant IXOR et IYOR dans le PDG_400m +# recommencer en generant les KML /tools/mesonh/preprocessing/kmlDomains.py et trouver la bonne emprise du domaine en changeant IXOR et IYOR dans le PDG_400m cd ../002_real cp /data/filippi_j/saphir/data/ecmwfFC/$mydate/*grib* . @@ -35,6 +35,6 @@ bash RUN_REAL cd ../003_run/ sbatch RUN_MESONH_120p -# l'étape d'après c'est de generer le fichier de paysage pour ForeFire, data.nc ou autre, /tools/preprocessing/prealCF2case.py avec une image de fond optionelle /tools/preprocessing/getBGFromCFCase.py va donner un tif qu'il faut ensuite transformer en PNG 5 couleurs en utilisant un code de sermentation ou bien tif2PngFuel.py qui fait une classification assez basique à partir d'une image et d'une image d'exemple que l'on peut li donner. +# l'étape d'après c'est de generer le fichier de paysage pour ForeFire, data.nc ou autre, /tools/mesonh/preprocessing/prealCF2case.py avec une image de fond optionelle /tools/preprocessing/getBGFromCFCase.py va donner un tif qu'il faut ensuite transformer en PNG 5 couleurs en utilisant un code de sermentation ou bien tif2PngFuel.py qui fait une classification assez basique à partir d'une image et d'une image d'exemple que l'on peut li donner. # il faut ensuite trouver les points d'allumages, ainsi que les temps précis de démarrage, et tester le fichier sans couplage avec MesoNH, il y a pour cela le fichier run.ff dans 006_runff/ForeFire/run.ff regarder les sorties avec des kml générés par ffToGeoJson.py qui va faire les kml - attention de changer les parametre year month day dans le params.ff et d'ajuster le vent - pour l'instant pas de procédure pour faire automatiquement un init.ff.. mais ca devrait changer diff --git a/tools/mesonh/README.md b/tools/mesonh/README.md new file mode 100644 index 00000000..720e7a5b --- /dev/null +++ b/tools/mesonh/README.md @@ -0,0 +1,238 @@ +# Meso-NH workflow scripts + +Run the Python modules from this folder (`sampleUses.py` imports `preprocessing.*` and `postprocessing.*` from here). + +| Folder / file | What it is | +| --- | --- | +| `preprocessing/` | Landscape and Meso-NH case preparation (below) | +| `postprocessing/` | VTK export and plots of ForeFire and Meso-NH outputs (below) | +| `3nestFFCASE/` | Template of a three-nest Meso-NH case for SLURM, with site-specific paths | +| `sampleUses.py` | Example chaining the pre and postprocessing steps of a Meso-NH case | + +These scripts create the files needed to run a simulation coupled with +Meso-NH. To couple, also edit +the `&NAM_FOREFIRE` namelist in the EXSEG file. The Meso-NH guide +(`docs/source/user_guide/mesonh.rst`) walks through a full coupled run. + +# Preprocessing Scripts + +List of preprocessing scripts: +- ***clickImageToLocation.py*** sets the coordinates for the Init.ff file +- ***genForeFireCase.py*** writes the **NetCDFfile** landscape (fuel, elevation, wind, flux models) from numpy arrays +- ***genPrepIdeal.py*** fills `PRE_IDEA1.pattern` into the `PRE_IDEA1.nam` namelist of a Meso-NH ideal case +- ***kmlDomain.py*** extracts kml files from a netcdf file +- ***PGD2Init.py*** creates the **InitFile**=Init.ff in the **ForeFireDataDirectory** directory +- ***prealCF2Case.py*** creates the **NetCDFfile**=data.nc file in the **ForeFireDataDirectory** directory + + +### genForeFireCase + +Lives in `preprocessing/genForeFireCase.py` and contains the preprocessing +routine *FiretoNC*, used to generate a packed data landscape in cdf format for +ForeFire. + +**Usage:** FiretoNC(filename, file name + domainProperties, the domain extension (map matching forefire parameters SWx, SWy, SWz, Lx, Ly, Lz, t0, Lt) + parametersProperties, the simulation date and duration. All of date, duration, refYear, refDay, year, month and day are required + fuelModelMap, a numpy integer array containing the indexes of fuel type + elevation=None, a numpy real array with the elevation + wind=None, a map with a "zonal" and "meridian" numpy real array values + fluxModelMap=None): a map with a ("table" and "name" ) and fMap "data" numpy int array values containing indices to the corresponding flux model + +Field arrays are indexed outermost axis first: `(NY, NX)`, or `(NZ, NY, NX)` +and `(NT, NZ, NY, NX)` when they vary with height or time — the same +convention `prealCF2Case.py` uses. + +`tests/python/test_genforefirecase.py` builds a landscape, loads it and runs a +short simulation; it doubles as a worked example. + + +### PGD2Init + +Creates the **InitFile**=Init.ff in the **ForeFireDataDirectory** directory. +The **InitFile** file contains the location of the fire front at initialization (non-parallel init). +**Usage:** PGD2Init.py inMNH_PGD_File.nc lat lon startTimeInseconds > pathtoForeFireDataDirectory/Init.ff +- INPUT: + - inMNH_PGD_File.nc (ex:/001_pgd/PGD_D80mA.nc) + - lat lon : latitude and longitude (ex: 39.7556 -8.1736) + - time of ignition in seconds (ex: 50000) +- OUTPUT: + - the **InitFile**=Init.ff file in the **ForeFireDataDirectory** + + + + +### prealCF2Case + +creates the **NetCDFfile** file containing the data needed by the simulation (data.nc), otput uses the *FiretoNC* routine + +**Usage:** a Python module, not a command. From `tools/mesonh/`: +```python +from preprocessing.prealCF2Case import PGD2Case +PGD2Case(pgd_path, png_path, out_path, dateStartDom) +``` +- `pgd_path`: the Meso-NH PGD file (`inMNH_PGD_File.nc`) +- `png_path`: the png on which the fuel distribution is constructed +- `out_path`: the data.nc file to write +- `dateStartDom`: the start date of the domain + +`sampleUses.py` shows it in a full case. + +ouutput is generated from the *FiretoNC* routine in *genForeFireCase.py* + +reads dimensions from the PGD imput file + +example of NetCDF "data.nc": +``` +dimensions: + DIMX = 302 ; + DIMY = 302 ; + DIMZ = 1 ; + DIMT = 1 ; +variables: + int fuel(DIMT, DIMZ, DIMY, DIMX) ; + fuel:type = "fuel" ; + int heatFlux(DIMT, DIMZ, DIMY, DIMX) ; + heatFlux:type = "flux" ; + heatFlux:model0name = "heatFluxBasic" ; + heatFlux:indices = 0 ; + int vaporFlux(DIMT, DIMZ, DIMY, DIMX) ; + vaporFlux:type = "flux" ; + vaporFlux:model1name = "vaporFluxBasic" ; + vaporFlux:indices = 1 ; + char domain ; + domain:type = "domain" ; + domain:SWx = 288520. ; + domain:SWy = 282520. ; + domain:SWz = 0 ; + domain:Lx = 24160. ; + domain:Ly = 24160. ; + domain:Lz = 0 ; + domain:t0 = 0 ; + domain:Lt = Infinityf ; + char parameters ; + parameters:type = "parameters" ; + parameters:projectionproperties = "41.551998,8.828396,41.551998,8.828396" ; + parameters:date = "2017-06-17_14:00:00" ; + parameters:duration = 100000 ; + parameters:projection = "OPENMAP" ; + parameters:refYear = 2017 ; + parameters:refDay = 168 ; + +// global attributes: + :version = "FF.1.0" ; +``` +TO BE IMPLEMENTED: +- a routine that given the coordinates, extract a colormap for fuels +- we need to translate the colormap in integer numbers + +## kmlDomain +creates the kml file showing the geographical domain extensions starting from a netCDF domain + +**Usage:** +``` +python3 kmlDomain.py PGDFile > kmlfile +``` +- INPUT: the netCDF containing the informations of the modelled domain (ex: *KTEST_2D/001_pgd/PGD_D160mA.nc*) +- OUTPUT:the desired kml file (ex: *KTEST_2D/001_pgd/kmlD160.kml*) + + +# Postprocessing Scripts + +List of postprocessing scripts: +- ***pMNHFF2VTK.py*** +- ***plotcontour.py*** + +`ffToGeoJson.py` (GeoJSON and KML export) lives in `preprocessing/`. + +## pMNHFF2VTK + +Builds vtk from forefire outputs for parallels runs + +**Usage:** + +python PathtoScript pathtoForefireOutput pathForefireOutputGeom pathtodirOutput +- on a single node: + - computes all steps: + +``` + python3 $FOREFIREHOME/tools/mesonh/postprocessing/pMNHFF2VTK.py MODEL3/output ForeFire/Outputs/output vtkout3/* +``` + + - computes step number n=4 + +``` + python3 $FOREFIREHOME/tools/mesonh/postprocessing/pMNHFF2VTK.py MODEL3/output ForeFire/Outputs/output vtkout3/ -steps 4 5 +``` + +- on multiple nodes (SLURM): +you should launch pMNHFF2VTK by an opportune script (**sbatchRunVtkFilesM3** for model 3) + +example of script: +``` +seqSTEP=$1 +stepLength=$2 +startSTEP=$(($stepLength * $SLURM_ARRAY_TASK_ID)) +endSTEP=$(($stepLength * ($SLURM_ARRAY_TASK_ID + 1) )) +echo "ID $SLURM_ARRAY_TASK_ID computing $startSTEP to $endSTEP" + +for i in `seq ${startSTEP} ${seqSTEP} ${endSTEP}`; +do +srun -n1 --exclusive python3 $FOREFIREHOME/tools/mesonh/postprocessing/pMNHFF2VTK.py MODEL3/output ForeFire/Outputs/output vtkout3/ -steps $i $(($i + $seqSTEP)) & +done +wait +``` +run with `sbatch --array=0-2 script_vtk_array 2 10` : will launch 3 tasks SLURMID (0, 1 and 2) of 10 steps each consisting of 10/2 srun processes of length 2 on each task + so ID 0 will compute 0-2 3-4 5-6 7-8 9-10 + so ID 1 will compute 11-12 13-14 15-16 17-18 19-20 + so ID 2 will compute 21-22 23-24 25-26 27-28 29-30 + Typically fo 2000 outputs on 10 tasks : "sbatch --array=0-9 script_vtk_array 20 200" + +When all steps are computed, run another time: +``` + python3 $FOREFIREHOME/tools/mesonh/postprocessing/pMNHFF2VTK.py MODEL3/output ForeFire/Outputs/output vtkout3/ +``` + +with that all time steps will be synchronized with Meso-NH time. + +# Troubleshooting coupled runs + +## When launching a simulation do always the following steps + +- check that all directories called in RUN_MNH_Nproc are really there, otherwise this will cause errors difficult to debug: + +``` + ~/runMNH +rm -rf MODEL/* +rm -rf vtkout/* +rm -rf ForeFire/Outputs/* +rm -rf parallel/*.domain* +rm -rf parallel/1/* +rm -rf parallel/0/* + + +ln -sf ../001_pgd/PGD_D* . +ln -sf ../002_real/AND1.* . +ln -sf ../003_run/JUL19.1.RUN1D.008* . +#ln -sf ../004_SpawnReal/AND2.* . +#ln -sf ../005_SpawnReal/AND3.* . + +``` +- When launching the simultaions, sometiles bmap is not good!! check with +``` +grep bmap | logfile.out +``` +if everything is ok you will have something of the type: +``` + Domain 0 size:202:202:52 coord:24240:24240 my bmap is 2424:2424 res 10:10 +``` +then you can comment the following line in the RUN_MNH script to avoid such problem in the future: +``` +rm -rf parallel/*.domain* +``` + +- The vtk postprocesser pMNHFF2VTK gives the error: +``` +found no domains +``` +if is so you should move all the output.1* output.2* ... (with the exception of the output.0* files) in a new directory *pathForefireOutputGeom* and use that one in the post processing diff --git a/tools/postprocessing/MNHCDF_to_FFNC_atmodataset.py b/tools/mesonh/postprocessing/MNHCDF_to_FFNC_atmodataset.py similarity index 100% rename from tools/postprocessing/MNHCDF_to_FFNC_atmodataset.py rename to tools/mesonh/postprocessing/MNHCDF_to_FFNC_atmodataset.py diff --git a/tools/postprocessing/__init__.py b/tools/mesonh/postprocessing/__init__.py similarity index 100% rename from tools/postprocessing/__init__.py rename to tools/mesonh/postprocessing/__init__.py diff --git a/tools/postprocessing/atmo_fire_plotsFrom.py b/tools/mesonh/postprocessing/atmo_fire_plotsFrom.py similarity index 100% rename from tools/postprocessing/atmo_fire_plotsFrom.py rename to tools/mesonh/postprocessing/atmo_fire_plotsFrom.py diff --git a/tools/postprocessing/diag_arrays.py b/tools/mesonh/postprocessing/diag_arrays.py similarity index 100% rename from tools/postprocessing/diag_arrays.py rename to tools/mesonh/postprocessing/diag_arrays.py diff --git a/tools/postprocessing/extractSurfaceInXarray.py b/tools/mesonh/postprocessing/extractSurfaceInXarray.py similarity index 100% rename from tools/postprocessing/extractSurfaceInXarray.py rename to tools/mesonh/postprocessing/extractSurfaceInXarray.py diff --git a/tools/postprocessing/genDomain.py b/tools/mesonh/postprocessing/genDomain.py similarity index 100% rename from tools/postprocessing/genDomain.py rename to tools/mesonh/postprocessing/genDomain.py diff --git a/tools/postprocessing/pMNHFF2VTK.py b/tools/mesonh/postprocessing/pMNHFF2VTK.py similarity index 100% rename from tools/postprocessing/pMNHFF2VTK.py rename to tools/mesonh/postprocessing/pMNHFF2VTK.py diff --git a/tools/postprocessing/pMNHFF2vdb.py b/tools/mesonh/postprocessing/pMNHFF2vdb.py similarity index 100% rename from tools/postprocessing/pMNHFF2vdb.py rename to tools/mesonh/postprocessing/pMNHFF2vdb.py diff --git a/tools/postprocessing/pMNHFF2vti.py b/tools/mesonh/postprocessing/pMNHFF2vti.py similarity index 100% rename from tools/postprocessing/pMNHFF2vti.py rename to tools/mesonh/postprocessing/pMNHFF2vti.py diff --git a/tools/postprocessing/plotFireFiles.py b/tools/mesonh/postprocessing/plotFireFiles.py similarity index 100% rename from tools/postprocessing/plotFireFiles.py rename to tools/mesonh/postprocessing/plotFireFiles.py diff --git a/tools/postprocessing/plotcontour.py b/tools/mesonh/postprocessing/plotcontour.py similarity index 100% rename from tools/postprocessing/plotcontour.py rename to tools/mesonh/postprocessing/plotcontour.py diff --git a/tools/postprocessing/sciplots.py b/tools/mesonh/postprocessing/sciplots.py similarity index 100% rename from tools/postprocessing/sciplots.py rename to tools/mesonh/postprocessing/sciplots.py diff --git a/tools/postprocessing/sounding.py b/tools/mesonh/postprocessing/sounding.py similarity index 100% rename from tools/postprocessing/sounding.py rename to tools/mesonh/postprocessing/sounding.py diff --git a/tools/preprocessing/PGD2Init.py b/tools/mesonh/preprocessing/PGD2Init.py similarity index 100% rename from tools/preprocessing/PGD2Init.py rename to tools/mesonh/preprocessing/PGD2Init.py diff --git a/tools/preprocessing/PRE_IDEA1.pattern b/tools/mesonh/preprocessing/PRE_IDEA1.pattern similarity index 100% rename from tools/preprocessing/PRE_IDEA1.pattern rename to tools/mesonh/preprocessing/PRE_IDEA1.pattern diff --git a/tools/preprocessing/clickImageToLocation.py b/tools/mesonh/preprocessing/clickImageToLocation.py similarity index 100% rename from tools/preprocessing/clickImageToLocation.py rename to tools/mesonh/preprocessing/clickImageToLocation.py diff --git a/tools/preprocessing/extract_from_eu_land_cover.py b/tools/mesonh/preprocessing/extract_from_eu_land_cover.py similarity index 100% rename from tools/preprocessing/extract_from_eu_land_cover.py rename to tools/mesonh/preprocessing/extract_from_eu_land_cover.py diff --git a/tools/preprocessing/ffToGeoJson.py b/tools/mesonh/preprocessing/ffToGeoJson.py similarity index 100% rename from tools/preprocessing/ffToGeoJson.py rename to tools/mesonh/preprocessing/ffToGeoJson.py diff --git a/tools/preprocessing/fireObs2ATime.py b/tools/mesonh/preprocessing/fireObs2ATime.py similarity index 100% rename from tools/preprocessing/fireObs2ATime.py rename to tools/mesonh/preprocessing/fireObs2ATime.py diff --git a/tools/preprocessing/genForeFireCase.py b/tools/mesonh/preprocessing/genForeFireCase.py similarity index 100% rename from tools/preprocessing/genForeFireCase.py rename to tools/mesonh/preprocessing/genForeFireCase.py diff --git a/tools/preprocessing/genPrepIdeal.py b/tools/mesonh/preprocessing/genPrepIdeal.py similarity index 100% rename from tools/preprocessing/genPrepIdeal.py rename to tools/mesonh/preprocessing/genPrepIdeal.py diff --git a/tools/preprocessing/geo_to_kml.py b/tools/mesonh/preprocessing/geo_to_kml.py similarity index 100% rename from tools/preprocessing/geo_to_kml.py rename to tools/mesonh/preprocessing/geo_to_kml.py diff --git a/tools/preprocessing/getBGFromCFCase.py b/tools/mesonh/preprocessing/getBGFromCFCase.py similarity index 100% rename from tools/preprocessing/getBGFromCFCase.py rename to tools/mesonh/preprocessing/getBGFromCFCase.py diff --git a/tools/preprocessing/indexRVB.html b/tools/mesonh/preprocessing/indexRVB.html similarity index 100% rename from tools/preprocessing/indexRVB.html rename to tools/mesonh/preprocessing/indexRVB.html diff --git a/tools/preprocessing/kmlDomain.py b/tools/mesonh/preprocessing/kmlDomain.py similarity index 100% rename from tools/preprocessing/kmlDomain.py rename to tools/mesonh/preprocessing/kmlDomain.py diff --git a/tools/preprocessing/learnFuelTifPng.py b/tools/mesonh/preprocessing/learnFuelTifPng.py similarity index 100% rename from tools/preprocessing/learnFuelTifPng.py rename to tools/mesonh/preprocessing/learnFuelTifPng.py diff --git a/tools/preprocessing/lidar2fuel.py b/tools/mesonh/preprocessing/lidar2fuel.py similarity index 100% rename from tools/preprocessing/lidar2fuel.py rename to tools/mesonh/preprocessing/lidar2fuel.py diff --git a/tools/preprocessing/prealCF2Case.py b/tools/mesonh/preprocessing/prealCF2Case.py similarity index 100% rename from tools/preprocessing/prealCF2Case.py rename to tools/mesonh/preprocessing/prealCF2Case.py diff --git a/tools/preprocessing/satImage2fuel.py b/tools/mesonh/preprocessing/satImage2fuel.py similarity index 100% rename from tools/preprocessing/satImage2fuel.py rename to tools/mesonh/preprocessing/satImage2fuel.py diff --git a/tools/preprocessing/tifToPngFuel.py b/tools/mesonh/preprocessing/tifToPngFuel.py similarity index 100% rename from tools/preprocessing/tifToPngFuel.py rename to tools/mesonh/preprocessing/tifToPngFuel.py diff --git a/tools/preprocessing/upDirHDR.py b/tools/mesonh/preprocessing/upDirHDR.py similarity index 100% rename from tools/preprocessing/upDirHDR.py rename to tools/mesonh/preprocessing/upDirHDR.py diff --git a/tools/sampleUses.py b/tools/mesonh/sampleUses.py similarity index 100% rename from tools/sampleUses.py rename to tools/mesonh/sampleUses.py