Changeset 19263


Ignore:
Timestamp:
04/07/15 12:48:14 (10 years ago)
Author:
schlegel
Message:

CHG: use timeserieslength in writedata instead of explicit conversion using yts

Location:
issm/trunk-jpl
Files:
9 edited

Legend:

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

    r19262 r19263  
    8080                        fielddisplay(self,'s0t','should be set to elevation from temperature source (between 0 and a few 1000s m, default is 0) [m]');
    8181                        fielddisplay(self,'rlaps','present day lapse rate [degree/km]');
    82                         if(self.isd18opd==1)
    83                             fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if delta18o/mungsm/d18opd is activated');
    84                             fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm/d18opd is activated');
    85                             fielddisplay(self,'delta18o','delta18o [per mil], required if pdd is activated and d18opd activated'); 
    86                             fielddisplay(self,'dpermil','degree per mil, required if d18opd is activated');                           
    87                         end
    88                         % No need to display rlapslgm, Tdiff, ismungsm
    89                         % as they are not used in this case but are still needed as default values in
    90                         % PositiveDegreeDay (Tria.cpp) used in that case
     82                        if(self.isd18opd==1)
     83                                fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [K], required if delta18o/mungsm/d18opd is activated');
     84                                fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if delta18o/mungsm/d18opd is activated');
     85                                fielddisplay(self,'delta18o','delta18o [per mil], required if pdd is activated and d18opd activated'); 
     86                                fielddisplay(self,'dpermil','degree per mil, required if d18opd is activated');                           
     87                        end
     88                        % No need to display rlapslgm, Tdiff, ismungsm
     89                        % as they are not used in this case but are still needed as default values in
     90                        % PositiveDegreeDay (Tria.cpp) used in that case
    9191                end % }}}
    9292                function marshall(self,md,fid) % {{{
     
    103103                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','rlaps','format','Double');
    104104                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','rlapslgm','format','Double');
    105                         WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1);
    106                         WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1);
    107 
    108                         A=self.Tdiff;
    109                         A(end,:) = A(end,:)*yts;
    110                         WriteData(fid,'data',A,'enum',SurfaceforcingsTdiffEnum(),'format','DoubleMat','mattype',3);
     105                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2);
     106                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2);
    111107
    112108                        if self.isd18opd
    113109                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1);
    114110                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1);
    115 
    116                                 D=self.delta18o;
    117                                 D(end,:) = D(end,:)*yts;
    118                                 WriteData(fid,'data',D,'enum',SurfaceforcingsDelta18oEnum(),'format','DoubleMat','mattype',3);
    119                                
     111                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',3,'timeserieslength',2);
    120112                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','dpermil','format','Double');
    121 
    122    end
     113                        end
    123114                end % }}}
    124115        end
  • issm/trunk-jpl/src/m/classes/SMBd18opdd.py

    r19260 r19263  
    107107                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','rlaps','format','Double')
    108108                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','rlapslgm','format','Double')
    109                 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1)
    110                 WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1)
     109                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2)
     110                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2)
    111111
    112112                if self.isd18opd:
    113113                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1)
    114114                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1)
    115                         WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1)
     115                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1,'timeserieslength',2)
    116116                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','dpermil','format','DoubleMat','mattype',1)
    117117        # }}}
  • issm/trunk-jpl/src/m/classes/SMBpdd.m

    r19262 r19263  
    155155                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o_surface','format','DoubleMat','mattype',1);
    156156                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1);
    157 
    158                                 A=self.Tdiff
    159                                 A(end,:) = A(end,:)*yts;
    160                                 WriteData(fid,'data',A,'enum',SurfaceforcingsTdiffEnum(),'format','DoubleMat','mattype',3);
    161                                
    162                                 C=self.sealev
    163                                 C(end,:) = C(end,:)*yts;                               
    164                                 WriteData(fid,'data',C,'enum',SurfaceforcingsSealevEnum(),'format','DoubleMat','mattype',3);
    165 
    166                                 % WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1);
    167                                 % WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1);
     157                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2);
     158                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2);
    168159                        elseif self.ismungsm
    169160                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1);
     
    171162                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1);
    172163                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1);
    173 
    174                                 A=self.Tdiff;
    175                                 A(end,:) = A(end,:)*yts;
    176                                 WriteData(fid,'data',A,'enum',SurfaceforcingsTdiffEnum(),'format','DoubleMat','mattype',3);
    177                                
    178                                 B=self.Pfac;
    179                                 B(end,:) = B(end,:)*yts;
    180                                 WriteData(fid,'data',B,'enum',SurfaceforcingsPfacEnum(),'format','DoubleMat','mattype',3);
    181 
    182                                 C=self.sealev;
    183                                 C(end,:) = C(end,:)*yts;                               
    184                                 WriteData(fid,'data',C,'enum',SurfaceforcingsSealevEnum(),'format','DoubleMat','mattype',3);
    185                                
    186                                 % WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Pfac','format','DoubleMat','mattype',1);
    187                                 % WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1);
    188                                 % WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1);
     164                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Pfac','format','DoubleMat','mattype',1,'timeserieslength',2);
     165                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2);
     166                                WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2);
    189167                        end
    190168                end % }}}
  • issm/trunk-jpl/src/m/classes/SMBpdd.py

    r19228 r19263  
    161161                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o_surface','format','DoubleMat','mattype',1)
    162162                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','delta18o','format','DoubleMat','mattype',1)
    163                         WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1)
    164                         WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1)                   
     163                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2)
     164                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2)                       
    165165                elif self.ismungsm:
    166166                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','temperatures_presentday','format','DoubleMat','mattype',1)
     
    168168                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_presentday','format','DoubleMat','mattype',1)
    169169                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','precipitations_lgm','format','DoubleMat','mattype',1)
    170                         WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Pfac','format','DoubleMat','mattype',1)
    171                         WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1)
    172                         WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1)
     170                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Pfac','format','DoubleMat','mattype',1,'timeserieslength',2)
     171                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','Tdiff','format','DoubleMat','mattype',1,'timeserieslength',2)
     172                        WriteData(fid,'object',self,'class','surfaceforcings','fieldname','sealev','format','DoubleMat','mattype',1,'timeserieslength',2)
    173173        # }}}
Note: See TracChangeset for help on using the changeset viewer.