Create time axis and merging time axis for multiple files

There were files which has same repeated wrong time axis.

Each file has different year title, but it has same time axis inside.

(Can check with “show grid/t variable“)

So, this script is very super useful for gathering split files with wrong time axis.



!Target files:, …

!Target year: 1991 to 1999

!Variable name and timestep: SST, daily


use “”     !First year

DEFINE AXIS/T=”1-JAN-1991“:”31-DEC-1999“:1/UNIT=day tannual
LET new_SST = SST[d=1,gt=tannual]
SAVE/clo/ new_SST[L=1:365]

let kk = 1
repeat/name=dd/range=2:9 (;\
use “SST.199`dd`.nc“;\
LET new_SST = SST[d=1,gt=tannual];\
SAVE/ new_SST[L=`kk*365+1`:`(kk+1)*365`];\
let kk = `kk + 1`;\
can d 1;\



1. Make time axis

2. Set timesteps

3. Save


So, Simple 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s