change unit of time dimension, merge and reshaping a cube

424 views
Skip to first unread message

Bernd Becker

unread,
Sep 12, 2013, 6:41:32 AM9/12/13
to scitoo...@googlegroups.com
Hello,

I have cubes in a cube list that look like this:

U component of wind / (m s**-1)     (ensemble_member: 4; analysis_time: 4; time: 45; air_pressure: 6; latitude: 73; longitude: 144)
     Dimension coordinates:
          ensemble_member                      x                               -                      -                 -                  -              -
          analysis_time                              -                               x                     -                 -                   -              -
          time                                            -                               -                     x                 -                   -              -
          air_pressure                                -                               -                     -                 x                   -              -
          latitude                                       -                                -                     -                 -                   x              -
          longitude                                    -                                -                     -                 -                    -              x
     Scalar coordinates:
          forecast_reference_time: 2012-12-16 00:00:00


first question: How can I change the unit of the time dimension so that it reflects a proper date, i.e. days since reference time
rather than just number of days?

Each cube has a different forecast reference time, 2012-12-15 to 2012-12-26,
and if there was a relation ship between lead time and forecast reference time, merge might actually
just do it.

Finally, I would like to combine the ensemble member and the analysis time dimension to give me a 16;
16 ensemble members per day.

How should I proceed?


LeonH

unread,
Sep 17, 2013, 9:37:48 AM9/17/13
to scitoo...@googlegroups.com
Not sure about your first few problems, but the last one is easy: slice the cube up in time/air_pressure/latitude/longitude slice, there will be 16 slices. Add a coordinate called "realization" and set this coordinate to a different number for each slice (eg. 1-16). Merging the result should give you a realization/time/air_pressure/latitude/longitude cube.

Niall Robinson

unread,
Sep 17, 2013, 9:41:39 AM9/17/13
to scitoo...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages