mikaem / Oasis

55 stars 48 forks source link

problem with "NT = None if nn_model is "NoModel" else NNsource()” (line79, IPCS_ABCN.py) when using restart_folder #45

Closed keiyamamo closed 2 years ago

keiyamamo commented 2 years ago

Hi @mikaem ,

I just found that using is instead of == causes problem when using restart_folder. I picked line 79 from IPCS_ABCN.py as an example but the same goes to some other lines in IPCS_ABCN.py.

NT = None if nn_model is "NoModel" else NNsource( nunn_, u_ab, V, name='NTd’)

should be

NT = None if nn_model == "NoModel" else NNsource( nunn_, u_ab, V, name='NTd’)

As for the les_model, == is used and does not cause any problem, so I think nn_model should follow the same syntax.

I can fix all the lines and submit PR if you agree with me !

Best, Kei

mikaem commented 2 years ago

Hi @keiyamamo It should not be 'is', so you're more than welcome to make the change. I implemented the LES model, so no surprise it works there;-)