[Thread Prev][Thread Next][Index]

Re: [ferret_users] combine ncdf files with nc2mc.sh



Dear Estanis,

difficult to say. May it is the capital "J" in 01-Jan-1900 00:00:00. Anyway, recent ferret versions (guess > 7.0) offer a much more comfortable opportunity to concatenate files over a dimension, here the time axis. Please seach for "aggregation" in the ferret manual for a detailed description. Please find below a short script to be called like this:


go aggregate nemo*.nc


The kernel is the definition:


DEFINE DATA/AGGREGATE /T AggData=file_list


It is lightyears more comfortable than using descriptor files from many points of view.

Hope this helps,

Martin


$ cat aggregate.jnl
\cancel mode verify
! aggregate.jnl
! Description: Generate a time aggregation and open the files

! Usage: arg1
! GO aggregate file list

! arg 1 - file list defined by wildcards

! Example:
! go aggregate RUN*/ocean_day.nc4
!
let file_list = SPAWN("ls -1 $1")
DEFINE DATA/AGGREGATE /T AggData=file_list
say "Defining data set AggData"
set mode/last verify


On 06/23/2017 08:13 PM, Estanislao Gavilan Pascual-Ahuir (PGR) wrote:

Dear Community,


I am trying to combine 2 ncdf files using nc2mc.sh. But I am having this error


ERROR: FORMAT OF units-ATTRIBUTE OF t NOT RECOGNIZED:

Thanks in advance for all your help.

My descriptor file is:

&FORMAT_RECORD
D_TYPE = ' MC',
D_FORMAT = ' 1A',
D_SOURCE_CLASS = 'MODEL OUTPUT',
/
&BACKGROUND_RECORD
D_EXPNUM = 'Control',
D_TITLE = '',
D_T0TIME = '01-Jan-1900 00:00:00',
D_TIME_UNIT = 1.0,
D_TIME_MODULO = .FALSE.,
/
&MESSAGE_RECORD
D_MESSAGE = ' ',
D_ALERT_ON_OPEN = F,
D_ALERT_ON_OUTPUT = F,
/
&EXTRA_RECORD
/
&STEPFILE_RECORD
s_filename = 'nemo1.nc',
S_START = 3471508800,
S_END = 4417156800,
S_DELTA = 432000,
S_NUM_OF_FILES = 1,
S_REGVARFLAG = ' ',
/
&STEPFILE_RECORD
s_filename = 'nemo2.nc',
S_START = 4417588800,
S_END = 6309316800,
S_DELTA = 432000,
S_NUM_OF_FILES = 1,
S_REGVARFLAG = ' ',
/
&STEPFILE_RECORD
s_filename = '**END OF STEPFILES**'
/


Kind regards,


Estanis




[Thread Prev][Thread Next][Index]