[MITgcm-support] Combine netcdf output using matlab version 2010a

Lauderdale, Jonathan J.Lauderdale at liverpool.ac.uk
Mon Mar 19 07:24:32 EDT 2012


Hello,

I recently had issues with the gluemnc/mnc_assembly matlab routines - specifically mnc_assembly is written for the "netcdf" toolbox which seems to be having problems operating under the native matlab netcdf interface, in my case, it ran fine but the resulting netcdf file was empty. With the help of John Evans (http://mexcdf.sourceforge.net/) I've adjusted mnc_assembly to work with the newer/ apparently easier-to-support SNCTOOLS toolbox.

I attach it here to save you having to "reinvent the wheel". It works fine for my purposes (coarse res, regular domain) but I've not tested it on anything bigger or with a CS grid, so your milage may vary.

Cheers,

Jon

___________________________________________________________________________
Dr. Jonathan M. Lauderdale
Postdoctoral Research Associate
School of Environmental Sciences: Oceans and Ecosystems
University of Liverpool
4 Brownlow Street,
Liverpool, L69 3GP, U.K.
Tel: +44 (0)151 794 4086
Email: <mailto:jonathan.lauderdale at liverpool.ac.uk>

UK Polar Network: <http://www.polarnetwork.org/about>
Association of Polar Early Career Scientists <http://www.apecs.is/>
___________________________________________________________________________

On 19 Mar 2012, at 08:50, Martin Losch wrote:

Hi Yeal,

Serge is right, the function mnc_assembly relies on the "old" mexcdf53 file, that was not part of "official" matlab distributions (so one needed to install it as a separate toolbox). With newer matlab distributions, this mexcdf53 stuff is usually no longer necessary, because matlab now has it own build-in netcdf API, so mexcdf53 is usually not installed. For you it means, that you either install it yourself or, which I would do in your case, rewrite mnc_assembly to use the new API. It's not that hard. Have a look at rdmnc.m for examples, or at the attached ncload.m, where I tried to do something similar.

Alternatively, you can use the scripts gluemnc/xplodemnc to glue your files together (usually faster than matlab, but requires the nco operations).

Martin

On Mar 19, 2012, at 6:58 AM, fancer fancer wrote:

Hi, Yeal.

Could you copy the error message to this list? I have been given the following:
??? Undefined function or method 'netcdf' for input arguments of type 'char'.

Error in ==> mnc_assembly at 91
 fnc = netcdf(fnm, 'nowrite');

The mnc_assembly.m uses old API for reading netCDF files. It looks like this script needs to be rewritten using new functionality.

Sincerely,
Serge V. Semin

On Sun, Mar 18, 2012 at 1:57 PM, Yael Amitai <yael.amitai at mail.huji.ac.il<mailto:yael.amitai at mail.huji.ac.il>> wrote:
Hi,
When trying to assembly the *.nc output of my run in matlab 7.10 (R2010a) it gives me an error massage.
Does anyone try to use the mnc_assembly.m code in that version (or similar, that contain the netcdf built in toolbox) of matlab and can help me with that?
Thank you
Yael


--
Yael Amitai, PhD candidate
Oceanography department, Earth Science institute
The Hebrew University of Jerusalem
Phone: 972-(0)2-6586516
Home page


_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
http://mitgcm.org/mailman/listinfo/mitgcm-support


_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
http://mitgcm.org/mailman/listinfo/mitgcm-support
<ncload.m>_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org<mailto:MITgcm-support at mitgcm.org>
http://mitgcm.org/mailman/listinfo/mitgcm-support


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20120319/e37b452f/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mnc_assembly.m
Type: application/octet-stream
Size: 26897 bytes
Desc: mnc_assembly.m
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20120319/e37b452f/attachment-0001.obj>


More information about the MITgcm-support mailing list