Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about derived parameters with log_param() #661

Open
herrwang0 opened this issue May 30, 2024 · 0 comments
Open

Question about derived parameters with log_param() #661

herrwang0 opened this issue May 30, 2024 · 0 comments

Comments

@herrwang0
Copy link

herrwang0 commented May 30, 2024

There are a number of log_param() calls, mostly for derived parameters, never log these parameters anywhere by default. Subroutine log_param_*() only writes parameters to MOM_parameter_doc when description is given. Without descriptions, log_param() calls log parameters, along with all the other parameters, to stdout, but only when SEND_LOG_TO_STDOUT is True (default false).

I think it makes sense to ignore the derived parameters in MOM_parameter_doc, and I suspect this behavior is by design. I wonder if it would of any benefits to make this less opaque, maybe by simply editing the description of SEND_LOG_TO_STDOUT? Or adding another MOM_parameter_doc file for derived parameters?

A few examples:

call log_param(param_file, mdl, "GFS / G_EARTH", CS%GFS_scale, units="nondim")

call log_param(param_file, mdl, "M to THICKNESS", GV%m_to_H*H_rescale_factor, units="H m-1")
call log_param(param_file, mdl, "M to THICKNESS rescaled by 2^-n", GV%m_to_H, units="2^n H m-1")
call log_param(param_file, mdl, "THICKNESS to M rescaled by 2^n", GV%H_to_m, units="2^-n m H-1")

call log_param(param_file, mdl, "DTBT as used", CS%dtbt, units="s", unscale=US%T_to_s)
call log_param(param_file, mdl, "estimated maximum DTBT", CS%dtbt_max, units="s", unscale=US%T_to_s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant