wrf_user_getvar - select time period

From: Richard Hewston <r.hewston_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 01 2009 - 11:35:07 MST

Hi,
I'm using ncl 5.0, and have a relatively simple question (i think) which
I can't seem to find an answer to anywhere.

In the simple script:

;---------------------------------------------
; derive a mslp field from the wrfout file, and writes it out to netcdf file
;---------------------------------------------

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/wrf/WRF_contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
;---------------------------------------------
;open file and read in data
;---------------------------------------------

 z = addfile ("wrfout_d01_2000-01-01_00:00:00.nc", "r")
slp = wrf_user_getvar(z,"slp",-1) ; slp (-1 indicates for all times)

;---------------------------------------------
;create reference to output file
;---------------------------------------------
fout = addfile("MSLP_530.nc" , "c")
;---------------------------------------------
;Output variable slp to netCDF file
;-----------------------------------------------
fout->MSLP= slp
end

I'm trying to select a subset of the temp.nc file, based on time. How
can i select eg. timesteps 0-10?
I can select timestep 0 by using
slp = wrf_user_getvar(z,"slp",0)

or timestep 5 with:
slp = wrf_user_getvar(z,"slp",5)

etc etc

But I cannot figure out how to make to use a selection of 0 to 10??

Any help greatly appreciated.

Thanks,
Rich
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Dec 1 11:35:11 2009

This archive was generated by hypermail 2.1.8 : Thu Dec 03 2009 - 09:53:22 MST