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

IM6 (PFLOTRAN alquimia coupling) #5

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

bsulman
Copy link

@bsulman bsulman commented Jun 5, 2024

Code and configuration changes to enable coupling of E3SM to PFLOTRAN via the alquimia interface and EMI

Comment on lines 2968 to 2981
<entry id="ELM_USE_PFLOTRAN">
<type>logical</type>
<valid_values>TRUE,FALSE</valid_values>
<default_value>FALSE</default_value>
<group>build_component_clm</group>
<file>env_build.xml</file>
<desc>TRUE implies ELM is built with support for coupling to PFLOTRAN
through the PFLOTRAN interface. PFLOTRAN
uses the PETSc library. In order to use PFLOTRAN, CLM
must be built with PETSc support and linking to PETSc must occur
when building the ACME executable. This occurs if this variable
is set to TRUE. Note that is only available on a limited set of
machines/compilers.</desc>
</entry>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is used for Alquimia...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get a message Deprecated "arg" node detected in /home/b0u/cases/Alaska_alquimia_test_AK-BEO_ICB1850CNRDCTCBC/env_batch.xml, check files /home/b0u/models/E3SM-NGEE/cime_config/machines/config_batch.xml when doing create_newcase on cades. Has the format of this xml changed?

Comment on lines +2423 to +2453
if(actual_dt<=60.0_r8) then
! write(iulog,*),'Alquimia: Time step cut to 60 s. Attempting to solve by pausing transport and solving layer by layer'
do j=1,nlevdecomp
! Update properties from ELM
this%chem_state%porosity = porosity(j)
this%chem_state%temperature = temperature(j) - 273.15
this%chem_properties%volume = volume(j)
this%chem_properties%saturation = sat(j) ! Set minimum saturation to stop concentrations from blowing up at low soil moisture
call this%copy_ELM_to_Alquimia(j,water_density,&
aqueous_pressure,&
total_mobile,&
total_immobile,&
mineral_volume_fraction,&
mineral_specific_surface_area,&
surface_site_density,&
cation_exchange_capacity,&
aux_doubles,&
aux_ints)
call run_onestep(this,dt,num_cuts,ncuts)
call this%copy_Alquimia_to_ELM(j,water_density_tmp,&
aqueous_pressure_tmp,&
total_mobile_tmp,free_mobile_tmp,&
total_immobile_tmp,&
mineral_volume_fraction_tmp,&
mineral_specific_surface_area_tmp,&
surface_site_density_tmp,&
cation_exchange_capacity_tmp,&
aux_doubles_tmp,&
aux_ints_tmp)
enddo
endif
Copy link
Author

@bsulman bsulman Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove this block (the if actual_dt<60). I'm not sure it's in the right place and it's usually not necessary

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

Successfully merging this pull request may close these issues.

2 participants