Re: Calculate DENSITY, given TENPERATURE, PRESSURE and SALINITY

From: Will Hobbs <Will.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Tue May 21 2013 - 17:16:15 MDT

Sachin

I have attached a library of functions which basically mirror the ols SEAWATER matlab library. The function sw_dens() should give you what you want.

A couple of caveats:

  1. These are my personal functions, and are NOT supported by NCL (or even by me, I don't have time), so you use at your own risk, and there's not much help available other than the comments/descriptions in the script. (That said they have been used for peer-reviewed work).

2. The polynomials used are from the older UNESCO equations of state, which have been superseded by more recent algorithms by McDougal and Jacka.

Will

From: nand_s <sachin.nand@usp.ac.fj<mailto:sachin.nand@usp.ac.fj>>
Date: Wednesday, 22 May 2013 8:07 AM
To: "ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu>" <ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu>>
Subject: Calculate DENSITY, given TENPERATURE, PRESSURE and SALINITY

Hello Recipient,

Can you please assist me in knowing which DENSITY Formula to use in order to calculate density from given Pressure, Temperature and Salinity. I know the formula for MATLAB which is

T = temperature
S = Salinity

a=[6.536332e-9,-1.120083e-6,1.001685e-4,-9.095290e-3,6.793952e-2,999.842594];
b=[5.3875e-9,-8.2467e-7,7.6438e-5,-4.0899e-3,8.24493e-1];
c=[-1.6546e-6,1.0227e-4,-5.72466e-3];
d=4.8314e-4;
rho=polyval(a,T)+(polyval(b,T)+polyval(c,T).*sqrt(S)+d*S).*S;

,but I tried to fit this in my coding and its generating syntax error. Can anyone please let me know the correct formula for density so that I can project the graph of pressure vs density after the density calculation.
Thanks

Sachin Ravilesh Nand | Software Engineer (Consultant)
B.C.A (Bangalore University-India)
European Union Global Climate Change Alliance Project.
Pacific Centre for Environment and Sustainable Development.
University of the South Pacific.
E: sachin.nand@usp.ac.fj<mailto:sachin.nand@usp.ac.fj>
T: (+679) 32 32205

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Tue May 21 17:25:21 2013

This archive was generated by hypermail 2.1.8 : Thu May 30 2013 - 11:38:10 MDT