Changeset 22204


Ignore:
Timestamp:
10/31/17 16:17:26 (7 years ago)
Author:
dlcheng
Message:

CHG: Adding Nathan's frictionwaterlayer.py and committing a fix for WriteData.py when marshalling yts/timestep fields.

Location:
issm/trunk-jpl/src/m
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/Makefile.am

    r22098 r22204  
    6565                                        ${ISSM_DIR}/src/m/mesh/*.py \
    6666                                        ${ISSM_DIR}/src/m/mesh/rifts/*.py \
     67                                        ${ISSM_DIR}/src/m/mesh/planet/gmsh/*.py \
    6768                                        ${ISSM_DIR}/src/m/miscellaneous/*.py \
    6869                                        ${ISSM_DIR}/src/m/modules/*.py \
  • issm/trunk-jpl/src/m/solve/WriteData.py

    r22133 r22204  
    4444                data=np.array(data)
    4545                scale = options.getfieldvalue('scale')
    46                 if np.size(data) > 1 :
    47                         if np.size(data,0)==timeserieslength:
    48                                 data[0:-1,:] = scale*data[0:-1,:]
    49                         else:
    50                                 data  = scale*data
     46                if np.size(data) > 1 and np.ndim(data) > 1 and np.size(data,0)==timeserieslength:
     47                        data[0:-1,:] = scale*data[0:-1,:]
    5148                else:
    5249                        data  = scale*data
    53         if np.size(data) > 1 :
    54                 if np.size(data,0)==timeserieslength:
    55                         yts = options.getfieldvalue('yts')
    56                         data[-1,:] = yts*data[-1,:]
     50        if np.size(data) > 1 and np.size(data,0)==timeserieslength:
     51                yts = options.getfieldvalue('yts')
     52                if np.ndim(data) > 1:
     53                        data[-1,:] = data[-1,:]*yts
     54                else:
     55                        data[-1] = data[-1]*yts
    5756
    5857        #Step 1: write the enum to identify this record uniquely
Note: See TracChangeset for help on using the changeset viewer.