forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.testing: Use Fortran to generate tc inputs
This patch removes the `build_{grid,data}.py` scripts from .testing's tc4, along with the setup of the Python infrastructure used in the .testing Makefile and GitHub Actions CI. The Python scripts have been replaced with equivalent Fortran programs which generate identical netCDF output. A new rule (`preproc`) has been added to the .testing top Makefile for generating the model input files. The netCDF compiler dependenices are configured with autoconf, currently duplicating the macros in `ac/configure.ac`. (NOTE: It may be possible to share these with a common macro in ac/m4. The configure script and Makefile are currently generated from `configure.ac` and `autoreconf`. In the future, we could simply pre-generate `configure` and add it to the repository. This patch was motivated by the inability to install recent netCDF-Python packages on systems with older gcc compilers, including our main production machine. We could have possibly resolved this by adding compiler configuration to pip, or perhaps reported the issue to the netCDF-python project for them to resolve. But the costs of relying on all this Python infrastructure is starting to exceed the benefits, and I would recommend we excise it from our test suite.
- Loading branch information
1 parent
9d5a320
commit 0961ed1
Showing
11 changed files
with
448 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
# Autoconf | ||
aclocal.m4 | ||
autom4te.cache/ | ||
config.log | ||
config.status | ||
configure~ | ||
|
||
# Output | ||
gen_grid | ||
ocean_hgrid.nc | ||
topog.nc | ||
|
||
gen_data | ||
sponge.nc | ||
temp_salt_ic.nc | ||
topog.nc |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FC = @FC@ | ||
LD = @LD@ | ||
FCFLAGS = @FCFLAGS@ | ||
LDFLAGS = @LDFLAGS@ | ||
LIBS = @LIBS@ | ||
|
||
OUT = topog.nc ocean_hgrid.nc temp_salt_ic.nc sponge.nc | ||
|
||
all: $(OUT) | ||
|
||
ocean_hgrid.nc topog.nc: gen_grid | ||
./gen_grid | ||
|
||
temp_salt_ic.nc sponge.nc: gen_data | ||
./gen_data | ||
|
||
gen_grid: gen_grid.F90 | ||
$(FC) $(FCFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) | ||
|
||
gen_data: gen_data.F90 | ||
$(FC) $(FCFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf $(OUT) gen_grid gen_data | ||
|
||
.PHONY: distclean | ||
distclean: clean | ||
rm -f config.log | ||
rm -f config.status | ||
rm -f Makefile | ||
|
||
.PHONY: ac-clean | ||
ac-clean: distclean | ||
rm -f aclocal.m4 | ||
rm -rf autom4te.cache | ||
rm -f configure | ||
rm -f configure~ |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.