Changeset 25682


Ignore:
Timestamp:
10/12/20 14:15:14 (4 years ago)
Author:
jdquinn
Message:

CHG: MATLAB -> Python

File:
1 edited

Legend:

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

    r25023 r25682  
    11import numpy as np
     2
     3from checkfield import checkfield
    24from fielddisplay import fielddisplay
    3 from checkfield import checkfield
    45from WriteData import WriteData
    56
    67
    78class hydrologyglads(object):
    8     """
    9     HydrologyGlaDSclass definition
     9    """HYDROLOGYGLADS class definition
    1010
    1111    Usage:
    12       hydrologyglads = hydrologyglads()
     12        hydrologyglads = hydrologyglads()
    1313    """
    1414
     
    101101        md = checkfield(md, 'fieldname', 'hydrology.spcphi', 'Inf', 1, 'timeseries', 1)
    102102        md = checkfield(md, 'fieldname', 'hydrology.englacial_void_ratio', 'numel', [1], '>=', 0)
    103         md = checkfield(md, 'fieldname', 'hydrology.moulin_input', 'size', [md.mesh.numberofvertices], '>=', 0, 'NaN', 1, 'Inf', 1)
     103        md = checkfield(md, 'fieldname', 'hydrology.moulin_input', '>=', 0, 'timeseries', 1, 'NaN', 1, 'Inf', 1)
    104104        md = checkfield(md, 'fieldname', 'hydrology.neumannflux', 'timeseries', 1, 'NaN', 1, 'Inf', 1)
    105105        md = checkfield(md, 'fieldname', 'hydrology.requested_outputs', 'stringrow', 1)
     
    128128        WriteData(fid, prefix, 'object', self, 'class', 'hydrology', 'fieldname', 'spcphi', 'format', 'DoubleMat', 'mattype', 1, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', yts)
    129129        WriteData(fid, prefix, 'object', self, 'class', 'hydrology', 'fieldname', 'neumannflux', 'format', 'DoubleMat', 'mattype', 2, 'timeserieslength', md.mesh.numberofelements + 1, 'yts', yts)
    130         WriteData(fid, prefix, 'object', self, 'class', 'hydrology', 'fieldname', 'moulin_input', 'format', 'DoubleMat', 'mattype', 1)
     130        WriteData(fid, prefix, 'object', self, 'class', 'hydrology', 'fieldname', 'moulin_input', 'format', 'DoubleMat', 'mattype', 1, 'scale', 1. / yts, 'timeserieslength', md.mesh.numberofvertices + 1, 'yts', md.constants.yts)
    131131        WriteData(fid, prefix, 'object', self, 'class', 'hydrology', 'fieldname', 'englacial_void_ratio', 'format', 'Double')
    132132        WriteData(fid, prefix, 'object', self, 'class', 'hydrology', 'fieldname', 'melt_flag', 'format', 'Boolean')
Note: See TracChangeset for help on using the changeset viewer.