Re: (no subject)

From: gibies george <gibiesgeorge_at_nyahnyahspammersnyahnyah>
Date: Sun Jul 22 2012 - 06:43:58 MDT

On 22 July 2012 18:03, Dennis Shea <shea@ucar.edu> wrote:

> Assuming line 84 is:
>
> alpha(:,:,:,:) = (RGAS*t(:,:,:,:))/t&level
>
> Use conform to 'broadcast' the one-dimensional
> t&level to all dimensions of t t(0,1,2,3)
> http://www.ncl.ucar.edu/**Document/Functions/Built-in/**
> conform.shtml<http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml>
>
> alpha(:,:,:,:) = (RGAS*t(:,:,:,:))/conform(t,t&**level,1)
>
> or, better
>
> aplha = (RGAS*t)/conform(t,t&level,1)
>
> The latter is more efficient.
>
>
> On 7/22/12 3:02 AM, gibies george wrote:
>
>> Dear friends,
>>
>> I tried to convert omega to w using the following part of script.
>>
>>
>> RGAS = 287. ; J/(kg-K) => m2/(s2 K)
>> GRAV = 9.8 ; m/s2
>> alpha(:,:,:,:) = (RGAS*t(:,:,:,:))/t&level ;;;;; alpha=1/rho unit =
>> m3kg-1
>>
>> w = -omega*alpha/(GRAV)
>>
>> But as expected it shows error as
>>
>> fatal:Div: Number of dimensions do not match, can't continue
>> fatal:Execute: Error occurred at or near line 84 in file /work/wind.ncl
>>
>> Can anybody suggest an efficient way to solve this problem ?
>>
>> The above script I tried, modified as

_______________________________________
   RGAS = 287. ; J/(kg-K) => m2/(s2 K)
   GRAV = 9.8 ; m/s2
    alpha=new((/dimsizes(t&time),
dimsizes(t&level),dimsizes(t&lat),dimsizes(t&lon)/),typeof(t),t@_FillValue)
do i=0,dimsizes(t&time)-1
do j=0,dimsizes(t&lat)-1
do k=0,dimsizes(t&lon)-1
   alpha(i,:,j,k) = (RGAS*t(i,:,j,k)*0.01)/t&level ; density => kg/m3
end do
end do
end do
   w = -omega*alpha/(GRAV)
_______________________________________

But it is too lengthy and now the way which Dennis Shea suggested is the
efficient one.

Thank you very much Dennis

Regard

Gibies George

>
>> --
>> *Gibies George,
>> CSIR-Senior Research Fellow,*
>> *Monsoon Group,
>>
>> Climate and Global Modelling Division,
>> Indian Institute of Tropical Meteorology,
>> Dr. Homi Bhabha Road,
>> NCL (P. O.), Pashan,
>> Pune 411008, India.
>> Tel. Off. +912025904306*
>> *Mobile : +919028523910
>> +919881707796
>> *
>>
>> *http://sites.google.com/site/**gibiesge/*<http://sites.google.com/site/gibiesge/*>
>>
>>
>>
>>
>>
>>
>>
>>
>> ______________________________**_________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/**mailman/listinfo/ncl-talk<http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>>
>>
>

-- 
*
*
*
Gibies George,   CSIR-SRF,
**Climate and Global Modelling Division,
Indian Institute of Tropical Meteorology,
Dr. Homi Bhabha Road,
NCL (P. O.), Pashan,
Pune 411008, India.
Office mail : gibies@tropmet.res.in
Mobile: **+919028523910
              +**919881707796
*
*http://sites.google.com/site/gibiesge/*
*  <https://plus.google.com/#111012332112911486199/posts>*
*
*

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jul 22 06:44:13 2012

This archive was generated by hypermail 2.1.8 : Tue Jul 24 2012 - 09:48:26 MDT