定义一个三维浮点变量,并指定它的类型和维度 status = nf90_def_var(ncid, varname, NF90_DOUBLE, [xid, yid, zid], varid) if (status /= NF90_NOERR) then print *, 'Error: cannot define variable' stop endif ! 结束定义模式 status = nf90_enddef(ncid) if (status /= NF90_NOERR) ...
name=trim(dim_name), valueList=valueListR4, rc=rc); ESMF_ERR_RETURN(rc) ncerr = nf90_enddef(ncid=ncid); NC_ERR_STOP(ncerr) ncerr = nf90_put_var(ncid, dim_varid, values=valueListR4 ); NC_ERR_STOP(ncerr) ncerr = nf90_redef(ncid=ncid); NC_ERR_STOP(ncerr) deallocate(...
Added support for creating netCDF/HDF5 files with szip compression with new functions nf90_def_var_szip() and nf_def_var_szip(). SeeGithub #213. Corrected an issue where parallel netCDF-Fortran builds would fail despite the presense of MPI libraries/compiler/infrastructure. SeeGithub #208...
assign attribute values NF90_ENDDEF ! end definitions: leave define mode NF90_PUT_VAR ! provide values for variable NF90_CLOSE ! close: save new netCDF dataset In the following example I show a simple way to write a 2D array of data into a netCDF file. Here is an example where I ...
nf90_create(filename ,IOR(NF90_NETCDF4,NF90_MPIIO),ncid,comm=MPI_COMM_WORLD, info=MPI_INFO_NULL) status=nf90_def_dim(ncid, "x", NX, x_dimid) status=nf90_def_dim(ncid, "y", NY, y_dimid) dimids = (/ y_dimid, x_dimid /) status=nf90_def_var(ncid, "data", ...
integer, dimension(2,387548) :: data integer, dimension(2,400000) :: data integer :: error integer :: ncid, varid integer :: dim1, dim2 data = 1 error = nf90_create( "ncproblem.nc", ior(nf90_clobber, nf90_netcdf4), ncid ) error = nf90_def_dim( ncid, "First", size(...