Changeset 28012
- Timestamp:
- 11/15/23 12:02:47 (17 months ago)
- 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 15 15 16 16 % Copyright(c) 2012, Stuart P. Layton <stuart.layton@gmail.com> 17 % http ://stuartlayton.com17 % https://stuartlayton.com 18 18 % 19 19 % Revision History … … 46 46 switch lower(service) 47 47 case('google') 48 SERVER_URL = 'http ://maps.google.com';48 SERVER_URL = 'https://maps.google.com'; 49 49 queryUrl = sprintf('%s/maps/geo?output=xml&q=%s',SERVER_URL, address); 50 50 parseFcn = @parseGoogleMapsXML; … … 52 52 case('yahoo') 53 53 54 SERVER_URL = 'http ://where.yahooapis.com/geocode';54 SERVER_URL = 'https://where.yahooapis.com/geocode'; 55 55 queryUrl = sprintf('%s?location=%s',SERVER_URL, address); 56 56 … … 67 67 case {'osm', 'openstreetmaps', 'open street maps'} 68 68 69 69 SERVER_URL = 'https://nominatim.openstreetmap.org/search'; 70 70 queryUrl = sprintf('%s?format=xml&q=%s', SERVER_URL, address); 71 71 parseFcn = @parseOpenStreetMapXML; -
issm/trunk-jpl/externalpackages/geocode/install.sh
r20075 r28012 1 1 #/bin/bash 2 2 unzip geoCode.zip 3 sed -i -e 's/http:/https:/g' geoCode.m -
issm/trunk-jpl/externalpackages/hdf5/install-1-parallel-with_tests.sh
r27973 r28012 5 5 ## Constants 6 6 # 7 VER="1.1 0.9"7 VER="1.14.0" 8 8 9 9 PREFIX="${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 5 5 ## Constants 6 6 # 7 VER="1.1 0.9"7 VER="1.14.0" 8 8 9 9 PREFIX="${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 5 5 ## Constants 6 6 # 7 VER="1.1 0.9"7 VER="1.14.0" 8 8 9 9 PREFIX="${ISSM_DIR}/externalpackages/hdf5/install" # Set to location where external package should be installed -
issm/trunk-jpl/externalpackages/hdf5/install-1.sh
r27973 r28012 5 5 ## Constants 6 6 # 7 VER="1.1 0.9"7 VER="1.14.0" 8 8 9 9 PREFIX="${ISSM_DIR}/externalpackages/hdf5/install" # Set to location where external package should be installed -
issm/trunk-jpl/src
- Property svn:mergeinfo changed
/issm/trunk/src merged: 27350,27836,27838,27858-27860,27864,27868,27874-27875,27877-27878,27880-27885,27887-27889,27894,27896,27898-27899,27969
- Property svn:mergeinfo changed
-
issm/trunk-jpl/src/m/classes/stressbalance.py
r27451 r28012 30 30 self.isnewton = 0 31 31 self.FSreconditioning = 0 32 self.icefront = np.nan32 #self.icefront = np.nan -- no longer in use 33 33 self.maxiter = 0 34 34 self.shelf_dampening = 0 … … 58 58 s += '{}\n'.format(fielddisplay(self, 'spcvy', 'y-axis velocity constraint (NaN means no constraint) [m / yr]')) 59 59 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')) 61 61 s += ' MOLHO boundary conditions:\n' 62 62 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 5 5 To save a model, call either write_netCDF.py or write_netCDF.m depending on whether your class is in matlab or python. 6 6 To 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).8 7 9 8 Usage Instructions: … … 15 14 md = bamg(model(), foo.csv, .01) 16 15 17 write_netCDF(md, ' adress_to_save/../filename.nc')16 write_netCDF(md, 'md', 'adress_to_save/../filename.nc') 18 17 19 18 - Reading a model: … … 22 21 md = read_netCDF('adress_to_file/../filename.nc') 23 22 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 27 26 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) 32 28 33 29 - Reading a model: 30 import read_netCDF 34 31 35 md = read_netCDF(adress_to_file/../filename.nc) ;32 md = read_netCDF(adress_to_file/../filename.nc) 36 33 37 Verbose examples:38 write_netCDF(md, adress_to_save/../filename.nc, verbose = true);39 40 or:41 34 42 write_netCDF(md, adress_to_save/../filename.nc, verbose);43 md = read_netCDF(adress_to_file/../filename.nc, verbose = true);44 35 45 36 Dependencies: 46 37 Python: 47 38 - NumPy 48 - NetCDF4 / NetCDF4.Dataset39 - NetCDF4.Dataset 49 40 - The model() class 50 - results.solution / results.solutionstep / results.resultsdakota51 - inversion.inversion / inversion.m1qn3inversion / inversion.taoinversion52 41 53 42 MATLAB: 54 43 - The model() class 55 - inversion.inversion / inversion.m1qn3inversion / inversion.taoinversion56 44 57 45 … … 59 47 60 48 There 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.49 include dictionaries with multiple value datatypes, lists with multiple datatypes, lists of dicts ect. 62 50 63 51 To add functionality for these additional cases, one must simply create a function to handle the case and call it using a 64 52 conditional 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. 53 copy_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.