Easy Way to Resize/Enlarge Grid?

Help
John
2013-03-02
2013-10-17
  • John
    John
    2013-03-02

    I need to merge many model subdomains; i.e., merge adjacent "tiles" into a single grid. Most of the tiles are exactly the same number of lat & lon values, so I can easily use ncpdq and ncrcat to stitch them together. But a few of the tiles are "short" along the lat or lon dimension. What's the easiest way to expand a grid along lat or lon?

    For example, a normal tile might have lat values go from 30 deg to 40 deg {30, 31, … 40}, and an adjacent tile goes only from 35 to 40 {35, 36, … 40}. Is there an easy way to modify the lat dimension of the short tile so it's the same as the normal one?

    I've seen some posts that suggest using 'ncap2 -s' to manipulate the dimension's values, but I've not found any good examples.

    Thanks.

     
  • Charlie Zender
    Charlie Zender
    2013-03-02

    Currently there is no elegant way to do this for a whole file at a time with NCO.
    I am thinking about a new ncks feature that would allow this…more on that later.
    For now the only NCO method that is sure to work is to use ncap2 to define new dimensions of the intended size and copy
    the old data into new arrays and then rename everything back to their original names. Laborious.
    cz

     
  • John
    John
    2013-03-03

    Thanks! Good to know. Looks like CDO might be able to do it. https://code.zmaw.de/boards/1/topics/1616.

     
  • Charlie Zender
    Charlie Zender
    2013-07-26

    Realized that MSA with -msa would be very useful in extending or
    padding coordinate grids. Havn't written an example yet, but the
    example here is directly applicable to your question of resizing grids:
    http://nco.sf.net/nco.html#msa
    Realized that MSA with -msa would be very useful in extending or
    padding coordinate grids. Havn't written an example yet, but the
    example here is directly applicable to your question of resizing grids:
    http://nco.sf.net/nco.html#msa

    cz