Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail to recompile with toggle "three_phase" off #39

Open
JosephSalaris opened this issue Apr 15, 2023 · 4 comments
Open

fail to recompile with toggle "three_phase" off #39

JosephSalaris opened this issue Apr 15, 2023 · 4 comments
Labels

Comments

@JosephSalaris
Copy link

Hi,

After installing, UCLCHEM with everything default works fine.

I want to exclude bulk ice chemistry for starters. Setting the three_phase toggle to False in usersettings.yaml and executing MakeRates.py spits some warnings, but works. Then trying to recompile I get an error. Compiling from src/fortran_src as recommended in the docs, the error looks like this:


(uclcenv) CN09:/vol/thchem/jsalaris/UCLCHEM/src/fortran_src $ make python
gfortran -O3 -fPIC -ffree-line-length-0 -c chemistry.f90
chemistry.f90:176:49:

176 | abund(nBulk,dstep)=sum(abund(bulkList,dstep))
| 1
Error: Symbol ‘bulklist’ at (1) has no IMPLICIT type
make: *** [Makefile:40: chemistry.o] Error 1

Any idea why I get this error and how I can fix it?

I am using:

uclchem-3.2.0
python-3.9.16
pip 22.2.2
numpy 1.22.3

@GijsVermarien
Copy link
Member

Hi Joseph! Thank you for your message, I have encountered this issue too at some point but hadn't made an issue out of it yet. In the refactoring of UCLCHEM from two to three phases we might have introduced some two phase cases that stopped working. Possibly you can work with the three-phase model for now?

I will mark it as a bug for now, and we will try to pick it up as soon as possible.

@GijsVermarien
Copy link
Member

The problem seems to be that we never check for the scenario where bulklist is not defined in chemistry.f90 when recomputing the bulk and surface:

abund(nBulk,dstep)=sum(abund(bulkList,dstep))

@JosephSalaris
Copy link
Author

Hi Gijs,

Just realized that we came in contact before! And thanks for the quick response!

Ok, good to know that it is not just me. Three phase model would not be ideal for me, as I would like to model the grain chemistry with another program. In fact, I would like to use UCLCHEM solely for gas phase chemistry with only freeze out on the grains.

@GijsVermarien
Copy link
Member

Hi Joseph, I think you could still use UCLCHEM for this! If you were to remove all the grain reactions (see this file for the defaults: https://github.com/uclchem/UCLCHEM/blob/main/Makerates/inputFiles/default_grain_network.csv), you would just obtain the freezeout onto the grains. There are a few reactions you need to make sure UCLCHEM works, like the h2form reactions. But Makerates will tell you when essential reactions are missing. At the end you can just sum up the surface and bulk to get the total fractional abundances on the grain.

If you have more in depth questions about your scenario and what can be done with UCLCHEM, we can set up a Zoom call to talk about it. You know how to reach me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants