Comments (11)
hello, can you provide us with a minimum working example (i.e. subset of the dataset) and the commands you ran to get this issue?
Otherwise the error messages don't help too much in this case, I'm afraid.
from divand.jl.
Data : divand_github_issue.txt
Hello,
The subset is given in the attached txt file above (columns order : lon, lat, sigma (density) and depth).
If we create a matrix m
with lon, lat, sigma and depth (size of 64800x4):
This command works : ~, len, ~,~,~ = DIVAnd.fit_isotropic((m[:,1],m[:,2]), m[:,3], collect(0:1:20), 100)
but this one does not ~, len, ~,~,~ = DIVAnd.fit((m[:,1],m[:,2]), m[:,3], collect(0:1:20), 100)
I also added the depth field in the text file because I was testing the function fithorzlen, which gives me an error as well. I used the following command :
lenz, dbinfo = DIVAnd.fithorzlen((m[:,1],m[:,2],m[:,4]), m[:,3], [50.,60,70])
where I used a variable z
equal to [50.,60,70]
(´z´ is not defined in the documentation, I had to go in one of the examples to see what it was related to anf got the following result:
┌ Warning: Be patient big data set: 64800
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/azb67/src/fit.jl:675
┌ Warning: Too few data. Will use guesses (np = 0, RLz = 1.811113649598692, )
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/azb67/src/fit.jl:894
┌ Info: Data points at z=50.0: 64800, horz. correlation length: 1.811113649598692
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/azb67/src/fit.jl:1061
┌ Warning: Be patient big data set: 64800
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/azb67/src/fit.jl:675
┌ Warning: Too few data. Will use guesses (np = 0, RLz = 1.811113649598692, )
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/azb67/src/fit.jl:894
┌ Info: Data points at z=60.0: 64800, horz. correlation length: 1.811113649598692
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/azb67/src/fit.jl:1061
┌ Warning: Be patient big data set: 64800
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/azb67/src/fit.jl:675
┌ Warning: Too few data. Will use guesses (np = 0, RLz = 1.811113649598692, )
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/azb67/src/fit.jl:894
┌ Info: Data points at z=70.0: 64800, horz. correlation length: 1.811113649598692
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/azb67/src/fit.jl:1061
All elements in A are equal to the fill-value. No filling is possible
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] DIVAnd_fill!(::Array{Float64,1}, ::Float64) at /home/flo/.julia/packages/DIVAnd/azb67/src/DIVAnd_fill!.jl:84
[3] #fithorzlen#522(::Float64, ::Float64, ::Float64, ::Float64, ::Function, ::Function, ::getfield(DIVAnd, Symbol("##526#533")), ::Int64, ::Bool, ::Array{Float64,1}, ::typeof(fithorzlen), ::Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1}}, ::Array{Float64,1}, ::Array{Float64,1}) at /home/flo/.julia/packages/DIVAnd/azb67/src/fit.jl:1065
[4] fithorzlen(::Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1}}, ::Array{Float64,1}, ::Array{Float64,1}) at /home/flo/.julia/packages/DIVAnd/azb67/src/fit.jl:1022
[5] top-level scope at In[314]:1
Maybe I am using it all wrong but I am not sure ! I also fixed some bugs by updating julia from a version 1.0.x to 1.1.1 (e.g. DIVAndrun was not working on my laptop with julia version 1.0.x)
For information, all tests are OK when using Pkg.test("DIVAnd")
Thanks for your help!
from divand.jl.
Thanks for the files, that really help to try and reproduce the issue.
It seems the package NLopt
is missing from the requirement list. While we are fixing this, you can add install NLopt
if it is not yet there, then add the following line in DIVAnd.jl
using NLopt
then re-run the code with DIVAnd.fit(...)
. With your data I get len = [0.5, 0.5]
@Alexander-Barth : is it suffient to add NLopt in REQUIRE
and using NLopt in DIVAnd.jl
?
from divand.jl.
Hello,
I installed NLopt and I did Pkg.update() in any case. I've rerun everything, have restarted the kernel, I still have the same issue.
from divand.jl.
And did you add using NLopt
in DIVAnd.jl
?
from divand.jl.
Yes of course !
from divand.jl.
The functionality of DIVAnd.fit and DIVAnd.fit_isotropic have been replaced by other functions. In future version DIVAnd.fit and DIVAnd.fit_isotropic will be removed. Can you use the other function (DIVAnd.fithorzlen and DIVAnd.fitvertlen ) instead?
from divand.jl.
I did. I also got an issue (see also previous messages).
The error I get with DIVAnd.fithorzlen is, when using lenz, dbinfo = DIVAnd.fithorzlen((m[:,1],m[:,2],m[:,4]), m[:,3], [50.,60,70])
┌ Warning: Be patient big data set: 64800
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/lgTG2/src/fit.jl:675
┌ Warning: Too few data. Will use guesses (np = 0, RLz = 1.811113649598692, )
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/lgTG2/src/fit.jl:894
┌ Info: Data points at z=50.0: 64800, horz. correlation length: 1.811113649598692
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/lgTG2/src/fit.jl:1061
┌ Warning: Be patient big data set: 64800
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/lgTG2/src/fit.jl:675
┌ Warning: Too few data. Will use guesses (np = 0, RLz = 1.811113649598692, )
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/lgTG2/src/fit.jl:894
┌ Info: Data points at z=60.0: 64800, horz. correlation length: 1.811113649598692
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/lgTG2/src/fit.jl:1061
┌ Warning: Be patient big data set: 64800
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/lgTG2/src/fit.jl:675
┌ Warning: Too few data. Will use guesses (np = 0, RLz = 1.811113649598692, )
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/lgTG2/src/fit.jl:894
┌ Info: Data points at z=70.0: 64800, horz. correlation length: 1.811113649598692
└ @ DIVAnd /home/flo/.julia/packages/DIVAnd/lgTG2/src/fit.jl:1061
All elements in A are equal to the fill-value. No filling is possible
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] DIVAnd_fill!(::Array{Float64,1}, ::Float64) at /home/flo/.julia/packages/DIVAnd/lgTG2/src/DIVAnd_fill!.jl:84
[3] #fithorzlen#522(::Float64, ::Float64, ::Float64, ::Float64, ::Function, ::Function, ::getfield(DIVAnd, Symbol("##526#533")), ::Int64, ::Bool, ::Array{Float64,1}, ::typeof(fithorzlen), ::Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1}}, ::Array{Float64,1}, ::Array{Float64,1}) at /home/flo/.julia/packages/DIVAnd/lgTG2/src/fit.jl:1065
[4] fithorzlen(::Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1}}, ::Array{Float64,1}, ::Array{Float64,1}) at /home/flo/.julia/packages/DIVAnd/lgTG2/src/fit.jl:1022
[5] top-level scope at In[31]:1
There seems to be something with the function fit
at line 1022 so if the same function fit
gives the error with DIVAnd.fit, it is still present in DIVAnd.fithorzlen maybe?
from divand.jl.
When I remove the NaN values, it seems to work for me:
using DIVAnd, DelimitedFiles
m = readdlm("divand_github_issue.txt")
sel = findall(isfinite.(m[:,3]));
lenz, dbinfo = DIVAnd.fithorzlen((m[sel,1],m[sel,2],m[sel,4]), m[sel,3], [50.,60.,70.])
extrema(m[sel,4])
# returns
# (61.11283874511719, 61.11283874511719)
Note that the depth level is are constant in this dataset.
And thanks, I added a description for the z
parameter DIVAnd.fithorzlen
.
from divand.jl.
Perfect, it now works ! The NaN values were the source of the issue then.
Thank you !
from divand.jl.
Thank you for your confirmation!
from divand.jl.
Related Issues (20)
- Http 500 Internal Server Error[🐞] HOT 3
- [🐞]High memory consumption and inability to use divandgo or conjugate gradient inversion. HOT 16
- [👆] Getting lists of data points that are used for each depth layer HOT 2
- [DOC] documentation of `diffusion` function HOT 11
- [Help needed] Correlation length and lengraddepth HOT 16
- Background of all observations over time HOT 15
- [🐞] When running DIVAnd, artifacts appear which seem to be linked to the bathymetry HOT 33
- L-shape criterium[👆] HOT 1
- Sigma coordinates ?[👆] HOT 11
- Unhandled Task ERROR: EOFError: read end of file HOT 5
- [🐞] DomainError when use background HOT 4
- "gradient" effect on DIVAnd maps[🐞] HOT 20
- 'data access' and 'WEB_visualisation' attributes not correct anymore HOT 3
- [Help needed]How to create and use my bathymetry file? HOT 7
- Diva2d? HOT 6
- [🐞]WARNING: Method definition DIVAnd_bc_stretch overwritten HOT 1
- Accurate meaning of the correlation length?[DOC] HOT 8
- adapt ODV files "load" function for WOD data[👆] HOT 5
- pcg demanding more memory than direct solver ? HOT 2
- DIVAnd test failed during Pkg.test("DVAnd")[🐞] HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from divand.jl.