[Thread Prev][Thread Next][Index]

Re: [ferret_users] mixing axis


The proposed solution works fine pour X and Y axis, but the time axis still is the K/Z variable
Herafter is the new netcdf file:

    2> ./dr.nc  (default)
 name     title                             I         J         K         L         M         N
 DR       DR2[GX=LONAXIS, GY=LATAXIS]      1:9       1:13      1:26280   ...       ...       ...
               on grid GKP1 with -1.E+34 for missing data
             X=86.7E(86.7):86.8E(86.8)  Y=27.6N:27.6N  Z=0.5:26281 

How can I switch between K/Z and L/T dimension ?


F. Delclaux

Le 16/12/2015 15:35, Patrick Brockmann a écrit :
On 16/12/2015 13:08, Delclaux Francois wrote:
Hi Ferret users,
Sorry for my last mail, but I did not change the object of the mail. So I re-post my question  with a new subject

I  have a netcdf file with a 3D variable according to the following:

1> ./DRAIN.nc  (default)
 name     title                             I         J         K         L         M         N
 DR2      Averaged_Soil_Drainage_Flux      1:9       1:13      1:26280   ...       ...       ...
             kg/m2s on grid GJI1 with 1.E+20 for missing data
             X=0.5E:9.5E  Y=0.5N:13.5N  Z=0.5:26281
 LAT                                       ...       1:13      ...       ...       ...       ...
             degrees_north on grid GJI2 with 1.E+20 for missing data
 LON                                       1:9       ...       ...       ...       ...       ...
             degrees_east on grid GJI3 with 1.E+20 for missing data
 TIME                                      ...       ...       1:26280   ...       ...       ...
             hours since 2013-01-01 00:00:00 on grid GJI4 with 1.E+20 for missing data

Now I would like to transform this file in a new one DR2   = DR2(x,y,t) where the axes LAT, LON and TIME axis are directly included in the file

What's the best way for doing that ?

Hi François,

Try these lines:

def axis/X/units="degrees_east" lonaxis=lon
def axis/Y/units="degrees_north" lataxis=lat
let dr2_georeferenced=dr2[gx=lonaxis, gy=lataxis]

then you should be able to do a:

shade dr2_georeferenced


Data Analysis and Visualization Engineer
ICMC - IPSL Climate Modelling Centre

UMR HydroSciences  Montpellier
CC 57 
Universite Montpellier
34090  Montpellier      FRANCE
mailto: delclaux@xxxxxxxxxxxxxxxxxxx
Tel : (33) (0)4 67 14 90 11      Fax : (33) (0)4 67 14 47 74

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

Privacy Policy | Disclaimer | Accessibility Statement