function [mygrid_notuse,mygrid1]=load_grid_aste1()

global mygrid_notuse mygrid1
mygrid_notuse=[];
mygrid1=[];

dirRoot='/nobackupp2/atnguye4/MITgcm_c65q/mysetups/aste_270x450x180/';
dirGrid=[dirRoot 'GRID/'];
if(exist([dirGrid 'grid.specs.mat'])==0);
  ioSize=[364500 1];
  facesSize=[[270 450];[0 0];[270 270];[180 270];[450 270]];
%  facesExpand=[270 450];
  facesExpand=[270 810];
  save([dirGrid 'grid.specs.mat'],'ioSize','facesSize','facesExpand');
end;

nFaces=5;fileFormat='compact';nx=270;ny=1350;nz=50;
list23D={'XC','YC','RAC','DXC','DYC','DXG','DYG','hFacC','hFacW','hFacS','Depth'};
list1D={'RC','RF','DRC','DRF'};
grid_load_mod1(dirGrid,nFaces,fileFormat,list23D,list1D);

%take care that nan in RAC are replaced with zeros for gcmfaces_calc/gcmfaces_edge_mask.m

temp=mygrid_notuse.RAC;temp(isnan(temp))=0;mygrid_notuse.RAC=temp;clear temp

%fix nan issue of face4 & face2
temp=mygrid_notuse.hFacC.f4;temp(181:end,:,:)=0;mygrid_notuse.hFacC.f4=temp;clear temp
temp=mygrid_notuse.hFacS.f4;temp(181:end,:,:)=0;mygrid_notuse.hFacS.f4=temp;clear temp
temp=mygrid_notuse.hFacW.f4;temp(181:end,:,:)=0;mygrid_notuse.hFacW.f4=temp;clear temp

temp=zeros(size(mygrid_notuse.hFacC.f2));mygrid_notuse.hFacC.f2=temp;clear temp
temp=zeros(size(mygrid_notuse.hFacS.f2));mygrid_notuse.hFacS.f2=temp;clear temp
temp=zeros(size(mygrid_notuse.hFacW.f2));mygrid_notuse.hFacW.f2=temp;clear temp

temp=mygrid_notuse.hFacC;temp(temp==0)=NaN;temp(temp>0)=1;mygrid_notuse.mskC=temp;clear temp
temp=mygrid_notuse.hFacS;temp(temp==0)=NaN;temp(temp>0)=1;mygrid_notuse.mskS=temp;clear temp
temp=mygrid_notuse.hFacW;temp(temp==0)=NaN;temp(temp>0)=1;mygrid_notuse.mskW=temp;clear temp

mygrid1.XC0=mygrid_notuse.XC;%mskC=mygrid_notuse.mskC;mskW=mygrid_notuse.mskW;mskS=mygrid_notuse.mskS;
mygrid1.XC0360=mygrid1.XC0;temp=mygrid1.XC0360.f4;ii=find(temp<-180);temp(ii)=temp(ii)+360;mygrid1.XC0360.f4=temp;clear temp

%now blanking out face4 for purpose of Atlantic overturning calc
mygrid1.RACnoblank=squeeze(mygrid_notuse.RAC);
mygrid1.YCnoblank=squeeze(mygrid_notuse.YC);

mygrid1.RACblank4=mygrid1.RACnoblank;temp=0.*mygrid1.RACblank4.f4;mygrid1.RACblank4.f4=temp;clear temp;
mygrid1.YCblank4=mygrid1.YCnoblank;temp=nan.*mygrid1.YCblank4.f4;mygrid1.YCblank4.f4=temp;clear temp

%now blanking out everything except Pacific for baro-streamfxn only in Pacific:
mygrid1.YCpacific=mygrid1.YCnoblank;
  temp=mygrid1.YCpacific.f4;iexclude=find(temp>65);temp(iexclude)=nan;mygrid1.YCpacific.f4=temp;
  for k=[1,2,3,5];
    eval(['temp=nan.*mygrid1.YCpacific.f' num2str(k) ';']);eval(['mygrid1.YCpacific.f' num2str(k) '=temp;']);clear temp
  end;
mygrid1.XCpacific=mygrid_notuse.XC;
  temp=mygrid1.XCpacific.f4;temp(iexclude)=nan;mygrid1.XCpacific.f4=temp;
  for k=[1,2,3,5];
    eval(['temp=nan.*mygrid1.XCpacific.f' num2str(k) ';']);eval(['mygrid1.XCpacific.f' num2str(k) '=temp;']);clear temp
  end;
mygrid1.RACpacific=mygrid1.RACnoblank;
  temp=mygrid1.RACpacific.f4;temp(iexclude)=nan;mygrid1.RACpacific.f4=temp;
  for k=[1,2,3,5];
    eval(['temp=0.*mygrid1.RACpacific.f' num2str(k) ';']);eval(['mygrid1.RACpacific.f' num2str(k) '=temp;']);clear temp
  end;

%mygrid1.mskCpacific=mygrid_notuse.mskC;%mskC=mygrid_notuse.mskC;
%  for k=[1,2,3,5];eval(['mygrid1.mskCpacific.f' num2str(k) '=nan.*mygrid1.mskCpacific.f' num2str(k) ';']);end;
%  for k=1:50;temp=mygrid1.mskCpacific.f4(:,:,k);temp(iexclude)=nan;mygrid1.mskCpacific.f4(:,:,k)=temp;end;
mygrid1.mskSpacific=mygrid_notuse.mskS;%mskS=mygrid_notuse.mskS;
  for k=[1,2,3,5];eval(['mygrid1.mskSpacific.f' num2str(k) '=nan.*mygrid1.mskSpacific.f' num2str(k) ';']);end;
%  for k=1:50;temp=mygrid1.mskSpacific.f4(:,:,k);temp(iexclude)=nan;mygrid1.mskSpacific.f4(:,:,k)=temp;end;
mygrid1.mskWpacific=mygrid_notuse.mskW;%mskW=mygrid_notuse.mskW;
  for k=[1,2,3,5];eval(['mygrid1.mskWpacific.f' num2str(k) '=nan.*mygrid1.mskWpacific.f' num2str(k) ';']);end;
%  for k=1:50;temp=mygrid1.mskWpacific.f4(:,:,k);temp(iexclude)=nan;mygrid1.mskWpacific.f4(:,:,k)=temp;end;

%line to add in additional fields to mygrid_notuse:
%fieldn={'mskW','mskS'};field={'hFacW','hFacS'};
%for k=1:length(field)
%  eval(['mygrid_notuse.' field{k} '=rdmds2gcmfaces([dirGrid ''' field{k} '*'']);']);
%  temp=eval(['mygrid_notuse.' field{k}]);temp(temp==0)=NaN;temp(temp>0)=1;eval(['mygrid_notuse.' fieldn{k} '=temp;']);
%  clear temp
%end;

%gcmfaces_calc/gcmfaces_lines_zonal.m -> add mygrid_notuse.LATS_MASKS
mygrid_notuse.RAC=mygrid1.RACblank4;
mygrid_notuse.YC=mygrid1.YCblank4;
mygrid1.LATS_VAL=[-35:85]';
mygrid1.MSKS_NAM={'mskCint','mskCedge','mskWedge','mskSedge'};
%gcmfaces_lines_zonal(mygrid1.LATS_VAL,mygrid1.MSKS_NAM);
%mygrid_notuse.LATS=[mygrid_notuse.LATS_MASKS.lat]';

mygrid1.VolW=mk3D(mygrid_notuse.DRF,mygrid_notuse.hFacC).*mk3D(mygrid_notuse.DYG,mygrid_notuse.hFacC);
mygrid1.VolS=mk3D(mygrid_notuse.DRF,mygrid_notuse.hFacC).*mk3D(mygrid_notuse.DXG,mygrid_notuse.hFacC);

%viewing:
%clf;for k=1:101;pcolor(squeeze(mygrid_notuse.LATS_MASKS(k).mskSedge.f1(:,:,1))');shading flat;colorbar;
%shadeland(1:270,1:450,1-squeeze(mygrid_notuse.hFacC.f1(:,:,1))',[.7,.7,.7]);title(mygrid_notuse.LATS_MASKS(k).lat);pause;end;
%clf;for k=1:101;pcolor(squeeze(mygrid_notuse.LATS_MASKS(k).mskWedge.f5(:,:,1))');shading flat;colorbar;
%shadeland(1:450,1:270,1-squeeze(mygrid_notuse.hFacC.f5(:,:,1))',[.7,.7,.7]);title(mygrid_notuse.LATS_MASKS(k).lat);pause;end;

return
