<div dir="ltr">Thank you very much Ian,<div>Ivana</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 11, 2021 at 11:01 AM Fenty, Ian G (US 329C) &lt;<a href="mailto:ian.fenty@jpl.nasa.gov">ian.fenty@jpl.nasa.gov</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Ivana,<br>
<br>
&gt;&gt; I want to calculate the potential density relative to the surface using ECCO output (THETA and SALT  fields....) and &quot;density.m&quot; function from gcmfaces, where &quot;p&quot; is the depth of tracer points, do I specify pref=0, and the potential density is given by rhop, as:  [rhop,rhpis,rhor] = density(t(:),s(:),p(:),pref(:));<br>
<br>
That&#39;s what I would do.  You do have some choices about what to use for pressure.  You could directly convert model z depth to pressure in decibars or you could use the latitude-dependent pressure (e.g., the matlab seawater package &#39;sw_pres&#39; from <a href="https://urldefense.com/v3/__http://globec.whoi.edu/globec-dir/CTDSoftware/SeaWater/__;!!Mih3wA!TM8nqsHsQgnfBzc5NYAL0p0QD2Gb0fHO7dBKqHXt1gf4lZAIhVnANq9fFXxvGZ-KXw$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__http://globec.whoi.edu/globec-dir/CTDSoftware/SeaWater/__;!!Mih3wA!TM8nqsHsQgnfBzc5NYAL0p0QD2Gb0fHO7dBKqHXt1gf4lZAIhVnANq9fFXxvGZ-KXw$</a>  ).<br>
<br>
In case you are not aware, there is a Matlab representation of the JMD95 eos here:<br>
<a href="https://urldefense.com/v3/__https://github.com/MITgcm/MITgcm/blob/master/utils/matlab/densjmd95.m__;!!Mih3wA!TM8nqsHsQgnfBzc5NYAL0p0QD2Gb0fHO7dBKqHXt1gf4lZAIhVnANq9fFXz13p2vfw$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__https://github.com/MITgcm/MITgcm/blob/master/utils/matlab/densjmd95.m__;!!Mih3wA!TM8nqsHsQgnfBzc5NYAL0p0QD2Gb0fHO7dBKqHXt1gf4lZAIhVnANq9fFXz13p2vfw$</a> <br>
<br>
<br>
&gt;&gt; If following Iudicone et al. (2008), I want to estimate the equation of evolution of the locally referenced potential density defined at a reference pressure chosen as the local pressure pr, I get that by multiplying the temperature tendency equation by alpha, salt tendency equation by beta, and combine them. In doing so, is this a correct way to obtain alpha?<br>
&gt;&gt; alpha=sw_alpha(s(:),t(:),p(:),&#39;ptmp&#39;),<br>
&gt;&gt;where again s is obtained from the SALT fields, t from THETA and p is the depth of the tracer points.<br>
<br>
Yes, that is what I would do.  Again, you could choose a different eos to calculate alpha. The eos used in the seawater package &#39;sw_alpha&#39; routine  seems to be same JMD: <a href="https://urldefense.com/v3/__https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/47595/versions/12/previews/mixing_library/private1/seawater/sw_aonb.m/index.html?access_key=__;!!Mih3wA!TM8nqsHsQgnfBzc5NYAL0p0QD2Gb0fHO7dBKqHXt1gf4lZAIhVnANq9fFXzecweOEA$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/47595/versions/12/previews/mixing_library/private1/seawater/sw_aonb.m/index.html?access_key=__;!!Mih3wA!TM8nqsHsQgnfBzc5NYAL0p0QD2Gb0fHO7dBKqHXt1gf4lZAIhVnANq9fFXzecweOEA$</a> <br>
<br>
-Ian<br>
<br>
<br>
<br>
_______________________________________________<br>
ecco-support mailing list<br>
<a href="mailto:ecco-support@mit.edu" target="_blank">ecco-support@mit.edu</a><br>
<a href="https://urldefense.com/v3/__http://mailman.mit.edu/mailman/listinfo/ecco-support__;!!Mih3wA!TM8nqsHsQgnfBzc5NYAL0p0QD2Gb0fHO7dBKqHXt1gf4lZAIhVnANq9fFXz3JRfbQw$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__http://mailman.mit.edu/mailman/listinfo/ecco-support__;!!Mih3wA!TM8nqsHsQgnfBzc5NYAL0p0QD2Gb0fHO7dBKqHXt1gf4lZAIhVnANq9fFXz3JRfbQw$</a> <br>
</blockquote></div>