[MITgcm-support] Matlab scripts for viewing netcdf files

Sanjiv Ramachandran sramachandran at umassd.edu
Thu Nov 15 12:17:54 EST 2018


Hi all,

           Thanks a lot for your replies!


(i) The python script gluemncbig works beautifully. I will just use this for the short term.


(ii) The patch suggested by Jody to generate a combined multi-tile file at runtime is very useful and I will look into this for

future runs.

(iii) It is possible mnc_assembly.m is giving me errors due to version compatibility issues with matlab (I have an old version, 2012a). For now, I will stick to the python script.

Regards,
Sanjiv
________________________________
From: MITgcm-support <mitgcm-support-bounces at mitgcm.org> on behalf of Martin Losch <Martin.Losch at awi.de>
Sent: Thursday, November 15, 2018 3:13 AM
To: MITgcm Support
Subject: Re: [MITgcm-support] Matlab scripts for viewing netcdf files

Hi Sanjiv,

I recommend the python script utils/python/MITgcmutils/scripts/gluemncbig to combine netcdf files of individual tiles.

In your case, the MLadjust is small enough to be run only on one tile, the division into multiple tiles is only done here to test some code aspects. So in this particular case, you could change the SIZE.h file to
     &           sNx =  50,
     &           sNy =  26,
     &           OLx =   3,
     &           OLy =   3,
     &           nSx =   1,
     &           nSy =   1,

and you’ll get just one netcdf output field. As soon as your domain starts to get larger, you’ll need MPI-parellel code for which the netcdf package (as mentioned multiple times before) cannot produce global files.

Martin


> On 14. Nov 2018, at 23:33, Gus Correa <gus at ldeo.columbia.edu> wrote:
>
> 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) 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

_______________________________________________
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/20181115/42447c35/attachment.html>


More information about the MITgcm-support mailing list