[MITgcm-support] Matlab scripts for viewing netcdf files

Jody Klymak jklymak at uvic.ca
Wed Nov 14 17:24:57 EST 2018


https://github.com/MITgcm/MITgcm/pull/31 enables global netcdf files if you are comfortable patching the code...

Sent from my iPad

> On Nov 14, 2018, at 2:22 PM, Edward W Doddridge <ewd at mit.edu> wrote:
> 
> Hi Sanjiv,
> 
> 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).
> 
> 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.
> 
> 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.
> 
> Cheers,
> Ed
> 
> 
> 
> Edward Doddridge
> Postdoctoral researcher
> Earth, Atmospheric and Planetary Sciences
> Massachusetts Institute of Technology
> 
> www.doddridge.me
> 
>> On 14 Nov 2018, at 17:09, 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) 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
> 
> _______________________________________________
> 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/131a467f/attachment.html>


More information about the MITgcm-support mailing list