[ncl-talk] Re-arranging .nc file Dimension

Dennis Shea shea at ucar.edu
Wed Apr 17 10:02:00 MDT 2019


A simple search of NCL documentation yields:

*https://www.ncl.ucar.edu/Document/Language/reorder.shtml*
<https://www.ncl.ucar.edu/Document/Language/reorder.shtml>

*---*
*https://www.ncl.ucar.edu/Document/Manuals/language_man.pdf*
<https://www.ncl.ucar.edu/Document/Manuals/language_man.pdf>
page 7: Section 2.11.1 Dimension reordering:

===========
    spi = f->SPI        ; SPI (len, time, rlat, rlon)

    spi_reorder = spi(time|:,len|:,rlat|:,rlon|:)
    printVarSummary(spi_reorder)

or, overwrite with reassignment syntax [  *:=*  ]

    spi  *=:*  spi(time|:,len|:,rlat|:,rlon|:)
    printVarSummary(spi)

On Tue, Apr 16, 2019 at 10:46 AM Oluwaseun Ilori <wilseun at gmail.com> wrote:

> Hello:
>      I have a .nc file with dimensions of a float type "float SPI (len,
> time, rlat, rlon)" and I want to change it to be of type "float SPI
> (time, len, rlat, rlon)". I mean
> float SPI (len, *time*, rlat, rlon) to float SPI (*time*, len, rlat,
> rlon).
> How will I do this and attached is the output of the "ncdump" of my nc
> file.
>
> ---
> *OLUWASEUN ILORI*
> *B.Tech(Hons) in Meteorology*
> *M.Tech in Meteorology and climate science(in view)*
>
> *Phone: +2347031000687 +2348069154213*
> *Federal University of Technology Akure. Nigeria.*
> *Facebook: *http://facebook.com/hilorywilson
> <https://www.facebook.com/hilorywilson>
> linkedln: https://www.linkedin.com/in/wilson-ilori-447952108
> Twitter: HiloryW
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190417/c87efb45/attachment.html>


More information about the ncl-talk mailing list