vin360airquality
New member
Hi everyone,
I'm currently setting up the OBSGRID model and encountered multiple errors during the compilation process. I would appreciate any help in resolving these issues.
Thank you for any suggestions!
I'm currently setting up the OBSGRID model and encountered multiple errors during the compilation process. I would appreciate any help in resolving these issues.
System Information:
- OS: [Ubuntu 24.04]
- Compiler: gfortran [version]
- NetCDF version: 4.7.4 (installed via Conda)
- OBSGRID version:GitHub - wrf-model/OBSGRID: Repository for OBSGRID
- Environment variables:
export NETCDF=/home/air360/miniconda3
export PATH=$NETCDF/bin:$PATH
export LD_LIBRARY_PATH=$NETCDF/lib:$LD_LIBRARY_PATH
export CPATH=$NETCDF/include:$CPATH
export LIBRARY_PATH=$NETCDF/lib:$LIBRARY_PATH
Error Summary:
- Fatal error: Cannot open included file ‘netcdf.inc’
pgsql
CopyEdit
main.f:29:0:
29 | INCLUDE 'netcdf.inc'
|
Fatal Error: Cannot open included file ‘netcdf.inc’
compilation terminated.- The file netcdf.inc is missing or not being found.
- Checked: NetCDF is installed at /home/air360/miniconda3, and its include directory contains netcdf.h but not netcdf.inc.
- Fatal Error: Cannot open module file ‘observation.mod’
lua
CopyEdit
driver.f:29:8:
29 | USE observation
| 1
Fatal Error: Cannot open module file ‘observation.mod’ for reading at (1): No such file or directory- observation.mod is missing, which suggests that it either:
- Failed to compile earlier
- Was not generated properly due to errors in dependencies
- observation.mod is missing, which suggests that it either:
- Linker errors: Missing .o files
yaml
CopyEdit
/usr/bin/ld: cannot find driver.o: No such file or directory
/usr/bin/ld: cannot find main.o: No such file or directory
/usr/bin/ld: cannot find proc_final_analysis.o: No such file or directory
collect2: error: ld returned 1 exit status- Many .o object files are missing, which suggests:
- Errors in previous compilation steps
- Dependencies not being built properly before linking
- Many .o object files are missing, which suggests:
Steps I Have Tried:
- Checked NetCDF installation
- Running nc-config --all shows NetCDF is installed and paths are set.
- But netcdf.inc is missing from /home/air360/miniconda3/include/.
- Recompiling with modified preprocessor settings
- Edited configure.oa to change:
ini
CopyEdit
CPP = /usr/bin/cpp -C -P -traditional
to:
ini
CopyEdit
CPP = /usr/bin/cpp -C -P -traditional-cpp
- Edited configure.oa to change:
- Reinstalling NetCDF-Fortran:
bash
CopyEdit
conda install -c conda-forge netcdf-fortran
But the error "Cannot open included file ‘netcdf.inc’" still appears. - Cleaning and recompiling:
bash
CopyEdit
make clean
make- Compilation still fails at the same point.
Request for Help
- Has anyone encountered a similar issue while compiling OBSGRID?
- Do I need a specific NetCDF-Fortran version to include netcdf.inc?
- Any advice on fixing observation.mod and ensuring dependencies compile properly?
Thank you for any suggestions!