Re: PDF calculation for a grid node

From: Ioannis Koletsis <koletsis_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 17 2013 - 03:02:55 MDT

Dear Dennis,
I have already tried this, with the following error message

" fatal:Number of dimensions in parameter (1) of (pdfx) is (3), (1)
dimensions were expected
fatal:Execute: Error occurred at or near line 103 in file script1.ncl"

Have you got any idea what's going on?

Thanks in advance

Ioannis

-----Original Message-----
From: ncl-talk-bounces@ucar.edu [mailto:ncl-talk-bounces@ucar.edu] On Behalf
Of Dennis Shea
Sent: Wednesday, July 17, 2013 7:44 AM
To: Ioannis Koletsis
Cc: ncl-talk@ucar.edu
Subject: Re: PDF calculation for a grid node

http://www.ncl.ucar.edu/Document/Functions/Contributed/pdfx.shtml

If:
     ws(time,lev,lat,lon)

Then, at each grid point and level, the 'pdfx' over all times is:

  do kl=0,klvl-1
   do nl = 0, nlat-1
    do ml = 0, mlon-1

       nbins = ...
       pdf_gridpt = pdfx( ws(:,kl,nl,ml),nbins,opt )
       printVarSummary(pdf_gridpt)

; do whatever

       delete(pdf_gridpt)

     end do
    end do
   end do

===
For all levels and times

   do nl = 0, nlat-1
    do ml = 0, mlon-1

       nbins = ...
       pdf_gridpt = pdfx( ws(:,:,nl,ml),nbins,opt )
       printVarSummary(pdf_gridpt)

; do whatever

       delete(pdf_gridpt)

     end do
    end do

On 7/16/13 6:36 AM, Ioannis Koletsis wrote:
> 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 open 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
> http://ensemblesrt3.dmi.dk/data/A2/C4I/DM/C4IRCA3_A2_ECHAM5_DM_25km_19
> 61-197
> 0_wss.nc.gz
> http://ensemblesrt3.dmi.dk/data/A2/C4I/DM/C4IRCA3_A2_ECHAM5_DM_25km_19
> 71-198
> 0_wss.nc.gz
> http://ensemblesrt3.dmi.dk/data/A2/C4I/DM/C4IRCA3_A2_ECHAM5_DM_25km_19
> 81-199
> 0_wss.nc.gz
> for free download.
>
> If anyone has any idea, please share it with me....
>
> Any help would be appreciated....
>
>
>
>
> -----Original Message-----
> From: Mary Haley [mailto:haley@ucar.edu]
> Sent: Tuesday, July 16, 2013 1:01 AM
> To: Ioannis Koletsis
> Subject: Re: PDF calculation for a grid node
>
> Ioannis,
>
> 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)
> begin
> return(onedtond(ndtooned(x),dims))
> end
>
> 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.
>
> Thanks,
>
> --Mary
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.2904 / Virus Database: 3204/6492 - Release Date:
> 07/15/13
>
>
>
> _______________________________________________
> 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
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 3204/6497 - Release Date: 07/16/13

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Wed Jul 17 03:03:31 2013

This archive was generated by hypermail 2.1.8 : Fri Jul 19 2013 - 15:39:06 MDT