[MITgcm-support] Loading Netcdf libraries for MITGCM

Martin Losch Martin.Losch at awi.de
Wed Apr 12 03:02:33 EDT 2023


If the netcdf libaries are in an unusual place you need to tell the model where they are. Depending on which build options file you are using you can either hardwire this in the build options file and set the variables:

    INCLUDES='-I/yourPath/include'
    LIBS='-L/yourPath/lib’

or similar, or you may be able to set the environment variable NETCDF_ROOT, NETCDF_HOME, etc before you run gemake2. Have a look at your optfile (e.g. tools/build_options/linux_amd64_gfortran) so see how to do it.

Martin


> On 12. Apr 2023, at 08:23, Nairita Pal <nairita.pal at coral.iitkgp.ac.in> wrote:
> 
> Hi,
> 
> I want to compile the MITGCM code for a verification test case exp2. While compiling the code, although everything else runs fine, the netcdf library seems to be missing. I get the message:
> 
> "Can we create NetCDF-enabled binaries...  no"
> 
> I was wondering if you could help me regarding this issue.
> 
> Note that I have loaded NetCDF libraries. However, the location is not the usual /usr/include directory, and is loaded in a software directory in my home folder inside the cluster. Probably there are some inconsistencies regarding the paths?
> 
> Best regards,
> Nairita Pal
> 
> -- 
> Assistant Professor,
> Center for Oceans, Rivers, Atmosphere and Land Sciences (CORAL)
> IIT Kharagpur
> 
> Homepage: https://sites.google.com/view/nairita-pal/home
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support



More information about the MITgcm-support mailing list