[21337] | 1 | Index: ../trunk-jpl/src/m/solve/solve.js
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/m/solve/solve.js (revision 21096)
|
---|
| 4 | +++ ../trunk-jpl/src/m/solve/solve.js (revision 21097)
|
---|
| 5 | @@ -80,17 +80,7 @@
|
---|
| 6 | if (md.verbose.solution){
|
---|
| 7 | console.log('checking model consistency');
|
---|
| 8 | }
|
---|
| 9 | - if (solutionstring === 'FlaimSolution'){
|
---|
| 10 | - md.priv.isconsistent=true;
|
---|
| 11 | - md.mesh.checkconsistency(md,solutionstring);
|
---|
| 12 | - md.flaim.checkconsistency(md,solutionstring);
|
---|
| 13 | - if (md.priv.isconsistent==false){
|
---|
| 14 | - throw error('solve error message: model not consistent, see messages above');
|
---|
| 15 | - }
|
---|
| 16 | - }
|
---|
| 17 | - else{
|
---|
| 18 | - ismodelselfconsistent(md);
|
---|
| 19 | - }
|
---|
| 20 | + ismodelselfconsistent(md);
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | //If we are restarting, actually use the provided runtime name:
|
---|
| 24 | Index: ../trunk-jpl/src/m/solve/marshall.js
|
---|
| 25 | ===================================================================
|
---|
| 26 | --- ../trunk-jpl/src/m/solve/marshall.js (revision 21096)
|
---|
| 27 | +++ ../trunk-jpl/src/m/solve/marshall.js (revision 21097)
|
---|
| 28 | @@ -18,7 +18,7 @@
|
---|
| 29 | for (field in md){
|
---|
| 30 |
|
---|
| 31 | //Some properties do not need to be marshalled
|
---|
| 32 | - if (field == 'results' | field =='radaroverlay' | field == 'toolkits' | field =='cluster' | field == 'flaim' | field == 'priv') continue;
|
---|
| 33 | + if (field == 'results' | field =='radaroverlay' | field == 'toolkits' | field =='cluster' | field == 'priv') continue;
|
---|
| 34 |
|
---|
| 35 | //Check that current field is a class
|
---|
| 36 | if(typeof md[field] == 'function'){
|
---|
| 37 | Index: ../trunk-jpl/src/m/solve/solve.py
|
---|
| 38 | ===================================================================
|
---|
| 39 | --- ../trunk-jpl/src/m/solve/solve.py (revision 21096)
|
---|
| 40 | +++ ../trunk-jpl/src/m/solve/solve.py (revision 21097)
|
---|
| 41 | @@ -83,14 +83,7 @@
|
---|
| 42 | #check model consistency
|
---|
| 43 | if m.strcmpi(options.getfieldvalue('checkconsistency','yes'),'yes'):
|
---|
| 44 | print "checking model consistency"
|
---|
| 45 | - if solutionstring.lower() == 'flaimsolution':
|
---|
| 46 | - md.private.isconsistent=True
|
---|
| 47 | - md.mesh.checkconsistency(md,solutionstring)
|
---|
| 48 | - md.flaim.checkconsistency(md,solutionstring)
|
---|
| 49 | - if not md.private.isconsistent:
|
---|
| 50 | - raise RuntimeError("Model not consistent, see messages above.")
|
---|
| 51 | - else:
|
---|
| 52 | - ismodelselfconsistent(md)
|
---|
| 53 | + ismodelselfconsistent(md)
|
---|
| 54 |
|
---|
| 55 | #First, build a runtime name that is unique
|
---|
| 56 | restart=options.getfieldvalue('restart','')
|
---|
| 57 | @@ -111,13 +104,6 @@
|
---|
| 58 | if md.qmu.isdakota:
|
---|
| 59 | md=preqmu(md,options)
|
---|
| 60 |
|
---|
| 61 | - #flaim analysis
|
---|
| 62 | - if solutionstring.lower() == 'flaimSolution':
|
---|
| 63 | - solutionstring='FlaimSolution'
|
---|
| 64 | - md=flaim_sol(md,options)
|
---|
| 65 | - md.private.solution=solutionstring
|
---|
| 66 | - return md
|
---|
| 67 | -
|
---|
| 68 | #Do we load results only?
|
---|
| 69 | if options.getfieldvalue('loadonly',False):
|
---|
| 70 | md=loadresultsfromcluster(md)
|
---|
| 71 | Index: ../trunk-jpl/src/m/solve/solve.m
|
---|
| 72 | ===================================================================
|
---|
| 73 | --- ../trunk-jpl/src/m/solve/solve.m (revision 21096)
|
---|
| 74 | +++ ../trunk-jpl/src/m/solve/solve.m (revision 21097)
|
---|
| 75 | @@ -77,16 +77,7 @@
|
---|
| 76 | if md.verbose.solution,
|
---|
| 77 | disp('checking model consistency');
|
---|
| 78 | end
|
---|
| 79 | - if (strcmp(solutionstring,'FlaimSolution'))
|
---|
| 80 | - md.private.isconsistent=true;
|
---|
| 81 | - md=checkconsistency(md.mesh,md,solutionstring);
|
---|
| 82 | - md=checkconsistency(md.flaim,md,solutionstring);
|
---|
| 83 | - if md.private.isconsistent==false,
|
---|
| 84 | - error('Model not consistent, see messages above');
|
---|
| 85 | - end
|
---|
| 86 | - else
|
---|
| 87 | - ismodelselfconsistent(md),
|
---|
| 88 | - end
|
---|
| 89 | + ismodelselfconsistent(md),
|
---|
| 90 | end
|
---|
| 91 |
|
---|
| 92 | %If we are restarting, actually use the provided runtime name:
|
---|
| 93 | @@ -111,18 +102,6 @@
|
---|
| 94 | md=preqmu(md,options);
|
---|
| 95 | end
|
---|
| 96 |
|
---|
| 97 | -%flaim analysis (To be removed?)
|
---|
| 98 | -if (strcmp(solutionstring,'FlaimSolution'))
|
---|
| 99 | - %fmdir = getfieldvalue(options,'fmdir',['fm' num2str(feature('GetPid'))]);
|
---|
| 100 | - %overwrite = getfieldvalue(options,'overwrite','n');
|
---|
| 101 | - %keep = getfieldvalue(options,'keep','y');
|
---|
| 102 | - %latsgn = getfieldvalue(options,'latsgn',0);
|
---|
| 103 | - %cmap = getfieldvalue(options,'cmap',[]);
|
---|
| 104 | - md=flaim_sol(md,options);
|
---|
| 105 | - md.private.solution=solutionstring;
|
---|
| 106 | - return;
|
---|
| 107 | -end
|
---|
| 108 | -
|
---|
| 109 | %Do we load results only?
|
---|
| 110 | if getfieldvalue(options,'loadonly',false),
|
---|
| 111 | md=loadresultsfromcluster(md);
|
---|
| 112 | Index: ../trunk-jpl/src/m/solve/marshall.py
|
---|
| 113 | ===================================================================
|
---|
| 114 | --- ../trunk-jpl/src/m/solve/marshall.py (revision 21096)
|
---|
| 115 | +++ ../trunk-jpl/src/m/solve/marshall.py (revision 21097)
|
---|
| 116 | @@ -26,7 +26,7 @@
|
---|
| 117 | for field in md.properties():
|
---|
| 118 |
|
---|
| 119 | #Some properties do not need to be marshalled
|
---|
| 120 | - if field in ['results','radaroverlay','toolkits','cluster','flaim','private']:
|
---|
| 121 | + if field in ['results','radaroverlay','toolkits','cluster','private']:
|
---|
| 122 | continue
|
---|
| 123 |
|
---|
| 124 | #Check that current field is an object
|
---|
| 125 | Index: ../trunk-jpl/src/m/solve/marshall.m
|
---|
| 126 | ===================================================================
|
---|
| 127 | --- ../trunk-jpl/src/m/solve/marshall.m (revision 21096)
|
---|
| 128 | +++ ../trunk-jpl/src/m/solve/marshall.m (revision 21097)
|
---|
| 129 | @@ -23,7 +23,7 @@
|
---|
| 130 | field=fields{i};
|
---|
| 131 |
|
---|
| 132 | %Some properties do not need to be marshalled
|
---|
| 133 | - if ismember(field,{'results' 'radaroverlay' 'toolkits' 'cluster' 'flaim' 'private'}),
|
---|
| 134 | + if ismember(field,{'results' 'radaroverlay' 'toolkits' 'cluster' 'private'}),
|
---|
| 135 | continue;
|
---|
| 136 | end
|
---|
| 137 |
|
---|
| 138 | Index: ../trunk-jpl/src/m/consistency/ismodelselfconsistent.py
|
---|
| 139 | ===================================================================
|
---|
| 140 | --- ../trunk-jpl/src/m/consistency/ismodelselfconsistent.py (revision 21096)
|
---|
| 141 | +++ ../trunk-jpl/src/m/consistency/ismodelselfconsistent.py (revision 21097)
|
---|
| 142 | @@ -36,9 +36,6 @@
|
---|
| 143 | elif solutiontype == 'TransientSolution':
|
---|
| 144 | analyses=['StressbalanceAnalysis','StressbalanceVerticalAnalysis','StressbalanceSIAAnalysis','L2ProjectionBaseAnalysis','ThermalAnalysis','MeltingAnalysis','EnthalpyAnalysis','MasstransportAnalysis']
|
---|
| 145 |
|
---|
| 146 | - elif solutiontype == 'FlaimSolution':
|
---|
| 147 | - analyses=['FlaimAnalysis']
|
---|
| 148 | -
|
---|
| 149 | elif solutiontype == 'HydrologySolution':
|
---|
| 150 | analyses=['L2ProjectionBaseAnalysis','HydrologyShreveAnalysis','HydrologyDCInefficientAnalysis','HydrologyDCEfficientAnalysis']
|
---|
| 151 |
|
---|
| 152 | Index: ../trunk-jpl/src/m/consistency/ismodelselfconsistent.js
|
---|
| 153 | ===================================================================
|
---|
| 154 | --- ../trunk-jpl/src/m/consistency/ismodelselfconsistent.js (revision 21096)
|
---|
| 155 | +++ ../trunk-jpl/src/m/consistency/ismodelselfconsistent.js (revision 21097)
|
---|
| 156 | @@ -92,10 +92,6 @@
|
---|
| 157 | analyses=['StressbalanceAnalysis','StressbalanceVerticalAnalysis','StressbalanceSIAAnalysis','L2ProjectionBaseAnalysis','ThermalAnalysis','MeltingAnalysis','EnthalpyAnalysis','MasstransportAnalysis','HydrologySommersAnalysis'];
|
---|
| 158 | break;
|
---|
| 159 |
|
---|
| 160 | - }else if(solutiontype ==='FlaimSolution'){
|
---|
| 161 | - analyses=['FlaimAnalysis'];
|
---|
| 162 | - break;
|
---|
| 163 | -
|
---|
| 164 | }else if(solutiontype ==='SealevelriseSolution'){
|
---|
| 165 | analyses=['SealevelriseAnalysis'];
|
---|
| 166 | break;
|
---|
| 167 | Index: ../trunk-jpl/src/m/consistency/ismodelselfconsistent.m
|
---|
| 168 | ===================================================================
|
---|
| 169 | --- ../trunk-jpl/src/m/consistency/ismodelselfconsistent.m (revision 21096)
|
---|
| 170 | +++ ../trunk-jpl/src/m/consistency/ismodelselfconsistent.m (revision 21097)
|
---|
| 171 | @@ -67,8 +67,6 @@
|
---|
| 172 | analyses={'GiaAnalysis'};
|
---|
| 173 | elseif strcmp(solutiontype,'TransientSolution')
|
---|
| 174 | analyses={'StressbalanceAnalysis','StressbalanceVerticalAnalysis','StressbalanceSIAAnalysis','L2ProjectionBaseAnalysis','ThermalAnalysis','MeltingAnalysis','EnthalpyAnalysis','MasstransportAnalysis','HydrologySommersAnalysis'};
|
---|
| 175 | - elseif strcmp(solutiontype,'FlaimSolution')
|
---|
| 176 | - analyses={'FlaimAnalysis'};
|
---|
| 177 | elseif strcmp(solutiontype,'SealevelriseSolution')
|
---|
| 178 | analyses={'SealevelriseAnalysis'};
|
---|
| 179 | elseif strcmp(solutiontype,'HydrologySolution')
|
---|
| 180 | Index: ../trunk-jpl/src/m/classes/flaim.py
|
---|
| 181 | ===================================================================
|
---|
| 182 | --- ../trunk-jpl/src/m/classes/flaim.py (revision 21096)
|
---|
| 183 | +++ ../trunk-jpl/src/m/classes/flaim.py (revision 21097)
|
---|
| 184 | @@ -1,71 +0,0 @@
|
---|
| 185 | -import numpy
|
---|
| 186 | -from collections import OrderedDict
|
---|
| 187 | -from fielddisplay import fielddisplay
|
---|
| 188 | -from checkfield import checkfield
|
---|
| 189 | -from WriteData import WriteData
|
---|
| 190 | -
|
---|
| 191 | -class flaim(object):
|
---|
| 192 | - """
|
---|
| 193 | - FLAIM class definition
|
---|
| 194 | -
|
---|
| 195 | - Usage:
|
---|
| 196 | - flaim=flaim();
|
---|
| 197 | - """
|
---|
| 198 | -
|
---|
| 199 | - def __init__(self): # {{{
|
---|
| 200 | - self.targets = ''
|
---|
| 201 | - self.tracks = ''
|
---|
| 202 | - self.flightreqs = OrderedDict()
|
---|
| 203 | - self.criterion = float('NaN')
|
---|
| 204 | - self.gridsatequator = 200000
|
---|
| 205 | - self.usevalueordering = True
|
---|
| 206 | - self.split_antimeridian = True
|
---|
| 207 | - self.solution = ''
|
---|
| 208 | - self.quality = 0
|
---|
| 209 | - self.path_optimize = False
|
---|
| 210 | - self.opt_ndir = 1
|
---|
| 211 | - self.opt_dist = 25
|
---|
| 212 | - self.opt_niter = 30000
|
---|
| 213 | - #}}}
|
---|
| 214 | - def __repr__(self): # {{{
|
---|
| 215 | - string=' FLAIM - Flight Line Adaptation using Ice sheet Modeling:'
|
---|
| 216 | -
|
---|
| 217 | - string="%s\n\n%s"%(string,' Input:')
|
---|
| 218 | - string="%s\n%s"%(string,fielddisplay(self,'targets' ,'name of kml output targets file '))
|
---|
| 219 | - string="%s\n%s"%(string,fielddisplay(self,'tracks' ,'name of kml input tracks file '))
|
---|
| 220 | - string="%s\n%s"%(string,fielddisplay(self,'flightreqs' ,'structure of kml flight requirements (not used yet)'))
|
---|
| 221 | - string="%s\n%s"%(string,fielddisplay(self,'criterion' ,'element or nodal criterion for flight path evaluation (metric)'))
|
---|
| 222 | -
|
---|
| 223 | - string="%s\n\n%s"%(string,' Arguments:')
|
---|
| 224 | - string="%s\n%s"%(string,fielddisplay(self,'gridsatequator' ,'number of grids at equator (determines resolution)'))
|
---|
| 225 | - string="%s\n%s"%(string,fielddisplay(self,'usevalueordering' ,'flag to consider target values for flight path evaluation'))
|
---|
| 226 | - string="%s\n%s"%(string,fielddisplay(self,'split_antimeridian' ,'flag to split polygons on the antimeridian'))
|
---|
| 227 | -
|
---|
| 228 | - string="%s\n\n%s"%(string,' Optimization:')
|
---|
| 229 | - string="%s\n%s"%(string,fielddisplay(self,'path_optimize' ,'optimize? (default false)'))
|
---|
| 230 | - string="%s\n%s"%(string,fielddisplay(self,'opt_ndir' ,['number of directions to test when moving a point. If this value = 1, a random direction is tested.',\
|
---|
| 231 | - 'A value > 1 results in directions equally spaced from [0, 2*PI] being tested.',\
|
---|
| 232 | - 'For example, 4 would result in directions [0, PI/2, PI, 3PI/2].']))
|
---|
| 233 | - string="%s\n%s"%(string,fielddisplay(self,'opt_dist' ,'specifies the distance in km (default 25) to move a randomly selected path point on each iteration'))
|
---|
| 234 | - string="%s\n%s"%(string,fielddisplay(self,'opt_niter' ,['number of iterations (default 30,000) to run for flightplan optimization',\
|
---|
| 235 | - 'i.e. the number of times to randomly select a point and move it.']))
|
---|
| 236 | -
|
---|
| 237 | - string="%s\n\n%s"%(string,' Output:')
|
---|
| 238 | - string="%s\n%s"%(string,fielddisplay(self,'solution' ,'name of kml solution file'))
|
---|
| 239 | - string="%s\n%s"%(string,fielddisplay(self,'quality' ,'quality of kml solution'))
|
---|
| 240 | - return string
|
---|
| 241 | - #}}}
|
---|
| 242 | - def checkconsistency(self,md,solution,analyses): # {{{
|
---|
| 243 | -
|
---|
| 244 | - #Early return
|
---|
| 245 | - if not solution=='FlaimSolution':
|
---|
| 246 | - return md
|
---|
| 247 | -
|
---|
| 248 | - md = checkfield(md,'fieldname','flaim.tracks','file',1)
|
---|
| 249 | - if numpy.any(numpy.isnan(md.flaim.criterion)) or not md.flaim.criterion:
|
---|
| 250 | - md = checkfield(md,'fieldname','flaim.targets','file',1)
|
---|
| 251 | - else:
|
---|
| 252 | - md = checkfield(md,'fieldname','flaim.criterion','numel',[md.mesh.numberofvertices,md.mesh.numberofelements])
|
---|
| 253 | -
|
---|
| 254 | - return md
|
---|
| 255 | - # }}}
|
---|
| 256 | Index: ../trunk-jpl/src/m/classes/flaim.m
|
---|
| 257 | ===================================================================
|
---|
| 258 | --- ../trunk-jpl/src/m/classes/flaim.m (revision 21096)
|
---|
| 259 | +++ ../trunk-jpl/src/m/classes/flaim.m (revision 21097)
|
---|
| 260 | @@ -1,84 +0,0 @@
|
---|
| 261 | -%FLAIM class definition
|
---|
| 262 | -%
|
---|
| 263 | -% Usage:
|
---|
| 264 | -% flaim=flaim();
|
---|
| 265 | -
|
---|
| 266 | -classdef flaim
|
---|
| 267 | - properties (SetAccess=public)
|
---|
| 268 | - targets = ''
|
---|
| 269 | - tracks = ''
|
---|
| 270 | - flightreqs = struct()
|
---|
| 271 | - criterion = NaN
|
---|
| 272 | - gridsatequator = 200000
|
---|
| 273 | - usevalueordering = true
|
---|
| 274 | - split_antimeridian = true
|
---|
| 275 | - solution = ''
|
---|
| 276 | - quality = 0
|
---|
| 277 | - path_optimize = false
|
---|
| 278 | - opt_ndir = 1
|
---|
| 279 | - opt_dist = 25
|
---|
| 280 | - opt_niter = 30000
|
---|
| 281 | - end
|
---|
| 282 | - methods
|
---|
| 283 | - function self = flaim(varargin) % {{{
|
---|
| 284 | - switch nargin
|
---|
| 285 | - case 0
|
---|
| 286 | - self=setdefaultparameters(self);
|
---|
| 287 | - otherwise
|
---|
| 288 | - error('constructor not supported');
|
---|
| 289 | - end
|
---|
| 290 | - end % }}}
|
---|
| 291 | - function self = setdefaultparameters(self) % {{{
|
---|
| 292 | -
|
---|
| 293 | - end % }}}
|
---|
| 294 | - function md = checkconsistency(self,md,solution,analyses) % {{{
|
---|
| 295 | -
|
---|
| 296 | - %Early return
|
---|
| 297 | - if ~strcmp(solution,'FlaimSolution'), return; end
|
---|
| 298 | -
|
---|
| 299 | - md = checkfield(md,'fieldname','flaim.tracks','file',1);
|
---|
| 300 | - if any(isnan(md.flaim.criterion)) || isempty(md.flaim.criterion)
|
---|
| 301 | - md = checkfield(md,'fieldname','flaim.targets','file',1);
|
---|
| 302 | - else
|
---|
| 303 | - md = checkfield(md,'fieldname','flaim.criterion','numel',[md.mesh.numberofvertices md.mesh.numberofelements]);
|
---|
| 304 | - end
|
---|
| 305 | -
|
---|
| 306 | - end % }}}
|
---|
| 307 | - function disp(self) % {{{
|
---|
| 308 | -
|
---|
| 309 | - disp(sprintf(' FLAIM - Flight Line Adaptation using Ice sheet Modeling:'));
|
---|
| 310 | -
|
---|
| 311 | - disp(sprintf('\n Input:'));
|
---|
| 312 | - fielddisplay(self,'targets' ,'name of kml output targets file ');
|
---|
| 313 | - fielddisplay(self,'tracks' ,'name of kml input tracks file ');
|
---|
| 314 | - fielddisplay(self,'flightreqs' ,'structure of kml flight requirements (not used yet)');
|
---|
| 315 | - fielddisplay(self,'criterion' ,'element or nodal criterion for flight path evaluation (metric)');
|
---|
| 316 | -
|
---|
| 317 | - disp(sprintf('\n Arguments:'));
|
---|
| 318 | - fielddisplay(self,'gridsatequator' ,'number of grids at equator (determines resolution)');
|
---|
| 319 | - fielddisplay(self,'usevalueordering' ,'flag to consider target values for flight path evaluation');
|
---|
| 320 | - fielddisplay(self,'split_antimeridian' ,'flag to split polygons on the antimeridian');
|
---|
| 321 | -
|
---|
| 322 | - disp(sprintf('\n Optimization:'));
|
---|
| 323 | - fielddisplay(self,'path_optimize' ,'optimize? (default false)');
|
---|
| 324 | - fielddisplay(self,'opt_ndir' ,{'number of directions to test when moving a point. If this value = 1, a random direction is tested.',...
|
---|
| 325 | - 'A value > 1 results in directions equally spaced from [0, 2*PI] being tested.',...
|
---|
| 326 | - 'For example, 4 would result in directions [0, PI/2, PI, 3PI/2].'});
|
---|
| 327 | - fielddisplay(self,'opt_dist' ,'specifies the distance in km (default 25) to move a randomly selected path point on each iteration');
|
---|
| 328 | - fielddisplay(self,'opt_niter' ,{'number of iterations (default 30,000) to run for flightplan optimization',...
|
---|
| 329 | - 'i.e. the number of times to randomly select a point and move it.'});
|
---|
| 330 | -
|
---|
| 331 | - disp(sprintf('\n Output:'));
|
---|
| 332 | - fielddisplay(self,'solution' ,'name of kml solution file');
|
---|
| 333 | - fielddisplay(self,'quality' ,'quality of kml solution');
|
---|
| 334 | - end % }}}
|
---|
| 335 | - function savemodeljs(self,fid,modelname) % {{{
|
---|
| 336 | -
|
---|
| 337 | - %do nothing for now!
|
---|
| 338 | - if ~isempty(self.targets),
|
---|
| 339 | - error('flaim savemodeljs error message: not supported yet!');
|
---|
| 340 | - end
|
---|
| 341 | -
|
---|
| 342 | - end % }}}
|
---|
| 343 | - end
|
---|
| 344 | -end
|
---|
| 345 | Index: ../trunk-jpl/src/m/classes/flaim.js
|
---|
| 346 | ===================================================================
|
---|
| 347 | --- ../trunk-jpl/src/m/classes/flaim.js (revision 21096)
|
---|
| 348 | +++ ../trunk-jpl/src/m/classes/flaim.js (revision 21097)
|
---|
| 349 | @@ -1,68 +0,0 @@
|
---|
| 350 | -//FLAIM class definition
|
---|
| 351 | -//
|
---|
| 352 | -// Usage:
|
---|
| 353 | -// flaim=new flaim();
|
---|
| 354 | -
|
---|
| 355 | -function flaim (){
|
---|
| 356 | - //methods
|
---|
| 357 | - this.setdefaultparameters = function(){// {{{
|
---|
| 358 | - }// }}}
|
---|
| 359 | - this.disp= function(){// {{{
|
---|
| 360 | -
|
---|
| 361 | - console.log(sprintf(' FLAIM - Flight Line Adaptation using Ice sheet Modeling:'));
|
---|
| 362 | -
|
---|
| 363 | - console.log(sprintf('\n Input:'));
|
---|
| 364 | - fielddisplay(this,'targets' ,'name of kml output targets file ');
|
---|
| 365 | - fielddisplay(this,'tracks' ,'name of kml input tracks file ');
|
---|
| 366 | - fielddisplay(this,'flightreqs' ,'structure of kml flight requirements (not used yet)');
|
---|
| 367 | - fielddisplay(this,'criterion' ,'element or nodal criterion for flight path evaluation (metric)');
|
---|
| 368 | -
|
---|
| 369 | - console.log(sprintf('\n Arguments:'));
|
---|
| 370 | - fielddisplay(this,'gridsatequator' ,'number of grids at equator (determines resolution)');
|
---|
| 371 | - fielddisplay(this,'usevalueordering' ,'flag to consider target values for flight path evaluation');
|
---|
| 372 | - fielddisplay(this,'split_antimeridian' ,'flag to split polygons on the antimeridian');
|
---|
| 373 | -
|
---|
| 374 | - console.log(sprintf('\n Optimization:'));
|
---|
| 375 | - fielddisplay(this,'path_optimize' ,'optimize? (default false)');
|
---|
| 376 | - fielddisplay(this,'opt_ndir' ,['number of directions to test when moving a point. If this value = 1, a random direction is tested.', 'A value > 1 results in directions equally spaced from [0, 2*PI] being tested.', 'For example, 4 would result in directions [0, PI/2, PI, 3PI/2].']);
|
---|
| 377 | - fielddisplay(this,'opt_dist' ,'specifies the distance in km (default 25) to move a randomly selected path point on each iteration');
|
---|
| 378 | - fielddisplay(this,'opt_niter' ,['number of iterations (default 30,000) to run for flightplan optimization', 'i.e. the number of times to randomly select a point and move it.']);
|
---|
| 379 | -
|
---|
| 380 | - console.log(sprintf('\n Output:'));
|
---|
| 381 | - fielddisplay(this,'solution' ,'name of kml solution file');
|
---|
| 382 | - fielddisplay(this,'quality' ,'quality of kml solution');
|
---|
| 383 | -
|
---|
| 384 | - }// }}}
|
---|
| 385 | - this.checkconsistency = function(md,solution,analyses) { // {{{
|
---|
| 386 | -
|
---|
| 387 | - //Early return
|
---|
| 388 | - if (solution!='FlaimSolution') return;
|
---|
| 389 | -
|
---|
| 390 | - checkfield(md,'fieldname','flaim.tracks','file',1);
|
---|
| 391 | - if (isNaN(md.flaim.criterion) | md.flaim.criterion.length==0){
|
---|
| 392 | - checkfield(md,'fieldname','flaim.targets','file',1);
|
---|
| 393 | - }
|
---|
| 394 | - else{
|
---|
| 395 | - checkfield(md,'fieldname','flaim.criterion','numel',[md.mesh.numberofvertices, md.mesh.numberofelements]);
|
---|
| 396 | - }
|
---|
| 397 | - } //}}}
|
---|
| 398 | - //properties
|
---|
| 399 | - // {{{
|
---|
| 400 | -
|
---|
| 401 | - this.targets = '';
|
---|
| 402 | - this.tracks = '';
|
---|
| 403 | - this.flightreqs = {};
|
---|
| 404 | - this.criterion = NaN;
|
---|
| 405 | - this.gridsatequator = 200000;
|
---|
| 406 | - this.usevalueordering = true;
|
---|
| 407 | - this.split_antimeridian = true;
|
---|
| 408 | - this.solution = '';
|
---|
| 409 | - this.quality = 0;
|
---|
| 410 | - this.path_optimize = false;
|
---|
| 411 | - this.opt_ndir = 1;
|
---|
| 412 | - this.opt_dist = 25;
|
---|
| 413 | - this.opt_niter = 30000;
|
---|
| 414 | -
|
---|
| 415 | - this.setdefaultparameters();
|
---|
| 416 | - //}}}
|
---|
| 417 | -}
|
---|
| 418 | Index: ../trunk-jpl/src/m/classes/model.m
|
---|
| 419 | ===================================================================
|
---|
| 420 | --- ../trunk-jpl/src/m/classes/model.m (revision 21096)
|
---|
| 421 | +++ ../trunk-jpl/src/m/classes/model.m (revision 21097)
|
---|
| 422 | @@ -42,7 +42,6 @@
|
---|
| 423 | gia = 0;
|
---|
| 424 |
|
---|
| 425 | autodiff = 0;
|
---|
| 426 | - flaim = 0;
|
---|
| 427 | inversion = 0;
|
---|
| 428 | qmu = 0;
|
---|
| 429 |
|
---|
| 430 | @@ -922,7 +921,6 @@
|
---|
| 431 | if isfield(structmd,'y'), md.mesh.y=structmd.y; end
|
---|
| 432 | if isfield(structmd,'x'), md.mesh.x=structmd.x; end
|
---|
| 433 | if isfield(structmd,'z'), md.mesh.z=structmd.z; end
|
---|
| 434 | - if isfield(structmd,'mask'), md.flaim.criterion=structmd.mask; end
|
---|
| 435 | if isfield(structmd,'diagnostic_ref'), md.stressbalance.referential=structmd.diagnostic_ref; end
|
---|
| 436 | if isfield(structmd,'npart'); md.qmu.numberofpartitions=structmd.npart; end
|
---|
| 437 | if isfield(structmd,'part'); md.qmu.partition=structmd.part; end
|
---|
| 438 | @@ -1092,7 +1090,6 @@
|
---|
| 439 | md.calving = calving();
|
---|
| 440 | md.gia = gia();
|
---|
| 441 | md.autodiff = autodiff();
|
---|
| 442 | - md.flaim = flaim();
|
---|
| 443 | md.inversion = inversion();
|
---|
| 444 | md.qmu = qmu();
|
---|
| 445 | md.radaroverlay = radaroverlay();
|
---|
| 446 | @@ -1264,7 +1261,6 @@
|
---|
| 447 | disp(sprintf('%19s: %-22s -- %s','calving' ,['[1x1 ' class(self.calving) ']'],'parameters for calving'));
|
---|
| 448 | disp(sprintf('%19s: %-22s -- %s','gia' ,['[1x1 ' class(self.gia) ']'],'parameters for gia solution'));
|
---|
| 449 | disp(sprintf('%19s: %-22s -- %s','autodiff' ,['[1x1 ' class(self.autodiff) ']'],'automatic differentiation parameters'));
|
---|
| 450 | - disp(sprintf('%19s: %-22s -- %s','flaim' ,['[1x1 ' class(self.flaim) ']'],'flaim parameters'));
|
---|
| 451 | disp(sprintf('%19s: %-22s -- %s','inversion' ,['[1x1 ' class(self.inversion) ']'],'parameters for inverse methods'));
|
---|
| 452 | disp(sprintf('%19s: %-22s -- %s','qmu' ,['[1x1 ' class(self.qmu) ']'],'dakota properties'));
|
---|
| 453 | disp(sprintf('%19s: %-22s -- %s','outputdefinition',['[1x1 ' class(self.outputdefinition) ']'],'output definition'));
|
---|
| 454 | Index: ../trunk-jpl/src/m/classes/model.py
|
---|
| 455 | ===================================================================
|
---|
| 456 | --- ../trunk-jpl/src/m/classes/model.py (revision 21096)
|
---|
| 457 | +++ ../trunk-jpl/src/m/classes/model.py (revision 21097)
|
---|
| 458 | @@ -46,7 +46,6 @@
|
---|
| 459 | from transient import transient
|
---|
| 460 | from gia import gia
|
---|
| 461 | from autodiff import autodiff
|
---|
| 462 | -from flaim import flaim
|
---|
| 463 | from inversion import inversion
|
---|
| 464 | from outputdefinition import outputdefinition
|
---|
| 465 | from qmu import qmu
|
---|
| 466 | @@ -110,7 +109,6 @@
|
---|
| 467 | self.gia = gia()
|
---|
| 468 |
|
---|
| 469 | self.autodiff = autodiff()
|
---|
| 470 | - self.flaim = flaim()
|
---|
| 471 | self.inversion = inversion()
|
---|
| 472 | self.qmu = qmu()
|
---|
| 473 |
|
---|
| 474 | @@ -153,7 +151,6 @@
|
---|
| 475 | 'calving',\
|
---|
| 476 | 'gia',\
|
---|
| 477 | 'autodiff',\
|
---|
| 478 | - 'flaim',\
|
---|
| 479 | 'inversion',\
|
---|
| 480 | 'qmu',\
|
---|
| 481 | 'outputdefinition',\
|
---|
| 482 | @@ -194,7 +191,6 @@
|
---|
| 483 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("levelset","[%s,%s]" % ("1x1",obj.levelset.__class__.__name__),"parameters for moving boundaries (level-set method)"))
|
---|
| 484 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("calving","[%s,%s]" % ("1x1",obj.calving.__class__.__name__),"parameters for calving"))
|
---|
| 485 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("autodiff","[%s,%s]" % ("1x1",obj.autodiff.__class__.__name__),"automatic differentiation parameters"))
|
---|
| 486 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("flaim","[%s,%s]" % ("1x1",obj.flaim.__class__.__name__),"flaim parameters"))
|
---|
| 487 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("inversion","[%s,%s]" % ("1x1",obj.inversion.__class__.__name__),"parameters for inverse methods"))
|
---|
| 488 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("qmu","[%s,%s]" % ("1x1",obj.qmu.__class__.__name__),"dakota properties"))
|
---|
| 489 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("outputdefinition","[%s,%s]" % ("1x1",obj.outputdefinition.__class__.__name__),"output definition"))
|
---|
| 490 | Index: ../trunk-jpl/src/m/classes/oldclasses/flaim.m
|
---|
| 491 | ===================================================================
|
---|
| 492 | --- ../trunk-jpl/src/m/classes/oldclasses/flaim.m (revision 0)
|
---|
| 493 | +++ ../trunk-jpl/src/m/classes/oldclasses/flaim.m (revision 21097)
|
---|
| 494 | @@ -0,0 +1,22 @@
|
---|
| 495 | +%FLAIM class definition
|
---|
| 496 | +%
|
---|
| 497 | +% Usage:
|
---|
| 498 | +% flaim=flaim();
|
---|
| 499 | +
|
---|
| 500 | +classdef flaim
|
---|
| 501 | + properties (SetAccess=public)
|
---|
| 502 | + targets = ''
|
---|
| 503 | + tracks = ''
|
---|
| 504 | + flightreqs = struct()
|
---|
| 505 | + criterion = NaN
|
---|
| 506 | + gridsatequator = 200000
|
---|
| 507 | + usevalueordering = true
|
---|
| 508 | + split_antimeridian = true
|
---|
| 509 | + solution = ''
|
---|
| 510 | + quality = 0
|
---|
| 511 | + path_optimize = false
|
---|
| 512 | + opt_ndir = 1
|
---|
| 513 | + opt_dist = 25
|
---|
| 514 | + opt_niter = 30000
|
---|
| 515 | + end
|
---|
| 516 | +end
|
---|
| 517 | Index: ../trunk-jpl/src/m/classes/model.js
|
---|
| 518 | ===================================================================
|
---|
| 519 | --- ../trunk-jpl/src/m/classes/model.js (revision 21096)
|
---|
| 520 | +++ ../trunk-jpl/src/m/classes/model.js (revision 21097)
|
---|
| 521 | @@ -38,7 +38,6 @@
|
---|
| 522 | console.log(sprintf("//19s: //-22s -- //s","calving" ,"[1x1 " + typeof(this.calving) + "]","parameters for calving"));
|
---|
| 523 | console.log(sprintf("//19s: //-22s -- //s","gia" ,"[1x1 " + typeof(this.gia) + "]","parameters for gia solution"));
|
---|
| 524 | console.log(sprintf("//19s: //-22s -- //s","autodiff" ,"[1x1 " + typeof(this.autodiff) + "]","automatic differentiation parameters"));
|
---|
| 525 | - console.log(sprintf("//19s: //-22s -- //s","flaim" ,"[1x1 " + typeof(this.flaim) + "]","flaim parameters"));
|
---|
| 526 | console.log(sprintf("//19s: //-22s -- //s","inversion" ,"[1x1 " + typeof(this.inversion) + "]","parameters for inverse methods"));
|
---|
| 527 | console.log(sprintf("//19s: //-22s -- //s","qmu" ,"[1x1 " + typeof(this.qmu) + "]","dakota properties"));
|
---|
| 528 | console.log(sprintf("//19s: //-22s -- //s","outputdefinition","[1x1 " + typeof(this.outputdefinition) + "]","output definition"));
|
---|
| 529 | @@ -80,7 +79,6 @@
|
---|
| 530 | this.calving = new calving();
|
---|
| 531 | this.gia = new gia();
|
---|
| 532 | this.autodiff = new autodiff();
|
---|
| 533 | - this.flaim = new flaim();
|
---|
| 534 | this.inversion = new inversion();
|
---|
| 535 | this.qmu = new qmu();
|
---|
| 536 | this.radaroverlay = new radaroverlay();
|
---|
| 537 | @@ -98,7 +96,7 @@
|
---|
| 538 | for (var field in this){
|
---|
| 539 |
|
---|
| 540 | //Some properties do not need to be fixed
|
---|
| 541 | - if (field == 'results' | field =='radaroverlay' | field == 'toolkits' | field =='cluster' | field == 'flaim' | field == 'priv') continue;
|
---|
| 542 | + if (field == 'results' | field =='radaroverlay' | field == 'toolkits' | field =='cluster' | field == 'priv') continue;
|
---|
| 543 |
|
---|
| 544 | //Check that current field is a class
|
---|
| 545 | if(typeof this[field] == 'function'){
|
---|
| 546 | @@ -611,7 +609,6 @@
|
---|
| 547 | this.gia = 0;
|
---|
| 548 |
|
---|
| 549 | this.autodiff = 0;
|
---|
| 550 | - this.flaim = 0;
|
---|
| 551 | this.inversion = 0;
|
---|
| 552 | this.qmu = 0;
|
---|
| 553 |
|
---|
| 554 | Index: ../trunk-jpl/src/m/classes/slr.py
|
---|
| 555 | ===================================================================
|
---|
| 556 | --- ../trunk-jpl/src/m/classes/slr.py (revision 21096)
|
---|
| 557 | +++ ../trunk-jpl/src/m/classes/slr.py (revision 21097)
|
---|
| 558 | @@ -14,22 +14,22 @@
|
---|
| 559 | """
|
---|
| 560 |
|
---|
| 561 | def __init__(self): # {{{
|
---|
| 562 | - self.deltathickness = NaN
|
---|
| 563 | - self.sealevel = NaN
|
---|
| 564 | - self.maxiter = 0
|
---|
| 565 | - self.reltol = 0
|
---|
| 566 | - self.abstol = 0
|
---|
| 567 | - self.love_h = 0 #provided by PREM model()
|
---|
| 568 | - self.love_k = 0 #ideam
|
---|
| 569 | - self.love_l = 0 #ideam
|
---|
| 570 | - self.tide_love_h = 0
|
---|
| 571 | - self.tide_love_k = 0
|
---|
| 572 | - self.rigid = 0
|
---|
| 573 | - self.elastic = 0
|
---|
| 574 | - self.rotation = 0
|
---|
| 575 | - self.degacc = 0
|
---|
| 576 | - self.requested_outputs = []
|
---|
| 577 | - self.transitions = []
|
---|
| 578 | + self.deltathickness = NaN
|
---|
| 579 | + self.sealevel = NaN
|
---|
| 580 | + self.maxiter = 0
|
---|
| 581 | + self.reltol = 0
|
---|
| 582 | + self.abstol = 0
|
---|
| 583 | + self.love_h = 0 #provided by PREM model()
|
---|
| 584 | + self.love_k = 0 #ideam
|
---|
| 585 | + self.love_l = 0 #ideam
|
---|
| 586 | + self.tide_love_h = 0
|
---|
| 587 | + self.tide_love_k = 0
|
---|
| 588 | + self.rigid = 0
|
---|
| 589 | + self.elastic = 0
|
---|
| 590 | + self.rotation = 0
|
---|
| 591 | + self.degacc = 0
|
---|
| 592 | + self.requested_outputs = []
|
---|
| 593 | + self.transitions = []
|
---|
| 594 |
|
---|
| 595 | #set defaults
|
---|
| 596 | self.setdefaultparameters()
|
---|
| 597 | Index: ../trunk-jpl/src/m/contrib/defleurian/netCDF/ClassTry.py
|
---|
| 598 | ===================================================================
|
---|
| 599 | --- ../trunk-jpl/src/m/contrib/defleurian/netCDF/ClassTry.py (revision 21096)
|
---|
| 600 | +++ ../trunk-jpl/src/m/contrib/defleurian/netCDF/ClassTry.py (revision 21097)
|
---|
| 601 | @@ -71,7 +71,6 @@
|
---|
| 602 | 'calving':'calving',\
|
---|
| 603 | 'gia':'gia',\
|
---|
| 604 | 'autodiff':'autodiff',\
|
---|
| 605 | - 'flaim':'flaim',\
|
---|
| 606 | 'inversion':'inversion',\
|
---|
| 607 | 'qmu':'qmu',\
|
---|
| 608 | 'outputdefinition':'outputdefinition',\
|
---|
| 609 | @@ -111,7 +110,6 @@
|
---|
| 610 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("transient","[%s,%s]" % ("1x1",obj.transient.__class__.__name__),"parameters for transient solution"))
|
---|
| 611 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("calving","[%s,%s]" % ("1x1",obj.calving.__class__.__name__),"parameters for calving"))
|
---|
| 612 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("autodiff","[%s,%s]" % ("1x1",obj.autodiff.__class__.__name__),"automatic differentiation parameters"))
|
---|
| 613 | - string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("flaim","[%s,%s]" % ("1x1",obj.flaim.__class__.__name__),"flaim parameters"))
|
---|
| 614 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("inversion","[%s,%s]" % ("1x1",obj.inversion.__class__.__name__),"parameters for inverse methods"))
|
---|
| 615 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("qmu","[%s,%s]" % ("1x1",obj.qmu.__class__.__name__),"dakota properties"))
|
---|
| 616 | string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("outputdefinition","[%s,%s]" % ("1x1",obj.outputdefinition.__class__.__name__),"output definition"))
|
---|
| 617 | Index: ../trunk-jpl/src/m/os/flaimdir.m
|
---|
| 618 | ===================================================================
|
---|
| 619 | --- ../trunk-jpl/src/m/os/flaimdir.m (revision 21096)
|
---|
| 620 | +++ ../trunk-jpl/src/m/os/flaimdir.m (revision 21097)
|
---|
| 621 | @@ -1,7 +0,0 @@
|
---|
| 622 | -function FLAIM_DIR=flaimdir()
|
---|
| 623 | -%ISSMDIR - Get FLAIM installation directory
|
---|
| 624 | -%
|
---|
| 625 | -% Usage:
|
---|
| 626 | -% FLAIM_DIR=flaimdir()
|
---|
| 627 | -
|
---|
| 628 | -FLAIM_DIR=[issmdir() '/externalpackages/flaim/install'];
|
---|