How to add new parameter for use in namelist.input?

Hello,

Consider simple example. Let's say I want to replace a constant within a code with a variable, that I can control through namelist.input entry.

I came up with ugly solution that consist from:

Suppose the new variable is called newparametername.

1) define newparametername in Registry
2) declare newparametername in code
3) before using newparametername "call" it like this:
CALL nl_get_newparametername ( 1, newparametername )
4) use newparametername in code

Of course there is a better way, however I can't find out the standard way to to this. Any hint?
Thank you,
Ivan
 
Hi,
I would recommend taking a look at a previous code commit that added a new namelist variable and use it as a rough guide for how to add your specific parameter. For e.g., see how 'shalwater_depth' is added in this commit. If you're looking for other examples, see the full release notes.
 
Back
Top