Welcome to the new DiscussCESM forum!
We are still working on the website migration, so you may experience downtime during this process.

Existing users, please reset your password before logging in here: https://xenforo.cgd.ucar.edu/cesm/index.php?lost-password/

error in producing namelist

waheed

New Member
Hello, I am new to the CESM, I am following the user Manuel to produce Macro file and then configure "Build configuration for a 'user defined' machine".
I was able to follow all the steps in env_build.xml, env_mach_pes.xml, and run_.xml.

after that, I executed ./cesm_setup from the test folder, it stoped and following errors popped up. I don't know where to start with it. May be they are two different errors or one,

Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.*)\$ENV{ <-- HERE (.*)}(.*)$/ at ~/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 1237.


syntax error at ~/drv/bld/build-namelist line 784, near "$model qw(cpl atm lnd ice ocn glc rof wav)" Can't redeclare "my" in "my" at /~/models/drv/bld/build-namelist line 787, near "my"

Global symbol "$model" requires explicit package name (did you forget to declare "my $model"?) at ~/models/drv/bld/build-namelist line 787.

ERROR: ~/cesm1_2_2/scripts/test/preview_namelists failed: 25344
 

jedwards

CSEG and Liaisons
Staff member
You are using an old and unsupported version of the model. Please consider updating to the latest cesm2.1.1 release code.
If this isn't possible, you can fix the perl issues by adding a new set of parenthesis around the qw() function so:
Code:
$model qw(cpl atm lnd ice ocn glc rof wav)
becomes
Code:
$model (qw(cpl atm lnd ice ocn glc rof wav))
 

waheed

New Member
You are using an old and unsupported version of the model. Please consider updating to the latest cesm2.1.1 release code.
If this isn't possible, you can fix the perl issues by adding a new set of parenthesis around the qw() function so:
Code:
$model qw(cpl atm lnd ice ocn glc rof wav)
becomes
Code:
$model (qw(cpl atm lnd ice ocn glc rof wav))

Hi Jedwards, Thank You for the comment, I did what you recommeneded in the previous post but however when I open the file it already had those extra brackets there as
"foreach my $group (@groups) {

if ($group =~ /component/) {

foreach my $comp ( @comps ) {

$comp =~ s/\'//g; # get rid of quotes in $comp

foreach my $model (qw(COMP_ATM COMP_LND COMP_ICE COMP_OCN COMP_GLC COMP_ROF COMP_WAV)) {

if ($self->get($model) eq $comp) {

my $groupname = $group . "_$comp";

if (($format eq "xml") || ($filename =~ m/xml/)) {

if ($xmode =~ "expert") {

$self->_write_xml2($fh, $groupname);

} else {

$self->_write_xml($fh, $groupname);

if ($group =~ 'build_component') {

# do nothing"

Just to play around with the error, I removed and went back but then errors were many as shown below like
Macros script already created ...skipping

Machine/Decomp/Pes configuration has already been done ...skipping

Running preview_namelist script

syntax error at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 490, 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 /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 491.

syntax error at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 510, near "} else"

Global symbol "$format" requires explicit package name (did you forget to declare "my $format"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 511.

Global symbol "$filename" requires explicit package name (did you forget to declare "my $filename"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 511.

Global symbol "$group" requires explicit package name (did you forget to declare "my $group"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 512.

Global symbol "$xmode" requires explicit package name (did you forget to declare "my $xmode"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 512.

Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 513.

Global symbol "$fh" requires explicit package name (did you forget to declare "my $fh"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 513.

Global symbol "$group" requires explicit package name (did you forget to declare "my $group"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 513.

Global symbol "$self" requires explicit package name (did you forget to declare "my $self"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 515.

Global symbol "$fh" requires explicit package name (did you forget to declare "my $fh"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 515.

Global symbol "$group" requires explicit package name (did you forget to declare "my $group"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 515.

Global symbol "$ccsmroot" requires explicit package name (did you forget to declare "my $ccsmroot"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 515.

Global symbol "$group" requires explicit package name (did you forget to declare "my $group"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 516.

Global symbol "$fh" requires explicit package name (did you forget to declare "my $fh"?) at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 519.

syntax error at /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm line 521, near "}"

/Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/Tools/ConfigCase.pm has too many errors.

Compilation failed in require at ./Tools/xml2env line 122.

ccsm_getenv error

ERROR: /Users/apple/Downloads/DART/cesm/cesm1_2_2/scripts/test/preview_namelists failed: 65280


Any clue where should I start from now please
 

waheed

New Member
Hi Edwards, i have fixed the issue, You were right. I have recopied a fresh copy of CESM1.2.2; which i need for DART (still figuring out why i need that version).
Thanks for the help
 
Top