Hi all,
just wondering if anyone has some code that calculates the soundspeed from ROMS output files ?
Cheers
Frank
Soundspeed for ROMS output
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: Soundspeed for ROMS output
It has been in ROMS plotting package that uses the NCAR's GKS library since the beginning. Check the file src/Utility/svel.F in the plot repository. It uses the Che and Millero (1976) formula.
Chen, C.T. and F.J. Millero, 1976: re-evaluation of Willson sound-speed measurements in pure water. J. Acoust. Soc. of Amer., 60(6), 1270-1273
I am not familiar with the literature of sound speed computation. I bet that there are newer formulations out there.
Also, it will be very trivial to compute from ROMS nonlinear equation of state since it has all the variables that it needs:
where gamma is the adiabatic and isentropic compressibility coefficient (1/Pa).
Chen, C.T. and F.J. Millero, 1976: re-evaluation of Willson sound-speed measurements in pure water. J. Acoust. Soc. of Amer., 60(6), 1270-1273
I am not familiar with the literature of sound speed computation. I bet that there are newer formulations out there.
Also, it will be very trivial to compute from ROMS nonlinear equation of state since it has all the variables that it needs:
Code: Select all
svel2 = ABS(10000.0./(den * gamma))
svel = SQRT(svel2);
Re: Soundspeed for ROMS output
There is also code in the CSIRO seawater toolbox for Matlab (function sw_svel) though seawater has been superseded by the Gibbs SeaWater (GSW) toolbox for TEOS-10
http://www.teos-10.org/pubs/gsw/html/gsw_contents.html
and in there it is function gsw_sound_speed
http://www.teos-10.org/pubs/gsw/html/gsw_contents.html
and in there it is function gsw_sound_speed
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
Re: Soundspeed for ROMS output
Thanks guys !
Hernan - OK - I remember having problems with compiling the plotting package in the past due to ncarg library. I'll give it another go.
Generally I think it would be nice to decouple the soundspeed calculation from the actual plotting routines and be able to write it into the average or history output files given T and S.
I look into this.
Hernan - OK - I remember having problems with compiling the plotting package in the past due to ncarg library. I'll give it another go.
Generally I think it would be nice to decouple the soundspeed calculation from the actual plotting routines and be able to write it into the average or history output files given T and S.
I look into this.
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: Soundspeed for ROMS output
Just do it in Matlab.