Re: Printing Times Series for several grid points from wrf output files

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed May 16 2012 - 19:52:34 MDT

There are numerous approaches. The most basic is an asciifile
with one grd point time series. I am sure permutations of the following
script are possible.

   jlat = (/50, 73/) ; indices of desired grid points
   ilon = (/25, 62/)
   npts = dimsizes(jlat)

   diri = "./"
   fname= "wrfout_d01_000000"
   diro = "./"

   f = addfile(diri+fname+".nc","r")

   Times= tostring(f->Times)
   ntim = dimsizes(Times)
   print(Times)

   rainc= f->RAINC

; one grid point per ascii file

   sdata= new(ntim, "string")
   do np=0,npts-1
      sdata = Times+" "+sprintf("%9.2f",rainc(:,jlat(np),ilon(np)) )
      ftxt = fname+"."+sprinti("%0.3i", jlat(np))+"_"+sprinti("%0.3i",
ilon(np))+".txt"
      system("/bin/rm -f "+diro+ftxt)
      asciiwrite(diro+ftxt, sdata)
   end do

On 5/16/12 3:37 AM, Jan Harlass wrote:
> Dear Elena,
>
> maybe the tool "read_wrf_nc" will help you. See chapter 10 in the ARW
> User`s Guide (V3). There is an option for time series:
>
> ./read_wrf_nc wrf_data_file_name [-options]
>
> -ts Generate time series output. A full vertical profile for each
> variable will be created.
> -ts xy X Y VAR VAR ... will generate time series output for all VAR’s at
> location X/Y
> -ts ll lat lon VAR VAR ... will generate time series output for all
> VAR’s at x/y location nearest to lat/lon
>
> Regards,
>
> Jan
>
> Am 16.05.2012 06:13, schrieb jagan TNAU:
>> Dear Elena,
>>
>> No direct way available for writing time series files from wrfout to
>> ascii format with grids as column. For our operational forecast
>> (can.tnau.ac.in <http://can.tnau.ac.in>) first we post process it
>> using ARWpost to grads binary, use grads script to pick the variable
>> you require and convert grads binary into ascii files using fortran
>> script. Then we use grads as well as NCL scripts to display the
>> variables for our requirements. All these can be automated using shall
>> scripts.
>>
>>
>>
>> On Tue, May 15, 2012 at 8:19 PM, Dennis Shea <shea@ucar.edu
>> <mailto:shea@ucar.edu>> wrote:
>>
>> The NCO may do what you want.
>>
>> If not, lease resend to ncl-talk more details.
>> Are the point scattered (if so, how many); are they a block of points;
>>
>>
>> On 5/15/12 4:59 AM, Andrea N. Hahmann wrote:
>> > Dear Elena
>> >
>> > Have you consider using NCO? If you need only a grid point
>> value, ncks
>> > would probably be the best choice for you. More info is
>> available at:
>> > http://nco.sourceforge.net/nco.html#ncks-netCDF-Kitchen-Sink
>> >
>> > Regards,
>> > Andrea
>> > ----
>> > Andrea N. Hahmann
>> > Senior Scientist
>> > DTU Wind Energy
>> >
>> > *Technical University of Denmark
>> > *Risø Campus
>> > Frederikborgvej 399, P.O. Box 49
>> > 4000 Roskilde, Denmark
>> >
>> > Direct +45 4677 5471
>> > Mobil: +45 2133 0550
>> > ahah@dtu.dk <mailto:ahah@dtu.dk>
>> > http://www.vindenergi.dtu.dk/
>> >
>> >
>> > From: Elena Maria Pison San Pedro <emp@dhi.com.sg
>> <mailto:emp@dhi.com.sg> <mailto:emp@dhi.com.sg
>> <mailto:emp@dhi.com.sg>>>
>> > To: "ncl-talk@ucar.edu <mailto:ncl-talk@ucar.edu>
>> <mailto:ncl-talk@ucar.edu <mailto:ncl-talk@ucar.edu>>"
>> <ncl-talk@ucar.edu <mailto:ncl-talk@ucar.edu>
>> > <mailto:ncl-talk@ucar.edu <mailto:ncl-talk@ucar.edu>>>
>> > Subject: Printing Times Series for several grid
>> points from
>> > wrf output files
>> >
>> > Hello,
>> >
>> > I’m trying to print ascii files containing the time series of
>> RAINC but
>> > for quite a lot of grid points.
>> >
>> > Is it possible to extract from wrf-output files several ascii files
>> > enumerated by the latitude longitude “name” of the grid?
>> >
>> > Could anyone suggest me which functions should I use?
>> >
>> > Thanks a lot in advance?
>> >
>> > Elena
>> >
>> >
>> >
>> > _______________________________________________
>> > ncl-talk mailing list
>> > List instructions, subscriber options, unsubscribe:
>> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>>
>> --
>> With regards
>>
>> Dr.R.Jagannathan
>> Professor of Agronomy,
>> Department of Agronomy
>> Tamil Nadu Agricultural University,
>> Coimbatore - 641 003 India
>>
>> PHONE: Mob: +91 94438 89891
>>
>> DO NOT PRINT THIS E-MAIL UNLESS NECESSARY. THE ENVIRONMENT CONCERNS US
>> ALL.
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> -----------------------------------------------------------
> Jan Harlaß
> FB1, FE Maritime Meteorologie, PhD-Student
> Helmholtz-Zentrum für Ozeanforschung Kiel (GEOMAR)
> Düsternbrooker Weg 20
> Alte Botanik Raum 61
> 24105 Kiel, Germany
> ------------------------------------------------------------
> Tel. +49-431-600-4034
> Fax +49-431-600-4052
> jharlass@geomar.de
> www.geomar.de/~jharlass
> -------------------------------------------------------------
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed May 16 19:52:50 2012

This archive was generated by hypermail 2.1.8 : Thu May 17 2012 - 13:42:02 MDT