Changeset 28012


Ignore:
Timestamp:
11/15/23 12:02:47 (17 months ago)
Author:
Mathieu Morlighem
Message:

merged trunk and trunk-jpl

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl

  • issm/trunk-jpl/externalpackages/geocode/geoCode.m

    r25042 r28012  
    1515
    1616% Copyright(c) 2012, Stuart P. Layton <stuart.layton@gmail.com>
    17 % http://stuartlayton.com
     17% https://stuartlayton.com
    1818%
    1919% Revision History
     
    4646switch lower(service)
    4747    case('google')
    48         SERVER_URL = 'http://maps.google.com';
     48        SERVER_URL = 'https://maps.google.com';
    4949        queryUrl = sprintf('%s/maps/geo?output=xml&q=%s',SERVER_URL, address);
    5050        parseFcn = @parseGoogleMapsXML;
     
    5252    case('yahoo')
    5353     
    54         SERVER_URL = 'http://where.yahooapis.com/geocode';
     54        SERVER_URL = 'https://where.yahooapis.com/geocode';
    5555        queryUrl = sprintf('%s?location=%s',SERVER_URL, address);
    5656       
     
    6767    case {'osm', 'openstreetmaps', 'open street maps'}
    6868       
    69                 SERVER_URL = 'https://nominatim.openstreetmap.org/search';
     69        SERVER_URL = 'https://nominatim.openstreetmap.org/search';
    7070        queryUrl = sprintf('%s?format=xml&q=%s', SERVER_URL, address);
    7171        parseFcn = @parseOpenStreetMapXML;
  • issm/trunk-jpl/externalpackages/geocode/install.sh

    r20075 r28012  
    11#/bin/bash
    22unzip geoCode.zip
     3sed -i -e 's/http:/https:/g' geoCode.m
  • issm/trunk-jpl/externalpackages/hdf5/install-1-parallel-with_tests.sh

    r27973 r28012  
    55## Constants
    66#
    7 VER="1.10.9"
     7VER="1.14.0"
    88
    99PREFIX="${ISSM_DIR}/externalpackages/hdf5/install" # Set to location where external package should be installed
  • issm/trunk-jpl/externalpackages/hdf5/install-1-parallel.sh

    r27973 r28012  
    55## Constants
    66#
    7 VER="1.10.9"
     7VER="1.14.0"
    88
    99PREFIX="${ISSM_DIR}/externalpackages/hdf5/install" # Set to location where external package should be installed
  • issm/trunk-jpl/externalpackages/hdf5/install-1-with_tests.sh

    r27973 r28012  
    55## Constants
    66#
    7 VER="1.10.9"
     7VER="1.14.0"
    88
    99PREFIX="${ISSM_DIR}/externalpackages/hdf5/install" # Set to location where external package should be installed
  • issm/trunk-jpl/externalpackages/hdf5/install-1.sh

    r27973 r28012  
    55## Constants
    66#
    7 VER="1.10.9"
     7VER="1.14.0"
    88
    99PREFIX="${ISSM_DIR}/externalpackages/hdf5/install" # Set to location where external package should be installed
  • issm/trunk-jpl/src

  • issm/trunk-jpl/src/m/classes/stressbalance.py

    r27451 r28012  
    3030        self.isnewton = 0
    3131        self.FSreconditioning = 0
    32         self.icefront = np.nan
     32        #self.icefront = np.nan -- no longer in use
    3333        self.maxiter = 0
    3434        self.shelf_dampening = 0
     
    5858        s += '{}\n'.format(fielddisplay(self, 'spcvy', 'y-axis velocity constraint (NaN means no constraint) [m / yr]'))
    5959        s += '{}\n'.format(fielddisplay(self, 'spcvz', 'z-axis velocity constraint (NaN means no constraint) [m / yr]'))
    60         s += '{}\n'.format(fielddisplay(self, 'icefront', 'segments on ice front list (last column 0: Air, 1: Water, 2: Ice'))
     60        #s += '{}\n'.format(fielddisplay(self, 'icefront', 'segments on ice front list (last column 0: Air, 1: Water, 2: Ice'))
    6161        s += '      MOLHO boundary conditions:\n'
    6262        s += '{}\n'.format(fielddisplay(self, 'spcvx_base', 'x-axis basal velocity constraint (NaN means no constraint) [m / yr]'))
  • issm/trunk-jpl/src/m/contrib/musselman/README.txt

    r27889 r28012  
    55To save a model, call either write_netCDF.py or write_netCDF.m depending on whether your class is in matlab or python.
    66To read a saved model, call either read_netCDF.py or read_netCDF.m depending on what language you prefer to use the model in.
    7 If you would like to log the names and locations of variables being stored, add the argument verbose = True (verbose = true for matlab).
    87
    98Usage Instructions:
     
    1514            md = bamg(model(), foo.csv, .01)
    1615
    17             write_netCDF(md, 'adress_to_save/../filename.nc')           
     16            write_netCDF(md, 'md', 'adress_to_save/../filename.nc')
    1817
    1918        - Reading a model:
     
    2221            md = read_netCDF('adress_to_file/../filename.nc')
    2322
    24         Verbose examples:
    25             write_netCDF(md, adress_to_save/../filename.nc, verbose = True)
    26             md = read_netCDF(adress_to_file/../filename.nc, verbose = True)
     23    MATLAB:
     24        - Saving a model:
     25            import write_netCDF
    2726
    28     MATLAB:
    29         - Saving a model:
    30 
    31             write_netCDF(md, adress_to_save/../filename.nc);
     27            write_netCDF(md, adress_to_save/../filename.nc)
    3228
    3329        - Reading a model:
     30            import read_netCDF
    3431
    35             md = read_netCDF(adress_to_file/../filename.nc);
     32            md = read_netCDF(adress_to_file/../filename.nc)
    3633
    37         Verbose examples:
    38             write_netCDF(md, adress_to_save/../filename.nc, verbose = true);
    39            
    40           or:
    4134
    42             write_netCDF(md, adress_to_save/../filename.nc, verbose);
    43             md = read_netCDF(adress_to_file/../filename.nc, verbose = true);
    4435
    4536Dependencies:
    4637    Python:
    4738        - NumPy
    48         - NetCDF4 / NetCDF4.Dataset
     39        - NetCDF4.Dataset
    4940        - The model() class
    50         - results.solution / results.solutionstep / results.resultsdakota
    51         - inversion.inversion / inversion.m1qn3inversion / inversion.taoinversion
    5241
    5342    MATLAB:
    5443        - The model() class
    55         - inversion.inversion / inversion.m1qn3inversion / inversion.taoinversion
    5644
    5745
     
    5947
    6048There are currently datatypes that both write_netCDF and read_netCDF modules may not be able to handle. These datatypes might
    61 include lists with multiple datatypes (ie, ['number', 1, 'letter', a, 'color', 'blue']), lists of dicts ect.
     49include dictionaries with multiple value datatypes, lists with multiple datatypes, lists of dicts ect.
    6250
    6351To add functionality for these additional cases, one must simply create a function to handle the case and call it using a
    6452conditional case within the create_var() function. To read the data from the NetCDF4 file, add the case to the
    65 copy_variable_data_to_new_model() function in read_netCDF so that the data can be added to a new model() instance.
    66 
    67 Known issues:
    68 
    69 Unlike Python, MATLAB doesn't utilize subclasses in its model class. This leads to a loss of certain subclass instances.
    70 For instance, the results.solutionstep() class poses a known issue. In MATLAB, there's no direct equivalent. The fields in
    71 'md.results' in MATLAB might correspond to instances of resultsdakota(), solution(), or solutionstep() in Python, but
    72 because those classes don't exist in MATLAB, there is no way for python to know which instance it needs.
    73 
    74 The current workaround, while not theoretically sound, involves searching for the class name string in MATLAB's 'results'
    75 field names. For instance, 'md.results.TransientSolution' is recorded as a solution() class instance. However, problems arise
    76 in cases like 'md.results.StressbalanceSolution', where the code notes a solution() instance, while in Python, it should be a
    77 solutionstep() instance.
    78 
    79 So far, there have been no recorded problems swapping a solutionstep() instance for a solution() instance.
    80 
    81 Potential solutions are:
    82 
    83     - Restructure both Python and MATLAB solve frameworks. In Python, when creating an md.results.<solutionstep()> instance,
    84     embed 'solutionstep' in the class instance name.
    85         >> This solution is very involved, and would include the tedious modification of >5 files in total
    86     - Create a hash table linking solutions with their corresponding 'md.results.<class>' for reference when saving models to
    87     the netCDF file.
     53copy_variable_data_to_new_model() function so that the data can be added to a new model() instance.
Note: See TracChangeset for help on using the changeset viewer.