NCAS-CMS / NCAS-CMS/cf-python

Subsume ESMF regrid logging configuration under log level

Open
#286 0 comments 0 reactions 1 assignee View on GitHub

@sadielbartholomew is already working on this.

Since Feb 22, 2024.

API review (4.0.0) enhancement question
Dominant language
Python
Stars
150
Forks
23
Avg merge
1d 11h
Merged PRs (30d)
2

Description

The cf.regrid_logging flag can turn the logging from ESMF regridding on and off as required under cf, but I think it would be cleaner and more natural to the user if it such logging was controlled under the cf logging system.

More specifically I propose that ESMF logging is switched on when the cf.log_level is set to 'INFO' (2) or higher, otherwise off, and perhaps we can, consistently with other functions, provide a verbose keyword argument to the two regridding methods which can override the global log level if a user does want to force the ESMF logging to be enabled. Then we can remove this flag.

Happy to consider other thoughts on this, though, if anyone thinks the current set-up is preferable or there is a better alternative way to manage the configuration of the ESMF logging.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.