爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
楼主: 斥鷃

[源程序] matlab2010b有关NCEP数据的个人经验与心得

  [复制链接]

新浪微博达人勋

发表于 2014-11-10 23:00:45 | 显示全部楼层
谢谢楼主分享
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-12-2 14:34:53 | 显示全部楼层
楼主 请问数据转换那步出错
错误使用 netcdflib
NetCDF 库在执行 'inqAtt' 函数期间遇到错误 - 'Attribute not found (NC_ENOTATT)'。

出错 netcdf.getAtt (line 43)
        xtype = netcdflib('inqAtt',ncid,varid,attname);
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-12-2 17:38:18 | 显示全部楼层
____汐 发表于 2014-12-2 14:34
楼主 请问数据转换那步出错
错误使用 netcdflib
NetCDF 库在执行 'inqAtt' 函数期间遇到错误 - 'Attribut ...

你是用我写的函数文件么?可能数据命名方式不大一样,你可以试试分步骤下来~
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-12-3 09:30:30 | 显示全部楼层
斥鷃 发表于 2014-12-2 17:38
你是用我写的函数文件么?可能数据命名方式不大一样,你可以试试分步骤下来~

我用的是CMIP5里面的区域气候模式资料,是按你分步的步骤。

                               
登录/注册后可看大图

                               
登录/注册后可看大图

                               
登录/注册后可看大图

                               
登录/注册后可看大图

                               
登录/注册后可看大图
QQ图片20141201092620.jpg
QQ图片20141201093216.jpg
QQ图片20141201092914.jpg
QQ图片20141201092850.jpg
QQ图片20141201092759.jpg
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-12-3 14:10:58 | 显示全部楼层
谢谢楼主,正好要学
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-12-3 17:50:57 | 显示全部楼层
____汐 发表于 2014-12-3 09:30
我用的是CMIP5里面的区域气候模式资料,是按你分步的步骤。

有可能这个数据集没有scale_factor这些属性,你inqAtt试试看,能不能得到什么有关信息~NCL似乎可以得到有关NC数据的全部属性信息,你可以了解一下~
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-12-4 09:39:09 | 显示全部楼层
斥鷃 发表于 2014-12-3 17:50
有可能这个数据集没有scale_factor这些属性,你inqAtt试试看,能不能得到什么有关信息~NCL似乎可以得到有 ...

>> ncdisp('D:\MPI.nc')
Source:
           D:\MPI.nc
Format:
           netcdf4_classic
Global Attributes:
           institution                   = 'Climate Limited-area Modelling Community (CLM-Community)'
           institute_id                  = 'CLMcom'
           experiment_id                 = 'historical'
           source                        = 'CLMcom-CCLM4-8-17'
           model_id                      = 'CLMcom-CCLM4-8-17'
           contact                       = 'cordex-cclm@dkrz.de'
           history                       = 'Processing for CORDEX archive at DKRZ (SVN revision 4244 http://svn-mad.zmaw.de/svn/mad/Model/IMDI/tags/cclm/cosmo_090213_4.8_clm17_cordex/util/running) 2014-03-13T07:59:27Z CMOR rewrote data to comply with CF standards and CORDEX requirements.'
           comment                       = 'CORDEX Africa RCM CCLM 0.44 deg AFR-44'
           references                    = 'http://www.clm-community.eu/'
           initialization_method         = 1
           physics_version               = 1
           tracking_id                   = 'dbc6a84e-ab2e-40c6-9fbf-f1f6bc36879e'
           title                         = 'CLMcom-CCLM4-8-17 model output prepared for CORDEX historical'
           CORDEX_domain                 = 'AFR-44'
           driving_experiment            = 'MPI-M-MPI-ESM-LR, historical, r1i1p1'
           driving_model_id              = 'MPI-M-MPI-ESM-LR'
           driving_model_ensemble_member = 'r1i1p1'
           driving_experiment_name       = 'historical'
           rcm_version_id                = 'v1'
           product                       = 'output'
           experiment                    = 'historical'
           frequency                     = 'mon'
           creation_date                 = '2014-03-13T07:59:27Z'
           Conventions                   = 'CF-1.4'
           project_id                    = 'CORDEX'
           table_id                      = 'Table mon (Sept 2013) 1a8d24384e63c141a57dbedfd6710546'
           modeling_realm                = 'atmos'
           realization                   = 1
           cmor_version                  = '2.9.1'
Dimensions:
           time     = 60    (UNLIMITED)
           rlat     = 201
           rlon     = 194
           bnds     = 2
           vertices = 4
Variables:
    time                     
           Size:       60x1
           Dimensions: time
           Datatype:   double
           Attributes:
                       bounds        = 'time_bnds'
                       units         = 'days since 1949-12-01T00:00:00Z'
                       calendar      = 'proleptic_gregorian'
                       axis          = 'T'
                       long_name     = 'time'
                       standard_name = 'time'
    time_bnds                 
           Size:       2x60
           Dimensions: bnds,time
           Datatype:   double
    rlat                     
           Size:       201x1
           Dimensions: rlat
           Datatype:   double
           Attributes:
                       units         = 'degrees'
                       axis          = 'Y'
                       long_name     = 'latitude in rotated pole grid'
                       standard_name = 'grid_latitude'
    rlon                     
           Size:       194x1
           Dimensions: rlon
           Datatype:   double
           Attributes:
                       units         = 'degrees'
                       axis          = 'X'
                       long_name     = 'longitude in rotated pole grid'
                       standard_name = 'grid_longitude'
    rotated_latitude_longitude
           Size:       1x1
           Dimensions:
           Datatype:   int32
           Attributes:
                       grid_mapping_name         = 'rotated_latitude_longitude'
                       grid_north_pole_latitude  = 90
                       grid_north_pole_longitude = 180
                       north_pole_grid_longitude = 0
    lat                       
           Size:       194x201
           Dimensions: rlon,rlat
           Datatype:   single
           Attributes:
                       standard_name = 'latitude'
                       long_name     = 'latitude coordinate'
                       units         = 'degrees_north'
                       bounds        = 'lat_vertices'
    lon                       
           Size:       194x201
           Dimensions: rlon,rlat
           Datatype:   single
           Attributes:
                       standard_name = 'longitude'
                       long_name     = 'longitude coordinate'
                       units         = 'degrees_east'
                       bounds        = 'lon_vertices'
    lat_vertices              
           Size:       4x194x201
           Dimensions: vertices,rlon,rlat
           Datatype:   single
           Attributes:
                       units = 'degrees_north'
    lon_vertices              
           Size:       4x194x201
           Dimensions: vertices,rlon,rlat
           Datatype:   single
           Attributes:
                       units = 'degrees_east'
    plev                     
           Size:       1x1
           Dimensions:
           Datatype:   double
           Attributes:
                       units         = 'Pa'
                       axis          = 'Z'
                       positive      = 'down'
                       long_name     = 'pressure'
                       standard_name = 'air_pressure'
    ta850                     
           Size:       194x201x60
           Dimensions: rlon,rlat,time
           Datatype:   single
           Attributes:
                       standard_name    = 'air_temperature'
                       long_name        = 'Air Temperature'
                       units            = 'K'
                       cell_methods     = 'time: mean'
                       history          = '2014-03-13T07:59:27Z altered by CMOR: Treated scalar dimension: 'plev'.'
                       coordinates      = 'plev lat lon'
                       missing_value    = 1.000000020040877e+20
                       _FillValue       = 1.000000020040877e+20
                       associated_files = 'gridspecFile: gridspec_atmos_fx_CLMcom-CCLM4-8-17_historical_r0i0p0.nc'
                       grid_mapping     = 'rotated_latitude_longitude'
  是不是这个数据集是不需要再转换的?
一般怎么样的数据集要转换呢
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-12-4 10:50:29 | 显示全部楼层
感谢楼主分享个人经验
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-12-4 21:23:12 | 显示全部楼层
亲,你会用MATLAB或者grads读hdf数据,能不能画图?快被逼疯了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-12-7 21:09:07 | 显示全部楼层
谢谢楼主分享
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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