Ignore:
Timestamp:
08/25/20 00:32:13 (5 years ago)
Author:
jdquinn
Message:

CHG: Saving chnages so that Basile has access to potential fix to solidearthmodel class

Location:
issm/trunk-jpl/src/m/io
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/io/loadmodel.m

    r13007 r25455  
    11function varargout=loadmodel(path)
    2 %LOADMODEL - load a model using built-in load module
     2%LOADMODEL - load a model using built-in load module 
    33%
    44%   check that model prototype has not changed. if so, adapt to new model prototype.
  • issm/trunk-jpl/src/m/io/loadmodel.py

    r25346 r25455  
    11from loadvars import loadvars
    2 #hack to keep python 2 compatipility
     2# Hack to keep python 2 compatibility
    33try:
    4     #py3 import
    5     from dbm import whichdb
     4    from dbm import whichdb # Python 3
    65except ImportError:
    7     #py2 import
    8     from whichdb import whichdb
     6    from whichdb import whichdb # Python 2
     7
    98from netCDF4 import Dataset
    109
    1110
    1211def loadmodel(path, onlylast=False):
    13     """
    14     LOADMODEL - load a model using built - in load module
     12    """LOADMODEL - load a model
    1513
    16        check that model prototype has not changed. if so, adapt to new model prototype.
     14    Check that model prototype has not changed: if if has, adapt to new model prototype.
    1715
    18        Usage:
    19           md = loadmodel(path)
     16    Usage:
     17        md = loadmodel(path)
    2018    """
    2119
  • issm/trunk-jpl/src/m/io/loadvars.py

    r25346 r25455  
    11from collections import OrderedDict
     2# Hack to keep python 2 compatibility
     3try:
     4    from dbm import whichdb # Python 3
     5except ImportError:
     6    from whichdb import whichdb # Python 2
     7from re import findall
     8import shelve
     9
    210from netCDF4 import Dataset
    311import numpy as np
    4 from re import findall
    5 import shelve
    612
    713from model import *
    8 #hack to keep python 2 compatibility
    9 try:
    10     #py3 import
    11     from dbm import whichdb
    12 except ImportError:
    13     #py2 import
    14     from whichdb import whichdb
    1514
    1615
    1716def loadvars(*args, **kwargs):
    18     """
    19     LOADVARS - function to load variables from a file.
     17    """LOADVARS - function to load variables from a file
    2018
    2119    This function loads one or more variables from a file. The names of the
Note: See TracChangeset for help on using the changeset viewer.