Upgrade macro command "self.remove_setting" intermittently not working? #612
Replies: 1 comment 2 replies
-
|
OK so I thought I'd investigate by trying to upgrade one of the apps where the Then I attempted to upgrade it "by-hand": This fails, with the following output: What's baffling is that the error is to-do with the setting I think what's happened here is that the last macro in Is this a known issue on the trunk, and I need to upgrade to a slightly later revision of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
In my PR: MetOffice/lfric_apps#406
Among other things, I've attempted to tidy-up some variable-names in the "cloud" namelist, to name the multi-option switches consistently (e.g. dropping the preceding
i_in the variable-names, which apparently is a UM-ism that's now frowned-upon!)To change the name of a namelist variable, one simply needs to make an upgrade macro which reads the existing value, deletes the existing variable, and adds a new one with the new name but the same value as before. I've done this in versions.py, from L64.
When I run the
apply_macros.pyscript with this macro and the consistent branch meta-data, all the approse-app.conffiles seem to have the new variable names added, but in a seemingly random selection of them the old variable names don't seem to be deleted. See the commit from runningapply_macros.pyin my test branch: MetOffice/lfric_apps@011f872e.g. the file: rose-stem/app/gravity_wave/rose-app.conf has fully been modified as expected including the deletion of the old variable-names
i_bm_ez_opt,i_pc2_erosion_numerics,pc2iniand the adding of the same settings with the new namesbm_ez_opt,pc2_erosion_numerics,pc2_init_method. But then if I look at rose-stem/app/jedi_forecast_pseudo/rose-app.conf, the new names have been added, but the old ones have not been deleted. Its as if the macro commandsself.remove_setting(...)have randomly worked fine for some apps, but quietly done nothing in others.Any ideas what's going on / how I can fix this?
Cheers!
Mike
Beta Was this translation helpful? Give feedback.
All reactions