plot the difference

From: jam hong <cumarporn_at_nyahnyahspammersnyahnyah>
Date: Fri, 15 May 2009 00:00:32 +0000

Dear Dr. Shea

 

I would like to plot the difference of two WRF output.

I read the values from each file and put in each variable name but I have problem that I could not plot it on the function contour.

I wonder what command I should use.

This is my program,

thanks

Jam

 

 

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
;load "./WRFUserARW.ncl"

begin
;
; The WRF ARW input file.
; This needs to have a ".nc" appended, so just do it.
  a = addfile("wrfout_d01_2002-06-09_12:00:00.nc","r")
  a1 = addfile("/usr/rmt_share/scratch79/jam/WRF/output/IHOP_2002/gem/wrfout_d01_2002-06-09_12:00:00.nc","r")

; We generate plots, but what kind do we prefer?
; type = "x11"
; type = "pdf"
  type = "ps"
; type = "ncgm"
  wks = gsn_open_wks(type,"IHOP-D01-JUN16-2002-12Z_noah-gem")
  setvalues NhlGetWorkspaceObjectId()
    "wsMaximumSize" : 33554432
  end setvalues

; Set some Basic Plot options
  res = True
  res_at_MainTitle = "REAL-TIME WRF"

  pltres = True
  mpres = True
  map = wrf_map(wks,a,mpres)
  map = wrf_map(wks,a1,mpres)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; What times and how many time steps are in the data set?
  times = wrf_user_list_times(a) ; get times in the file
  ntimes = dimsizes(times) ; number of times in the file

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    res_at_TimeLabel = times(0) ; Set Valid time to use on plots

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

      gsn_define_colormap(wks,"WhBlGrYeRe") ; choose a colormap
      opts = res
      opts_at_cnFillOn = True
      opts_at_ContourParameters = (/ 0., 50., 5 /)
      opts_at_lbBoxLinesOn = False
      res_at_cnLabelBarEndStyle = "IncludeMinMaxLabels" ; turn on end labels

  do it = 0, ntimes-1
    ; TERRAIN
      ter = wrf_user_getvar(a,"RAINNC",it)
      ;print(ter)
      ter1 = wrf_user_getvar(a1,"RAINNC",it)
      ;print(ter1)
      ter2 = ter1 - ter
      contour = wrf_contour(a1,wks,ter2,opts) error line
     wrf_map_overlay(wks, map,(/contour/),True)
   ; plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
   end do
 

_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 14 2009 - 18:00:32 MDT

This archive was generated by hypermail 2.2.0 : Tue May 19 2009 - 09:17:29 MDT