Changeset 27887 for issm/trunk


Ignore:
Timestamp:
08/23/23 17:59:34 (19 months ago)
Author:
musselman
Message:

Added documentation recording known limitations of read/write_netCDF files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/contrib/musselman/README.txt

    r27885 r27887  
    5959To add functionality for these additional cases, one must simply create a function to handle the case and call it using a
    6060conditional 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.
     61copy_variable_data_to_new_model() function in read_netCDF so that the data can be added to a new model() instance.
     62
     63Known issues:
     64
     65Unlike Python, MATLAB doesn't utilize subclasses in its model class. This leads to a loss of certain subclass instances.
     66For 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
     68because those classes don't exist in MATLAB, there is no way for python to know which instance it needs.
     69
     70The current workaround, while not theoretically sound, involves searching for the class name string in MATLAB's 'results'
     71field names. For instance, 'md.results.TransientSolution' is recorded as a solution() class instance. However, problems arise
     72in cases like 'md.results.StressbalanceSolution', where the code notes a solution() instance, while in Python, it should be a
     73solutionstep() instance.
     74
     75So far, there have been no recorded problems swapping a solutionstep() instance for a solution() instance.
     76
     77Potential 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.