REASON: Attempting netcdf-4 operation on netcdf-3 file

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
andre_belem
Posts: 3
Joined: Wed May 30, 2012 11:56 pm
Location: Universidade Federal Fluminense

REASON: Attempting netcdf-4 operation on netcdf-3 file

#1 Unread post by andre_belem »

Dear all,

I just moved to a new Ubuntu 12.04 machine and installed netcdf from source, with special attention to netcdf-4.2.1.1 for the CC compiler (using --disable-netcdf-4 option) and netcdf-fortran-4.2 for netcdf.mod.
Everything installed, I compiled ROMS with no problems and tested the UPWELLING example.
Everything was fine, until I installed with sudo apt-get install the ferret-vis package and then - BUMP!
...
NETCDF_CREATE - unable to create output NetCDF file:
ocean_his.nc
call from: def_his.F
...
ERROR: Abnormal termination: NetCDF OUTPUT.
REASON: Attempting netcdf-4 operation on netcdf-3 file

I found a mismatch between what I installed previously (/usr/local/netcdf) with "some" netcdf scratch from ferret-vis.
So, I have no idea why the program is now giving me this error because NETCDF_DIR is correctly set in my Compilers/Linux-gfortran.mk

Any idea what I'm doing wrong and why it worked for the first time ?
Cheers
Dr.Andre L. Belem
Project Manager - Physical Oceanography and Offshore Operations
UFF/ANP/Petrobras
Department of Geochemistry - Fluminense Federal University
Niteroi - RJ - Brazil
Skype: andre.lbelem Email: andre_belem@geoq.uff.br

User avatar
andre_belem
Posts: 3
Joined: Wed May 30, 2012 11:56 pm
Location: Universidade Federal Fluminense

Re: REASON: Attempting netcdf-4 operation on netcdf-3 file

#2 Unread post by andre_belem »

bump ? :shock:
Dr.Andre L. Belem
Project Manager - Physical Oceanography and Offshore Operations
UFF/ANP/Petrobras
Department of Geochemistry - Fluminense Federal University
Niteroi - RJ - Brazil
Skype: andre.lbelem Email: andre_belem@geoq.uff.br

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: REASON: Attempting netcdf-4 operation on netcdf-3 file

#3 Unread post by kate »

Well, going to the source, in mod_netcdf.F the file creation mode starts as:

Code: Select all

#if defined HDF5
!     integer :: CMODE = nf90_hdf5         ! NetCDF-4/HDF5 format file
      integer :: CMODE = nf90_netcdf4      ! NetCDF-4/HDF5 format file
#else
      integer :: CMODE = nf90_64bit_offset ! NetCDF 64-bit offset format
!                                            (large file support)
#endif
I assume you don't have HDF5 defined, so it should be attempting the 64bit_offset mode. Can you write a test code to create such a file with your library?

User avatar
andre_belem
Posts: 3
Joined: Wed May 30, 2012 11:56 pm
Location: Universidade Federal Fluminense

Re: REASON: Attempting netcdf-4 operation on netcdf-3 file

#4 Unread post by andre_belem »

Hi Kate,
yes...I don't have HDF5 because I installed netcdf with --disable-netcdf-4 option.
I can't create any file (same error) but it doesn't explain "why" it worked for the first run and now doesn't work any more.

I tried again to install everything from a fresh install and now doesn't work neither the first run.

I guess it has something to do with netcdf versions (I have both netcdf-3 and -4 because ferret, GMT, etc etc). May be I have to refresh all netcdf links. But...it still doesn't explain why worked for just one run.

:?:
Dr.Andre L. Belem
Project Manager - Physical Oceanography and Offshore Operations
UFF/ANP/Petrobras
Department of Geochemistry - Fluminense Federal University
Niteroi - RJ - Brazil
Skype: andre.lbelem Email: andre_belem@geoq.uff.br

Post Reply