Skip to content

ggebbie/IsopycnalSurfaces.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IsopycnalSurfaces.jl

Stable Dev Build Status Coverage

  • IsopycnalSurfaces.jl was originally started by G Jake Gebbie as a part of the ECCOtour.jl package

  • Core functionality: Take a profile (water column) of temperature and salinity on pressure coordinates and transfer onto a vertical coordinate of density

Main interface:

function vars2sigma(vars,p,p₀,σgrid;spline_order,linearinterp,eos)

Input a Dictionary of variables (vars) that may have 1D or 3D arrays,
a 1D vertical input coordinate (p), the reference pressure (p₀),
the output vertical grid (σgrid). Optional keyword arguments are the order of spline interpolation (splorder), a logical argument to force linear interpolation (linearinterp), and the equation of state type (eos). All variables are output to a Dictionary on isopycnal surfaces (varsσ).

Equations of state

  • "EOS80" from UNESCO 1980 (Saunders et al. 1980), following gher-ulg/PhysOcean.jl
  • "JMD95" from Jackett and McDougall 1995, following gaelforget/MITgcmTools.jl
  • "TEOS10" from IOC et al. 2010, following GibbsSeaWater.jl

Documentation and tests

  • This Julia package is in early development and breaking changes are expected.

  • See the function list in the documentation linked through the badge above

  • After setting up the Julia environment (instructions below), check that all tests pass via the following shell command in the repository base directory: julia --project=@. test/runtests.jl

Or test by going to the package manager of the REPL:
]
test IsopycnalSurfaces

  • This project was originally called SigmaShift.jl.

  • Also see Greg Wagner's package Isopycnal.jl.

Requirements

Compatibility with the built-in tests requires Julia 1.6+.

Installation

The usual way for a package in the Julia general registry: pkg> add IsopycnalSurfaces

Setting up project environment

Details about setting up a Julia environment are available here.

Data files

The Julia code is designed to download input files from Google Drive (using GoogleDrive.jl) and to place them in the data directory.

Functions

Available functions are listed in the documentation here.

Future work:

  • Allow 2D or 4D input fields
  • Permit input vertical coordinate to be pressure or depth
  • Report number of inversions
  • Calculate thickness of layers
  • Consider GPU support

How this Julia package was started

This package was generated using PkgTemplates.jl.

Steps:

  1. Use PkgTemplates to make git repo.

Run the following Julia code

using Revise, PkgTemplates

t = Template(; user="ggebbie", dir="~/projects", authors="G Jake Gebbie", julia=v"1.6", plugins=[ License(; name="MIT"), Git(; manifest=true, ssh=true), GitHubActions(; x86=false), Codecov(), Documenter{GitHubActions}(), Develop(), ], )

t("IsopycnalSurfaces.jl")

  1. Make a new empty repository on GitHub.

  2. Then push this existing repository from the command line:
    git remote add origin git@github.com:ggebbie/IsopycnalSurfaces.jl.git
    git branch -M main
    git push -u origin main

  3. Use Documenter.jl and DocumenterTools to automatically deploy documentation following: https://m3g.github.io/JuliaNotes.jl/stable/publish_docs/ .