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

DATM stream file error: “Bad integer for item 1 in list input” at line 332 of shr_stream_mod.F90

Jiaojiao

Jiaojiao
New Member
What version of the code are you using?
CESM2.2.2

Have you made any changes to files in the source tree?
No source code modifications.

modified configuration files
- config_machines.xml
- config_batch.xml
- config_compilers.xml:

add 4 file in CASE directory
- user_datm.streams.txt.CLMGSWP3v1.Precip
- user_datm.streams.txt.CLMGSWP3v1.Solar
- user_datm.streams.txt.CLMGSWP3v1.TPQW
- user_nl_clm

No modification was made to Fortran files or XML schema files.

Describe every step you took leading up to the problem:
1. Make the forcing inputdata by myself
clmforc.CRUJRAv2.5_0.5x0.5.TPQWL.USCRK.2014.nc
clmforc.CRUJRAv2.5_0.5x0.5.Prec.USCRK.2014.nc
clmforc.CRUJRAv2.5_0.5x0.5.Solr.USCRK.2014.nc
domain.crujra_v2.3_0.5x0.5_USCRK_c250905.nc
surfdata_USCRK_hist_2000_16pfts_c250905.nc

2.Created a CLM-FATES single-point case:
./create_newcase \
--case CRKfates3 \
--compset I2000Clm50SpGs \
--res CLM_USRDAT \
--mach forest2 \
--run-unsupported

3. ./case.setup

4../preview_namelists
1761773841479.png

5. ./case.build --skip-provenance-check
1761773944233.png

6../case.submit --batch-args="--mem=48G --parsable"
1761774021121.png

7. check case submit
1761774065285.png

Describe your problem or question:
The case subit failed....

The case run directory is: /scratch/user/jiaodong/CIME_OUTPUT/CRKfates2/run/

Key error snippet from cesm.log:
At line 332 of file /scratch/user/jiaodong/CESM1016_2.2.2/cime/src/share/streams/shr_stream_mod.F90 (unit = 97, file = 'datm.streams.txt.CLMGSWP3v1.Solar')
Fortran runtime error: Bad integer for item 1 in list input

Error termination. Backtrace:
#0 0x15261b4de458 in read_integer
at ../../../libgfortran/io/list_read.c:1099
#1 0x15261b4e1139 in list_formatted_read_scalar
at ../../../libgfortran/io/list_read.c:2171
#2 0xb48525 in ???
#3 0xb28767 in ???
#4 0x4b7ad0 in ???
#5 0x4adb2d in ???
#6 0x427664 in ???
#7 0x417aea in ???
#8 0x40aa85 in ???
#9 0x15261a9137e4 in ???
#10 0x40ac0d in ???
#11 0xffffffffffffffff in ???
--------------------------------------------------------------------------
Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

Process name: [[11948,1],0]
Exit code: 2

--------------------------------------------------------------------------


I attached the three different types file zip:
1) OUTPUT_run: the case output file from /scratch/user/jiaodong/CIME_OUTPUT/$CASE/run\
2) datm: DATM file in $CASE directory
3) subset_USCRK_2000: the forcing files



Any suggestions on how to debug the Fortran input reading or validate the stream file format would be very helpful.

Best
Jiaojiao
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I don't see any attached files, but since the error is pointing to your changed datm.streams.txt.CLMGSWP3v1.Solar file, I'd suggest comparing that to one that is generated by default.
 

Jiaojiao

Jiaojiao
New Member
Sorry Keith, my mistake, I attached the datm files this time.
And I have compared the datm.streams.txt.CLMGSWP3v1.Solar file in "/scratch/user/jiaodong/CESM1016_2.2.2/cime/scripts/CRKfates2/Buildconf/datmconf/" and in /scratch/user/jiaodong/CIME_OUTPUT/CRKfates2/run, they are same.
 

Jiaojiao

Jiaojiao
New Member
Just txt files can upload, sorry, i modified the format of these files!
 

Attachments

  • cesm.log.16935475.251029-164006.txt
    8.9 KB · Views: 0
  • user_nl_datm.txt
    1.4 KB · Views: 0
  • datm.streams.txt.CLMGSWP3v1.TPQW.txt
    879 bytes · Views: 1
  • datm.streams.txt.CLMGSWP3v1.Solar.txt
    793 bytes · Views: 1
  • datm.streams.txt.CLMGSWP3v1.Precip.txt
    785 bytes · Views: 2

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Thanks. These should show up in your datm_in, not your datm.streams files:

<tintalgo>nearest</tintalgo>
<taxmode>cycle</taxmode>
<yearFirst>2014</yearFirst>
<yearLast>2014</yearLast>
 

Jiaojiao

Jiaojiao
New Member
Thanks. These should show up in your datm_in, not your datm.streams files:

<tintalgo>nearest</tintalgo>
<taxmode>cycle</taxmode>
<yearFirst>2014</yearFirst>
<yearLast>2014</yearLast>
Hi Keith,

Sorry to bother you again. I found something that might be related to the runtime error I reported earlier (“Bad integer for item 1 in list input”).

In my case, the datamode shown in datm_in is "CLMNCEP", but my configuration actually uses CLMGSWP3v1 forcing and three corresponding stream files (Solar, Precip, TPQW).


Could this mismatch between the datm mode in datm_in and the actual setting be the reason for the Fortran runtime error?

If so, could you please advise how to make the datm_in file and the real datamode (CLMGSWP3v1) consistent?

I attached the datm_in file (/scratch/user/jiaodong/CIME_OUTPUT/CRKfates2/run/datm_in)

Thank you so much for your time and help!
 

Attachments

  • 1761932244847.png
    1761932244847.png
    7.8 KB · Views: 2
  • datm_in.txt
    1.3 KB · Views: 1

Jiaojiao

Jiaojiao
New Member
Hi Keith,

Sorry to bother you again. I found something that might be related to the runtime error I reported earlier (“Bad integer for item 1 in list input”).

In my case, the datamode shown in datm_in is "CLMNCEP", but my configuration actually uses CLMGSWP3v1 forcing and three corresponding stream files (Solar, Precip, TPQW).


Could this mismatch between the datm mode in datm_in and the actual setting be the reason for the Fortran runtime error?

If so, could you please advise how to make the datm_in file and the real datamode (CLMGSWP3v1) consistent?

I attached the datm_in file (/scratch/user/jiaodong/CIME_OUTPUT/CRKfates2/run/datm_in)

Thank you so much for your time and help!
Also, should the three datm.streams.txt.CLMGSWP3v1.* files be in TXT format, or do they need to be converted to another format such as XML for this mode to work properly?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
The Fortran runtime error seems to be pointing to this section of code:

startTag = "<offset>"
endTag = "</offset>"
call shr_stream_readUpToTag(nUnit,startTag,optionalTag=.true.,rc=rCode2)
if (rCode2 == 0) then
!--- read data ---
read(nUnit,*,END=999) int
strm%offset = int
else
strm%offset = 0
end if

where line 332 is trying to read the integer for "offset" in one of your datm streams files.
What does offset look like in your datm.streams files? You can post them here again.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
In the default streams, the tags are all on separate lines, e.g.,

<offset>
0
</offset>

But I'm not sure if it matters.
Make sure you check all of your stream files (datm.streams.txt.CLMGSWP3v1.Precip, datm.streams.txt.CLMGSWP3v1.Solar, datm.streams.txt.CLMGSWP3v1.TPQW), and make sure that the offset is a "zero" and not the letter "o".
 

Jiaojiao

Jiaojiao
New Member
Thank you, Keith! I submitted a new case after modifying the three DATM files. Although it still failed, the error message has changed, so this issue seems to be resolved. I’ll work on fixing the next one...
 
Top