Skip to content

Commit

Permalink
Post libs (NOAA-EMC#9)
Browse files Browse the repository at this point in the history
* Add capability of building ncep_post v8.0.0 library for running in-line post.

* Add the capability for building post library on WCOSS phase1/2.
  • Loading branch information
WenMeng-NOAA authored Oct 9, 2019
1 parent ba7e59b commit 454aa4f
Show file tree
Hide file tree
Showing 7 changed files with 417 additions and 1 deletion.
57 changes: 57 additions & 0 deletions modulefiles/post/lib-v8.0.0-cray-intel
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#%Module######################################################################
## Jun.Wang@noaa.gov: Started NCEPPOST lib v6.3.0
## Wen.Meng@noaa.gov 10/2019: Upgraded to v8.0.0
##_____________________________________________________
proc ModulesHelp { } {
puts stderr "Set environment veriables for NCEPPOST"
puts stderr "This module initializes the enviro nment "
puts stderr "for the Intel Compiler Suite $version\n"
}
module-whatis " NCEPPOST lib whatis description"

#set ver v6.3.0
#set envir dev
#set NCEPLIB /nwprod/lib

#set sys [uname sysname]

#setenv COMPF_MP mpiifort
setenv myFC ftn
setenv myFCFLAGS "-O2 -convert big_endian -traceback -g -fp-model source -qopenmp -fpp"
setenv myCPP /lib/cpp
setenv myCPPFLAGS "-P"
setenv ARCHV ar
setenv CPPC /lib/cpp
setenv version v8.0.0
#

module purge

module use -a /usrx/local/prod/modulefiles
module use -a /gpfs/hps/nco/ops/nwprod/lib/modulefiles

# Loading Intel Compiler Suite
module load PrgEnv-intel
module load craype-sandybridge
module switch intel intel/15.0.3.187
module load craype/2.3.0

# Loading nceplibs modules
module load jasper-gnu-sandybridge/1.900.1
module load png-gnu-sandybridge/1.2.49
module load zlib-gnu-sandybridge/1.2.7
module load g2-intel/3.1.0
module load g2tmpl-intel/1.5.0
#module load xmlparse/v2.0.0

module load w3emc-intel/2.2.0
module load w3nco/2.0.6
module load w3nco-intel/2.0.6
module load bacio-intel/2.0.1
module load gfsio-intel/1.1.0
#module load sigio/2.1.0
module load ip-intel/3.0.0
module load sp-intel/2.0.2
module load crtm-intel/2.2.6


54 changes: 54 additions & 0 deletions modulefiles/post/lib-v8.0.0-hera
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#%Module######################################################################
## Jun.Wang@noaa.gov: Started NCEPPOST lib v6.3.0
## Wen.Meng@noaa.gov 10/2019: Upgraded to v8.0.0
##_____________________________________________________
proc ModulesHelp { } {
puts stderr "Set environment veriables for NCEPPOST"
puts stderr "This module initializes the enviro nment "
puts stderr "for the Intel Compiler Suite $version\n"
}
module-whatis " NCEPPOST lib whatis description"

#set ver v6.3.0
#set envir dev
#set NCEPLIB /nwprod/lib

#set sys [uname sysname]

#setenv COMPF_MP mpiifort
setenv myFC mpiifort
setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -qopenmp -fpp"
setenv myCPP /lib/cpp
setenv myCPPFLAGS "-P"
setenv ARCHV ar
setenv CPPC /lib/cpp
setenv version v8.0.0
#

module purge

# Loading Intel Compiler Suite
#module load intel/19.0.4.243
#module load impi/2019.0.4
module load intel/18.0.5.274
module load impi/2018.0.4

# Loading nceplibs modules
module use -a /scratch2/NCEPDEV/nwprod/NCEPLIBS/modulefiles
module load jasper/1.900.1
module load png/1.2.44
module load z/1.2.11
module load g2/3.1.0
module load g2tmpl/1.5.0
#module load xmlparse/v2.0.0

module load w3emc/2.3.1
module load w3nco/2.0.7
module load bacio/2.0.3
module load gfsio/1.1.0
#module load sigio/2.1.1
module load ip/3.0.2
module load sp/2.0.3
module load crtm/2.2.5


54 changes: 54 additions & 0 deletions modulefiles/post/lib-v8.0.0-wcoss
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#%Module######################################################################
## Jun.Wang@noaa.gov: Started NCEPPOST lib v6.3.0
## Wen.Meng@noaa.gov 10/2019: Upgraded to v8.0.0
##_____________________________________________________
proc ModulesHelp { } {
puts stderr "Set environment veriables for NCEPPOST"
puts stderr "This module initializes the enviro nment "
puts stderr "for the Intel Compiler Suite $version\n"
}
module-whatis " NCEPPOST lib whatis description"

#set ver v6.3.0
#set envir dev
#set NCEPLIB /nwprod/lib

#set sys [uname sysname]

#setenv COMPF_MP mpiifort
setenv myFC mpiifort
setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -qopenmp -fpp"
setenv myCPP /lib/cpp
setenv myCPPFLAGS "-P"
setenv ARCHV ar
setenv CPPC /lib/cpp
setenv version v8.0.0
#

module purge

# Loading Intel Compiler Suite
module load ics/16.0.3
module load ibmpe
#module load ics/15.0.3
##module load ibmpe/1.3.0.12
#module load prod_util/1.1.0

# Loading nceplibs modules
module load jasper/v1.900.1
module load png/v1.2.44
module load z/v1.2.6
module load g2/v3.1.0
module load g2tmpl/v1.5.0
#module load xmlparse/v2.0.0

module load w3emc/v2.2.0
module load w3nco/v2.0.6
module load bacio/v2.0.1
module load gfsio/v1.1.0
#module load sigio/2.1.0
module load ip/v3.0.1
module load sp/v2.0.2
module load crtm/v2.2.4


52 changes: 52 additions & 0 deletions modulefiles/post/lib-v8.0.0-wcoss_dell_p3
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#%Module######################################################################
## Jun.Wang@noaa.gov: Started NCEPPOST lib v6.3.0
## Wen.Meng@noaa.gov 10/2019: Upgraded to v8.0.0
##_____________________________________________________
proc ModulesHelp { } {
puts stderr "Set environment veriables for NCEPPOST"
puts stderr "This module initializes the enviro nment "
puts stderr "for the Intel Compiler Suite $version\n"
}
module-whatis " NCEPPOST lib whatis description"

#set ver v6.3.0
#set envir dev
#set NCEPLIB /nwprod/lib

#set sys [uname sysname]

#setenv COMPF_MP mpiifort
setenv myFC mpiifort
setenv myFCFLAGS "-O3 -convert big_endian -traceback -g -fp-model source -qopenmp -fpp"
setenv myCPP /lib/cpp
setenv myCPPFLAGS "-P"
setenv ARCHV ar
setenv CPPC /lib/cpp
setenv version v8.0.0
#

module purge

# Loading Intel Compiler Suite
module load ips/18.0.1.163
module load impi/18.0.1
#module load prod_util/1.1.0

# Loading nceplibs modules
module load jasper/1.900.1
module load libpng/1.2.59
module load zlib/1.2.11
module load g2/3.1.0
module load g2tmpl/1.5.0
#module load xmlparse/v2.0.0

module load w3emc/2.3.0
module load w3nco/2.0.6
module load bacio/2.0.2
module load gfsio/1.1.0
#module load sigio/2.1.0
module load ip/3.0.1
module load sp/2.0.2
module load crtm/2.2.6


5 changes: 4 additions & 1 deletion sorc/ncep_post.fd/CALWXT_BOURG.f
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ subroutine calwxt_bourg_post(im,jm,jsta_2l,jend_2u,jsta,jend,lm,lp1, &
! initialize weather type array to zero (ie, off).
! we do this since we want ptype to represent the
! instantaneous weather type on return.
print *,'in calwxtbg, jsta,jend=',jsta,jend,' im=',im
print *,'in calwxtbg,me=',me,'iseed=',iseed
!
!$omp parallel do
do j=jsta,jend
Expand All @@ -104,9 +106,10 @@ subroutine calwxt_bourg_post(im,jm,jsta_2l,jend_2u,jsta,jend,lm,lp1, &
!!$omp parallel do &
! & private(a,lmhk,tlmhk,iwrml,psfck,lhiwrm,pintk1,pintk2,area1, &
! & areape,dzkl,surfw,r1,r2)
! print *,' jsta,jend=',jsta,jend,' im=',im
print *,'incalwxtbg, rn',maxval(rn),minval(rn)

do j=jsta,jend
if(me==1)print *,'incalwxtbg, j=',j
do i=1,im
lmhk = min(nint(lmh(i,j)),lm)
psfck = pint(i,j,lmhk+1)
Expand Down
44 changes: 44 additions & 0 deletions sorc/ncep_post.fd/build_ncepost_lib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
SHELL=/bin/sh

module purge
set -x
mac=$(hostname | cut -c1-1)
mac2=$(hostname | cut -c1-2)

if [ $mac2 = hf ] ; then # For Hera
machine=hera
. /etc/profile
. /etc/profile.d/modules.sh
elif [ $mac = v -o $mac = m ] ; then # For Dell
machine=wcoss_dell_p3
. $MODULESHOME/init/bash
elif [ $mac = t -o $mac = e -o $mac = g ] ; then # For WCOSS
machine=wcoss
. /usrx/local/Modules/default/init/bash
elif [ $mac = l -o $mac = s ] ; then # wcoss_c (i.e. luna and surge)
export machine=cray-intel
fi
export version=${1:-"v8.0.0"}

moduledir=`dirname $(readlink -f ../../modulefiles/post)`
module use -a ${moduledir}
module load post/lib-${version}-${machine}
#module load nceppost_modulefile

#
module list

#sleep 1

BASE=`pwd`

#####################################
cd ${BASE}
rm *.o *.mod incmod
#mkdir -m 775 -p $BASE/../../lib/include/ncep_post_${version}_4
make -f makefile_lib clean
mkdir -m 775 -p include/ncep_post_${version}_4
make -f makefile_lib

exit 0

Loading

0 comments on commit 454aa4f

Please sign in to comment.