Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-v4.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
kkeene44 committed Dec 22, 2023
2 parents 3dd1546 + 027fb7b commit a8eb846
Show file tree
Hide file tree
Showing 64 changed files with 675 additions and 533 deletions.
40 changes: 20 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ configcheck:
echo "------------------------------------------------------------------------------" ; \
exit 21 ; \
fi


framework_only : configcheck
$(MAKE) MODULE_DIRS="$(ALL_MODULES)" ext
Expand Down Expand Up @@ -154,7 +154,7 @@ wrfplus : configcheck
@echo "build started: $(START_OF_COMPILE)"
@echo "build completed:" `date`

all_wrfvar :
all_wrfvar :
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" ext
$(MAKE) MODULE_DIRS="$(DA_WRFVAR_MODULES)" toolsdir
if [ $(CRTM) -ne 0 ] ; then \
Expand Down Expand Up @@ -498,7 +498,7 @@ em_scm_xy : wrf
ln -sf ../../run/LANDUSE.TBL . ; \
ln -sf ../../run/SOILPARM.TBL . ; \
ln -sf ../../run/VEGPARM.TBL . ; \
ln -sf ../../run/RRTM_DATA . )
ln -sf ../../run/RRTM_DATA . )
( cd run ; /bin/rm -f ideal.exe ; ln -s ../main/ideal.exe . )
( cd run ; if test -f namelist.input ; then \
/bin/cp -f namelist.input namelist.input.backup.`date +%Y-%m-%d_%H_%M_%S` ; fi ; \
Expand Down Expand Up @@ -529,11 +529,11 @@ convert_em : framework_only
( cd main ; $(MAKE) RLFLAGS="$(RLFLAGS)" MODULE_DIRS="$(ALL_MODULES)" convert_em ) ; \
fi

# Link wrf.exe and wrf_SST_ESMF.exe into
# test/em_esmf_exp when ESMF_COUPLING is set. wrf.exe
# can be used for stand-alone testing in this case.
# wrf_SST_ESMF.exe is a coupled application. Note that make
# target $(SOLVER)_wrf_SST_ESMF builds wrf_SST_ESMF.exe.
# Link wrf.exe and wrf_SST_ESMF.exe into
# test/em_esmf_exp when ESMF_COUPLING is set. wrf.exe
# can be used for stand-alone testing in this case.
# wrf_SST_ESMF.exe is a coupled application. Note that make
# target $(SOLVER)_wrf_SST_ESMF builds wrf_SST_ESMF.exe.
em_real : wrf
@/bin/rm -f real.exe > /dev/null 2>&1
@/bin/rm -f tc.exe > /dev/null 2>&1
Expand Down Expand Up @@ -923,31 +923,31 @@ framework :
@ echo '--------------------------------------'
( cd frame ; $(MAKE) $(J) LLIST="$(LINKLIST)" framework ; \
cd ../external/io_netcdf ; \
$(MAKE) NETCDFPATH="$(NETCDFPATH)" \
$(MAKE) NETCDFPATH="$(NETCDFPATH)" NETCDF4_DEP_LIB="$(NETCDF4_DEP_LIB)" \
FC="$(FC) $(FCBASEOPTS) $(PROMOTION) $(FCDEBUG) $(OMP)" RANLIB="$(RANLIB)" \
CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
LIB_LOCAL="$(LIB_LOCAL)" \
ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf; \
cd ../io_netcdf ; \
$(MAKE) NETCDFPATH="$(NETCDFPATH)" \
$(MAKE) NETCDFPATH="$(NETCDFPATH)" NETCDF4_DEP_LIB="$(NETCDF4_DEP_LIB)" \
FC="$(SFC) $(FCBASEOPTS) $(PROMOTION) $(FCDEBUG) $(OMP)" RANLIB="$(RANLIB)" \
CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
LIB_LOCAL="$(LIB_LOCAL)" \
ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR"; \
cd ../io_netcdfpar ; \
$(NETCDFPAR_BUILD) $(MAKE) NETCDFPARPATH="$(NETCDFPATH)" \
$(NETCDFPAR_BUILD) $(MAKE) NETCDFPARPATH="$(NETCDFPATH)" NETCDF4_DEP_LIB="$(NETCDF4_DEP_LIB)" \
FC="$(FC) $(FCBASEOPTS) $(PROMOTION) $(FCDEBUG) $(OMP)" RANLIB="$(RANLIB)" \
CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
LIB_LOCAL="$(LIB_LOCAL)" \
ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf; \
cd ../io_netcdfpar ; \
$(NETCDFPAR_BUILD) $(MAKE) NETCDFPARPATH="$(NETCDFPATH)" \
$(NETCDFPAR_BUILD) $(MAKE) NETCDFPARPATH="$(NETCDFPATH)" NETCDF4_DEP_LIB="$(NETCDF4_DEP_LIB)" \
FC="$(SFC) $(FCBASEOPTS) $(PROMOTION) $(FCDEBUG) $(OMP)" RANLIB="$(RANLIB)" \
CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
LIB_LOCAL="$(LIB_LOCAL)" \
ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR"; \
cd ../io_pio ; \
echo SKIPPING PIO BUILD $(MAKE) NETCDFPATH="$(PNETCDFPATH)" \
echo SKIPPING PIO BUILD $(MAKE) NETCDFPATH="$(PNETCDFPATH)" NETCDF4_DEP_LIB="$(NETCDF4_DEP_LIB)" \
FC="$(SFC) $(FCBASEOPTS) $(PROMOTION) $(FCDEBUG) $(OMP)" RANLIB="$(RANLIB)" \
CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
LIB_LOCAL="$(LIB_LOCAL)" \
Expand All @@ -964,13 +964,13 @@ framework_plus :
@ echo '--------------------------------------'
( cd frame ; $(MAKE) $(J) LLIST="$(MODLL)" framework ; \
cd ../external/io_netcdf ; \
$(MAKE) NETCDFPATH="$(NETCDFPATH)" \
$(MAKE) NETCDFPATH="$(NETCDFPATH)" NETCDF4_DEP_LIB="$(NETCDF4_DEP_LIB)" \
FC="$(FC) $(FCBASEOPTS) $(PROMOTION) $(FCDEBUG) $(OMP)" RANLIB="$(RANLIB)" \
CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
LIB_LOCAL="$(LIB_LOCAL)" \
ESMF_MOD_DEPENDENCE="$(ESMF_MOD_DEPENDENCE)" AR="INTERNAL_BUILD_ERROR_SHOULD_NOT_NEED_AR" diffwrf; \
cd ../io_netcdf ; \
$(MAKE) NETCDFPATH="$(NETCDFPATH)" \
$(MAKE) NETCDFPATH="$(NETCDFPATH)" NETCDF4_DEP_LIB="$(NETCDF4_DEP_LIB)" \
FC="$(SFC) $(FCBASEOPTS) $(PROMOTION) $(FCDEBUG) $(OMP)" RANLIB="$(RANLIB)" \
CPP="$(CPP)" LDFLAGS="$(LDFLAGS)" TRADFLAG="$(TRADFLAG)" ESMF_IO_LIB_EXT="$(ESMF_IO_LIB_EXT)" \
LIB_LOCAL="$(LIB_LOCAL)" \
Expand Down Expand Up @@ -1069,10 +1069,10 @@ fseek_test :

# rule used by configure to test if this will compile with netcdf4
nc4_test:
if [ $(USENETCDFPAR) -eq 0 ] ; then \
( cd tools ; /bin/rm -f nc4_test.{exe,nc,o} ; $(SCC) -o nc4_test.exe nc4_test.c -I$(NETCDF)/include -L$(NETCDF)/lib -lnetcdf $(NETCDF4_DEP_LIB) ; cd .. ) ; \
if [ -z "$(USENETCDFPAR)" ] || [ $(USENETCDFPAR) -eq 0 ] ; then \
( cd tools ; /bin/rm -f nc4_test.{exe,nc,o} ; $(SCC) -o nc4_test.exe nc4_test.c -I$(NETCDF_C)/include $(NETCDF4_DEP_LIB) ; cd .. ) ; \
else \
( cd tools ; /bin/rm -f nc4_test.{exe,nc,o} ; $(DM_CC) -o nc4_test.exe nc4_test.c -I$(NETCDF)/include -L$(NETCDF)/lib -lnetcdf $(NETCDF4_DEP_LIB) ; cd .. ) ; \
( cd tools ; /bin/rm -f nc4_test.{exe,nc,o} ; $(DM_CC) -o nc4_test.exe nc4_test.c -I$(NETCDF_C)/include $(NETCDF4_DEP_LIB) ; cd .. ) ; \
fi

# rule used by configure to test if Fortran 2003 IEEE signaling is available
Expand Down Expand Up @@ -1110,8 +1110,8 @@ toolsdir :

# ( cd tools ; $(MAKE) CC_TOOLS="$(CC_TOOLS) -DIO_MASK_SIZE=$(IO_MASK_SIZE)" )

# Use this target to build stand-alone tests of esmf_time_f90.
# Only touches external/esmf_time_f90/.
# Use this target to build stand-alone tests of esmf_time_f90.
# Only touches external/esmf_time_f90/.
esmf_time_f90_only :
@ echo '--------------------------------------'
( cd external/esmf_time_f90 ; $(MAKE) FC="$(FC) $(FCFLAGS)" CPP="$(CPP) -DTIME_F90_ONLY" tests )
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
WRF Model Version 4.5.1
WRF Model Version 4.5.2

https://www2.mmm.ucar.edu/wrf/users/

Expand Down
28 changes: 19 additions & 9 deletions arch/Config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
$sw_time = "" ; # name of a timer to time fortran compiles, e.g. timex or time
$sw_ifort_r8 = 0 ;
$sw_hdf5 = "-lhdf5_hl -lhdf5";
$sw_hdf5_hl_fortran="-lhdf5_hl_fortran";
$sw_zlib = "-lz";
$sw_dep_lib_path = "";
$sw_netcdf4_dep_lib = "";
$sw_gpfs_path = "";
$sw_gpfs_lib = "-lgpfs";
$sw_curl_path = "";
Expand All @@ -69,10 +70,10 @@
{
$sw_netcdf_path = substr( $ARGV[0], 8 ) ;
}
if ( substr( $ARGV[0], 1, 13 ) eq "dep_lib_path=" )
if ( substr( $ARGV[0], 1, 16 ) eq "netcdf4_dep_lib=" )
{
$sw_dep_lib_path = substr( $ARGV[0], 14 ) ;
$sw_dep_lib_path =~ s/\r|\n/ /g ;
$sw_netcdf4_dep_lib = substr( $ARGV[0], 17 ) ;
$sw_netcdf4_dep_lib =~ s/\r|\n/ /g ;
}
if ( substr( $ARGV[0], 1, 5 ) eq "gpfs=" )
{
Expand Down Expand Up @@ -349,6 +350,15 @@
$sw_ctsm_mkfile_path = $ENV{WRF_CTSM_MKFILE};
}

if ( $sw_hdf5_path ) {
opendir(my $dh, "$sw_hdf5_path/lib");
($hl) = grep(/hdf5hl_fortran/i, readdir $dh);
closedir($dh);
if ($hl ne "") {
$sw_hdf5_hl_fortran="-lhdf5hl_fortran";
}
}

# parse the configure.wrf file

$validresponse = 0 ;
Expand Down Expand Up @@ -453,6 +463,7 @@
} else {
$sw_terrain_and_landuse =" -DLANDREAD_STUB=1" ;
}

open CONFIGURE_DEFAULTS, "cat ./arch/configure.defaults |" ;
$latchon = 0 ;
while ( <CONFIGURE_DEFAULTS> )
Expand Down Expand Up @@ -732,7 +743,7 @@
}

if ( $sw_hdf5_path )
{ $_ =~ s:CONFIGURE_HDF5_LIB_PATH:-L$sw_hdf5_path/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lm -lz: ;
{ $_ =~ s:CONFIGURE_HDF5_LIB_PATH:-L$sw_hdf5_path/lib $sw_hdf5_hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lm -lz: ;
$_ =~ s:CONFIGURE_HDF5_FLAG:-DHDF5: ;
}
else
Expand Down Expand Up @@ -1039,7 +1050,7 @@
$_ =~ s/CONFIGURE_CONFIG_NUM/Compiler choice: $response_opt/g ;
$_ =~ s/CONFIGURE_CONFIG_NEST/Nesting option: $response_nesting/g ;

$_ =~ s/CONFIGURE_DEP_LIB_PATH/$sw_dep_lib_path/g ;
$_ =~ s/CONFIGURE_NETCDF4_DEP_LIB/$sw_netcdf4_dep_lib/g ;

$_ =~ s/CONFIGURE_COMMS_LIB/$sw_comms_lib/g ;
if ( $sw_os ne "CYGWIN_NT" ) {
Expand Down Expand Up @@ -1120,7 +1131,7 @@
}

if ( $sw_hdf5_path )
{ $_ =~ s:CONFIGURE_HDF5_LIB_PATH:-L$sw_hdf5_path/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lm -lz: ;
{ $_ =~ s:CONFIGURE_HDF5_LIB_PATH:-L$sw_hdf5_path/lib $sw_hdf5_hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lm -lz: ;
$_ =~ s:CONFIGURE_HDF5_FLAG:-DHDF5: ;
}
else
Expand Down Expand Up @@ -1169,7 +1180,7 @@
$_ .= " " . $sw_curl_lib . "\n" ;
}
}
if ( $sw_dep_lib_path ne "" )
if ( $sw_netcdf4_dep_lib ne "" )
{ if (/^HDF5.*=/)
{ $_ =~ s/\r|\n//g;
$_ .= " " . $sw_hdf5 . "\n" ;
Expand Down Expand Up @@ -1200,4 +1211,3 @@
printf "Configuration successful! \n" ;
printf "------------------------------------------------------------------------\n" ;


Loading

0 comments on commit a8eb846

Please sign in to comment.