Open tomvothecoder opened 1 year ago
@TonyB9000 and @chengzhuzhang I'm sure this is a source of frustration for both of you as well. I captured it this as a GitHub issue that we should address in the future.
@tomvothecoder @chengzhuzhang Thanks Tom! I always felt that the "--logdir LOGDIR" option was being ignored. Also (IMHO) error logs should be machine-readable (one-liners with helpful structure) amenable to subsequent collation and processing. These multi-colored, six-line outputs:
�[1;31;47m!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Error: axis atmosphere_sigma_coordinate (table: Amon) , detected value at:
! 0.000124 when valid_max is 0.000000
!
!!!!!!!!!!!!!!!!!!!!!!!!!�[0m
are very annoying. Not sure if that can be fixed, or relegated to a "very verbose" mode of output ("--splashy = True").
Debugging
e3sm_to_cmip
can be tedious if a CMOR error appears becausee3sm_to_cmip
does not capture and print the CMOR error directly in its own stderr/stdout or its log file.Instead, a separate CMOR log is used to capture CMOR errors. This presents an issue of having to go through two logs and align timestamps to figure out when the CMOR error occurred in the stack trace.
The user will see CMOR errors that tell the user to check the CMOR log file, instead of just printing it out directly. Often times there are tons of CMOR logs for the same variables, so having to look up which CMOR log is the correct one also introduces friction in the debugging and development process.
Example of a CMOR log (e.g.,
cmor_logs/phalf.log_2023-09-21T09:51:15
)Proposed Solution
Capture CMOR errors in stderr/stdout and record in single
e3sm_to_cmip
log file in order of the stack trace.