From 1678279bc3878345f751760c01b670f2ee225a39 Mon Sep 17 00:00:00 2001 From: pradal Date: Wed, 18 May 2022 11:27:59 +0200 Subject: [PATCH] Close #29. However, NA appears due to conversion problems R/Python and it has to be fixed. --- src/alinea/adel/newmtg.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/alinea/adel/newmtg.py b/src/alinea/adel/newmtg.py index 98e5c331..7685bdcf 100644 --- a/src/alinea/adel/newmtg.py +++ b/src/alinea/adel/newmtg.py @@ -529,7 +529,11 @@ def mtg_factory(parameters, metamer_factory=adel_metamer, leaf_sectors=1, args.update({'Gd': 0.19}) args.update({'split': split}) - if args.get('HS_final') < args.get('nff'): + _HS_final = args.get('HS_final') + _nff = int(args.get('nff')) + if _HS_final == 'NA': + pass + elif int(_HS_final) < _nff: for what in ( 'Ll', 'Lv', 'Lr', 'Lsen', 'L_shape', 'Lw_shape', 'Gl', 'Gv', 'Gsen', 'Gd', 'El', 'Ev', 'Esen', 'Ed'):