结束定义模式 status = nf90_enddef(ncid) if (status /= NF90_NOERR) then print *, 'Error: cannot end define mode' stop endif ! 写入数据到变量中 status = nf90_put_var(ncid, varid, data) if (status /= NF90_NOERR) then print *, 'Error: cannot write data' stop endif ! 关闭...
nf90_def_dim( ncid, "Second", size(data,2), dim2 ) error = nf90_def_var( ncid, "MyData", nf90_int, [dim1, dim2], varid ) error = nf90_enddef( ncid ) error = nf90_put_var( ncid, varid, data ) write(*,*) 'Put var: ', error data = 0.0 error = nf90_get_...
利用fortran创建、读取、写netCDF(.nc)的教程 Introduction to using the netCDF data format with Fortran 90 Michael Thorne (michael.thorne@utah.edu)Last Updated: July 20, 2010 I. Introduction NetCDF – Net work C ommon D ata F orm NetCDF is an array based data structure for storing ...
Open netCDF file !::: CALL check(nf90_open(infile, nf90_nowrite, ncid)) !Get the values of the coordinates and put them in xpos ypos !::: CALL check(nf90_inquire_variable(ncid,1,vname,xtype,ndims,dimids)) CALL check(nf90_inq_varid(ncid,vname,varid)) CALL check(nf90_get...
利用fortran创建、读取、写netCDF(.nc)的教程 Introduction to using the netCDF data format with Fortran 90 Michael Thorne (michael.thorne@utah.edu)Last Updated: July 20, 2010 I. Introduction NetCDF – Net work C ommon D ata F orm NetCDF is an array based data structure for storing ...