打开文件,读取数据 stat=nf90_open(ncfile, NF90_NOWRITE, fid) stat=nf90_inq_varid(fid, 'sic', varid) stat=nf90_get_var(fid, varid, ice, start=(/180,10,start_num/), count=(/1,1,recnum/)) stat=nf90_inq_varid(fid, 'latitude', varid) stat=nf90_get_var(fid, varid, lat...
status=nf90_get_var(ncid,varid7,uwind) status=nf90_get_var(ncid,varid8,vwind) write(*,*) lon,lat !检查是不是读出来了 status=nf90_close(ncid) end program sample
Hi, We're running into stack overflow issues when calling nf90_get_var routines such as: function nf90_get_var_2D_FourByteInt(ncid, varid, values, start, count, stride, map) integer, intent( in) :: ncid, varid integer (kind = FourByteInt...
需要使用如下函数关闭打开的文件对象: •nc_close•nf_close•nf90_close ⚠️:在创建新文件时,如果定义的维度有记录维度...,那么要确保记录维度位于最左侧(⚠️:这里所说的最左侧是nc文件中变量的最左侧,但是在程序中定义变量的时候,使用nc_def_var等定义变量时,记录维度应该位于最右侧),否则会...
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_var(ncid,varid,xpos)) CALL check(nf90_inquire_variable(ncid,2,vname,xtype...
利用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 ...
利用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 ...
call ESMF_AttributeGet(grid, convention="NetCDF", purpose="FV3", & 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...
语言的函数接口以nc_开头,F77函数接口以nf_开头,F90函数接口以nf90_开头。...函数概览 NetCDF库的函数操作分为几个类别,以下以C语言API为例,Fortran的API类似,可能函数的参数有些区别。...nc_get_var / 获取变量值 / 其它操作 nc_close / 关闭打开的文件 如果使用Fortran的API接口,则改为如下命令: nf90_...
You can find below the code (very simple) and the log that I get after trying to build the program. subroutine create_netcdf use netcdf implicit none integer :: ncid, status test = nf90_create(path= "foo.nc",cmode = nf90_noclobber, ncid = ncid) if (sta...