diff --git a/docs/src/index.md b/docs/src/index.md index 9bcf3af..81c2452 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -15,6 +15,34 @@ In doing so a pressure variable is needed, so this is created and returned in th Lastly a density variable (either in-situ or potential referenced to a user input) is computed and added to the `RasterStack`. See the example for how the package can be used. +### Variables + +The variables are named using the symbols that represent them. +The symbols are unicode characters which can be generated in the julia repl by pressing tab after the varible + +```julia +julia> \theta#press tab +``` + +will autocomplete to `θ`, the symbol for potential temperature. +The subscript letters that are used to distinguish between practical salinity, `Sₚ`, and absolute salinity, `Sₐ`, are also added in the julia repl + +```julia +julia> S\_a#press tab +``` + +Currently the varabile symbols are: + +- `θ` potential temperature +- `Θ` conservative temperature +- `Sₚ` practical salinity +- `Sₐ` absolute salinity +- `p` pressure +- `ρ` in-situ seawater density +- `σₚ` potential density at user defined reference pressure `ₚ`. + +### Limitations + If the required dimensions for the conversions are not present an error will be thrown. For example, trying to convert a `RasterStack` that has no depth dimension will not work as the `Z` dimension is not found and the pressure variable depends on depth. There is a manual workaround for this. diff --git a/examples/ECCO_example.jl b/examples/ECCO_example.jl index 00cd898..e49fc1d 100644 --- a/examples/ECCO_example.jl +++ b/examples/ECCO_example.jl @@ -1,13 +1,12 @@ -# ### Converting the practical salinity and potential temperature from ECCOv4r4 model -# output. +# # Converting the practical salinity and potential temperature from ECCOv4r4 model output. # First, add the required dependencies -using Rasters, GibbsSeaWater, Plots, Downloads +using Rasters, Plots, Downloads include("../../../src/OceanRasterConversions.jl") using .OceanRasterConversions -# and download model output from ECCOv4r4 (note this needs an Earthdata account). -# This data is the daily average 0.5 degree output of salinity and temperature. To reproduce -# this example, an Earthdata acount is needed to download the data insert link. -# ### Read the data into a `RasterStack` +# and download model output from [ECCOv4r4](https://ecco-group.org/products-ECCO-V4r4.htm). +# 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. +# ## 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") stack = RasterStack("ECCO_data.nc") @@ -19,7 +18,7 @@ metadata(stack)["summary"] # This tells us that the temperature variable is potential temperature and the salt # variabile is practical salinity (for more information about this data see the user guide). # -# ### Converting variables +# ## Converting variables and plotting # To calculate seawater density using TEOS-10, we require absolute salinity and # conservative temperature. This can be done by extracting the data and using # [GibbsSeaWater.jl](https://github.com/TEOS-10/GibbsSeaWater.jl) or with this package,