Following the WRF-MPAS Workshop announcement of the release of MPAS 8, I downloaded the code from the website and attempted to build the new model version. I had previously built MPAS 7.0, so I had that build as a reference.. I found two issues with the version 8.0.0 Makefiles that I needed to correct.
System: CentOS (uname -a: Linux wrf2 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux)
Compiler: PGI: pgf90 -version: pgf90 (aka nvfortran) 23.3-0 64-bit target on x86-64 Linux -tp zen
Build commands:
setenv NETCDF /home/.../sw/MET/external_libs
setenv PNETCDF /home/.../sw/MPAS/pnetcdf
make pgi CORE=init_atmosphere AUTOCLEAN=true PRECISION=single |& tee v8.compile.init.log
make pgi CORE=atmosphere AUTOCLEAN=true PRECISION=single |& tee v8.compile.model.log2
1. Both init_atmosphere and atmosphere compiles failed because of a bad reference to netcdf functions.
/home/.../sw/MET/external_libs/lib/libnetcdff.so: undefined reference to `nc_inq_var_filter'
/home/.../sw/MET/external_libs/lib/libnetcdff.so: undefined reference to `nc_def_var_filter'
Interestingly. I modified the top-level Makefile to remove the addition of the libnecddff libraries to the search path. Once that was done and the build only used the netcdf and pnetcdf libraries, the build of initi-atmosphere worked and the atmosphere build continued past that point.
2. The mpas_atm_core.F code apparently tries to include the mp_radar.mod file which exists in the physics/physics_mmm directory. However, the search path doesn't include this directory.
mpif90 -D_MPI -DCPRPGI -DCORE_ATMOSPHERE -DMPAS_NAMELIST_SUFFIX=atmosphere -DMPAS_EXE_NAME=atmosphere_model -DSINGLE_PRECISION -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=unknown -DMPAS_BUILD_TARGET=pgi -DMPAS_SMIOL_SUPPORT -DDO_PHYSICS -O3 -byteswapio -Mfree -c mpas_atm_core.F -I/home/.../sw/MET/external_libs/include -I/home/.../sw/MPAS/pnetcdf/include -I/home/.../sw/MPAS/MPAS-Model-8.0.0/src/external/SMIOL -I/home/.../sw/MET/external_libs/include -I/home/.../sw/MPAS/pnetcdf/include -I./inc -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I../external/esmf_time_f90
NVFORTRAN-F-0004-Unable to open MODULE file mp_radar.mod (mpas_atm_core.F: 51)
Near the end of the core_atmosphere/Makefile, I added the physics_mmm directory into the include search path
$(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_mmm -I./physics/physics_wrf -I../external/esmf_time_f90
else
$(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./inc -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_mmm -I./physics/physics_wrf -I../external/esmf_time_f90
With these two changes, my MPAS 8.0.0 build was successful. I moved these executables and the corresponding data files into my existing MPAS 7.0 operational setting. I didn't modify any of the namelist or stream files and everything seemed to work (at last after one day!). After a few more days of clean running, I hope to test out some of the updated physics parameterizations in MPAS 8.
System: CentOS (uname -a: Linux wrf2 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux)
Compiler: PGI: pgf90 -version: pgf90 (aka nvfortran) 23.3-0 64-bit target on x86-64 Linux -tp zen
Build commands:
setenv NETCDF /home/.../sw/MET/external_libs
setenv PNETCDF /home/.../sw/MPAS/pnetcdf
make pgi CORE=init_atmosphere AUTOCLEAN=true PRECISION=single |& tee v8.compile.init.log
make pgi CORE=atmosphere AUTOCLEAN=true PRECISION=single |& tee v8.compile.model.log2
1. Both init_atmosphere and atmosphere compiles failed because of a bad reference to netcdf functions.
/home/.../sw/MET/external_libs/lib/libnetcdff.so: undefined reference to `nc_inq_var_filter'
/home/.../sw/MET/external_libs/lib/libnetcdff.so: undefined reference to `nc_def_var_filter'
Interestingly. I modified the top-level Makefile to remove the addition of the libnecddff libraries to the search path. Once that was done and the build only used the netcdf and pnetcdf libraries, the build of initi-atmosphere worked and the atmosphere build continued past that point.
2. The mpas_atm_core.F code apparently tries to include the mp_radar.mod file which exists in the physics/physics_mmm directory. However, the search path doesn't include this directory.
mpif90 -D_MPI -DCPRPGI -DCORE_ATMOSPHERE -DMPAS_NAMELIST_SUFFIX=atmosphere -DMPAS_EXE_NAME=atmosphere_model -DSINGLE_PRECISION -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=unknown -DMPAS_BUILD_TARGET=pgi -DMPAS_SMIOL_SUPPORT -DDO_PHYSICS -O3 -byteswapio -Mfree -c mpas_atm_core.F -I/home/.../sw/MET/external_libs/include -I/home/.../sw/MPAS/pnetcdf/include -I/home/.../sw/MPAS/MPAS-Model-8.0.0/src/external/SMIOL -I/home/.../sw/MET/external_libs/include -I/home/.../sw/MPAS/pnetcdf/include -I./inc -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_wrf -I../external/esmf_time_f90
NVFORTRAN-F-0004-Unable to open MODULE file mp_radar.mod (mpas_atm_core.F: 51)
Near the end of the core_atmosphere/Makefile, I added the physics_mmm directory into the include search path
$(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_mmm -I./physics/physics_wrf -I../external/esmf_time_f90
else
$(FC) $(CPPFLAGS) $(PHYSICS) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./inc -I../framework -I../operators -I./physics -I./dynamics -I./diagnostics -I./physics/physics_mmm -I./physics/physics_wrf -I../external/esmf_time_f90
With these two changes, my MPAS 8.0.0 build was successful. I moved these executables and the corresponding data files into my existing MPAS 7.0 operational setting. I didn't modify any of the namelist or stream files and everything seemed to work (at last after one day!). After a few more days of clean running, I hope to test out some of the updated physics parameterizations in MPAS 8.