爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 8477|回复: 13

[程序设计] matlab如何处理nc文件作图呢?

[复制链接]

新浪微博达人勋

发表于 2018-5-30 19:25:43 | 显示全部楼层 |阅读模式

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

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

x
matlab已经读取了nc文件,uwnd、lon 、lat、level、time,uwnd是四维的,怎么画图呢
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-5-30 19:27:40 | 显示全部楼层
>> ncFilePath='C:\Users\YOUNG\Desktop\uwnd.2015.nc';
>> ncdisp(ncFilePath);
Source:
           C:\Users\YOUNG\Desktop\uwnd.2015.nc
Format:
           netcdf4_classic
Global Attributes:
           Conventions   = 'COARDS'
           title         = '4x daily NMC reanalysis (2014)'
           history       = 'created 2013/12 by Hoop (netCDF2.3)'
           description   = 'Data is from NMC initialized reanalysis
                           (4x/day).  It consists of most variables interpolated to
                           pressure surfaces from model (sigma) surfaces.'
           platform      = 'Model'
           References    = 'http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html'
           dataset_title = 'NCEP-NCAR Reanalysis 1'
Dimensions:
           level = 17
           lat   = 73
           lon   = 144
           time  = 1460  (UNLIMITED)
Variables:
    level
           Size:       17x1
           Dimensions: level
           Datatype:   single
           Attributes:
                       units        = 'millibar'
                       actual_range = [1000    10]
                       long_name    = 'Level'
                       positive     = 'down'
                       GRIB_id      = 100
                       GRIB_name    = 'hPa'
                       axis         = 'Z'
    lat  
           Size:       73x1
           Dimensions: lat
           Datatype:   single
           Attributes:
                       units         = 'degrees_north'
                       actual_range  = [90 -90]
                       long_name     = 'Latitude'
                       standard_name = 'latitude'
                       axis          = 'Y'
    lon  
           Size:       144x1
           Dimensions: lon
           Datatype:   single
           Attributes:
                       units         = 'degrees_east'
                       long_name     = 'Longitude'
                       actual_range  = [0         357.5]
                       standard_name = 'longitude'
                       axis          = 'X'
    time
           Size:       1460x1
           Dimensions: time
           Datatype:   double
           Attributes:
                       long_name     = 'Time'
                       delta_t       = '0000-00-00 06:00:00'
                       standard_name = 'time'
                       axis          = 'T'
                       units         = 'hours since 1800-01-01 00:00:0.0'
                       actual_range  = [1884648  1893402]
    uwnd
           Size:       144x73x17x1460
           Dimensions: lon,lat,level,time
           Datatype:   single
           Attributes:
                       long_name               = '4xDaily U-wind'
                       units                   = 'm/s'
                       precision               = 2
                       least_significant_digit = 1
                       GRIB_id                 = 33
                       GRIB_name               = 'UGRD'
                       var_desc                = 'u-wind'
                       level_desc              = 'Multiple levels'
                       statistic               = 'Individual Obs'
                       parent_stat             = 'Other'
                       missing_value           = -9.969209968386869e+36
                       valid_range             = [-125  160]
                       dataset                 = 'NCEP Reanalysis'
                       actual_range            = [-93.9         133.9]
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-5-30 19:42:47 | 显示全部楼层

matlab nc程序

Source:
           C:\Users\YOUNG\Desktop\uwnd.2015.nc
Format:
           netcdf4_classic
Global Attributes:
           Conventions   = 'COARDS'
           title         = '4x daily NMC reanalysis (2014)'
           history       = 'created 2013/12 by Hoop (netCDF2.3)'
           description   = 'Data is from NMC initialized reanalysis
                           (4x/day).  It consists of most variables interpolated to
                           pressure surfaces from model (sigma) surfaces.'
           platform      = 'Model'
           References    = 'http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html'
           dataset_title = 'NCEP-NCAR Reanalysis 1'
Dimensions:
           level = 17
           lat   = 73
           lon   = 144
           time  = 1460  (UNLIMITED)
Variables:
    level
           Size:       17x1
           Dimensions: level
           Datatype:   single
           Attributes:
                       units        = 'millibar'
                       actual_range = [1000    10]
                       long_name    = 'Level'
                       positive     = 'down'
                       GRIB_id      = 100
                       GRIB_name    = 'hPa'
                       axis         = 'Z'
    lat  
           Size:       73x1
           Dimensions: lat
           Datatype:   single
           Attributes:
                       units         = 'degrees_north'
                       actual_range  = [90 -90]
                       long_name     = 'Latitude'
                       standard_name = 'latitude'
                       axis          = 'Y'
    lon  
           Size:       144x1
           Dimensions: lon
           Datatype:   single
           Attributes:
                       units         = 'degrees_east'
                       long_name     = 'Longitude'
                       actual_range  = [0         357.5]
                       standard_name = 'longitude'
                       axis          = 'X'
    time
           Size:       1460x1
           Dimensions: time
           Datatype:   double
           Attributes:
                       long_name     = 'Time'
                       delta_t       = '0000-00-00 06:00:00'
                       standard_name = 'time'
                       axis          = 'T'
                       units         = 'hours since 1800-01-01 00:00:0.0'
                       actual_range  = [1884648  1893402]
    uwnd
           Size:       144x73x17x1460
           Dimensions: lon,lat,level,time
           Datatype:   single
           Attributes:
                       long_name               = '4xDaily U-wind'
                       units                   = 'm/s'
                       precision               = 2
                       least_significant_digit = 1
                       GRIB_id                 = 33
                       GRIB_name               = 'UGRD'
                       var_desc                = 'u-wind'
                       level_desc              = 'Multiple levels'
                       statistic               = 'Individual Obs'
                       parent_stat             = 'Other'
                       missing_value           = -9.969209968386869e+36
                       valid_range             = [-125  160]
                       dataset                 = 'NCEP Reanalysis'
                       actual_range            = [-93.9         133.9]

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

新浪微博达人勋

 成长值: 32430
发表于 2018-5-30 20:12:44 | 显示全部楼层
看你想画什么样的了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-5-30 21:29:57 | 显示全部楼层

跪求进一步指点
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-5-30 21:30:01 | 显示全部楼层

跪求进一步指点
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 成长值: 32430
发表于 2018-5-30 21:39:01 | 显示全部楼层
麻烦楼主说的明白一点
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-5-31 08:36:51 | 显示全部楼层
楼主可以先去翻翻 《提问的智慧》
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-5-31 08:40:42 | 显示全部楼层
谢谢楼主免费分享 刚好下载了nc文件夹 我去看看  试一试
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-5-31 08:58:12 | 显示全部楼层
uwnd是四维的没毛病啊,对应lon 、lat、level、time嘛
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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