Comments (9)
@slevisconsulting and I just talked about this. After talking through how we'd do this in python, we realized a much easier approach would be to modify the hist_printflds
Fortran subroutine or make a new subroutine like it, so that: If a given namelist flag is set, then it opens a new file for output and outputs the field list in an appropriate format – maybe even directly in the format of a restructuredText table.
from ctsm.
from ctsm.
Something like the CLM4.5 table of history fields for CLM5 / CTSM would be useful to include in the users guide, which was the original motivation behind opening #941
from ctsm.
from ctsm.
Bill Sacks < [email protected] > - 2016-10-24 14:33:02 -0600
Feeling from today's clm-cmt meeting is that, at least for now, we may just make use of the runtime output for this purpose. We think there's already something like this; it may just be a matter of cleaning up this output to be easily greppable (e.g., one line per variable).
But this depends somewhat on what the purpose is: e.g., the runtime output can't tell you what file the field is defined in (need to do a later grep for that), or the association between variable names in the code and history file variable names.
So we should ask Danica what her main use case is.
from ctsm.
@danicalombardozzi I'm closing this old issue. Feel free to comment further and reopen if you'd still like something more here.
I definitely see the value in this, I'm just not sure this is high enough priority to get done in the foreseeable future... but I'm happy to hear any further thoughts you may have.
from ctsm.
It seems like this is still wanted, e.g., for #941 . I still feel that the best way to accomplish this is to run a short case in the desired configuration and then either parse the log file output (which may require tweaking that output to make it greppable and possibly adding some additional information in the output) or possibly pull it off of the header information from a history file (probably in conjunction with #29 ). The old findHistFields.pl script (which can give you this information without running a case) seems like a maintenance issue, for example requiring code to handle each set of dynamically-generated history field names, of which we have more and more – for CN Product pools, water isotopes, etc – so I suggest ditching that and coming up with something new.
We could potentially (ab)use the system test infrastructure to write a python-based system test that runs a short case with any appropriate namelist flags set then parses the output into the correct format. This wouldn't need to be part of any test suite, but would allow us to generate the desired history file list with a single create_test command.
Blocks #941 .
from ctsm.
modify the
hist_printflds
Fortran subroutine or make a new subroutine like it, so that: If a given namelist flag is set, then it opens a new file for output and outputs the field list in an appropriate format – maybe even directly in the format of a restructuredText table.
I have the code generating the new text file and am evaluating the outcome with this test:
ERP_D_Ld5.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-allActive
Before I format as a restructuredText table, I would like to request feedback (@billsacks @wwieder @danicalombardozzi @dlawrenncar @katiedagon ) on the type of information that we should include in the table. Here's a list of options from a sample variable appearing in the file:
VALUE --- VARIABLE NAME AND/OR DESCRIPTION
1234
(history field number; this happens to be the last var in the file generated by this test)
LATBASET
(name 64 char)
latitude vary base temperature for gddplant
(long_name 199 char)
degree C
(units 199 char)
pft
pft
unset
(type1d 16 char, type1d_out 16 char, type2d 16 char)
1
1
1234
(numdims, num2d, hpindex)
unity
unity
unity
(p2c_scale_type 32 char, c2l_scale_type 32 char, l2g_scale_type 32 char)
A A A A A A A A A A
(avgflag(:) I haven't looked into why this is an array)
from ctsm.
The clm4.5 table of history fields includes only name
, long_name
, and units
.
from ctsm.
Related Issues (20)
- B1850 compsets are failing cesm2_3_alpha17d and cesm2_3_alpha17e HOT 6
- Improve robustness to crop growing seasons longer than 365 days
- Remove hard-coded /glade/campaign reference in generate_gdds.py
- Add option to NOT set the dust-emission drv_flds_in settings when coupled to CAM HOT 4
- Balance checks not turned on for CLM-DART simulations HOT 3
- Subset a 0.05x0.05 surface dataset for CONUS
- subset_data is broken HOT 4
- Create "super sparse" grid to investigate a new spinup approach for CTSM HOT 7
- Failures in build-namelist_test.pl HOT 9
- Python system tests fails in a CESM checkout HOT 2
- Urban time-varying data doesn't broadcast the mapping algorithm
- build-namelist_test.pl should download files from SVN repo if needed
- Update documentation for git-fleximod HOT 1
- Remove manage_externals stuff from run_sys_tests
- Move our testing from POP masks to MOM masks (mt232) HOT 1
- Some links in User's Guide sidebar are broken HOT 2
- Going to a CISM active test for a processor change test (PEM), causes answers to change... HOT 2
- Images missing from User's Guide/Technical Note HOT 2
- Failing ne0CONUSne30x8_ne0CONUSne30x8_mt12 in CESM testing HOT 3
- Error in CAM for a CAM4/CAM5 test HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctsm.