Changeset 27887 for issm/trunk
- Timestamp:
- 08/23/23 17:59:34 (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/contrib/musselman/README.txt
r27885 r27887 59 59 To add functionality for these additional cases, one must simply create a function to handle the case and call it using a 60 60 conditional case within the create_var() function. To read the data from the NetCDF4 file, add the case to the 61 copy_variable_data_to_new_model() function in read_netCDF so that the data can be added to a new model() instance. 61 copy_variable_data_to_new_model() function in read_netCDF so that the data can be added to a new model() instance. 62 63 Known issues: 64 65 Unlike Python, MATLAB doesn't utilize subclasses in its model class. This leads to a loss of certain subclass instances. 66 For instance, the results.solutionstep() class poses a known issue. In MATLAB, there's no direct equivalent. The fields in 67 'md.results' in MATLAB might correspond to instances of resultsdakota(), solution(), or solutionstep() in Python, but 68 because those classes don't exist in MATLAB, there is no way for python to know which instance it needs. 69 70 The current workaround, while not theoretically sound, involves searching for the class name string in MATLAB's 'results' 71 field names. For instance, 'md.results.TransientSolution' is recorded as a solution() class instance. However, problems arise 72 in cases like 'md.results.StressbalanceSolution', where the code notes a solution() instance, while in Python, it should be a 73 solutionstep() instance. 74 75 So far, there have been no recorded problems swapping a solutionstep() instance for a solution() instance. 76 77 Potential solutions are: 78 79 - Restructure both Python and MATLAB solve frameworks. In Python, when creating an md.results.<solutionstep()> instance, 80 embed 'solutionstep' in the class instance name. 81 >> This solution is very involved, and would include the tedious modification of >5 files in total 82 - Create a hash table linking solutions with their corresponding 'md.results.<class>' for reference when saving models to 83 the netCDF file.
Note:
See TracChangeset
for help on using the changeset viewer.