ESCOMP / CTSM

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
310 stars 313 forks source link

error in mksurfdata_esmf in cesm tags #2658

Open adamrher opened 3 months ago

adamrher commented 3 months ago

Brief summary of bug

In cesm tags, the mksurfdata_esmf tools "gen_mksurfdata_namelist" gives an error that it can't find the correct ccs_config directory. It seems to think that ccs_config is located at cesm/components/clm/ccs_config/ when it's actually located at cesm/ccs_config/ in cesm tags.

General bug information

cesm3_0_beta01

Details of bug

Error message:

(npl) 1016 /glade/u/home/aherring> ./gen_mksurfdata_namelist --res ne0np4.ARCTIC.ne30x4 --start-year 1979 --end-year 1979 --model-mesh $work/grids/var-res/ne0np4.ARCTIC.ne30x4/grids/ne0ARCTICne30x4_esmf_c200727.nc --model-mesh-nx 117398 --model-mesh-ny 1
Traceback (most recent call last):
  File "/glade/campaign/cgd/amp/aherring/src/cesm3_0_beta01/components/clm/tools/mksurfdata_esmf/./gen_mksurfdata_namelist", line 34, in <module>
    main()
  File "/glade/campaign/cgd/amp/aherring/src/cesm3_0_beta01/components/clm/tools/mksurfdata_esmf/../../python/ctsm/toolchain/gen_mksurfdata_namelist.py", line 329, in main
    determine_output_mesh(res, force_model_mesh_file, input_path, rawdata_files)
  File "/glade/campaign/cgd/amp/aherring/src/cesm3_0_beta01/components/clm/tools/mksurfdata_esmf/../../python/ctsm/toolchain/gen_mksurfdata_namelist.py", line 760, in determine_output_mesh
    tree2 = ET.parse(xml_path)
            ^^^^^^^^^^^^^^^^^^
  File "/glade/u/apps/opt/conda/envs/npl/lib/python3.11/xml/etree/ElementTree.py", line 1218, in parse
    tree.parse(source, parser)
  File "/glade/u/apps/opt/conda/envs/npl/lib/python3.11/xml/etree/ElementTree.py", line 569, in parse
    source = open(source, "rb")
             ^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/glade/campaign/cgd/amp/aherring/src/cesm3_0_beta01/components/clm/cime/../ccs_config/component_grids_nuopc.xml'
wwieder commented 3 months ago

You're right @adamrher, we can't currently run mksurfdata_esmf from CESM tags. This is something we need to support for the CESM3 release