爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 8653|回复: 1

[求助] 请问哪位大牛可以帮我看看uvcdat ASD报错??非常感谢

[复制链接]

新浪微博达人勋

发表于 2017-11-28 19:42:41 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
微信图片_20171130180355.jpg
map.py如下(打开nc文件):
#import vcs, cdms, cdutil, time, os, sys
#import cdms2 as cdms
import cdms2 as cdms,cdutil, numpy.oldnumeric.ma as MA, vcs,cdtime
import string, time, MV2 as MV, sys, os
from numpy.oldnumeric import*
import numpy as Numeric
from cdutil import*
import cdutil.continent_fill as continent_fill
import cdutil.worldmap as worldmap
from genutil import statistics
cdms.setAutoBounds('on')
filepath=os.path.join('tavg.01801.01.01.nc')
#filepath=os.path.join('test_GLODAP.nc')
cdmsfile=cdms.open(filepath)
data1=cdmsfile('A_sat',squeeze=1)
#data1=cdmsfile('pco2', time=1999, squeeze=1)
#data=data2-data1
#for i in range(100):
# for j in range(100):
#  if(data2[i,j]==None or data1[i,j]==None):
#   data[i,j]=0.0
#print data

v=vcs.init()
v.show('isofill')
#v.setcolormap('ASD')
v.setcolormap('rainbow')
#v.setcolormap('grn_to_magenta')
#v.setcolormap('bl_to_darkred')
cf_asd = v.getisofill('ASD')
cf_asd.list()
cf_asd.datawc_x1=1.8
cf_asd.datawc_x2 = 358.2
#cf_asd.datawc_x1=1.8
#cf_asd.datawc_x2 = 258.2
#cf_asd.datawc_y1 = -80
#cf_asd.datawc_y2 = 70
cf_asd.datawc_y1 = -89.1
cf_asd.datawc_y2 = 89.1
#cf_asd.level_1=-48
#cf_asd.level_2=-24
#cf_asd.color_1=6
#cf_asd.color_2=31
df_asd = v.createisoline( 'new' )
#df_asd.datawc_x1 =1.8
#df_asd.datawc_x2 = 358.2
#df_asd.datawc_y1 = 1000.
#df_asd.datawc_y2 = 0.
#v.setcolormap('ASD')
#df_asd = v.getboxfill('ASD')
#df_asd.level_1=-24
#df_asd.level_2=-9
#df_asd.color_1=31
#df_asd.color_2=112
#SST_2400_2500-1800
#cf_asd.levels=(-0.5,0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5,5.5,6,6.5,7,7.5,8,8.5,9,9.5,10,10.5,11,11.5,12)
#cf_asd.fillareacolors= (120, 142,146,150,154,158,162,166,170,174,178,182,186,190,194,198,202,206,210,214,218,222,226,230,234)
#anthr_diccol_2500
#cf_asd.levels=(-1e+20,0,50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1050,1100,1150,1200,1e+20)
#cf_asd.fillareacolors= (247,6,15,24,33,42,51,60,69,78,87,96,105,114,123,132,141,150,159,168,177,186,195,204,213,222)
#df_asd.levels = (0,200,400,600,800,1000,1200)
#df_asd.linecolors=([241,241,241,241,241]) # change the line color
#df_asd.label='y'

co=continent_fill.Gcf()
co.name='default'
co.g_name='Gcf'
co.line='y'
co.line_width=1
co.line_color=241
co.fill='y'
co.fill_color=241
co.datawc_x1 = 1.8
co.datawc_x2 = 358.2
#co.datawc_x1 = 1.8
#co.datawc_x2 = 258.2
#co.datawc_y1 = -80
#co.datawc_y2 = 70
co.datawc_y1 = -89.1
co.datawc_y2 = 89.1
co.projection='linear'

v.clear()
v.plot(data1,cf_asd)
#v.plot(data1,df_asd)
co.plot(v)
v.postscript('A_sat.ps')
#v.clear()
#v.isofill(data3)
#v.postscript('sur_OmegaC_1809.ps')
#v.clear()
#v.isofill(data4)
#v.postscript('sur_co3_1809.ps')
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-12-2 22:03:30 | 显示全部楼层

棒棒哒,感谢楼主分享
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表