爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5304|回复: 1

[其他] nco 转换格式

[复制链接]

新浪微博达人勋

发表于 2018-6-12 16:37:26 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 dengxiaohua_121 于 2018-6-12 16:38 编辑

各位好。我想请教一问题。由于需要,最终需要生成grb数据。我是在NCL里头先生成nc数据,然后用cdo转换成了grb格式的数据。但是把两种数据打开一看,里头的变量名什么的都不一样了,有谁知道怎么解决的吗?
output_file=pltDir+"out/"+"HMHPZP"+day+"-"+shixiao_biaoshi2+".nc"  output_file_grb=pltDir+"out/"+"HMHPZI"+day+"-"+shixiao_biaoshi2+".grb"
  a=addfile(output_file,"c")
  HPZ@long_name="heavy_rain"
  HPZ@units="mm"
  a->HPZ=HPZ
  fils_grb = systemfunc ("cdo -f grb copy "+output_file+" "+output_file_grb)

最后的读入的两种格式的数据如下:
nc数据读出来是这样子的
file global attributes:
   dimensions:
      lat = 181
      lon = 281
   variables:
      float HPZ ( lat, lon )
         units :        mm
         long_name :        heavy_rain
         _FillValue :        9.96921e+36

      float lat ( lat )
         La1 :        90
         Lo1 :         0
         La2 :        -90
         Lo2 :        359.75
         Di :        0.25
         Dj :        0.25
         units :        degrees_north
         GridType :        Cylindrical Equidistant Projection Grid
         long_name :        latitude

      float lon ( lon )
         La1 :        90
         Lo1 :         0
         La2 :        -90
         Lo2 :        359.75
         Di :        0.25
         Dj :        0.25
         units :        degrees_east
         GridType :        Cylindrical Equidistant Projection Grid
         long_name :        longitude



grb数据读出来是这样子的
file global attributes:
   dimensions:
      g0_lat_0 = 281
      g0_lon_1 = 321
   variables:
      float PRES_GDS0_SFC ( g0_lat_0, g0_lon_1 )
         center :        unknown
         long_name :        Pressure
         units :        Pa
         _FillValue :        1e+20
         level_indicator :        1
         gds_grid_type :        0
         parameter_table_version :        255
         parameter_number :        1
         forecast_time :        0
         forecast_time_units :        days
         initial_time :        12/31/-1 (00:00)

      float g0_lat_0 ( g0_lat_0 )
         long_name :        latitude
         GridType :        Cylindrical Equidistant Projection Grid
         units :        degrees_north
         Dj :        0.25
         Di :        0.25
         Lo2 :        170
         La2 :        50
         Lo1 :        90
         La1 :        -20

      float g0_lon_1 ( g0_lon_1 )
         long_name :        longitude
         GridType :        Cylindrical Equidistant Projection Grid
         units :        degrees_east
         Dj :        0.25
         Di :        0.25
         Lo2 :        170
         La2 :        50
         Lo1 :        90
         La1 :        -20




密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-6-12 20:41:43 | 显示全部楼层

回帖奖励 +5 金钱

楼主我想用cdo合并nc文件不知道怎么弄呢
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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