j-m-adams / GrADS

The Grid Analysis and Display System (GrADS)
Other
19 stars 10 forks source link

Fix open error of NetCDF #8

Open tenomoto opened 3 years ago

tenomoto commented 3 years ago

Calls to utScan() from compare_units() in src/gasdf.c cause errors due to an incorrect truncation. I experienced errors with udunits2 and segmentation faults with udunits.

For example, the length of "hours since" is 11 and that of temp_str (starting from "since" with a leading white space is 6. trunc_units should be terminated at the white space between "hours" and "since", which is 5. Therefore adding 1 add an extra white space to trunc_units.

In addition, I edited configure to remove version string from png and respect CPPFLAGS and LDFLAGS in finding wgrib2.

j-m-adams commented 2 years ago

Thank you, tenomoto, for your comments. I have just committed some changes for version 2.2.3. Please check if your issues are still relevant.