1 function d=time2datenum(t,red)
2 % convert time in seconds since sim start to datenum
3 % t time in seconds since sim start
4 % red structure with fields:
5 % red.max_tign_g a reference time as seconds since sim start
6 % red.time the same time as datenum
8 d= t/(24*3600) + red.start_datenum;