[ncl-talk] Running example scripts for beginners

zilore mumba zmumba at yahoo.com
Fri Aug 1 16:05:37 MDT 2014


My sincere apologies for posting very basic issues. I have been trying to make headway in learning ncl with very little progress. All the examples I try do not seem to work. Examples,
  
          
wrfout_d01_2014-07-29_00^%00^%00.nc
zilore mumba shared from Dropbox  
View on www.dropbox.com Preview by Yahoo  
  

1. I have tried the two examples on "wrf_map_overlay" examples found at wrf_map_overlays both don't work for me, only modification being the filename (which works in grads)
2.  I have tried the "Getting_started example 5"found at Getting started using NCL - example 5 - contour plots over maps, it does not work for me.
3. I have tried *overlay_*" examples found at https://www.ncl.ucar.edu/Applications/Scripts/overlay_1.ncl, they do not work for me.
I would appreciate if someone can make overlay_1.ncl (below) work for me. Modifications are a) my filename and longitude and latitude of my domain. The wrf output file is attached if allowed since it is too large (through dropbox). I moved to Windows which does not allow : in file names.
The error I get is: 
fatal:Dimension (bottom_top) of file (wrfout_d01_2014-07-29_00:00:00) does not have an associated coordinate variable
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 16 in file overlay_1.ncl

;*************************************************
; overlay_1.ncl
;
; Concepts illustrated:
;   - Overlaying line contours on filled contours
;   - Explicitly setting contour levels
;   - Selecting a different color map
;
;*************************************************

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

begin
  a = addfile("wrfout_d01_2014-07-29_00:00:00.nc","r")
  temp = a->T(0,{500},:,:)
  uwnd = a->U(0,{500},:,:)

  wks = gsn_open_wks("ps","overlay")
  gsn_define_colormap(wks,"BlueDarkRed18")    ; use the BlueDarkRed18 colormap

  res = True
  res at mpFillOn = False
  res at mpMaxLatF =  -4.07                      ; specify the plot domain
  res at mpMinLatF = -21.9                       ;
  res at mpMinLonF =  17.25                      ;
  res at mpMaxLonF =  38.44                      ;
  sres at gsnFrame = False                       ; do not advance the frame
  sres at cnLevelSelectionMode = "ExplicitLevels" ; use explicit levels
  sres at cnLevels = ispan(-5,35,5)              ; set the contour levels

  plot = gsn_csm_contour_map(wks,temp,res)    ; create the temperature plot
  plot_ov = gsn_csm_contour(wks,uwnd,sres)    ; create the U-wind plot
  overlay(plot,plot_ov)                       ; overlay the U-wind plot on the temperature plot
  draw(plot)                                  ; draw the temperature plot (with the U-wind plot overlaid)
  frame(wks)                                  ; advance the frame
end

  res at mpOutlineOn = True                            ; turn the map outline on
  res at gsnDraw      =  False                   ; do not draw the plot
 

  
             
Getting started using NCL - example 5 - contour plots ov...
NCL Home >
Documentation >
Manuals >
Getting Started GSUN > Examples > 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11   
View on www.ncl.ucar.edu Preview by Yahoo  
  
 
  
          
wrf_map_overlays
NCL WRFUserARW.ncl functions (graphics routines)  
View on www.ncl.ucar.edu Preview by Yahoo  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140801/0d58b248/attachment.html 


More information about the ncl-talk mailing list