爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 3809|回复: 1

用ncread读取区域范围,不知道怎么表示

[复制链接]

新浪微博达人勋

发表于 2016-5-11 23:24:24 | 显示全部楼层 |阅读模式
GrADS
系统平台: matlab
问题截图: -
问题概况: 用ncread读取区域范围怎么表示
我看过提问的智慧: 看过
自己思考时长(天): 3

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

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

x
用ncread 怎么取区域范围?
clear
clc
ncdisp('F:\nc\sst.ltm.1981-2010.nc');
lat = ncread('sst.ltm.1981-2010.nc','lat');
lon = ncread('sst.ltm.1981-2010.nc','lon');
time = ncread('sst.ltm.1981-2010.nc','time');
sstdata = ncread('sst.ltm.1981-2010.nc','sst',1 1 m],[180 40 100]); 这里是错的


sstdata = ncread('sst.ltm.1981-2010.nc','sst',1 1 m],[180 40 100]); 在这一步中,我想要读取经度100-180,纬度0-60,的区域范围
nc数据是从1981-2010的月平均数据

整个信息是这样的,数据是1×1的

Dimensions:
           time = 12
           lat  = 180
           lon  = 360
Variables:
    time
           Size:       12x1
           Dimensions: time
           Datatype:   double
           Attributes:
                       long_name    = 'Time'
                       units        = 'days since 1800-01-01 00:00:0.0'
                       avg_period   = '0000-01-00 00:00:00'
                       delta_t      = '0000-01-00 00:00:00'
                       ltm_range    = [6.61e+04 7.71e+04]
                       actual_range = [-6.57e+05 -6.57e+05]
                       axis         = 'T'
    lat
           Size:       180x1
           Dimensions: lat
           Datatype:   single
           Attributes:
                       long_name     = 'Latitude'
                       standard_name = 'latitude'
                       units         = 'degrees_north'
                       actual_range  = [-8.95e+01  8.95e+01]
                       axis          = 'Y'
    lon
           Size:       360x1
           Dimensions: lon
           Datatype:   single
           Attributes:
                       long_name     = 'Longitude'
                       standard_name = 'longitude'
                       units         = 'degrees_east'
                       actual_range  = [5.00e-01 3.60e+02]
                       axis          = 'X'
    sst
           Size:       360x180x12
           Dimensions: lon,lat,time
           Datatype:   int16
           Attributes:
                       long_name               = 'Monthly Long Term Mean of Sea Surface Temperature'
                       units                   = 'degC'
                       least_significant_digit = 1
                       precision               = 1
                       scale_factor            = 0.01
                       add_offset              = 0
                       missing_value           = 3.28e+04
                       valid_range             = [-5.00e+02  4.00e+03]
                       unpacked_valid_range    = [-5.00e+00  4.00e+01]
                       dataset                 = 'NOAA Optimum Interpolation (OI) SST V2'
                       statistic               = 'Long Term Mean'
                       parent_stat             = 'Mean'
                       level_desc              = 'Surface'
                       var_desc                = 'Sea Surface Temperature'
                       _FillValue              = 3.28e+04
                       actual_range            = [-1.80e+00  3.36e+01]


求助怎么用ncread 取范围?已经看过help,但是不是很理解,不知道怎么表示

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

新浪微博达人勋

 楼主| 发表于 2016-5-12 00:03:02 | 显示全部楼层
我想通过1981-2010的月平均数据,求年平均数据,
对应的坐标轴:x轴是年份,y轴年平均sst

编写程序是这样的
出来的结果各种错误,有哪位大大能帮我看看哪里出了问题
001.png
002.png
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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