[Thread Prev][Thread Next][Index]

Re: [ferret_users] reverse a 3-D variable vertically



Hi Changshui

I have a 3-D  variable in netcdf file such temp[:,:,KB], Kb=51, I  want  reverse temp[:,:,KB] vertically, such as
temp_new[:,:,1]=temp[:,:,51]
temp_new[:,:,2]=temp[:,:,50]
temp_new[:,:,3]=temp[:,:,49]
.....
temp_new[:,:,50]=temp[:,:,2]
temp_new[:,:,51]=temp[:,:,1]

You would get a better help if you describe what results you currently get and what's wrong with them. In other words, what do you ultimately want to accomplish?  For example, if your plot is upside down, there may be better ways to flip the vertical axis than flipping the array.  Your "temp" variable may have a wrong (or suboptimal) vertical axis in the first place.

Ryo

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement