Changeset 13420


Ignore:
Timestamp:
09/24/12 11:21:44 (12 years ago)
Author:
jschierm
Message:

CHG: Modified thermal.py corresponding to changeset [13401].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/thermal.py

    r13401 r13420  
    11#module imports
     2import numpy
    23from fielddisplay import fielddisplay
    34from EnumDefinitions import *
     
    7071                md = checkfield(md,'thermal.spctemperature','forcing',1)
    7172                if EnthalpyAnalysisEnum() in analyses and (md.thermal.isenthalpy or solution==EnthalpySolutionEnum()) and md.mesh.dimension==3:
    72                         md = checkfield(md,'thermal.spctemperature','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*(md.geometry.surface-md.mesh.z),'message',"spctemperature should be below the adjusted melting point")
     73                        pos=numpy.nonzero(numpy.logical_not(numpy.isnan(md.thermal.spctemperature[1:md.mesh.numberofvertices,:])))
     74                        replicate=numpy.tile(md.geometry.surface-md.mesh.z,(1,numpy.size(md.thermal.spctemperature,axis=1)))
     75                        md = checkfield(md,'thermal.spctemperature(numpy.nonzero(numpy.logical_not(numpy.isnan(md.thermal.spctemperature[1:md.mesh.numberofvertices,:]))))','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*replicate[pos],'message',"spctemperature should be below the adjusted melting point")
    7376                        md = checkfield(md,'thermal.isenthalpy','numel',[1],'values',[0,1])
    7477
Note: See TracChangeset for help on using the changeset viewer.