Due to a shift in policy, from 0900 GMT on Wednesday 14th July 2021, we will be disabling ssh access to the server for external users. External users who wish to continue to access code repositories on the server will need to switch to using https. This can be accomplished in the following way: 1) On the repo on gitlab, use the clone dialogue and select ‘Clone with HTTPS’ to get the address of the repo; 2) From within the checkout of your repo run: $ git remote set-url origin HTTPS_ADDRESS. Here, replace HTTPS_ADDRESS with the address you have just copied from GitLab. Pulls and pushes will now require you to enter a username and password rather than using a ssh key. If you would prefer not to enter a password each time, you might consider caching your login credentials.

Commit 01cfefab authored by Pierre Cazenave's avatar Pierre Cazenave

Remove lines of only spaces.

parent 2c400ffa
...@@ -191,18 +191,18 @@ try ...@@ -191,18 +191,18 @@ try
Itime.Data(2) = netcdf.getVar(nc,Itime.ID,last_entry-1,1,'int32'); Itime.Data(2) = netcdf.getVar(nc,Itime.ID,last_entry-1,1,'int32');
Itime2.Data(1) = netcdf.getVar(nc,Itime.ID+1,0,1,'int32'); Itime2.Data(1) = netcdf.getVar(nc,Itime.ID+1,0,1,'int32');
Itime2.Data(2) = netcdf.getVar(nc,Itime.ID+1,last_entry-1,1,'int32'); Itime2.Data(2) = netcdf.getVar(nc,Itime.ID+1,last_entry-1,1,'int32');
[start_d(1),end_d(1)] = deal(double(Itime.Data(1))+time_offset,double(Itime.Data(end))+time_offset); [start_d(1),end_d(1)] = deal(double(Itime.Data(1))+time_offset,double(Itime.Data(end))+time_offset);
[start_d(2),end_d(2)] = deal(double(Itime2.Data(1)),double(Itime2.Data(end))); [start_d(2),end_d(2)] = deal(double(Itime2.Data(1)),double(Itime2.Data(end)));
start_date=sum(start_d.*[1 1/(24*60*60*1000)]); %hkj missing 1000 inserted start_date=sum(start_d.*[1 1/(24*60*60*1000)]); %hkj missing 1000 inserted
end_date = sum(end_d.*[1 1/(24*60*60*1000)]); %hkj missing 1000 inserted end_date = sum(end_d.*[1 1/(24*60*60*1000)]); %hkj missing 1000 inserted
var_time = netcdf.getVar(nc,Itime.ID,[0],[10],'double')+time_offset+... var_time = netcdf.getVar(nc,Itime.ID,[0],[10],'double')+time_offset+...
netcdf.getVar(nc,Itime.ID+1,0,10,'double')./(24*600*6000) ; netcdf.getVar(nc,Itime.ID+1,0,10,'double')./(24*600*6000) ;
DeltaT=median(diff(var_time)); DeltaT=median(diff(var_time));
var_time = start_date:DeltaT:(end_date-DeltaT); var_time = start_date:DeltaT:(end_date-DeltaT);
catch me catch me
if ftbverbose if ftbverbose
warning('No ''Itime'' and/or ''Itime2'' variables, using less precise ''time'' instead.\n(%s)\n', me.message) warning('No ''Itime'' and/or ''Itime2'' variables, using less precise ''time'' instead.\n(%s)\n', me.message)
...@@ -379,7 +379,7 @@ for aa=1:length(varnames) ...@@ -379,7 +379,7 @@ for aa=1:length(varnames)
start.(dimName{dd})=RestrictDims.idx{dimidx(dd)}(1)-1; start.(dimName{dd})=RestrictDims.idx{dimidx(dd)}(1)-1;
count.(dimName{dd})=length(RestrictDims.idx{dimidx(dd)}); count.(dimName{dd})=length(RestrictDims.idx{dimidx(dd)});
stride.(dimName{dd})=timestrd; stride.(dimName{dd})=timestrd;
else else
for ss=1:length(RestrictDims.idx{dimidx(dd)}) for ss=1:length(RestrictDims.idx{dimidx(dd)})
start.(dimName{dd})(ss)=RestrictDims.idx{dimidx(dd)}(ss)-1; start.(dimName{dd})(ss)=RestrictDims.idx{dimidx(dd)}(ss)-1;
...@@ -423,14 +423,14 @@ for aa=1:length(varnames) ...@@ -423,14 +423,14 @@ for aa=1:length(varnames)
read_start(find(~do_restrict))=start.(cc_names{find(~do_restrict)}); read_start(find(~do_restrict))=start.(cc_names{find(~do_restrict)});
read_count(find(~do_restrict))=count.(cc_names{find(~do_restrict)}); read_count(find(~do_restrict))=count.(cc_names{find(~do_restrict)});
read_stride(find(~do_restrict))=stride.(cc_names{find(~do_restrict)}); read_stride(find(~do_restrict))=stride.(cc_names{find(~do_restrict)});
for cc=1:length(start.(cc_names{find(do_restrict)})) for cc=1:length(start.(cc_names{find(do_restrict)}))
read_start(find(do_restrict))=start.(cc_names{find(do_restrict)})(cc); read_start(find(do_restrict))=start.(cc_names{find(do_restrict)})(cc);
read_count(find(do_restrict))=count.(cc_names{find(do_restrict)})(cc); read_count(find(do_restrict))=count.(cc_names{find(do_restrict)})(cc);
read_stride(find(do_restrict))=stride.(cc_names{find(do_restrict)}); read_stride(find(do_restrict))=stride.(cc_names{find(do_restrict)});
var_dump=netcdf.getVar(nc,varID,read_start,read_count,read_stride,'double'); var_dump=netcdf.getVar(nc,varID,read_start,read_count,read_stride,'double');
eval([varnames{aa},'(cc,:)=var_dump;']) eval([varnames{aa},'(cc,:)=var_dump;'])
clear var_dump clear var_dump
end end
...@@ -478,7 +478,7 @@ for aa=1:length(varnames) ...@@ -478,7 +478,7 @@ for aa=1:length(varnames)
read_start(tt)=start.(cc_names{tt}); read_start(tt)=start.(cc_names{tt});
read_count(tt)=count.(cc_names{tt}); read_count(tt)=count.(cc_names{tt});
read_stride(tt)=stride.(cc_names{tt}); read_stride(tt)=stride.(cc_names{tt});
end end
% check if time is one of them % check if time is one of them
...@@ -495,7 +495,7 @@ for aa=1:length(varnames) ...@@ -495,7 +495,7 @@ for aa=1:length(varnames)
read_count(find(do_restrict))=count.(cc_names{find(do_restrict)})(cc); read_count(find(do_restrict))=count.(cc_names{find(do_restrict)})(cc);
read_stride(find(do_restrict))=stride.(cc_names{find(do_restrict)}); read_stride(find(do_restrict))=stride.(cc_names{find(do_restrict)});
var_dump=netcdf.getVar(nc,varID,read_start,read_count,read_stride,'double'); var_dump=netcdf.getVar(nc,varID,read_start,read_count,read_stride,'double');
switch dimName(find(do_restrict)) switch dimName(find(do_restrict))
case 'node' | 'nele' case 'node' | 'nele'
eval([varnames{aa},'(cc,:,:)=var_dump;']) eval([varnames{aa},'(cc,:,:)=var_dump;'])
...@@ -572,7 +572,7 @@ for aa=1:length(varnames) ...@@ -572,7 +572,7 @@ for aa=1:length(varnames)
read_count(2)=count.(cc_names{2})(cc); read_count(2)=count.(cc_names{2})(cc);
read_stride(2)=stride.(cc_names{2}); read_stride(2)=stride.(cc_names{2});
var_dump=netcdf.getVar(nc,varID,read_start,read_count,read_stride,'double'); var_dump=netcdf.getVar(nc,varID,read_start,read_count,read_stride,'double');
eval([varnames{aa},'(kk,cc)=var_dump;']) eval([varnames{aa},'(kk,cc)=var_dump;'])
clear var_dump clear var_dump
end end
...@@ -583,7 +583,7 @@ for aa=1:length(varnames) ...@@ -583,7 +583,7 @@ for aa=1:length(varnames)
eval(['selection.',varnames{aa},'.start=start;']) eval(['selection.',varnames{aa},'.start=start;'])
eval(['selection.',varnames{aa},'.count=count;']) eval(['selection.',varnames{aa},'.count=count;'])
case 3 % three dimension to restrict! case 3 % three dimension to restrict!
% but the variable can have more than 2 dimensions % but the variable can have more than 2 dimensions
switch dimens switch dimens
...@@ -595,7 +595,7 @@ for aa=1:length(varnames) ...@@ -595,7 +595,7 @@ for aa=1:length(varnames)
min(sum(count.(cc_names{2})),dimLength(2)),... min(sum(count.(cc_names{2})),dimLength(2)),...
min(sum(count.(cc_names{3})),dimLength(3))]; min(sum(count.(cc_names{3})),dimLength(3))];
end end
eval([varnames{aa},'=nan(rr);']) eval([varnames{aa},'=nan(rr);'])
% check if time is one of them % check if time is one of them
if isempty(find(dimidx==5));disp('This won''t work, try again');return;end if isempty(find(dimidx==5));disp('This won''t work, try again');return;end
...@@ -604,7 +604,7 @@ for aa=1:length(varnames) ...@@ -604,7 +604,7 @@ for aa=1:length(varnames)
read_start(do_time)=start.(cc_names{do_time}); read_start(do_time)=start.(cc_names{do_time});
read_count(do_time)=count.(cc_names{do_time}); read_count(do_time)=count.(cc_names{do_time});
read_stride(do_time)=stride.(cc_names{do_time}); read_stride(do_time)=stride.(cc_names{do_time});
% search for the non_restrictive variable % search for the non_restrictive variable
% cc=1 % cc=1
% while ~(length( start.(cc_names{cc}))==1);cc=cc+1;end % while ~(length( start.(cc_names{cc}))==1);cc=cc+1;end
...@@ -616,17 +616,17 @@ for aa=1:length(varnames) ...@@ -616,17 +616,17 @@ for aa=1:length(varnames)
else else
do_one=do_other(2);do_two=do_other(1); do_one=do_other(2);do_two=do_other(1);
end end
for cc=1:length(start.(cc_names{do_one})) for cc=1:length(start.(cc_names{do_one}))
read_start(do_one)=start.(cc_names{do_one})(cc); read_start(do_one)=start.(cc_names{do_one})(cc);
read_count(do_one)=count.(cc_names{do_one})(cc); read_count(do_one)=count.(cc_names{do_one})(cc);
read_stride(do_one)=stride.(cc_names{do_one}); read_stride(do_one)=stride.(cc_names{do_one});
for pp=1:length(start.(cc_names{do_two})) for pp=1:length(start.(cc_names{do_two}))
read_start(do_two)=start.(cc_names{do_two})(pp); read_start(do_two)=start.(cc_names{do_two})(pp);
read_count(do_two)=count.(cc_names{do_two})(pp); read_count(do_two)=count.(cc_names{do_two})(pp);
read_stride(do_two)=stride.(cc_names{do_two}); read_stride(do_two)=stride.(cc_names{do_two});
var_dump=netcdf.getVar(nc,varID,read_start,read_count,read_stride,'double'); var_dump=netcdf.getVar(nc,varID,read_start,read_count,read_stride,'double');
eval([varnames{aa},'(pp,cc,:)=var_dump;']) eval([varnames{aa},'(pp,cc,:)=var_dump;'])
end end
...@@ -635,7 +635,7 @@ for aa=1:length(varnames) ...@@ -635,7 +635,7 @@ for aa=1:length(varnames)
eval(['selection.',varnames{aa},'.start=start;']) eval(['selection.',varnames{aa},'.start=start;'])
eval(['selection.',varnames{aa},'.count=count;']) eval(['selection.',varnames{aa},'.count=count;'])
case 0 % there are NO dimensions to restrict and 3 dimensions haven't been coded yet!! case 0 % there are NO dimensions to restrict and 3 dimensions haven't been coded yet!!
for nn=1:length(cc_names) for nn=1:length(cc_names)
read_start(nn)=start.(cc_names{nn}); read_start(nn)=start.(cc_names{nn});
read_count(nn)=count.(cc_names{nn}); read_count(nn)=count.(cc_names{nn});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment