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

Re: 20031118: netcdf data problem (fwd)



>To: <address@hidden>
>From: "Birgit Heese" <address@hidden>
>Subject: netcdf data problem
>Organization: MIM
>Keywords: 200311171529.hAHFT5Ob010057

Birgit,

> thank you for the suggestion using the nc_share flag.
> But I am using Fortran. My open command is:
> 
> nf_open("file.dat", nf_write, ncid)
> 
> and nc_share is not known then.
> Is there a coressponding flag  like "nf_share"?
> I tried nf_share, but it didn't work.

Yes, sorry I didn't notice you were using the Fortran interface.  For
the Fortran-77 interface, the flag is "NF_SHARE" and it's documented
as one of the flags used in the NF_OPEN call:

  
http://www.unidata.ucar.edu/staff/russ/netcdf/guidef/guidef-10.html#HEADING10-112

and would be used like this:

  STATUS = NF_OPEN('file.nc', IOR(NF_WRITE, NF_SHARE), NCID)

If you are using the Fortran-90 interface instead, the "NF90_SHARE"
has a similar purpose and is documented as one of the flags used in
the NF90_OPEN call:

  
http://www.unidata.ucar.edu/packages/netcdf/f90/Documentation/f90-html-docs/guide5.html#1034444

  STATUS = NF90_OPEN(PATH = "file.nc", CMODE = IOR(NF90_NOWRITE, NF90_SHARE), 
NCID = NCID)

Even though the share flag is intended to support concurrent access,
it also is currently the best workaround I know of for this bug, since
it turns off caching and buffering which is where the bug occurs.  I
still hope to get a fix in for this when we release version 3.6.0.

--Russ