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

ccsm_getenv error with I_TEST_2003 in cesm1_0_4

Dear all,

I want to run a test case using the I_TEST_2003 setup in cesm1_0_4.
All compiles well, but when I want to run the model, i get the following error:

./Tools/ccsm_getenv: line 9: syntax error near unexpected token `('
./Tools/ccsm_getenv: line 9: `foreach i (env_case.xml env_run.xml env_conf.xml env_build.xml env_mach_pes.xml)'

I am not sure what is happening here; I compared the ccsm_getenv file with the one from cesm1_0_3, and there are no differences?
So I was wondering whether somebody had this error message before?

Please let me know,
kind regards,
Matthias
 

erik

Erik Kluzek
CSEG and Liaisons
Staff member
Mathias

It's NOT clear what the issue is here. The script that is failing is one that is built when you setup the case. It's clear that csh is failing on it. You might add a

set echo

to the top part of the script so it gives you more debugging information when you run it. I can run the line that fails interactively as ...

foreach i (env_case.xml env_run.xml env_conf.xml env_build.xml env_mach_pes.xml)
echo $i
end

but the error has a ` and ' in it and possibly that's screwing it up.

Good luck...
 
Thought of posting my workaround to this strange error.You will need to run the script using csh your_model.run. My guess is that the the system tries to run the csh as a normal sh script in this case.  
 
Top