[MITgcm-devel] proposed rdmds.m modification

Martin Losch Martin.Losch at awi.de
Mon Sep 15 03:39:59 EDT 2014


Hi Gael,

matlab has a “fullfile” function (fullfile(“some directory”, “another directory”, …, “myfile”), which I find even better than fiddling with the file-separator explicitly. Does that apply here?

Martin

On Sep 12, 2014, at 10:57 PM, gael forget <gforget at mit.edu> wrote:

> Dear all,
> 
> the following modification should make rdmds.m behavior 
> more robust across platforms (mac,linux vs pc).
> 
> <  [Dir,NAME,EXT] = fileparts(fname);
> <  if ~isempty(Dir); Dir=[Dir filesep]; end;
> ---
>> NS=findstr('/',fname);
>> if size(NS)>0
>>  Dir=fname(1:NS(end));
>> else
>>  Dir='./';
>> end
> 
> I did in this modification in the copy of rdmds.m in gcmfaces
> ( MITgcm_contrib/gael/matlab_class/gcmfaces_IO/rdmds.m ).
> Shall we do the same to MITgcm/utils/matlab/rdmds.m ?
> 
> Gael
> 
> 
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel




More information about the MITgcm-devel mailing list