资源简介
nc文件读取 python语言编写的 读取nc文件
代码片段和文件信息
# -*- coding: utf-8 -*-
from scipy.io import netcdf as nc
from scipy.io.netcdf import NetCDFFile as Dataset
import sqlite3
import pdb
import os
import numpy as np
import matplotlib.pyplot as plt
driver=“e“
db=driver+“:\\python\\Tmp_Data_base.db3“
conn = sqlite3.connect(db)
cur=conn.cursor()
folder=‘Z:\\python_program\\file_zoo_00Z\\‘
for row in cur.execute(“select localfilevarnamebeijing_time from wrf_file_info where beijing_time=2014091111 and varname=‘temp2m‘ “):
filename=folder+row[0] #从数据库中提取文件名称
print filename
fex_id=os.path.isfile(filename)
if fex_id ==True :
try:
cdf=Dataset(filename“r“)
tmp=cdf.variables[“temp2m“][:] #提取这个变量的所有值
tmp_shape=tmp.shape
- 上一篇:init_utils.py
- 下一篇:新浪微博PYTHON SDK
相关资源
- openmv识别红色,串口通信,可用于信
- python一个打砖块的小游戏
- python实验指导书 图文高清版
- python主动安装第三方库
- python爬取豆瓣top250电影信息
- FastAPI入门级
- python绘制 大蟒蛇
- python小程序(数组排序)
- Python去水印(基于cv2)
- Python 数据结构入门 - 二叉搜索树(
- python空心电感计算器
- python除法.docx
- 抽奖背后的秘密(python抽奖逻辑)
- 绘制统计学直方图茎叶图(matplotlib)
- python求解标准差
- 使用模块与库编程2.pptx 教程
- svm-simple.py(matplotlib)
- python数据分析与处理
- 监控文件夹,发现psd文件自动生成j
- 利用Python将照片在Excel中利用点阵图显
- 用malplotlib作带箭头的坐标轴
- pygame贪吃蛇
- python turtle 跳房子
- python 人群计数
- 自动化测试(基于pytest)
- 基于树莓派的动态图像对比(py3_ob<
- Python调用第三方API换脸
- “去哪儿吃”帮你选餐厅(python代码
- 国外实习题:Programming Assignment 3
- python 控制台登陆密码验证
评论
共有 条评论