Skip to content

Commit

Permalink
added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
b-r-hamilton committed Sep 10, 2024
1 parent 39536b9 commit cc067f8
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# PaleoData.jl
[![Build Status](https://github.com/b-r-hamilton/PaleoData.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/b-r-hamilton/PaleoData.jl/actions/workflows/CI.yml?query=branch%3Amain)

Repository to access common paleoclimate/paleoceanography datasets
Repository to access common paleoclimate/paleoceanography datasets in a Julia readable format

```
julia> thornalley = loadThornalley2018()
Dict{String, DataFrames.DataFrame} with 2 entries:
"KNR-178-48JPC" => 69×3 DataFrame…
"KNR-178-56JPC" => 93×3 DataFrame…
```


42 changes: 41 additions & 1 deletion src/PaleoData.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ end


"""
function read_data_Osman2021()
function loadOsman2021()
Read proxy data archive from NCEI and Osman et al. 2021
Expand All @@ -101,6 +101,11 @@ function loadOsman2021(filename::String)
return ds
end

"""
function loadThornalley2018()
Loads in sortable silt records from KNR-178-48JPC, KNR-178-56JPC
"""
function loadThornalley2018()
filename = "41586_2018_7_MOESM2_ESM.xlsx"
url = "https://static-content.springer.com/esm/art%3A10.1038%2Fs41586-018-0007-4/MediaObjects"
Expand All @@ -123,6 +128,11 @@ function loadThornalley2018()
return Dict(zip(names, [df1,df2]))
end

"""
function loadOcean2k()
Loads in names and locations of Ocean2k cores
"""
function loadOcean2k()
url = "https://www.ncei.noaa.gov/pub/data/paleo/pages2k"
filename = "Ocean2kLR2015sst.xlsx"
Expand All @@ -138,6 +148,11 @@ function loadOcean2k()
return DataFrame(hcat(names, lats, lons, depths), ["name", "lat", "lon", "depth"]), DataFrame(data[2:end, :], data[1, :])
end

"""
function loadOcean2kBinned()
load in the binned stdev, binned SST values, and binned ages
"""
function loadOcean2kBinned()
url = "https://www.ncei.noaa.gov/pub/data/paleo/pages2k/"
filename = "Ocean2kLR2015.zip"
Expand All @@ -149,6 +164,11 @@ function loadOcean2kBinned()
end


"""
function loadLMR(varname::String)
load in LMR ensemble mean
"""
function loadLMR(varname::String)
println("big file, slow download (a couple minutes?)")
url = "https://www.ncei.noaa.gov/pub/data/paleo/reconstructions/tardif2019lmr/v2_0/"
Expand All @@ -158,6 +178,11 @@ function loadLMR(varname::String)
return nc
end

"""
function loadHadISST()
load in HadISST dataset
"""
function loadHadISST()
url = "https://www.metoffice.gov.uk/hadobs/hadsst4/data/netcdf/"
filename = "HadSST.4.0.1.0_median.nc"
Expand All @@ -166,6 +191,11 @@ function loadHadISST()
return nc
end

"""
function loadSteinhilber2009()
load Steinhilber total solar insolation CE dataset
"""
function loadSteinhilber2009()
url = "https://www.ncei.noaa.gov/pub/data/paleo/climate_forcing/solar_variability"
filename = "steinhilber2009tsi.txt"
Expand All @@ -177,6 +207,11 @@ function loadSteinhilber2009()
return DataFrame(mat, names)
end

"""
function loadGao2008()
load Gao total stratospheric sulfate injection CE dataset
"""
function loadGao2008()
url = "https://climate.envsci.rutgers.edu/IVI2/"
filename = "IVI2TotalInjection_501-2000Version2.txt"
Expand All @@ -187,6 +222,11 @@ function loadGao2008()
return DataFrame(mat, names)
end

"""
function loadEPICA800kCO2()
load EPICA CO2 record
"""
function loadEPICA800kCO2()
url = "https://www.ncei.noaa.gov/pub/data/paleo/icecore/antarctica/epica_domec/"
filename = "edc-monnin-co2-2008-noaa.txt"
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ using PaleoData, Test
oc2k = loadOcean2k()
lmr = loadLMR("sst")
hadisst = loadHadISST()
steinhilber = loadSteinhilber2009()
gao = loadGao2008()
epica = loadEPICA800kCO2()
lund2015 = loadLund2015()
end

0 comments on commit cc067f8

Please sign in to comment.