[Thread Prev][Thread Next][Index]
Re: Re: [ferret_users] changing dimension
- To: furue@xxxxxxxxxx
- Subject: Re: Re: [ferret_users] changing dimension
- From: siva <sivamtech07@xxxxxxxxxxxxxx>
- Date: Mon, 08 Jun 2009 07:51:38 +0000
- Cc: ferret_users@xxxxxxxx
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=redf; d=rediffmail.com; b=Z78Gs4ZvwgvqRavcSTcss5WGc1td62hfuQUpbd9CE1pG3DwzF0mLS+TyFH3srZ358DK8IlPATr/7M5WCchL9rYCbdgCPnGsS+rVzjJ6ENLQZeWM4Otj6vNSXXL0cHEJae7WyfyBliDhnhJOX6xvm1lUO3/7McMnBZGMlkKf8p6E= ;
- Sender: owner-ferret_users@xxxxxxxx
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