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 5 months ago

jwallwork23 commented 5 months 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 5 months ago

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

jwallwork23 commented 5 months 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 5 months ago

Perfect!

jwallwork23 commented 5 months ago

Thanks! Will update file dates and then merge.