repeat the value of a variable over time dimension (Julian)

Help
Mubashar
2013-12-26
2014-01-06
  • Mubashar
    Mubashar
    2013-12-26

    Dear NCO users,

    I have a netcdf file having monthly data for one variable for January 1990. I want to repeat this variable for continuous two year let say (January 1990 till December 1991). My calendar is Julian. So how can I do this such that my output file will have 24 months (1990 till 1991) for this variable.

    Thanks,

    Mubashar

     
  • Charlie Zender
    Charlie Zender
    2014-01-06

    Sorry for the late response due to holidays.
    Concatenate this file to itself 23 times, then fiddle with the
    date/time values so you like them, e.g.,
    ncrcat in.nc in.nc in.nc (24 times) ... out.nc
    ncap2 -s 'time= blah blah blah' out.nc out.nc
    cz