Skip to content

Commit

Permalink
Merge pull request #10 from jbisits/joey-cleanup
Browse files Browse the repository at this point in the history
Clean up tasks
  • Loading branch information
jbisits authored Jan 10, 2023
2 parents 0f50882 + 96ebaee commit 415c970
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 8 deletions.
28 changes: 28 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
15 changes: 7 additions & 8 deletions examples/ECCO_example.jl
Original file line number Diff line number Diff line change
@@ -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")
Expand All @@ -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,
Expand Down

0 comments on commit 415c970

Please sign in to comment.