Changeset 21354


Ignore:
Timestamp:
11/10/16 02:14:35 (8 years ago)
Author:
sjohnsen
Message:

CHG: added def_initialize and removed md in def_init to make it more python

File:
1 edited

Legend:

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

    r21303 r21354  
    66
    77class mismipbasalforcings(object):
    8     """
     8    """ 
    99    MISMIP Basal Forcings class definition
    1010
     
    1313    """
    1414
    15     def __init__(self,md): # {{{
     15    def __init__(self): # {{{
    1616
    1717        self.groundedice_melting_rate = float('NaN')
     
    2020        self.upperdepth_melt = float('NaN')
    2121        self.geothermalflux = float('NaN')
    22 
    23         if np.all(np.isnan(self.groundedice_melting_rate)):
    24             self.groundedice_melting_rate=np.zeros(md.mesh.numberofvertices)
    25             print ' no basalforcings.groundedice_melting_rate specified: values set as zero'
    2622
    2723        self.setdefaultparameters()
     
    4137        self.geothermalflux=project3d(md,'vector',self.geothermalflux,'type','node','layer',1)    #bedrock only gets geothermal flux
    4238        return self
     39    #}}}
     40    def initialize(self,md): # {{{
     41        if np.all(np.isnan(self.groundedice_melting_rate)):
     42            self.groundedice_melting_rate=np.zeros(md.mesh.numberofvertices)
     43            print ' no basalforcings.groundedice_melting_rate specified: values set as zero'
     44        return self
    4345    #}}}
    4446    def setdefaultparameters(self): # {{{
Note: See TracChangeset for help on using the changeset viewer.