[MITgcm-support] Matlab scripts for viewing netcdf files

Gus Correa gus at ldeo.columbia.edu
Wed Nov 14 17:33:27 EST 2018


My recollection is that singleCpuIO only works with binary (MDS) files, but
not with netCDF,
which is very unfortunate.
Here we've been using singleCpuIO, along with the diagnostics package, to
output "global" binary
files, then a bunch of scripts (we like NCL) to convert to netCDF
Some conversion scripts (binary to netCDF), mostly Matlab and Python, are
available along with the MITgcm code,
sometimes in the verification experiments, sometimes in the tools (?)
directory, but they may need to be
tweaked with for the specific experiment (and grid!) that you're using.


On Wed, Nov 14, 2018 at 5:10 PM Ali Ramadhan <alir at mit.edu> wrote:

> Hi Sanjiv,
>
> 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.
>
> To answer (iii) you can set useSingleCpuIO = .TRUE. in the PARM01
> namelist within the main data file (Section 9.2.1.3
> <https://mitgcm.readthedocs.io/en/latest/outp_pkgs/outp_pkgs.html?highlight=useSingleCpuIO>)
> 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!
>
> Cheers,
> Ali
> ------------------------------
> *From:* MITgcm-support [mitgcm-support-bounces at mitgcm.org] on behalf of
> Sanjiv Ramachandran [sramachandran at umassd.edu]
> *Sent:* Wednesday, November 14, 2018 4:57 PM
> *To:* mitgcm-support at mitgcm.org
> *Subject:* [MITgcm-support] Matlab scripts for viewing netcdf files
>
> Hi,
>
>     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.
>
>
> I have some questions regarding the 'mnc_assembly.m' file in the
> utils/matlab/ folder:
>
>
> (i) The file has commands of the form:
>
>
> fnc = netcdf(fnm, 'nowrite');
>
>
> I replaced 'netcdf' with 'netcdf.open' as otherwise the command would not
> execute. But after the replacement, I am getting other errors.
>
>
> (ii) How do you assemble files across multiple folders? The file
> mnc_assembly.m only assembles all the tiles within a folder.
>
>
> (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.
>
>
> Thanks,
>
> Sanjiv
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20181114/1473e20d/attachment-0001.html>


More information about the MITgcm-support mailing list