HelloWhile both geogrid and metgrid make use of WRF's I/O API to read and write NetCDF files, the metgrid program is special in that it includes additional code for reading NetCDF files (the primary use case being the ingest of MPAS-Atmosphere output). It's purely a guess, but it may be that one of the 'nf90_' routines that are called in the metgrid/src/scan_input.F module ultimately references 'nc_set_var_chunk_cache_ints'.
@Doulgas_secchi Would you be willing to try recompiling the metgrid program after overwriting the default WPS/metgrid/src/scan_input.F file with the attached version, which comments-out calls to NetCDF Fortran90 interface routines? If compilation of the metgrid.exe program is successful, you should be able to use the program as normal, as long as you don't plan on using MPAS-Atmosphere output for WRF ICs and LBCs. The modified scan_input.F file is of course a work-around, but knowing whether it works will help in narrowing down the problem and ultimately finding a long-term solution.
Thanks for the feedback -- this is good to know!Hello
i was having the same issue while compiling WPS V4.5 but after trying your scan_input.F i managed to get metgrid.exe
i'm compiling with Linux x86_64, gfortran (dmpar)
thank you
Just a solution i put to the github for review and pull requestThank you @mgduda. The file you sent also worked for me and I compiled with ifx and icc (new intel compilers).
Thanks,
JeremyB
########################################################################################################################
#ARCH Linux x86_64, Intel oneAPI compiler with icx # serial serial_NO_GRIB2 dmpar dmpar_NO_GRIB2
#
COMPRESSION_LIBS = CONFIGURE_COMP_L
COMPRESSION_INC = CONFIGURE_COMP_I
FDEFS = CONFIGURE_FDEFS
SFC = ifx
SCC = icx
DM_FC = mpif90 -f90=$(SFC)
DM_CC = mpicc -cc=$(SCC)
FC = CONFIGURE_FC
CC = CONFIGURE_CC
LD = $(FC)
FFLAGS = -FR -convert big_endian
F77FLAGS = -FI -convert big_endian
FCSUFFIX =
FNGFLAGS = $(FFLAGS)
LDFLAGS =
CFLAGS = -w -Wno-implicit-int
CPP = /lib/cpp -P -traditional
CPPFLAGS = -D_UNDERSCORE -DBYTESWAP -DLINUX -DIO_NETCDF -DIO_BINARY -DIO_GRIB1 -DBIT32 CONFIGURE_MPI
ARFLAGS =
CC_TOOLS =
Yeah, it worked.@Doulgas_secchi The "scan_input.f90" file is a processed version of "scan_input.F". If you modify just scan_input.f90, clean, and re-compile, that scan_input.f90 file will be overwritten as you've found. Also, if you just modify scan_input.f90 and compile metgrid a second time, that scan_input.f90 file will not be recompiled; it's modifications to scan_input.F that will trigger a recompilation of that file.
Just to make sure we're running the intended test, can you do the following in this order specifically:
1. ./clean -a
2. ./configure
3. Copy the "scan_input.F.txt" that I previously attached to "WPS/metgrid/src/scan_input.F"
4. ./compile
After compiling, you should see that WPS/metgrid/src/scan_input.f90 contains the "!" comment character at the beginning of any line referencing a NetCDF Fortran90 interface routine.
Apologies for the trouble -- I just want to make sure that the modified scan_input.F is being used as intended.