- Timestamp:
- 10/30/12 15:03:19 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.py
r13470 r13857 38 38 pos=numpy.nonzero(numpy.logical_and(md.mesh.vertexonboundary,numpy.logical_not(vertexonicefront)))[0] 39 39 if not numpy.size(pos): 40 print ("SetMarineIceSheetBC warning: ice front all around the glacier, no dirichlet found. Dirichlet must be added manually.")40 print "SetMarineIceSheetBC warning: ice front all around the glacier, no dirichlet found. Dirichlet must be added manually." 41 41 42 42 md.diagnostic.spcvx=float('nan')*numpy.ones((md.mesh.numberofvertices,1)) … … 50 50 #Dirichlet Values 51 51 if isinstance(md.inversion.vx_obs,numpy.ndarray) and numpy.size(md.inversion.vx_obs,axis=0)==md.mesh.numberofvertices and isinstance(md.inversion.vy_obs,numpy.ndarray) and numpy.size(md.inversion.vy_obs,axis=0)==md.mesh.numberofvertices: 52 print (" boundary conditions for diagnostic model: spc set as observed velocities")52 print " boundary conditions for diagnostic model: spc set as observed velocities" 53 53 md.diagnostic.spcvx[pos]=md.inversion.vx_obs[pos] 54 54 md.diagnostic.spcvy[pos]=md.inversion.vy_obs[pos] 55 55 else: 56 print (" boundary conditions for diagnostic model: spc set as zero")56 print " boundary conditions for diagnostic model: spc set as zero" 57 57 58 58 md.hydrology.spcwatercolumn=numpy.zeros((md.mesh.numberofvertices,2)) … … 83 83 if numpy.all(numpy.isnan(md.surfaceforcings.precipitation)) and (md.surfaceforcings.ispdd==1): 84 84 md.surfaceforcings.precipitation=numpy.zeros((md.mesh.numberofvertices,1)) 85 print (" no surfaceforcings.precipitation specified: values set as zero")85 print " no surfaceforcings.precipitation specified: values set as zero" 86 86 if numpy.all(numpy.isnan(md.surfaceforcings.mass_balance)) and (md.surfaceforcings.ispdd==0): 87 87 md.surfaceforcings.mass_balance=numpy.zeros((md.mesh.numberofvertices,1)) 88 print (" no surfaceforcings.mass_balance specified: values set as zero")88 print " no surfaceforcings.mass_balance specified: values set as zero" 89 89 if numpy.all(numpy.isnan(md.basalforcings.melting_rate)): 90 90 md.basalforcings.melting_rate=numpy.zeros((md.mesh.numberofvertices,1)) 91 print (" no basalforcings.melting_rate specified: values set as zero")91 print " no basalforcings.melting_rate specified: values set as zero" 92 92 if numpy.all(numpy.isnan(md.balancethickness.thickening_rate)): 93 93 md.balancethickness.thickening_rate=numpy.zeros((md.mesh.numberofvertices,1)) 94 print (" no balancethickness.thickening_rate specified: values set as zero")94 print " no balancethickness.thickening_rate specified: values set as zero" 95 95 96 96 md.prognostic.spcthickness=float('nan')*numpy.ones((md.mesh.numberofvertices,1)) … … 104 104 if not isinstance(md.basalforcings.geothermalflux,numpy.ndarray) or not numpy.size(md.basalforcings.geothermalflux,axis=0)==md.mesh.numberofvertices: 105 105 md.basalforcings.geothermalflux=numpy.zeros((md.mesh.numberofvertices,1)) 106 md.basalforcings.geothermalflux[numpy.nonzero(md.mask.vertexongroundedice)]=50.*10.**-3 ;#50mW/m2106 md.basalforcings.geothermalflux[numpy.nonzero(md.mask.vertexongroundedice)]=50.*10.**-3 #50mW/m2 107 107 else: 108 print (" no thermal boundary conditions created: no observed temperature found");108 print " no thermal boundary conditions created: no observed temperature found" 109 109 110 110 return md
Note:
See TracChangeset
for help on using the changeset viewer.