Changeset 1165 for trunk/src/series/civ_series.m
- Timestamp:
- Jul 30, 2024, 6:44:35 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_series.m
r1164 r1165 456 456 par_civ1.NbSlice_j=par_civ1.NbSlice; 457 457 end 458 e nd459 else460 maskname=Param.ActionInput.Civ1.Mask;461 end462 if strcmp(maskoldname,maskname)% mask exist, not already read in civ1463 par_civ1.Mask=mask; %use mask already opened464 else465 if ~isempty(regexp(maskname,'(^http://)|(^https://)', 'once'))|| exist(maskname,'file')466 try467 par_civ1.Mask=imread(maskname);%update the mask, an store it for future use468 catch ME469 if ~isempty(ME.message)470 errormsg=['error reading input image: ' ME.message];471 disp_uvmat('ERROR',errormsg,checkrun)472 return458 else 459 maskname=Param.ActionInput.Civ1.Mask; 460 end 461 if strcmp(maskoldname,maskname)% mask exist, not already read in civ1 462 par_civ1.Mask=mask; %use mask already opened 463 else 464 if ~isempty(regexp(maskname,'(^http://)|(^https://)', 'once'))|| exist(maskname,'file') 465 try 466 par_civ1.Mask=imread(maskname);%update the mask, an store it for future use 467 catch ME 468 if ~isempty(ME.message) 469 errormsg=['error reading input image: ' ME.message]; 470 disp_uvmat('ERROR',errormsg,checkrun) 471 return 472 end 473 473 end 474 end 475 else 476 par_civ1.Mask=[]; 477 end 478 mask=par_civ1.Mask; 479 maskoldname=maskname; 480 end 481 474 else 475 par_civ1.Mask=[]; 476 end 477 mask=par_civ1.Mask; 478 maskoldname=maskname; 479 end 480 end 482 481 483 482 % case of input grid … … 495 494 return 496 495 end 497 498 if exist('ncfile','var') 499 CivFile=ncfile; 500 % [Data,tild,tild,errormsg]=nc2struct(CivFile,'ListGlobalAttribute','absolut_time_T0'); %look for the constant 'absolut_time_T0' to detect old civx data format 501 % if ~isempty(errormsg) 502 % disp_uvmat('ERROR',errormsg,checkrun) 503 % return 504 % end 505 [Data,tild,tild,errormsg]=nc2struct(CivFile);%read civ1 and fix1 data in the existing netcdf file 506 elseif isfield(Param,'Civ1_X') 507 Data.ListGlobalAttribute={}; 508 Data.ListVarName={}; 509 Data.VarDimName={}; 510 Data.Civ1_X=Param.Civ1_X; 511 Data.Civ1_Y=Param.Civ1_Y; 512 Data.Civ1_U=Param.Civ1_U; 513 Data.Civ1_V=Param.Civ1_V; 514 Data.Civ1_FF=Param.Civ1_FF; 515 end 496 % 497 % if exist('ncfile','var') 498 % CivFile=ncfile; 499 % % [Data,tild,tild,errormsg]=nc2struct(CivFile,'ListGlobalAttribute','absolut_time_T0'); %look for the constant 'absolut_time_T0' to detect old civx data format 500 % % if ~isempty(errormsg) 501 % % disp_uvmat('ERROR',errormsg,checkrun) 502 % % return 503 % % end 504 % [Data,tild,tild,errormsg]=nc2struct(CivFile);%read civ1 and fix1 data in the existing netcdf file 505 % if ~isempty(errormsg) 506 % disp(errormsg) 507 % return 508 % end 509 % elseif isfield(Param,'Civ1_X') 510 % Data.ListGlobalAttribute={}; 511 % Data.ListVarName={}; 512 % Data.VarDimName={}; 513 % Data.Civ1_X=Param.Civ1_X; 514 % Data.Civ1_Y=Param.Civ1_Y; 515 % Data.Civ1_U=Param.Civ1_U; 516 % Data.Civ1_V=Param.Civ1_V; 517 % Data.Civ1_FF=Param.Civ1_FF; 518 % end 516 519 end 517 520
Note: See TracChangeset
for help on using the changeset viewer.