Changeset 25385


Ignore:
Timestamp:
08/12/20 11:02:04 (5 years ago)
Author:
schlegel
Message:

NEW: add p1p2 pdd test in python

Location:
issm/trunk-jpl
Files:
2 added
4 edited

Legend:

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

    r25382 r25385  
    8989            self.temperatures_reconstructed = project3d(md, 'vector', self.temperatures_reconstructed, 'type', 'node')
    9090        if self.isprecipscaled == 0:
    91             self.temperatures_reconstructed = project3d(md, 'vector', self.precipitations_reconstructed, 'type', 'node')
    92         if self.isd18opd:
    93             self.precipitations_presentday = project3d(md, 'vector', self.precipitations_presentday, 'type', 'node')
     91            self.precipitations_reconstructed = project3d(md, 'vector', self.precipitations_reconstructed, 'type', 'node')
    9492        self.s0p = project3d(md, 'vector', self.s0p, 'type', 'node')
    9593        self.s0t = project3d(md, 'vector', self.s0t, 'type', 'node')
  • issm/trunk-jpl/src/m/classes/initialization.py

    r25026 r25385  
    104104            md = checkfield(md, 'fieldname', 'initialization.vx', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices])
    105105            md = checkfield(md, 'fieldname', 'initialization.vy', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices])
    106             md = checkfield(md, 'fieldname', 'initialization.temperature', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices])
     106            md = checkfield(md, 'fieldname', 'initialization.temperature', 'NaN', 1, 'Inf', 1, 'size', 'universal')
    107107            if md.mesh.dimension() == 3:
    108108                md = checkfield(md, 'fieldname', 'initialization.vz', 'NaN', 1, 'Inf', 1, 'size', [md.mesh.numberofvertices])
  • issm/trunk-jpl/src/m/classes/matice.py

    r25170 r25385  
    124124            md = checkfield(md, 'fieldname', 'materials.rho_freshwater', '>', 0)
    125125            md = checkfield(md, 'fieldname', 'materials.mu_water', '>', 0)
    126             md = checkfield(md, 'fieldname', 'materials.rheology_B', '>', 0, 'timeseries', 1, 'NaN', 1, 'Inf', 1)
     126            md = checkfield(md, 'fieldname', 'materials.rheology_B', '>', 0, 'universal', 1, 'NaN', 1, 'Inf', 1)
    127127            md = checkfield(md, 'fieldname', 'materials.rheology_n', '>', 0, 'size', [md.mesh.numberofelements])
    128128            md = checkfield(md, 'fieldname', 'materials.rheology_law', 'values', ['None', 'BuddJacka', 'Cuffey', 'CuffeyTemperate', 'Paterson', 'Arrhenius', 'LliboutryDuval', 'NyeCO2', 'NyeH2O'])
  • issm/trunk-jpl/src/m/consistency/checkfield.py

    r25169 r25385  
    8484                #Uniform field
    8585                if (np.size(field, 0) == 1):
    86                     if (np.shape(field)[1] != 1):
     86                    if (np.ndim(field) > 1 and np.shape(field)[1] != 1):
    8787                        md = md.checkmessage(options.getfieldvalue('message', "field '{}' is not supported".format(fieldname)))
    8888
    8989                #vertex oriented input, only one column allowed
    9090                elif (np.shape(field)[0] == md.mesh.numberofvertices):
    91                     if (np.shape(field)[1] != 1):
     91                    if (np.ndim(field) > 1 and np.shape(field)[1] != 1):
    9292                        md = md.checkmessage(options.getfieldvalue('message', "field '{}' is not supported".format(fieldname)))
    9393
     
    9999                #vertex time series
    100100                elif (np.shape(field)[0] == md.mesh.numberofvertices + 1):
    101                     if (np.shape(field)[1] <= 1):
     101                    if (np.ndim(field) > 1 and np.shape(field)[1] <= 1):
    102102                        md = md.checkmessage(options.getfieldvalue('message', "field '{}' is not supported".format(fieldname)))
    103103
    104104                #element time series
    105105                elif (np.shape(field)[0] == md.mesh.numberofelements + 1):
    106                     if (np.shape(field)[1] <= 1):
     106                    if (np.ndim(field) > 1 and np.shape(field)[1] <= 1):
    107107                        md = md.checkmessage(options.getfieldvalue('message', "field '{}' is not supported".format(fieldname)))
    108108
Note: See TracChangeset for help on using the changeset viewer.