source: trunk/src/script_makegrid.m @ 1165

Last change on this file since 1165 was 1163, checked in by sommeria, 2 months ago

SearchBoxSize? changed to SearchRange? in civ, possibility of a grid set by a netcdf file

File size: 909 bytes
Line 
1Project='/.fsnet/project/coriolis/2024/24PLUME/0_REF_FILES';
2npx_ima=2560;npy_ima=2160;
3Dx=10;
4nbinterv_x=floor((npx_ima-1)/Dx);
5gridlength_x=nbinterv_x*Dx;
6minix=ceil((npx_ima-gridlength_x)/2);
7xpos=minix:Dx:npx_ima-1;
8ypos=[120:2:130 135:5:400 410:10:npy_ima];
9ydiff=diff(ypos);
10corrbox_y=2*[ydiff ydiff(end)];
11[GridX,GridY]=meshgrid(xpos,ypos);
12[~,CorrBoxY]=meshgrid(ones(size(xpos)),corrbox_y);
13CorrBoxX=400./CorrBoxY+1;
14max(max(CorrBoxX))
15
16figure
17plot(GridX,GridY,'+')
18Data.ListVarName={'Grid','CorrBox'};
19Data.VarDimName={{'nbvec','NbDim'},{'nbvec','NbDim'}};
20Data.Grid=zeros(numel(CorrBoxX),2);
21Data.Grid(:,1)=reshape(GridX,[],1);
22Data.Grid(:,2)=reshape(GridY,[],1);% increases with array index
23Data.CorrBoxSize=zeros(numel(CorrBoxX),2);
24Data.CorrBoxSize(:,1)=reshape(CorrBoxX,[],1);
25Data.CorrBoxSize(:,2)=reshape(CorrBoxY,[],1);% increases with array index
26
27struct2nc(fullfile(Project,'grid.nc'),Data)
Note: See TracBrowser for help on using the repository browser.