添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

大部分nc数据在纬度上是反的,即存在南北倒置的现象,因此我们在读入数据后,需要将nc数据在纬度上做个翻转,那么用python的xarray包如何操作呢?仅需1行代码即可搞定。

inpath = 'G:/GLDAS/vic/download/GLDAS.nc4'
ncdata = xr.open_dataset(inpath) #读取数据
ncdata1 = ncdata.reindex(lat=list(reversed(ncdata.lat)))#纬度方向翻转
				
netCDF的教程例子,用Fortran95把数据写到文件中 编译:gfortran  ****.f90 -I/usr/local/include -L/usr/local/lib -lnetcdff -o test1 运行:./test1 program simple_xy_wr   use netcdf   implicit none   ! 定义数据文件的名称   characte
库xarray可以帮我们读取出nc文件的内容,并生成dataset,我们通过取dataarray,通过计算来达到各种目的。 那么,要如何通过xarray读出nc文件内容并简简单单画个图呢?以下是我的学习心得: 第一步我使用open_dataset函数,打开.nc文件并查看文件内容,得到变量名‘dust_index’,'lat','lon',这里可以看到‘coordinate’“坐标”项,是以时间为坐标的。 用变量来存储.nc中的变量,并可以用.s...
# 查看temperature变量的系数 print(ds['temperature'].attrs['scale_factor']) print(ds['temperature'].attrs['add_offset']) 其中,`scale_factor`表示变量的系数,`add_offset`表示变量的偏移量。 Unexpected error condition encountered. Please check the integrity of the operation performed m0_70964003: 这三个是一样的还是不行呐 xarray如何将nc数据在纬度上翻转?(上下/南北翻转) Unexpected error condition encountered. Please check the integrity of the operation performed dixhdjdjh: 可输入第一个数据的时候就已经显示这个错误了是怎么回事呀 基于python将grd文件转成tif,并进行裁剪 m0_73855617: 您好,用这个程序但是转换的tif边界不重合如何解决 centos打开spyder报错:libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory python绘制分组柱状图