Re: Fwd: .fatal:relhum: The input arrays must have the same dimension sizes

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Jun 28 2012 - 14:01:41 MDT

Since the levels are the same for the lower atmosphere,
no interpolation is needed.

----
%> ncdump -v lev anl_p.tmp.2010.jma.nc
[snip]
lev = 0, 1, 2, 3, 5, 7, 10, 20, 30, 50, 70, 100, 150, 200,
       250, 300, 400, 500, 600, 700, 850, 925, 1000 ;
----
%> ncdump -v lev anl_p.spf.2010.jma.nc
[snip]
  lev = 100, 150, 200, 250, 300, 400, 500, 600, 700, 850, 925, 1000
-----
    fq  = addfile("anl_p.spf.2010.jma.nc
    spf = f1->spf
    ft  = addfile("anl_p.tmp.2010.jma.nc", "r")
    tmp = f->tmp(:,{100:1000},:,:)   ; coordinate indexing
    printVarSummary(spf)
    printVarSummary(tmp
On 06/28/2012 06:41 AM, wei wrote:
> Dear Mary,
> Thanks a lot, I really appreciate it. It is working properly and the
> summary is given below.
> best regards,
>
>
> Variable: t_new
> Type: float
> Total Size: 48107520 bytes
>              12026880 values
> Number of Dimensions: 4
> Dimensions and sizes:    [time | 24] x [lev | 12] x [lat | 145] x [lon |
> 288]
> Coordinates:
>              time: [0.5..143.5]
>              lev: [100..1000]
>              lat: [90..-90]
>              lon: [ 0..358.75]
> Number Of Attributes: 1
>    _FillValue :    1e+20
>
> Variable: rh
> Type: float
> Total Size: 48107520 bytes
>              12026880 values
> Number of Dimensions: 4
> Dimensions and sizes:    [time | 24] x [lev | 12] x [lat | 145] x [lon |
> 288]
> Coordinates:
>              time: [0.5..143.5]
>              lev: [100..1000]
>              lat: [90..-90]
>              lon: [ 0..358.75]
> Number Of Attributes: 1
>    _FillValue :    1e+20
> ******************************************************
> On Wed, Jun 27, 2012 at 9:31 PM, Mary Haley <haley@ucar.edu
> <mailto:haley@ucar.edu>> wrote:
>
>     Wei,
>
>     You need to use int2p_n to interpolate your "w" values to be on the
>     same level as your original "t" array (the one dimensioned  [time |
>     24] x [lev | 23] x [lat | 145] x [lon | 288]).
>
>     I imagine it would look something like this:
>         linlog = -1                                   ; the "-1" allows
>     for extrapolation of levels outside the range of t&lev.
>         t_new  = int2p_n(t&lev, t, w&lev, linlog, 1)
>
>     At this point, I believe t_new should be the same size as "w",
>     because the level dimension of "t" will have been replaced with the
>     level dimension of "w".
>
>     You can then use t_new in the relhum call.
>
>     --Mary
>
>
>
>
>
> _______________________________________________
> 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 Thu Jun 28 14:01:51 2012

This archive was generated by hypermail 2.1.8 : Fri Jun 29 2012 - 15:46:14 MDT