#4 ncrcat time problem

closed
None
5
2011-06-26
2011-06-25
Gerald Potter
No

I have a script that concatenates 12 monthly files into on year file:
It works fine but the time_bnds is incorrect.
Here is the script:
#!/bin/tcsh
# I write this script as a loop of year so you can easily extend it to multi years

set iyr = 1979

set prefix = clt_Amon_reanalysis_GEOS-5_MERRA_r1i1p1_

# if you need more year, just set a value you need here instead of 1980
while ($iyr < 1980)

ncrcat -c -F -x `ls -c1 $prefix$iyr*.nc |sort -n` tmp.nc

rm -rf $prefix$iyr*.nc
mv tmp.nc $prefix{$iyr}01-{$iyr}12.nc

@ iyr++
echo $iyr
end

The problem is that the time_bnds contained in the new yearly file are:
time_bnds =
0, 30,
0, 27,
0, 30,
0, 29,
0, 30,
0, 29,
0, 30,
0, 30,
0, 29,
0, 30,
0, 29,
0, 30 ;
BUT I need the time_bnds to be:

0, 31,
31, 59,
59, 90,
90, 120,
120, 151,
151, 181,
181, 212,
212, 243,
243, 273,
273, 304,
304, 334,
334, 365

Is there a way for NCO to do this?

Thanks
Jerry

Discussion

  • Charlie Zender
    Charlie Zender
    2011-06-26

    we do not really use the support request system on sourceforge.
    (because we have no funding to provide support).
    you have done the right thing by bringing the issue to our attention.
    your request is essentially for a new feature, and is in the queue.

     
  • Charlie Zender
    Charlie Zender
    2011-06-26

    • assigned_to: nobody --> zender
    • status: open --> closed