[ncl-talk] Extracting all values of rh2 from WRF file and writing it to csv file

Muhammad Omer Mughal m.mughal1 at graduate.curtin.edu.au
Wed Jan 2 19:42:45 MST 2019


Dear Rick

Thanks for the reply. I changed the script to remove the SEGV error but now I am getting the following error messages


Please see the script below

a=addfile("wrfout_d03_2017-02-01_00:00:00.nc","r")

rh2 = wrf_user_getvar(a,"rh2",-1)

lat=wrf_user_getvar(a,"XLAT",-1)
lon=wrf_user_getvar(a,"XLONG",-1)


  allRH = rh2(:, lon, lat)

  asciiwrite("rh2.csv",allRH)

fatal:Illegal subscript. Subscripts must be scalar or one dimensional vectors





Muhammad Omer Mughal
MSc BSc Mechanical Engineering
PhD  Research Scholar
Remote Sensing and Satellite Research Group
Department of Imaging and Applied Physics
Curtin University

Curtin University
Tel | +61 8 9266 7962
Fax | +61 8 9266 2377
Mobile | 0470 237 525

Email | m.mughal1 at postgrad.curtin.edu.au<mailto:m.lynch at curtin.edu.au>
Web | http://curtin.edu.au<http://curtin.edu.au/>

Curtin University is a trademark of Curtin University of Technology.
CRICOS Provider Code 00301J (WA), 02637B (NSW)


________________________________
From: Rick Brownrigg <brownrig at ucar.edu>
Sent: Wednesday, 2 January 2019 10:18:33 PM
To: Muhammad Omer Mughal
Cc: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] Extracting all values of rh2 from WRF file and writing it to csv file

Hi,

Can you share your script and dataset with me?  I would like to investigate why there's a SEGV.

Rick


On Wed, Jan 2, 2019 at 4:49 AM Muhammad Omer Mughal <m.mughal1 at graduate.curtin.edu.au<mailto:m.mughal1 at graduate.curtin.edu.au>> wrote:
Dear NCL team

Is there a way to extract all values from WRF output files from all grind points and write to an ascii file.
In my case grid size is 71x82 and the number of times is 673. I tried to write using a table format but I am getting a segmentation fault.

I will appreciate help. Kindly note that I have used Lambert conformal projection method.

Regards


​
Muhammad Omer Mughal
MSc BSc Mechanical Engineering
PhD  Research Scholar
Remote Sensing and Satellite Research Group
Department of Imaging and Applied Physics
Curtin University

Curtin University
Tel | +61 8 9266 7962
Fax | +61 8 9266 2377
Mobile | 0470 237 525

Email | m.mughal1 at postgrad.curtin.edu.au<mailto:m.mughal1 at postgrad.curtin.edu.au>
Web | http://curtin.edu.au

​ Curtin University is a trademark of Curtin University of Technology.
CRICOS Provider Code 00301J (WA), 02637B (NSW)

​
_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190103/c0c01e3d/attachment.html>


More information about the ncl-talk mailing list