source:
issm/oecreview/Archive/23390-24306/ISSM-23798-23799.diff@
24307
Last change on this file since 24307 was 24307, checked in by , 5 years ago | |
---|---|
File size: 9.5 KB |
-
../trunk-jpl/test/NightlyRun/test472.m
1 %Test Name: ISMIP6MeltRateTest 2 md=triangle(model(),'../Exp/Square.exp',90000.); 3 md=setmask(md,'../Exp/SquareShelf.exp',''); 4 md=parameterize(md,'../Par/SquareSheetShelf.par'); 5 md.initialization.vx(:)=1.; 6 md.initialization.vy(:)=1.; 7 md.geometry.thickness(:)=500-md.mesh.x/10000; 8 md.geometry.bed =-100-md.mesh.x/1000; 9 md.geometry.base=-md.geometry.thickness*md.materials.rho_ice/md.materials.rho_water; 10 md.mask.groundedice_levelset=md.geometry.thickness+md.materials.rho_water/md.materials.rho_ice*md.geometry.bed; 11 pos=find(md.mask.groundedice_levelset>=0); 12 md.geometry.base(pos)=md.geometry.bed(pos); 13 md.geometry.surface=md.geometry.base+md.geometry.thickness; 14 md=setflowequation(md,'SSA','all'); 15 16 %Set ISMIP6 melt rate parameters 17 md.basalforcings = basalforcingsismip6(md.basalforcings); 18 md.basalforcings.basin_id = zeros(md.mesh.numberofelements,1); 19 yE = mean(md.mesh.y(md.mesh.elements),2); 20 pos1 = find(yE>=5e5); md.basalforcings.basin_id(pos1)=1; 21 pos2 = find(yE<5e5); md.basalforcings.basin_id(pos2)=2; 22 md.basalforcings.num_basins = 2; 23 md.basalforcings.delta_t = [0.1 0.2]; 24 md.basalforcings.tf_depths = [0 -1000 -2000]; 25 md.basalforcings.gamma_0 = 14477; 26 27 %Build an artificial tf field (for times 0 and 1, 3 depth layers) 28 temp1a = 1.*ones(md.mesh.numberofvertices,1); temp1b = 1.5.*ones(md.mesh.numberofvertices,1); A = [temp1a temp1b ; [0. 1.]]; 29 temp2a = 2.*ones(md.mesh.numberofvertices,1); temp2b = 2.5.*ones(md.mesh.numberofvertices,1); B = [temp2a temp2b ; [0. 1.]]; 30 temp3a = 3.*ones(md.mesh.numberofvertices,1); temp3b = 3.5.*ones(md.mesh.numberofvertices,1); C = [temp3a temp3b ; [0. 1.]]; 31 D = cell(1,1,3); D(:,:,1)={A}; D(:,:,2)={B}; D(:,:,3)={C}; 32 md.basalforcings.tf = D; 33 34 %Boundary conditions: 35 md.mask.ice_levelset=-ones(md.mesh.numberofvertices,1); 36 md.mask.ice_levelset(find(md.mesh.x==max(md.mesh.x)))=0; 37 38 %Model conditions 39 md.transient.isthermal=0; 40 md.transient.isstressbalance=1; 41 md.transient.isgroundingline=1; 42 md.transient.ismasstransport=1; 43 md.transient.issmb=1; 44 md.transient.requested_outputs={'default','BasalforcingsFloatingiceMeltingRate','BasalforcingsIsmp6TfShelf'}; 45 md.groundingline.migration='SubelementMigration'; 46 md.groundingline.friction_interpolation='SubelementFriction1'; 47 md.groundingline.melt_interpolation='SubelementMelt1'; 48 md.timestepping.final_time=1.5; 49 md.timestepping.time_step=0.5; 50 51 md.cluster=generic('name',oshostname(),'np',1); 52 md=solve(md,'Transient'); 53 54 field_names ={'Bed1','Surface1','Thickness1','Floatingice1','Vx1','Vy1','Pressure1','FloatingiceMeltingrate1','ThermalForcing1',... 55 'Bed2','Surface2','Thickness2','Floatingice2','Vx2','Vy2','Pressure2','FloatingiceMeltingrate2','ThermalForcing2',... 56 'Bed3','Surface3','Thickness3','Floatingice3','Vx3','Vy3','Pressure3','FloatingiceMeltingrate3','ThermalForcing3'}; 57 field_tolerances={7e-09,8e-09,8e-09,7e-09,6e-08,7e-08,6e-09,8e-10,7e-08,... 58 7e-09,8e-09,8e-09,7e-09,6e-08,7e-08,6e-09,8e-10,7e-08,... 59 7e-09,8e-09,8e-09,7e-09,6e-08,7e-08,6e-09,8e-10,7e-08}; 60 field_values={... 61 (md.results.TransientSolution(1).Base),... 62 (md.results.TransientSolution(1).Surface),... 63 (md.results.TransientSolution(1).Thickness),... 64 (md.results.TransientSolution(1).MaskGroundediceLevelset),... 65 (md.results.TransientSolution(1).Vx),... 66 (md.results.TransientSolution(1).Vy),... 67 (md.results.TransientSolution(1).Pressure),... 68 (md.results.TransientSolution(1).BasalforcingsFloatingiceMeltingRate),... 69 (md.results.TransientSolution(1).BasalforcingsIsmp6TfShelf),... 70 (md.results.TransientSolution(2).Base),... 71 (md.results.TransientSolution(2).Surface),... 72 (md.results.TransientSolution(2).Thickness),... 73 (md.results.TransientSolution(2).MaskGroundediceLevelset),... 74 (md.results.TransientSolution(2).Vx),... 75 (md.results.TransientSolution(2).Vy),... 76 (md.results.TransientSolution(2).Pressure),... 77 (md.results.TransientSolution(2).BasalforcingsFloatingiceMeltingRate),... 78 (md.results.TransientSolution(2).BasalforcingsIsmp6TfShelf),... 79 (md.results.TransientSolution(3).Base),... 80 (md.results.TransientSolution(3).Surface),... 81 (md.results.TransientSolution(3).Thickness),... 82 (md.results.TransientSolution(3).MaskGroundediceLevelset),... 83 (md.results.TransientSolution(3).Vx),... 84 (md.results.TransientSolution(3).Vy),... 85 (md.results.TransientSolution(3).Pressure),... 86 (md.results.TransientSolution(3).BasalforcingsFloatingiceMeltingRate),... 87 (md.results.TransientSolution(3).BasalforcingsIsmp6TfShelf),... 88 }; -
../trunk-jpl/test/Archives/Archive472.arch
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
-
../trunk-jpl/src/m/classes/basalforcingsismip6.m
Property changes on: ../trunk-jpl/test/Archives/Archive472.arch ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property
82 82 WriteData(fid,prefix,'name','md.basalforcings.model','data',7,'format','Integer'); 83 83 WriteData(fid,prefix,'object',self,'fieldname','num_basins','format','Integer'); 84 84 WriteData(fid,prefix,'object',self,'fieldname','basin_id','data',self.basin_id-1,'name','md.basalforcings.basin_id','format','IntMat','mattype',2); %0-indexed 85 WriteData(fid,prefix,'object',self,'fieldname','gamma_0','format','Double' );85 WriteData(fid,prefix,'object',self,'fieldname','gamma_0','format','Double','scale',1./yts); 86 86 WriteData(fid,prefix,'object',self,'fieldname','tf_depths','format','DoubleMat','name','md.basalforcings.tf_depths'); 87 87 WriteData(fid,prefix,'object',self,'fieldname','tf','format','MatArray','name','md.basalforcings.tf','timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 88 88 WriteData(fid,prefix,'object',self,'fieldname','delta_t','format','DoubleMat','name','md.basalforcings.delta_t','timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); -
../trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp
227 227 case BasalforcingsIsmip6Enum: 228 228 parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.num_basins",BasalforcingsIsmp6NumBasinsEnum)); 229 229 parameters->AddObject(iomodel->CopyConstantObject("md.basalforcings.gamma_0",BasalforcingsIsmp6Gamma0Enum)); 230 iomodel->FindConstant(&temp_n,"md.basalforcings.num_basins"); 231 iomodel->FetchData(&transparam,NULL,&M,"md.basalforcings.delta_t"); 232 parameters->AddObject(new DoubleVecParam(BasalforcingsIsmp6DeltaTEnum,transparam,temp_n)); 230 iomodel->FetchData(&transparam,&M,&N,"md.basalforcings.delta_t"); 231 parameters->AddObject(new DoubleVecParam(BasalforcingsIsmp6DeltaTEnum,transparam,N)); 233 232 xDelete<IssmDouble>(transparam); 234 iomodel->FetchData(&transparam, NULL,NULL,"md.basalforcings.tf_depths");235 parameters->AddObject(new DoubleVecParam(BasalforcingsIsmp6TfDepthsEnum,transparam, 3));233 iomodel->FetchData(&transparam,&M,&N,"md.basalforcings.tf_depths"); 234 parameters->AddObject(new DoubleVecParam(BasalforcingsIsmp6TfDepthsEnum,transparam,N)); 236 235 xDelete<IssmDouble>(transparam); 237 236 break; 238 237 default: -
../trunk-jpl/src/c/modules/FloatingiceMeltingRatex/FloatingiceMeltingRatex.cpp
87 87 IssmDouble* areas_summed = xNewZeroInit<IssmDouble>(num_basins); 88 88 IssmDouble* areas_summed_cpu = xNewZeroInit<IssmDouble>(num_basins); 89 89 90 /* TEST: Set tf=2 for all ice shelf elements*/90 /*Get TF at each ice shelf point - linearly intepolate in depth and time*/ 91 91 for(int i=0;i<femmodel->elements->Size();i++){ 92 92 Element* element = xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i)); 93 93 int numvertices = element->GetNumberOfVertices(); … … 129 129 tf_input->GetInputValue(&tf_test[iv],gauss,num_depths-1); 130 130 } 131 131 else { 132 /*get values between two times [offset:offset+1 [, Interpolate linearly*/132 /*get values between two times [offset:offset+1], Interpolate linearly*/ 133 133 _assert_(depth>=tf_depths[offset] && depth<tf_depths[offset+1]); 134 134 IssmDouble deltaz=tf_depths[offset+1]-tf_depths[offset]; 135 135 IssmDouble alpha2=(depth-tf_depths[offset])/deltaz; … … 144 144 element->AddInput(BasalforcingsIsmp6TfShelfEnum,tf_test,P1Enum); 145 145 xDelete<IssmDouble>(tf_test); 146 146 xDelete<IssmDouble>(depth_vertices); 147 delete gauss; 147 148 } 148 149 149 150 /*Compute sums of tf*area and shelf-area per cpu*/
Note:
See TracBrowser
for help on using the repository browser.