全部版块 我的主页
论坛 站务区 十一区 新手入门区
2411 0
2020-08-24
# Import system modules  

import arcpy

from arcpy import env

from arcpy.sa import *

# Input data source

arcpy.env.workspace = "e:/ncold/"

arcpy.env.overwriteOutput = True

# Set output folder

OutputFolder = r"E:\nc"

# Loop through a list of files in the workspace

NCfiles = arcpy.ListFiles("*.nc")

for filename in NCfiles:
    print("Processing: " + filename)

    inNCfiles = arcpy.env.workspace + "/" + filename

    fileroot = "npr" + filename[23:31]

    TempLayerFile = "PM25"

    outRaster = OutputFolder + "/" + fileroot

    # Process: Make NetCDF Raster Layer

    arcpy.MakeNetCDFRasterLayer_md(inNCfiles, "PM25", "lon", "lat", TempLayerFile, "", "", "BY_VALUE")

    # Process: Copy Raster

    arcpy.CopyRaster_management(TempLayerFile, outRaster + ".tif", "", "", "", "NONE", "NONE", "")

print "***DONE!!!"
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群