-
大小: 2KB文件类型: .py金币: 1下载: 0 次发布日期: 2021-06-15
- 语言: Python
- 标签: python2.7 arcpy GRACE_netCDF
资源简介
python_批量读取netCDF4文件并输出为tif
python_批量读取 GRACE grid 数据 netCDF4文件并输出为tif
代码片段和文件信息
#encoding=utf8
import arcpy
from arcpy.sa import *
import os
def extractAllNetCDF():
variable = “lwe_thickness“
x_dimension = “lon“
y_dimension = “lat“
band_dimension = ““
dimension = “time“
valueSelectionMethod = “BY_VALUE“
#先找好或建好输出路径,然后在这里更改输出路径
outLoc = r“G:\GSM_GRACE\GSR_grid\data“
inNetCDF = r“G:\GSM_GRACE\GSR_grid\CSR_GRACE.nc“
#Veriable
variable = “lwe_thickness“
x_dimension = “lon“
y_dimension = “lat“
band_dimension = ““
dimension = “time“
valueSelectionMethod = “BY_VALUE“
nc_FP = arcpy.NetCDFFileProperties(inNetCDF)
nc_Dim = nc_FP.getDimensions()
for dimension in nc_Dim:
top = nc_FP.getDimensionSize(dimension)
for i in range(0 top):
if dimension == “time“:
dimension_values = nc_FP.getDimensionValue(dimension i)
print dimension_values[0:9].replace(‘ ‘‘‘)
nowFile =str(dimension_values[0:9].replace(‘ ‘‘‘))
nowFile = nowFile.translate(None ‘/‘)
## print nowFile
if int(nowFile
相关资源
- win7 64位python2.7安装PIL模块
- python2.7chm帮助文档
- 基于python2.7的LeNet5源代码实现
- Mod_Python2.7安装文件
- Python2.7 贪吃蛇小游戏源码
- arcpy 工具包
-
python2.7sc
ript目录 - 栅格投影转换.py
- pcap-1.1.win32-py2.7.exe
- py2exe for 2.764位
- 批量提取栅格数据——arcpy程序
- ARCGIS中Python实现批量裁剪.docx
- py2exe(python2.7/python3.3/python3.4)
- mod_wsgi-4.4.23+ap24vc9-cp27-cp27m-win_amd64
- 《机器学习实战》中决策树python2.7代
- 相关性分析+偏相关分析
- 本资源基于arcpy的hurst指数算法实现,
- arcpy arcgis python 遍历某文件下所有要素
- ArcPY帮助文档
- zbar windows64位 python2.7安装包
- wxPython2.8-win32-unicode-2.8.12.1-py27.msi
评论
共有 条评论