-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I found some inconsistencies in the way calc_rmax works. I've developed a quick python code for:
- read AMM7 bathymetry;
- create an envelope bathymetry and smooth it: it implements exactly NEMO Fortran90 code (very inefficient but at least we know what it does)
- compute the maximum rmax with three different codes: original numpy version of James; xarray version of James code; my old code (actually adapted from pyROMS, it very inefficient but I think it is clear what it does).
If we smooth the envelope with an rn_rmax threshold of 0.24, the following is the pring of the iterative smoothing:
python test_rmax_calc.py
Iter: 1 rmax: 1.0
Iter: 2 rmax: 0.9353992591835926
Iter: 3 rmax: 0.9187177073344386
Iter: 4 rmax: 0.8765126597150313
Iter: 5 rmax: 0.8185786808404448
Iter: 6 rmax: 0.7347370279088926
Iter: 7 rmax: 0.7347370279088925
Iter: 8 rmax: 0.6074021541852422
Iter: 9 rmax: 0.5717732932642535
Iter: 10 rmax: 0.4755012414806615
Iter: 11 rmax: 0.37086087298353765
Iter: 12 rmax: 0.24000000000000007
The rmax computed by the three codes are the following:
- calc_rmax_xr: 0.34985075453036585 (xarray code)
- calc_rmax_np: 0.34985075453036585 (numpy code)
- SlopeParam: 0.24000000000000005 (ROMS code)
Metadata
Metadata
Labels
bugSomething isn't workingSomething isn't working