[Thread Prev][Thread Next][Index]

Re: [ferret_users] mixing axis



Hi,
It seems that the file does not have coordinate variables that are defined with attributes that let Ferret assign the directions correctly. You should be able to  use the /ORDER qualifier when opening the file:
yes? use/order=xyt dr.nc
yes? show data  ! does it show dimensions I, J, L?
Then you can define the correct time axis and regrid to that axis in a way similar to what Patrick described in hist earlier  email,
def axis/X/units="degrees_east" lonaxis=lon
def axis/Y/units="degrees_north" lataxis=lat
def axis/T/units="hours"/T0="01-JAN-2013:00:00:00" timeaxis=time   ! seen from a show data/full
let dr2_georeferenced=dr2[gx=lonaxis, gy=lataxis, gt=timeaxis]

Ansley

On 12/17/2015 4:24 AM, Delclaux Francois wrote:
Hi,

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 ?

Regards

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
             Y=0.5N:13.5N
 LON                                       1:9       ...       ...       ...       ...       ...
             degrees_east on grid GJI3 with 1.E+20 for missing data
             X=0.5E:9.5E
 TIME                                      ...       ...       1:26280   ...       ...       ...
             hours since 2013-01-01 00:00:00 on grid GJI4 with 1.E+20 for missing data
             Z=0.5:26281

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

Regards
Patrick

-- 
LSCE/IPSL, Laboratoire CEA-CNRS-UVSQ
Data Analysis and Visualization Engineer
ICMC - IPSL Climate Modelling Centre
--


-- 
Francois DELCLAUX
------------------------------------------------------------
UMR HydroSciences  Montpellier
CC 57 
Universite Montpellier
34090  Montpellier      FRANCE
http://www.hydrosciences.org/
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