Skip to content

Commit 7d7a080

Browse files
committed
Merge branch 'release-v4.3.1'
This merge finalizes the v4.3.1 release by adding changes from the 'release-v4.3.1' branch onto the 'master' branch. * release-v4.3.1: Fix print format in g2print.F by using an explicit format statement rather than list-directed output Add FCCOMPAT flags to postamble and throughout Makefiles when compiling Fortran Allow configure script to define new FCCOMPAT flags for newer GNU compilers Add newer variables to HRRR var list Fix incorrect argument rank in calls to ext_*_get_dom_ti_* in input_module.F Fix incorrect argument rank in calls to ext_*_put_dom_ti_* in output_module.F Update version number to 4.3.1
2 parents 89f559c + d9467d3 commit 7d7a080

File tree

14 files changed

+97
-32
lines changed

14 files changed

+97
-32
lines changed

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
WRF Pre-Processing System Version 4.3
1+
WRF Pre-Processing System Version 4.3.1
22

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

arch/configure.defaults

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ CC = CONFIGURE_CC
159159
LD = $(FC)
160160
FFLAGS = -ffree-form -O -fconvert=big-endian -frecord-marker=4
161161
F77FLAGS = -ffixed-form -O -fconvert=big-endian -frecord-marker=4
162+
FCCOMPAT = CONFIGURE_COMPAT_FLAGS
162163
FCSUFFIX =
163164
FNGFLAGS = $(FFLAGS)
164165
LDFLAGS =
@@ -182,6 +183,7 @@ CC = CONFIGURE_CC
182183
LD = $(FC)
183184
FFLAGS = -ffree-form -O -fconvert=big-endian -frecord-marker=4
184185
F77FLAGS = -ffixed-form -O -fconvert=big-endian -frecord-marker=4
186+
FCCOMPAT = CONFIGURE_COMPAT_FLAGS
185187
FCSUFFIX =
186188
FNGFLAGS = $(FFLAGS)
187189
LDFLAGS =
@@ -452,6 +454,7 @@ CC = CONFIGURE_CC
452454
LD = $(FC)
453455
FFLAGS = -ffree-form -O -fconvert=big-endian -frecord-marker=4
454456
F77FLAGS = -ffixed-form -O -fconvert=big-endian -frecord-marker=4
457+
FCCOMPAT = CONFIGURE_COMPAT_FLAGS
455458
FCSUFFIX =
456459
FNGFLAGS = $(FFLAGS)
457460
LDFLAGS =
@@ -477,6 +480,7 @@ CC = CONFIGURE_CC
477480
LD = $(FC)
478481
FFLAGS = -ffree-form -O -fconvert=big-endian -frecord-marker=4
479482
F77FLAGS = -ffixed-form -O -fconvert=big-endian -frecord-marker=4
483+
FCCOMPAT = CONFIGURE_COMPAT_FLAGS
480484
FCSUFFIX =
481485
FNGFLAGS = $(FFLAGS)
482486
# For a WRF OpenMP build, add the gomp library for WPS

arch/postamble

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ AR = ar ru
1818

1919
.f.o:
2020
$(RM) $@ $*.mod
21-
$(FC) $(F77FLAGS) -c $< $(WRF_INCLUDE)
21+
$(FC) $(F77FLAGS) $(FCCOMPAT) -c $< $(WRF_INCLUDE)
2222

2323
.F.o:
2424
$(RM) $@ $*.mod
2525
$(CPP) $(CPPFLAGS) $(FDEFS) $(WRF_INCLUDE) $< > $*.f90
26-
$(FC) $(FFLAGS) -c $*.f90 $(WRF_INCLUDE)
26+
$(FC) $(FFLAGS) $(FCCOMPAT) -c $*.f90 $(WRF_INCLUDE)
2727
# $(RM) $*.f90

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.2
115+
echo Version 4.3.1
116116
echo " "
117117
uname -a
118118
echo " "

configure

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,3 +458,40 @@ EOF
458458

459459
fi
460460
fi
461+
462+
463+
#
464+
# Check for newer GNU Fortran compilers that require the use of the following:
465+
# -fallow-argument-mismatch
466+
#
467+
cat > gnu_flag_test.F90 << EOF
468+
program gnu_flag_test
469+
#ifdef __GNUC__
470+
#if __GNUC__ > 9
471+
call exit(1) ! A GNU extension, but at this point we know this is a GNU compiler
472+
#endif
473+
#endif
474+
end program gnu_flag_test
475+
EOF
476+
477+
# The above test program gives exit status 1 iff we are using the GNU Fortran
478+
# compiler with a major version greater than 9
479+
480+
FC=`grep ^SFC configure.wps | cut -d"=" -f2-`
481+
FFLAGS=`grep ^FFLAGS configure.wps | cut -d"=" -f2-`
482+
$FC ${FFLAGS} gnu_flag_test.F90 -o gnu_flag_test > /dev/null 2>&1
483+
if [ -f ./gnu_flag_test ]; then
484+
./gnu_flag_test > /dev/null 2>&1
485+
if [ $? -eq 1 ]; then
486+
compat="-fallow-argument-mismatch"
487+
fi
488+
rm gnu_flag_test
489+
else
490+
printf "*** Failed to compile the gnu_flag_test program!\n"
491+
printf " This may be because the selected build option does not work correctly.\n"
492+
fi
493+
rm gnu_flag_test.F90
494+
495+
sed "s/CONFIGURE_COMPAT_FLAGS/${compat}/" configure.wps > configure.wps.tmp
496+
mv configure.wps.tmp configure.wps
497+

geogrid/src/output_module.F

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,21 +1429,21 @@ subroutine ext_put_dom_ti_integer_scalar(var_name, var_value)
14291429
#ifdef IO_BINARY
14301430
if (io_form_output == BINARY) then
14311431
call ext_int_put_dom_ti_integer(handle, trim(var_name), &
1432-
var_value, &
1432+
(/ var_value /), &
14331433
1, istatus)
14341434
end if
14351435
#endif
14361436
#ifdef IO_NETCDF
14371437
if (io_form_output == NETCDF) then
14381438
call ext_ncd_put_dom_ti_integer(handle, trim(var_name), &
1439-
var_value, &
1439+
(/ var_value /), &
14401440
1, istatus)
14411441
end if
14421442
#endif
14431443
#ifdef IO_GRIB1
14441444
if (io_form_output == GRIB1) then
14451445
call ext_gr1_put_dom_ti_integer(handle, trim(var_name), &
1446-
var_value, &
1446+
(/ var_value /), &
14471447
1, istatus)
14481448
end if
14491449
#endif
@@ -1516,21 +1516,21 @@ subroutine ext_put_dom_ti_real_scalar(var_name, var_value)
15161516
#ifdef IO_BINARY
15171517
if (io_form_output == BINARY) then
15181518
call ext_int_put_dom_ti_real(handle, trim(var_name), &
1519-
var_value, &
1519+
(/ var_value /), &
15201520
1, istatus)
15211521
end if
15221522
#endif
15231523
#ifdef IO_NETCDF
15241524
if (io_form_output == NETCDF) then
15251525
call ext_ncd_put_dom_ti_real(handle, trim(var_name), &
1526-
var_value, &
1526+
(/ var_value /), &
15271527
1, istatus)
15281528
end if
15291529
#endif
15301530
#ifdef IO_GRIB1
15311531
if (io_form_output == GRIB1) then
15321532
call ext_gr1_put_dom_ti_real(handle, trim(var_name), &
1533-
var_value, &
1533+
(/ var_value /), &
15341534
1, istatus)
15351535
end if
15361536
#endif

geogrid/src/process_tile_module.F

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ subroutine process_tile(which_domain, grid_type, dynopt, &
300300
end if
301301

302302
! Initialize the output module now that we have the corner point lats/lons
303-
call output_init(which_domain, 'OUTPUT FROM GEOGRID V4.3', '0000-00-00_00:00:00', grid_type, dynopt, &
303+
call output_init(which_domain, 'OUTPUT FROM GEOGRID V4.3.1', '0000-00-00_00:00:00', grid_type, dynopt, &
304304
corner_lats, corner_lons, &
305305
start_dom_i, end_dom_i, start_dom_j, end_dom_j, &
306306
start_patch_i, end_patch_i, start_patch_j, end_patch_j, &

metgrid/src/input_module.F

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,9 @@ subroutine read_global_attrs(title, start_date, grid_type, dyn_opt,
427427
#endif
428428

429429
call ext_get_dom_ti_char('TITLE', title)
430-
if (index(title,'GEOGRID V4.3') /= 0) then
430+
if (index(title,'GEOGRID V4.3.1') /= 0) then
431+
wps_version = 4.31
432+
else if (index(title,'GEOGRID V4.3') /= 0) then
431433
wps_version = 4.3
432434
else if (index(title,'GEOGRID V4.2') /= 0) then
433435
wps_version = 4.2
@@ -633,25 +635,26 @@ subroutine ext_get_dom_ti_integer_scalar(var_name, var_value, suppress_errors)
633635

634636
! Local variables
635637
integer :: istatus, outcount
638+
integer, dimension(1) :: var_value_arr
636639

637640
#ifdef IO_BINARY
638641
if (io_form_input == BINARY) then
639642
call ext_int_get_dom_ti_integer(handle, trim(var_name), &
640-
var_value, &
643+
var_value_arr, &
641644
1, outcount, istatus)
642645
end if
643646
#endif
644647
#ifdef IO_NETCDF
645648
if (io_form_input == NETCDF) then
646649
call ext_ncd_get_dom_ti_integer(handle, trim(var_name), &
647-
var_value, &
650+
var_value_arr, &
648651
1, outcount, istatus)
649652
end if
650653
#endif
651654
#ifdef IO_GRIB1
652655
if (io_form_input == GRIB1) then
653656
call ext_gr1_get_dom_ti_integer(handle, trim(var_name), &
654-
var_value, &
657+
var_value_arr, &
655658
1, outcount, istatus)
656659
end if
657660
#endif
@@ -662,6 +665,8 @@ subroutine ext_get_dom_ti_integer_scalar(var_name, var_value, suppress_errors)
662665
call mprintf((istatus /= 0),ERROR,'Error while reading domain time-independent attribute.')
663666
end if
664667

668+
var_value = var_value_arr(1)
669+
665670
end subroutine ext_get_dom_ti_integer_scalar
666671

667672

@@ -724,31 +729,34 @@ subroutine ext_get_dom_ti_real_scalar(var_name, var_value)
724729

725730
! Local variables
726731
integer :: istatus, outcount
732+
real, dimension(1) :: var_value_arr
727733

728734
#ifdef IO_BINARY
729735
if (io_form_input == BINARY) then
730736
call ext_int_get_dom_ti_real(handle, trim(var_name), &
731-
var_value, &
737+
var_value_arr, &
732738
1, outcount, istatus)
733739
end if
734740
#endif
735741
#ifdef IO_NETCDF
736742
if (io_form_input == NETCDF) then
737743
call ext_ncd_get_dom_ti_real(handle, trim(var_name), &
738-
var_value, &
744+
var_value_arr, &
739745
1, outcount, istatus)
740746
end if
741747
#endif
742748
#ifdef IO_GRIB1
743749
if (io_form_input == GRIB1) then
744750
call ext_gr1_get_dom_ti_real(handle, trim(var_name), &
745-
var_value, &
751+
var_value_arr, &
746752
1, outcount, istatus)
747753
end if
748754
#endif
749755

750756
call mprintf((istatus /= 0),ERROR,'Error while reading domain time-independent attribute.')
751757

758+
var_value = var_value_arr(1)
759+
752760
end subroutine ext_get_dom_ti_real_scalar
753761

754762

metgrid/src/process_domain_module.F

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ subroutine process_single_met_time(do_const_processing, &
876876
! now we simply output every field from the storage module.
877877
!
878878

879-
title = 'OUTPUT FROM METGRID V4.3'
879+
title = 'OUTPUT FROM METGRID V4.3.1'
880880

881881
! Initialize the output module for this domain and time
882882
call mprintf(.true.,LOGFILE,'Initializing output module.')

ungrib/src/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ g2print.exe: filelist.o gridinfo.o g2print.o
5555
g2print.o: table.o gridinfo.o filelist.o module_datarray.o \
5656
ngl/g2/gribmod.o ngl/g2/params.o g2print.F
5757
$(CPP) $(CPPFLAGS) $*.F > $*.f90
58-
$(FC) -c $(FFLAGS) $(FCSUFFIX) $*.f90 -I. -I./ngl/g2
58+
$(FC) -c $(FFLAGS) $(FCSUFFIX) $(FCCOMPAT) $*.f90 -I. -I./ngl/g2
5959
# $(RM) $*.f90
6060

6161
rd_grib2.o: ngl/g2/gribmod.o module_debug.o table.o gridinfo.o ngl/g2/params.o new_storage.o \
6262
rd_grib2.F
6363
$(CPP) $(CPPFLAGS) $*.F > $*.f90
64-
$(FC) -c $(F77FLAGS) $(FCSUFFIX) $*.f90 -I. -I./ngl/g2
64+
$(FC) -c $(F77FLAGS) $(FCSUFFIX) $(FCCOMPAT) $*.f90 -I. -I./ngl/g2
6565
# $(RM) $*.f90
6666

6767
datint.o: misc_definitions_module.o module_debug.o gridinfo.o new_storage.o datint.F
@@ -88,7 +88,7 @@ read_namelist.o: misc_definitions_module.o module_debug.o read_namelist.F
8888

8989
.F.o:
9090
$(CPP) $(CPPFLAGS) $(FDEFS) $< > $*.f90
91-
$(FC) -c $(FFLAGS) $*.f90
91+
$(FC) -c $(FFLAGS) $(FCCOMPAT) $*.f90
9292
# $(RM) $*.f90
9393

9494
.c.o:

0 commit comments

Comments
 (0)