Ignore:
Timestamp:
10/30/12 15:03:19 (12 years ago)
Author:
jschierm
Message:

NEW: Added python model.extract and contourenvelope (plus matlab cosmetic changes).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/boundaryconditions/SetMarineIceSheetBC.py

    r13470 r13857  
    3838        pos=numpy.nonzero(numpy.logical_and(md.mesh.vertexonboundary,numpy.logical_not(vertexonicefront)))[0]
    3939        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."
    4141
    4242        md.diagnostic.spcvx=float('nan')*numpy.ones((md.mesh.numberofvertices,1))
     
    5050        #Dirichlet Values
    5151        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"
    5353                md.diagnostic.spcvx[pos]=md.inversion.vx_obs[pos]
    5454                md.diagnostic.spcvy[pos]=md.inversion.vy_obs[pos]
    5555        else:
    56                 print("      boundary conditions for diagnostic model: spc set as zero")
     56                print "      boundary conditions for diagnostic model: spc set as zero"
    5757
    5858        md.hydrology.spcwatercolumn=numpy.zeros((md.mesh.numberofvertices,2))
     
    8383        if numpy.all(numpy.isnan(md.surfaceforcings.precipitation)) and (md.surfaceforcings.ispdd==1):
    8484                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"
    8686        if numpy.all(numpy.isnan(md.surfaceforcings.mass_balance)) and (md.surfaceforcings.ispdd==0):
    8787                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"
    8989        if numpy.all(numpy.isnan(md.basalforcings.melting_rate)):
    9090                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"
    9292        if numpy.all(numpy.isnan(md.balancethickness.thickening_rate)):
    9393                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"
    9595
    9696        md.prognostic.spcthickness=float('nan')*numpy.ones((md.mesh.numberofvertices,1))
     
    104104                if not isinstance(md.basalforcings.geothermalflux,numpy.ndarray) or not numpy.size(md.basalforcings.geothermalflux,axis=0)==md.mesh.numberofvertices:
    105105                        md.basalforcings.geothermalflux=numpy.zeros((md.mesh.numberofvertices,1))
    106                         md.basalforcings.geothermalflux[numpy.nonzero(md.mask.vertexongroundedice)]=50.*10.**-3; #50mW/m2
     106                        md.basalforcings.geothermalflux[numpy.nonzero(md.mask.vertexongroundedice)]=50.*10.**-3    #50mW/m2
    107107        else:
    108                 print("      no thermal boundary conditions created: no observed temperature found");
     108                print "      no thermal boundary conditions created: no observed temperature found"
    109109
    110110        return md
Note: See TracChangeset for help on using the changeset viewer.