ERA5 input: khmax too low – in #10: INT2LM

in #10: INT2LM

<p> I tested the ERA5 data with int2lm and got segmentation faults. The reason is that the maximum number of height levels used in vcoord and vcoord_in, khmax = 96, is too low. <span class="caps"> ERA </span> has 137 levels. In line 5186 of src_read_coarse_grid.f90, in vcoord_in%vert_coord(1:ke1in) = zvcoord_in(1:ke1in), ke1in=137 values are written to an array with only 96 elements, overwriting other elements in memory. This creates wrong values in vcoord%vert_coord. Increasing khmax to a value larger than 137 solves this issue. </p> <p> Unfortunately, I cannot create a bug ticket so I post this here. </p>

  @sebastianschubert in #72f8086

<p> I tested the ERA5 data with int2lm and got segmentation faults. The reason is that the maximum number of height levels used in vcoord and vcoord_in, khmax = 96, is too low. <span class="caps"> ERA </span> has 137 levels. In line 5186 of src_read_coarse_grid.f90, in vcoord_in%vert_coord(1:ke1in) = zvcoord_in(1:ke1in), ke1in=137 values are written to an array with only 96 elements, overwriting other elements in memory. This creates wrong values in vcoord%vert_coord. Increasing khmax to a value larger than 137 solves this issue. </p> <p> Unfortunately, I cannot create a bug ticket so I post this here. </p>

ERA5 input: khmax too low

I tested the ERA5 data with int2lm and got segmentation faults. The reason is that the maximum number of height levels used in vcoord and vcoord_in, khmax = 96, is too low. ERA has 137 levels. In line 5186 of src_read_coarse_grid.f90, in vcoord_in%vert_coord(1:ke1in) = zvcoord_in(1:ke1in), ke1in=137 values are written to an array with only 96 elements, overwriting other elements in memory. This creates wrong values in vcoord%vert_coord. Increasing khmax to a value larger than 137 solves this issue.

Unfortunately, I cannot create a bug ticket so I post this here.

View in channel