Re: PDF calculation for a grid node

From: Ioannis Koletsis <koletsis_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 16 2013 - 06:36:16 MDT

Dear Mary and ncl-users,

The point is to calculate the pdf for each grid point, in order to estimate
the wind power potential for an area....
When I run the script for one grid point (attached script1.ncl) the pdf
calculation (as well as windpop calculation) was successfully done....
The pdf calculation is depends on the bins number as well as on the maximum
value of the wind speed distribution...
For this reason, the bins number isn't constant for each grid point and may
be varied because of the different wind speed distribution...
It should be marked also, that the pdfx function seems to be 1-d...

I have already done the following steps, without success:
1. Changing the ws variable dimensions (line 72 of script1.ncl), from one
grid point to the desired grid node (line 71 of script1.ncl), the
calculation has been completed and returned only one value instead of
nlat*nlon values....

2. The script mary2_mods.ncl, which has been modified by Mary using reshape
statement, didn't work and an error message has been appeared
" warning:Argument 0 of the current function or procedure was coerced to the
appropriate type and thus will not change if the function or procedure
modifies its value
fatal:(-2147483647) has no file extension, can't determine type of file to
fatal:No valid instance of variable time found in file list
fatal:Execute: Error occurred at or near line 26 in file mary2_mods.ncl"

3. I believed that at the first script a do loop might be the solution, but
it didn't work.....

4. The creation of a new variable wspdf with 4 dimensions including nbins
number as the 4th dimension, it didn't work as the number of the bins isn't
constant for each grid point....

The source files are available at
for free download.
If anyone has any idea, please share it with me....

Any help would be appreciated....


-----Original Message-----
From: Mary Haley []
Sent: Tuesday, July 16, 2013 1:01 AM
To: Ioannis Koletsis
Subject: Re: PDF calculation for a grid node


I don't fully understand your script, but I got the reshape part to work.

The reshape function is nothing more than this:

function reshape(x,dims)

I'm not sure exactly what you are trying to bin, but see the attached script
and see if this is what you want.

Please, if you have further questions on this, post them back to ncl-talk,
as I'm not always available.



No virus found in this message.
Checked by AVG -
Version: 2013.0.2904 / Virus Database: 3204/6492 - Release Date: 07/15/13

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

Received on Tue Jul 16 06:36:30 2013

This archive was generated by hypermail 2.1.8 : Tue Jul 16 2013 - 13:21:17 MDT