[ncl-talk] Extracting Time Series From WRF Output

zilore mumba zmumba at yahoo.com
Thu Apr 23 16:30:17 MDT 2020


Hello once again.I am hoping someone may have a script which they can share,or correct my code below where I am attempting to extract a time series. From the assistance I got a few days ago, I am able to write values at a given location at the surface T2) and a a fixed level (V). Though I am getting several warnings, firstly 
Dimension (west_east) and (south_north) of file (wrfout_d01_2020-02-03_00:00:00) does not have an associated coordinate variableand 
warning:Invalid stride: stride must be positive non-zero integer

But my problem is that I am not able to select the forecast time of the series, i.e e.g. daily time series of the forecast at 0600UTC. Currently I am printing 484 values from 12 files each with forecast range of 120H (5 days). I am not able to tell which value corresponds to what forecast range and why they are 484.Is there a way to select for x and y (in the code below) the specific time step for the time series?
Help will be appreciated
begin  files = systemfunc("ls -1 data/wrfout_d01_2020*") + ".nc"  a = addfiles(files,"r")
  ListSetType (a, "cat")          ; concatenate (=default)
  varnames = getfilevarnames(a[0]) ; get var names from the first file  print(varnames)
  x = a[:]->T2(:,{-18},{30})  y = a[:]->V(:,{2},{-18},{30})
  asciiwrite("Lusaka.txt", x)  asciiwrite("Lusaka2.txt", y)
end


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200423/4a249fd4/attachment.html>


More information about the ncl-talk mailing list