Page 1 of 1

Reading of chemistry profiles file

Posted: Sun Oct 12, 2025 9:52 pm
by sophie Lu
Dear all,

I am doing the simulation about gas chemistry for in CS9.0. When I run the model, meteo file can be read normally, but chemistry profiles file data only can be read in the third hours .

However, before when I run this case in CS8.2, all the hourly data of chemistry profile can be read. I have checked referenced source files, they are basically same. Is that any difference between this two versions or any options I need to be added in the cs_user_parameter?

I have attached my run_solver.log and chemistry file.

Thanks,
Sophie

Re: Reading of chemistry profiles file

Posted: Mon Oct 13, 2025 1:44 am
by Yvan Fournier
Hello,

I am not aware of any voluntary change in the settings. So this may be a bug. Could you post a setup.xml file so we can compare the behavior between versions here an check this ?

Best regards,

Yvan

Re: Reading of chemistry profiles file

Posted: Thu Oct 16, 2025 6:12 pm
by sophie Lu
Hi Yvan,
please see the attached cs_user_parameters.c and setup.xml.

Thanks!
Sophie

Re: Reading of chemistry profiles file

Posted: Fri Oct 17, 2025 5:03 pm
by Yvan Fournier
Hello,

The code complains it is missing some spack file. Coul you post species.spack.dat ?

Regards,

Yvan

Re: Reading of chemistry profiles file

Posted: Sat Oct 18, 2025 5:56 pm
by sophie Lu
Here are c code files and spack file.

Thank you!

Re: Reading of chemistry profiles file

Posted: Sun Oct 19, 2025 12:33 pm
by Yvan Fournier
Hello,

I think you forgot to post the files.

Regards,

Yvan

Re: Reading of chemistry profiles file

Posted: Thu Oct 23, 2025 4:42 pm
by sophie Lu
Here are c code files and spack file.

Thank you!

Re: Reading of chemistry profiles file

Posted: Thu Oct 23, 2025 8:45 pm
by sophie Lu
Hi Yvan,

I also did some tests with chemistry mode=1,2,3. Even I modified the chemical species accordingly, all of them will report error like
"
Call stack:
1: 0x2ae9a57ed7d3 <cs_f_read_chemistry_profile+0x1409> (libsaturne-9.0.so)
2: 0x2ae9a581087a <cs_atmo_fields_init0+0x35a> (libsaturne-9.0.so)
3: 0x2ae9a53acab4 <cs_f_ppiniv0+0xf1> (libsaturne-9.0.so)
4: 0x2ae9a51b8345 <cs_initialize_fields_stage_1+0x875> (libsaturne-9.0.so)
5: 0x2ae9a52c2919 <cs_time_stepping+0x339> (libsaturne-9.0.so)
6: 0x2ae9a4e1557b <main+0x74b> (libcs_solver-9.0.so)
7: 0x2ae9aa385555 <__libc_start_main+0xf5> (libc.so.6)
8: 0x401449 <> (cs_solver)
End of stack

Abort(1) on node 6 (rank 6 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 1) - process 6"

So I think it's still because the file cannot be read. Do you have any data example foe chemistry? I only find meteo data in SRC folder.

Thanks,
Sophie

Re: Reading of chemistry profiles file

Posted: Thu Oct 30, 2025 2:12 am
by Yvan Fournier
Hello,

The issue is due to a change in v9.0. In dimensions.f90, replacing

Code: Select all

subroutine ssh_dimensions                        ( &
    Ns, Nr, Nr_photolysis)
by:

Code: Select all

subroutine ssh_dimensions(Ns, Nr, Nr_photolysis) &
  bind(C, name='cs_f_ssh_dimensions')
Should fix the issue.

As this broke compatibility and consistency, the previous behavior (i.e. no need for "bind" option) is restored in v9.1, and I just fixed the compatibility in v9.0 (available in v9.0 git branch now, will be in next v9.0.2 bug fix release), so as to allow both options.

So you can either modify your code or upgrade to the latest bug fixes on the v9.0 git branch.

Best regards,

Yvan