@@ -145,6 +145,9 @@ def get_chyrsalis_expansions(config):
145145 "case_name" : "v3.LR.historical_0051" ,
146146 "case_name_v2" : "v2.LR.historical_0201" ,
147147 "constraint" : "" ,
148+ # To run this test, replace conda environment with your e3sm_diags dev environment
149+ # To use default environment_commands, set to ""
150+ "diags_environment_commands" : "source <INSERT PATH TO CONDA>/conda.sh; conda activate <INSERT ENV NAME>" ,
148151 "diags_walltime" : "5:00:00" ,
149152 "e3sm_to_cmip_environment_commands" : "" ,
150153 "environment_commands_test" : "" ,
@@ -172,6 +175,9 @@ def get_compy_expansions(config):
172175 "case_name" : "v3.LR.historical_0051" ,
173176 "case_name_v2" : "v2.LR.historical_0201" ,
174177 "constraint" : "" ,
178+ # To run this test, replace conda environment with your e3sm_diags dev environment
179+ # To use default environment_commands, set to ""
180+ "diags_environment_commands" : "source <INSERT PATH TO CONDA>/conda.sh; conda activate <INSERT ENV NAME>" ,
175181 "diags_walltime" : "03:00:00" ,
176182 "e3sm_to_cmip_environment_commands" : "" ,
177183 "environment_commands_test" : "" ,
@@ -199,6 +205,9 @@ def get_perlmutter_expansions(config):
199205 "case_name" : "v3.LR.historical_0051" ,
200206 "case_name_v2" : "v2.LR.historical_0201" ,
201207 "constraint" : "cpu" ,
208+ # To run this test, replace conda environment with your e3sm_diags dev environment
209+ # To use default environment_commands, set to ""
210+ "diags_environment_commands" : "source <INSERT PATH TO CONDA>/conda.sh; conda activate <INSERT ENV NAME>" ,
202211 "diags_walltime" : "6:00:00" ,
203212 "e3sm_to_cmip_environment_commands" : "" ,
204213 "environment_commands_test" : "" ,
@@ -252,14 +261,18 @@ def substitute_expansions(expansions, file_in, file_out):
252261 file_write .write (line )
253262
254263
255- def generate_cfgs (unified_testing = False , diags_environment_commands = "" , dry_run = False ):
264+ def generate_cfgs (
265+ unified_testing = False ,
266+ diags_environment_commands = None ,
267+ global_time_series_environment_commands = None ,
268+ dry_run = False ,
269+ ):
256270 git_top_level = (
257271 subprocess .check_output ("git rev-parse --show-toplevel" .split ())
258272 .strip ()
259273 .decode ("utf-8" )
260274 )
261275 expansions = get_expansions ()
262-
263276 if unified_testing :
264277 expansions ["environment_commands" ] = expansions ["environment_commands_test" ]
265278 else :
@@ -269,8 +282,10 @@ def generate_cfgs(unified_testing=False, diags_environment_commands="", dry_run=
269282
270283 if diags_environment_commands :
271284 expansions ["diags_environment_commands" ] = diags_environment_commands
272- else :
273- expansions ["diags_environment_commands" ] = ""
285+ if global_time_series_environment_commands :
286+ expansions ["global_time_series_environment_commands" ] = (
287+ global_time_series_environment_commands
288+ )
274289
275290 machine = expansions ["machine" ]
276291
@@ -368,6 +383,12 @@ def generate_cfgs(unified_testing=False, diags_environment_commands="", dry_run=
368383
369384
370385if __name__ == "__main__" :
371- generate_cfgs (
372- unified_testing = (sys .argv [1 ] == "True" ), diags_environment_commands = sys .argv [2 ]
373- )
386+ if len (sys .argv ) <= 2 :
387+ generate_cfgs (unified_testing = False , dry_run = False )
388+ else :
389+ generate_cfgs (
390+ unified_testing = sys .argv [2 ] == "True" ,
391+ diags_environment_commands = sys .argv [3 ],
392+ global_time_series_environment_commands = sys .argv [4 ],
393+ dry_run = False ,
394+ )
0 commit comments