Thank you for your advice. I just checked the ones you mentioned. Too bad I still can't solve the problem.Hi,
The errors you're seeing are specific to netcdf. It seems that perhaps netcdf is not in your environmental path, or that the netcdf that is in your path was not built with the compiler(s) you're trying to use. Make sure you that you have built netcdf with the exact compiler (and version of that compiler) that you're trying to use, and that you have your path pointing to the correct netcdf.
Thanks for your advice!Per the screenshots you attached, it does look like you have everything installed. I'm not sure why it's unable to find the netcdf correctly. Are you using a dual-booted system (e.g., Windows machine with Linux installed parallel to Windows)? If so, there could be some issues with the paths overlapping or not able to be located. I would suggest reaching out to a systems administrator at your institution to see if they have any thoughts.
As an alternative, you could use an NCL program to modify your file. Take a look at this presentation and, in particular, starting with slide 40.
gfortran read_wrf_nc.f90 -o read_wrf_nc.exe -I/Software/netcdf-fortran-4.4.5/include -L/Software/netcdf-fortran-4.4.5/lib -lnetcdff -lnetcdf