[Thread Prev][Thread Next][Index]

Re: [ferret_users] How to change the K-index into L-index (time index)



Dear Samir,

Thank you for your valuable suggestion.
After trying, following is the step to change index:
  1. define new axis for x, y, and t:
    • define axis/x=start:end:step xaxisname
    • define axis/y=start:end:step yaxisname
    • define axis/t=start:end:step taxisname
  2. define new grid:
    • define grid/x=xaxisname/y=yaxisname/t=taxisname gridname
  3. check new grid:
    • sh gr gridname
  4. let dummy=x[gx=xaxisname]+y[gy=yaxisname]+t[gt=taxisname]
  5. check dummy grid:
    • sh gr dummy
  6. save to nc files:
    • save/file="/home/filename.nc" reshape(varname,dummy)
I wish my summaries could be useful for those who will need it someday.
Again, thank you very much for your help.

Best regards,

dessy
 


From: samir pokhrel <pokhrelsamir@xxxxxxxxx>
To: dessy berlianty <dessyberlianty@xxxxxxxxx>
Cc: "ferret_users@xxxxxxxx" <ferret_users@xxxxxxxx>
Sent: Tuesday, May 14, 2013 1:16 PM
Subject: Re: [ferret_users] How to change the K-index into L-index (time index)

Dear Dessy,

 You may use reshape function in which one variable can be wrapped in the dimension of the other.

go to following link and see the reshape function



regards
Samir



On Tue, May 14, 2013 at 7:54 AM, dessy berlianty <dessyberlianty@xxxxxxxxx> wrote:
Dear Ferret Users,

I really need suggestion how to change the K-index into L-index (time index) for the followings dataset:

 name     title                                                    I         J            K         L         M         N
 XOUT     longitude
                                        1:186     1:160      ...       ...       ...       ...
 YOUT     latitude
                                          1:186     1:160      ...       ...       ...       ...
 DEPOUT   Mean_water_depth
                       1:186     1:160      ...       ...       ...       ...
 TIME     Time
                                                  ...       ...         1:673     ...       ...       ...
 UMVEL    X-component_of_depth-mean_curre 1:186     1:160    1:673     ...       ...       ...
 VMVEL    Y-component_of_depth-mean_curre 1:186     1:160   1:673     ...       ...       ...
 EFLUX2DU X-component_of_depth-integrated  1:186     1:160   1:673     ...       ...       ...
 EFLUX2DV Y-component_of_depth-integrated  1:186     1:160   1:673     ...       ...       ...
 ZETA     Surface_elevation
                              1:186     1:160  1:673     ...       ...       ...
 ETOT2D   Vertically_integrated_total_ene
        1:186     1:160   1:673     ...       ...       ...
 EDISSIP2D
          Vertically_integrated_energy_di
             
1:186     1:160   1:673     ...       ...       ...

If I'm not changing the K-index into time index (L), I'll need /transpose command for plotting each variable and Ferret always define the variable data as vertical dimension (not as time series as I wish).
And also I couldn't applying plot/vlog appropriately, even by using transpose. There will be a message as followings:
yes? plot/transpose/i=53/j=87/vlog zeta
 **ERROR: value out of legal range: Limits for log axis negative or too small: -1.16 : 1.21

yes? plot/transpose/i=53/j=87/vlog FFTA(zeta)

Bailing out of external function "ffta":
     Time axis must be a regular axis
 **ERROR: error in external function


I would highly appreciate for any help.
Thank you in advance.

Best wishes,

dessy
---



--
Samir Pokhrel
Climate and Global Modelling Division
Indian Institute of Tropical Meteorology
NCL Post, Pashan
Pune-411008
INDIA



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

Privacy Policy | Disclaimer | Accessibility Statement