source: issm/oecreview/Archive/24684-25833/ISSM-24808-24809.diff@ 25834

Last change on this file since 25834 was 25834, checked in by Mathieu Morlighem, 4 years ago

CHG: added 24684-25833

File size: 4.4 KB
RevLine 
[25834]1Index: ../trunk-jpl/test/SandBox/test2004.m
2===================================================================
3--- ../trunk-jpl/test/SandBox/test2004.m (revision 24808)
4+++ ../trunk-jpl/test/SandBox/test2004.m (revision 24809)
5@@ -1,9 +1,11 @@
6 %Test Name: Earth_Antarctica_GIA
7+
8+testagainst2002=1;
9
10 %Data paths: {{{
11 modeldatapath='/Users/larour/ModelData';
12 shppath='/Users/larour/issm-jpl/proj-group/qgis/NightlyRun';
13-gshhsshapefile=[modeldatapath '/Gshhg/Shp/GSHHS_shp/c/GSHHS_c_L1.shp'];
14+gshhsshapefile=[modeldatapath '/Gshhg/Shp/GSHHS_shp/c/GSHHS_c_L1-NightlyRun.shp'];
15 %}}}
16
17 %create sealevel model to hold our information:
18@@ -145,22 +147,30 @@
19 end % }}}
20 %Slr: {{{
21 if bas.iscontinentany('antarctica'),
22+ if testagainst2002,
23+ md.slr.deltathickness=zeros(md.mesh.numberofelements,1);
24+ %antarctica
25+ late=sum(md.mesh.lat(md.mesh.elements),2)/3;
26+ longe=sum(md.mesh.long(md.mesh.elements),2)/3;
27+ pos=find(late <-80);
28+ md.slr.deltathickness(pos)=-100;
29+ else
30+ delH=textread([modeldatapath '/AdhikariSciAdvTrends/AIS_delH_trend.txt']);
31+ longAIS=delH(:,1);
32+ latAIS=delH(:,2);
33+ delHAIS=delH(:,3);
34+ index=delaunay(latAIS,longAIS);
35
36- delH=textread([modeldatapath '/AdhikariSciAdvTrends/AIS_delH_trend.txt']);
37- longAIS=delH(:,1);
38- latAIS=delH(:,2);
39- delHAIS=delH(:,3);
40- index=delaunay(latAIS,longAIS);
41+ lat=md.mesh.lat;
42+ long=md.mesh.long+360;
43+ pos=find(long>360);long(pos)=long(pos)-360;
44
45- lat=md.mesh.lat;
46- long=md.mesh.long+360;
47- pos=find(long>360);long(pos)=long(pos)-360;
48+ delHAIS=InterpFromMesh2d(index,longAIS,latAIS,delHAIS,long,lat);
49+ northpole=find_point(md.mesh.long,md.mesh.lat,0,90); delHAIS(northpole)=0;
50
51- delHAIS=InterpFromMesh2d(index,longAIS,latAIS,delHAIS,long,lat);
52- northpole=find_point(md.mesh.long,md.mesh.lat,0,90); delHAIS(northpole)=0;
53+ md.slr.deltathickness=delHAIS(md.mesh.elements)*[1;1;1]/3/100;
54+ end
55
56- md.slr.deltathickness=delHAIS(md.mesh.elements)*[1;1;1]/3/100;
57-
58 md.slr.sealevel=zeros(md.mesh.numberofvertices,1);
59 md.slr.spcthickness=NaN*ones(md.mesh.numberofvertices,1);
60 md.slr.Ngia=zeros(md.mesh.numberofvertices,1);
61@@ -252,8 +262,21 @@
62 %}}}
63 %slr loading/calibration: {{{
64
65+ if testagainst2002,
66+ md.slr.deltathickness=zeros(md.mesh.numberofelements,1);
67+ %greenland
68+ late=sum(md.mesh.lat(md.mesh.elements),2)/3;
69+ longe=sum(md.mesh.long(md.mesh.elements),2)/3;
70+ pos=find(late > 70 & late < 80 & longe>-60 & longe<-30);
71+ md.slr.deltathickness(pos)=-100;
72+
73+ %correct mask:
74+ md.mask.ice_levelset(md.mesh.elements(pos,:))=-1;
75+ else
76+ md.slr.deltathickness=zeros(md.mesh.numberofelements,1);
77+ end
78+
79 md.slr.sealevel=zeros(md.mesh.numberofvertices,1);
80- md.slr.deltathickness=zeros(md.mesh.numberofelements,1);
81 md.slr.spcthickness=NaN*ones(md.mesh.numberofvertices,1);
82 md.slr.Ngia=zeros(md.mesh.numberofvertices,1);
83 md.slr.Ugia=zeros(md.mesh.numberofvertices,1);
84@@ -357,28 +380,27 @@
85 md.slr.abstol=1e-3;
86 md.slr.geodetic=1;
87
88-%eustatic:
89-md.slr.rigid=0; md.slr.elastic=0; md.slr.rotation=0;
90-md.cluster=generic('name',oshostname(),'np',10);
91+% max number of iteration reverted back to 10 (i.e., the original default value)
92+md.slr.maxiter=10;
93+
94+%eustatic run:
95+md.slr.rigid=0; md.slr.elastic=0;md.slr.rotation=0;
96 md=solve(md,'Sealevelrise');
97+Seustatic=md.results.SealevelriseSolution.Sealevel;
98
99-%eustatic + rigid + elastic run:
100-md.slr.rigid=1; md.slr.elastic=1; md.slr.rotation=0;
101-md.cluster=generic('name',oshostname(),'np',16);
102-md.verbose=verbose('111111111');
103+%eustatic + rigid run:
104+md.slr.rigid=1; md.slr.elastic=0;md.slr.rotation=0;
105 md=solve(md,'Sealevelrise');
106-SnoRotation=md.results.SealevelriseSolution.Sealevel;
107+Srigid=md.results.SealevelriseSolution.Sealevel;
108
109-%eustatic + rigid + elastic + rotation run:
110+%eustatic + rigid + elastic run:
111+md.slr.rigid=1; md.slr.elastic=1;md.slr.rotation=0;
112+md=solve(md,'Sealevelrise');
113+Selastic=md.results.SealevelriseSolution.Sealevel;
114+
115+%eustatic + rigid + elastic + rotation run:
116 md.slr.rigid=1; md.slr.elastic=1; md.slr.rotation=1;
117-md.cluster=generic('name',oshostname(),'np',3);
118-%md.verbose=verbose('111111111');
119 md=solve(md,'Sealevelrise');
120-SRotation=md.results.SealevelriseSolution.Sealevel;
121+Srotation=md.results.SealevelriseSolution.Sealevel;
122
123-%Fields and tolerances to track changes
124-field_names ={'noRotation','Rotation'};
125-field_tolerances={1e-13,1e-13};
126-field_values={SnoRotation,SRotation};
127-
128 %}}}
Note: See TracBrowser for help on using the repository browser.