This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Ed, > In fortran, how do you OR together constants? > > For example, in C I would say NC_CLOBBER|NC_FORMAT_64BIT. > > But how do you do that in fortran? In Fortran-77, use IOR, as in: iret = nf_create('foo.nc', IOR(NF_NOCLOBBER,NF_64BIT_OFFSET), ncid) In Fortran-90, use "or", as in: iret = nf90_create(path="foo.nc", cmode=or(nf90_clobber,nf90_64bit_offset), ncid=ncFileID) --Russ