Skip to content

Commit 884c1d1

Browse files
committed
Merge branch 'release-v4.4'
This merge finalizes the v4.4 release by adding changes from the 'release-v4.4' branch onto the 'master' branch. * release-v4.4: (22 commits) Update version number to 4.4 adding capability to turn off subgrid processing using subgrid_ratio_x=0 or subgrid_ratio_y=0 Updating/adding METGRID.TBL entries for Thompson AA microphysics scheme Fixing domain dx and dy in calc_dfdx and calc_dfdy Fixing bug in calc_dfdx and calc_dfdy drainage_map tile-drainage-map Remove METGRID.TBL.NMM and METGRID.TBL.NMM.rap files adding subgrid shifting fix into metgrid No more NMM support available in WRF model Added bathymetry section to GEOGRID.TBL.ARW If internal GRIB2 libs will be compiled, don't show user NO_GRIB2 config options Add 'grib2' to the top-level .gitignore file Fix dependencies in ungrib/src/Makefile to allow just g2print to be compiled Update ungrib Makefile to support internally-compiled GRIB2 libs Modify Config.pl to set INTERNAL_GRIB2_PATH in preamble based on grib2dir argument Modify configure script to recognize --build-grib2-libs option Add .gitignore in external/ to ignore files created when building GRIB2 libs Add Makefile in the external directory Fix compilation errors in JasPer library with GNU 9.2.0 compilers on macOS ...
2 parents 7d7a080 + 77d2cc3 commit 884c1d1

File tree

1,062 files changed

+361590
-1395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,062 files changed

+361590
-1395
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ ungrib.exe
33
metgrid.exe
44
configure.wps
55
configure.wps.backup
6+
7+
# Compiled GRIB2 libraries if --build-grib2-libs option is given to configure script
8+
grib2

README

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
WRF Pre-Processing System Version 4.3.1
1+
WRF Pre-Processing System Version 4.4
22

33
http://www2.mmm.ucar.edu/wrf/users/
44

55
The WRF Pre-Processing System (WPS) is a collection
66
of Fortran and C programs that provides data used as
7-
input to the real.exe and real_nmm.exe programs. There
8-
are three main programs and a number of auxiliary
9-
programs that are part of WPS. Both the ARW and NMM
10-
dynamical cores in WRF are supported by WPS.
7+
input to the real.exe program. There are three main
8+
programs and a number of auxiliary programs that
9+
are part of WPS.
1110

1211
For questions and help to run the program, please see the
1312
User's Guide at http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_v4/contents.html

arch/Config.pl

Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
$sw_netcdf_path = "";
1212
$sw_netcdff_lib = "";
1313
$sw_phdf5_path = "";
14+
$sw_grib2_path = "";
1415
$sw_jasperlib_path = "";
1516
$sw_jasperinc_path = "";
1617
$sw_ldflags = "";
@@ -61,47 +62,59 @@
6162
# separated by ! instead. Replace with spaces here.
6263
$sw_ldflags =~ s/!/ /g ;
6364
}
65+
if(substr( $ARGV[0], 1, 9 ) eq "grib2dir=")
66+
{
67+
$sw_grib2_path = substr( $ARGV[0], 10 );
68+
}
6469
shift @ARGV;
6570
} # end while
6671

67-
# The jasper library is required to build Grib2 I/O. User must set
68-
# environment variables JASPERLIB and JASPERINC to paths to library and
69-
# include files to enable this feature prior to running configure.
70-
if($ENV{JASPERLIB} && $ENV{JASPERINC})
72+
if ($sw_grib2_path eq "")
7173
{
72-
printf "Found Jasper environment variables for GRIB2 support...\n";
73-
printf(" \$JASPERLIB = %s\n",$ENV{JASPERLIB});
74-
printf(" \$JASPERINC = %s\n",$ENV{JASPERINC});
75-
$sw_jasperlib_path = "-L$ENV{JASPERLIB} -ljasper -lpng -lz";
76-
$sw_jasperinc_path = "-I$ENV{JASPERINC}";
74+
# The jasper library is required to build Grib2 I/O. User must set
75+
# environment variables JASPERLIB and JASPERINC to paths to library and
76+
# include files to enable this feature prior to running configure.
77+
if($ENV{JASPERLIB} && $ENV{JASPERINC})
78+
{
79+
printf "Found Jasper environment variables for GRIB2 support...\n";
80+
printf(" \$JASPERLIB = %s\n",$ENV{JASPERLIB});
81+
printf(" \$JASPERINC = %s\n",$ENV{JASPERINC});
82+
$sw_jasperlib_path = "-L$ENV{JASPERLIB} -ljasper -lpng -lz";
83+
$sw_jasperinc_path = "-I$ENV{JASPERINC}";
84+
}
85+
else
86+
{
87+
88+
$tmp1 = '/usr/local/jasper';
89+
if (-e $tmp1) {
90+
$sw_jasperlib_path = '-L/usr/local/jasper/lib -ljasper -L/usr/local/libpng -lpng12 -lpng -L/usr/local/zlib/lib -lz' ;
91+
$sw_jasperinc_path = '-I/usr/local/zlib/include -I/usr/local/jasper/include -I/usr/local/libpng/' ;
92+
printf "\$JASPERLIB or \$JASPERINC not found in environment. Using /usr/local for library paths...\n";
93+
}
94+
else {
95+
$tmp1 = '/opt/local/lib';
96+
if (-e $tmp1) {
97+
$sw_jasperlib_path = '-L/opt/local/lib -ljasper -lpng -lz';
98+
$sw_jasperinc_path = '-I/opt/local/include';
99+
printf "\$JASPERLIB or \$JASPERINC not found in environment. Using /opt/local for library paths...\n";
100+
}
101+
else {
102+
$sw_jasperlib_path = '-L/glade/u/home/wrfhelp/UNGRIB_LIBRARIES/lib -ljasper -lpng -lz';
103+
$sw_jasperinc_path = '-I/glade/u/home/wrfhelp/UNGRIB_LIBRARIES/include';
104+
printf "\$JASPERLIB or \$JASPERINC not found in environment. Using default values for library paths...\n";
105+
}
106+
}
107+
}
108+
@platforms = ('serial', 'serial_NO_GRIB2', 'dmpar', 'dmpar_NO_GRIB2');
77109
}
78110
else
79111
{
80-
81-
$tmp1 = '/usr/local/jasper';
82-
if (-e $tmp1) {
83-
$sw_jasperlib_path = '-L/usr/local/jasper/lib -ljasper -L/usr/local/libpng -lpng12 -lpng -L/usr/local/zlib/lib -lz' ;
84-
$sw_jasperinc_path = '-I/usr/local/zlib/include -I/usr/local/jasper/include -I/usr/local/libpng/' ;
85-
printf "\$JASPERLIB or \$JASPERINC not found in environment. Using /usr/local for library paths...\n";
86-
}
87-
else {
88-
$tmp1 = '/opt/local/lib';
89-
if (-e $tmp1) {
90-
$sw_jasperlib_path = '-L/opt/local/lib -ljasper -lpng -lz';
91-
$sw_jasperinc_path = '-I/opt/local/include';
92-
printf "\$JASPERLIB or \$JASPERINC not found in environment. Using /opt/local for library paths...\n";
93-
}
94-
else {
95-
$sw_jasperlib_path = '-L/glade/u/home/wrfhelp/UNGRIB_LIBRARIES/lib -ljasper -lpng -lz';
96-
$sw_jasperinc_path = '-I/glade/u/home/wrfhelp/UNGRIB_LIBRARIES/include';
97-
printf "\$JASPERLIB or \$JASPERINC not found in environment. Using default values for library paths...\n";
98-
}
99-
}
112+
$sw_jasperlib_path = '-L$(INTERNAL_GRIB2_PATH)/lib -ljasper -lpng -lz';
113+
$sw_jasperinc_path = '-I$(INTERNAL_GRIB2_PATH)/include';
114+
@platforms = ('serial', 'dmpar');
100115
}
101116

102117
$validresponse = 0 ;
103-
# added this from the WRF Config.pl by John M.
104-
@platforms = ('serial', 'serial_NO_GRIB2', 'dmpar', 'dmpar_NO_GRIB2');
105118
# Display the choices to the user and get selection
106119
until ($validresponse)
107120
{
@@ -208,7 +221,7 @@
208221
{
209222
if($paropt eq 'serial')
210223
{
211-
if($ENV{JASPERLIB} && $ENV{JASPERINC})
224+
if(($ENV{JASPERLIB} && $ENV{JASPERINC}) || $sw_grib2_path ne "")
212225
{
213226
$sw_compL = $sw_jasperlib_path;
214227
$sw_compI = $sw_jasperinc_path;
@@ -236,7 +249,7 @@
236249
}
237250
if($paropt eq 'dmpar')
238251
{
239-
if($ENV{JASPERLIB} && $ENV{JASPERINC})
252+
if(($ENV{JASPERLIB} && $ENV{JASPERINC}) || $sw_grib2_path ne "")
240253
{
241254
$sw_compL = $sw_jasperlib_path;
242255
$sw_compI = $sw_jasperinc_path;
@@ -302,6 +315,7 @@
302315

303316
$_ =~ s:CONFIGURE_NETCDFF_LIB:$sw_netcdff_lib:g;
304317
$_ =~ s:CONFIGURE_WRF_PATH:$sw_wrf_path:g;
318+
$_ =~ s:CONFIGURE_GRIB2_PATH:$sw_grib2_path:g;
305319
@preamble = ( @preamble, $_ ) ;
306320
}
307321
close ARCH_PREAMBLE;

arch/preamble

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,5 @@ COMPRESSION_LIBS = # intentionally left blank, fill in COMPRESSION_LIBS below
5353

5454
COMPRESSION_INC = # intentionally left blank, fill in COMPRESSION_INC below
5555

56+
INTERNAL_GRIB2_PATH = CONFIGURE_GRIB2_PATH
57+

compile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ endif
112112
# Print out WPS version, system info, and compiler/version
113113
echo "============================================================================================== "
114114
echo " "
115-
echo Version 4.3.1
115+
echo Version 4.4
116116
echo " "
117117
uname -a
118118
echo " "

configure

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22

33
#
44
# Check for command-line arguments
5-
# At present, the only supported argument is --nowrf, which disables checks to
6-
# find the path to the compiled WRF model.
5+
# At present, the only supported arguments are:
6+
# --nowrf : disables checks to find the path to the compiled WRF model
7+
# --build-grib2-libs : compiles zlib, libpng, and JasPer libraries from
8+
# source in the external/ directory and installs
9+
# the libraries in grib2/
710
#
811
nowrf=0
12+
build_grib2=0
913
for arg in $@; do
1014
if [ "${arg}" = "--nowrf" ]; then
1115
nowrf=1
16+
elif [ "${arg}" = "--build-grib2-libs" ]; then
17+
build_grib2=1
18+
else
19+
printf "Unrecognized option %s\n" ${arg}
1220
fi
1321
done
1422

@@ -216,8 +224,22 @@ the WRF I/O libraries:
216224
EOF
217225
fi
218226

227+
grib2dir=""
228+
if [ ${build_grib2} -eq 1 ]; then
229+
grib2dir="${PWD}/grib2"
230+
231+
cat << EOF
232+
********************************************************************************
233+
The zlib, libpng, and JasPer libraries will be compiled from source and
234+
installed in ${grib2dir} .
235+
236+
The environment variables JASPERLIB and JASPERINC will be ignored.
237+
********************************************************************************
238+
EOF
239+
fi
240+
219241
# Found perl, so proceed with configuration
220-
perl arch/Config.pl -perl=$PERL -netcdf=$NETCDF -netcdff=$NETCDFF -os=$os -mach=$mach -wrfdir=$wrf_dir
242+
perl arch/Config.pl -perl=$PERL -netcdf=$NETCDF -netcdff=$NETCDFF -os=$os -mach=$mach -wrfdir=$wrf_dir -grib2dir=$grib2dir
221243

222244

223245
#Checking cross-compiling capability for some particular environment

0 commit comments

Comments
 (0)