diff --git a/paper/paper.md b/docs/paper/paper.md similarity index 80% rename from paper/paper.md rename to docs/paper/paper.md index ba8fdda3..02aae798 100644 --- a/paper/paper.md +++ b/docs/paper/paper.md @@ -7,33 +7,34 @@ tags: - tectonics - geophysics authors: - - name: Adrian M. Price-Whelan - orcid: 0000-0000-0000-0000 - affiliation: "1, 2" # (Multiple affiliations must be quoted) - - name: Author Without ORCID - equal-contrib: true # (This is how you can denote equal contributions between multiple authors) + - name: Boris J.P. Kaus + orcid: 0000-0002-0247-8660 + affiliation: 1 # (Multiple affiliations must be quoted) + - name: Marcel Thielmann + orcid: 0000-0003-1185-3730 affiliation: 2 - - name: Author with no affiliation - corresponding: true # (This is how to denote the corresponding author) - affiliation: 3 - - given-names: Ludwig - dropping-particle: van - surname: Beethoven + - name: Arne Spang + orcid: 0000-0002-6107-0403 + affiliation: 2 + - name: Luca de Siena + orcid: 0000-0002-3615-5923 affiliation: 3 + - name: Pascal Aellig + #orcid: 0000-0003-1185-3730 + affiliation: 1 + - name: Jacob Frasukiewicz + #orcid: 0000-0003-1185-3730 + affiliation: 1 affiliations: - - name: Lyman Spitzer, Jr. Fellow, Princeton University, USA + - name: Johannes Gutenberg University Mainz, Germany index: 1 - - name: Institution Name, Country + - name: University of Bayreuth, Germany index: 2 - - name: Independent Researcher, Country + - name: Bologna University, Italy index: 3 -date: 13 August 2017 -bibliography: paper.bib -# Optional fields if submitting to a AAS journal too, see this blog post: -# https://blog.joss.theoj.org/2018/12/a-new-collaboration-with-aas-publishing -aas-doi: 10.3847/xxxxx <- update this with the DOI from AAS once you know it. -aas-journal: Astrophysical Journal <- The name of the AAS journal. +date: 27 February 2024 +bibliography: paper.bib --- # Summary diff --git a/src/data_types.jl b/src/data_types.jl index 1929a325..f783f291 100644 --- a/src/data_types.jl +++ b/src/data_types.jl @@ -168,15 +168,15 @@ struct GeoData <: AbstractGeneralGrid if isa(lon, StepRangeLen) lon = Vector(lon); end - - # Check ordering of the arrays in case of 3D + + # Check ordering of the arrays in case of 3D -- the check is not bullet proof for now if sum(size(lon).>1)==3 - if maximum(abs.(diff(lon,dims=2)))>maximum(abs.(diff(lon,dims=1))) || maximum(abs.(diff(lon,dims=3)))>maximum(abs.(diff(lon,dims=1))) - @warn "It appears that the lon array has a wrong ordering" - end - if maximum(abs.(diff(lat,dims=1)))>maximum(abs.(diff(lat,dims=2))) || maximum(abs.(diff(lat,dims=3)))>maximum(abs.(diff(lat,dims=2))) - @warn "It appears that the lat array has a wrong ordering" - end + if maximum(abs.(diff(lon,dims=2)))>maximum(abs.(diff(lon,dims=1))) || maximum(abs.(diff(lon,dims=3)))>maximum(abs.(diff(lon,dims=1))) + @warn ("It appears that the lon array has a wrong ordering") + end + if maximum(abs.(diff(lat,dims=1)))>maximum(abs.(diff(lat,dims=2))) || maximum(abs.(diff(lat,dims=3)))>maximum(abs.(diff(lat,dims=2))) + @warn ("It appears that the lat array has a wrong ordering") + end end # fields should be a NamedTuple. In case we simply provide an array, lets transfer it accordingly diff --git a/test/test_data_types.jl b/test/test_data_types.jl index 0df8d3d5..8e1a50d3 100644 --- a/test/test_data_types.jl +++ b/test/test_data_types.jl @@ -80,7 +80,9 @@ Data_set1 = GeoData(Lon,Lat,Depth,(FakeData=Data,Data2=Data.+1.)) @test Value(Data_set1.depth[1,2,3])==-8.0km # double-check that giving 3D arrays in the wrong ordering triggers a warning message -@test_throws ErrorException("It appears that the lon array has a wrong ordering") GeoData(Lat,Lon,Depth,(FakeData=Data,Data2=Data.+1.)) +Data_set2 = GeoData(Lat,Lon,Depth,(FakeData=Data,Data2=Data.+1.)) + +#@test (test_logger.logs[1].level==Warn && test_logger.logs[1].message=="It appears that the lon array has a wrong ordering") # Create 2D arrays & convert them Lon,Lat,Depth = LonLatDepthGrid(10:20,30:40,-50km);