Bathymetry smoothing using adaptive and spatially variable LP method

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
jivica
Posts: 175
Joined: Mon May 05, 2003 2:41 pm
Location: UWA
Contact:

Bathymetry smoothing using adaptive and spatially variable LP method

#1 Unread post by jivica »

Dear ROMS users,
I took me some time and effort to updated our old linear programming (LP) smoothing method into modern Python.
It doesn't depend anymore on lp_solve linux library, slow writing of multiple tmp files on disk, no Matlab :D and it is even faster ~1-2 orders of magnitude (in my test cases ~40x). It can use multiple threads if available, is quite easy and straightforward to install and only depends on 3 standard Python libraries: Numpy, netCDF4, Scipy/HiGHS (optionally if you want to plot results you'll need Matplotlib). There are working 2 examples on how to use it. In normal case it loads hraw from the grid file you specify. Some useful features are, for example, you can apply spatially variable smoothing i.e. more strict rx0 values in deep regions and higher values in shallow, smoother values around the boundary - sponge regions - where you melt with parent model with minimal intervention.

https://github.com/ivicajan/roms-bathy-smooth

Let me know if any problems or you find it useful.

Regards,
Ivica

User avatar
arango
Site Admin
Posts: 1413
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Bathymetry smoothing using adaptive and spatially variable LP method

#2 Unread post by arango »

Thank you, Ivica, for this essential contribution. Many users ignore this important aspect when building their ROMS grid application!

User avatar
jivica
Posts: 175
Joined: Mon May 05, 2003 2:41 pm
Location: UWA
Contact:

Re: Bathymetry smoothing using adaptive and spatially variable LP method

#3 Unread post by jivica »

I just published the package on PyPi so it is even easier to install 8)

All you need is a simple command:

Code: Select all

 pip install roms-bathy-smooth 
and there you go.


Cheers,
Ivica

jpringle
Posts: 112
Joined: Sun Jul 27, 2003 6:49 pm
Location: UNH, USA

Re: Bathymetry smoothing using adaptive and spatially variable LP method

#4 Unread post by jpringle »

Thank you so much for doing this; getting the old package to work (and showing students how to do it) was getting increasingly cumbersome!

Thanks
Jamie Pringle

Post Reply