GithubHelp home page GithubHelp logo

Comments (10)

Alexander-Barth avatar Alexander-Barth commented on August 28, 2024 1

I am able to reproduce the error in DIVAnd_climatology_10ya.jl that you are seeing. Surface data was with a depth of exactly zero was no more used. With my commit 2a5e733 this test now works. We will check other tests.
Thanks!

from divand.jl.

Alexander-Barth avatar Alexander-Barth commented on August 28, 2024 1

ERROR: LoadError: KeyError: key NCDatasets.checksum not found

For your information, this issue is now also fixed in my branch.

from divand.jl.

Alexander-Barth avatar Alexander-Barth commented on August 28, 2024

Just to get the obvious issue out of the way: how many observations do you have corresponding to sea points within your time range?

I just added some more diagnostic information to this function on my branch Alex, e.g.

]add DIVAnd#Alex 

(you can check with using DIVAnd; pathof(DIVAnd)).

Can you rerun your test-case with this branch and enabling debugging ENV["JULIA_DEBUG"] = "DIVAnd" ?

from divand.jl.

Alexander-Barth avatar Alexander-Barth commented on August 28, 2024

These changes are now also on master.

from divand.jl.

ax1ine avatar ax1ine commented on August 28, 2024

Thank you, Alexander! I've enabled debugging and this is my output from the updated version:

nobs = 241105
length(obsval) = 241105
extrema(obslon) = (-179.9944, 179.9967)
extrema(obslat) = (50.0023, 87.985)
extrema(obstime) = (2016-01-01T00:56:00, 2016-01-30T22:51:00)
TS = TimeSelectorYearListMonthList{Array{UnitRange{Int64},1},Array{Array{Int64,1},1}}(UnitRange{Int64}[2016:2016],
[[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]])
0.501255 seconds (520 allocations: 187.346 MiB, 11.08% gc time)
size(mask) = (719, 59, 2)
[ Info: Creating netCDF file
[ Info: Time step 1 / 1
┌ Debug: background_epsilon2_factor: 120552.5
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\diva.jl:460
┌ Debug: alphabc 0 for size (2,)
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndrun.jl:44
┌ Debug: effective number of dimensions (neff): 1
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_background.jl:77
┌ Debug: number of point outside 0 or 0.0 %
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\sparse_interp.jl:139
┌ Debug: fbackground: [0.021922769747620075, 0.021922769747620075]
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\diva.jl:481
[ Info: scaled correlation length (min,max) in dimension 1: (300000.0, 300000.0)
[ Info: scaled correlation length (min,max) in dimension 2: (300000.0, 300000.0)
[ Info: scaled correlation length (min,max) in dimension 3: (25.0, 25.0)
┌ Debug: ("cutter", [(10.79186970867863, 309.183177852104), (5.395922012953954, 5.395922012958835), (250.0, 250.0)], (719, 59, 2), [0.0, 0.0, 0.0], 32, :auto)
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_cutter.jl:39
┌ Debug: biggestproblemdirectn [2.0e6 1.28e6 640000.0 1.25e6]
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_fittocpu.jl:59
┌ Debug: problemcut: 84842
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_fittocpu.jl:69
┌ Debug: biggestproblemdirect: 640000.0
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_fittocpu.jl:70
┌ Debug: csteps [0, 0, 0]
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndgo.jl:83
┌ Debug: error method: cpme
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndgo.jl:109
[ Info: number of windows: 1
┌ Debug: window: 1, indices: ([1, 1, 1], [719, 59, 2], [1, 1, 1], [719, 59, 2], [1, 1, 1], [719, 59, 2])
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndgo.jl:120
┌ Warning: scalefactore has the value NaN
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_adaptedeps2.jl:72
[ Info: number of current observations: 241105
[ Info: number of ignored observations: 241105 (typically havigng a NaN value or outside of the domain)
[ Info: mean of diagR: 0.09999999999999985
[ Info: minimum of diagR: 0.1
2.264618 seconds (685.18 k allocations: 724.518 MiB, 4.40% gc time)

DIVAnd is indeed ignoring all the observations. Have there been any changes to the bathymetry/mask recently? My script had been working with no issues until I updated DIVAnd while trying to fix that latitude issue.

from divand.jl.

Alexander-Barth avatar Alexander-Barth commented on August 28, 2024

I got your email. But it is possible to reduce your test case to a minimal one (e.g. using only 2 observations) and removing parts of the script unrelated to the error? This would help me a lot.

from divand.jl.

ax1ine avatar ax1ine commented on August 28, 2024

Alexander, maybe we could try the standard examples? They must've been tested many times so it'll be easier to trace if something is wrong with the code or with my installation. I tried to run 'DIVAnd_climatology_10ya.jl' and it also didn't work for me.
Here's the output:

[ Info: Loading data from 'big file' X:\DIVAnd\DIVAnd-example-data\BlackSea\Salinity.bigfile
size(value) = (139230,)
size(depthr) = (3,)
mean(lenz) = 11.555555555555548
[ Info: Output file: X:\DIVAnd\DIVAnd-example-data\BlackSea\output.nc
[ Info: Creating netCDF file
[ Info: Time step 1 / 8
┌ Debug: background_epsilon2_factor: 46966.666666666664
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\diva.jl:460
┌ Debug: alphabc 0 for size (3,)
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndrun.jl:44
┌ Debug: effective number of dimensions (neff): 1
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_background.jl:77
┌ Debug: number of point outside 8432 or 59.84386089425124 %
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\sparse_interp.jl:139
┌ Debug: fbackground: [18.18804260637072, 18.296614334714732, 18.475035070066536]
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\diva.jl:481
[ Info: scaled correlation length (min,max) in dimension 1: (200000.0, 200000.0)
[ Info: scaled correlation length (min,max) in dimension 2: (200000.0, 200000.0)
[ Info: scaled correlation length (min,max) in dimension 3: (10.0, 13.333333333333334)
┌ Warning: resolution (20.0) is too coarse for correlation length 10.0 in dimension 3 at indices CartesianIndex(4,
3, 1) (skipping further tests). It is recommended that the resolution is at least 2 times finer than the correlation length.
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\utils.jl:18
┌ Debug: ("cutter", [(11.739795676344466, 13.18656121498891), (8.993203354855417, 8.993203354940864), (0.4444444444444445, 0.5)], (76, 36, 3), [0.0, 0.0, 0.0], 3, :auto)
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_cutter.jl:39
┌ Debug: biggestproblemdirectn [187500.0 120000.0 60000.0 117187.5]
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_fittocpu.jl:59
┌ Debug: problemcut: 8208
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_fittocpu.jl:69
┌ Debug: biggestproblemdirect: 60000.0
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_fittocpu.jl:70
┌ Debug: csteps [0, 0, 0]
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndgo.jl:83
┌ Debug: error method: cpme
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndgo.jl:109
[ Info: number of windows: 1
┌ Debug: window: 1, indices: ([1, 1, 1], [76, 36, 3], [1, 1, 1], [76, 36, 3], [1, 1, 1], [76, 36, 3])
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndgo.jl:120
┌ Debug: call DIVAndrun
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndgo.jl:244
┌ Debug: alphabc 1.0 for size (76, 36, 3)
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndrun.jl:44
┌ Debug: effective number of dimensions (neff): 3
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_background.jl:77
┌ Debug: number of point outside 11 or 0.30994646379261764 %
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\sparse_interp.jl:139
┌ Debug: alphabc 1.0 for size (76, 36, 3)
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndrun.jl:44
┌ Debug: effective number of dimensions (neff): 3
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_background.jl:77
┌ Debug: number of point outside 11 or 0.30994646379261764 %
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\sparse_interp.jl:139
ERROR: LoadError: ArgumentError: reducing over an empty collection is not allowed

The tests 'DIVAnd_simple_example_4D.jl' and 'DIVAnd_simple_example_big3D.jl' (which apparently produce no output netCDF), worked without errors.

Tried 'DIVAnd_simple_example_big3D.jl' and got this:

┌ Debug: alphabc 1.0 for size (80, 50, 5, 12)
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndrun.jl:44
┌ Debug: effective number of dimensions (neff): 2
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_background.jl:77
┌ Debug: number of point outside 387 or 19.35 %
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\sparse_interp.jl:139
9.840046 seconds (115.88 k allocations: 4.514 GiB, 7.44% gc time)
maxiter = 100
diagshift = 0.001
┌ Debug: alphabc 1.0 for size (80, 50, 5, 12)
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAndrun.jl:44
┌ Debug: effective number of dimensions (neff): 4
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\DIVAnd_background.jl:77
┌ Debug: number of point outside 387 or 19.35 %
└ @ DIVAnd C:\Users\ax_li.julia\packages\DIVAnd\S4iuk\src\sparse_interp.jl:139
14.683576 seconds (161.53 k allocations: 12.511 GiB, 14.97% gc time)
ERROR: LoadError: KeyError: key NCDatasets.checksum not found

Is there anything new with the NCDatasets package which hasn't been pushed to the master yet? I just one more time updated and rebuilt both DIVAnd and NCDatasets (0.10.2) - still the same errors... Could you, please, run those tests and confirm that they work correct with your installation?

from divand.jl.

Alexander-Barth avatar Alexander-Barth commented on August 28, 2024

The tests 'DIVAnd_simple_example_4D.jl' and 'DIVAnd_simple_example_big3D.jl' (which apparently produce no output netCDF)

yes, this is correct. The result of the analysis is the returned to the user as output variable of the function DIVAndrun.

from divand.jl.

Alexander-Barth avatar Alexander-Barth commented on August 28, 2024

For your information, all tests do not work again. Can you update to the latest version of my branch to see if it solves your issue too?

from divand.jl.

ax1ine avatar ax1ine commented on August 28, 2024

Yes, my issue is gone now, thank a lot, Alexander!

from divand.jl.

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.