I only came across netcdf lately and have not much clue about using it. Besides-the problem I have is specific and I haven't yet found anything useful. I have a fortran code that performs claculations in parralel, using MPI. The end results-3d fields in cartesian coordinate sistem-are then written each to another file using netcdf. The writing process is defined by the following code:
nf90_create(path=file_name,&
cmode=IOR(NF90_NETCDF4,NF90_MPIIO),ncid=ncid,&
comm=mpid%comm,info=MPI_INFO_NULL))
now, I have another code that uses netcdf3 so it cannot read netcdf4 format. What I want to do is to change in cmode NF90_NETCDF4 with NF90_CLASSIC_MODEL. When I do this, the code compiles, runs, but it writes the data in completely wrong manner. Also, it stops before it goes from writing variable A onto writing variable B. Or before it has to exit the subroutine in which this command is used. To clarify a bit more: after the presented command, the code defines start and count according to the MPI and uses the followind netcdf commands:
nf90_def_dim(ncid,dim_name(i),dim_len(i),dimid(i))
nf90_def_var(ncid,var_name,nf90_real,dimid,varid(1))
nf90_enddef(ncid)
nf90_put_var(ncid,varid(1),var,start=startv,count=countv)
nf90_close(ncid)
So, I'm interested, what should I change for the code to write the desired data in classic or 64bit_offstring format without mentioned issues. If the presentation of the problem is unclear, I can provide the original subroutine that gives me trouble.
thank you for all the comments in advance