From ad44c060f5ef70b7a6401e5265cea9a04cf0c164 Mon Sep 17 00:00:00 2001 From: Kate Hedstrom Date: Wed, 25 Mar 2020 13:08:58 -0800 Subject: [PATCH] Cleaning up make_tide --- examples/make_tide/CGrid_TPXO8/flood.py | 4 +- examples/make_tide/CGrid_TPXO8/remap.py | 2 +- pyroms/install_pyroms.sh | 55 ------------------------- 3 files changed, 3 insertions(+), 58 deletions(-) delete mode 100755 pyroms/install_pyroms.sh diff --git a/examples/make_tide/CGrid_TPXO8/flood.py b/examples/make_tide/CGrid_TPXO8/flood.py index 8980dab..e464d0a 100644 --- a/examples/make_tide/CGrid_TPXO8/flood.py +++ b/examples/make_tide/CGrid_TPXO8/flood.py @@ -1,7 +1,7 @@ # encoding: utf-8 import numpy as np -import _remapping +from pyroms import _remapping import pyroms @@ -16,7 +16,7 @@ def flood(varz, Cgrd, Cpos='t', irange=None, jrange=None, \ - irange specify grid sub-sample for i direction - jrange specify grid sub-sample for j direction - spval=1e35 define spval value - - dmax=0 if dmax>0, maximum horizontal + - dmax=0 if dmax>0, maximum horizontal flooding distance - cdepth=0 critical depth for flooding if depth no flooding diff --git a/examples/make_tide/CGrid_TPXO8/remap.py b/examples/make_tide/CGrid_TPXO8/remap.py index c8ccbf4..03ac012 100644 --- a/examples/make_tide/CGrid_TPXO8/remap.py +++ b/examples/make_tide/CGrid_TPXO8/remap.py @@ -11,7 +11,7 @@ import pyroms import pyroms_toolbox -import _remapping +from pyroms import _remapping class nctime(object): pass diff --git a/pyroms/install_pyroms.sh b/pyroms/install_pyroms.sh deleted file mode 100755 index e590db5..0000000 --- a/pyroms/install_pyroms.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - -#DESTDIR=/usr/local -DESTDIR=$HOME/python -PYROMS_PATH=$DESTDIR/lib/python3.7/site-packages/pyroms -CURDIR=`pwd` - -echo -echo "installing pyroms..." -echo -python setup.py build --fcompiler=gnu95; -python setup.py install --prefix=$DESTDIR -echo "installing external libraries..." -echo "installing gridgen..." -cd $CURDIR/external/nn -./configure --prefix=$DESTDIR -make install -cd $CURDIR/external/csa -./configure --prefix=$DESTDIR -make install -cd $CURDIR/external/gridutils -./configure CPPFLAGS=-I$DESTDIR/include LDFLAGS=-L$DESTDIR/lib CFLAGS=-I$DESTDIR/include --prefix=$DESTDIR -make install -cd $CURDIR/external/gridgen -export SHLIBS=-L$DESTDIR/lib -./configure CPPFLAGS=-I$DESTDIR/include LDFLAGS=-L$DESTDIR/lib CFLAGS=-I$DESTDIR/include --prefix=$DESTDIR -make -make lib -make shlib -make install -# Now setting this above because this gave me an error: -#PYROMS_PATH=`python -c 'import pyroms ; print pyroms.__path__[0]'` -# $ echo $PYROMS_PATH -cp libgridgen.so $PYROMS_PATH -echo "installing scrip..." -cd $CURDIR/external/scrip/source -perl -pe "s#\/usr\/local#$DESTDIR#" makefile > makefile2 -make -f makefile2 -make -f makefile2 f2py -make -f makefile2 install -+# Write it this way for Darwin... -cp -r scrip*.so* $PYROMS_PATH -cd $CURDIR -echo -echo "Done installing pyroms..." -echo "pyroms make use of the so-called gridid file to store" -echo "grid information like the path to the grid file, the" -echo "number of vertical level, the vertical transformation" -echo "use, ..." -echo "Please set the environment variable PYROMS_GRIDID_FILE" -echo "to point to your gridid file. A gridid file template" -echo "is available here:" -echo "$CURDIR/pyroms/gridid.txt" -read -p "Press any key to continue or Ctrl+C to quit this install" -echo