CTSM icon indicating copy to clipboard operation
CTSM copied to clipboard

Request: active/inactive status for our table of history variables

Open adrifoster opened this issue 3 years ago • 1 comments

We got a request (or two?) from the recent CTSM Tutorial for a table of history variables (we already have this here with whether or not they will be active/inactive by default in different modes (e.g. SP, etc.).

adrifoster avatar May 25 '22 17:05 adrifoster

Our current mechanism lists the default history fields as separate lists for the configurations we want to display. Currently that's non-FATES and FATES modes. We could easily other lists though. What would be harder to do would be to just show the differences between the lists. But, possibly that could be done if you do a difference between the lists and just point out the things that are different. But, a script to parse those differences would need to be developed.

But, note that the current mechanism is only outputting the default active fields -- not the inactive ones. To also list the inactive fields we'd need a way to turn on all history fields (like we suggest doing in #29). I think we should do that though and it should be fairly easy to do. If we do get something that processes differences between lists that could also be taken advantage of to show only the inactive fields.

Note, in the past we had a perl script that gave us a list by processing the FORTRAN source code and getting a list from the hist_addfld field calls. You can see an example of that here:

https://www.cesm.ucar.edu/models/cesm1.2/clm/models/lnd/clm/bld/namelist_files/history_fields_clm4_5.xml

The script broke as our code got more complex with hist_addfld calls scattered in the code, and with things like loops over addfld calls that pass variables for the names rather than explicit character fields for the names.

ekluzek avatar May 25 '22 19:05 ekluzek