nextsimhub / nextsimdg

neXtSIM_DG : next generation sea-ice model with DG
https://nextsim-dg.readthedocs.io/en/latest/?badge=latest
Apache License 2.0
10 stars 13 forks source link

Use `size_t` for sizes in XIOS interface #576

Closed jwallwork23 closed 2 weeks ago

jwallwork23 commented 2 weeks ago

Use size_t for sizes in XIOS interface

Fixes #572

Fixes #562

Task List


Change Description

Use size_t for sizes in the XIOS interface, rather than int, for consistency with the rest of the code base. Also, throw exceptions if the getter methods return null pointers.

NOTE: #559 and #574 will need to be merged first.


Test Description

Updated the tests accordingly.


Pre-Request Checklist

jwallwork23 commented 2 weeks ago

Ready for review, but #559 and #574 will need to be merged first so not assigning a reviewer yet.

jwallwork23 commented 2 weeks ago

Could you add some sort of prefix to the exception messages so that the user knows they came from within XIOS/Xios.cpp? (Assuming this isn't prepended by a higher level try/catch).

Thanks @timspainNERSC. How about this in cfc56a99?

timspainNERSC commented 2 weeks ago

Perfect!

jwallwork23 commented 2 weeks ago

Thanks! Will update file dates and then merge.