[ncl-talk] Getting time series from several files in ncl

zilore mumba zmumba at yahoo.com
Sun Apr 19 13:54:10 MDT 2020


I am trying to get time series at given locations from several WRF output files, e.g. 48H forecast temperature at 850hPa. Each file contains a day's model run. I have used ncl for years by adapting existing scripts, without really understanding. One issue I have difficulty with is getting variables from a file, especially WRF output.I thought the script to get a time series at 15S, 30E would be as simple as the one below. I am able to print the varsummary, but printing x tells me that "a is not a valid file reference.I would appreciate ant assistance.begin
files = systemfunc("ls -1 data/wrfout_d01_2020*") + ".nc"
  a = addfiles(files,"r")

  ListSetType (a, "cat")          ; concatenate (=default)
  tc = wrf_user_getvar(a,"tc",0)
  printVarSummary (tc)

  x = a->T2(0,{850},{-15},{30})
  asciiwrite("outfile.txt",x)
end

Zilore Mumba
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200419/0d835f84/attachment.html>


More information about the ncl-talk mailing list