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

source files for xmlquery inquiry?

Hi - I have a general question about which file(s) provide the configuration values from which xmlquery gets its values?  I specifically had an error when building the clm namelist (specifics below), which I have been able to provide a hacked solution, however would rather be able to modify the source of the value.I'm asking this question in this Forum Topic, as I'd like to know where these source values in general are speciified, so that I can apply that knowledge to any component, however I can understand if the answer is dependent upon which component is being discussed. I'm working with a developer version "cesm1_5_beta02_waccm06" and porting it to an unsupported machine, NOAA HPCS Theia.The specifics of this error in building the clm namelist are:- the value of the "-glc_smb" arguement is ".TRUE.".- namelist build fails because the lowercase argument ".true." is expected, and apparently required- the output of "./xmlquery GLC_SMB" is "GLC_SMB: TRUE".- I"ve been unable to find where this value is specified.- I was able to modify the line in the perl script "components/clm/cime_config/buildnml" that sets the output of the xmlquery to lower case, using "lc" on the output of the xmlquery command, however would really prefer to change the source value to the expected form, rather than hack the script.  Hence this post.Below is the error when the case.build script is run.  Thanks for your anticipated assitance, Roy Tue Feb 27 22:01:58 tfe05 tb.day1.0> ./case.build calling build.case_build with caseroot=/home/Henry.LeRoy.Miller/CESM-cases/cases_cesm-1.3.x/tb.day1.0Building case in directory /home/Henry.LeRoy.Miller/CESM-cases/cases_cesm-1.3.x/tb.day1.0sharedlib_only is Falsemodel_only is FalseGenerating component namelists as part of buildCreating component namelists   Running cam buildnml   Running clm buildnmlERROR: Command: '/scratch3/BMC/chimera/miller/cesmdev/CESM-sources/cesm-1.3.x/components/clm/cime_config/buildnml /home/Henry.LeRoy.Miller/CESM-cases/cases_cesm-1.3.x/tb.day1.0' failed with error 'ERROR : CLM build-namelist::CLMBuildNamelist::setup_logic_glacier() : glc_smb set to .true. does NOT agree with -glc_smb argument of .TRUE. (set with GLC_SMB env variable) ERROR clm.buildnml: /scratch3/BMC/chimera/miller/cesmdev/CESM-sources/cesm-1.3.x/components/clm/bld/build-namelist -infile /home/Henry.LeRoy.Miller/CESM-cases/cases_cesm-1.3.x/tb.day1.0/Buildconf/clmconf/namelist  -csmdata /scratch3/BMC/chimera/CESM-central/inputdata -inputdata /home/Henry.LeRoy.Miller/CESM-cases/cases_cesm-1.3.x/tb.day1.0/Buildconf/clm.input_data_list -ignore_ic_year -namelist " &clm_inparm  start_ymd=00010101  /" -no-megan -use_case 1850_glacierMEC_control -glc_present -glc_smb .TRUE.  -res 1.9x2.5  -clm_start_type default -envxml_dir /home/Henry.LeRoy.Miller/CESM-cases/cases_cesm-1.3.x/tb.day1.0 -l_ncpl 48 -lnd_frac /scratch3/BMC/chimera/CESM-central/inputdata/share/domains/domain.lnd.fv1.9x2.5_gx1v6.090206.nc -glc_nec 10 -co2_ppmv 284.7 -co2_type diagnostic  -config /home/Henry.LeRoy.Miller/CESM-cases/cases_cesm-1.3.x/tb.day1.0/Buildconf/clmconf/config_cache.xml -bgc bgc failed: 65280' 
 

jedwards

CSEG and Liaisons
Staff member
That variable is defined in components/cism/cime_config/config_component.xml, in your case it's in file env_run.xmlI don't see where it's being set to TRUE.   I tried setting up a case with ./create_newcase --case foo --compset IG1850 --res f19_g16_gl5 --mach yellowstone --compiler inteland I get  ./xmlquery GLC_SMBenv_run.xml: GLC_SMB true 
 
interesting.  I also cannot see how it gets set to TRUE!in the file components/cism/cime_config/config_component.xml, it is specified as lower case "true"       logical    true,false    true    run_component_cism    env_run.xml    true => do surface mass balance, false => PDD, nec_glc is set to 1  It is also specified as lower case "true" in the case env_run.xml file.  Here is what I get when using grep on env_run.xml, and the results of the xmlquery command. Wed Feb 28 19:36:08 tfe05 tb.day1.0> grep GLC_SMB env_run.xml     Wed Feb 28 19:36:24 tfe05 tb.day1.0> ./xmlquery GLC_SMBGLC_SMB: TRUEWed Feb 28 19:36:42 tfe05 tb.day1.0>  the change I made to proceed past the error was to modify a line in the components/clm/cime_config/buildnml script, as shown below.  This allowed the build of the clm namelist to proceed past the error and presumably build the namelist.  From the modified buildnml:# this returns upper case "TRUE", and fails check against lower case "true"#my $GLC_SMB             = `./xmlquery  GLC_SMB             -value`;my $GLC_SMB= lc `./xmlquery  GLC_SMB  -value`;  as you can see, all I did was apply the perl lowercase command "lc" to the output of the xmlquery. strange!
 
Top