[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #GUF-535525]: compiler cannot find fortran 77 netcdf codes



Hello,

Thank you for reaching out and thank you for your patience, I was at AGU last 
week.  I'm unable to attempt to replicate the issue you've reported since I am 
missing `compoundnc4_util.F90`, but I think I have identified a couple of 
issues.

It looks like you are not telling gfortran to link against libnetcdff or 
libnetcdf.  What happens if you try the following:

    $ gfortran -c $(nf-config --fflags) $(nf-config --flibs) 
convertnc_util_mac.f EntGVSD_util.f compoundnc4_util.F90

You can see what we are passing to gfortran by invoking 'nf-config --fflags' 
and 'nf-config --flibs'.  With any luck, this should resolve the error you're 
observing, or at least advance us towards getting your program working.

Thanks again for your patience, let us know if this gets us closer to solving 
the issue!

Have a great day,

-Ward


> Full Name: Nancy Kiang
> Email Address: address@hidden
> Organization: NASA GISS
> Package Version: netcdf4
> Operating System: MacOS 11.6.1 Big Sur
> Hardware: MacBook Pro laptop
> Description of problem: Hi, I have a bunch of netcdf fortran programs I've 
> written on my Mac that use fortran 77 codes and routines, like NF_WRITE, 
> NF_REDEF, NF_PUT_ATT_TEXT, etc.
> 
> After I upgraded to MacOS 11.6.1 Big Sur, I reinstalled my fortran and netcdf 
> (and the dependencies on hdf5, lib).
> 
> I'm writing a fortran 90 program now (so that I can define compound data 
> types), which uses some utility routines I made previously in another module 
> by using that module.  Now when I compile, fortran cannot seem to recognize 
> the fortran 77 routines.
> 
> I am attaching my installation procedure, and the two fortran module files 
> that worked for me prior to reinstalling.  Is my install missing the fortran 
> 77 netcdf things?
> 
> gfortran -c -I/usr/local/include convertnc_util_mac.f EntGVSD_util.f 
> compoundnc4_util.F90
> 
> EntGVSD_util.f:542:44:
> 
> 542 |       status=nf_put_att_text(ncid, NF_GLOBAL, 'Description'
> |                                            1
> Error: Symbol 'nf_global' at (1) has no IMPLICIT type; did you mean 
> 'nf90_global'?
> EntGVSD_util.f:532:41:
> 
> 532 |       status=nf_open(trim(file), NF_WRITE, ncid)
> |                                         1
> Error: Symbol 'nf_write' at (1) has no IMPLICIT type; did you mean 
> 'nf90_write'?
> EntGVSD_util.f:494:23:
> 
> 494 |      &        , NF_CHAR, 1, dimc, varid)
> |                       1
> Error: Symbol 'nf_char' at (1) has no IMPLICIT type
> EntGVSD_util.f:484:41:
> 
> 484 |       status=nf_open(trim(file), NF_WRITE, ncid)
> |                                         1
> Error: Symbol 'nf_write' at (1) has no IMPLICIT type
> EntGVSD_util.f:419:24:
> 
> 419 |      &        , NF_FLOAT, 3, dim, varid)
> |                        1
> Error: Symbol 'nf_float' at (1) has no IMPLICIT type
> EntGVSD_util.f:408:22:
> 
> 408 |      &        , NF_INT, 1, dimt, varid)
> |                      1
> Error: Symbol 'nf_int' at (1) has no IMPLICIT type
> EntGVSD_util.f:400:50:
> 
> 400 |       status=nf_def_dim(ncid, 'time', NF_UNLIMITED, dimt)
> |                                                  1
> Error: Symbol 'nf_unlimited' at (1) has no IMPLICIT type
> 
> etc.
> 
> 
> 


Ticket Details
===================
Ticket ID: GUF-535525
Department: Support netCDF
Priority: High
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.