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

Failed to create a case in CESM2 using out-of-box machine

Hi all,

I'm trying to create a case using CESM2 after editing config_machines.xml and config_compilers.xml files to use an out-of-box machine 'gadi'. I tried to create a case using:
./create_newcase --case /g/data/y99/dd7103/CESM2/case/Test --compset FHIST --res f09_f09_mg17

I don't understand the xml.etree.ElementTree.ParseError I got. Can anyone please suggest how to resolve this?

Compset specification file is /home/561/dd7103/CESM2/CESM/cime/../components/cam//cime_config/config_compsets.xml
Compset forcing is Historic transient
ATM component is CAM cam6 physics:
LND component is clm5.0:Satellite phenology:
ICE component is Sea ICE (cice) model version 5 :prescribed cice
OCN component is DOCN prescribed ocean mode
ROF component is MOSART: MOdel for Scale Adaptive River Transport
GLC component is cism2 (default, higher-order, can run in parallel):cism ice evolution turned off (this is the standard configuration unless you're explicitly interested in ice evolution):
WAV component is Stub wave component
ESP component is
Pes specification file is /home/561/dd7103/CESM2/CESM/cime/../components/cam//cime_config/config_pes.xml
Compset specific settings: name is RUN_STARTDATE and value is 1979-01-01
Compset specific settings: name is SSTICE_DATA_FILENAME and value is $DIN_LOC_ROOT/atm/cam/sst/sst_HadOIBl_bc_0.9x1.25_1850_2017_c180507.nc
Compset specific settings: name is SSTICE_GRID_FILENAME and value is $DIN_LOC_ROOT/share/domains/domain.ocn.fv0.9x1.25_gx1v7.151020.nc
Compset specific settings: name is SSTICE_YEAR_END and value is 2016
Compset specific settings: name is RUN_TYPE and value is hybrid
Compset specific settings: name is RUN_REFCASE and value is f.e20.FHIST.f09_f09.cesm2_1.001_v2
Compset specific settings: name is RUN_REFDATE and value is 1979-01-01
Compset specific settings: name is RUN_REFDIR and value is cesm2_init
Traceback (most recent call last):
File "./create_newcase", line 218, in <module>
_main_func(__doc__)
File "./create_newcase", line 213, in _main_func
input_dir=input_dir, driver=driver, workflowid=workflow)
File "/home/561/dd7103/CESM2/CESM/cime/scripts/Tools/../../scripts/lib/CIME/case/case.py", line 1448, in create
input_dir=input_dir, driver=driver, workflowid=workflowid)
File "/home/561/dd7103/CESM2/CESM/cime/scripts/Tools/../../scripts/lib/CIME/case/case.py", line 813, in configure
machobj = Machines(machine=machine_name)
File "/home/561/dd7103/CESM2/CESM/cime/scripts/Tools/../../scripts/lib/CIME/XML/machines.py", line 36, in __init__
GenericXML.__init__(self, infile, schema)
File "/home/561/dd7103/CESM2/CESM/cime/scripts/Tools/../../scripts/lib/CIME/XML/generic_xml.py", line 57, in __init__
self.read(infile, schema)
File "/home/561/dd7103/CESM2/CESM/cime/scripts/Tools/../../scripts/lib/CIME/XML/generic_xml.py", line 87, in read
self.read_fd(fd)
File "/home/561/dd7103/CESM2/CESM/cime/scripts/Tools/../../scripts/lib/CIME/XML/generic_xml.py", line 112, in read_fd
self.tree = ET.parse(fd)
File "/usr/lib64/python3.6/xml/etree/ElementTree.py", line 1196, in parse
tree.parse(source, parser)
File "/usr/lib64/python3.6/xml/etree/ElementTree.py", line 597, in parse
self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: junk after document element: line 211, column 2


When I checked the line 211 in ElementTree.py, it contains this function:
def __bool__(self):
warnings.warn(
"The behavior of this method will change in future versions. "
"Use specific 'len(elem)' or 'elem is not None' test instead.",
FutureWarning, stacklevel=2
)
return len(self._children) != 0 # emulate old behaviour, for now

Thanks!
 

jedwards

CSEG and Liaisons
Staff member
It looks like you have an error in config_machines.xml, this is usually caught by xmllint. emacs has a mode called nxml that will check that the file is valid.
 
Hi Edwards,
Thanks for your reply!
I could solve that issue and create a case. But when I try to setup the case using ./case.setup I receive this error:

ERROR: Variable SUPPORTS_CXX is set ambiguously in config_build.xml. Check the file for these conflicting settings:
1: {}
2: {}

Do you have any idea why?
 
Hi Edwards,

Running ./case.setup again solves that problem (I don't know how).

But when I run
./check_input_data --download I get
AttributeError: 'NoneType' object has no attribute 'getfile'

I checked: wget --no-check-certificate --user anonymous --password user@example.edu --spider ftp://ftp.cgd.ucar.edu/cesm/inputdata
This seems to work.

I'm enclosing here the error message for ./check_input_data and for wget commands as txt files.
Please let me know how to solve this issue and build the case.
Thanks!
 

Attachments

  • check_input_data.txt
    15.4 KB · Views: 6
  • wget.txt
    909 bytes · Views: 3
Hi Edwards,

Thanks for your reply!
When I tried to build the case, I get the error:
ERROR: /home/561/dd7103/CESM2/CESM/cime/src/build_scripts/buildlib.pio FAILED, cat /g/data/y99/dd7103/CESM2/Test/bld/pio.bldlog.200521-074345

I checked the log file. The error I get is:
ERROR: CIME models require NETCDF in PIO build
I did include the netcdf path in the config_machine.xml and I'm using intel compiler and haven't changed anything in config_compiler.xml. Do I need to change something there?

I'm including here the config_machine.txt and the log file. Can you please have a look?
Thanks!
 

Attachments

  • pio_buildlog.txt
    45.3 KB · Views: 7
  • config_machine.txt
    2.3 KB · Views: 16

jedwards

CSEG and Liaisons
Staff member
Could NOT find NetCDF_Fortran you need to install the netcdf fortran build, it's easiest if you put it in the same path as the c libraries.
 
Could NOT find NetCDF_Fortran you need to install the netcdf fortran build, it's easiest if you put it in the same path as the c libraries.
Hi Edwards,

Thank you for your reply!
I could solve that issue and build the case.
But I still get the same " AttributeError: 'NoneType' object has no attribute 'getfile' " when I submit the case.
The input files are missing. Please have a look at the txt file containing the complete message.

I contacted the help desk at my university. They are facing the similar problem in downloading the data.
Can you please suggest what should I do next?

Thanks!
 

Attachments

  • case_submit_error.txt
    19.8 KB · Views: 7

jedwards

CSEG and Liaisons
Staff member
Try reordering the download schemes in file config_inputdata.xml the first scheme in the file should be the first one attempted.
 
Try reordering the download schemes in file config_inputdata.xml the first scheme in the file should be the first one attempted.
Hi Edwards,
Thanks a lot for your reply!

The order seemed to be fine.
I added a trailing slash at the end of input file and was able to download the input files in my first case. But when I tried to create another case I get the same error (I don't understand why the case was successfully created once and then fails thereafter).

I'm attaching the config_inputdata.xml and error message.
Can you please have a look and help me detect the issue?
 

Attachments

  • submit_message.txt
    6.3 KB · Views: 10
  • config_inputdata.txt
    1.4 KB · Views: 13

jedwards

CSEG and Liaisons
Staff member
This is a very strange path string: cisminputfile = '/g/data/y99//opt/Modules/v4.3.0/init/profile.sh{USER}/CESM2/inputs/glc/cism/Greenland/glissade/init/greenland_4km_epsg3413_c171126.nc'
I see from above that you have /g/data/$PROJECT/$USER/CESM2/inputs
It seems that the PROJECT is not resolving to a path.
 
Top