forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfv3gfs_remap_weights.sh
executable file
·63 lines (52 loc) · 2.07 KB
/
fv3gfs_remap_weights.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#! /usr/bin/env bash
#BSUB -L /bin/sh
#BSUB -P FV3GFS-T2O
#BSUB -oo log.weights
#BSUB -eo log.weights
#BSUB -J weights_fv3
#BSUB -q dev
#BSUB -M 1024
#BSUB -W 10:00
#BSUB -extsched 'CRAYLINUX[]'
set -ax
. $MODULESHOME/init/sh
module load PrgEnv-intel
#--------------------------------------------------
export home_dir=/gpfs/hps3/emc/global/noscrub/$LOGNAME/git/fv3gfs/gfs.v15.0.0
export script_dir=$home_dir/ush
export exec_dir=$home_dir/exec
export fix_fv3_dir=$home_dir/fix
export fregrid=$home_dir/exec/fregrid_parallel
export TMPDIR=/gpfs/hps/ptmp/$LOGNAME/fv3_weight
#--global lat-lon array size
#----------------------------------------------------------
for GG in 1deg 0p5deg 0p25deg 0p125deg; do
#----------------------------------------------------------
if [ $GG = 1deg ]; then export nlon=360 ; export nlat=180 ;fi
if [ $GG = 0p5deg ]; then export nlon=720 ; export nlat=360 ;fi
if [ $GG = 0p25deg ]; then export nlon=1440 ; export nlat=720 ;fi
if [ $GG = 0p125deg ]; then export nlon=2880 ; export nlat=1440 ;fi
#----------------------------------------------------------
for CASE in C48 C96 C192 C384 C768 C1152 C3072; do
#----------------------------------------------------------
max_core=24
export NODES=3; export thread=1
##if [ $CASE = C3072 ]; then exportNODES=21; export thread=4; fi
export npes=$(((NODES-1)*max_core/thread))
export workdir=$TMPDIR/${CASE}_${GG}
mkdir -p $workdir; cd $workdir ||exit 8
export native_grid=$fix_fv3_dir/$CASE/${CASE}_mosaic.nc
export remap_file=$fix_fv3_dir/$CASE/remap_weights_${CASE}_${GG}.nc
#NOTE: we are placing the first process on a node by itself to get the memory it needs
# these npes will be tightly packed on the remaining nodes
aprun -n 1 -d 24 $fregrid --input_mosaic $native_grid \
--nlon $nlon --nlat $nlat \
--remap_file $remap_file \
--debug : \
-n $npes -d $thread $fregrid --input_mosaic $native_grid \
--nlon $nlon --nlat $nlat \
--remap_file $remap_file \
--debug
done
done
exit