Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ jobs:
version:
#- '1.7' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
- '~1.10.0-0'
#- '~1.11.0-0'
#- '~1.12.0-0'
- '~1.13.0-0'
- '~1.14.0-0'
- 'nightly'
os:
- ubuntu-latest
Expand Down
5 changes: 3 additions & 2 deletions src/trend1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ function trend1d(cmd0::String, arg1, d::Dict{Symbol, Any})
!isa(R, GDtype) && return R # Should be the output of Vd=2

if (opt_F != "") # Extract column names from opt_F
cnames = (isa(arg1, GDtype)) ? (isa(arg1, GMTdataset) ? arg1.colnames : arg1[1].colnames) : String[]
if (opt_F[1] == 'p' || opt_F[1] == 'P' || opt_F[1] == 'c')
colnames = ["a$i" for i=0:size(arg1, 2)-1]
# One name per model coefficient (the output's own width), not per input column.
colnames = ["a$i" for i=0:size(isa(R, GMTdataset) ? R.data : R[1].data, 2)-1]
else
cnames = (isa(arg1, GDtype)) ? (isa(arg1, GMTdataset) ? arg1.colnames : arg1[1].colnames) : String[]
s = collect(opt_F)
colnames = Vector{String}(undef, length(s))
for k = 1:numel(s)
Expand Down
6 changes: 5 additions & 1 deletion test/test_misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,11 @@
"area": [58, 6, 55, 9]
}"""
#@test_throws ArgumentError ecmwf(dataset=dataset, params=request, key="blabla");
ecmwf(dataset=dataset, params=request);
try
ecmwf(dataset=dataset, params=request);
catch e
println(e)
end
try # Because the Linux CI fails saying they don't have clipboard installed
clipboard(request)
@test_throws ArgumentError ecmwf(cb=true, dataset=dataset, key="blabla");
Expand Down
6 changes: 3 additions & 3 deletions test/test_wave_travel_time.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using GMT, Test
source = [-11.0, 35.9]

# Reference result with default layout (BCB)
G_bc = gmtread("@earth_relief_06m", R=:PT)
G_bc = gmtread("@earth_relief_10m", R=:PT)
ttt_bc = wave_travel_time(G_bc, source)

@test size(ttt_bc.z) == size(G_bc.z)
Expand All @@ -14,15 +14,15 @@ zmax_bc = maximum(x -> isnan(x) ? -Inf : x, ttt_bc.z)
@test zmax_bc < 24 # Portugal is not 24 hours away from itself

# TRB layout — results must match BCB
G_tr = gmtread("@earth_relief_06m", R=:PT, layout="TRB")
G_tr = gmtread("@earth_relief_10m", R=:PT, layout="TRB")
ttt_tr = wave_travel_time(G_tr, source)

@test size(ttt_tr.z) == size(G_tr.z)
@test ttt_tr.range[5] ≈ ttt_bc.range[5] atol=1e-4
@test ttt_tr.range[6] ≈ ttt_bc.range[6] atol=1e-4

# BRB layout — results must match BCB
G_br = gmtread("@earth_relief_06m", R=:PT, layout="BRB")
G_br = gmtread("@earth_relief_10m", R=:PT, layout="BRB")
ttt_br = wave_travel_time(G_br, source)

@test size(ttt_br.z) == size(G_br.z)
Expand Down
Loading