read grib file problem!

From: 小代 <daikan1998_at_nyahnyahspammersnyahnyah>
Date: Tue, 18 Mar 2008 15:32:29 +0800 (CST)

dear guys:

    I use ncl to plot 500hPa geopotential height with NCEP analysis grib data. Some grib file (like the 2008year-01month-25day-06hour file, which can be download from http://dss.ucar.edu/datasets/ds083.2/) produce problems (see the attachment file).The code is following.

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

begin

  f = addfile("fnl_080125_06_00.grb", "r")
  
  barLevel = 500
  hgt = f->HGT_3_ISBL_10({barLevel}, :, :)
  
  ; create plot
    wks = gsn_open_wks("ps" ,"ce") ; open a ps file
 ; gsn_define_colormap(wks,"BlAqGrYeOrRe") ; choose colormap
  
    res = True ; plot mods desired
  
    res_at_cnFillOn = False ; turn on color fill
    res_at_cnLinesOn = True ; turn of contour lines
    res_at_gsnSpreadColors = True ; use full range of color map
    res_at_lbLabelStride = 4
  
    res_at_pmTickMarkDisplayMode = "Always"; use NCL default lat/lon labels
  
    res_at_gsnAddCyclic = True ; data already has cyclic point
  
      res_at_mpMinLatF = 5 ; range to zoom in on
      res_at_mpMaxLatF = 80.
      res_at_mpMinLonF = 50.
      res_at_mpMaxLonF = 140.
    
    plot = gsn_csm_contour_map_ce(wks, hgt, res)

end
 

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Tue Mar 18 2008 - 01:32:29 MDT

This archive was generated by hypermail 2.2.0 : Sun Mar 23 2008 - 15:01:36 MDT