Intro
Climatologies are readily downloaded and accessed using the Scratch.jl artifact system as explained below.
Use Examples
ECCO
ECCO climatology files can downloaded using get_ecco_files. These files are for version 4 release 2, on the native model grid.
using Climatology
get_ecco_variable_if_needed("ETAN")
using MeshArrays, MITgcm, NetCDF
path=joinpath(ScratchSpaces.ECCO,"ETAN/ETAN")
γ=GridSpec("LatLonCap",MeshArrays.GRID_LLC90)
tmp=read_nctiles(path,"ETAN",γ,I=(:,:,1))5×1 MeshArrays.gcmarray{Float64, 2, Matrix{Float64}}:
[NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN]
[NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN]
[NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN]
[NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN]
[NaN NaN … NaN NaN; NaN NaN … NaN NaN; … ; NaN NaN … NaN NaN; NaN NaN … NaN NaN]Precomputed quantities shown in ECCO_standard_plots.jl can be downloaded separately.
Climatology.ECCOdiags_add("release2")
readdir(ScratchSpaces.ECCO)1-element Vector{String}:
"ETAN"OCCA
get_occa_variable_if_needed("SIarea")
readdir(ScratchSpaces.OCCA)1-element Vector{String}:
"SIarea.0406clim.nc"CBIOMES
To retrieve the CBIOMES climatology, in the julia REPL for example :
withenv("DATADEPS_ALWAYS_ACCEPT"=>true) do
path_clim1=datadep"CBIOMES-clim1"
readdir(path_clim1)
end1-element Vector{String}:
"CBIOMES-global-alpha-climatology.nc"And the files, now found in datadep"CBIOMES-clim1", can then be read using other libraries.
using NCDatasets
path_clim1=datadep"CBIOMES-clim1"
fil=joinpath(path_clim1,"CBIOMES-global-alpha-climatology.nc")
nc=NCDataset(fil,"r")
keys(nc)21-element Vector{String}:
"SST"
"land"
"t"
"lat"
"lon"
"climatology_bounds"
"tim"
"Chl"
"EuphoticDepth"
"MLD"
⋮
"Rrs412"
"Rrs443"
"Rrs490"
"Rrs510"
"Rrs555"
"Rrs670"
"SSS"
"TKE"
"WindSpeed"MITprof
To retrieve the MITprof climatologies :
withenv("DATADEPS_ALWAYS_ACCEPT"=>true) do
readdir(datadep"MITprof-clim1")
end9-element Vector{String}:
"S_OWPv1_M_eccollc_90x50.bin"
"T_OWPv1_M_eccollc_90x50.bin"
"basin_masks_eccollc_90x50.bin"
"sigma_S_eccollc.bin"
"sigma_S_mad_feb2013.bin"
"sigma_S_nov2015.bin"
"sigma_T_eccollc.bin"
"sigma_T_mad_feb2013.bin"
"sigma_T_nov2015.bin"Path Names
Gridded fields are mostly retrieved from Harvard Dataverse. These can be relatively large files, compared to the package codes, so they are handled lazily (only downloaded when needed). Precomputed diagnostics have also been archived on zenodo.org.
| Artifact Name | File Type | Download Method |
|---|---|---|
ScratchSpaces.ECCO | NetCDF | lazy, by variable, dataverse |
ScratchSpaces.ECCO | JLD2 | lazy, whole, zenodo |
datadep"MITprof-clim1" | binary | lazy, whole, zenodo |
ScratchSpaces.OCCA | NetCDF | lazy, by variable, dataverse |
datadep"CBIOMES-clim1" | NetCDF | lazy, whole, zenodo |
Functions Reference
Climatology.downloads.CBIOMESclim_download — Function
CBIOMESclim_download()Download lazy artifact to scratch space.
Climatology.downloads.ECCOdiags_add — Method
ECCOdiags_add(nam::String)Add data to the scratch space folder. Known options for nam include "release1", "release2", "release3", "release4", "release5", and "OCCA2HR1".
Under the hood this is the same as:
using Climatology
datadep"ECCO4R1-stdiags"
datadep"ECCO4R2-stdiags"
datadep"ECCO4R3-stdiags"
datadep"ECCO4R4-stdiags"
datadep"ECCO4R5-stdiags"
datadep"OCCA2HR1-stdiags"Climatology.downloads.ERA5_OISST_download — Method
ERA5_OISST_download()Download lazy artifact to scratch space.
Climatology.downloads.MITPROFclim_download — Method
MITPROFclim_download()Download lazy artifact to scratch space.
Climatology.downloads.OISST_stats_download — Method
OISSTstats_download()Download lazy artifact to scratch space.
Climatology.downloads.__init__standard_diags — Method
__init__standard_diags()Register data dependency with DataDep.
Climatology.downloads.get_ecco_files — Function
get_ecco_files(γ::gcmgrid,v::String,t=1)using MeshArrays, Climatology, MITgcm
γ=GridSpec(ID=:LLC90)
Climatology.get_ecco_variable_if_needed("oceQnet")
tmp=read_nctiles(joinpath(ScratchSpaces.ECCO,"oceQnet/oceQnet"),"oceQnet",γ,I=(:,:,1))Climatology.downloads.get_ecco_variable_if_needed — Method
get_ecco_variable_if_needed(v::String)Download ECCO output for variable v to scratch space if needed
Climatology.downloads.get_ecco_velocity_if_needed — Method
get_ecco_velocity_if_needed()Download ECCO output for u,v,w to scratch space if needed
Climatology.downloads.get_occa_variable_if_needed — Method
get_occa_variable_if_needed(v::String)Download OCCA output for variable v to scratch space if needed
Climatology.downloads.get_occa_velocity_if_needed — Method
get_occa_velocity_if_needed()Download OCCA output for u,v,w to scratch space if needed
Climatology.downloads.unpackDV — Method
unpackDV(filepath)Like DataDeps's :unpack but using Dataverse.untargz and remove the .tar.gz file.