Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

how to set netcdf fortran in config machines

I am having difficulty setting the correct env variables for netcdf fortran in config machines when porting to my local linux cluster.

The pio build fails when it can't find netcdf.mod. I added the statement <env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env> to my environment_variables section of config machines which is the directory where netcdf.mod is located. Now the pio build still fails but complains that it can't find netcdf fortran. On my system it is located at /usr/lib64. I have the statements:
<env name="NETCDF_PATH">/cm/shared/modulefiles/netcdf/gcc/64</env>
<env name="NetCDF_Fortran">/usr/lib64</env>
<env name="NetCDF_Fortran_LIBRARY">/usr/lib64/libnetcdff.so</env>
<env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env>

and it fails that it can't find netcdf.mod

I have also tried:
<env name="NETCDF_C_PATH">/cm/shared/modulefiles/netcdf/gcc/64</env>
<env name="NetCDF_FORTRAN_PATH">/usr/lib64</env>
<env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env>

and it still can't find netcdf.mod. Only when I include:
<env name="NETCDF_PATH">/cm/shared/modulefiles/netcdf/gcc/64</env>
<env name="NetCDF_Fortran_INCLUDE_DIR">/usr/lib64/gfortran/modules</env>

Will it find netcdf.mod but then it can't find netcdf fortran.
 
Top