Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add citations + alternate download if the EarthData does not work #71

Merged
merged 1 commit into from
Sep 9, 2023
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
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
GeoMakie = "db073c08-6b98-4ee5-b6a4-5efafb3259c6"
GibbsSeaWater = "9a22fb26-0b63-4589-b28e-8f9d0b5c3d05"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Expand Down
16 changes: 12 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Documenter, Literate, OceanRasterConversions
using Documenter, Literate, OceanRasterConversions, DocumenterCitations
const EXAMPLES_DIR = joinpath(@__DIR__, "../examples")
const OUTPUT_DIR = joinpath(@__DIR__, "src/literated")

Expand All @@ -25,12 +25,20 @@ pages = [
"Library" => library_pages
]

makedocs(
bib = CitationBibliography(joinpath(@__DIR__, "src/refs.bib"))

makedocs(bib,
modules = [OceanRasterConversions],
sitename = "OceanRasterConversions.jl",
repo="https://github.com/jbisits/OceanRasterConversions.jl/blob/{commit}{path}#{line}",
doctest = true,
clean = true,
authors = "Josef I. Bisits",
authors="Josef Bisits <[email protected]>",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://jbisits.github.io/OceanRasterConversions.jl",
edit_link="main",
assets=String[],
),
pages = pages
)

Expand Down
32 changes: 32 additions & 0 deletions docs/src/refs.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@article{Fukumori2022,
abstract = {Information about how and when I accessed the ECCO dataset (v4r4). I accessed the data through EARTHDATA.},
author = {Fukumori, Ichiro and Wang, Ou and Forget, Gael and Heimbach, Patrick and Ponte, R. M. and {Date accessed March 2022}},
publisher = {ECCO Central Estimate},
title = {{ECCO Version 4 Release 4 Dataset}},
url = {https://search.earthdata.nasa.gov/search/granules?p=C1990404821-POCLOUD{\&}tl=1656394462.167!3!!},
year = {2022}
}
@article{Fukumori2021,
author = {Fukumori, Ichiro and Wang, Ou and Fenty, Ian and Forget, Gael and Heimbach, Patrick and Ponte, Rui M.},
doi = {https://doi.org/10.5281/zenodo.4533349},
journal = {Zenodo},
pages = {1--17},
title = {{Synopsis of the ECCO Central Production Global Ocean and Sea-Ice State Estimate, Version 4 Release 4 (Version 4 Release 4).}},
volume = {3},
year = {2021}
}
@article{Forget2015,
abstract = {This paper presents the ECCO v4 non-linear inverse modeling framework and its baseline solution for the evolving ocean state over the period 1992-2011. Both components are publicly available and subjected to regular, automated regression tests. The modeling framework includes sets of global conformal grids, a global model setup, implementations of data constraints and control parameters, an interface to algorithmic differentiation, as well as a grid-independent, fully capable Matlab toolbox. The baseline ECCO v4 solution is a dynamically consistent ocean state estimate without unidentified sources of heat and buoyancy, which any interested user will be able to reproduce accurately. The solution is an acceptable fit to most data and has been found to be physically plausible in many respects, as documented here and in related publications. Users are being provided with capabilities to assess model-data misfits for themselves. The synergy between modeling and data synthesis is asserted through the joint presentation of the modeling framework and the state estimate. In particular, the inverse estimate of parameterized physics was instrumental in improving the fit to the observed hydrography, and becomes an integral part of the ocean model setup available for general use. More generally, a first assessment of the relative importance of external, parametric and structural model errors is presented. Parametric and external model uncertainties appear to be of comparable importance and dominate over structural model uncertainty. The results generally underline the importance of including turbulent transport parameters in the inverse problem.},
author = {Forget, G. and Campin, J. M. and Heimbach, P. and Hill, C. N. and Ponte, R. M. and Wunsch, C.},
doi = {10.5194/gmd-8-3071-2015},
file = {:Users/Joey/Documents/Digital library/Forget et al.{\_}2015{\_}ECCO version 4 An integrated framework for non-linear inverse modeling and global ocean state estimation.pdf:pdf},
issn = {19919603},
journal = {Geoscientific Model Development},
month = {oct},
number = {10},
pages = {3071--3104},
publisher = {Copernicus GmbH},
title = {{ECCO version 4: An integrated framework for non-linear inverse modeling and global ocean state estimation}},
volume = {8},
year = {2015}
}
21 changes: 19 additions & 2 deletions examples/ocean_variable_conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,27 @@
# First, add the required dependencies
using Rasters, NCDatasets, Plots, Downloads
using OceanRasterConversions
# and download model output from [ECCOv4r4](https://ecco-group.org/products-ECCO-V4r4.htm).
# and download model output from [ECCOv4r4](https://ecco-group.org/products-ECCO-V4r4.htm)
# [Fukumori2022](@cite), [Fukumori2021](@cite), [Forget2015](@cite).
# This data is the daily average 0.5 degree salinity and temperature model output. To reproduce
# this example, an Earthdata acount is needed to download the data.
# !!! info
# See the [NCDatasets.jl example](https://alexander-barth.github.io/NCDatasets.jl/latest/tutorials/#Data-from-NASA-EarthData)
# for information on how to download data from NASA EarthData.
# ## Read the data into a `RasterStack`
Downloads.download("https://opendap.earthdata.nasa.gov/providers/POCLOUD/collections/ECCO%2520Ocean%2520Temperature%2520and%2520Salinity%2520-%2520Daily%2520Mean%25200.5%2520Degree%2520(Version%25204%2520Release%25204)/granules/OCEAN_TEMPERATURE_SALINITY_day_mean_2007-01-01_ECCO_V4r4_latlon_0p50deg.dap.nc4", "ECCO_data.nc")
function download_ECCO()

try
Downloads.download("https://opendap.earthdata.nasa.gov/providers/POCLOUD/collections/ECCO%2520Ocean%2520Temperature%2520and%2520Salinity%2520-%2520Daily%2520Mean%25200.5%2520Degree%2520(Version%25204%2520Release%25204)/granules/OCEAN_TEMPERATURE_SALINITY_day_mean_2007-01-01_ECCO_V4r4_latlon_0p50deg.dap.nc4", "ECCO_data.nc")
catch
@info "dowloading from drive"
Downloads.download("https://drive.google.com/uc?id=1MNeThunqpY-nFzsZLZj9BV8sM5BJgnxT&export=download", "ECCO_data.nc")
end

return nothing

end
download_ECCO()
stack = RasterStack("ECCO_data.nc")
# Thanks to [Rasters.jl](https://github.com/rafaqz/Rasters.jl) we now have the dimensions of
# the data, the variables saved as layers and all the metadata in one data structure.
Expand Down Expand Up @@ -107,3 +122,5 @@ cp = CairoMakie.contourf!(ax, converted_stack[:Θ][Z(Near(depth)), Ti(At(date))]
colormap = :balance)
Colorbar(fig[2, 1], cp; label = "Θ (ᵒC)", vertical = false, flipaxis = false)
fig
# ```@bibliography
# ```
Loading