NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 64 forks source link

Use absolute paths to dependency source code files #575

Closed mattldawson closed 3 months ago

mattldawson commented 4 months ago

Description

The paths to dependencies in the generated ccpp_datatable.xml file are relative to the folder that holds the scheme files that need them. Because they are included in a separate dependencies element, decoupled from their source scheme, it is difficult to determine the absolute path to these files and include them in the build.

e.g.,:

<ccpp_datatable>
  ...
  <dependencies>
    <dependency>micm/micm.F90</dependency>
  </dependencies>
  ...
</ccpp_datatable>

Solution

Generate absolute paths for dependencies instead. e.g.,:

<ccpp_datatable>
  ...
  <dependencies>
    <dependency>/glade/work/me/CAM-SIMA/somewhere/micm/micm.F90</dependency>
  </dependencies>
  ...
</ccpp_datatable>

This would also be consistent with other paths in this file, which are absolute.

@peverwhee @nusbaume - did I miss anything?

Alternatives (optional)

Alternatively, users could try to infer the absolute paths from other information in ccpp_datatable.xml, but I couldn't figure out a straightfoward way to do this.

Related to (optional)

none

peverwhee commented 3 months ago

closing this as it was addressed in #576