<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Sanjiv,
<div class=""><br class="">
</div>
<div class="">Unfortunately there is currently no way to get global NetCDF files directly from the model. The setting that Ali described only works for the binary outputs (the ones with .data and .meta files).</div>
<div class=""><br class="">
</div>
<div class="">There is a very useful python script in utils/python/MITgcmutils/scripts called “gluemncbig” that can be called from the command line and will stitch together the tiles into a single file. You don’t need to know python to use it from the command
line.</div>
<div class=""><br class="">
</div>
<div class="">As for your MATLAB error, I’m afraid I have no idea. I’ll let someone who uses MATLAB chime with an answer to that.</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class="">Ed</div>
<div class=""><br class="">
<div class=""><br class="">
<div class="">
<div style="color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px;"><br class="Apple-interchange-newline">
<hr style="font-family: Tahoma; font-size: 13px;" class="">
<span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><b class="">Edward
Doddridge</b><br class="">
<i class="">Postdoctoral researcher</i></font></span></font></span></font></span></span></div>
<div style="color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><i class="">Earth,
Atmospheric and Planetary Sciences</i></font></span></font></span></font></span></span></div>
<div style="color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span class="Apple-style-span" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><i class="">Massachusetts
Institute of Technology</i></font></span></font></span></font></span></span></div>
<div style="color: rgb(0, 0, 0); font-family: Palatino; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<div style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal;" class="">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><span dir="ltr" style="font-size: 10pt;" class=""><font size="1" class=""><span style="font-size: 13px;" class=""><font size="2" class=""><i class=""><br class="">
</i></font></span></font></span></font></span></span></div>
<div style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal;" class="">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; border-spacing: 0px;"><span class="Apple-style-span" style="font-family: Tahoma; font-size: 13px;"><font face="Tahoma" size="2" class=""><a href="http://www.doddridge.me" class="">www.doddridge.me</a></font></span></span></div>
</div>
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 14 Nov 2018, at 17:09, Ali Ramadhan <<a href="mailto:alir@mit.edu" class="">alir@mit.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; direction: ltr; font-family: Tahoma; font-size: 10pt;" class="">
<div class="">Hi Sanjiv,</div>
<div class=""><br class="">
</div>
<div class="">I'm not familiar with the netCDF MATLAB module so I probably can't help there but it might be helpful if you posted the new errors you're getting.</div>
<div class=""><br class="">
</div>
<div class="">To answer (iii) you can set<span class="Apple-converted-space"> </span><code class="m_-1188343061455876705gmail-docutils m_-1188343061455876705gmail-literal m_-1188343061455876705gmail-notranslate"><span class="m_-1188343061455876705gmail-pre"><span class="m_-1188343061455876705gmail-highlighted">useSingleCpuIO</span></span><span class="Apple-converted-space"> </span><span class="m_-1188343061455876705gmail-pre">=</span><span class="Apple-converted-space"> </span><span class="m_-1188343061455876705gmail-pre">.TRUE.</span></code><span class="Apple-converted-space"> </span>in
the<span class="Apple-converted-space"> </span><code class="m_-1188343061455876705gmail-docutils m_-1188343061455876705gmail-literal m_-1188343061455876705gmail-notranslate"><span class="m_-1188343061455876705gmail-pre">PARM01</span></code><span class="Apple-converted-space"> </span>namelist
within the main<span class="Apple-converted-space"> </span><code class="m_-1188343061455876705gmail-docutils m_-1188343061455876705gmail-literal m_-1188343061455876705gmail-notranslate"><span class="m_-1188343061455876705gmail-pre">data</span></code><span class="Apple-converted-space"> </span>file
(<a href="https://mitgcm.readthedocs.io/en/latest/outp_pkgs/outp_pkgs.html?highlight=useSingleCpuIO" target="_blank" data-saferedirecturl="https://www.google.com/url?q=https://mitgcm.readthedocs.io/en/latest/outp_pkgs/outp_pkgs.html?highlight%3DuseSingleCpuIO&source=gmail&ust=1542319596299000&usg=AFQjCNGtHMFwrQAiY7E6B7vt9on53PHMKQ" class="">Section
9.2.1.3</a>) so that all tiles are sent to a single CPU which combines them and writes out a single file for the entire grid. I imagine you'll lose some performance but unless you have many tiles or very large tiles it shouldn't be too noticeable. Also took
me a while to find this setting when I first started!<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
Ali
<div style="font-family: "Times New Roman"; font-size: 16px;" class="">
<hr tabindex="-1" class="">
<div id="divRpF46453" style="direction: ltr;" class=""><font size="2" face="Tahoma" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>MITgcm-support [<a href="mailto:mitgcm-support-bounces@mitgcm.org" class="">mitgcm-support-bounces@mitgcm.org</a>]
on behalf of Sanjiv Ramachandran [<a href="mailto:sramachandran@umassd.edu" class="">sramachandran@umassd.edu</a>]<br class="">
<b class="">Sent:</b><span class="Apple-converted-space"> </span>Wednesday, November 14, 2018 4:57 PM<br class="">
<b class="">To:</b><span class="Apple-converted-space"> </span><a href="mailto:mitgcm-support@mitgcm.org" class="">mitgcm-support@mitgcm.org</a><br class="">
<b class="">Subject:</b><span class="Apple-converted-space"> </span>[MITgcm-support] Matlab scripts for viewing netcdf files<br class="">
</font><br class="">
</div>
<div class=""></div>
<div class="">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Hi,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""> I am trying to set up the 'MLadjust' test case, which is one of the cases in the 'verification' folder. My output gets written into multiple files, one for each tile, as I am using MPI. I am using
the latest version of MITgcm.<br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">I have some questions regarding the 'mnc_assembly.m' file in the utils/matlab/ folder:</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">(i) The file has commands of the form: <span class=""><br class="">
</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class=""><br class="">
</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span class="">fnc = netcdf(fnm, 'nowrite');</span><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">I replaced 'netcdf' with 'netcdf.open' as otherwise the command would not execute. But after the replacement, I am getting other errors. </div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">(ii) How do you assemble files across multiple folders? The file mnc_assembly.m only assembles all the tiles within a folder.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">(iii) Is there any way to get MITgcm to just return the fields for the entire grid in one big file (eg. state.0000100000.nc)? For my purposes, there are no benefits to having the output written separately
for each tile.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Thanks,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Sanjiv<span class="Apple-converted-space"> </span><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
</div>
</div>
</div>
</div>
<span style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">MITgcm-support
mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><a href="mailto:MITgcm-support@mitgcm.org" class="">MITgcm-support@mitgcm.org</a></span><br style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Palatino-Roman; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" class="">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a></span></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>