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

CESM 1.2.1 new case create error

Yuanhang

Zhan-yi Zhu
New Member
Hello, everyone!

I am trying to port CESM1.2.1 to my personal computer:
<OS>LINUX</OS> (Ubuntu 20.04)
<COMPILERS>intel</COMPILERS>
However, when I created a new case, some errors occurred. I ran the following command:
yuanhang@yuanhang-Lenovo-Legion-Y7000:~/cesm1_2_1/scripts$ ./create_newcase -case test -res f19_g16 -compset X -mach userdefined
And here is the error:
syntax error at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 448, near "$model qw(COMP_ATM COMP_LND COMP_ICE COMP_OCN COMP_GLC COMP_ROF COMP_WAV)"
Global symbol "$model" requires explicit package name (did you forget to declare "my $model"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 449.
syntax error at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 468, near "} else"
Global symbol "$format" requires explicit package name (did you forget to declare "my $format"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 469.
Global symbol "$filename" requires explicit package name (did you forget to declare "my $filename"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 469.
Global symbol "$group" requires explicit package name (did you forget to declare "my $group"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 470.
Global symbol "$xmode" requires explicit package name (did you forget to declare "my $xmode"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 470.
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 471.
Global symbol "$fh" requires explicit package name (did you forget to declare "my $fh"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 471.
Global symbol "$group" requires explicit package name (did you forget to declare "my $group"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 471.
Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 473.
Global symbol "$fh" requires explicit package name (did you forget to declare "my $fh"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 473.
Global symbol "$group" requires explicit package name (did you forget to declare "my $group"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 473.
Global symbol "$group" requires explicit package name (did you forget to declare "my $group"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 474.
Global symbol "$fh" requires explicit package name (did you forget to declare "my $fh"?) at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 477.
syntax error at /home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 479, near "}"
/home/yuanhang/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm has too many errors.
Compilation failed in require at ./create_newcase line 361.
I tried to change different machines and define my own machine but the error still occurs. How should I do?
Any suggestions are appreciated.

Best wishs,
Zhanyi
 

Yuanhang

Zhan-yi Zhu
New Member
Hello!
I have met the same error. How did you solve this problem?

Thanks!
Hello!
Maybe your purl version is too new.
You can try modifying the file "ConfigCase.pm" by changing line 448 from
foreach my $model qw(COMP_ATM COMP_LND COMP_ICE COMP_OCN COMP_GLC COMP_ROP COMP_WAV)
to
foreach my $model (qw(COMP_ATM COMP_LND COMP_ICE COMP_OCN COMP_GLC COMP_ROP COMP_WAV))
Just add a pair of parentheses.
 
Top