Skip to content

Code address broken setter/getter functions found in the surface bmi

McDonald, Richard R. requested to merge pymt_fix1 into master

@mdpiper, I looped through all output vars and queried as the following functions below and systematically went through the Fortran code to fix. I hope I got it all. I did the same getvarinfo with setter vars and fixed missing type, units, size, but have still not testing setting values to every var:

def getvarinfo(var):
    # Get variable info.
    var_name = var   # vector
    # var_name = 'nhru'      # scalar
    # var_name = 'dday_slope'  # rectilinear
    print('Variable {}'.format(var_name))
    print(' - variable type:', m.var_type(var_name))
    print(' - units:', m.var_units(var_name))
    print(' - itemsize:', m.var_itemsize(var_name))
    print(' - nbytes:', m.var_nbytes(var_name))
    print(' - location:', m.var_location(var_name))
def getdata(var):
    try:
        print(m.get_value(var), flush=True)
    except:
        print(f'error with {var}', flush=True)

Merge request reports

Loading