function [RunStr,dirRoot,dirGrid,dirRun,nx,ny,nz,ts_break,dt1,dt2,yrStart,StrOut,extF]=set_MITgcmGrid(GridStr,D2D3);
%---
% [RunStr,dirRoot,dirGrid,dirRun,nx,ny,nz,ts_break,dt1,dt2,yrStart,StrOut,extF]=set_MITgcmGrid(GridStr,D2D3);
%---

ts_break=1000000000;extF{1}='real*4';extF{2}='.data';extF{3}='';extF{4}='';extF{5}='';
if(D2D3==2);%2D
  nz=1;StrOut{1}='SIheff';StrOut{2}='SIarea';StrOut{3}='SIuice';StrOut{4}='SIvice';StrOut{5}='SIhsnow';
elseif(D2D3==3);%3D
  nz=50;StrOut{1}='THETA';StrOut{2}='SALTanom';StrOut{3}='UVELMASS';StrOut{4}='VVELMASS';
end;

yrStart=1992;
% ------- cube sphere ------------------------------------------
if(length(strfind(GridStr,'CS'))>0|length(strfind(GridStr,'arctic'))>0);
  %dirRoot=['/net/nares/raid8/ecco-shared/' GridStr '/'];

  ext='';

      if(length(strfind(GridStr,'18km'))>0);nx=420;ny=384;       dt1=1200;dt2=dt1;
         RunStr=input('RunStr = ? ["JRA25_OPT3"] ');
  elseif(length(strfind(GridStr,'36km'))>0);nx=210;ny=192;       dt1=2400;dt2=dt1;
         RunStr=input('RunStr = ? ["np168_era","np168_jra","opt3_30Aug2012"] ');
  elseif(length(strfind(GridStr,'9km'))>0);nx=420*2;ny=384*2;    dt1=900;dt2=dt1;
         RunStr=input('RunStr = ? ["exe_WOA05bcs_9km","exe_firstrun_1992_2009"] ');
  elseif(length(strfind(GridStr,'4km'))>0);nx=420*4;ny=384*4;    dt1=240;dt2=dt1; extF{2}='.mat';
         RunStr=input('RunStr = ? ["cube-JRA_4km_2"] ');
  elseif(length(strfind(GridStr,'CS'))>0);nx=510;ny=510;         dt1=1200;dt2=dt1;
         RunStr=input('RunStr = ? ["cube88","cube92"] ');
         if(strcmp(RunStr,'adj2004_i30')==1);yrStart=2004;end;
         if(strcmp(RunStr,'adj2009_i30')==1);yrStart=2009;end;
  end;
  %dirGrid=[dirRoot 'GRID/'];
% ------- llc  -------------------------------------------------
elseif(length(strfind(GridStr,'llc'))>0);
  extF{5}='';
  ext=input('["global or aste_270x450x180; "] ');extF{4}=ext;
  ext1=input('extension for DDtheta_astemod ["_astemod" or empty] ');extF{3}=ext1;
  %dirRoot=['/net/nares/raid8/ecco-shared/' GridStr '/' extF{5} '/'];

  if(D2D3==3);StrOut{1}='DDtheta';StrOut{2}='DDsalt';StrOut{3}='DDuvel';StrOut{4}='DDvvel';end;

  if(length(strfind(GridStr,'270'))>0);
    if(strcmp(ext,'global')==1);
        nx=270;ny=nx*13;dt1=1800;dt2=dt1;
        RunStr=input('RunStr = ? ["BiHarmonic","BiHarmonic1","Harnomic","Smagorinsky"] ');
        if(strcmp(RunStr,'Harmonic')==1);
          dt1=1800;dt2=1800;ts_break=1200000000;extF{1}='real*4';yrStart=1992;
        end;
        if(strcmp(RunStr,'Smagorinsky')==1);
          dt1=1800;dt2=1800;ts_break=1200000000;extF{1}='real*4';yrStart=1992;
        end;
        if(strcmp(RunStr,'BiHarmonic')==1);
          dt1=1800;dt2=1500;ts_break=120000;extF{1}='real*8';yrStart=1992;
              if(D2D3==2);StrOut{1}='/diags/state_2d_set1.';     %ETAN,SIarea,SIheff,SIhsnow
          elseif(D2D3==3);StrOut{1}='/diags/state_3d_set1.';end; %THETA,SALT
        end;
        if(strcmp(RunStr,'BiHarmonic_c81diffKr')==1);	%this is the run Patrick did w/ new ice code
          dt1=2400;dt2=1800;ts_break=0000197700;extF{1}='real*4';yrStart=1989;
        end;
        if(strcmp(RunStr,'BiHarmonic_c81diffKr_era')==1);% similar diffKr as above, use era
          dt1=2400;dt2=[];ts_break=[];extF{1}='real*4';yrStart=1989;
        end;
        if(strcmp(RunStr,'BiHarmonic_newdiffKr')==1);	%same w/ Patrick's run, but use new diffKr
          dt1=1800;dt2=1200;ts_break=0000112415;extF{1}='real*4';yrStart=1989;
        end;
        if(strcmp(RunStr,'BiHarmonic_1em4noplume')==1);%set const diffKr = 1e-4, no plume
          dt1=1200;dt2=dt1;ts_break=1200000000;extF{1}='real*4';yrStart=1989;
        end;
        if(strcmp(RunStr,'BiHarmonic_diffKrnoplume')==1);	%use new diffKr, no plume
          dt1=1200;dt2=dt1;ts_break=1200000000;extF{1}='real*4';yrStart=1989;
        end;
    else;
      nx=270;ny=1350;dt1=1200;dt2=dt1;yrStart=1992;extF{1}='real*4';
      RunStr=input('RunStr = ? ["bobLeithBasin4_llc90tsuv"] ');
      if(strcmp(RunStr,'bobLeithBasin4')>0);yrStart=1989;end;
    end;
     
  elseif(length(strfind(GridStr,'90'))>0);
    nx=90;ny=nx*13;dt1=3600;dt2=dt1;yrStart=1992;extF{1}='real*4';ts_break=1200000000;
    RunStr=input('RunStr = ? ["v04r03iter3","v04r03iter3_noxx"] ');
    if(length(extF{3})==0);
          if(D2D3==2);StrOut{1}='/diags/state_2d_set1.';     %ETAN,SIarea,SIheff,SIhsnow
      elseif(D2D3==3);StrOut{1}='/diags/state_3d_set1.';end; %THETA,SALT
    end;

  elseif(length(strfind(GridStr,'540'))>0);nx=540;ny=nx*13;dt1=600;dt2=dt1;
    RunStr=input('RunStr = ? ["?","?"] ');
  end;
  %dirGrid=[dirRoot 'GRID' extF{3} '/'];
end;
dirRoot=['/net/nares/raid8/ecco-shared/' GridStr '/' extF{4} '/'];
dirRun=[dirRoot extF{5} 'output/' RunStr '/'];
dirGrid=[dirRun 'GRID/'];if(exist(dirGrid)==0);dirGrid=[dirRoot 'GRID' extF{3} '/'];end;

return
