Giter Club home page Giter Club logo

Comments (5)

mchitre avatar mchitre commented on August 21, 2024

I'll add it in as part of the next release, or if you need it earlier and decide to patch the code, I'll be happy to accept a pull request.

from arlpy.

GogaGeosal avatar GogaGeosal commented on August 21, 2024

Hi Mandar -- many thanks for the response. I will patch the code and will request a pull so that I can proceed with my coding. Many thanks again.

In the meantime, I cannot get my head around why I am getting an annoying FATAL error for a relatively simple environment- would appreciate your help.

I have got the following simple script:

bathy = np.array([100, 200, 250, 220, 150, 400])
depth = np.array([r for r in zip(np.linspace(0, 1000, len(bathy)), bathy)])
ss_profile = 1500 * np.ones((10, 8))
depth_level = np.array([0, 50, 100, 150, 200, 250, 300, 350, 380, 400])
#ssp = np.vstack([depth_level, np.mean(ss_profile, axis=1)]).T
ssp = pd.DataFrame(ss_profile, index=depth_level, columns=np.linspace(0, 1100, len(ss_profile[0])))
env = pm.create_env2d(depth_interp='curvilinear',
                      depth=depth,
                      soundspeed=ssp,
                      tx_depth=20,
                      rx_depth=25,
                      rx_range=1000
                      )
rays = pm.compute_eigenrays(env)
pm.plot_rays(rays, env=env, width=900)

where I have got some bathy data and some depth and range dependent sound speed (in fact it is always 1500 m/s, but tis does not really matter). If I run the code as it is, it works and it generates a plot.

If I instead make the environment deeper at the begining of the range-axis, for example: bathy = np.array([250, 200, 250, 220, 150, 400]) it gives a fatal error (see below). Also, using the same bathy, if you comment the data frame and uncomment the range-indepedent ssp, the fatal error disappears. Any idea why the change in the bathy causes the range-dependent sound speed to cause fatal errors?

Thanks in advance!

The error I am getting:

STOP Fatal Error: Check the print file for details
Note: The following floating-point exceptions are signalling: IEEE_DENORMAL
STOP Fatal Error: Check the print file for details

[BELLHOP] *** FATAL ERROR ***
[BELLHOP] Generated by program or subroutine: Quad
[BELLHOP] ray is outside the box where the soundspeed is defined
[BELLHOP]

from arlpy.

mchitre avatar mchitre commented on August 21, 2024

The error message suggests "ray is outside the box where the soundspeed is defined", and I suspect this is exactly the problem. Bellhop is quite stringent requirements on depth in soundspeed profile and bathymetry being consistent.

from arlpy.

GogaGeosal avatar GogaGeosal commented on August 21, 2024

Thanks. This is true that the model has some strict requirements.

I think I found the problem, which is quite weird since it occurs only for range-depdent sound speed profile. Effectively, one need to give a negative starting range (rather than starting from zero). For the example above, the following parametrization works (just in case someone else has the same issue):
ssp = pd.DataFrame(ss_profile, index=depth_level, columns=np.linspace(-400, 1100, len(ss_profile[0]))).

Of course, this implies that one will need to artificially correct the induced offset in the sound speed profile.

Thanks.

from arlpy.

fmm17241 avatar fmm17241 commented on August 21, 2024

@GogaGeosal ! Thank you for asking this question. This is a few years after but I'm encountering the same issue; I have a range dependent sound profiles and I'm getting the "ray is outside the box where soundspeed is defined" error.

I'm not sure you still check this but wanted to ask, what values did you make negative? I use the .exe file so I'm feeding in .env, .ssp, and .bty files. For the sound speed profile I tried making my first value negative but no luck.

from arlpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.