Re: about changing vertical layers of a file

From: Rashed Mahmood <rashidcomsis_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 27 2011 - 02:06:38 MST

Hi Dennis

Thank you so much..Your idea helped me in figouring out that problem.

Regards
Rashed

On Wed, Dec 21, 2011 at 12:56 AM, Dennis Shea <shea@ucar.edu> wrote:

> You can try:
>
>
> a = addfile("/home/lshl/raf/aeroso**l.climatology.nc<http://aerosol.climatology.nc/>
> ","w")
> arr = a->black_carbon ; (:,:,:,:)
>
> ii = (/6,5,4,1,2,3/)
> nii = dimsizes(ii)
>
> ;Don't know how to put the above replaced layers in origional file for
> variable black_carbon???
>
> k = 0
> do i=0,nii-1
> k = k+1
> a->black_carbon(:,k,:,:) = (/ arr(:,ii(i),:,:) /)
> print("k="+k+" ii(i)="+ii(i))
> end do
>
> =============
>
>
> On 12/20/11 3:31 AM, Rashed Mahmood wrote:
>
>> Hi all
>> I have a bit strange question. I want to shuffle the vertical layers of
>> a variable as I wrote in the program attached herewith.
>> However, I not getting how to put the replaced layers back to orgional
>> the variable. BTW; several months ago Adam Philips on this forum helped
>> me to do similar things but for spatial domains.
>> Can anyone have a look on my simple program and help me in this regard.
>> (Also attached ncdump for the concerned variable)
>> Thanks alot!
>> regards
>> Rashed
>> /Institute of Atmospheric Physics (IAP)/
>> /Chinese Academy of Sciences (CAS)/
>> /Beijing, China./
>>
>>
>>
>> ______________________________**_________________
>> 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>
>>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Dec 27 02:06:55 2011

This archive was generated by hypermail 2.1.8 : Wed Jan 04 2012 - 10:18:09 MST