Extracts the list of available times in the ARW WRF model output.
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" ; These two libraries are automatically load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" ; loaded from NCL V6.4.0 onward. ; No need for user to explicitly load. function wrf_user_list_times ( file_handle : file or list [list added in V6.0.0] ) return_val [*] : string
A list of available times in the input file.
Extract the times in the input file(s).
wrf_user_list_times is part of a library of functions and procedures in WRFUserARW.ncl written to help users plot ARW WRF model data.
Questions on this function should be sent to firstname.lastname@example.org.
See the full list of WRF functions.
Get the times from a single WRF ARW file:
a = addfile("wrfout_d01_2000-01-24_12:00:00.nc","r") times = wrf_user_list_times(a) ; get times in the file ntimes = dimsizes(times) ; number of times in the file print("There are " +ntimes+ " times in this file") print( times )
As of NCL V6.0.0, you can get the times from a list of WRF ARW NetCDF files:
files = systemfunc("ls -1 wrfout_d01_2000*") + ".nc" a = addfiles(files,"r") times = wrf_user_list_times(a) ; get times in the file ntimes = dimsizes(times) ; number of times in the file(s) print("There are " +ntimes+ " times in this file") print( times )You can see some other example scripts and their resultant images at: