[MITgcm-support] reading llc binaries

Samar Khatiwala spk at ldeo.columbia.edu
Thu Feb 27 12:36:07 EST 2014


Hi Anthony,

If your output is in the usual binary format (.data and .meta) you can read it using rdmds and then use convert2gcmfaces to 
reshape/convert the output into a gcmfaces data type.

If you don't want the dependency on gcmfaces (e.g., if sharing with someone who doesn't have the package installed), I suggest 
extracting and storing the bare essentials from Gael's 'mygrid' variable in a struct as follows:

%
  gcmfacesdata.ioSize=mygrid.ioSize;
  gcmfacesdata.nFaces=nFaces;  
  gcmfacesdata.facesSize=mygrid.facesSize(1:nFaces,:);  
  gcmfacesdata.faces2gcm=cell(nFaces,1);
  gcmfacesdata.gcm2faces=cell(nFaces,1);
  for iF=1:nFaces
    gcmfacesdata.faces2gcm{iF}=mygrid.faces2gcm{iF};
    gcmfacesdata.gcm2faces{iF}=mygrid.gcm2faces{iF};    
  end    
%

That is all you need to do I/O, manipulate face data, etc (for at least the LLC format).

Samar

On Feb 27, 2014, at 12:03 PM, Anthony Coletti <ajcolett at geo.umass.edu> wrote:

> Hi all,
> 
> Gael’s gcmfaces was somewhat useful (still in my young years of matlab) but confused me a tad.  But it contained all the tiles I need for the resolution!  So thank you so much for that.  Perhaps I will go through the demo again…
> 
> With the CS faces, I used to be able to do a ‘A = readbin(‘file name’,’dimensions e.g. [32 6 32],type, prec)’ when reading some output.
> 
> So I have been looking through the Matlab utils (*/utils/matlab/cs_grid/latloncap/) and found some files that may be of help reading llc binaries.
> 
> Can I use such files as quirkead_llc and the appropriate plotting commands to read llc grid output similar to that of the ‘readbin’ command above?  I am still used to reading CS binaries and plotting CS faces.
> 
> Thanks!
> 
> Anthony
> 
> Anthony J. Coletti
> Climate System Research Center
> Department of Geosciences
> Morrill Building
> 611 N. Pleasant Street
> 233 Morrill Science Center
> University of Massachusetts-Amherst
> paleoclimate.org
> Email: ajcolett at geo.umass.edu
> http://blogs.umass.edu/ajcolett/
> 
> “For me, I am driven by two main philosophies: know more today about the world than I knew yesterday and lessen the  suffering of others. You'd be surprised how far that gets you.” ― Neil deGrasse Tyson
> 
> 
> 
> 
> _______________________________________________
> MITgcm-support mailing list
> 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/20140227/229c69f1/attachment.htm>


More information about the MITgcm-support mailing list