From 9b3e6b3489a774e635302a0f08b5fcd2ff0ced36 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Mon, 31 Oct 2022 09:57:19 -0700 Subject: [PATCH] minor order of operations update --- tools/UpdateParamAPI.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/UpdateParamAPI.py b/tools/UpdateParamAPI.py index fe35d6a0c9..ce73bf1c30 100755 --- a/tools/UpdateParamAPI.py +++ b/tools/UpdateParamAPI.py @@ -319,6 +319,7 @@ def main(): # usecase = mod.find('uc').text.strip() #except: # print("no use case (uc), exiting");exit(2) + usecase = 'undefined' try: values = str2fvec(mod.find('val').text.strip()) @@ -344,9 +345,9 @@ def main(): print("Unknown value type: {} {}".format(type(values[0]),paramname));exit(2) - sel_values = selectvalues(ncfile,list(dimnames),ipft_list,values,dcode) ncfile = netcdf.netcdf_file(base_nc,"a",mmap=False) + sel_values = selectvalues(ncfile,list(dimnames),ipft_list,values,dcode) [ncfile,ncvar] = createvar(ncfile,paramname,dimnames,units,longname,usecase,dcode,sel_values) ncfile.flush() ncfile.close()