Changeset 14198


Ignore:
Timestamp:
12/19/12 10:19:22 (12 years ago)
Author:
jschierm
Message:

CHG: Update python surfaceforcings to match matlab [14175] (plus related minor changes).

Location:
issm/trunk-jpl
Files:
5 edited

Legend:

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

    r14141 r14198  
    2121                self.issmbgradients = 0
    2222                self.isdelta18o = 0
    23                 self.hc = float('NaN')
    2423                self.href = float('NaN')
    2524                self.smbref = float('NaN')
    26                 self.smb_pos_max = float('NaN')
    27                 self.smb_pos_min = float('NaN')
    28                 self.a_pos = float('NaN')
    2925                self.b_pos = float('NaN')
    30                 self.a_neg = float('NaN')
    3126                self.b_neg = float('NaN')
    3227                self.monthlytemperatures = float('NaN')
     
    5752                string="%s\n%s"%(string,fielddisplay(self,'delta18o_surface','surface elevation of the delta18o site, required if pdd is activated and delta18o activated'))
    5853                string="%s\n%s"%(string,fielddisplay(self,'issmbgradients','is smb gradients method activated (0 or 1, default is 0)'))
    59                 string="%s\n%s"%(string,fielddisplay(self,'hc',' elevation of intersection between accumulation and ablation regime required if smb gradients is activated'))
    6054                string="%s\n%s"%(string,fielddisplay(self,'href',' reference elevation from which deviation is used to calculate SMB adjustment in smb gradients method'))
    6155                string="%s\n%s"%(string,fielddisplay(self,'smbref',' reference smb from which deviation is calculated in smb gradients method'))
    62                 string="%s\n%s"%(string,fielddisplay(self,'smb_pos_max',' maximum value of positive smb required if smb gradients is activated'))
    63                 string="%s\n%s"%(string,fielddisplay(self,'smb_pos_min',' minimum value of positive smb required if smb gradients is activated'))
    64                 string="%s\n%s"%(string,fielddisplay(self,'a_pos',' intercept of hs - smb regression line for accumulation regime required if smb gradients is activated'))
    6556                string="%s\n%s"%(string,fielddisplay(self,'b_pos',' slope of hs - smb regression line for accumulation regime required if smb gradients is activated'))
    66                 string="%s\n%s"%(string,fielddisplay(self,'a_neg',' intercept of hs - smb regression line for ablation regime required if smb gradients is activated'))
    6757                string="%s\n%s"%(string,fielddisplay(self,'b_neg',' slope of hs - smb regression line for ablation regime required if smb gradients is activated'))
    6858
     
    9686                                        md = checkfield(md,'surfaceforcings.precipitations_presentday','size',[md.mesh.numberofvertices+1,12],'NaN',1)
    9787                        elif self.issmbgradients:
    98                                 md = checkfield(md,'surfaceforcings.hc','forcing',1,'NaN',1)
    9988                                md = checkfield(md,'surfaceforcings.href','forcing',1,'NaN',1)
    10089                                md = checkfield(md,'surfaceforcings.smbref','forcing',1,'NaN',1)
    101                                 md = checkfield(md,'surfaceforcings.smb_pos_max','forcing',1,'NaN',1)
    102                                 md = checkfield(md,'surfaceforcings.smb_pos_min','forcing',1,'NaN',1)
    103                                 md = checkfield(md,'surfaceforcings.a_pos','forcing',1,'NaN',1)
    10490                                md = checkfield(md,'surfaceforcings.b_pos','forcing',1,'NaN',1)
    105                                 md = checkfield(md,'surfaceforcings.a_neg','forcing',1,'NaN',1)
    10691                                md = checkfield(md,'surfaceforcings.b_neg','forcing',1,'NaN',1)
    10792                        else:
     
    134119
    135120                if self.issmbgradients:
    136                         WriteData(fid,'object',self,'fieldname','hc','format','DoubleMat','mattype',1)
    137121                        WriteData(fid,'object',self,'fieldname','href','format','DoubleMat','mattype',1)
    138122                        WriteData(fid,'object',self,'fieldname','smbref','format','DoubleMat','mattype',1)
    139                         WriteData(fid,'object',self,'fieldname','smb_pos_max','format','DoubleMat','mattype',1)
    140                         WriteData(fid,'object',self,'fieldname','smb_pos_min','format','DoubleMat','mattype',1)
    141                         WriteData(fid,'object',self,'fieldname','a_pos','format','DoubleMat','mattype',1)
    142123                        WriteData(fid,'object',self,'fieldname','b_pos','format','DoubleMat','mattype',1)
    143                         WriteData(fid,'object',self,'fieldname','a_neg','format','DoubleMat','mattype',1)
    144124                        WriteData(fid,'object',self,'fieldname','b_neg','format','DoubleMat','mattype',1)
    145125        # }}}
  • issm/trunk-jpl/test/NightlyRun/test328.m

    r14179 r14198  
    77md.surfaceforcings.b_neg=250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y;
    88md.surfaceforcings.href=md.geometry.surface;
    9 md.surfaceforcings.smbref= 1000 - 0.001*md.mesh.x - 0.005*md.mesh.y;
     9md.surfaceforcings.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y;
    1010md.transient.requested_outputs=TotalSmbEnum();
    1111md.cluster=generic('name',oshostname(),'np',3);
  • issm/trunk-jpl/test/NightlyRun/test328.py

    r14190 r14198  
    1919md.transient.requested_outputs=TotalSmbEnum()
    2020md.surfaceforcings.href=copy.deepcopy(md.geometry.surface).reshape(-1)
    21 md.surfaceforcings.smbref= 1000 - 0.001*md.mesh.x - 0.005*md.mesh.y;
     21md.surfaceforcings.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y;
    2222md.cluster=generic('name',oshostname(),'np',3)
    2323md=solve(md,TransientSolutionEnum())
  • issm/trunk-jpl/test/NightlyRun/test329.m

    r14179 r14198  
    88md.surfaceforcings.b_neg=250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y;
    99md.surfaceforcings.href=md.geometry.surface;
    10 md.surfaceforcings.smbref= 1000 - 0.001*md.mesh.x - 0.005*md.mesh.y;
     10md.surfaceforcings.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y;
    1111md.transient.requested_outputs=TotalSmbEnum();
    1212md.cluster=generic('name',oshostname(),'np',3);
  • issm/trunk-jpl/test/NightlyRun/test329.py

    r14190 r14198  
    1919md.surfaceforcings.b_neg=250. + 0.000051*md.mesh.x - 0.00011*md.mesh.y
    2020md.surfaceforcings.href=copy.deepcopy(md.geometry.surface).reshape(-1)
    21 md.surfaceforcings.smbref= 1000 - 0.001*md.mesh.x - 0.005*md.mesh.y;
     21md.surfaceforcings.smbref= 1000. - 0.001*md.mesh.x - 0.005*md.mesh.y;
    2222md.transient.requested_outputs=TotalSmbEnum()
    2323md.cluster=generic('name',oshostname(),'np',3)
Note: See TracChangeset for help on using the changeset viewer.