Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Problem with xmlchange

Hi,

I am working with cesm1_2_beta02

I am attempting to change an xml variable (ROF_GRID), and I get the following buggy-seeming error (note, test of single/double quotes):

bash-4.1$ xmlchange ROF_GRID='null'
ERROR: UNSET is not a valid value for parameter ROF_GRID: valid values are rx1,r01,r05,null
bash-4.1$ xmlchange ROF_GRID=null
ERROR: UNSET is not a valid value for parameter ROF_GRID: valid values are rx1,r01,r05,null
bash-4.1$ xmlchange ROF_GRID="null"
ERROR: UNSET is not a valid value for parameter ROF_GRID: valid values are rx1,r01,r05,null

Then, in trying to change another xml variable, I get sent back to the ROF_GRID error.

bash-4.1$ xmlchange STOP_N=2
ERROR: UNSET is not a valid value for parameter ROF_GRID: valid values are rx1,r01,r05,null

Any ideas, or has anyone run into this issue before? Thanks,

 

mai

Member
I usually run an xmlchange commands with quite different-looking arguments. For example:

xmlchange -file env_run.xml -id DOUT_L_MS -val TRUE
 

jedwards

CSEG and Liaisons
Staff member
Hi Jeremy,

I tried this with the latest repository code and then went back and tried again with the cesm1_2_beta02 code and could not reproduce your problem. The syntax of your arguments to xmlchange is correct so I'm not sure why you would get these errors. Would it be possible for you to provide to me the steps you followed to produce this problem? Thanks,
 
Here is the command (note I am setting up a new resolution here, which may somehow result via the CESM scripting to ROF_GRID being set to 'UNSET'). Note, I don't even have to call xmlchange for this error to manifest. I suspect xmlchange is being called from somewhere within ./cesm_setup or a lower script, which perhaps then calls a further set of scripts which check all xml variables for legal options, and produce an error when it it finds ROF_GRID = 'UNSET'.

$CCSMRoot/scripts/create_newcase -case $D/$CaseName -compset I1850 -res wr50a_wr50a -grid_file $D/wr50a_grid_file.xml -mach yellowstone

cd $CaseName
./cesm_setup

Error received:

ERROR: UNSET is not a valid value for parameter ROF_GRID: valid values are rx1,r01,r05,null

Note, I am currently circumventing this by manually using sed to replace the 'UNSET' string with 'NULL', to avoid using xmlchange at all.
 

sacks

Bill Sacks
CSEG and Liaisons
Staff member
Hi Jeremy,

I believe that your immediate problem can be solved by including ROF_GRID in your grid file that describes the new grid. This is a relatively new requirement, so if you were copying some older notes (from me?) then that might not have been there. See scripts/ccsm_utils/Case.template/config_grid.xml for examples.

I agree, though, that this general behavior seems buggy - or at least not terribly helpful to users.
 
Top