Skip to content

Commit

Permalink
Add back global_enspqpf.fd and build_global_enspqpf.sh
Browse files Browse the repository at this point in the history
 On branch hotfix/pqpf
	new file:   build_global_enspqpf.sh
	new file:   global_enspqpf.fd/Makefile
	new file:   global_enspqpf.fd/PQPF.f90
	new file:   global_enspqpf.fd/init_parm.f90
	new file:   global_enspqpf.fd/printinfr.f90
Refs: #2
  • Loading branch information
XianwuXue-NOAA committed Nov 24, 2020
1 parent a453f22 commit f7d8308
Show file tree
Hide file tree
Showing 5 changed files with 645 additions and 0 deletions.
54 changes: 54 additions & 0 deletions sorc/build_global_enspqpf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#! /usr/bin/env bash
set -eux

source ./machine-setup.sh > /dev/null 2>&1
cwd=`pwd`

progname=global_enspqpf

if [ -f ../modulefiles/gefs/gefs_$target.ver ]; then
source ../modulefiles/gefs/gefs_$target.ver
fi
source ../modulefiles/gefs/${progname}.$target > /dev/null 2>&1

# Check final exec folder exists
if [ ! -d "../exec" ]; then
mkdir ../exec
fi

#
#
cd ${progname}.fd

export FCMP=${FCMP:-ifort}
export FCMP95=$FCMP

export FFLAGSM="-O3 -g -convert big_endian"
export RECURS=
export LDFLAGSM=${LDFLAGSM:-""}
export OMPFLAGM=${OMPFLAGM:-""}

export INCSM="-I ${G2_INC4}"

export LIBSM="${G2_LIB4} ${W3NCO_LIB4} ${BACIO_LIB4} ${JASPER_LIB} ${PNG_LIB} ${Z_LIB}"


# If you want to get the original size of excutable file,
GetOriginal=${GetOriginal:-false}

if $GetOriginal; then
if [ $target == wcoss_cray ]; then
echo "This is on wcoss_cray"
export INCSM="-I ${G2_INC4} -I/opt/cray/iobuf/2.0.5/include"
export LIBSM="${G2_LIB4} ${W3NCO_LIB4} ${BACIO_LIB4} ${JASPER_LIB} ${PNG_LIB} ${Z_LIB} -Wl,/opt/cray/iobuf/2.0.5/lib/iobuf.o"
elif [ $target == wcoss_dell_p3 ]; then
echo "This is on wcoss_dell_p3"
fi
fi

make -f Makefile clobber
make -f Makefile
make -f Makefile install
make -f Makefile clobber

exit
39 changes: 39 additions & 0 deletions sorc/global_enspqpf.fd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
SHELL= /bin/bash

FC =$(FCMP)
FC90 =$(FCMP95)
LDR =$(FCMP)

INCS =$(INCSM)
LIBS =$(LIBSM)

FFLAGS =$(FFLAGSM)
OMPFLAG =$(OMPFLAGM)
LDFLAGS =$(LDFLAGSM)

SRCSf90 = PQPF.f90 printinfr.f90 init_parm.f90
SRCSf =

SRCS = $(SRCSf90) $(SRCSf)
OBJS = $(SRCSf:.f=.o) $(SRCSf90:.f90=.o)
CMD = global_enspqpf

$(CMD): $(OBJS)
$(LDR) $(LDFLAGS) $(OBJS) $(LIBS) -o $(CMD)
#$(LDR) $(LDFLAGS) $(FFLAGS) $(OMPFLAG) $(OBJS) $(LIBS) -o $(CMD)

$(OBJS): $(SRCS)
$(FC) $(FFLAGS) $(OMPFLAG) $(INCS) -c $(SRCS)

allclean: clean all

clean:
-rm -f $(OBJS) *.lst *.mod

clobber: clean
-rm -f $(CMD)

install:
cp $(CMD) ../../exec/$(CMD)


Loading

0 comments on commit f7d8308

Please sign in to comment.