Ignore:
Timestamp:
08/08/23 11:26:37 (20 months ago)
Author:
musselman
Message:

Fixed bugs so that read/write files function interchangeably on inversion notebooks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/contrib/musselman/read_netCDF_commit.py

    r27859 r27874  
    2424
    2525def read_netCDF(filename):
    26     print('NetCDF42C v1.1.12')
     26    print('NetCDF42C v1.1.13')
    2727
    2828    # check if path exists
     
    5454    # walk through each group looking for subgroups and variables
    5555    for group in NCData.groups.keys():
    56         # have to send a custom name to this function: filename.groups['group']
    57         name = "NCData.groups['" + str(group) + "']"
    58         walk_nested_groups(name)
     56        if 'debris' in group:
     57            pass
     58        else:
     59            # have to send a custom name to this function: filename.groups['group']
     60            name = "NCData.groups['" + str(group) + "']"
     61            walk_nested_groups(name)
    5962   
     63    print("Model Successfully Recreated.")
    6064    return model_copy
    6165
     
    116120    if str(location_of_variable_in_model + '.' + variable_name) =='results.solutionstep':
    117121        pass
     122    # qmu band-aid
     123    elif 'qmu.statistics.method' in str(location_of_variable_in_model + '.' + variable_name):
     124        pass
    118125    # handle any strings:
    119126    elif 'char' in eval(location_of_variable_in_file + '.dimensions[0]'):
     
    151158
    152159
     160
     161
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
     179
Note: See TracChangeset for help on using the changeset viewer.