Skip to content

Commit

Permalink
Merge pull request #143 from JuliaOcean/v2p14b
Browse files Browse the repository at this point in the history
V2p14b
  • Loading branch information
gaelforget authored Jan 15, 2025
2 parents 0b2359d + af1ffcf commit b859d8f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OceanRobots"
uuid = "0b51df41-3294-4961-8d23-db645e32016d"
authors = ["gaelforget <gforget@mit.edu>"]
version = "0.2.13"
version = "0.2.14"

[deps]
ArgoData = "9eb831cf-c491-48dc-bed4-6aca718df73c"
Expand Down
2 changes: 1 addition & 1 deletion ext/OceanRobotsMakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ note : the list of valid `expocode` values (e.g., "33RR20160208") can be found a
```
using OceanRobots, CairoMakie
cruise=ShipCruise("33RR20160208")
cruise=read(ShipCruise(),"33RR20160208")
plot(cruise)
```
Expand Down
17 changes: 12 additions & 5 deletions src/files_XBT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,13 @@ end

###

"""
scan_XBT_AOML(ii=0,jj=0; path="XBT_AOML")
- if `ii==0` then list all sections
- if only `ii` is specified, then list of files for section `ii`
- if `ii` & `jj` are specified, then list files in cruise `jj` of section `ii`
"""
function scan_XBT_AOML(ii=0,jj=0; path="XBT_AOML")
list1=glob("*.csv",path)
if ii==0
Expand Down Expand Up @@ -396,7 +403,7 @@ XBT.read_XBT_AOML(1,1)
```
"""
function read_XBT_AOML(ii=1,jj=1; path="XBT_AOML")
list=scan_XBT_AOML(ii,jj)
list=scan_XBT_AOML(ii,jj,path=path)
read_XBT_AOML(list; path=path)
end

Expand All @@ -411,17 +418,17 @@ function read_XBT_AOML(list4::AbstractDataFrame; path="XBT_AOML")
end

function valid_XBT_AOML(;path="XBT_AOML")
list1=scan_XBT_AOML()
list1=scan_XBT_AOML(path=path)
df=DataFrame()
for ii in 1:length(list1)
list2=scan_XBT_AOML(ii)
list2=scan_XBT_AOML(ii,path=path)
for jj in 1:length(list2)
list4=scan_XBT_AOML(ii,jj)
list4=scan_XBT_AOML(ii,jj,path=path)
transect=list4[1,:transect]
cruise=list4[1,:cruise]
subfolder=transect*"_"*string(cruise)
test=try
read_XBT_AOML(ii,jj)
read_XBT_AOML(ii,jj,path=path)
true
catch
false
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,8 @@ using Test
XBT.download_all_AOML(path=path0,quick_test=true)
@test isfile(joinpath(path0,"list_AX01.csv"))

df0=XBT.valid_XBT_AOML(path=path0)
xbt=XBT.read_XBT_AOML(df0.subfolder[1],path=path0)
@test isa(xbt,XBTtransect)

end

0 comments on commit b859d8f

Please sign in to comment.