From 371bd9aece36b22439121d062cd8d40575d86cd1 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Tue, 28 Dec 2021 03:48:50 -0700 Subject: [PATCH] removed legacy manual testing --- tests/README.unit_test | 32 ---- tests/run_all_tests.sh | 28 --- tests/test_cnvgrib_theia.sh | 178 ------------------- tests/test_cnvgrib_wcoss.sh | 171 ------------------- tests/test_copygb2_theia.sh | 228 ------------------------- tests/test_copygb2_wcoss.sh | 222 ------------------------ tests/test_nam_file_cnvgrib_theia.sh | 171 ------------------- tests/test_nam_file_cnvgrib_wcoss.sh | 163 ------------------ tests/test_wgrib2_theia.sh | 246 --------------------------- tests/test_wgrib2_wcoss.sh | 239 -------------------------- tests/test_wgrib_wcoss.sh | 152 ----------------- 11 files changed, 1830 deletions(-) delete mode 100755 tests/README.unit_test delete mode 100755 tests/run_all_tests.sh delete mode 100755 tests/test_cnvgrib_theia.sh delete mode 100755 tests/test_cnvgrib_wcoss.sh delete mode 100755 tests/test_copygb2_theia.sh delete mode 100755 tests/test_copygb2_wcoss.sh delete mode 100755 tests/test_nam_file_cnvgrib_theia.sh delete mode 100755 tests/test_nam_file_cnvgrib_wcoss.sh delete mode 100755 tests/test_wgrib2_theia.sh delete mode 100755 tests/test_wgrib2_wcoss.sh delete mode 100755 tests/test_wgrib_wcoss.sh diff --git a/tests/README.unit_test b/tests/README.unit_test deleted file mode 100755 index 1501ceb0..00000000 --- a/tests/README.unit_test +++ /dev/null @@ -1,32 +0,0 @@ - -The test plans for grib_util v1.1.1 on DELL, CRAY, and IBM are in unit_test: - -1. Change to grib_util.v1.1.1/unit_test -2. There are three scripts to test G2 library version 3.1.0 and grib_util v1.1.1. - Either run them each individually or execute the run_all_tests.sh script. - - A. test_cnvgrib - - This script uses to test cnvgrib - The cnvgrib will correct the forecast hour > F252 when it convert from GRIB2 to GRIB1. - Example: GFS at 00Z forecast hour 264. - NOTE: - cnvgrib (in PROD) converted from GRIB2 to GRIB2 and coded incorrectly forecast 264 in grib1 as 8hr. - New cnvgrib fixed and coded it at 264hr for forecast hour 264. - - B. test_wgrib2.sh - - This script uses to test the wgrib2 in (grib_util.v1.1.1). It is a version 2.0.7 (12/2017) - This script uses WGRIB2 to read GFS GRIB2 file and interpolate to AWIPS 20km and 1.0 deg grids. - - C. test_copygb2.sh - - This script uses to test the utility copygb2 which compiled with new G2 library v3.1.0 - The copygb2 will interpolate to display contentWIPS 20km and 1.0 deg grids. - - - D. test_wgrib.sh - - This script uses to test the wgrib in (grib_util.v1.1.1). It is a version v1.8.2 (03/2017) - This script uses WGRIB to read ecmwf file (which it contains some GRIB2 and GRIB1 records). - diff --git a/tests/run_all_tests.sh b/tests/run_all_tests.sh deleted file mode 100755 index 3a7b3ec6..00000000 --- a/tests/run_all_tests.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -for test_name in cnvgrib copygb2 wgrib2 wgrib -do - export dir=` pwd ` - export data=$dir/data - export output_g1=$dir/output_g1 - export output_g2=$dir/output_g2 - export output_dir=$dir/${test_name}_output - mkdir -p $data $output_g1 $output_g2 $output_dir - echo " " - echo -n " Running test: ${test_name} Please wait ... " - echo " " - ./test_${test_name}_wcoss.sh &>${output_dir}/${test_name}.log - err=$? - echo " " - echo " Finished. " - echo " " - if [ $err -ne 0 ]; then - >&2 echo "WARNING: ONE OR MORE ERRORS WERE REPORTED!" - fi -# mv $data $output_g1 $output_g2 $output_dir/ - echo " " - echo " --> Please view $output_dir/$test_name.log" - echo " " - echo " " -done - diff --git a/tests/test_cnvgrib_theia.sh b/tests/test_cnvgrib_theia.sh deleted file mode 100755 index 36a1c8de..00000000 --- a/tests/test_cnvgrib_theia.sh +++ /dev/null @@ -1,178 +0,0 @@ -#!/bin/sh -# CNVGRIB -# This script uses to test the utility cnvgrib. The script will compare two output files: -# one is cnvgrib (PROD) and cnvgrib (in grib_util.v1.1.1) -# The cnvgrib in grib_util version 1.1.1 will correct the forecast hour > F252 when it converts -# from GRIB2 to GRIB1 for contnuous accumulation precipitation (ACPCP) and APCP -# -# Then, the WGRIB use to display content (inventory) of grib1 file for comparison. -# -# The input are GRIB2 file. The GRIB2 file can be in any model (i.e., GFS, NAM, HRRR, RTMA, ...) -# - -ver=1.1.1 -cyc=00 - -module use /scratch4/NCEPDEV/nems/noscrub/emc.nemspara/soft/modulefiles -module load prod_util -machine=$(getsystem.pl -t) - -if [ "$machine" = "IBM" ] || [ "$machine" = "Cray" ] || [ "$machine" = "Dell" ] || [ "$machine" = "Theia" ] ; then - echo " " - echo " You are on WCOSS: $(getsystem.pl -p)" -else - echo " " - echo " Your machine is $machine NOT found " - echo " The script $0 can not continue. Aborted ! " - echo " " - echo " Your machine must be (SURGE/LUNA)" - echo " or (TIDE/GYRE) or (MARS/VENUS)" - echo " or Theia " - echo " " - exit -fi - -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -# Setup working directories -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -export dir=` pwd ` -export data=$dir/data -output_g1=$dir/output_g1 -output_g2=$dir/output_g2 -mkdir -p $data $output_g1 $output_g2 - -if [ "$machine" = "Dell" ]; then - module load EnvVars/1.0.2 - module load ips/18.0.1.163 - module load prod_util/1.1.0 - module load prod_envir/1.0.2 -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/dev/modulefiles/compiler_nceplibs/ips/18.0.1 - module load dev/grib_util/${ver} - input_file=/usrx/local/nceplibs/dev/lib/fv3gfs -elif [ "$machine" = "IBM" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use -a /usrx/local/nceplibs/modulefiles - module load grib_util/v${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Cray" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/modulefiles - module load grib_util/${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Theia" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /scratch3/NCEPDEV/nwprod/modulefiles - module load grib_util/v${ver} - input_file=/scratch3/NCEPDEV/nwprod/gfs_data -fi - -# These executable files (below) is in GRIB_UTIL.v${ver} -# -cnvgrib_test=$CNVGRIB -echo " " -module list -echo " " - -# -# Clean up temp directory before test starts -# -if [ "$(ls -A $output_g1)" ]; then - echo "Cleaning $output_g1" - rm $output_g1/* -fi -if [ "$(ls -A $output_g2)" ]; then - echo "Cleaning $output_g2" - rm $output_g2/* -fi -if [ "$(ls -A $data)" ]; then - echo "Cleaning $data" - rm $data/* -fi - -# -# Find out if working directory exists or not -# -if [ ! -d $data ] ; then - echo " " - echo " Your working directory $data NOT found " - echo " " - exit 1 -fi - -if [ -f $input_file/gfs.t${cyc}z.pgrb2.0p25.f264 ] ; then - cp $input_file/gfs.t${cyc}z.pgrb2.0p25.f264 $dir/data -else - echo " " - echo " " - echo "GRIB2 File $input_file/gfs.t${cyc}z.pgrb2.0p25.f264 Does Not Exist." - echo " " - echo " No input GRIB2 file to continue " - echo " " - echo " " - exit 1 -fi - -filelist=` ls -1 $dir/data ` -err=0 - -for file in $filelist -do - -# -# Step 1: CNVGRIB converts from GRIB2 to GRIB1 -# -echo "" -echo "" -echo "" -echo "Testing NEW cnvgrib in grib_util.v${ver}" -echo "" -echo "Please wait ... CNVGRIB is converting from GRIB2 to GRIB1 " -echo "" -echo "" -# set -x -$cnvgrib_test -g21 $data/$file $output_g1/$file.grib2.cnvgrib.g1 -echo " just a warning --- Please ignore " -set +x -echo - -echo "Run wgrib1 on GRIB1 file " -# set -x -# ${WGRIB:?} -s $output_g1/$file.grib2.cnvgrib.g1 | cut -d : -f 4-7 > $output_g1/$file.grib2.cnvgrib.g1.wgrib -${WGRIB:?} -s $output_g1/$file.grib2.cnvgrib.g1 |grep ACPCP > $output_g1/$file.grib2.cnvgrib.g1.wgrib -echo " " -cat $output_g1/$file.grib2.cnvgrib.g1.wgrib - -echo " " -echo " NOTE: " -echo " " -echo " CNVGRIB (in PROD) coded incorrect forecast hour > F252 (Example: ACPCP at forecast 264) See below: " -echo " ACPCP:kpds5=63:kpds6=1:kpds7=0:TR=4:P1=0:P2=8:TimeU=1:sfc:0-8hr acc:NAve=0 --> coded at 0-8hr " -echo " " -echo " " -echo " CNVGRIB (NEW ) coded correctly forecast at F264: " -echo " " -echo " ACPCP:kpds5=63:kpds6=1:kpds7=0:TR=4:P1=0:P2=8:TimeU=1:sfc:0-264hr acc:NAve=0 ---> CORRECTED for forecast hour 264hr" -echo " " -echo " PASS: CNVGRIB coded correctly for total continuous precipitation bucket in grib1 file at forecast hour 264. " -echo " " -echo " " -done diff --git a/tests/test_cnvgrib_wcoss.sh b/tests/test_cnvgrib_wcoss.sh deleted file mode 100755 index 20244c44..00000000 --- a/tests/test_cnvgrib_wcoss.sh +++ /dev/null @@ -1,171 +0,0 @@ -#!/bin/sh -# CNVGRIB -# This script uses to test the utility cnvgrib. The script will compare two output files: -# one is cnvgrib (PROD) and cnvgrib (in grib_util.v1.1.1) -# The cnvgrib in grib_util version 1.1.1 will correct the forecast hour > F252 when it converts -# from GRIB2 to GRIB1 for contnuous accumulation precipitation (ACPCP) and APCP -# -# Then, the WGRIB use to display content (inventory) of grib1 file for comparison. -# -# The input are GRIB2 file. The GRIB2 file can be in any model (i.e., GFS, NAM, HRRR, RTMA, ...) -# - -ver=1.1.1 -cyc=00 - -module load prod_util -module load prod_util/1.1.1 -machine=$(getsystem.pl -t) - -if [ "$machine" = "IBM" ] || [ "$machine" = "Cray" ] || [ "$machine" = "Dell" ] ; then - echo " " - echo " You are on WCOSS: $(getsystem.pl -p)" -else - echo " " - echo " Your machine is $machine NOT found " - echo " The script $0 can not continue. Aborted ! " - echo " " - echo " Your machine must be (SURGE/LUNA)" - echo " or (TIDE/GYRE) or (MARS/VENUS)" - echo " " - exit -fi -echo " " - -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -# Setup working directories -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -export dir=` pwd ` -export data=$dir/data -output_g1=$dir/output_g1 -output_g2=$dir/output_g2 -mkdir -p $data $output_g1 $output_g2 - -if [ "$machine" = "Dell" ]; then - module load EnvVars/1.0.2 - module load ips/18.0.1.163 - module load prod_util/1.1.1 - module load prod_envir/1.0.2 -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/dev/modulefiles/compiler_nceplibs/ips/18.0.1 - module load dev/grib_util/${ver} - input_file=/usrx/local/nceplibs/dev/lib/fv3gfs -elif [ "$machine" = "IBM" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use -a /usrx/local/nceplibs/modulefiles - module load grib_util/v${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Cray" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/modulefiles - module load grib_util/${ver} - input_file=/usrx/local/nceplibs/gfs_data -fi - -# -# These executable files (below) is in GRIB_UTIL.v${ver} -# -cnvgrib_test=$CNVGRIB -echo " " -module list -echo " " - -# -# Clean up temp directory before test starts -# -if [ "$(ls -A $output_g1)" ]; then - echo "Cleaning $output_g1" - rm $output_g1/* -fi -if [ "$(ls -A $output_g2)" ]; then - echo "Cleaning $output_g2" - rm $output_g2/* -fi -if [ "$(ls -A $data)" ]; then - echo "Cleaning $data" - rm $data/* -fi - -# -# Find out if working directory exists or not -# -if [ ! -d $data ] ; then - echo " " - echo " Your working directory $data NOT found " - echo " " - exit 1 -fi - -if [ -f $input_file/gfs.t${cyc}z.pgrb2.0p25.f264 ] ; then - cp $input_file/gfs.t${cyc}z.pgrb2.0p25.f264 $dir/data -else - echo " " - echo " " - echo "GRIB2 File $input_file/gfs.t${cyc}z.pgrb2.0p25.f264 Does Not Exist." - echo " " - echo " No input GRIB2 file to continue " - echo " " - echo " " - exit 1 -fi - -filelist=` ls -1 $dir/data ` -err=0 - -for file in $filelist -do - -# -# Step 1: CNVGRIB converts from GRIB2 to GRIB1 -# -echo "" -echo "" -echo "" -echo "Testing NEW cnvgrib in grib_util.v${ver}" -echo "" -echo "Please wait ... CNVGRIB is converting from GRIB2 to GRIB1 " -echo "" -echo "" -# set -x -$cnvgrib_test -g21 $data/$file $output_g1/$file.grib2.cnvgrib.g1 -echo " just a warning --- Please ignore " -set +x -echo - -echo "Run wgrib1 on GRIB1 file " -# set -x -# ${WGRIB:?} -s $output_g1/$file.grib2.cnvgrib.g1 | cut -d : -f 4-7 > $output_g1/$file.grib2.cnvgrib.g1.wgrib -${WGRIB:?} -s $output_g1/$file.grib2.cnvgrib.g1 |grep ACPCP > $output_g1/$file.grib2.cnvgrib.g1.wgrib -echo " " -cat $output_g1/$file.grib2.cnvgrib.g1.wgrib - -echo " " -echo " NOTE: " -echo " " -echo " CNVGRIB (in PROD) coded incorrect forecast hour > F252 (Example: ACPCP at forecast 264) See below: " -echo " ACPCP:kpds5=63:kpds6=1:kpds7=0:TR=4:P1=0:P2=8:TimeU=1:sfc:0-8hr acc:NAve=0 --> coded at 0-8hr " -echo " " -echo " " -echo " CNVGRIB (NEW ) coded correctly forecast at F264: " -echo " " -echo " ACPCP:kpds5=63:kpds6=1:kpds7=0:TR=4:P1=0:P2=8:TimeU=1:sfc:0-264hr acc:NAve=0 ---> CORRECTED for forecast hour 264hr" -echo " " -echo " PASS: CNVGRIB coded correctly for total continuous precipitation bucket in grib1 file at forecast hour 264. " -echo " " -echo " " -done diff --git a/tests/test_copygb2_theia.sh b/tests/test_copygb2_theia.sh deleted file mode 100755 index 427577b5..00000000 --- a/tests/test_copygb2_theia.sh +++ /dev/null @@ -1,228 +0,0 @@ -#!/bin/sh -# -# This script uses to test the utility copygb2 which compiled with new G2 library v3.1.0 -# The copygb2 will interpolate GFS PGRB file to AWIPS 20km (CONUS, Alaska, Puerto Rico and -# Pacific region) grid. -# -# The input are GRIB2 file. The GRIB2 file can be any model (i.e., GFS, NAM, HRRR, RTMA, ...) -# -# NOTE: -# $copygb2_test is new copygb2 which compiled with new G2 library. -# - -ver=1.1.1 -cyc=00 - -module use /scratch4/NCEPDEV/nems/noscrub/emc.nemspara/soft/modulefiles -module load prod_util -machine=$(getsystem.pl -t) - -if [ "$machine" = "IBM" ] || [ "$machine" = "Cray" ] || [ "$machine" = "Dell" ] || [ "$machine" = "Theia" ] ; then - echo " " - echo " You are on WCOSS: $(getsystem.pl -p)" -else - echo " " - echo " Your machine is $machine NOT found " - echo " The script $0 can not continue. Aborted ! " - echo " " - echo " Your machine must be (SURGE/LUNA)" - echo " or (TIDE/GYRE) or (MARS/VENUS)" - echo " or Theia " - echo " " - exit -fi - -# you can change variable dir to temporary -# -# Setup working directories -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -export dir=` pwd ` -export data=$dir/data -output_g1=$dir/output_g1 -output_g2=$dir/output_g2 -mkdir -p $data $output_g1 $output_g2 - -if [ "$machine" = "Dell" ]; then - module load EnvVars/1.0.2 - module load ips/18.0.1.163 - module load prod_util/1.1.0 - module load prod_envir/1.0.2 -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/dev/modulefiles/compiler_nceplibs/ips/18.0.1 - module load dev/grib_util/${ver} - input_file=/usrx/local/nceplibs/dev/lib/fv3gfs -elif [ "$machine" = "IBM" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use -a /usrx/local/nceplibs/modulefiles - module load grib_util/v${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Cray" ]; then - module unload grib_util -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/modulefiles - module load grib_util/${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Theia" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /scratch3/NCEPDEV/nwprod/modulefiles - module load grib_util/v${ver} - input_file=/scratch3/NCEPDEV/nwprod/gfs_data -fi - -# -# These executable files (below) is in GRIB_UTIL.v${ver} -# -copygb2_test=$COPYGB2 -echo " " -module list -echo " " - -# -# Clean up temp directory before test starts -# -if [ "$(ls -A $output_g1)" ]; then - echo "Cleaning $output_g1" - rm $output_g1/* -fi -if [ "$(ls -A $output_g2)" ]; then - echo "Cleaning $output_g2" - rm $output_g2/* -fi -if [ "$(ls -A $data)" ]; then - echo "Cleaning $data" - rm $data/* -fi -# -# Find out if working directory exists or not -# -if [ ! -d $data ] ; then - echo " " - echo " Your working directory $data NOT found " - echo " " - exit 1 -fi - -if [ -f $input_file/gfs.t${cyc}z.pgrb2.0p25.f012 ] ; then - cp $input_file/gfs* $dir/data -else - echo " " - echo " " - echo "GRB2 File $input_file/gfs.t${cyc}z.pgrb2.0p25.f012 Does Not Exist." - echo " " - echo " No input GRIB2 file to continue " - echo " " - echo " " - exit 1 -fi - -cd $data - -filelist=` ls -1 $dir/data ` -err=0 - -for file in $filelist -do -set +x - -export fcsthrs=`echo $file | cut -c 22-24` -######## COPYGB2 ############## - -# for GRID in conus ak prico pac 003 -for GRID in conus -do - case $GRID in - conus) - # Grid 20km_conus - CONUS - 20 km Quadruple Resolution (Lambert Conformal) - export grid_20km_conus="30 6 0 0 0 0 0 0 369 257 12190000 226541000 8 25000000 265000000 20318000 20318000 0 64 25000000 25000000 0 0" - echo " " - echo " Running copygb2_test - Grid 20km_conus" - echo " " - echo " Please wait ..." - echo " " - $copygb2_test -g "$grid_20km_conus" -i0 -x $file $output_g2/awps_f${fcsthrs}_${GRID}_copygb2_test - if [ $? -eq 0 ]; then echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS 20km CONUS grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - ak) - # Grid 20km_ak - Alaska - Double Resolution (Polar Stereographic) - export grid_20km_ak="20 6 0 0 0 0 0 0 277 225 35000000 170000000 8 60000000 210000000 22500000 22500000 0 64" - echo " " - echo " Running copygb2_test - Grid 20km_ak" - echo " " - echo " Please wait ..." - echo " " - $copygb2_test -g "$grid_20km_ak" -i0 -x $file $output_g2/awps_f${fcsthrs}_${GRID}_copygb2_test - if [ $? -eq 0 ]; then echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS 20km Alaska grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - prico) - # Grid 20km_prico - 0.25 degree Lat/Lon grid for Puerto Rico (20km) - export grid_20km_prico="0 6 0 0 0 0 0 0 275 205 0 0 50750000 271750000 48 -250000 340250000 250000 250000 0" - echo " " - echo " Running copygb2_test - Grid 20km_prico" - echo " " - echo " Please wait ..." - echo " " - $copygb2_test -g "$grid_20km_prico" -i0 -x $file $output_g2/awps_f${fcsthrs}_${GRID}_copygb2_test - if [ $? -eq 0 ]; then echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS 20km Puerto Rico grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - pac) - # Grid 20km_pac - 20 km Mercator grid for Pacific Region - export grid_20km_pac="10 6 0 0 0 0 0 0 837 692 -45000000 110000000 48 20000000 65720000 270000000 64 0 20000000 20000000" - echo " " - echo " Running copygb2_test - Grid 20km_pacific" - echo " " - echo " Please wait ..." - echo " " - $copygb2_test -g "$grid_20km_pac" -i0 -x $file $output_g2/awps_f${fcsthrs}_${GRID}_copygb2_test - if [ $? -eq 0 ]; then echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS 20km Pacific grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - 003) - # LAT/LON 1.0 DEGREE (GRID 003) Grid - export grid003="0 6 0 0 0 0 0 0 360 181 0 0 90000000 0 48 -90000000 359000000 1000000 1000000 0" - echo " " - echo " Running copygb2_test - Grid 20km_pacific" - echo " " - echo " Please wait ..." - echo " " - $copygb2_test -g "$grid003" -i0 -x $file $output_g2/awps_f${fcsthrs}_${GRID}_copygb2_test - if [ $? -eq 0 ]; then echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS LAT/LON 1.0 deg grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - esac -done -done - echo " " - echo "The output files are following: " - echo " " - echo " " - ls -l $output_g2/awps_f*_*_copygb2_test - echo " " - echo " " - echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS 20km ${GRID} grids." - echo " " - echo " " -exit - diff --git a/tests/test_copygb2_wcoss.sh b/tests/test_copygb2_wcoss.sh deleted file mode 100755 index 99cc35a9..00000000 --- a/tests/test_copygb2_wcoss.sh +++ /dev/null @@ -1,222 +0,0 @@ -#!/bin/sh -# -# This script uses to test the utility copygb2 which compiled with new G2 library v3.1.0 -# The copygb2 will interpolate GFS PGRB file to AWIPS 20km (CONUS, Alaska, Puerto Rico and -# Pacific region) grid. -# -# The input are GRIB2 file. The GRIB2 file can be any model (i.e., GFS, NAM, HRRR, RTMA, ...) -# -# NOTE: -# $copygb2_test is new copygb2 which compiled with new G2 library. -# - -ver=1.1.1 -cyc=00 - -module load prod_util -module load prod_util/1.1.0 -machine=$(getsystem.pl -t) - -if [ "$machine" = "IBM" ] || [ "$machine" = "Cray" ] || [ "$machine" = "Dell" ] ; then - echo " " - echo " You are on WCOSS: $(getsystem.pl -p)" -else - echo " " - echo " Your machine is $machine NOT found " - echo " The script $0 can not continue. Aborted ! " - echo " " - echo " Your machine must be (SURGE/LUNA)" - echo " or (TIDE/GYRE) or (MARS/VENUS" - echo " " - exit -fi -echo " " - -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -# Setup working directories -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -export dir=` pwd ` -export data=$dir/data -output_g1=$dir/output_g1 -output_g2=$dir/output_g2 -mkdir -p $data $output_g1 $output_g2 - -if [ "$machine" = "Dell" ]; then - module load EnvVars/1.0.2 - module load ips/18.0.1.163 - module load prod_util/1.1.0 - module load prod_envir/1.0.2 -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/dev/modulefiles/compiler_nceplibs/ips/18.0.1 - module load dev/grib_util/${ver} - input_file=/usrx/local/nceplibs/dev/lib/fv3gfs -elif [ "$machine" = "IBM" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/modulefiles - module load grib_util/v${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Cray" ]; then - module unload grib_util -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/modulefiles - module load grib_util/${ver} - input_file=/usrx/local/nceplibs/gfs_data -fi - -# -# These executable files (below) is in GRIB_UTIL.v${ver} -# -copygb2_test=$COPYGB2 -echo " " -module list -echo " " - -# -# Clean up temp directory before test starts -# -if [ "$(ls -A $output_g1)" ]; then - echo "Cleaning $output_g1" - rm $output_g1/* -fi -if [ "$(ls -A $output_g2)" ]; then - echo "Cleaning $output_g2" - rm $output_g2/* -fi -if [ "$(ls -A $data)" ]; then - echo "Cleaning $data" - rm $data/* -fi -# -# Find out if working directory exists or not -# -if [ ! -d $data ] ; then - echo " " - echo " Your working directory $data NOT found " - echo " " - exit 1 -fi - -if [ -f $input_file/gfs.t${cyc}z.pgrb2.0p25.f012 ] ; then - cp $input_file/gfs* $dir/data -else - echo " " - echo " " - echo "GRB2 File $input_file/gfs.t${cyc}z.pgrb2.0p25.f012 Does Not Exist." - echo " " - echo " No input GRIB2 file to continue " - echo " " - echo " " - exit 1 -fi - -cd $data - -filelist=` ls -1 $dir/data ` -err=0 - -for file in $filelist -do -set +x - -export fcsthrs=`echo $file | cut -c 22-24` -######## COPYGB2 ############## - -# for GRID in conus ak prico pac 003 -for GRID in conus -do - case $GRID in - conus) - # Grid 20km_conus - CONUS - 20 km Quadruple Resolution (Lambert Conformal) - export grid_20km_conus="30 6 0 0 0 0 0 0 369 257 12190000 226541000 8 25000000 265000000 20318000 20318000 0 64 25000000 25000000 0 0" - echo " " - echo " Running copygb2_test - Grid 20km_conus" - echo " " - echo " Please wait ..." - echo " " - $copygb2_test -g "$grid_20km_conus" -i0 -x $file $output_g2/awps_f${fcsthrs}_${GRID}_copygb2_test - if [ $? -eq 0 ]; then echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS 20km CONUS grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - ak) - # Grid 20km_ak - Alaska - Double Resolution (Polar Stereographic) - export grid_20km_ak="20 6 0 0 0 0 0 0 277 225 35000000 170000000 8 60000000 210000000 22500000 22500000 0 64" - echo " " - echo " Running copygb2_test - Grid 20km_ak" - echo " " - echo " Please wait ..." - echo " " - $copygb2_test -g "$grid_20km_ak" -i0 -x $file $output_g2/awps_f${fcsthrs}_${GRID}_copygb2_test - if [ $? -eq 0 ]; then echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS 20km Alaska grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - prico) - # Grid 20km_prico - 0.25 degree Lat/Lon grid for Puerto Rico (20km) - export grid_20km_prico="0 6 0 0 0 0 0 0 275 205 0 0 50750000 271750000 48 -250000 340250000 250000 250000 0" - echo " " - echo " Running copygb2_test - Grid 20km_prico" - echo " " - echo " Please wait ..." - echo " " - $copygb2_test -g "$grid_20km_prico" -i0 -x $file $output_g2/awps_f${fcsthrs}_${GRID}_copygb2_test - if [ $? -eq 0 ]; then echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS 20km Puerto Rico grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - pac) - # Grid 20km_pac - 20 km Mercator grid for Pacific Region - export grid_20km_pac="10 6 0 0 0 0 0 0 837 692 -45000000 110000000 48 20000000 65720000 270000000 64 0 20000000 20000000" - echo " " - echo " Running copygb2_test - Grid 20km_pacific" - echo " " - echo " Please wait ..." - echo " " - $copygb2_test -g "$grid_20km_pac" -i0 -x $file $output_g2/awps_f${fcsthrs}_${GRID}_copygb2_test - if [ $? -eq 0 ]; then echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS 20km Pacific grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - 003) - # LAT/LON 1.0 DEGREE (GRID 003) Grid - export grid003="0 6 0 0 0 0 0 0 360 181 0 0 90000000 0 48 -90000000 359000000 1000000 1000000 0" - echo " " - echo " Running copygb2_test - Grid 20km_pacific" - echo " " - echo " Please wait ..." - echo " " - $copygb2_test -g "$grid003" -i0 -x $file $output_g2/awps_f${fcsthrs}_${GRID}_copygb2_test - if [ $? -eq 0 ]; then echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS LAT/LON 1.0 deg grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - esac -done -done - echo " " - echo "The output files are following: " - echo " " - echo " " - ls -l $output_g2/awps_f*_*_copygb2_test - echo " " - echo " " - echo " PASS: copygb2 successfully interpolates GFS PGRB2 file to AWIPS 20km ${GRID} grids." - echo " " - echo " " -exit - diff --git a/tests/test_nam_file_cnvgrib_theia.sh b/tests/test_nam_file_cnvgrib_theia.sh deleted file mode 100755 index f6da311c..00000000 --- a/tests/test_nam_file_cnvgrib_theia.sh +++ /dev/null @@ -1,171 +0,0 @@ -#!/bin/sh -# -# This script uses to test the utility cnvgrib which compiled with new G2 library v3.1.0 -# The conversion cnvgrib will convert (NAM file) from grib2 to grib1. -# Then, the WGRIB uses to display data values : min and max at HGT 800mb field for comparison -# -# The input are GRIB2 file. -# -# NOTE: -# $cnvgrib_test is new cnvgrib which compiled with new G2 library. -# - -ver=1.1.1 -cyc=18 - -module use /scratch4/NCEPDEV/nems/noscrub/emc.nemspara/soft/modulefiles -module load prod_util -machine=$(getsystem.pl -t) - -if [ "$machine" = "IBM" ] || [ "$machine" = "Cray" ] || [ "$machine" = "Dell" ] || [ "$machine" = "Theia" ] ; then - echo " " - echo " You are on WCOSS: $(getsystem.pl -p)" -else - echo " " - echo " Your machine is $machine NOT found " - echo " The script $0 can not continue. Aborted ! " - echo " " - echo " Your machine must be (SURGE/LUNA)" - echo " or (TIDE/GYRE) or (MARS/VENUS)" - echo " or Theia " - echo " " - exit -fi - -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -# Setup working directories -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -export dir=` pwd ` -export data=$dir/data -output_g1=$dir/output_g1 -output_g2=$dir/output_g2 -mkdir -p $data $output_g1 $output_g2 - -if [ "$machine" = "Dell" ]; then - module load EnvVars/1.0.2 - module load ips/18.0.1.163 - module load prod_util/1.1.0 - module load prod_envir/1.0.2 -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/dev/modulefiles/compiler_nceplibs/ips/18.0.1 - module load dev/grib_util/${ver} - input_file=/usrx/local/nceplibs/dev/lib/fv3gfs -elif [ "$machine" = "IBM" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use -a /usrx/local/nceplibs/grib_util.v${ver}/modulefiles - module load grib_util/v${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Cray" ]; then - module unload grib_util -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/modulefiles - module load grib_util/${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Theia" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /scratch3/NCEPDEV/nwprod/modulefiles - module load grib_util/v${ver} - input_file=/scratch3/NCEPDEV/nwprod/gfs_data -fi - -# -# These executable files (below) is in GRIB_UTIL.v${ver} -# -cnvgrib_test=$CNVGRIB -echo " " -module list -echo " " - -# -# Clean up temp directory before test starts -# -if [ "$(ls -A $output_g1)" ]; then - echo "Cleaning $output_g1" - rm $output_g1/* -fi -if [ "$(ls -A $output_g2)" ]; then - echo "Cleaning $output_g2" - rm $output_g2/* -fi -if [ "$(ls -A $data)" ]; then - echo "Cleaning $data" - rm $data/* -fi - -# -# Find out if working directory exists or not -# -if [ ! -d $data ] ; then - echo " " - echo " Your working directory $data NOT found " - echo " " - exit 1 -fi - -if [ -f $input_file/nam.t${cyc}z.awp15178.tm00.grib2 ] ; then - cp $input_file/nam* $dir/data -else - echo " " - echo " " - echo "GRIB2 File $input_file/nam.t${cyc}z.awp15178.tm00.grib2 Does Not Exist." - echo " " - echo " No input GRIB2 file to continue " - echo " " - echo " " - exit 1 -fi - -filelist=` ls -1 $dir/data ` -err=0 - -for file in $filelist -do - -echo " dir $dir " -echo " file $dir/$file " -echo " data $data/$file " - -# -# Step 1: CNVGRIB converts from GRIB2 to GRIB1 -# - -echo "Running cnvgrib (converts from grib2 -> grib1)" -set -x -$cnvgrib_test -g21 $data/$file $output_g1/$file.grib2.test.g1 -if [ $? -ne 0 ]; then err=1; fi -set +x -echo - -export new_max=` ${WGRIB:?} -s $output_g1/$file.grib2.test.g1 | grep ":HGT:800 mb:" | $WGRIB -i -V $output_g1/$file.grib2.test.g1 \ - -o /dev/null | grep max | awk '{print $4}' ` -export new_min=` ${WGRIB:?} -s $output_g1/$file.grib2.test.g1 | grep ":HGT:800 mb:" | $WGRIB -i -V $output_g1/$file.grib2.test.g1 \ - -o /dev/null | grep max | awk '{print $3}' ` - -echo " The new cnvgrib (cnvgrib v3.1.0) convert NAM file from GRIB2 to GRIB1." -echo " The data value MAX and MIN at HGT 800mb are correct " - -echo " " -echo " Data value MAX = " $new_max -echo " " -echo " Data value MIN = " $new_min -echo " " -done -exit diff --git a/tests/test_nam_file_cnvgrib_wcoss.sh b/tests/test_nam_file_cnvgrib_wcoss.sh deleted file mode 100755 index 1c815304..00000000 --- a/tests/test_nam_file_cnvgrib_wcoss.sh +++ /dev/null @@ -1,163 +0,0 @@ -#!/bin/sh -# -# This script uses to test the utility cnvgrib which compiled with new G2 library v3.1.0 -# The conversion cnvgrib will convert (NAM file) from grib2 to grib1. -# Then, the WGRIB uses to display data values : min and max at HGT 800mb field for comparison -# -# The input are GRIB2 file. -# -# NOTE: -# $cnvgrib_test is new cnvgrib which compiled with new G2 library. -# - -ver=1.1.1 -cyc=18 - -module load prod_util -module load prod_util/1.1.0 -machine=$(getsystem.pl -t) - -if [ "$machine" = "IBM" ] || [ "$machine" = "Cray" ] || [ "$machine" = "Dell" ] ; then - echo " " - echo " You are on WCOSS: $(getsystem.pl -p)" -else - echo " " - echo " Your machine is $machine NOT found " - echo " The script $0 can not continue. Aborted ! " - echo " " - echo " Your machine must be (SURGE/LUNA)" - echo " or (TIDE/GYRE) or (MARS/VENUS)" - echo " " - exit -fi -echo " " - -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -# Setup working directories -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -export dir=` pwd ` -export data=$dir/data -output_g1=$dir/output_g1 -output_g2=$dir/output_g2 -mkdir -p $data $output_g1 $output_g2 - -if [ "$machine" = "Dell" ]; then - module load EnvVars/1.0.2 - module load ips/18.0.1.163 - module load prod_util/1.1.0 - module load prod_envir/1.0.2 -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/dev/modulefiles/compiler_nceplibs/ips/18.0.1 - module load dev/grib_util/${ver} - input_file=/usrx/local/nceplibs/dev/lib/fv3gfs -elif [ "$machine" = "IBM" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use -a /usrx/local/nceplibs/modulefiles - module load grib_util/v${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Cray" ]; then - module unload grib_util -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/modulefiles - module load grib_util/${ver} - input_file=/usrx/local/nceplibs/gfs_data -fi - -# -# These executable files (below) is in GRIB_UTIL.v${ver} -# -cnvgrib_test=$CNVGRIB -echo " " -module list -echo " " - -# -# Clean up temp directory before test starts -# -if [ "$(ls -A $output_g1)" ]; then - echo "Cleaning $output_g1" - rm $output_g1/* -fi -if [ "$(ls -A $output_g2)" ]; then - echo "Cleaning $output_g2" - rm $output_g2/* -fi -if [ "$(ls -A $data)" ]; then - echo "Cleaning $data" - rm $data/* -fi - -# -# Find out if working directory exists or not -# -if [ ! -d $data ] ; then - echo " " - echo " Your working directory $data NOT found " - echo " " - exit 1 -fi - -if [ -f $input_file/nam.t${cyc}z.awp15178.tm00.grib2 ] ; then - cp $input_file/nam* $dir/data -else - echo " " - echo " " - echo "GRIB2 File $input_file/nam.t${cyc}z.awp15178.tm00.grib2 Does Not Exist." - echo " " - echo " No input GRIB2 file to continue " - echo " " - echo " " - exit 1 -fi - -filelist=` ls -1 $dir/data ` -err=0 - -for file in $filelist -do - -echo " dir $dir " -echo " file $dir/$file " -echo " data $data/$file " - -# -# Step 1: CNVGRIB converts from GRIB2 to GRIB1 -# - -echo "Running cnvgrib (converts from grib2 -> grib1)" -set -x -$cnvgrib_test -g21 $data/$file $output_g1/$file.grib2.test.g1 -if [ $? -ne 0 ]; then err=1; fi -set +x -echo - -export new_max=` ${WGRIB:?} -s $output_g1/$file.grib2.test.g1 | grep ":HGT:800 mb:" | $WGRIB -i -V $output_g1/$file.grib2.test.g1 \ - -o /dev/null | grep max | awk '{print $4}' ` -export new_min=` ${WGRIB:?} -s $output_g1/$file.grib2.test.g1 | grep ":HGT:800 mb:" | $WGRIB -i -V $output_g1/$file.grib2.test.g1 \ - -o /dev/null | grep max | awk '{print $3}' ` - -echo " The new cnvgrib (cnvgrib v3.1.0) convert NAM file from GRIB2 to GRIB1." -echo " The data value MAX and MIN at HGT 800mb are correct " - -echo " " -echo " Data value MAX = " $new_max -echo " " -echo " Data value MIN = " $new_min -echo " " -done -exit diff --git a/tests/test_wgrib2_theia.sh b/tests/test_wgrib2_theia.sh deleted file mode 100755 index f57fdc4a..00000000 --- a/tests/test_wgrib2_theia.sh +++ /dev/null @@ -1,246 +0,0 @@ -#!/bin/sh -# -# This script uses to test the utility wgrib2 which compiled with new G2 library v3.1.0 -# The wgrib2 will interpolate GFS PGRB file to AWIPS 20km (CONUS, Alaska, Puerto Rico and -# Pacific region) grid. -# -# The input are GRIB2 file. The GRIB2 file can be any model (i.e., GFS, NAM, HRRR, RTMA, ...) -# -# NOTE: -# $wgrib2_test is new wgrib2 which compiled with new G2 library. -# - -ver=1.1.1 -cyc=00 - -machine=$(getsystem.pl -t) - -if [ "$machine" = "IBM" ] || [ "$machine" = "Cray" ] || [ "$machine" = "Dell" ] || [ "$machine" = "Theia" ] ; then - echo " " - echo " You are on WCOSS: $(getsystem.pl -p)" -else - echo " " - echo " Your machine is $machine NOT found " - echo " The script $0 can not continue. Aborted ! " - echo " " - echo " Your machine must be (SURGE/LUNA)" - echo " or (TIDE/GYRE) or (MARS/VENUS)" - echo " or Theia " - echo " " - exit -fi - -echo " " - -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -# Setup working directories -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -export dir=` pwd ` -export data=$dir/data -output_g1=$dir/output_g1 -output_g2=$dir/output_g2 -mkdir -p $data $output_g1 $output_g2 - -if [ "$machine" = "Dell" ]; then - module load EnvVars/1.0.2 - module load ips/18.0.1.163 - module load prod_util/1.1.0 - module load prod_envir/1.0.2 -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/dev/modulefiles/compiler_nceplibs/ips/18.0.1 - module load dev/grib_util/${ver} - input_file=/usrx/local/nceplibs/dev/lib/fv3gfs -elif [ "$machine" = "IBM" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use -a /usrx/local/nceplibs/modulefiles - module load grib_util/v${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Cray" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/modulefiles - module load grib_util/${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Theia" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /scratch3/NCEPDEV/nwprod/modulefiles - module load grib_util/v${ver} - input_file=/scratch3/NCEPDEV/nwprod/gfs_data -fi - -# -# These executable files (below) is in GRIB_UTIL.v${ver} -# -wgrib2_test=$WGRIB2 -echo " " -module list -echo " " - -# -# Clean up temp directory before test starts -# -if [ "$(ls -A $output_g1)" ]; then - echo "Cleaning $output_g1" - rm $output_g1/* -fi -if [ "$(ls -A $output_g2)" ]; then - echo "Cleaning $output_g2" - rm $output_g2/* -fi -if [ "$(ls -A $data)" ]; then - echo "Cleaning $data" - rm $data/* -fi -# -# Find out if working directory exists or not -# -if [ ! -d $data ] ; then - echo " " - echo " Your working directory $data NOT found " - echo " " - exit 1 -fi - -if [ -f $input_file/gfs.t${cyc}z.pgrb2.0p25.f012 ] ; then - cp $input_file/gfs* $dir/data -else - echo " " - echo " " - echo "GRB2 File $input_file/gfs.t${cyc}z.pgrb2.0p25.f012 Does Not Exist." - echo " " - echo " No input GRIB2 file to continue " - echo " " - echo " " - exit 1 -fi - -cd $data - -filelist=` ls -1 $dir/data ` -err=0 - -for file in $filelist -do -set +x - -export fcsthrs=`echo $file | cut -c 22-24` -######## WGRIB2 ############## - -# Set type of Interpolation for WGRIB2 -export opt1=' -set_grib_type same -new_grid_winds earth ' -export opt1uv=' -set_grib_type same -new_grid_winds grid ' -export opt21=' -new_grid_interpolation bilinear -if ' -export opt22=":(LAND|CSNOW|CRAIN|CFRZR|CICEP|ICSEV):" -export opt23=' -new_grid_interpolation neighbor -fi ' -export opt24=' -set_bitmap 1 -set_grib_max_bits 16 -if ' -export opt25=":(APCP|ACPCP|PRATE|CPRAT):" -export opt26=' -set_grib_max_bits 25 -fi -if ' -export opt27=":(APCP|ACPCP|PRATE|CPRAT|DZDT):" -export opt28=' -new_grid_interpolation budget -fi ' - -# for GRID in conus ak prico pac 003 -for GRID in conus -do - case $GRID in - conus) - # Grid 20km_conus - CONUS - 20 km Quadruple Resolution (Lambert Conformal) - echo " " - echo " Running WGRIB2 - Grid 20km_conus" - echo " " - echo " Please wait ..." - echo " " - export gridconus="lambert:265.0:25.0:25.0 226.541:369:20318.0 12.19:257:20318.0" - $wgrib2_test $file $opt1uv $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $gridconus $output_g2/awps_f${fcsthrs}_${GRID}_wgrib2_test - echo " " - if [ $? -eq 0 ]; then echo " PASS: wgrib2 successfully interpolates GFS PGRB2 file to AWIPS 20km CONUS grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - ak) - # Grid 20km_ak - Alaska - Double Resolution (Polar Stereographic) - echo " " - echo " Running WGRIB2 - Grid 20km_ak" - echo " " - echo " Please wait ..." - echo " " - export gridak="nps:210.0:60.0 170.0:277:22500 35.0:225:22500" - $wgrib2_test $file $opt1uv $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $gridak $output_g2/awps_f${fcsthrs}_${GRID}_wgrib2_test - echo " " - if [ $? -eq 0 ]; then echo " PASS: wgrib2 successfully interpolates GFS PGRB2 file to AWIPS 20km Alaska grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - prico) - # Grid 20km_prico - 0.25 degree Lat/Lon grid for Puerto Rico (20km) - echo " " - echo " Running WGRIB2 - Grid 20km_prico" - echo " " - echo " Please wait ..." - echo " " - export gridprico="latlon 271.75:275:0.25 50.75:205:-0.25" - $wgrib2_test $file $opt1 $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $gridprico $output_g2/awps_f${fcsthrs}_${GRID}_wgrib2_test - echo " " - if [ $? -eq 0 ]; then echo " PASS: wgrib2 successfully interpolates GFS PGRB2 file to AWIPS 20km Puerto Rico grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - pac) - # Grid 20km_pac - 20 km Mercator grid for Pacific Region - echo " " - echo " Running WGRIB2 - Grid 20km_pacific" - echo " " - echo " Please wait ..." - echo " " - export gridpac="mercator:20.0 110.0:837:20000:270.0 -45.0:725:20000:65.7345" - $wgrib2_test $file $opt1 $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $gridpac $output_g2/awps_f${fcsthrs}_${GRID}_wgrib2_test - echo " " - if [ $? -eq 0 ]; then echo " PASS: wgrib2 successfully interpolates GFS PGRB2 file to AWIPS 20km Pacific grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - 003) - # LAT/LON 1.0 DEGREE (GRID 003) Grid - echo " " - echo " Running WGRIB2 - Grid 20km_pacific" - echo " " - echo " Please wait ..." - echo " " - export grid003="latlon 0:360:1.0 90:181:-1.0" - $wgrib2_test $file $opt1 $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $grid003 $output_g2/awps_f${fcsthrs}_${GRID}_wgrib2_test - echo " " - if [ $? -eq 0 ]; then echo " PASS: wgrib2 successfully interpolates GFS PGRB2 file to LAT/LON 1.0 deg grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - esac -done -done - echo " " - echo "The output files are following: " - echo " " - echo " " - ls -l $output_g2/awps_f*_*_wgrib2_test - echo " " - echo " " - echo " PASS: wgrib2 successfully interpolates for AWIPS 20km grids." - echo " " - echo " " -exit - diff --git a/tests/test_wgrib2_wcoss.sh b/tests/test_wgrib2_wcoss.sh deleted file mode 100755 index 8a5dae2b..00000000 --- a/tests/test_wgrib2_wcoss.sh +++ /dev/null @@ -1,239 +0,0 @@ -#!/bin/sh -# -# This script uses to test the utility wgrib2 which compiled with new G2 library v3.1.0 -# The wgrib2 will interpolate GFS PGRB file to AWIPS 20km (CONUS, Alaska, Puerto Rico and -# Pacific region) grid. -# -# The input are GRIB2 file. The GRIB2 file can be any model (i.e., GFS, NAM, HRRR, RTMA, ...) -# -# NOTE: -# $wgrib2_test is new wgrib2 which compiled with new G2 library. -# - -ver=1.1.1 -cyc=00 - -module load prod_util -module load prod_util/1.1.0 -machine=$(getsystem.pl -t) - -if [ "$machine" = "IBM" ] || [ "$machine" = "Cray" ] || [ "$machine" = "Dell" ] ; then - echo " " - echo " You are on WCOSS: $(getsystem.pl -p)" -else - echo " " - echo " Your machine is $machine NOT found " - echo " The script $0 can not continue. Aborted ! " - echo " " - echo " Your machine must be (SURGE/LUNA)" - echo " or (TIDE/GYRE) or (MARS/VENUS)" - echo " " - exit -fi -echo " " - -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -# Setup working directories -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -export dir=` pwd ` -export data=$dir/data -output_g1=$dir/output_g1 -output_g2=$dir/output_g2 -mkdir -p $data $output_g1 $output_g2 - -if [ "$machine" = "Dell" ]; then - module load EnvVars/1.0.2 - module load ips/18.0.1.163 - module load prod_util/1.1.0 - module load prod_envir/1.0.2 -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/dev/modulefiles/compiler_nceplibs/ips/18.0.1 - module load dev/grib_util/${ver} - input_file=/usrx/local/nceplibs/dev/lib/fv3gfs -elif [ "$machine" = "IBM" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use -a /usrx/local/nceplibs/modulefiles - module load grib_util/v${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Cray" ]; then - module unload grib_util -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/modulefiles - module load grib_util/${ver} - input_file=/usrx/local/nceplibs/gfs_data -fi - -# -# These executable files (below) is in GRIB_UTIL.v${ver} -# -wgrib2_test=$WGRIB2 -echo " " -module list -echo " " - -# -# Clean up temp directory before test starts -# -if [ "$(ls -A $output_g1)" ]; then - echo "Cleaning $output_g1" - rm $output_g1/* -fi -if [ "$(ls -A $output_g2)" ]; then - echo "Cleaning $output_g2" - rm $output_g2/* -fi -if [ "$(ls -A $data)" ]; then - echo "Cleaning $data" - rm $data/* -fi -# -# Find out if working directory exists or not -# -if [ ! -d $data ] ; then - echo " " - echo " Your working directory $data NOT found " - echo " " - exit 1 -fi - -if [ -f $input_file/gfs.t${cyc}z.pgrb2.0p25.f012 ] ; then - cp $input_file/gfs* $dir/data -else - echo " " - echo " " - echo "GRB2 File $input_file/gfs.t${cyc}z.pgrb2.0p25.f012 Does Not Exist." - echo " " - echo " No input GRIB2 file to continue " - echo " " - echo " " - exit 1 -fi - -cd $data - -filelist=` ls -1 $dir/data ` -err=0 - -for file in $filelist -do -set +x - -export fcsthrs=`echo $file | cut -c 22-24` -######## WGRIB2 ############## - -# Set type of Interpolation for WGRIB2 -export opt1=' -set_grib_type same -new_grid_winds earth ' -export opt1uv=' -set_grib_type same -new_grid_winds grid ' -export opt21=' -new_grid_interpolation bilinear -if ' -export opt22=":(LAND|CSNOW|CRAIN|CFRZR|CICEP|ICSEV):" -export opt23=' -new_grid_interpolation neighbor -fi ' -export opt24=' -set_bitmap 1 -set_grib_max_bits 16 -if ' -export opt25=":(APCP|ACPCP|PRATE|CPRAT):" -export opt26=' -set_grib_max_bits 25 -fi -if ' -export opt27=":(APCP|ACPCP|PRATE|CPRAT|DZDT):" -export opt28=' -new_grid_interpolation budget -fi ' - -# for GRID in conus ak prico pac 003 -for GRID in conus -do - case $GRID in - conus) - # Grid 20km_conus - CONUS - 20 km Quadruple Resolution (Lambert Conformal) - echo " " - echo " Running WGRIB2 - Grid 20km_conus" - echo " " - echo " Please wait ..." - echo " " - export gridconus="lambert:265.0:25.0:25.0 226.541:369:20318.0 12.19:257:20318.0" - $wgrib2_test $file $opt1uv $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $gridconus $output_g2/awps_f${fcsthrs}_${GRID}_wgrib2_test - echo " " - if [ $? -eq 0 ]; then echo " PASS: wgrib2 successfully interpolates GFS PGRB2 file to AWIPS 20km CONUS grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - ak) - # Grid 20km_ak - Alaska - Double Resolution (Polar Stereographic) - echo " " - echo " Running WGRIB2 - Grid 20km_ak" - echo " " - echo " Please wait ..." - echo " " - export gridak="nps:210.0:60.0 170.0:277:22500 35.0:225:22500" - $wgrib2_test $file $opt1uv $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $gridak $output_g2/awps_f${fcsthrs}_${GRID}_wgrib2_test - echo " " - if [ $? -eq 0 ]; then echo " PASS: wgrib2 successfully interpolates GFS PGRB2 file to AWIPS 20km Alaska grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - prico) - # Grid 20km_prico - 0.25 degree Lat/Lon grid for Puerto Rico (20km) - echo " " - echo " Running WGRIB2 - Grid 20km_prico" - echo " " - echo " Please wait ..." - echo " " - export gridprico="latlon 271.75:275:0.25 50.75:205:-0.25" - $wgrib2_test $file $opt1 $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $gridprico $output_g2/awps_f${fcsthrs}_${GRID}_wgrib2_test - echo " " - if [ $? -eq 0 ]; then echo " PASS: wgrib2 successfully interpolates GFS PGRB2 file to AWIPS 20km Puerto Rico grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - pac) - # Grid 20km_pac - 20 km Mercator grid for Pacific Region - echo " " - echo " Running WGRIB2 - Grid 20km_pacific" - echo " " - echo " Please wait ..." - echo " " - export gridpac="mercator:20.0 110.0:837:20000:270.0 -45.0:725:20000:65.7345" - $wgrib2_test $file $opt1 $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $gridpac $output_g2/awps_f${fcsthrs}_${GRID}_wgrib2_test - echo " " - if [ $? -eq 0 ]; then echo " PASS: wgrib2 successfully interpolates GFS PGRB2 file to AWIPS 20km Pacific grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - 003) - # LAT/LON 1.0 DEGREE (GRID 003) Grid - echo " " - echo " Running WGRIB2 - Grid 20km_pacific" - echo " " - echo " Please wait ..." - echo " " - export grid003="latlon 0:360:1.0 90:181:-1.0" - $wgrib2_test $file $opt1 $opt21 $opt22 $opt23 $opt24 $opt25 $opt26 $opt27 $opt28 -new_grid $grid003 $output_g2/awps_f${fcsthrs}_${GRID}_wgrib2_test - echo " " - if [ $? -eq 0 ]; then echo " PASS: wgrib2 successfully interpolates GFS PGRB2 file to LAT/LON 1.0 deg grid."; else echo "FAIL!"; err=1; fi - echo " " - echo " " - ;; - esac -done -done - echo " " - echo "The output files are following: " - echo " " - echo " " - ls -l $output_g2/awps_f*_*_wgrib2_test - echo " " - echo " " - echo " PASS: wgrib2 successfully interpolates for AWIPS 20km grids." - echo " " - echo " " -exit - diff --git a/tests/test_wgrib_wcoss.sh b/tests/test_wgrib_wcoss.sh deleted file mode 100755 index 03627b9f..00000000 --- a/tests/test_wgrib_wcoss.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/bin/sh -# -# This script uses to test the utility wgrib. The wgrib will display the inventory of GRIB1 file. -# The test uses wgrib to display content of ecmwf file. -# Note: -# The ecmwf file contains both GRIB2 and GRIB1. - -ver=1.1.1 -cyc=00 - -module load prod_util -module load prod_util/1.1.0 -machine=$(getsystem.pl -t) - -if [ "$machine" = "IBM" ] || [ "$machine" = "Cray" ] || [ "$machine" = "Dell" ] ; then - echo " " - echo " You are on WCOSS: $(getsystem.pl -p)" -else - echo " " - echo " Your machine is $machine NOT found " - echo " The script $0 can not continue. Aborted ! " - echo " " - echo " Your machine must be (SURGE/LUNA)" - echo " or (TIDE/GYRE) or (MARS/VENUS)" - echo " " - exit -fi -echo " " - -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -# Setup working directories -# -# If you want to use temporary directories, -# you can change variable dir to temporary -# -export dir=` pwd ` -export data=$dir/data -output_g1=$dir/output_g1 -output_g2=$dir/output_g2 -mkdir -p $data $output_g1 $output_g2 - -if [ "$machine" = "Dell" ]; then - module load EnvVars/1.0.2 - module load ips/18.0.1.163 - module load prod_util/1.1.0 - module load prod_envir/1.0.2 -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/dev/modulefiles/compiler_nceplibs/ips/18.0.1 - module load dev/grib_util/${ver} - input_file=/usrx/local/nceplibs/dev/lib/fv3gfs -elif [ "$machine" = "IBM" ]; then -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use -a /usrx/local/nceplibs/modulefiles - module load grib_util/v${ver} - input_file=/usrx/local/nceplibs/gfs_data -elif [ "$machine" = "Cray" ]; then - module unload grib_util -# -# This is a test version of GRIB_UTIL.v${ver} on $machine -# - module unload grib_util - module use /usrx/local/nceplibs/modulefiles - module load grib_util/${ver} - input_file=/usrx/local/nceplibs/gfs_data -fi - -# -# These executable files (below) is in GRIB_UTIL.v${ver} -# -wgrib=$WGRIB -echo " " -module list -echo " " - -# -# Clean up temp directory before test starts -# -if [ "$(ls -A $output_g1)" ]; then - echo "Cleaning $output_g1" - rm $output_g1/* -fi -if [ "$(ls -A $output_g2)" ]; then - echo "Cleaning $output_g2" - rm $output_g2/* -fi -if [ "$(ls -A $data)" ]; then - echo "Cleaning $data" - rm $data/* -fi -# -# Find out if working directory exists or not -# -if [ ! -d $data ] ; then - echo " " - echo " Your working directory $data NOT found " - echo " " - exit 1 -fi - -if [ -f $input_file/U1D05081200050909001 ] ; then - cp $input_file/U1D05081200050909001 $dir/data -else - echo " " - echo " " - echo "ECMWF File $input_file/U1D05081200050909001 Does Not Exist." - echo " " - echo " No input ECMWF file to continue " - echo " " - echo " " - exit 1 -fi - -cd $data - -filelist=` ls -1 $dir/data ` -err=0 - -for file in $filelist -do - set +x - echo " " - echo " Running WGRIB " - echo " " - echo " Please wait ..." - echo " " - $wgrib $file > $output_g1/$file.txt - echo " " - if [ $? -eq 0 ]; then echo " PASS: wgrib successfully list all records in ecmwf file"; else echo "FAIL!"; err=1; fi - echo " " - echo " " -done -echo " " -echo "The output file is following: " -echo " " -echo " " -ls -l $output_g1/$file.txt -echo " " -echo " " -echo " PASS: wgrib successfully list all records in ecmwf file" -echo " " -echo " " -exit -