Inputs definition

Import libraries

First of all, we load the necessary pre-processing libraries such as:

  • pyvista

  • xarray

  • jigsaw

  • meshio

import os
import sys
import meshio
import meshplex
import jigsawpy
import numpy as np
import pandas as pd
import xarray as xr

from scipy import ndimage
from scipy import interpolate
from scipy.ndimage.filters import gaussian_filter

from time import process_time
from gospl._fortran import definegtin

import matplotlib
import pyvista as pv
import matplotlib.pyplot as plt

label_size = 7
matplotlib.rcParams['xtick.labelsize'] = label_size
matplotlib.rcParams['ytick.labelsize'] = label_size
matplotlib.rc('font', size=6)

%matplotlib inline
%config InlineBackend.figure_format = 'svg'

Unstructured global mesh construction

We first define a folder where input files will be stored:

# Resolution of the region of interest in km
res_mesh = 25

input_path = "input"+str(res_mesh)+"km" 
if not os.path.exists(input_path):
    os.makedirs(input_path)

This example focus on the Gulf of Mexico and we specify the extent of the region of interest.

Note

We define a region which encapsulate the large basins which drains into the Gulf.

# Longitudinal extent
gom_lon = [-135, -45]

# Latitudinal extent
gom_lat = [10, 80]

Jigsaw processing folder

The Jigsaw library requires an initial mesh. In our case we work with global dataset and we define an ellipsoid-grid with a 1 degree resolution containing a single variable set to:

  • -100 outside the region of interest,

  • 100 in the specified region and

  • 0 on the border of the region (5 degree width).

This grid is built with the buildRegMesh function defined below:

def buildRegMesh(region_lon, region_lat, outfile, glon=181, glat=91):
    '''
    Create a lon/lat regular grid with values set to -100 everywhere except
    within the specified region where it is set to 100 and within 5 degree
    surrounding the region where it is set to 0.
    
    :arg region_lon: longitudinal extent 
    :arg region_lat: latitudinal extent  
    :arg outfile: name of the output file
    :arg glon: number of points along the longitudes (default: 181)
    :arg glat: number of points along the latitudes (default: 91)
    
    '''
    lon = np.linspace(-180.0, 180, glon)
    lat = np.linspace(-90.0, 90, glat)
    zval = np.zeros((glon, glat))
    ds = xr.Dataset(
                {"z": (["longitude", "latitude"], zval),},
                coords={
                    "longitude": (["longitude"], lon),
                    "latitude": (["latitude"], lat),
                },
                )
    
    lo = ds.coords["longitude"]
    la = ds.coords["latitude"]
    ds["flag"] = xr.full_like(ds.z, fill_value=-100)
    ds["flag"].loc[dict(longitude=lo[(lo > region_lon[0]-5.) 
                                     & (lo < region_lon[1]+5.)], 
                     latitude=la[(la > region_lat[0]-5.) 
                                 & (la < region_lat[1]+5.)])] = 0
    
    
    ds["flag"].loc[dict(longitude=lo[(lo > region_lon[0]) 
                                     & (lo < region_lon[1])], 
                     latitude=la[(la > region_lat[0]) 
                                 & (la < region_lat[1])])] = 100
    
    fval = ds["flag"].values.flatten()
    
    f = open(outfile, "w+")
    with open(outfile, 'w') as f:
        f.write("mshid=3;ellipsoid-grid\n")
        f.write("mdims=2\n")

        f.write("coord=1;%d\n" % (len(lon)))
        f.write("\n".join(map(str, lon)))
        
        f.write("\ncoord=2;%d\n" % (len(lat)))
        f.write("\n".join(map(str, lat)))
        
        f.write("\nvalue=%d;1\n" % (len(fval)))
        f.write("\n".join(map(str, fval)))

    f.close()

    return ds

Let’s call the function:

regfile = os.path.join(input_path, "topo.msh")
ds = buildRegMesh(gom_lon, gom_lat, regfile)

Building the unstructured grid

We will now use jigsaw to generate the unstructured mesh from our regular grid…

To do so we define a new function unstructuredMesh which takes 3 arguments. The first 2 specify the created jigsaw regular file name and directory. The last one hfn defines the space conditions for the jigsaw algorithm and consists of 3 values:

  • the spacing in km for the unstructured mesh where the regular grid input defined previously is equal to -100,

  • the spacing in km for the unstructured mesh where the regular grid input defined previously is equal to 0, + the spacing in km for region set to 100.

def unstructuredMesh(dst_path, regfile, hfn):
    '''
    Unstructured mesh generated with `jigsaw` from a regular grid defined with values set to -100,0 and 100.
    
    :arg dst_path: name of the folder containing the `jigsaw` files same as the regular grid one
    :arg regfile: name of the regular grid defined in the previous function
    :arg hfn: space conditions for the jigsaw algorithm
    
    '''

    meshfile = os.path.join(dst_path, "mesh.msh")
    spacefile = os.path.join(dst_path, "spac.msh")
    outfile = os.path.join(dst_path, "mesh.vtk")

    t0 = process_time()
    opts = jigsawpy.jigsaw_jig_t()
    topo = jigsawpy.jigsaw_msh_t()
    geom = jigsawpy.jigsaw_msh_t()
    mesh = jigsawpy.jigsaw_msh_t()
    hmat = jigsawpy.jigsaw_msh_t()

    jigsawpy.loadmsh(regfile, topo)
    print("Load topography grid (%0.02f seconds)" % (process_time() - t0))

    t0 = process_time()
    opts.geom_file = os.path.join(dst_path, "topology.msh")
    opts.jcfg_file = os.path.join(dst_path, "config.jig")
    opts.mesh_file = meshfile
    opts.hfun_file = spacefile

    geom.mshID = "ellipsoid-mesh"
    geom.radii = np.full(3, 6.371e003, dtype=geom.REALS_t)
    jigsawpy.savemsh(opts.geom_file, geom)

    hmat.mshID = "ellipsoid-grid"
    hmat.radii = geom.radii
    hmat.xgrid = topo.xgrid * np.pi / 180.0
    hmat.ygrid = topo.ygrid * np.pi / 180.0

    # Set HFUN gradient-limiter
    hmat.value = np.full(topo.value.shape, hfn[0], dtype=hmat.REALS_t)
    hmat.value[topo.value == 0] = hfn[1]
    hmat.value[topo.value > 10] = hfn[2]

    hmat.slope = np.full(topo.value.shape, +0.050, dtype=hmat.REALS_t)
    jigsawpy.savemsh(opts.hfun_file, hmat)
    jigsawpy.cmd.marche(opts, hmat)
    print("Build space function (%0.02f seconds)" % (process_time() - t0))

    t0 = process_time()
    opts.hfun_scal = "absolute"
    opts.hfun_hmax = float("inf")  # null HFUN limits
    opts.hfun_hmin = float(+0.00)

    opts.mesh_dims = +2  # 2-dim. simplexes

    opts.optm_qlim = +9.5e-01  # tighter opt. tol
    opts.optm_iter = +32
    opts.optm_qtol = +1.0e-05

    jigsawpy.cmd.tetris(opts, 3, mesh)
    print("Perform triangulation (%0.02f seconds)" % (process_time() - t0))

    t0 = process_time()
    apos = jigsawpy.R3toS2(geom.radii, mesh.point["coord"][:])

    apos = apos * 180.0 / np.pi

    zfun = interpolate.RectBivariateSpline(topo.ygrid, topo.xgrid, topo.value)

    mesh.value = zfun(apos[:, 1], apos[:, 0], grid=False)

    jigsawpy.savevtk(outfile, mesh)
    jigsawpy.savemsh(opts.mesh_file, mesh)
    print("Get unstructured mesh (%0.02f seconds)" % (process_time() - t0))

    return

Let’s define the resolution for our unstructured mesh.

Here, we will chose a coarse resolution of 150000 km outside of the region of interest, 100 km around the region and 25 km within the region.

hfn = np.zeros(3)
hfn[0] = 150000.
hfn[1] = 100.
hfn[2] = float(res_mesh)

print('Chosen resolution in km',hfn)
Chosen resolution in km [1.5e+05 1.0e+02 2.5e+01]

We now call jigsaw meshing function…

Caution

This function might takes some times if you choose a fine resolution (<10 km) so be careful!

unstructuredMesh(input_path, regfile, hfn)
Load topography grid (0.01 seconds)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# MARCHE: "fast-marching" eikonal equation solver.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac.msh 
  INIT-FILE =  
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (4.70e-05sec)

#------------------------------------------------------------

  Reading FFUN file...

  Done. (5.64e-03sec)

#------------------------------------------------------------

  Forming FFUN data...

  Done. (2.10e-05sec)

#------------------------------------------------------------

  Fast-march solver...

  Done. (1.08e-02sec)

#------------------------------------------------------------

  Writing FFUN file...

  Done. (1.52e-02sec)

Build space function (0.03 seconds)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE =  
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (4.97e-04sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (4.40e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (7.10e-04sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.69e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
       1901            0         3814            0

  Done. (3.40e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (1.67e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1906            5           17            0
       1880            0            1            0
       1869            0            0            0
       1871            0            0            0
       1885            0            0            0
       1877            0            0            0
       1879            0            0            0
       1862            0            0            0
       1836            0            0            0
       1833            0            0            0
       1841            0            0            0
       1833            0            0            0
       1834            0            0            0
       1831            0            0            0
       1833            0            0            0
       1839            0            0            0
       1815            0            0            0
       1813            0            0            0
       1803            0            0            0
       1792            0            0            0
       1789            0            0            0
       1753            0            0            0
       1714            0            0            0
       1661            0            0            0
       1628            0            0            0
       1550            0            0            0
       1477            0            0            0
       1419            0            0            0
       1273            0            0            0
       1229            0            0            0
       1095            0            0            0
        983            0            0            0

  Done. (1.38e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (6.80e-03sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.50e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.40e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.40e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (8.44e-04sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.84e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        721            0         3832            0

  Done. (2.16e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (1.58e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1885            1           14            0
       1874            0            2            0
       1880            0            1            0
       1884            0            1            0
       1878            0            0            0
       1876            0            0            0
       1875            0            0            0
       1876            0            0            0
       1875            0            0            0
       1858            0            0            0
       1842            0            0            0
       1812            0            0            0
       1787            0            0            0
       1698            0            0            0
       1613            0            0            0
       1518            0            0            0
       1445            0            0            0
       1312            0            0            0
       1151            0            0            0
       1124            0            0            0
       1081            0            0            0
        954            0            0            0
        960            0            0            0
        902            0            0            0
        796            0            0            0
        759            0            0            0
        714            0            0            0
        616            0            0            0
        527            0            0            0
        436            0            0            0
        315            0            0            0
        265            0            0            0

  Done. (1.36e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (6.90e-03sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.50e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (8.99e-04sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.83e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        623            0         3830            0

  Done. (2.08e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (1.59e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1828            2           10            0
       1849            0            1            0
       1856            0            0            0
       1854            0            0            0
       1848            0            0            0
       1849            0            0            0
       1830            0            0            0
       1818            0            0            0
       1780            0            0            0
       1753            0            0            0
       1680            0            0            0
       1609            0            0            0
       1550            0            0            0
       1474            0            0            0
       1385            0            0            0
       1259            0            0            0
       1111            0            0            0
       1104            0            0            0
        993            0            0            0
        922            0            0            0
        896            0            0            0
        837            0            0            0
        774            0            0            0
        763            0            0            0
        705            0            0            0
        726            0            0            0
        643            0            0            0
        635            0            0            0
        557            0            0            0
        502            0            0            0
        465            0            0            0
        331            0            0            0

  Done. (1.38e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (6.93e-03sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.20e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.60e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.60e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (9.52e-04sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.67e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        543            0         3838            0

  Done. (1.98e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (1.55e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1863            0            5            0
       1865            0            0            0
       1862            0            0            0
       1859            0            0            0
       1852            0            0            0
       1836            0            0            0
       1839            0            1            0
       1838            0            0            0
       1826            0            0            0
       1776            0            0            0
       1739            0            0            0
       1735            0            0            0
       1667            0            0            0
       1650            0            0            0
       1643            0            0            0
       1560            0            0            0
       1533            0            0            0
       1454            0            0            0
       1376            0            0            0
       1346            0            0            0
       1228            0            0            0
       1120            0            0            0
       1031            0            0            0
        914            0            0            0
        933            0            0            0
        878            0            0            0
        727            0            0            0
        677            0            0            0
        572            0            0            0
        446            0            0            0
        369            0            0            0
        337            0            0            0

  Done. (1.40e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (6.94e-03sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.50e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.40e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (9.35e-04sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.83e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        535            0         3830            0

  Done. (1.98e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (1.59e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1803            0            6            0
       1809            0            0            0
       1792            0            0            0
       1791            0            0            0
       1768            0            0            0
       1801            0            0            0
       1804            0            0            0
       1814            0            0            0
       1814            0            0            0
       1773            0            0            0
       1732            0            0            0
       1688            0            0            0
       1583            0            0            0
       1496            0            0            0
       1409            0            0            0
       1318            0            0            0
       1201            0            0            0
       1110            0            0            0
        921            0            0            0
        841            0            0            0
        731            0            0            0
        567            0            0            0
        517            0            0            0
        456            0            0            0
        322            0            0            0
        240            0            0            0
        186            0            0            0
        110            0            0            0
        148            0            0            0
         84            0            0            0
         28            0            0            0
          7            0            0            0

  Done. (1.26e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (6.94e-03sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (1.65e-04sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (4.20e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (3.80e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (2.83e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (6.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (1.16e-02sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (4.70e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        518            0         3854            0

  Done. (5.89e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (4.71e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1731            1            8            0
       1826            0            0            0
       1893            0            0            0
       1885            0            0            0
       1881            0            0            0
       1865            0            0            0
       1820            0            0            0
       1749            0            0            0
       1643            0            0            0
       1581            0            0            0
       1489            0            0            0
       1392            0            0            0
       1243            0            0            0
       1114            0            0            0
       1056            0            0            0
        970            0            0            0
        875            0            0            0
        852            0            0            0
        778            0            0            0
        755            0            0            0
        650            0            0            0
        596            0            0            0
        483            0            0            0
        432            0            0            0
        425            0            0            0
        290            0            0            0
        222            0            0            0
        138            0            0            0
        103            0            0            0
        121            0            0            0
        138            0            0            0
        147            0            0            0

  Done. (3.71e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (2.08e-02sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.40e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (9.81e-04sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.85e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        484            0         3858            0

  Done. (1.93e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (1.61e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1715            0            8            0
       1728            0            0            0
       1751            0            0            0
       1777            0            0            0
       1788            0            0            0
       1813            0            0            0
       1803            0            0            0
       1747            0            0            0
       1607            0            0            0
       1502            0            0            0
       1441            0            0            0
       1355            0            0            0
       1327            0            0            0
       1285            0            0            0
       1266            0            0            0
       1200            0            0            0
       1138            0            0            0
       1157            0            0            0
       1109            0            0            0
        978            0            0            0
        956            0            0            0
        922            0            0            0
        842            0            0            0
        762            0            0            0
        696            0            0            0
        566            0            0            0
        508            0            0            0
        430            0            0            0
        486            0            0            0
        327            0            0            0
        292            0            0            0
        229            0            0            0

  Done. (1.37e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (6.99e-03sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.00e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (1.02e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.87e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        484            0         3850            0

  Done. (1.95e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (1.60e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1820            0            2            0
       1869            0            0            0
       1886            0            0            0
       1882            0            0            0
       1871            0            1            0
       1877            0            0            0
       1878            0            0            0
       1860            0            0            0
       1825            0            0            0
       1823            0            0            0
       1784            0            0            0
       1751            0            0            0
       1686            0            0            0
       1592            0            0            0
       1415            0            0            0
       1278            0            0            0
       1134            0            0            0
       1027            0            0            0
        810            0            0            0
        761            0            0            0
        665            0            0            0
        592            0            0            0
        535            0            0            0
        510            0            0            0
        489            0            0            0
        409            0            0            0
        402            0            0            0
        328            0            0            0
        293            0            0            0
        256            0            0            0
        197            0            0            0
        166            0            0            0

  Done. (1.36e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (6.98e-03sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (5.90e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.70e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (1.01e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.66e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        451            0         3862            0

  Done. (1.89e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (1.60e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1757            0            8            0
       1781            0            0            0
       1736            0            0            0
       1713            0            0            0
       1694            0            0            0
       1650            0            0            0
       1625            0            0            0
       1548            0            0            0
       1518            0            0            0
       1502            0            0            0
       1475            0            0            0
       1351            0            0            0
       1308            0            0            0
       1161            0            0            0
       1099            0            0            0
        869            0            0            0
        758            0            0            0
        626            0            0            0
        409            0            0            0
        335            0            0            0
        245            0            0            0
        149            0            0            0
        141            0            0            0
        123            0            0            0
         61            0            0            0
         60            0            0            0
         29            0            0            0
          8            0            0            0
          1            0            0            0
          0            0            0            0

  Done. (1.07e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (6.98e-03sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.40e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.40e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (1.06e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.66e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        411            0         3856            0

  Done. (1.83e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (1.59e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1707            1            2            0
       1750            0            0            0
       1681            0            0            0
       1615            0            0            0
       1638            0            0            0
       1658            0            0            0
       1691            0            0            0
       1618            0            0            0
       1584            0            0            0
       1523            0            0            0
       1493            0            0            0
       1326            0            0            0
       1275            0            0            0
       1135            0            0            0
        861            0            0            0
        866            0            0            0
        716            0            0            0
        614            0            0            0
        514            0            0            0
        458            0            0            0
        425            0            0            0
        299            0            0            0
        233            0            0            0
        153            0            0            0
        161            0            0            0
        103            0            0            0
         90            0            0            0
         77            0            0            0
         66            0            0            0
         54            0            0            0
         18            0            0            0
          9            0            0            0

  Done. (1.16e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (6.98e-03sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.40e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.20e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (1.05e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.66e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.70e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        404            0         3872            0

  Done. (1.85e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (1.60e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1738            1            7            0
       1812            1            1            0
       1799            0            0            0
       1809            0            0            0
       1803            0            0            0
       1808            0            0            0
       1781            0            0            0
       1771            0            0            0
       1744            0            0            0
       1754            0            0            0
       1765            0            0            0
       1785            0            0            0
       1766            0            0            0
       1715            0            0            0
       1655            0            0            0
       1656            0            0            0
       1549            0            0            0
       1446            0            0            0
       1334            0            0            0
       1275            0            0            0
       1217            0            0            0
       1092            0            0            0
       1090            0            0            0
       1061            0            0            0
        961            0            0            0
       1051            0            0            0
        951            0            0            0
        912            0            0            0
        847            0            0            0
        838            0            0            0
        820            0            0            0
        812            0            0            0

  Done. (1.45e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (7.01e-03sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.30e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.50e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (1.06e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.66e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.70e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        381            0         3866            0

  Done. (1.80e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (1.62e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       1804            0            3            0
       1827            0            0            0
       1819            0            0            0
       1804            0            0            0
       1773            0            0            0
       1751            0            0            0
       1750            0            0            0
       1751            0            0            0
       1716            0            0            0
       1668            0            0            0
       1652            0            0            0
       1606            0            0            0
       1560            0            0            0
       1543            0            0            0
       1522            0            0            0
       1473            0            0            0
       1411            0            0            0
       1344            0            0            0
       1312            0            0            0
       1204            0            0            0
       1237            0            0            0
       1155            0            0            0
       1059            0            0            0
        967            0            0            0
        893            0            0            0
        824            0            0            0
        752            0            0            0
        696            0            0            0
        692            0            0            0
        649            0            0            0
        504            0            0            0
        478            0            0            0

  Done. (1.48e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (7.02e-03sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.60e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.40e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (5.24e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (7.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.74e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (2.00e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
         13            0        15440            0

  Done. (5.68e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (7.64e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       7130            0            0            0
       5908            0            0            0
       5656            0            0            0
       5247            0            0            0
       4603            0            0            0
       4212            0            0            0
       3916            0            0            0
       3950            0            0            0
       4009            0            0            0
       3937            0            0            0
       3888            0            0            0
       3765            0            0            0
       3642            0            0            0
       3391            0            0            0
       3115            0            0            0
       2779            0            0            0
       2341            0            0            0
       2072            0            0            0
       1838            0            0            0
       1640            0            0            0
       1455            0            0            0
       1289            0            0            0
       1208            0            0            0
        993            0            0            0
        930            0            0            0
        614            0            0            0
        478            0            0            0
        517            0            0            0
        419            0            0            0
        372            0            0            0
        272            0            0            0
        196            0            0            0

  Done. (4.10e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (2.75e-02sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.50e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.10e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (5.12e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (7.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.79e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
         53            0        15438            0

  Done. (5.30e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (7.57e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
        752            0            0            0
        969            0            0            0
       1093            0            0            0
       1108            0            0            0
       1137            0            0            0
       1048            0            0            0
       1051            0            0            0
        855            0            0            0
        676            0            0            0
        537            0            0            0
        396            0            0            0
        273            0            0            0
        216            0            0            0
        199            0            0            0
        157            0            0            0
        157            0            0            0
        116            0            0            0
         70            0            0            0
         66            0            0            0
         64            0            0            0
         49            0            0            0
         36            0            0            0
         21            0            0            0
         12            0            0            0
          5            0            0            0
          4            0            0            0
          0            0            0            0

  Done. (1.33e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (2.75e-02sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.90e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.40e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.60e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (5.25e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (7.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.61e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
         50            0        15434            0

  Done. (5.53e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (7.58e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
        811            0            0            0
       1257            0            0            0
       1416            0            0            0
       1390            0            0            0
       1553            0            0            0
       1553            0            0            0
       1534            0            0            0
       1447            0            0            0
       1270            0            0            0
       1122            0            0            0
       1080            0            0            0
        844            0            0            0
        747            0            0            0
        579            0            0            0
        419            0            0            0
        313            0            0            0
        277            0            0            0
        293            0            0            0
        272            0            0            0
        240            0            0            0
        198            0            0            0
        133            0            0            0
        117            0            0            0
        122            0            0            0
         95            0            0            0
         60            0            0            0
         24            0            0            0
         19            0            0            0
         21            0            0            0
          8            0            0            0
          2            0            0            0
          0            0            0            0

  Done. (1.96e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (2.75e-02sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (7.80e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (5.17e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (7.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.78e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (2.00e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
         42            0        15426            0

  Done. (5.37e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (7.72e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
        793            0            1            0
       1286            0            0            0
       1513            0            0            0
       1605            0            0            0
       1730            0            0            0
       1779            0            0            0
       1762            0            0            0
       1648            0            0            0
       1453            0            0            0
       1271            0            0            0
        988            0            0            0
        907            0            0            0
        761            0            0            0
        614            0            0            0
        447            0            0            0
        370            0            0            0
        276            0            0            0
        202            0            0            0
        194            0            0            0
        155            0            0            0
        149            0            0            0
         54            0            0            0
         23            0            0            0
         21            0            0            0
         23            0            0            0
          0            0            0            0

  Done. (1.75e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (2.75e-02sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.20e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.70e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (5.23e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (7.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.62e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
         46            0        15426            0

  Done. (5.52e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (7.57e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
        837            0            1            0
       1311            0            0            0
       1586            0            0            0
       1804            0            0            0
       1876            0            0            0
       1923            0            0            0
       1935            0            0            0
       1775            0            0            0
       1721            0            0            0
       1466            0            0            0
       1384            0            0            0
       1266            0            0            0
       1017            0            0            0
        946            0            0            0
        851            0            0            0
        821            0            0            0
        628            0            0            0
        484            0            0            0
        303            0            0            0
        252            0            0            0
        221            0            0            0
        247            0            0            0
        297            0            0            0
        301            0            0            0
        234            0            0            0
        228            0            0            0
        197            0            0            0
        179            0            0            0
        130            0            0            0
        109            0            0            0
         71            0            0            0
         64            0            0            0

  Done. (2.43e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (2.75e-02sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (7.10e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.70e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (5.50e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (7.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.77e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (2.10e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
         40            0        15424            0

  Done. (5.30e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (7.48e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
        649            0            0            0
        753            0            0            0
        754            0            0            0
        695            0            0            0
        577            0            0            0
        538            0            0            0
        356            0            0            0
        274            0            0            0
        159            0            0            0
         84            0            0            0
         60            0            0            0
         50            0            0            0
         11            0            0            0
          0            0            0            0

  Done. (8.10e-01sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (2.75e-02sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (8.20e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.70e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (5.34e-03sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (7.00e-06sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.81e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (2.00e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
         40            0        15422            0

  Done. (5.51e-02sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (7.52e-03sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
        661            0            0            0
       1057            0            0            0
       1179            0            0            0
       1221            0            0            0
       1401            0            0            0
       1446            0            0            0
       1401            0            0            0
       1523            0            0            0
       1453            0            0            0
       1386            0            0            0
       1289            0            0            0
        999            0            0            0
        742            0            0            0
        653            0            0            0
        705            0            0            0
        517            0            0            0
        419            0            0            0
        397            0            0            0
        279            0            0            0
        191            0            0            0
        214            0            0            0
        182            0            0            0
        182            0            0            0
        102            0            0            0
        105            0            0            0
        104            0            0            0
         65            0            0            0
         69            0            0            0
         73            0            0            0
         65            0            0            0
         30            0            0            0
         12            0            0            0

  Done. (2.00e+00sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (2.75e-02sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.90e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (2.03e-02sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.70e-05sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.90e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (2.10e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        536            0        61750            0

  Done. (2.32e-01sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (3.41e-02sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
      25732            0            4            0
      17292            0            0            0
      16951            0            0            0
      16142            0            0            0
      15509            0            0            0
      15188            0            0            0
      14875            0            0            0
      14092            0            0            0
      12693            0            0            0
      11443            0            0            0
      10155            0            0            0
       8794            0            0            0
       7516            0            0            0
       6541            0            0            0
       5479            0            0            0
       4752            0            0            0
       4105            0            0            0
       3457            0            0            0
       2768            0            0            0
       2350            0            0            0
       1920            0            0            0
       1501            0            0            0
       1227            0            0            0
       1231            0            0            0
       1017            0            0            0
       1005            0            0            0
        855            0            0            0
        736            0            0            0
        576            0            0            0
        386            0            0            0
        337            0            0            0
        290            0            0            0

  Done. (1.41e+01sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (1.10e-01sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.40e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.20e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (1.97e-02sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.50e-05sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.83e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (2.10e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        716            0        61778            0

  Done. (2.28e-01sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (3.54e-02sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       9358            0            2            0
      10917            0            0            0
      11653            0            0            0
      12056            0            0            0
      12639            0            0            0
      12572            0            0            0
      12158            0            0            0
      11376            0            0            0
      10064            0            0            0
       9001            0            0            0
       7704            0            0            0
       6709            0            0            0
       5726            0            0            0
       4837            0            0            0
       3804            0            0            0
       3147            0            0            0
       2713            0            0            0
       2584            0            0            0
       2218            0            0            0
       1756            0            0            0
       1557            0            0            0
       1404            0            0            0
       1423            0            0            0
       1307            0            0            0
       1076            0            0            0
        821            0            0            0
        705            0            0            0
        614            0            0            0
        399            0            0            0
        438            0            0            0
        332            0            0            0
        384            0            0            0

  Done. (1.35e+01sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (1.11e-01sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.30e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (1.95e-02sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.30e-05sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.76e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (2.00e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        833            0        61792            0

  Done. (2.33e-01sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (3.31e-02sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       9801            0            7            0
      11147            0            1            0
      12030            0            0            0
      12406            0            0            0
      12788            0            0            0
      13093            0            0            0
      12485            0            0            0
      11814            0            0            0
      10520            0            0            0
       9052            0            0            0
       7613            0            0            0
       6428            0            0            0
       5220            0            0            0
       4341            0            0            0
       3599            0            0            0
       2844            0            0            0
       2206            0            0            0
       1850            0            0            0
       1571            0            0            0
       1410            0            0            0
       1044            0            0            0
        906            0            0            0
        655            0            0            0
        429            0            0            0
        268            0            0            0
        209            0            0            0
        224            0            0            0
        143            0            0            0
        154            0            0            0
         86            0            0            0
         33            0            0            0
         29            0            0            0

  Done. (1.29e+01sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (1.10e-01sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.50e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.50e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.60e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (1.99e-02sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (2.50e-05sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.85e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (2.10e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
        890            0        61778            0

  Done. (2.30e-01sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (3.59e-02sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       8826            1            1            0
       9749            0            1            0
       9915            0            0            0
       9971            0            0            0
      10309            0            0            0
      10271            0            0            0
       9958            0            0            0
       9177            0            0            0
       8018            0            0            0
       6941            0            0            0
       5962            0            0            0
       4885            0            0            0
       4236            0            0            0
       3697            0            0            0
       3093            0            0            0
       2581            0            0            0
       2059            0            0            0
       1753            0            0            0
       1547            0            0            0
       1305            0            0            0
       1102            0            0            0
        900            0            0            0
        839            0            0            0
        674            0            0            0
        554            0            0            0
        456            0            0            0
        426            0            0            0
        376            0            0            0
        270            0            0            0
        155            0            0            0
        116            0            0            0
        108            0            0            0

  Done. (1.20e+01sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (1.11e-01sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (7.00e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.70e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.80e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (8.02e-02sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (1.10e-04sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.85e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (2.00e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
         26            0       247104            0

  Done. (9.90e-01sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (2.15e-01sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
      91011            0            2            0
      39883            0            0            0
      31794            0            0            0
      25939            0            0            0
      22419            0            0            0
      18513            0            0            0
      15149            0            0            0
      11723            0            0            0
       8831            0            0            0
       6695            0            0            0
       5446            0            0            0
       4487            0            0            0
       3586            0            0            0
       2877            0            0            0
       2353            0            0            0
       1908            0            0            0
       1483            0            0            0
       1287            0            0            0
        882            0            0            0
        555            0            0            0
        682            0            0            0
        817            0            0            0
        773            0            0            0
        800            0            0            0
        851            0            0            0
        823            0            0            0
        646            0            0            0
        531            0            0            0
        393            0            0            0
        302            0            0            0
        238            0            0            0
        128            0            0            0

  Done. (3.03e+01sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (4.76e-01sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.20e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.20e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.90e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (7.99e-02sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (1.18e-04sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.74e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (2.20e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
         27            0       247098            0

  Done. (9.46e-01sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (2.63e-01sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       8339            0            2            0
       9245            0            0            0
       9010            0            0            0
       8878            0            0            0
       8856            0            0            0
       7812            0            0            0
       6552            0            0            0
       5158            0            0            0
       3879            0            0            0
       3018            0            0            0
       2133            0            0            0
       2037            0            0            0
       1800            0            0            0
       1536            0            0            0
       1244            0            0            0
        987            0            0            0
        891            0            0            0
        758            0            0            0
        545            0            0            0
        460            0            0            0
        381            0            0            0
        253            0            0            0
        191            0            0            0
        120            0            0            0
         99            0            0            0
         47            0            0            0
         16            0            0            0
         18            0            0            0
          7            0            0            0
          0            0            0            0

  Done. (1.73e+01sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (4.72e-01sec)
 
#------------------------------------------------------------
#
#   ,o, ,o,       /                                 
#    `   `  e88~88e  d88~\   /~~~8e Y88b    e    / 
#   888 888 88   88 C888         88b Y88b  d8b  /   
#   888 888 "8b_d8"  Y88b   e88~-888  Y888/Y88b/  
#   888 888  /        888D C88   888   Y8/  Y8/     
#   88P 888 Cb      \_88P   "8b_-888    Y    Y    
# \_8"       Y8""8D                             
#
#------------------------------------------------------------
# JIGSAW: an unstructured mesh generation library.  
#------------------------------------------------------------
 
  JIGSAW VERSION 0.9.14

  Reading CFG. file...

  CFG. data summary...

  GEOM-FILE = input25km/topology.msh 
  MESH-FILE = input25km/mesh.msh 
  HFUN-FILE = input25km/spac-ITER.msh 
  INIT-FILE = input25km/mesh-INIT.msh 
  TRIA-FILE =  
  BNDS-FILE =  

  Done. (6.60e-05sec)

#------------------------------------------------------------

  Reading GEOM file...

  Done. (1.30e-05sec)

#------------------------------------------------------------

  Forming GEOM data...

  Done. (1.40e-05sec)

#------------------------------------------------------------

  Reading INIT file...

  Done. (8.00e-02sec)

#------------------------------------------------------------

  Forming INIT data...

  Done. (1.18e-04sec)

#------------------------------------------------------------

  Reading HFUN file...

  Done. (3.72e-03sec)

#------------------------------------------------------------

  Forming HFUN data...

  Done. (2.20e-05sec)

#------------------------------------------------------------

  Generate rDT MESH...

#------------------------------------------------------------
#    |ITER.|      |DEL-1|      |DEL-2|      |DEL-3| 
#------------------------------------------------------------
         22            0       247090            0

  Done. (9.62e-01sec)

#------------------------------------------------------------

  Forming MESH data...

  Done. (2.26e-01sec)

#------------------------------------------------------------

  MESH optimisation...

#------------------------------------------------------------
#    |MOVE.|      |FLIP.|      |MERGE|      |SPLIT| 
#------------------------------------------------------------
       7482            0            0            0
       8122            0            0            0
       7537            0            0            0
       7770            0            0            0
       7785            0            0            0
       7269            0            0            0
       6261            0            0            0
       4916            0            0            0
       3663            0            0            0
       2840            0            0            0
       1978            0            0            0
       1404            0            0            0
       1006            0            0            0
        874            0            0            0
        742            0            0            0
        651            0            0            0
        455            0            0            0
        265            0            0            0
        270            0            0            0
        169            0            0            0
        144            0            0            0
         78            0            0            0
         43            0            0            0
         17            0            0            0
         13            0            0            0
          2            0            0            0
          0            0            0            0

  Done. (1.61e+01sec)

#------------------------------------------------------------

  Writing MESH file...

  Done. (4.83e-01sec)
Perform triangulation (4.36 seconds)
Get unstructured mesh (1.05 seconds)

We will load the mesh properties in our jupyter notebook:

  • coordinates of each vertice

  • cells defining the connectivities

meshfile = os.path.join(input_path, "mesh.vtk")

umesh = meshio.read(meshfile)

coords = umesh.points
coords = (coords / 6.371e003) * 6378137.0
cells = umesh.cells_dict["triangle"]

Let’s visualise the mesh. After running the cell below you will be able to use the top left widget on the graph to select the surface with edges as shown below.

../_images/selectedges.png

Fig. 1 pyvista selecting edges

meshfile = os.path.join(input_path, "mesh.vtk")
mesh = pv.read(meshfile)

plotter = pv.PlotterITK()
plotter.add_mesh(mesh, scalars="value")

plotter.show()

Mapping elevations

Now that we have our unstructured mesh, we will interpolate the required variables on the new mesh. We will start with the elevation.

Note

As most of the available dataset are defined in lon/lat coordinates, we first define a function xyz2lonlat to perform the conversion between cartesian points of the spherical triangulation to lat/lon.

def xyz2lonlat(coords, radius=6378137.0):
    """
    Convert x,y,z representation of cartesian points of the
    spherical triangulation to lat/lon.
    """

    gLonLat = np.zeros((len(coords), 2))

    gLonLat[:, 1] = np.arcsin(coords[:, 2] / radius)
    gLonLat[:, 0] = np.arctan2(coords[:, 1], coords[:, 0])
    gLonLat[:, 1] = np.mod(np.degrees(gLonLat[:, 1]) + 90, 180.0)
    gLonLat[:, 0] = np.mod(np.degrees(gLonLat[:, 0]) + 180.0, 360.0)

    return gLonLat
lonlat = xyz2lonlat(coords, radius=6378137.0)

Here we chose to use the ETOPO5 topography file, obviously other elevation grids could be used.

The netcdf file for this specific dataset can be accessed via THREDDS protocol by specifying the related url

# Input dataset files

# etopo2
#infile = 'https://data.pmel.noaa.gov/pmel/thredds/dodsC/data/PMEL/smith_sandwell_topo_v8_2.nc'

# etopo5 url
infile = 'http://ferret.pmel.noaa.gov/pmel/thredds/dodsC/data/PMEL/etopo5.nc'

Transformation with xarray

We will use xarray library to open the file:

# Read topo
data = xr.open_dataset(infile)
data
<xarray.Dataset>
Dimensions:    (ETOPO05_X: 4320, ETOPO05_Y: 2161)
Coordinates:
  * ETOPO05_X  (ETOPO05_X) float64 0.0 0.08333 0.1667 0.25 ... 359.8 359.8 359.9
  * ETOPO05_Y  (ETOPO05_Y) float64 -90.0 -89.92 -89.83 ... 89.83 89.92 90.0
Data variables:
    ROSE       (ETOPO05_Y, ETOPO05_X) float32 ...
Attributes:
    history:        FERRET V5.22   27-Apr-01, from IRI/LDEO worldbath.nc
    IRI_LDEO_note:  updated 27 Feb 1998 from NGDC CD-ROM 29 April 1993

We will first regrid the longitude (ETOPO05_X) to match with our jigsaw unstructured mesh (i.e between -180 and 180 instead of 0 to 360)

data.coords['ETOPO05_X'] = (data.coords['ETOPO05_X'] + 180) % 360 - 180
data = data.sortby(data.ETOPO05_X)
data
<xarray.Dataset>
Dimensions:    (ETOPO05_X: 4320, ETOPO05_Y: 2161)
Coordinates:
  * ETOPO05_X  (ETOPO05_X) float64 -180.0 -179.9 -179.8 ... 179.8 179.8 179.9
  * ETOPO05_Y  (ETOPO05_Y) float64 -90.0 -89.92 -89.83 ... 89.83 89.92 90.0
Data variables:
    ROSE       (ETOPO05_Y, ETOPO05_X) float32 ...
Attributes:
    history:        FERRET V5.22   27-Apr-01, from IRI/LDEO worldbath.nc
    IRI_LDEO_note:  updated 27 Feb 1998 from NGDC CD-ROM 29 April 1993

We will now only take into account the elevation within our specified region

# We define a new variable newz
data = data.assign(newz=data["ROSE"])

# We mask all values not in the specified region
mask = ((data.coords["ETOPO05_Y"] > gom_lat[0]) & (data.coords["ETOPO05_Y"] < gom_lat[1])
        & (data.coords["ETOPO05_X"] > gom_lon[0]) & (data.coords["ETOPO05_X"] < gom_lon[1]))

# We set all values not in the specified region with an elevation of -10000.
data["newz"] = xr.where(np.logical_not(mask), -10000, data["newz"])
dataArray = data["newz"].values.T

Interpolate on the unstructured mesh

Once the elevation array has been built, we now interpolate from the regular dataset to the unstructured mesh:

# We can apply a smoothing on the dataset if needed...
dataArray = ndimage.gaussian_filter(dataArray, sigma=0.1)

# Map regular mesh lon/lat 
ilons = dataArray.shape[0] * lonlat[:, 0] / float(dataArray.shape[0])
ilats = dataArray.shape[1] * lonlat[:, 1] / float(dataArray.shape[1])

# Create the regular grid coordinates and store it as rcoords
icoords = np.stack((ilons, ilats))
rlons = icoords[0, :] * dataArray.shape[0] / 360.0
rlats = icoords[1, :] * dataArray.shape[1] / 180.0

rcoords = np.zeros(icoords.shape)
rcoords[0, :] = rlons
rcoords[1, :] = rlats

Interpolate the elevations on the global unstructured mesh:

meshz = ndimage.map_coordinates(dataArray, rcoords, order=2, 
                                mode="nearest").astype(float)

Save elevation grid on disk

We now build gospl unstructured mesh input for the elevation data which needs to be a Numpy compressed file containing:

  • mesh coordinates,

  • cells,

  • each vertice neighbours indices and

  • the nodes elevation,

# Set meshplex triangular mesh
Gmesh = meshplex.MeshTri(coords, cells)
s = Gmesh.idx_hierarchy.shape
a = np.sort(Gmesh.idx_hierarchy.reshape(s[0], -1).T)
Gmesh.edges = {"points": np.unique(a, axis=0)}

# Get each vertice neighbours indices
ngbNbs, ngbID = definegtin(len(coords), Gmesh.cells("points"), 
                           Gmesh.edges["points"])

Store the file in an input folder for gospl run (here called gospl_data):

# gospl input files directory
mesh_path = "gospl_data" 
if not os.path.exists(mesh_path):
    os.makedirs(mesh_path)

# Set elevation file name
elevfname = os.path.join(mesh_path, "mesh"+str(res_mesh)+"km")


# Save the mesh as compressed numpy file for gospl
np.savez_compressed(elevfname, v=coords, c=cells, n=ngbID[:, :8].astype(int), 
                    z=meshz)

Mapping rainfall

We will now load a precipitation grid and interpolate the dataset on the unstructured mesh.

Here we chose the CPC collection of precipitation data sets (2.5°x2.5°) containing global monthly values since 1979.

The netcdf file for our dataset can be accessed via THREDDS protocol by specifying the related url:

# Input dataset file url
ncfile = 'https://psl.noaa.gov/thredds/dodsC/Datasets/cmap/enh/precip.mon.mean.nc'

Transformation with xarray

Here again we will use xarray to open the file and perform several changes on the dataset:

# Read rain
dr = xr.open_dataset(ncfile)
dr
<xarray.Dataset>
Dimensions:  (lat: 72, lon: 144, time: 510)
Coordinates:
  * lat      (lat) float32 88.75 86.25 83.75 81.25 ... -83.75 -86.25 -88.75
  * lon      (lon) float32 1.25 3.75 6.25 8.75 11.25 ... 351.2 353.8 356.2 358.8
  * time     (time) datetime64[ns] 1979-01-01 1979-02-01 ... 2021-06-01
Data variables:
    precip   (time, lat, lon) float32 ...
Attributes:
    Conventions:                     COARDS
    title:                           CPC Merged Analysis of Precipitation (in...
    platform:                        Analyses
    source:                          ftp ftp.cpc.ncep.noaa.gov precip/cmap/mo...
    dataset_title:                   CPC Merged Analysis of Precipitation
    documentation:                   https://www.esrl.noaa.gov/psd/data/gridd...
    date_modified:                   26 Feb 2019
    References:                      https://www.psl.noaa.gov/data/gridded/da...
    version:                         V2107
    history:                         update 07/2021 V2107
    data_modified:                   2021-07-09
    DODS_EXTRA.Unlimited_Dimension:  time

The data consists of average monthly rate of precipitation. gospl requires rainfall in m/yr we therefore use the groupby function to compute the yearly mean.

# Compute annual mean
dryears = dr.groupby('time.year').mean('time')
dryears
<xarray.Dataset>
Dimensions:  (lat: 72, lon: 144, year: 43)
Coordinates:
  * lat      (lat) float32 88.75 86.25 83.75 81.25 ... -83.75 -86.25 -88.75
  * lon      (lon) float32 1.25 3.75 6.25 8.75 11.25 ... 351.2 353.8 356.2 358.8
  * year     (year) int64 1979 1980 1981 1982 1983 ... 2017 2018 2019 2020 2021
Data variables:
    precip   (year, lat, lon) float32 0.5208 0.5142 0.51 0.5042 ... 0.0 0.0 0.0

We now compute the annual mean for the entire dataset running from 1979 to 2021:

dryearly = dryears.mean('year')

We will now interpolate the dataset on a higher resolution grid:

# Set new longitudes for interpolation
new_lon = np.linspace(dryearly.lon[0], dryearly.lon[-1], 
                      dryearly.dims["lon"] * 4)

# Set new latitudes for interpolation
new_lat = np.linspace(dryearly.lat[0], dryearly.lat[-1], 
                      dryearly.dims["lat"] * 4)

# Interpolation
drain = dryearly.interp(lat=new_lat, lon=new_lon)

As for the elevation dataset, we will now regrid the longitude to match with the jigsaw unstructured mesh (i.e between -180 and 180 instead of 0 to 360)

drain.coords['lon'] = (drain.coords['lon'] + 180) % 360 - 180
drain = drain.sortby(drain.lon).fillna(0)
drain
<xarray.Dataset>
Dimensions:  (lat: 288, lon: 576)
Coordinates:
  * lat      (lat) float64 88.75 88.13 87.51 86.89 ... -87.51 -88.13 -88.75
  * lon      (lon) float64 -179.7 -179.1 -178.4 -177.8 ... 178.4 179.1 179.7
Data variables:
    precip   (lat, lon) float64 0.5768 0.5788 0.5808 ... 0.9475 0.9521 0.957

We now only consider the dataset within our specified region

# Interpolate
drain_itp = drain.interp(lon=data['ETOPO05_X'].values, lat=data['ETOPO05_Y'].values)
drain_itp = drain_itp.fillna(0)
# We define a new variable rain
drain_itp = drain_itp.assign(rain=drain_itp["precip"])

# We mask all values not in the specified region
mask = ((drain_itp.coords["lat"] > gom_lat[0]) & (drain_itp.coords["lat"] < gom_lat[1])
        & (drain_itp.coords["lon"] > gom_lon[0]) & (drain_itp.coords["lon"] < gom_lon[1]))

drain_itp["rain"] = xr.where(np.logical_not(mask), 0, drain_itp["rain"])
drain_itp
<xarray.Dataset>
Dimensions:  (lat: 2161, lon: 4320)
Coordinates:
  * lon      (lon) float64 -180.0 -179.9 -179.8 -179.7 ... 179.8 179.8 179.9
  * lat      (lat) float64 -90.0 -89.92 -89.83 -89.75 ... 89.75 89.83 89.92 90.0
Data variables:
    precip   (lat, lon) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0
    rain     (lat, lon) float64 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0

Interpolate on the unstructured mesh

Once the rainfall array has been built, we now interpolate from the regular dataset to the unstructured mesh:

# Buld the rain array convertion from mm/day to m/year
rainArray = drain_itp.rain.values.T*366./1000.
rainArray = np.nan_to_num(rainArray)
rainArray[rainArray<0.] = 0
    
# We can apply a smoothing on the dataset if needed...
rainArray = ndimage.gaussian_filter(rainArray, sigma=2)
rainArray[rainArray<0.] = 0

Interpolate the rainfalls on the global unstructured mesh:

# Interpolate the paleogrid on global mesh
meshr = ndimage.map_coordinates(rainArray, rcoords, order=2,
                                mode="nearest").astype(float)

meshr[meshr<0.] = 0.

Write precipitation grid on disk

We now build gospl precipitation input data as a Numpy compressed file with the precipitation values for each mesh vertice.

# Set rainfall file name
npzrain = os.path.join(mesh_path, "rain"+str(res_mesh)+"km")

# Save the rainfall as compressed numpy file for gospl
np.savez_compressed(npzrain, r=meshr)

Vertical tectonic forcing

To define tectonic conditions (uplift/subsidence), we can chose to import existing dataset. Here however we will be using a much simpler approach where we define:

  • uplift rate of 0.1 cm/yr in regions above 500 m,

  • no vertical movement between 500 and -10 m, and

  • subsidence rate of -0.1 cm/yr for elevation below -10 m.

Note

The tectonic forcing conditions in gospl is set by a sequence of events defined by a starting time (start) and either a vertical only forcing (e.g. uplift and/or subsidence defined with mapV) or a fully 3D displacement mesh mapH. These displacements are set in metres per year. In our case we will only have one event during the 50 thousand years.

tecto = np.zeros(meshz.shape)

# Defining the tectonic rates based on elevation...
tecto[meshz>500] = 0.1/100.
tecto[meshz<-10] = -0.1/100.

# Set tectonic file name
npztecto = os.path.join(mesh_path, "tecto"+str(res_mesh)+"km")

# Save the tectonic as compressed numpy file for gospl
np.savez_compressed(npztecto, z=tecto)

Save inputs as a vtk file

Before going further, you can check the mesh and interpolated dataset by building a VTK file:

paleovtk = elevfname + ".vtk"

# Define mesh
vis_mesh = meshio.Mesh(coords, {"triangle": cells}, 
                       point_data={"elev": meshz, "precip": meshr, "tecto": tecto})

# Write it disk
meshio.write(paleovtk, vis_mesh)

print("Writing VTK input file as {}".format(paleovtk))
Writing VTK input file as gospl_data/mesh25km.vtk

Let’s visualise the mesh with pyvista library:

mesh = pv.read(paleovtk)
elev = mesh.get_array(name='elev')

earthRadius = 6.371e6
scale = 10.
factor = 1.+ (elev/earthRadius)*scale

mesh.points[:, 0] *= factor
mesh.points[:, 1] *= factor
mesh.points[:, 2] *= factor

contour = mesh.contour([0])

plotter = pv.PlotterITK()
plotter.add_mesh(mesh, scalars="elev")
plotter.add_mesh(contour, color="black", opacity=1.)

plotter.show()

Sea level curve

We will impose a sea-level increase over the simulated period (50 thousand years). To do so we need to write a file containing 2 columns (time and sea-level position). Assuming a continuous increase at 0.1 cm/yr:

# Simulation start time
tstart = 0.

# Simulation end time
tend = 50000.

# Starting sea-level position
sea0 = -25.

# Time step for sea-level
sea_dt = 10000.

# sea level rise in m/yr
rate = 0.001

# Define time
times = np.arange(tstart, tend+sea_dt, sea_dt)

# Get sea-level position
sea_level = sea0 + times*rate

# Create a pandas dataframe 
df = pd.DataFrame({'time':times,'sea':sea_level})

# Save it to file
seafile = os.path.join(mesh_path, "sealevel.csv")
df.to_csv(seafile, columns=['time', 'sea'], sep=',', index=False ,header=0)