@@ -192,7 +192,7 @@ def write_param_table(fname, param, title=None):
192192 param .to_csv (fd , index = False )
193193
194194
195- def write_param (fname , param , sort = False ):
195+ def write_param (fname , param , sort = False , comment_incomplete = False ):
196196 maxlen = len (max (param .keys (), key = len )) + 4
197197 maxlen_value = len (
198198 max ([f'{ v ["value" ]} ' if isinstance (v , dict ) else f'{ v } '
@@ -229,6 +229,8 @@ def get_sortkey(x):
229229 value = v .value
230230 if v .comment :
231231 comment += v .comment
232+ if comment_incomplete and not v .is_complete :
233+ k = f'# { k } '
232234 else :
233235 value = v
234236 vstr = f'{ value } '
@@ -481,8 +483,17 @@ def __init__(self, args, **kwargs):
481483 self .adjust_args (args )
482484 kwargs .setdefault ('cwd' , args .build_dir )
483485 kwargs .setdefault ('env' , {})
486+ add_dirs = [args .build_dir ]
487+ if os .environ .get ('CONDA_PREFIX' ):
488+ conda_prefix = os .environ ['CONDA_PREFIX' ]
489+ if sys .platform in ['win32' , 'cygwin' ]:
490+ conda_prefix = os .path .join (
491+ conda_prefix , 'Library' , 'lib' )
492+ else :
493+ conda_prefix = os .path .join (conda_prefix , 'lib' )
494+ add_dirs .append (conda_prefix )
484495 kwargs ['env' ][_library_path_var ] = add_directory_to_path (
485- args . build_dir , return_path = True , prepend = True ,
496+ add_dirs , return_path = True , prepend = True ,
486497 prev_value = kwargs ['env' ].get (_library_path_var , None ),
487498 )
488499 super (BuildSubTask , self ).__init__ (args , ** kwargs )
@@ -1547,7 +1558,8 @@ def run_commands(self, args, **kwargs):
15471558 for k , v in existing .items ():
15481559 v .finalize (defaults = defaults , existing = existing ,
15491560 aliases = aliases )
1550- write_param (args .param_file , existing , sort = args .sort_param )
1561+ write_param (args .param_file , existing , sort = args .sort_param ,
1562+ comment_incomplete = (not args .include_missing ))
15511563 print (f"WROTE { args .param_file } " )
15521564
15531565 @classmethod
@@ -1725,7 +1737,6 @@ def adjust_args(cls, args):
17251737 'ALL::VARS::TestLi' : 'umol m**-2 s**-1' ,
17261738 }
17271739 if args .light_profile .startswith ('Zhu2012' ):
1728- args .match_limits = True
17291740 args .evn_file = None
17301741 args .param .update (
17311742 O2_cond = 0.210 , # mmol mol-1
@@ -1923,6 +1934,7 @@ def plot(self, data):
19231934 ax .set_ylabel (f'A ({ args .plot_units ["CO2AR" ]} )' )
19241935 ax .plot (data ['ALL::VARS::TestLi' ], data ['CO2AR' ])
19251936 if args .plot_file :
1937+ print (f'Saving plot to \" { args .plot_file } \" ' )
19261938 fig .savefig (args .plot_file )
19271939 else :
19281940 plt .show ()
@@ -2252,6 +2264,10 @@ def __init__(self, args, **kwargs):
22522264 '--inspect-missing' , action = 'store_true' ,
22532265 help = ('Step through parameters that don\' t have an assigned '
22542266 'version for the C++ code' ))
2267+ parser_zhu2012 .add_argument (
2268+ '--include-missing' , action = 'store_true' ,
2269+ help = ('Include parameters that don\' t have an assigned '
2270+ 'version for the C++ code' ))
22552271 parser_ephoto = subparsers .add_parser (
22562272 'ephoto' , help = "Run ephoto executable" ,
22572273 func = ephoto )
0 commit comments