登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 刘哲 于 2014-8-14 15:43 编辑
数据描述: float UGRD_P0_L100_GLL0 ( lv_ISBL0, lat_0, lon_0 ) center : US National Weather Service - NCEP (WMC) production_status : Operational products long_name : U-component of wind units : m s-1 _FillValue : 1e+20 grid_type : Latitude/longitude parameter_discipline_and_category : Meteorological products, Momentum parameter_template_discipline_category_number : ( 0, 0, 2, 2 ) level_type : Isobaric surface (Pa) forecast_time : 0 forecast_time_units : hours initial_time : 04/11/2011 (00:00) // 一共有四个这样的文件,只是不同时段 代码1: load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin ;read the data diri = "/home/liuzhe/fnl_data/" fils = systemfunc("ls "+diri + "fnl_20110411*.grib2") f = addfiles(fils,"r") ListSetType(f ,"join") u = f[:]->UGRD_P0_L100_GLL0 u!2 = "lat" u&lat = f[0]->UGRD_P0_L100_GLL0&lat_0 print(u&lat) end
输出结果1(黑底白字)
代码2 :
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin ;read the data diri = "/home/liuzhe/fnl_data/" fils = systemfunc("ls "+diri + "fnl_20110411*.grib2") f = addfiles(fils,"r") ListSetType(f ,"join") u = f[:]->UGRD_P0_L100_GLL0 print(u(0,0,:,0)) end
输出结果图片2 白底白字
问题: 为什么我都是输出u的第三维的数值,却结果不一样,我的理解是,第1组代码只是把数组的下标换成了-90到90, 第二组代码指的是0-180 所对应的数值,,还有一个 u&lat = f[0]->UGRD_P0_L100_GLL0&lat_0 ,这里的f[0]是什么意思,f本来是一个四维坐标,为什么只出现了f[0],其他三维呢?请大家帮解答一下我的疑惑
|