Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Algorithm [preferably fortran] to interpolate data from a 2D unstructured grid to form a cartesian grid

I am modeling fracture propagation using a 2D dynamic unstructured grid. As the fracture propagate over time, the elements move accordingly. For a given time step, I would like to interpolate the data of my unstructured grid zi=f(xi,yi) (where (xi,yi) are the nodes of the unstructured triangles) to obtain the value of the function z on the Cartesian grid (where x and y regularly spaced). My grid size is about 100x100 nodes. There are many ways of doing this interpolation scheme but I do not know enough about the topic to decide which scheme is robust and simple enough. I am using Fortran 90 (do not ask why...). Is there any open-source algorithm available? I do not want to reinvent the wheel.

Thanks a lot!

like image 663
RoLio Avatar asked Oct 05 '22 17:10

RoLio


1 Answers

The Earth System Modeling Framework (ESMF) may be of interest to you:

http://www.earthsystemmodeling.org/

It comes with Fortran, C and more recently Python (limited functionality) APIs and excellent documentation. It is commonly used for data abstraction objects in geophysical models and their coupling, but it also provides routines for regridding between structured and unstructured grids which can be used for offline (stand-alone command line utility) or online (via subroutine calls) interpolation weight generation.

Last time I have looked into it, ESMF provided bilinear, bicubic and quatitity conserving regridding methods.

like image 156
milancurcic Avatar answered Oct 10 '22 03:10

milancurcic