Problem with reading the namelists in case of grb1 input, but ncdf output – in #10: INT2LM
in #10: INT2LM
Cookies disclaimer
Our site saves small pieces of text information (cookies) on your
device in order to verify your login. These cookies are essential
to provide access to resources on this website and it will not
work properly without.
Learn more
<p>
I encountered a problem with int2lm2.0_clm4 when reading grb1 input (
<span class="caps">
COSMO
</span>
-EU-analysis data)
<br/>
and writing ncdf output (thus compiling with -
<span class="caps">
DNETCDF
</span>
).
</p>
<p>
The INT2LM crashes with
<br/>
ERROR *** while reading
<span class="caps">
NAMELIST
</span>
Group /DATA/ ***
</p>
<p>
After a few tests, I found that this only happens when compiling with -DNETCDF
<br/>
and using grb1 input and ncdf output. It seems to be related to
<br/>
lines 4208 ff. in src_namelist.f90:
</p>
<p>
!_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(
<acronym title="ylmext_cat">
<span class="caps">
TRIM
</span>
</acronym>
//’/’//
<acronym title="ylmext_lfn">
<span class="caps">
TRIM
</span>
</acronym>
, ‘rlon’, ie_ext, yerrmsg)
ierrstat = nc_get_dimlen(
<acronym title="ylmext_cat">
<span class="caps">
TRIM
</span>
</acronym>
//’/’//
<acronym title="ylmext_lfn">
<span class="caps">
TRIM
</span>
</acronym>
, ‘rlat’, je_ext, yerrmsg)
#endif
<br/>
!_br 28.01.15 end
</p>
<p>
because then INT2LM tries to read ncdf input data, which of course fails.
<br/>
(see line 12 in the logfile: “yerrmsg: Error in nc_get_dimlen / nf90_open — NetCDF: Unknown file format”)
</p>
<p>
Is there a workaround or are there maybe also other reasons that mixed types in input/output is not advisable? Thanks.
</p>
<p>
I encountered a problem with int2lm2.0_clm4 when reading grb1 input (
<span class="caps">
COSMO
</span>
-EU-analysis data)
<br/>
and writing ncdf output (thus compiling with -
<span class="caps">
DNETCDF
</span>
).
</p>
<p>
The INT2LM crashes with
<br/>
ERROR *** while reading
<span class="caps">
NAMELIST
</span>
Group /DATA/ ***
</p>
<p>
After a few tests, I found that this only happens when compiling with -DNETCDF
<br/>
and using grb1 input and ncdf output. It seems to be related to
<br/>
lines 4208 ff. in src_namelist.f90:
</p>
<p>
!_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(
<acronym title="ylmext_cat">
<span class="caps">
TRIM
</span>
</acronym>
//’/’//
<acronym title="ylmext_lfn">
<span class="caps">
TRIM
</span>
</acronym>
, ‘rlon’, ie_ext, yerrmsg)
ierrstat = nc_get_dimlen(
<acronym title="ylmext_cat">
<span class="caps">
TRIM
</span>
</acronym>
//’/’//
<acronym title="ylmext_lfn">
<span class="caps">
TRIM
</span>
</acronym>
, ‘rlat’, je_ext, yerrmsg)
#endif
<br/>
!_br 28.01.15 end
</p>
<p>
because then INT2LM tries to read ncdf input data, which of course fails.
<br/>
(see line 12 in the logfile: “yerrmsg: Error in nc_get_dimlen / nf90_open — NetCDF: Unknown file format”)
</p>
<p>
Is there a workaround or are there maybe also other reasons that mixed types in input/output is not advisable? Thanks.
</p>
Problem with reading the namelists in case of grb1 input, but ncdf output
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.
<p>
May be the IF clause below can fix this. If so, it should be introduced in the next INT2LM version.
</p>
<p>
<pre>
#ifdef NETCDF
IF (<acronym title="ylmext_form_read"><span class="caps">TRIM</span></acronym> == ‘ncdf’) THEN
! to prevent an often error from users read dimension lengths from data file
ierrstat = nc_get_dimlen(<acronym title="ylmext_cat"><span class="caps">TRIM</span></acronym>//’/’//<acronym title="ylmext_lfn"><span class="caps">TRIM</span></acronym>, ‘rlon’, ie_ext, yerrmsg)
ierrstat = nc_get_dimlen(<acronym title="ylmext_cat"><span class="caps">TRIM</span></acronym>//’/’//<acronym title="ylmext_lfn"><span class="caps">TRIM</span></acronym>, ‘rlat’, je_ext, yerrmsg)
ENDIF
#endif</pre>
</p>
<p>
</p>
<p>
May be the IF clause below can fix this. If so, it should be introduced in the next INT2LM version.
</p>
<p>
<pre>
#ifdef NETCDF
IF (<acronym title="ylmext_form_read"><span class="caps">TRIM</span></acronym> == ‘ncdf’) THEN
! to prevent an often error from users read dimension lengths from data file
ierrstat = nc_get_dimlen(<acronym title="ylmext_cat"><span class="caps">TRIM</span></acronym>//’/’//<acronym title="ylmext_lfn"><span class="caps">TRIM</span></acronym>, ‘rlon’, ie_ext, yerrmsg)
ierrstat = nc_get_dimlen(<acronym title="ylmext_cat"><span class="caps">TRIM</span></acronym>//’/’//<acronym title="ylmext_lfn"><span class="caps">TRIM</span></acronym>, ‘rlat’, je_ext, yerrmsg)
ENDIF
#endif</pre>
</p>
<p>
</p>
May be the IF clause below can fix this. If so, it should be introduced in the next INT2LM version.
#ifdef NETCDF
IF (TRIM == ‘ncdf’) THEN
! 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
#endif
Problem with reading the namelists in case of grb1 input, but ncdf output
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.
May be the IF clause below can fix this. If so, it should be introduced in the next INT2LM version.
There was a closing brace missing in the listing in my last post.
It should be hopefully correct now.
Yes, this works. Thanks !!!