@@ -435,18 +435,23 @@ def generate_physics_suites(build_cache, preproc_defs, host_name,
435
435
if not os .path .exists (physics_blddir ):
436
436
os .makedirs (physics_blddir )
437
437
# End if
438
- # Collect all source directories
439
- atm_phys_src_dir = os .path .join (atm_root , "src" , "physics" , "ncar_ccpp" )
440
- source_search = [source_mods_dir , atm_phys_src_dir ]
441
- # Find all metadata files, organize by scheme name
438
+ # Set top-level CCPP physics directory
439
+ atm_phys_top_dir = os .path .join (atm_root , "src" , "physics" , "ncar_ccpp" )
440
+ # Collect all possible Suite Definition File (SDF) locations
441
+ atm_suites_path = os .path .join (atm_phys_top_dir , "suites" )
442
+ atm_test_suites_path = os .path .join (atm_phys_top_dir , "test" , "test_suites" )
443
+ suite_search = [source_mods_dir , atm_suites_path , atm_test_suites_path ]
444
+ # Find all scheme metadata files, organized by scheme name
445
+ atm_schemes_path = os .path .join (atm_phys_top_dir , "schemes" )
446
+ source_search = [source_mods_dir , atm_schemes_path ]
442
447
all_scheme_files = _find_metadata_files (source_search , find_scheme_names )
443
448
444
449
# Find the SDFs specified for this model build
445
450
sdfs = []
446
451
scheme_files = []
447
452
xml_files = {} # key is scheme, value is xml file path
448
453
for sdf in phys_suites_str .split (';' ):
449
- sdf_path = _find_file (f"suite_{ sdf } .xml" , source_search )
454
+ sdf_path = _find_file (f"suite_{ sdf } .xml" , suite_search )
450
455
if not sdf_path :
451
456
emsg = f"ERROR: Unable to find SDF for suite '{ sdf } '"
452
457
raise CamAutoGenError (emsg )
@@ -587,7 +592,7 @@ def generate_physics_suites(build_cache, preproc_defs, host_name,
587
592
# there to the bld directory:
588
593
if do_gen_ccpp :
589
594
# Set CCPP physics "utilities" path
590
- atm_phys_util_dir = os .path .join (atm_phys_src_dir , "utilities" )
595
+ atm_phys_util_dir = os .path .join (atm_schemes_path , "utilities" )
591
596
592
597
# Check that directory exists
593
598
if not os .path .isdir (atm_phys_util_dir ):
0 commit comments