爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6740|回复: 5

如何读取变量中的信息

[复制链接]
发表于 2015-4-21 12:08:36 | 显示全部楼层 |阅读模式

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

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

x
Variable: hgt
Type: float
Total Size: 6776640 bytes
            1694160 values
Number of Dimensions: 3
Dimensions and sizes:    [lv_ISBL0 | 26] x [lat_0 | 181] x [lon_0 | 360]
Coordinates:
            lv_ISBL0: [1000..100000]
            lat_0: [90..-90]
            lon_0: [ 0..359]
Number Of Attributes: 12
  center :    US National Weather Service - NCEP (WMC)
  production_status :    Operational products
  long_name :    Geopotential height
  units :    gpm
  _FillValue :    1e+20
  grid_type :    Latitude/longitude
  parameter_discipline_and_category :    Meteorological products, Mass
  parameter_template_discipline_category_number :    ( 0, 0, 3, 5 )
  level_type :    Isobaric surface (Pa)
  forecast_time :    0
  forecast_time_units :    hours
  initial_time :    01/01/2013 (00:00)

比如说,我想读出来 initial_time :    01/01/2013 (00:00)

怎么写命令呢

密码修改失败请联系微信:mofangbao
发表于 2015-4-21 12:26:45 | 显示全部楼层
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2015-4-21 12:44:23 | 显示全部楼层
longlivehj 发表于 2015-4-21 12:26
http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml#Attributes

谢谢hj,可以再追问一个吗
    hgt = fi->HGT_P0_L100_GLL0
    tim = hgt@initial_time
    file_name=tim+" 500hPa"
    ; create plot
    wks = gsn_open_wks("ps",file_name)
这里提示有错误,是file_name中不可以有括号吗?还是其他原因
密码修改失败请联系微信:mofangbao
发表于 2015-4-21 12:53:34 | 显示全部楼层
yuan/// 发表于 2015-4-21 12:44
谢谢hj,可以再追问一个吗
    hgt = fi->HGT_P0_L100_GLL0
    tim = hgt@initial_time

错误提示是什么?
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2015-4-21 13:58:54 | 显示全部楼层
longlivehj 发表于 2015-4-21 12:53
错误提示是什么?

Copyright (C) 1995-2011 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.0.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
warning:GKS:GOPWK: --PostScript error: error opening output file
fatal:Workstation with PID#8 is not open
ERROR    3 IN NGSETI - value for WO must reference an open workstation.
ERROR    1 IN NGSETI - Uncleared prior error
ERROR    1 IN NGSETI - Uncleared prior error
ERROR    1 IN NGSETI - Uncleared prior error
ERROR    1 IN NGSETI - Uncleared prior error
ERROR    1 IN NGSETI - Uncleared prior error
fatal:Unable to open Workstation-Can't Create
fatal:Unable to access object with id:-4
fatal:NhlGetValues:PID #-4 is invalid
fatal:Execute: Error occurred at or near line 3489 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl

fatal:Execute: Error occurred at or near line 3781 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl

fatal:Execute: Error occurred at or near line 13 in file fnlread2.ncl
密码修改失败请联系微信:mofangbao
发表于 2015-4-21 17:13:26 | 显示全部楼层
yuan/// 发表于 2015-4-21 13:58
Copyright (C) 1995-2011 - All Rights Reserved
University Corporation for Atmospheric Research
...

换种格式试试呗!
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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