Skip to content

How to resolve ''Fatal Error: Can't open module file ‘netcdf.mod’ for reading....." #205

Open
@anserwei

Description

@anserwei

Hi, I am a beginner who is learning how to read and write a netcdf file with Fortran 90. I got some problems. Could someone help me?

  • I have installed ''netcdf-fortran'' through conda.
    (https://anaconda.org/conda-forge/netcdf-fortran)

    conda install -c conda-forge netcdf-fortran

  • When I run a program named simple_xy_wr.f90 on Mac terminal. I got an error:

    Fatal Error: Can't open module file ‘netcdf.mod’ for reading at (1): No such file or directory compilation terminated.

  • I am confused. I don't know how to fix this.

  • I check the directory of ‘netcdf.mod’, which locates in ''/Users/Jim/anaconda3/include".
    I also find:
    netcdf.h; netcdf.inc .......; netcdf_nf_interfaces.mod, etc.

  • But, in the directory "/usr/local/include", nothing is related to netcdf.

  • Actually, I use gfortran to run the program.

So, could someone help me? I appreciate it. Thank you so much.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions