Changeset 25168
- Timestamp:
- 06/26/20 23:28:36 (5 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/model.m
r25162 r25168 1263 1263 md.calving = calving(); 1264 1264 md.frontalforcings = frontalforcings(); 1265 md.gia 1265 md.gia = giamme(); 1266 1266 md.esa = esa(); 1267 1267 md.love = fourierlove(); … … 1270 1270 md.inversion = inversion(); 1271 1271 md.qmu = qmu(); 1272 md.amr 1272 md.amr = amr(); 1273 1273 md.radaroverlay = radaroverlay(); 1274 1274 md.results = struct(); -
issm/trunk-jpl/src/m/classes/results.py
r24213 r25168 3 3 4 4 class results(object): 5 """5 ''' 6 6 RESULTS class definition 7 7 8 8 Usage: 9 9 results = results() 10 """ 10 11 TODO: 12 - Modify output so that it matches that of 13 14 disp(md.results.<<solutionstring>>) 15 16 where <<solutionstring>> is one of the values from solve.m 17 ''' 11 18 12 19 def __init__(self, *args): # {{{ -
issm/trunk-jpl/src/m/classes/slr.m
r25066 r25168 31 31 horiz = 0; 32 32 planetradius = planetradius('earth'); 33 34 33 requested_outputs = {}; 35 34 transitions = {}; -
issm/trunk-jpl/src/m/classes/slr.py
r25163 r25168 36 36 self.rotation = 0 37 37 self.ocean_area_scaling = 0 38 self.steric_rate = 0 #rate of ocean expansion from steric effects.39 38 self.hydro_rate = 0 #rate of steric expansion from hydrological effects. 40 39 self.geodetic_run_frequency = 1 #how many time steps we skip before we run the geodetic part of the solver during transient … … 68 67 string = "%s\n%s" % (string, fielddisplay(self, 'angular_velocity', 'mean rotational velocity of earth [per second]')) 69 68 string = "%s\n%s" % (string, fielddisplay(self, 'ocean_area_scaling', 'correction for model representation of ocean area [default: No correction]')) 70 string = "%s\n%s" % (string, fielddisplay(self, 'steric_rate', 'rate of steric ocean expansion [mm / yr]'))71 69 string = "%s\n%s" % (string, fielddisplay(self, 'hydro_rate', 'rate of hydrological expansion [mm / yr]')) 72 string = "%s\n%s" % (string, fielddisplay(self, 'Ngia', 'rate of viscous (GIA) geoid expansion (in mm / yr)'))73 string = "%s\n%s" % (string, fielddisplay(self, 'Ugia', 'rate of viscous (GIA) bedrock uplift (in mm / yr)'))74 70 string = "%s\n%s" % (string, fielddisplay(self, 'geodetic', 'compute geodetic SLR? (in addition to steric?) default 0')) 75 71 string = "%s\n%s" % (string, fielddisplay(self, 'geodetic_run_frequency', 'how many time steps we skip before we run SLR solver during transient (default: 1)')) -
issm/trunk-jpl/src/m/solve/loadresultsfromcluster.py
r24538 r25168 7 7 8 8 def loadresultsfromcluster(md, runtimename=False): 9 """9 ''' 10 10 LOADRESULTSFROMCLUSTER - load results of solution sequence from cluster 11 11 12 12 Usage: 13 13 md = loadresultsfromcluster(md, runtimename) 14 """14 ''' 15 15 16 16 #retrieve cluster, to be able to call its methods … … 74 74 TryRem('.bat', filename) 75 75 76 # remove this for bin file debugging76 # remove this for bin file debugging 77 77 TryRem('.bin', filename) 78 78 -
issm/trunk-jpl/src/m/solve/loadresultsfromdisk.py
r24540 r25168 6 6 7 7 def loadresultsfromdisk(md, filename): 8 """8 ''' 9 9 LOADRESULTSFROMDISK - load results of solution sequence from disk file "filename" 10 10 11 11 Usage: 12 12 md = loadresultsfromdisk(md=False,filename=False); 13 """13 ''' 14 14 #check number of inputs/outputs 15 15 if not md or not filename: … … 53 53 54 54 #if only one solution, extract it from list for user friendliness 55 if len(structure) == 1 and not structure[0].SolutionType == 'TransientSolution':55 if len(structure) == 1 and structure[0].SolutionType != 'TransientSolution': 56 56 setattr(md.results, structure[0].SolutionType, structure[0]) 57 57 -
issm/trunk-jpl/src/m/solve/parseresultsfromdisk.m
r24240 r25168 40 40 %Add result 41 41 if(result.step==0), 42 %if we have a step = 0, this is a steady state solut oin, don't expect more steps.42 %if we have a step = 0, this is a steady state solution, don't expect more steps. 43 43 index = 1; 44 44 check_nomoresteps=1; -
issm/trunk-jpl/src/m/solve/parseresultsfromdisk.py
r24260 r25168 34 34 if check_nomoresteps: 35 35 if loadres['step'] >= 1: 36 raise TypeError("parsing results for a steady -state core, which incorporates transient results!")36 raise TypeError("parsing results for a steady-state core, which incorporates transient results!") 37 37 38 38 #Check step, increase counter if this is a new step … … 139 139 140 140 def ReadData(fid, md): # {{{ 141 """141 ''' 142 142 READDATA - 143 143 144 144 Usage: 145 145 field = ReadData(fid, md) 146 """146 ''' 147 147 148 148 #read field … … 179 179 raise TypeError("cannot read data of datatype {}".format(datatype)) 180 180 181 #Process units here FIXME: this should not be done here!181 #Process units here FIXME: this should not be done here! 182 182 yts = md.constants.yts 183 183 if fieldname == 'BalancethicknessThickeningRate': … … 243 243 degmax = md.love.sh_nmax 244 244 nfreq = md.love.nfreq 245 #for numpy 1.8 + only246 #temp_field = np.full((degmax + 1, nfreq, nlayer + 1, 6), 0.0)245 #for numpy 1.8 + only 246 #temp_field = np.full((degmax + 1, nfreq, nlayer + 1, 6), 0.0) 247 247 temp_field = np.empty((degmax + 1, nfreq, nlayer + 1, 6)) 248 248 temp_field.fill(0.0) -
issm/trunk-jpl/src/m/solve/solve.m
r25161 r25168 7 7 % 8 8 % solution types available comprise: 9 % 10 % 11 % 12 % 13 % 14 % 9 % - 'Stressbalance' or 'sb' 10 % - 'Masstransport' or 'mt' 11 % - 'Thermal' or 'th' 12 % - 'Steadystate' or 'ss' 13 % - 'Transient' or 'tr' 14 % - 'Balancethickness' or 'mc' 15 15 % - 'Balancevelocity' or 'bv' 16 % 17 % 18 % 16 % - 'BedSlope' or 'bsl' 17 % - 'SurfaceSlope' or 'ssl' 18 % - 'Hydrology' or 'hy' 19 19 % - 'DamageEvolution' or 'da' 20 % 21 % - 'Esa' or 'esa'22 % - 'Sealevelrise' or 'slr'23 % - 'Love' or 'lv'20 % - 'Gia' or 'gia' 21 % - 'Love' or 'lv' 22 % - 'Esa' or 'esa' 23 % - 'Sealevelrise' or 'slr' 24 24 % 25 25 % extra options: … … 81 81 md.private.solution=solutionstring; 82 82 cluster=md.cluster; 83 if strcmpi(getfieldvalue(options,'batch','no'),'yes') batch=1; else batch=0; end 83 if strcmpi(getfieldvalue(options,'batch','no'),'yes') 84 batch=1; 85 else 86 batch=0; 87 end 84 88 85 89 %check model consistency -
issm/trunk-jpl/src/m/solve/solve.py
r24538 r25168 12 12 13 13 def solve(md, solutionstring, *args): 14 """14 ''' 15 15 SOLVE - apply solution sequence for this model 16 16 … … 44 44 md = solve(md, 'Stressbalance') 45 45 md = solve(md, 'sb') 46 """46 ''' 47 47 48 48 #recover and process solve options -
issm/trunk-jpl/src/m/solve/solveslm.m
r22943 r25168 7 7 % 8 8 % solution types available comprise: 9 % 10 % 9 % - 'Sealevelrise' 10 % - 'Transient' 11 11 % 12 12 % extra options: -
issm/trunk-jpl/test/NightlyRun/runme.py
r24711 r25168 57 57 runme(exclude = 'Dakota', benchmark = 'all') 58 58 runme(id = [[101, 102], ['Dakota', 'Slr']]) 59 60 TODO: 61 - At '#disp test result', make sure precision of output matches 59 62 """ 60 63 #Get ISSM_DIR variable … … 185 188 field = field.T 186 189 if np.shape(field) != np.shape(archive): 187 raise RuntimeError("Field '{}' 'from test is malformed; shape is {}, should be {} or {}".format(archive_name, np.shape(field.T), np.shape(archive), np.shape(archive.T)))190 raise RuntimeError("Field '{}' from test is malformed; shape is {}, should be {} or {}".format(archive_name, np.shape(field.T), np.shape(archive), np.shape(archive.T))) 188 191 189 192 error_diff = np.amax(np.abs(archive - field), axis=0) / (np.amax(np.abs(archive), axis=0) + float_info.epsilon) … … 191 194 error_diff = error_diff[0] 192 195 193 196 #disp test result 194 197 if (np.any(error_diff > tolerance) or np.isnan(error_diff)): 195 198 print(('ERROR difference: {} > {} test id: {} test name: {} field: {}'.format(error_diff, tolerance, id, id_string, fieldname))) -
issm/trunk-jpl/test/NightlyRun/test2010.m
r25163 r25168 69 69 %eustatic + rigid + elastic run: 70 70 md.solidearth.settings.rigid=1; 71 md.solidearth.settings.elastic=1; md.solidearth.settings.rotation=1; 71 md.solidearth.settings.elastic=1; 72 md.solidearth.settings.rotation=1; 72 73 md.cluster=generic('name',oshostname(),'np',3); 73 74 -
issm/trunk-jpl/test/NightlyRun/test2010.py
r25163 r25168 80 80 md.solidearth.settings.reltol = np.nan 81 81 md.solidearth.settings.abstol = 1e-3 82 md.solidearth.settings. geodetic= 182 md.solidearth.settings.computesealevelchange = 1 83 83 # }}} 84 84 … … 109 109 field_names = ['eus', 'slr', 'moixz', 'moiyz', 'moizz'] 110 110 field_tolerances = [1e-13, 1e-13, 1e-13, 1e-13, 1e-13] 111 field_values = [eus, s olidearth, moixz, moiyz, moizz]111 field_values = [eus, slr, moixz, moiyz, moizz]
Note:
See TracChangeset
for help on using the changeset viewer.