Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#671 closed task (fixed)

Set and unset ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE inside applications that need it

Reported by: Ian Culverwell Owned by: warrick
Priority: normal Milestone: 10.0
Component: ROPP(all) Version: 9.0
Keywords: Cc: Ian Culverwell

Description

To avoid the rather severe measure of setting the environment variable ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE for all applications, it may be better to set it immediately before (and unset it immediately after) use of tools that use the ecCodes library. EUMETSAT have written a patch to do this: https://gitlab.eumetsat.int/ro/ropp/commit/8adb4a4a41042b0599512b4afec16eb5ea6f6f4b. We should consider implementing this in ROPP, subject to successful testing on all our compilers.

Change history (2)

comment:1 by warrick, 4 years ago

Resolution: fixed
Status: newclosed

We have implemented the EUMETSAT patch by adding editing ropp_io/tools/[eum|ropp]2bufr_eccodes.f90 to include this:

	  USE system,        ONLY: setenv

and this:

 ! Set environment variable needed for out-of-bounds BUFR encoding
 istat = setenv('ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE'//ACHAR(0), &
                 '1'//ACHAR(0), 1)

We have also removed the line that sets ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE in setroppenv and in some of ropp_io/tests.

The documentation has also been updated to reflect the new way of dealing with the environment variable - telling users that they do not need to set it use ROPP.

comment:2 by warrick, 4 years ago

This patch was added to my development branch at r6331

Note: See TracTickets for help on using tickets.