-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #507 from AlfredMayhew/custom_functions
Specifying Custom FORTRAN Functions in the Mechanism
- Loading branch information
Showing
75 changed files
with
4,964 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# Ignore auto-generated mechanism files in this directory | ||
mechanism.* | ||
customRateFuncs.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
! ----------------------------------------------------------------------------- | ||
! | ||
! Copyright (c) 2009 - 2012 Chris Martin, Kasia Boronska, Jenny Young, | ||
! Peter Jimack, Mike Pilling | ||
! | ||
! Copyright (c) 2017 Sam Cox, Roberto Sommariva | ||
! | ||
! Copyright (c) 2023 Alfred Mayhew | ||
! | ||
! This file is part of the AtChem2 software package. | ||
! | ||
! This file is covered by the MIT license which can be found in the file | ||
! LICENSE.md at the top level of the AtChem2 distribution. | ||
! | ||
! ----------------------------------------------------------------------------- | ||
! ******************************************************************** ! | ||
! ATCHEM2 -- MODULE customRateFunctions | ||
! | ||
! This module contains user-defined functions that can be referenced | ||
! in the mechanism file | ||
! ******************************************************************** ! | ||
module custom_functions_mod | ||
implicit none | ||
|
||
contains | ||
|
||
!Define your functions here. | ||
|
||
end module custom_functions_mod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
tests/model_tests/env_model_1/configuration/customRateFuncs.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
! ----------------------------------------------------------------------------- | ||
! | ||
! Copyright (c) 2009 - 2012 Chris Martin, Kasia Boronska, Jenny Young, | ||
! Peter Jimack, Mike Pilling | ||
! | ||
! Copyright (c) 2017 Sam Cox, Roberto Sommariva | ||
! | ||
! Copyright (c) 2023 Alfred Mayhew | ||
! | ||
! This file is part of the AtChem2 software package. | ||
! | ||
! This file is covered by the MIT license which can be found in the file | ||
! LICENSE.md at the top level of the AtChem2 distribution. | ||
! | ||
! ----------------------------------------------------------------------------- | ||
! ******************************************************************** ! | ||
! ATCHEM2 -- MODULE customRateFunctions | ||
! | ||
! This module contains user-defined functions that can be referenced | ||
! in the mechanism file | ||
! ******************************************************************** ! | ||
module custom_functions_mod | ||
implicit none | ||
|
||
contains | ||
|
||
!Define your functions here. | ||
|
||
end module custom_functions_mod |
29 changes: 29 additions & 0 deletions
29
tests/model_tests/env_model_2/configuration/customRateFuncs.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
! ----------------------------------------------------------------------------- | ||
! | ||
! Copyright (c) 2009 - 2012 Chris Martin, Kasia Boronska, Jenny Young, | ||
! Peter Jimack, Mike Pilling | ||
! | ||
! Copyright (c) 2017 Sam Cox, Roberto Sommariva | ||
! | ||
! Copyright (c) 2023 Alfred Mayhew | ||
! | ||
! This file is part of the AtChem2 software package. | ||
! | ||
! This file is covered by the MIT license which can be found in the file | ||
! LICENSE.md at the top level of the AtChem2 distribution. | ||
! | ||
! ----------------------------------------------------------------------------- | ||
! ******************************************************************** ! | ||
! ATCHEM2 -- MODULE customRateFunctions | ||
! | ||
! This module contains user-defined functions that can be referenced | ||
! in the mechanism file | ||
! ******************************************************************** ! | ||
module custom_functions_mod | ||
implicit none | ||
|
||
contains | ||
|
||
!Define your functions here. | ||
|
||
end module custom_functions_mod |
29 changes: 29 additions & 0 deletions
29
tests/model_tests/env_model_3/configuration/customRateFuncs.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
! ----------------------------------------------------------------------------- | ||
! | ||
! Copyright (c) 2009 - 2012 Chris Martin, Kasia Boronska, Jenny Young, | ||
! Peter Jimack, Mike Pilling | ||
! | ||
! Copyright (c) 2017 Sam Cox, Roberto Sommariva | ||
! | ||
! Copyright (c) 2023 Alfred Mayhew | ||
! | ||
! This file is part of the AtChem2 software package. | ||
! | ||
! This file is covered by the MIT license which can be found in the file | ||
! LICENSE.md at the top level of the AtChem2 distribution. | ||
! | ||
! ----------------------------------------------------------------------------- | ||
! ******************************************************************** ! | ||
! ATCHEM2 -- MODULE customRateFunctions | ||
! | ||
! This module contains user-defined functions that can be referenced | ||
! in the mechanism file | ||
! ******************************************************************** ! | ||
module custom_functions_mod | ||
implicit none | ||
|
||
contains | ||
|
||
!Define your functions here. | ||
|
||
end module custom_functions_mod |
29 changes: 29 additions & 0 deletions
29
tests/model_tests/env_model_4/configuration/customRateFuncs.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
! ----------------------------------------------------------------------------- | ||
! | ||
! Copyright (c) 2009 - 2012 Chris Martin, Kasia Boronska, Jenny Young, | ||
! Peter Jimack, Mike Pilling | ||
! | ||
! Copyright (c) 2017 Sam Cox, Roberto Sommariva | ||
! | ||
! Copyright (c) 2023 Alfred Mayhew | ||
! | ||
! This file is part of the AtChem2 software package. | ||
! | ||
! This file is covered by the MIT license which can be found in the file | ||
! LICENSE.md at the top level of the AtChem2 distribution. | ||
! | ||
! ----------------------------------------------------------------------------- | ||
! ******************************************************************** ! | ||
! ATCHEM2 -- MODULE customRateFunctions | ||
! | ||
! This module contains user-defined functions that can be referenced | ||
! in the mechanism file | ||
! ******************************************************************** ! | ||
module custom_functions_mod | ||
implicit none | ||
|
||
contains | ||
|
||
!Define your functions here. | ||
|
||
end module custom_functions_mod |
29 changes: 29 additions & 0 deletions
29
tests/model_tests/firstorder/configuration/customRateFuncs.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
! ----------------------------------------------------------------------------- | ||
! | ||
! Copyright (c) 2009 - 2012 Chris Martin, Kasia Boronska, Jenny Young, | ||
! Peter Jimack, Mike Pilling | ||
! | ||
! Copyright (c) 2017 Sam Cox, Roberto Sommariva | ||
! | ||
! Copyright (c) 2023 Alfred Mayhew | ||
! | ||
! This file is part of the AtChem2 software package. | ||
! | ||
! This file is covered by the MIT license which can be found in the file | ||
! LICENSE.md at the top level of the AtChem2 distribution. | ||
! | ||
! ----------------------------------------------------------------------------- | ||
! ******************************************************************** ! | ||
! ATCHEM2 -- MODULE customRateFunctions | ||
! | ||
! This module contains user-defined functions that can be referenced | ||
! in the mechanism file | ||
! ******************************************************************** ! | ||
module custom_functions_mod | ||
implicit none | ||
|
||
contains | ||
|
||
!Define your functions here. | ||
|
||
end module custom_functions_mod |
29 changes: 29 additions & 0 deletions
29
tests/model_tests/secondorder/configuration/customRateFuncs.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
! ----------------------------------------------------------------------------- | ||
! | ||
! Copyright (c) 2009 - 2012 Chris Martin, Kasia Boronska, Jenny Young, | ||
! Peter Jimack, Mike Pilling | ||
! | ||
! Copyright (c) 2017 Sam Cox, Roberto Sommariva | ||
! | ||
! Copyright (c) 2023 Alfred Mayhew | ||
! | ||
! This file is part of the AtChem2 software package. | ||
! | ||
! This file is covered by the MIT license which can be found in the file | ||
! LICENSE.md at the top level of the AtChem2 distribution. | ||
! | ||
! ----------------------------------------------------------------------------- | ||
! ******************************************************************** ! | ||
! ATCHEM2 -- MODULE customRateFunctions | ||
! | ||
! This module contains user-defined functions that can be referenced | ||
! in the mechanism file | ||
! ******************************************************************** ! | ||
module custom_functions_mod | ||
implicit none | ||
|
||
contains | ||
|
||
!Define your functions here. | ||
|
||
end module custom_functions_mod |
29 changes: 29 additions & 0 deletions
29
tests/model_tests/spec_model_1/configuration/customRateFuncs.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
! ----------------------------------------------------------------------------- | ||
! | ||
! Copyright (c) 2009 - 2012 Chris Martin, Kasia Boronska, Jenny Young, | ||
! Peter Jimack, Mike Pilling | ||
! | ||
! Copyright (c) 2017 Sam Cox, Roberto Sommariva | ||
! | ||
! Copyright (c) 2023 Alfred Mayhew | ||
! | ||
! This file is part of the AtChem2 software package. | ||
! | ||
! This file is covered by the MIT license which can be found in the file | ||
! LICENSE.md at the top level of the AtChem2 distribution. | ||
! | ||
! ----------------------------------------------------------------------------- | ||
! ******************************************************************** ! | ||
! ATCHEM2 -- MODULE customRateFunctions | ||
! | ||
! This module contains user-defined functions that can be referenced | ||
! in the mechanism file | ||
! ******************************************************************** ! | ||
module custom_functions_mod | ||
implicit none | ||
|
||
contains | ||
|
||
!Define your functions here. | ||
|
||
end module custom_functions_mod |
45 changes: 45 additions & 0 deletions
45
tests/model_tests/spec_model_func/configuration/customRateFuncs.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
! ----------------------------------------------------------------------------- | ||
! | ||
! Copyright (c) 2009 - 2012 Chris Martin, Kasia Boronska, Jenny Young, | ||
! Peter Jimack, Mike Pilling | ||
! | ||
! Copyright (c) 2017 Sam Cox, Roberto Sommariva | ||
! | ||
! Copyright (c) 2023 Alfred Mayhew | ||
! | ||
! This file is part of the AtChem2 software package. | ||
! | ||
! This file is covered by the MIT license which can be found in the file | ||
! LICENSE.md at the top level of the AtChem2 distribution. | ||
! | ||
! ----------------------------------------------------------------------------- | ||
! ******************************************************************** ! | ||
! ATCHEM2 -- MODULE customRateFunctions | ||
! | ||
! This module contains user-defined functions that can be referenced | ||
! in the mechanism file | ||
! ******************************************************************** ! | ||
module custom_functions_mod | ||
implicit none | ||
|
||
contains | ||
|
||
! ----------------------------------------------------------------- | ||
! Calculates the rate of KMT15 | ||
pure function calcKMT15( t, m ) result ( KMT15 ) | ||
real*8, intent(in) :: t, m | ||
real :: K150, K15I, KR15, FC15, NC15, F15 | ||
real :: KMT15 | ||
|
||
K150 = 8.6E-29 * m * (t / 300)**(-3.1) | ||
K15I = 9.0E-12 * (t / 300)**(-0.85) | ||
KR15 = K150 / K15I | ||
FC15 = 0.48 | ||
NC15 = 0.75 - 1.27 * (LOG10(FC15)) | ||
F15 = 10**(LOG10(FC15) / (1 + (LOG10(KR15) / NC15)**2)) | ||
KMT15 = (K150*K15I)*F15/(K150+K15I) | ||
|
||
return | ||
end function calcKMT15 | ||
|
||
end module custom_functions_mod |
10 changes: 10 additions & 0 deletions
10
tests/model_tests/spec_model_func/configuration/environmentVariables.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
1 TEMP 291.45 | ||
2 PRESS 950.2 | ||
3 RH 67.4 | ||
4 H2O CALC | ||
5 DEC CALC | ||
6 BLHEIGHT NOTUSED | ||
7 DILUTE NOTUSED | ||
8 JFAC NOTUSED | ||
9 ROOF OPEN | ||
10 ASA NOTUSED |
5 changes: 5 additions & 0 deletions
5
tests/model_tests/spec_model_func/configuration/initialConcentrations.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CO 4.8e+12 | ||
O3 6.11e11 | ||
NO 6.8e10 | ||
NO2 8.37e10 | ||
C2H4 2.76e+9 |
Oops, something went wrong.