Skip to content

Commit

Permalink
Merge pull request #35 from euroargodev/argopy
Browse files Browse the repository at this point in the history
updates v org change, add Argopy demo, streamline docs
  • Loading branch information
gaelforget authored Dec 3, 2022
2 parents a42650b + 16743da commit 57c4fb0
Show file tree
Hide file tree
Showing 10 changed files with 1,529 additions and 101 deletions.
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
FTPClient = "01fcc997-4f28-56b8-8a06-30002c134abb"
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
MeshArrays = "cb8c808f-1acf-59a3-9d2b-6e38d009f683"
MITgcmTools = "62725fbc-3a66-4df3-9000-e33e85b3a198"
MeshArrays = "cb8c808f-1acf-59a3-9d2b-6e38d009f683"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
OceanStateEstimation = "891f6deb-a4f5-4bc5-a2e3-1e8f649cdd2c"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Expand All @@ -27,8 +27,8 @@ DataFrames = "0.20, 0.21, 0.22, 1"
FTPClient = "1"
Glob = "1"
Interpolations = "0.13, 0.14"
MeshArrays = "0.2"
MITgcmTools = "0.2"
MeshArrays = "0.2"
NCDatasets = "0.10, 0.11, 0.12"
OceanStateEstimation = "0.3"
OrderedCollections = "1"
Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# ArgoData

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaOcean.github.io/ArgoData.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaOcean.github.io/ArgoData.jl/dev)
[![CI](https://github.com/JuliaOcean/ArgoData.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/JuliaOcean/ArgoData.jl/actions/workflows/ci.yml)
[![Codecov](https://codecov.io/gh/JuliaOcean/ArgoData.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaOcean/ArgoData.jl)
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://euroargodev.github.io/ArgoData.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://euroargodev.github.io/ArgoData.jl/dev)
[![CI](https://github.com/euroargodev/ArgoData.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/euroargodev/ArgoData.jl/actions/workflows/ci.yml)
[![Codecov](https://codecov.io/gh/euroargodev/ArgoData.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/euroargodev/ArgoData.jl)
[![DOI](https://zenodo.org/badge/237021498.svg)](https://zenodo.org/badge/latestdoi/237021498)

Argo data processing and analysis.

- The `GDAC` module functions access and retrieve files from the Argo data servers.
- `MITprof` supports the format of [Forget, et al 2015](http://dx.doi.org/10.5194/gmd-8-3071-2015) for standard depth data sets like [this one](https://doi.org/10.7910/DVN/EE3C40).
- `AnalysisMethods` compute e.g. cost functions and geospatial statistics.
- The `MITprof_plots` module in `examples/` is to plot results.
Analysis and Processing of
[Argo](https://argopy.readthedocs.io/en/latest/what_is_argo.html#what-is-argo) ocean data sets.

## Contents

- `GDAC` module to access and retrieve files from Argo server.
- `MITprof` format of [Forget, et al 2015](http://dx.doi.org/10.5194/gmd-8-3071-2015) for [standard depth data](https://doi.org/10.7910/DVN/EE3C40).
- `MITprof_plots` module (in `examples/`) for `MITprof`.
- `AnalysisMethods` for cost functions and geospatial statistics.
- notebooks : [argopy interface](Argo_argopy.html), and more.

_This package is in early developement stage when breaking changes can be expected._

Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
PlutoSliderServer = "2fc8631c-6f24-4c5b-bca7-cbb509c42db4"
21 changes: 18 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
using Documenter, ArgoData
using Documenter, ArgoData, PlutoSliderServer

#make docs
makedocs(;
modules=[ArgoData],
format=Documenter.HTML(),
pages=[
"Home" => "index.md",
"Modules" => "modules.md",
"Reference" => "functions.md",
],
repo="https://github.com/JuliaOcean/ArgoData.jl/blob/{commit}{path}#L{line}",
repo="https://github.com/euroargodev/ArgoData.jl/blob/{commit}{path}#L{line}",
sitename="ArgoData.jl",
authors="gaelforget <[email protected]>",
assets=String[],
)

#create csv list of floats
files_list=GDAC.files_list()
GDAC.CSV.write("Argo_float_files.csv",files_list)
mv("Argo_float_files.csv",joinpath(@__DIR__,"build", "Argo_float_files.csv"))

#run notebooks
lst=("Argo_argopy.jl",)
for i in lst
fil_in=joinpath(@__DIR__,"..", "examples",i)
fil_out=joinpath(@__DIR__,"build", i[1:end-2]*"html")
PlutoSliderServer.export_notebook(fil_in)
mv(fil_in[1:end-2]*"html",fil_out)
cp(fil_in,fil_out[1:end-4]*"jl")
end

#deploy docs
deploydocs(;
repo="github.com/JuliaOcean/ArgoData.jl",
repo="github.com/euroargodev/ArgoData.jl",
)
17 changes: 17 additions & 0 deletions docs/src/functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

## Functions

```@index
```

```@docs
ProfileNative
ProfileStandard
MITprofStandard
```

```@autodocs
Modules = [GDAC,MITprof,AnalysisMethods]
Order = [:type,:function]
```

76 changes: 15 additions & 61 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,23 @@
# ArgoData.jl

Argo data processing and analysis. Currently provides:
Analysis and Processing of
[Argo](https://argopy.readthedocs.io/en/latest/what_is_argo.html#what-is-argo) ocean data sets.

- The `GDAC` module functions access and retrieve files from the Argo data servers.
- `MITprof` supports the format of [Forget, et al 2015](http://dx.doi.org/10.5194/gmd-8-3071-2015) for standard depth data sets like [this one](https://doi.org/10.7910/DVN/EE3C40).
- `AnalysisMethods` compute e.g. cost functions and geospatial statistics.
- The `MITprof_plots` module in `examples/` is to plot results.
## Contents

_This package is in early developement stage when breaking changes can be expected._

## Workflows

Downloading and accessing an Argo file (`wmo=13857` from `folder="aoml"`) is done like this.

```
using ArgoData
input_file=GDAC.download_file("aoml",13857)
using NCDatasets
Dataset(input_file)
```

A list of all `folder,wmo` pairs can be obtained using `files_list=GDAC.files_list()`. And a method to download files in bulk & parallel is presented in [examples/Argo\_distributed\_download.jl](https://github.com/JuliaOcean/ArgoData.jl/blob/master/examples/Argo_distributed_download.jl).

### MITprof Format

Formatting an Argo file (`input_file`) into an MITprof file (`output_file`) proceeds as follows.

```
gridded_fields=GriddedFields.load()
output_file=MITprof.format(gridded_fields,input_file)
```
- `GDAC` module to access and retrieve files from Argo server.
- `MITprof` format of [Forget, et al 2015](http://dx.doi.org/10.5194/gmd-8-3071-2015) for [standard depth data](https://doi.org/10.7910/DVN/EE3C40).
- `MITprof_plots` module (in `examples/`) for `MITprof`.
- `AnalysisMethods` for cost functions and geospatial statistics.
- notebooks : [argopy interface](Argo_argopy.html), and more.

The file generated by the previous command can be accessed normally as a NetCDF file (e.g., `Dataset(output_file)`) or using the convenient `MITprofStandard` data structure.

```
mp=MITprofStandard(output_file)
```

For additional detail, please refer to the [examples/ArgoToMITprof.jl](https://github.com/JuliaOcean/ArgoData.jl/blob/master/examples/ArgoToMITprof.jl) example.

### Download MITprof files

The original collection of MITprof files from [Forget, et al 2015](http://dx.doi.org/10.5194/gmd-8-3071-2015) is archived [here](https://doi.org/10.7910/DVN/EE3C40). These files can be retrieved as follows.

```
using CSV, DataFrames
tmp = CSV.File("examples/dataverse_files.csv") |> DataFrame
url0="https://dataverse.harvard.edu/api/access/datafile/"
run(`wget --content-disposition $(url0)$(tmp[1,:ID])`)
```

## Functions

```@index
```
_This package is in early developement stage when breaking changes can be expected._

```@docs
ProfileNative
ProfileStandard
MITprofStandard
```
Argo Float Positions | Argo Float Profiles (T, S, ...)
:------------------------------:|:---------------------------------:
![float positions](https://user-images.githubusercontent.com/20276764/150622726-61169b99-4320-4069-b113-5edabb9b64fe.png) | ![salinity profiles](https://user-images.githubusercontent.com/20276764/150622766-aee5773d-7fea-4360-9b47-05f68e235499.png)

```@autodocs
Modules = [GDAC,MITprof,AnalysisMethods]
Order = [:type,:function]
```
Argo Profile Distributions | Cost Funtions & Uncertainties
:------------------------------:|:---------------------------------:
![distributions](https://user-images.githubusercontent.com/20276764/162872972-dd7fc775-5303-4264-8277-142c02bc1b83.png) | ![cost pdf](https://user-images.githubusercontent.com/20276764/162803583-13891235-4809-4a57-b5f6-098083190d6d.png)

42 changes: 42 additions & 0 deletions docs/src/modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

## Workflows

Downloading and accessing an Argo file (`wmo=13857` from `folder="aoml"`) is done like this.

```
using ArgoData
input_file=GDAC.download_file("aoml",13857)
using NCDatasets
Dataset(input_file)
```

A list of all `folder,wmo` pairs can be obtained using `files_list=GDAC.files_list()`. And a method to download files in bulk & parallel is presented in [examples/Argo\_distributed\_download.jl](https://github.com/euroargodev/ArgoData.jl/blob/master/examples/Argo_distributed_download.jl).

### MITprof Format

Formatting an Argo file (`input_file`) into an MITprof file (`output_file`) proceeds as follows.

```
gridded_fields=GriddedFields.load()
output_file=MITprof.format(gridded_fields,input_file)
```

The file generated by the previous command can be accessed normally as a NetCDF file (e.g., `Dataset(output_file)`) or using the convenient `MITprofStandard` data structure.

```
mp=MITprofStandard(output_file)
```

For additional detail, please refer to the [examples/ArgoToMITprof.jl](https://github.com/euroargodev/ArgoData.jl/blob/master/examples/ArgoToMITprof.jl) example.

### Download MITprof files

The original collection of MITprof files from [Forget, et al 2015](http://dx.doi.org/10.5194/gmd-8-3071-2015) is archived [here](https://doi.org/10.7910/DVN/EE3C40). These files can be retrieved as follows.

```
using CSV, DataFrames
tmp = CSV.File("examples/dataverse_files.csv") |> DataFrame
url0="https://dataverse.harvard.edu/api/access/datafile/"
run(`wget --content-disposition $(url0)$(tmp[1,:ID])`)
```
Loading

0 comments on commit 57c4fb0

Please sign in to comment.