Project

General

Profile

Problem with reading the namelists in case of grb1 input, but ncdf output

Added by Susanne Brienen over 2 years ago

I encountered a problem with int2lm2.0_clm4 when reading grb1 input (COSMO-EU-analysis data)
and writing ncdf output (thus compiling with -DNETCDF).

The INT2LM crashes with
ERROR * while reading NAMELIST Group /DATA/ *

After a few tests, I found that this only happens when compiling with -DNETCDF
and using grb1 input and ncdf output. It seems to be related to
lines 4208 ff. in src_namelist.f90:

!_br 28.01.15 Bug #56 RedC / Trailing slash
#ifdef NETCDF
! to prevent an often error from users read dimension lengths from data file
ierrstat = nc_get_dimlen(TRIM//'/'//TRIM, 'rlon’, ie_ext, yerrmsg)
ierrstat = nc_get_dimlen(TRIM//'/'//TRIM, 'rlat’, je_ext, yerrmsg)
#endif
!_br 28.01.15 end

because then INT2LM tries to read ncdf input data, which of course fails.
(see line 12 in the logfile: “yerrmsg: Error in nc_get_dimlen / nf90_open – NetCDF: Unknown file format”)

Is there a workaround or are there maybe also other reasons that mixed types in input/output is not advisable? Thanks.

int2lm.job int2lm.job 4.25 KB Job script
logfile_int2lm logfile_int2lm 2.31 KB Log file

Replies (3)

RE: Problem with reading the namelists in case of grb1 input, but ncdf output - Added by Burkhardt Rockel over 2 years ago

May be the IF clause below can fix this. If so, it should be introduced in the next INT2LM version.

#ifdef NETCDF
  IF (TRIM(ylmext_form_read) == 'ncdf')  THEN
   ! to prevent an often error from users read dimension lengths from data file
   ierrstat = nc_get_dimlen(TRIM(ylmext_cat)//'/'//TRIM(ylmext_lfn), 'rlon', ie_ext, yerrmsg)
   ierrstat = nc_get_dimlen(TRIM(ylmext_cat)//'/'//TRIM(ylmext_lfn), 'rlat', je_ext, yerrmsg)
  ENDIF
#endif

RE: Problem with reading the namelists in case of grb1 input, but ncdf output - Added by Burkhardt Rockel over 2 years ago

There was a closing brace missing in the listing in my last post.
It should be hopefully correct now.

    (1-3/3)