[Thread Prev][Thread Next][Index]

Re: Re: [ferret_users] changing dimension



Hi Ryo,

Your problem can be solved very easily with RESHAPE() function in ferret.
For example you have woa_monthly.nc with 4 dimensions and if you want to save the data of the top most layer (k=1)..The following commands will solve the problem..

yes?use woa_monthly.nc
yes?let outgrid=x[gx=temperature]+y[gy=temperature]+t[gt=temperature]
yes?let temp=reshape(temperature[k=1],outgrid)
yes?save/file=sample.nc/clobber temp

In the above "temperature" is the variable inside "
woa_monthly.nc" with XYZT dimensions..we defined a new variable "temp" with just XYT dimensions and saved it to "sample.nc" file..

I hope this will solve your problem

Regards

On Sun, 07 Jun 2009 18:03:41 +0530 wrote
>Hi Sudheer,
>
>| I would like to extract a subset of the 4
>| dimensional data set to a 3 dimensional data with depth dimension
>| not present in the sub set. For example I have ocean_atlas_subset.nc
>| with all 4 dimensions defined in it, Now I want to have sst
>| extracted from it with only X Y and T dimension and sub set should
>| not have z dimension retained in it and I would like to save it as
>| another NC file. Which is the easiest way to do this in ferret? I
>| Tried the below method but when I do a show grid it has Z dimension
>| in it.
>
> set data ocean_atlas_subset.nc
> save/file=sst.nc temp[k=1:1@max]
>
>if you want to extract level k=1. I admit this is an abuse of the
>MAX transformation. . . . Note that MAX is one of the
>transformations that eliminate an axis. A simple "temp[k=1]"
>won't eliminate the z axis.
>
>Regards,
>Ryo
>

S.Siva Reddy

Senior Research Fellow

UCESS/INCOIS

University of Hyderabad

Hyderabad

Mob:9908248120

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement