Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nic Hannah
committed
Nov 22, 2017
1 parent
c65e405
commit fc1885a
Showing
8 changed files
with
159 additions
and
61 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
def wait_for_qsub(run_id): | ||
""" | ||
Wait for the qsub job to terminate. | ||
""" | ||
|
||
while True: | ||
time.sleep(5) | ||
qsub_out = '' | ||
try: | ||
qsub_out = sp.check_output(['qstat', run_id], stderr=sp.STDOUT) | ||
except sp.CalledProcessError as err: | ||
qsub_out = err.output | ||
|
||
if 'Job has finished' in qsub_out: | ||
break | ||
|
||
def get_git_hash(src_dir): | ||
""" | ||
Get the git hash of src_dir. | ||
""" | ||
mydir = os.getcwd() | ||
os.chdir(src_dir) | ||
ghash = sp.check_output(['git', 'rev-parse', 'HEAD'])[:8] | ||
os.chdir(mydir) | ||
|
||
return ghash | ||
|
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,20 @@ | ||
#!/bin/bash | ||
|
||
git archive --remote=git://git.code.sf.net/p/esmf/esmf --format=tar --prefix=esmf/ ESMF_7_1_0_beta_snapshot_38 | tar xf - | ||
module load netcdf/4.4.1.1 | ||
module load intel-fc/17.0.1.132 | ||
mkdir -p bin | ||
cd esmf | ||
export ESMF_DIR=$(pwd) | ||
export ESMF_F90COMPILER=ifort | ||
export ESMF_F90LINKER=ifort | ||
export ESMF_NETCDF="split" | ||
export ESMF_NETCDF_INCLUDE=$NETCDF_ROOT/include | ||
export ESMF_NETCDF_LIBPATH=$NETCDF_ROOT/lib | ||
export ESMF_NETCDF_LIBS="-lnetcdff -lnetcdf" | ||
make | ||
cd src/apps/ESMF_RegridWeightGen | ||
make | ||
cd ../../../../ | ||
cp esmf/apps/appsO/*/ESMF_RegridWeightGen bin/ | ||
export PATH=$(pwd)/bin:$PATH |
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,18 @@ | ||
#!/bin/bash | ||
|
||
mkdir bin | ||
sudo apt-get install libnetcdf-dev libnetcdff-dev | ||
wget http://s3-ap-southeast-2.amazonaws.com/dp-drop/ocean-regrid/contrib/esmf_7_0_0_src.tar.gz | ||
tar zxvf esmf_7_0_0_src.tar.gz | ||
cd esmf | ||
export ESMF_DIR=$(pwd) | ||
export ESMF_NETCDF="split" | ||
export ESMF_NETCDF_INCLUDE=/usr/include/ | ||
export ESMF_NETCDF_LIBPATH=/usr/lib/x86_64-linux-gnu/ | ||
export ESMF_NETCDF_LIBS="-lnetcdff -lnetcdf" | ||
make | ||
cd src/apps/ESMF_RegridWeightGen | ||
make | ||
cd ../../../../ | ||
cp esmf/apps/appsO/*/ESMF_RegridWeightGen bin/ | ||
export PATH=$(pwd)/bin:$PATH |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
#PBS -P x77 | ||
#PBS -q normal | ||
#PBS -l ncpus=128,mem=496GB,walltime=02:00:00,jobfs=100GB | ||
#PBS -l wd | ||
|
||
time ./make_remap_weights.py /short/x77/nah599/access-om2/input/ /g/data1/ua8/JRA55-do/RYF/v1-3/ --npes 128 | ||
|