-
Notifications
You must be signed in to change notification settings - Fork 145
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
Feature request: routine to read a table of state variables from namelist #448
Comments
Hardcoded verify_variable_mod that works with state_variables in a list
Changed verify_variables to not read state_variables as a list, then output a table. Instead, it reads state_variables as a table. Also simplified structure and removed logic for alternate 5 row input.
https://github.com/Benjamin-Gunn/DART/tree/state-variable-namelist Skeleton program moved to my fork: https://github.com/hkershaw-brown/DART/tree/state-variable-namelist |
Ben J. has a pull request on this also |
Generic routine now available in default_model_mod.f90 on the state_vars_namelist branch - DART/models/utilities/default_model_mod.f90 Line 299 in 0764fc2
Initial questions:
EX (tiegcm): DART/models/tiegcm/model_mod.f90 Lines 942 to 947 in 1b76f3a
|
I believe the default_model_mod is the best location for this routine. Here is why:
removing the extra fields:
with
? Also this routine is ripe for a unit test, can you throw a unit test in |
@hkershaw-brown Added a basic unit test to the DART-tests repo on the main branch and to the state_vars_namelist branch on the DART repo |
ok next question, what do you think of the name 'verify_state_variables'? |
and next next question, unit test, |
This was actually something I was going to ask you. It's not horrible, but I feel the subroutine is more about reading the namelist item into a table than it is about the verifying. Maybe a name that says both? Like I think it could be good to mention the namelist in the subroutine name as well, but |
Yep this is on my to-do list |
On branch state_vars_namelist:
|
Use case
reading a table of state variables from a namelist, there are several of these in various model_mods (not including Lanai only models):
parse_variable_table
verify_variables verify_variables
vertify_variables
verify_state_variables
verify_state_variables
verify_state_variables
verify_state_variables
fill_dart_kinds_table
Every time a new model is added to DART, we get a variation on one of these routines.
Is your feature request related to a problem?
Code repetition and all the associated problems that come with that.
vtablenamelength
is in types_mod. This is one of several non-types in types_modDART/assimilation_code/modules/utilities/types_mod.f90
Lines 24 to 26 in 16595ca
Describe your preferred solution
Generalize the routine:
netcdf variable name, dart qty, update
Describe any alternatives you have considered
Define the state outside the model_mod
The text was updated successfully, but these errors were encountered: