/[MITgcm]/MITgcm_contrib/gael/matlab_class/gcmfaces_IO/rdmds2gcmfaces.m
ViewVC logotype

Diff of /MITgcm_contrib/gael/matlab_class/gcmfaces_IO/rdmds2gcmfaces.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by gforget, Tue Jun 21 21:18:48 2011 UTC revision 1.4 by gforget, Sun Aug 3 20:30:11 2014 UTC
# Line 1  Line 1 
1  function [fldOut]=rdmds2gcmfaces(varargin);  function [fldOut]=rdmds2gcmfaces(varargin);
2  %object:    read with rmds then apply convert2gcmfaces  %object:    read with rmds then apply convert2gcmfaces
3  %input:     varargin are the options to pass to rdmds (type help rdmds)  %input:     varargin are the options to pass to rdmds (type help rdmds)
4  %output:    fldOut is a gcmfaces object  %output:    fldOut is a gcmfaces object
5  %  %
6  %note:      an earlier version was expecting nFaces to be passed  %note:      an earlier version was expecting nFaces to be passed
7  %           as the last argument; this is not the case anymore.  %           as the last argument; this is not the case anymore.
8    
9  v0=rdmds(varargin{1:end});  gcmfaces_global;
10  fldOut=convert2gcmfaces(v0);  
11    v0=rdmds(varargin{1:end});
12    
13    nn=size(v0);
14    test1=isfield(mygrid,'xtrct');
15    test1=test1&(prod(mygrid.ioSize)~=prod(nn(1:2)));
16    if test1;
17        if length(nn)==2; nn=[nn 1]; end;
18        v0=reshape(v0,[nn(1)*nn(2) nn(3:end)]);
19        v0=v0(mygrid.xtrct_inFull,:,:,:);
20        v0=reshape(v0,[mygrid.ioSize nn(3:end)]);
21    end;
22    
23    fldOut=convert2gcmfaces(v0);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22