Update CMOR3 with CF CRS container variable; Numerous edge case fixes, license reformulation for CMIP7

Features

  • Added the function cmor_set_crs used for creating a CF Coordinate Reference System (CRS) container variable. This is similar to the container variable created by cmor_set_grid_mapping but is named crs instead of the grid mapping name and supports text value attributes.
  • The license attribute can now be generated from a template in the CV file. It requires the user to provide a license_id in their input JSON, which determines what license type and URL will be used when generating the license string. The attributes license_id, license_type, and license_url are not included in the global attributes of a file unless they are listed in the CV’s required_global_attributes list.

Bugfixes

  • Removed erroneous warning message that says zero time steps were written for a time axis if cmor_write was used to write all time steps without setting the ntimes_passed parameter.
  • Invalid JSON in user input or tables will be caught and throw an error instead of silently causing segmentation faults.
  • The minimum supported CMOR version in the header of tables will now be compared as separate major and minor integers against the current CMOR version instead of as a float.

Changes

  • Time axis intervals will now be checked when passing time values with cmor_write.
  • To use zstandard compression, the user must disable deflation with cmor_set_deflate and then provide a valid zstandard compression level within the range [-131072, 22] using cmor_set_zstandard. Performing only one of the two actions will result in no zstandard compression being applied.
  • cmor_write will throw an error if variable or zfactor data contains NaN values.
  • Calendars in the CF 1.12 release that are not supported by CMOR (i.e utc, tai, all_leap, and 366_day) will throw an error message asking users to use another, more common calendar.
  • cmor_time_varying_grid_coordinate has been deprecated, and will be removed in a future release.

Closed Issues

GitHub