Changeset 27167


Ignore:
Timestamp:
08/01/22 06:36:56 (3 years ago)
Author:
bdef
Message:

CHG: minor formating

Location:
issm/trunk-jpl/test/NightlyRun
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/runme.py

    r27011 r27167  
    365365                            field = field.T
    366366                            if np.shape(field) != np.shape(archive):
    367                                 raise RuntimeError("Field '{}' from test is malformed; shape is {}, should be {} or {}".format(archive_name, np.shape(field.T), np.shape(archive), np.shape(archive.T)))
     367                                raise RuntimeError("Field '{}' from test {} is malformed; shape is {}, should be {} or {}".format(fieldname, archive_name[7:], np.shape(field.T), np.shape(archive), np.shape(archive.T)))
    368368
    369369                        error_diff = np.amax(np.abs(archive - field), axis=0) / (np.amax(np.abs(archive), axis=0) + float_info.epsilon)
  • issm/trunk-jpl/test/NightlyRun/test2004.m

    r26800 r27167  
    77%}}}
    88
    9 %create sealevel model to hold our information: 
     9%create sealevel model to hold our information:
    1010sl=sealevelmodel();
    1111
    12 %Create basins using boundaries from shapefile: 
     12%Create basins using boundaries from shapefile:
    1313%some projections we'll rely on:  %{{{
    1414proj4326=epsg2proj(4326);
     
    7171%Go through basins and mesh:  %{{{
    7272%meshing parameters:  {{{
    73 hmin=500; hmax=700; hmin=hmin*1000; hmax=hmax*1000; 
     73hmin=500; hmax=700; hmin=hmin*1000; hmax=hmax*1000;
    7474tolerance=100; %tolerance of 100m on Earth position when merging 3d meshes
    7575threshold=5;
    76 defaultoptions={'KeepVertices',0,'MaxCornerAngle',0.0000000001,'NoBoundaryRefinement',1}; 
     76defaultoptions={'KeepVertices',0,'MaxCornerAngle',0.0000000001,'NoBoundaryRefinement',1};
    7777alreadyloaded=0;
    7878%}}}
     
    8282        disp(sprintf('Meshing basin %s\n',bas.name));
    8383
    84         %recover basin domain: 
     84        %recover basin domain:
    8585        domain=bas.contour();
    8686
     
    9292        %plotmodel(md,'data','mesh');pause(1);
    9393
    94         %miscellaneous: 
     94        %miscellaneous:
    9595        md.mesh.proj=bas.proj;
    9696        md.miscellaneous.name=bas.name;
    9797
    98         %recover mask where we have land: 
     98        %recover mask where we have land:
    9999        md.private.bamg.landmask=double(md.private.bamg.mesh.Triangles(:,4)>=1);
    100100
     
    107107%}}}
    108108
    109 %Parameterization: 
     109%Parameterization:
    110110%Parameterize ice sheets : {{{
    111111for ind=sl.basinindx('continent',{'antarctica'}),
     
    113113
    114114        md=sl.icecaps{ind};
    115         bas=sl.basins{ind}; 
     115        bas=sl.basins{ind};
    116116        %masks :  %{{{
    117         %ice levelset from domain outlines: 
     117        %ice levelset from domain outlines:
    118118        md.mask.ice_levelset=-ones(md.mesh.numberofvertices,1);
    119        
    120         if bas.isnameany('antarctica-grounded'), 
     119
     120        if bas.isnameany('antarctica-grounded'),
    121121                md.mask.ocean_levelset=ones(md.mesh.numberofvertices,1);
    122122        end
    123         if bas.isnameany('ronne','ross'), 
     123        if bas.isnameany('ronne','ross'),
    124124                md.mask.ocean_levelset=-ones(md.mesh.numberofvertices,1);
    125125        end
     
    161161                        % index=delaunayn(points);
    162162                        index=BamgTriangulate(longAIS, latAIS);
    163                         lat=md.mesh.lat; 
     163                        lat=md.mesh.lat;
    164164                        long=md.mesh.long+360;
    165165                        pos=find(long>360);
     
    195195        bas=sl.basins{ind};
    196196
    197         %recover lat,long: 
     197        %recover lat,long:
    198198        [md.mesh.long,md.mesh.lat]=gdaltransform(md.mesh.x,md.mesh.y,md.mesh.proj,'EPSG:4326');
    199199
    200200        %mask:  %{{{
    201         %Figure out mask from initial mesh: deal with land and ocean masks (land 
     201        %Figure out mask from initial mesh: deal with land and ocean masks (land
    202202        %includes grounded ice).  %{{{
    203203        %first, transform land element mask into vertex-driven one
     
    213213        sumconnectedisonocean=sum(connectedisonocean,2);
    214214
    215         %figure out which land elements are connected to the ocean: 
     215        %figure out which land elements are connected to the ocean:
    216216        landelsconocean=landels(find(sumconnectedisonocean));
    217217
     
    223223        md.mesh.elements(landelsconocean,1)];
    224224
    225         %edge ind1 and ind2: 
     225        %edge ind1 and ind2:
    226226        for i=1:length(ind1),
    227227                els1=md.mesh.vertexconnectivity(ind1(i),1: md.mesh.vertexconnectivity(ind1(i),end));
     
    230230
    231231                if length(find(land(els)))==1,
    232                         %this edge is on the beach, 0 the edge: 
     232                        %this edge is on the beach, 0 the edge:
    233233                        land_mask(ind1(i))=0;
    234234                        land_mask(ind2(i))=0;
     
    237237
    238238        md.mask.ocean_levelset=land_mask;
    239         md.mask.ice_levelset=ones(md.mesh.numberofvertices,1);   %if there are glaciers, we'll adjust 
     239        md.mask.ice_levelset=ones(md.mesh.numberofvertices,1);   %if there are glaciers, we'll adjust
    240240
    241241        if testagainst2002,
     
    251251        md.masstransport.spcthickness=zeros(md.mesh.numberofvertices,1);
    252252
    253         if testagainst2002, 
     253        if testagainst2002,
    254254                % {{{
    255255                %greenland
     
    261261                %md.masstransport.spcthickness(pos)=-100*ratio;
    262262
    263                 %correct mask: 
     263                %correct mask:
    264264                md.mask.ice_levelset(md.mesh.elements(pos,:))=-1;
    265265                % }}}
     
    281281                delHGLA=sum(delH(:,3:end),2);
    282282                index=BamgTriangulate(longGLA, latGLA);
    283                 lat=md.mesh.lat; 
    284                 long=md.mesh.long+360; 
     283                lat=md.mesh.lat;
     284                long=md.mesh.long+360;
    285285                pos=find(long>360);
    286286                long(pos)=long(pos)-360;
     
    292292                md.masstransport.spcthickness(pos)= md.masstransport.spcthickness(pos)-delHGLA(pos)/100;
    293293
    294                 %adjust mask accordingly: 
    295                 pos=find(md.masstransport.spcthickness); 
     294                %adjust mask accordingly:
     295                pos=find(md.masstransport.spcthickness);
    296296                md.mask.ice_levelset(pos)=-1;
    297297                md.mask.ocean_levelset(pos)=1;
     
    322322%%Assemble Earth in 3D {{{
    323323
    324 %parameters: 
     324%parameters:
    325325plotting=0;
    326326tolerance=100;
    327 loneedgesdetect=0; 
    328 
    329 %create Earth model by concatenating all the icecaps in 3D: 
     327loneedgesdetect=0;
     328
     329%create Earth model by concatenating all the icecaps in 3D:
    330330sl.caticecaps('tolerance',tolerance,'loneedgesdetect',loneedgesdetect);
    331331
    332 %figure out how each icecap's mesh connects to the larger Earth mesh: 
     332%figure out how each icecap's mesh connects to the larger Earth mesh:
    333333sl.intersections('force',1);
    334334
    335 %figure out connectivity: 
     335%figure out connectivity:
    336336disp('Mesh connectivity');
    337337sl.earth.mesh.vertexconnectivity=NodeConnectivity(sl.earth.mesh.elements,sl.earth.mesh.numberofvertices);
     
    341341sl.earth.mesh.area=averaging(sl.earth,GetAreas3DTria(sl.earth.mesh.elements,sl.earth.mesh.x,sl.earth.mesh.y,sl.earth.mesh.z),4);
    342342
    343 %transfer a list of fields from each icecap and continent back to Earth: 
     343%transfer a list of fields from each icecap and continent back to Earth:
    344344sl.transfer('mask.ice_levelset');
    345345sl.transfer('mask.ocean_levelset');
     
    355355sl.transfer('dsl.sea_water_pressure_at_sea_floor');
    356356
    357 %radius: 
     357%radius:
    358358sl.earth.mesh.r=sqrt(sl.earth.mesh.x.^2+sl.earth.mesh.y.^2+sl.earth.mesh.z.^2);
    359359
     
    373373md=sl.earth; %we don't do computations on ice sheets or land.
    374374
    375 %Materials: 
     375%Materials:
    376376md.materials=materials('hydro');
    377377
    378 %elastic loading from love numbers: 
     378%elastic loading from love numbers:
    379379md.solidearth.lovenumbers=lovenumbers('maxdeg',100);
    380 md.solidearth.settings.ocean_area_scaling = 0; 
     380md.solidearth.settings.ocean_area_scaling = 0;
    381381
    382382%Miscellaneous
     
    395395md.timestepping.time_step=1;
    396396
    397 %Physics: 
    398 md.transient.issmb=0; 
     397%Physics:
     398md.transient.issmb=0;
    399399md.transient.isstressbalance=0;
    400400md.transient.isthermal=0;
     
    402402md.transient.isslc=1;
    403403
    404 %Initializations: 
     404%Initializations:
    405405md.basalforcings.groundedice_melting_rate=zeros(md.mesh.numberofvertices,1);
    406406md.basalforcings.floatingice_melting_rate=zeros(md.mesh.numberofvertices,1);
  • issm/trunk-jpl/test/NightlyRun/test2004.py

    r26840 r27167  
    22#
    33# TODO:
    4 # - Save boundaries by name to some data structure with tag so that they can be 
    5 #   copied to basins that use identical shapefiles and projections (will need 
    6 #   to check if the cost of the additional structure, checks, and copying are 
     4# - Save boundaries by name to some data structure with tag so that they can be
     5#   copied to basins that use identical shapefiles and projections (will need
     6#   to check if the cost of the additional structure, checks, and copying are
    77#   greater than the cost of projecting).
    88#
     
    4141#HemisphereWest #{{{
    4242sl.addbasin(
    43     basin('continent', 'hemispherewest', 'name', 'hemispherewest', 'proj', laea(0, -90), 'boundaries', [ # Peru projection 3587
     43    basin('continent', 'hemispherewest', 'name', 'hemispherewest', 'proj', laea(0, -90), 'boundaries', [  # Peru projection 3587
    4444        boundary('shppath', shppath, 'shpfilename', 'HemisphereSplit', 'proj', proj4326, 'orientation', 'reverse'),
    4545        boundary('shppath', shppath, 'shpfilename', 'NorthAntarctica', 'proj', proj3031),
     
    4949        boundary('shppath', shppath, 'shpfilename', 'RonneWestSummit', 'proj', proj3031),
    5050        boundary('shppath', shppath, 'shpfilename', 'WestAntarctica2', 'proj', proj3031, 'orientation', 'reverse'),
    51         boundary('shppath', shppath, 'shpfilename', 'SouthAntarctica', 'proj', proj3031)
    52         ]
     51        boundary('shppath', shppath, 'shpfilename', 'SouthAntarctica', 'proj', proj3031)]
    5352    )
    5453)
     
    5958        boundary('shppath', shppath, 'shpfilename', 'SouthAntarctica', 'proj', proj3031),
    6059        boundary('shppath', shppath, 'shpfilename', 'RossIceShelf', 'proj', proj3031),
    61         boundary('shppath', shppath, 'shpfilename', 'RossWestFront','proj', proj3031),
    62         boundary('shppath', shppath, 'shpfilename', 'RossFront', 'proj', proj3031, 'orientation', 'reverse')
    63         ]
     60        boundary('shppath', shppath, 'shpfilename', 'RossWestFront', 'proj', proj3031),
     61        boundary('shppath', shppath, 'shpfilename', 'RossFront', 'proj', proj3031, 'orientation', 'reverse')]
    6462    )
    6563)
     
    6765#HemisphereEast: {{{
    6866sl.addbasin(
    69     basin('continent', 'hemisphereeast', 'name', 'hemisphereeast', 'proj', laea(0, +90), 'boundaries', [ #Australian projection lat, long
     67    basin('continent', 'hemisphereeast', 'name', 'hemisphereeast', 'proj', laea(0, +90), 'boundaries', [  #Australian projection lat, long
    7068        boundary('shppath', shppath, 'shpfilename', 'HemisphereSplit', 'proj', proj4326),
    7169        boundary('shppath', shppath, 'shpfilename', 'SouthAntarctica', 'proj', proj3031),
    72         boundary('shppath', shppath, 'shpfilename','RossFront', 'proj', proj3031),
     70        boundary('shppath', shppath, 'shpfilename', 'RossFront', 'proj', proj3031),
    7371        boundary('shppath', shppath, 'shpfilename', 'RossWestFront', 'proj', proj3031),
    74         boundary('shppath', shppath, 'shpfilename', 'EastAntarctica2', 'proj', proj3031,'orientation', 'reverse'),
    75         boundary('shppath', shppath, 'shpfilename', 'NorthAntarctica', 'proj', proj3031)
    76         ]
     72        boundary('shppath', shppath, 'shpfilename', 'EastAntarctica2', 'proj', proj3031, 'orientation', 'reverse'),
     73        boundary('shppath', shppath, 'shpfilename', 'NorthAntarctica', 'proj', proj3031)]
    7774    )
    7875)
     
    9087        boundary('shppath', shppath, 'shpfilename', 'RonneIceShelf', 'proj', proj3031),
    9188        boundary('shppath', shppath, 'shpfilename', 'RonneEastSummit', 'proj', proj3031),
    92         boundary('shppath', shppath, 'shpfilename', 'RonneBrunt', 'proj', proj3031)
    93         ]
     89        boundary('shppath', shppath, 'shpfilename', 'RonneBrunt', 'proj', proj3031)]
    9490    )
    9591)
     
    10197        boundary('shppath', shppath, 'shpfilename', 'RonneIceShelf', 'proj', proj3031),
    10298        boundary('shppath', shppath, 'shpfilename', 'RonneEastSummit', 'proj', proj3031),
    103         boundary('shppath', shppath, 'shpfilename', 'RonneFront', 'proj', proj3031, 'orientation', 'reverse')
    104         ]
     99        boundary('shppath', shppath, 'shpfilename', 'RonneFront', 'proj', proj3031, 'orientation', 'reverse')]
    105100    )
    106101)
     
    114109hmin = hmin * 1000
    115110hmax = hmax * 1000
    116 tolerance = 100 # tolerance of 100m on Earth position when merging 3d meshes
     111tolerance = 100  # tolerance of 100m on Earth position when merging 3d meshes
    117112threshold = 5
    118 defaultoptions = [
    119     'KeepVertices', 0,
    120     'MaxCornerAngle', 0.0000000001,
    121     'NoBoundaryRefinement', 1
    122 ]
     113defaultoptions = ['KeepVertices', 0,
     114                  'MaxCornerAngle', 0.0000000001,
     115                  'NoBoundaryRefinement', 1]
    123116alreadyloaded = 0
    124117#}}}
     
    134127
    135128    # Mesh
    136     md = bamg(model(), 'domain', domain, 'subdomains', coastline, 'hmin', hmin, 'hmax', hmax, *defaultoptions) # NOTE: Unpacking defaultoptions with '*'
     129    md = bamg(model(), 'domain', domain, 'subdomains', coastline, 'hmin', hmin, 'hmax', hmax, *defaultoptions)  # NOTE: Unpacking defaultoptions with '*'
    137130
    138131    # Miscellaneous
     
    254247    landelsconocean = landels[np.nonzero(sumconnectedisonocean)[0]]
    255248
    256     ind1 = np.hstack((
    257         md.mesh.elements[landelsconocean, 0],
    258         md.mesh.elements[landelsconocean, 1],
    259         md.mesh.elements[landelsconocean, 2]
    260     ))
    261     ind2 = np.hstack((
    262         md.mesh.elements[landelsconocean, 1],
    263         md.mesh.elements[landelsconocean, 2],
    264         md.mesh.elements[landelsconocean, 0]
    265     ))
     249    ind1 = np.hstack((md.mesh.elements[landelsconocean, 0],
     250                      md.mesh.elements[landelsconocean, 1],
     251                      md.mesh.elements[landelsconocean, 2]))
     252    ind2 = np.hstack((md.mesh.elements[landelsconocean, 1],
     253                      md.mesh.elements[landelsconocean, 2],
     254                      md.mesh.elements[landelsconocean, 0]))
    266255
    267256    # Edge ind1 and ind2
     
    325314        delHGLA = InterpFromMeshToMesh2d(index, longGLA, latGLA, delHGLA, longe, late)
    326315
    327         # NOTE: For some reason, cannot apply pos to multiple arrays in a 
    328         #       singlelike we might do in MATLAB. Instead, we iterate over 
     316        # NOTE: For some reason, cannot apply pos to multiple arrays in a
     317        #       singlelike we might do in MATLAB. Instead, we iterate over
    329318        #       elements of pos.
    330319        #
     
    461450md.solidearth.settings.rotation = 0
    462451md.solidearth.settings.viscous = 0
    463 md.solidearth.requested_outputs = [
    464     'default',
    465     'DeltaIceThickness',
    466     'Sealevel',
    467     'Bed',
    468     'SealevelBarystaticIceMask',
    469     'SealevelBarystaticOceanMask',
    470 ]
     452md.solidearth.requested_outputs = ['default',
     453                                   'DeltaIceThickness',
     454                                   'Sealevel',
     455                                   'Bed',
     456                                   'SealevelBarystaticIceMask',
     457                                   'SealevelBarystaticOceanMask']
    471458md = solve(md, 'Transient')
    472459Seustatic = md.results.TransientSolution.Sealevel
  • issm/trunk-jpl/test/NightlyRun/test243.py

    r26271 r27167  
    22from socket import gethostname
    33import sys
    4 
    54import numpy as np
    6 
    75from model import *
    86from parameterize import *
     
    4442
    4543#smb settings
    46 md.smb.requested_outputs = [
    47         'SmbDz','SmbT','SmbD','SmbRe','SmbGdn','SmbGsp','SmbEC',
    48         'SmbA','SmbMassBalance','SmbMAdd','SmbDzAdd','SmbFAC','SmbMeanSHF','SmbMeanLHF',
    49         'SmbMeanULW','SmbNetLW','SmbNetSW','SmbWAdd','SmbRunoff','SmbRefreeze','SmbMelt',
    50         'SmbEC','SmbPrecipitation','SmbRain','SmbAccumulatedMassBalance','SmbAccumulatedRunoff',
    51         'SmbAccumulatedMelt','SmbAccumulatedEC','SmbAccumulatedPrecipitation','SmbAccumulatedRain',
    52         'SmbAccumulatedPrecipitation','SmbAccumulatedRefreeze'
    53     ]
     44md.smb.requested_outputs = ['SmbDz','SmbT','SmbD','SmbRe','SmbGdn','SmbGsp','SmbEC',
     45                            'SmbA','SmbMassBalance','SmbMAdd','SmbDzAdd','SmbFAC','SmbMeanSHF','SmbMeanLHF',
     46                            'SmbMeanULW','SmbNetLW','SmbNetSW','SmbWAdd','SmbRunoff','SmbRefreeze','SmbMelt',
     47                            'SmbEC','SmbPrecipitation','SmbRain','SmbAccumulatedMassBalance','SmbAccumulatedRunoff',
     48                            'SmbAccumulatedMelt','SmbAccumulatedEC','SmbAccumulatedPrecipitation','SmbAccumulatedRain',
     49                            'SmbAccumulatedPrecipitation','SmbAccumulatedRefreeze']
    5450
    5551#only run smb core:
     
    7268
    7369#Fields and tolerances to track changes
    74 field_names = ['Layers','SmbDz','SmbT','SmbD','SmbRe','SmbGdn','SmbGsp','SmbA' ,'SmbEC','SmbMassBalance','SmbMAdd','SmbDzAdd','SmbFAC','SmbMeanSHF','SmbMeanLHF','SmbMeanULW','SmbNetLW','SmbNetSW','SmbAccumulatedMassBalance','SmbAccumulatedRunoff','SmbAccumulatedMelt','SmbAccumulatedEC','SmbAccumulatedPrecipitation','SmbAccumulatedRain','SmbAccumulatedRefreeze','SmbRunoff','SmbMelt','SmbEC','SmbPrecipitation','SmbRain','SmbRefreeze','SmbWAdd']
     70field_names = ['Layers', 'SmbDz', 'SmbT', 'SmbD', 'SmbRe', 'SmbGdn', 'SmbGsp', 'SmbA', 'SmbEC', 'SmbMassBalance', 'SmbMAdd', 'SmbDzAdd', 'SmbFAC', 'SmbMeanSHF', 'SmbMeanLHF', 'SmbMeanULW', 'SmbNetLW', 'SmbNetSW', 'SmbAccumulatedMassBalance', 'SmbAccumulatedRunoff', 'SmbAccumulatedMelt', 'SmbAccumulatedEC', 'SmbAccumulatedPrecipitation', 'SmbAccumulatedRain', 'SmbAccumulatedRefreeze', 'SmbRunoff', 'SmbMelt', 'SmbEC', 'SmbPrecipitation', 'SmbRain', 'SmbRefreeze', 'SmbWAdd']
    7571field_tolerances = [1e-12, 2e-12, 1e-12, 2e-11, 1e-11, 2e-11, 1e-11, 1e-12, 1e-11, 1e-12, 1e-12, 1e-12, 1e-11, 2e-11, 2e-11, 1e-11, 9e-10, 2e-11, 1e-11, 9e-10, 2e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11, 1e-11]
    7672
  • issm/trunk-jpl/test/NightlyRun/test252.py

    r26897 r27167  
    7979               'SmbDz3', 'SmbT3', 'SmbD3', 'SmbRe3', 'SmbGdn3', 'SmbGsp3', 'SmbA3', 'SmbEC3', 'SmbMassBalance3', 'SmbMAdd3', 'SmbDzAdd3', 'SmbFAC3',
    8080               'SmbDz4', 'SmbT4', 'SmbD4', 'SmbRe4', 'SmbGdn4', 'SmbGsp4', 'SmbA4', 'SmbEC4', 'SmbMassBalance4', 'SmbMAdd4', 'SmbDzAdd4', 'SmbFAC4']
    81 field_tolerances = [
    82     1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,
    83     1e-12,1e-12,1e-11,1e-10,2e-11,1e-11,1e-12,1e-11,1e-12,1e-12,1e-12,1e-11,
    84     1e-12,1e-12,2e-12,2e-11,4e-11,1e-11,1e-12,1e-11,1e-11,1e-12,1e-12,1e-11,
    85     1e-11,1e-11,4e-11,4e-11,1e-12,4e-11,1e-12,3e-12,1e-10,1e-12,1e-12,2e-11
    86 ]
     81field_tolerances = [1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12, 1e-12,
     82                    1e-12, 1e-12, 1e-11, 1e-10, 2e-11, 1e-11, 1e-12, 1e-11, 1e-12, 1e-12, 1e-12, 1e-11,
     83                    1e-12, 1e-12, 2e-12, 2e-11, 4e-11, 1e-11, 1e-12, 1e-11, 1e-11, 1e-12, 1e-12, 1e-11,
     84                    1e-11, 1e-11, 4e-11, 4e-11, 1e-12, 4e-11, 1e-12, 3e-12, 1e-10, 1e-12, 1e-12, 2e-11]
    8785# Shape is different in python solution (fixed using reshape) which can cause test failure
    88 field_values = [
    89     nlayers,
    90     md.results.TransientSolution[0].SmbDz[0, 0:nlayers].reshape(1, -1),
    91     md.results.TransientSolution[0].SmbT[0, 0:nlayers].reshape(1, -1),
    92     md.results.TransientSolution[0].SmbD[0, 0:nlayers].reshape(1, -1),
    93     md.results.TransientSolution[0].SmbRe[0, 0:nlayers].reshape(1, -1),
    94     md.results.TransientSolution[0].SmbGdn[0, 0:nlayers].reshape(1, -1),
    95     md.results.TransientSolution[0].SmbGsp[0, 0:nlayers].reshape(1, -1),
    96     md.results.TransientSolution[0].SmbA[0, 0:nlayers].reshape(1, -1),
    97     md.results.TransientSolution[0].SmbEC[0],
    98     md.results.TransientSolution[0].SmbMassBalance[0],
    99     md.results.TransientSolution[0].SmbMAdd[0],
    100     md.results.TransientSolution[0].SmbDzAdd[0],
    101     md.results.TransientSolution[0].SmbFAC[0],
    102     md.results.TransientSolution[145].SmbDz[0, 0:nlayers].reshape(1, -1),
    103     md.results.TransientSolution[145].SmbT[0, 0:nlayers].reshape(1, -1),
    104     md.results.TransientSolution[145].SmbD[0, 0:nlayers].reshape(1, -1),
    105     md.results.TransientSolution[145].SmbRe[0, 0:nlayers].reshape(1, -1),
    106     md.results.TransientSolution[145].SmbGdn[0, 0:nlayers].reshape(1, -1),
    107     md.results.TransientSolution[145].SmbGsp[0, 0:nlayers].reshape(1, -1),
    108     md.results.TransientSolution[145].SmbA[0, 0:nlayers].reshape(1, -1),
    109     md.results.TransientSolution[145].SmbEC[0],
    110     md.results.TransientSolution[145].SmbMassBalance[0],
    111     md.results.TransientSolution[145].SmbMAdd[0],
    112     md.results.TransientSolution[145].SmbDzAdd[0],
    113     md.results.TransientSolution[145].SmbFAC[0],
    114     md.results.TransientSolution[146].SmbDz[0, 0:nlayers].reshape(1, -1),
    115     md.results.TransientSolution[146].SmbT[0, 0:nlayers].reshape(1, -1),
    116     md.results.TransientSolution[146].SmbD[0, 0:nlayers].reshape(1, -1),
    117     md.results.TransientSolution[146].SmbRe[0, 0:nlayers].reshape(1, -1),
    118     md.results.TransientSolution[146].SmbGdn[0, 0:nlayers].reshape(1, -1),
    119     md.results.TransientSolution[146].SmbGsp[0, 0:nlayers].reshape(1, -1),
    120     md.results.TransientSolution[146].SmbA[0, 0:nlayers].reshape(1, -1),
    121     md.results.TransientSolution[146].SmbEC[0],
    122     md.results.TransientSolution[146].SmbMassBalance[0],
    123     md.results.TransientSolution[146].SmbMAdd[0],
    124     md.results.TransientSolution[146].SmbDzAdd[0],
    125     md.results.TransientSolution[146].SmbFAC[0],
    126     md.results.TransientSolution[-1].SmbDz[0, 0:nlayers].reshape(1, -1),
    127     md.results.TransientSolution[-1].SmbT[0, 0:nlayers].reshape(1, -1),
    128     md.results.TransientSolution[-1].SmbD[0, 0:nlayers].reshape(1, -1),
    129     md.results.TransientSolution[-1].SmbRe[0, 0:nlayers].reshape(1, -1),
    130     md.results.TransientSolution[-1].SmbGdn[0, 0:nlayers].reshape(1, -1),
    131     md.results.TransientSolution[-1].SmbGsp[0, 0:nlayers].reshape(1, -1),
    132     md.results.TransientSolution[-1].SmbA[0, 0:nlayers].reshape(1, -1),
    133     md.results.TransientSolution[-1].SmbEC[0],
    134     md.results.TransientSolution[-1].SmbMassBalance[0],
    135     md.results.TransientSolution[-1].SmbMAdd[0],
    136     md.results.TransientSolution[-1].SmbDzAdd[0],
    137     md.results.TransientSolution[-1].SmbFAC[0]
    138 ]
     86field_values = [nlayers,
     87                md.results.TransientSolution[0].SmbDz[0, 0:nlayers].reshape(1, -1),
     88                md.results.TransientSolution[0].SmbT[0, 0:nlayers].reshape(1, -1),
     89                md.results.TransientSolution[0].SmbD[0, 0:nlayers].reshape(1, -1),
     90                md.results.TransientSolution[0].SmbRe[0, 0:nlayers].reshape(1, -1),
     91                md.results.TransientSolution[0].SmbGdn[0, 0:nlayers].reshape(1, -1),
     92                md.results.TransientSolution[0].SmbGsp[0, 0:nlayers].reshape(1, -1),
     93                md.results.TransientSolution[0].SmbA[0, 0:nlayers].reshape(1, -1),
     94                md.results.TransientSolution[0].SmbEC[0],
     95                md.results.TransientSolution[0].SmbMassBalance[0],
     96                md.results.TransientSolution[0].SmbMAdd[0],
     97                md.results.TransientSolution[0].SmbDzAdd[0],
     98                md.results.TransientSolution[0].SmbFAC[0],
     99                md.results.TransientSolution[145].SmbDz[0, 0:nlayers].reshape(1, -1),
     100                md.results.TransientSolution[145].SmbT[0, 0:nlayers].reshape(1, -1),
     101                md.results.TransientSolution[145].SmbD[0, 0:nlayers].reshape(1, -1),
     102                md.results.TransientSolution[145].SmbRe[0, 0:nlayers].reshape(1, -1),
     103                md.results.TransientSolution[145].SmbGdn[0, 0:nlayers].reshape(1, -1),
     104                md.results.TransientSolution[145].SmbGsp[0, 0:nlayers].reshape(1, -1),
     105                md.results.TransientSolution[145].SmbA[0, 0:nlayers].reshape(1, -1),
     106                md.results.TransientSolution[145].SmbEC[0],
     107                md.results.TransientSolution[145].SmbMassBalance[0],
     108                md.results.TransientSolution[145].SmbMAdd[0],
     109                md.results.TransientSolution[145].SmbDzAdd[0],
     110                md.results.TransientSolution[145].SmbFAC[0],
     111                md.results.TransientSolution[146].SmbDz[0, 0:nlayers].reshape(1, -1),
     112                md.results.TransientSolution[146].SmbT[0, 0:nlayers].reshape(1, -1),
     113                md.results.TransientSolution[146].SmbD[0, 0:nlayers].reshape(1, -1),
     114                md.results.TransientSolution[146].SmbRe[0, 0:nlayers].reshape(1, -1),
     115                md.results.TransientSolution[146].SmbGdn[0, 0:nlayers].reshape(1, -1),
     116                md.results.TransientSolution[146].SmbGsp[0, 0:nlayers].reshape(1, -1),
     117                md.results.TransientSolution[146].SmbA[0, 0:nlayers].reshape(1, -1),
     118                md.results.TransientSolution[146].SmbEC[0],
     119                md.results.TransientSolution[146].SmbMassBalance[0],
     120                md.results.TransientSolution[146].SmbMAdd[0],
     121                md.results.TransientSolution[146].SmbDzAdd[0],
     122                md.results.TransientSolution[146].SmbFAC[0],
     123                md.results.TransientSolution[-1].SmbDz[0, 0:nlayers].reshape(1, -1),
     124                md.results.TransientSolution[-1].SmbT[0, 0:nlayers].reshape(1, -1),
     125                md.results.TransientSolution[-1].SmbD[0, 0:nlayers].reshape(1, -1),
     126                md.results.TransientSolution[-1].SmbRe[0, 0:nlayers].reshape(1, -1),
     127                md.results.TransientSolution[-1].SmbGdn[0, 0:nlayers].reshape(1, -1),
     128                md.results.TransientSolution[-1].SmbGsp[0, 0:nlayers].reshape(1, -1),
     129                md.results.TransientSolution[-1].SmbA[0, 0:nlayers].reshape(1, -1),
     130                md.results.TransientSolution[-1].SmbEC[0],
     131                md.results.TransientSolution[-1].SmbMassBalance[0],
     132                md.results.TransientSolution[-1].SmbMAdd[0],
     133                md.results.TransientSolution[-1].SmbDzAdd[0],
     134                md.results.TransientSolution[-1].SmbFAC[0]]
Note: See TracChangeset for help on using the changeset viewer.