<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.apple-tab-span
        {mso-style-name:apple-tab-span;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.pygments-n
        {mso-style-name:pygments-n;}
span.pygments-o
        {mso-style-name:pygments-o;}
span.pygments-p
        {mso-style-name:pygments-p;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Dear Michael,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">To calculate the integral of salinity advection terms at the horizontal boundary of a control volume you do not need to convert to meridional and zonal directions.&nbsp; You can simply use the model’s x and y directions.&nbsp; In the mid-latitudes
 and tropics the model uses a lat-lon grid so the model’s x and y directions line up with meridians and parallels.&nbsp; At higher latitudes the model grid rotates.&nbsp;
<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">If you must do your calculations in areas that are defined with zonal and meridional boundaries you will lose some accuracy in some places but you will still be able to distinguish the dominant terms.&nbsp; Of course, you will also need to rotate
 the x and y flux terms to the zonal and meridional directions.&nbsp; To rotate terms follow this recipe:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Input:<o:p></o:p></p>
<p class="MsoNormal">F_u : some model output field in model’s ‘x’ or ‘u’ direction (generally NOT zonal) such as ADVx_SLT<o:p></o:p></p>
<p class="MsoNormal">F_v: &nbsp;some model output field in model’s ‘y’ or ‘v’ direction (generally NOT meridional) such as ADVy_SLT<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">angleCs : &nbsp;cosine of the grid cell rotation angle<o:p></o:p></p>
<p class="MsoNormal">angleSn &nbsp;: &nbsp;sine of the grid cell rotation angle<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Output:<o:p></o:p></p>
<p class="MsoNormal">F_zonal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;= F_u * angleCos – F_v * angleSin<o:p></o:p></p>
<p class="MsoNormal">F_meridional = F_u * angleSin &#43; F_v * angleCos<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Again, if you rotate your fluxes in this way your budgets will only be approximate and will not close perfectly.&nbsp; It is a trade-off between convenience and accuracy.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal">The angleCos and angleSin fileds are available in the available in the GRID.00XX.nc files<o:p></o:p></p>
<p class="MsoNormal"><a href="ftp://ecco.jpl.nasa.gov/Version4/Release3/nctiles_grid/">ftp://ecco.jpl.nasa.gov/Version4/Release3/nctiles_grid/</a><o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">-Ian<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,serif"><o:p>&nbsp;</o:p></span></p>
</td>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</td>
</tr>
</tbody>
</table>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">&lt;ecco-support-bounces@mit.edu&gt; on behalf of Ligc &lt;liguancheng15@mails.ucas.ac.cn&gt;<br>
<b>Reply-To: </b>&quot;ECCO support list, wider membership&quot; &lt;ecco-support@mit.edu&gt;<br>
<b>Date: </b>Thursday, May 17, 2018 at 9:33 AM<br>
<b>To: </b>&quot;ecco-support@mit.edu&quot; &lt;ecco-support@mit.edu&gt;<br>
<b>Subject: </b>[ecco-support] Question about the Salinity budget<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">Dear sir/madam, <o:p></o:p></p>
<div>
<p class="MsoNormal">&nbsp; &nbsp; &nbsp; Thanks for your careful reply. I just want to calculate the integral of salinity advection terms at the horizontal boundary of the control volume at a certain depth, so i should convert the variables along the model's x-and y- direction
 into that along the meridional and zonal direction. But, there are two technical questions i can't deal with.<span class="apple-tab-span"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p></o:p></p>
<div>
<p class="MsoNormal">First, i used the initial grid data, like DXG, DYG, DRF, and RAC to evaluate their specific areas along the model's direction. But, how can i calculate a new area along the meridional or zonal direction for the the converted variables (by
 function &quot;calc_UEVNfromUXVY&quot;).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp; &nbsp; &nbsp; &nbsp; Then, i wanted to confine a latitude as its boundary and calculate the advection terms along northern direction based on such an irregular grid in an effective way, could you give me some suggestion?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">&nbsp; &nbsp; Thank you for your kindness again!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Michael<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>