Dear Estanis,
looking into the script code of nc2mc here,
http://www.pa.op.dlr.de/~PatrickJoeckel/nc2mc/nc2mc, you can see that this error message is triggered if 'tline' of the first nc file to be added to the descriptor file does not contain 1 or 4 fields:
switch (${#tline})
case 1:
# special case
echo 'WARNING: FORMAT OF units-ATTRIBUTE OF '$tname' NOT RECOGNIZED: '$tline
set tline = ( "${tline}" "since" "0001-01-01" "00:00:00" )
echo '... using '${tline} 'instead.'
breaksw
case 4:
# OK, do nothing
breaksw
default:
echo 'ERROR: FORMAT OF units-ATTRIBUTE OF '$tname' NOT RECOGNIZED: '$tline
exit 4
breaksw
endsw
'tline' is the line in a netCDF file that contains the time units, e.g., 'hours since 01-Jan-1900 00:00:00'. 4 fields would be the typical case, in this case field 1 is 'hours', field 2 is 'since', field 3 is '01-Jan-1900', and field 4 is '00:00:00'.
So the error does *not* relate to your already existing descriptor file, but to the first *.nc file to be added, which would be 'nemo1.nc' in your example. In a shell, execute this command to check the time units in your netCDF file and find out why it does
not have 4 fields: ncdump -h nemo1.nc | less.
I actually wonder where your descriptor file comes from if nc2mc aborted with an error ...
Best wishes,
Hella
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
>
>
--
...............................................................................
Hella Riede hella.riede@xxxxxxx
Air chemistry department: Modeling & Global Observations
Max Planck Institute for Chemistry, Hahn-Meitner-Weg 1, 55128 Mainz, Germany
www.mpic.de
www.caribic.de
...............................................................................