Skip to content

Commit

Permalink
Merge pull request #464 from xylar/add_otps_conda_recipe
Browse files Browse the repository at this point in the history
Add a recipe for OSU tidal prediction software
  • Loading branch information
xylar authored Dec 1, 2022
2 parents e83d814 + dd8a8c4 commit a7ef5b4
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 5 deletions.
6 changes: 1 addition & 5 deletions conda/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,7 @@ def build_conda_env(env_type, recreate, machine, mpi, conda_mpi, version,
if env_type == 'test_release':
# for a test release, we will be the compass package from the dev label
channels = channels + ['-c e3sm/label/compass_dev']
if (machine is not None and machine.startswith('conda')) \
or env_type == 'release':
# we need libpnetcdf and scorpio (and maybe compass itself) from the
# e3sm channel, compass label
channels = channels + ['-c e3sm/label/compass']
channels = channels + ['-c e3sm/label/compass']

channels = f'--override-channels {" ".join(channels)}'
packages = f'python={python}'
Expand Down
1 change: 1 addition & 0 deletions conda/compass_env/spec-file.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ mpas_tools=0.15.0
nco
netcdf4=*=nompi_*
numpy
otps=2021.10
progressbar2
pyamg >=4.2.2
pyproj
Expand Down
14 changes: 14 additions & 0 deletions conda/otps/ci/linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cdt_name:
- cos6
channel_sources:
- conda-forge
channel_targets:
- e3sm compass
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
fortran_compiler:
- gfortran
fortran_compiler_version:
- '10'
target_platform:
- linux-64
14 changes: 14 additions & 0 deletions conda/otps/ci/osx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
channel_sources:
- conda-forge
channel_targets:
- e3sm compass
fortran_compiler:
- gfortran
fortran_compiler_version:
- '11'
macos_machine:
- x86_64-apple-darwin13.4.0
target_platform:
- osx-64
13 changes: 13 additions & 0 deletions conda/otps/recipe/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -e

gdown 1FBlS_Xmf6_dnCg1T0t5GSTRTwMjLuA8N
tar xvf OTPS.tar.Z

cd OTPS

for exec in extract_HC extract_local_model predict_tide
do
${FC} ${FCFLAGS} -o ${exec} -fconvert=swap -frecord-marker=4 ${exec}.f90 subs.f90
cp ${exec} ${PREFIX}/bin/
done
35 changes: 35 additions & 0 deletions conda/otps/recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set version = "2021.10" %}
{% set build = 0 %}

package:
name: otps
version: {{ version }}

build:
number: 0
skip: True # [win]

requirements:
build:
- make
- {{ compiler('fortran') }}
host:
- gdown
- tar

test:
commands:
- test -f ${PREFIX}/bin/extract_HC
- test -f ${PREFIX}/bin/extract_local_model
- test -f ${PREFIX}/bin/predict_tide

about:
home: https://www.tpxo.net/otps
license: custom
license_file: OTPS/COPYRIGHT
summary: OSU TIDAL PREDICTION Software (OTPS)

extra:
recipe-maintainers:
- xylar
- sbrus89
1 change: 1 addition & 0 deletions conda/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ requirements:
- nco
- netcdf4 * nompi_*
- numpy
- otps 2021.10 # [linux]
- progressbar2
- pyamg >=4.2.2
- pyproj
Expand Down

0 comments on commit a7ef5b4

Please sign in to comment.