<html 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=us-ascii">
<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;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:black;background:white;mso-ligatures:none">Hello,</span><span style="color:black;mso-ligatures:none"><br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black;mso-ligatures:none">Hope this one works.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black;mso-ligatures:none"><br>
<span style="background:white">My name is Joan, I am a current student who is using MITgcm models. I am trying to edit an interpolation scheme that is taking variables located in the edges and sides of the grid cells and interpolating them to the center of
the grid using a structure like the one below:</span><br>
<span style="background:white">grid.interp(</span><br>
<span style="background:white"> ds[var],</span><br>
<span style="background:white"> axis=dim[0],</span><br>
<span style="background:white"> to="center",</span><br>
<span style="background:white"> boundary="fill",</span><br>
<span style="background:white"> fill_value=_np.nan,</span><br>
<span style="background:white"> )</span><br>
<span style="background:white">Where ds is an xarray.Dataset that contains the output of the model. Currently, if one of the corners or sides of the grid is a NaN then the interpolated values at the center will be a NaN. Is there a way to change that? I would
like to make is so that the interpolation ignores NaNs for cells that have at least one value. Is this possible? I was thinking I could mask the coast afterwards.</span><br>
<br>
<span style="background:white">Very respectfully,</span></span><span style="color:#1D1D1D;mso-ligatures:none"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black;background:white;mso-ligatures:none">Joan M.</span><span style="color:#1D1D1D;mso-ligatures:none"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>