Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
8bac008
Initial file (placeholders) for SU Volcanic Emissions
lholland-noaa Oct 15, 2024
84717da
Adding datetime utility
lholland-noaa Oct 18, 2024
caa0aee
modifications to comments
lholland-noaa Oct 18, 2024
5d2889e
Initial files to begin SU Volcanic Emissions
lholland-noaa Oct 22, 2024
98c33cc
Reorg of prepmetvars, initial reader placeholder
lholland-noaa Nov 5, 2024
7b349af
Added example volcanic file and updated code
lholland-noaa Nov 7, 2024
c17d3b8
Volcanic updates
lholland-noaa Nov 18, 2024
8ac6871
more updates
lholland-noaa Nov 18, 2024
55074ca
Updating emission reader
lholland-noaa Nov 21, 2024
b8c18b5
Updating module
lholland-noaa Nov 21, 2024
292343d
Merge branch 'feature/gocart_suv' of https://github.com/lholland-noaa…
lholland-noaa Nov 21, 2024
ec8eee4
added notes in comments
lholland-noaa Nov 22, 2024
f94fa2a
Updating cmake file to incl SUVolcanic
lholland-noaa Dec 20, 2024
2f4494e
compiles on hera, committing
lholland-noaa Jan 16, 2025
b932013
removing extraneous file
lholland-noaa Jan 17, 2025
4fb1da6
Merge branch 'develop' into feature/gocart_suv
zmoon Jan 22, 2025
50e372b
fmt
zmoon Jan 22, 2025
c7f3626
Remove unused module
zmoon Jan 22, 2025
e758e0d
correcting error in activate flag
lholland-noaa Jan 23, 2025
be3aedc
Set NLEVS before using
zmoon Feb 7, 2025
da91066
Update test_suvolcanic.F90
lholland-noaa Feb 11, 2025
22b0381
Update test_suvolcanic.F90
lholland-noaa Feb 11, 2025
73fc01e
add gocart SO2 volcanic emissions
lwcugb Mar 17, 2025
bd4a099
remove changes on ChemState module
lwcugb Mar 19, 2025
f3d8307
Fix lint error
lwcugb Mar 19, 2025
9c5997f
Try to fix floating point error
lwcugb Mar 20, 2025
3b0f4ed
add array initialization
lwcugb Mar 20, 2025
89b13b5
add assertion for the test case
lwcugb Mar 20, 2025
baaefcb
replace some pointers
lwcugb Mar 21, 2025
69dfe8a
update emission species file
lwcugb Mar 21, 2025
2441467
remove util folder and update module names
lwcugb Mar 24, 2025
892802f
rename volcanic folder
lwcugb Mar 25, 2025
774b4fe
Merge remote-tracking branch 'ufs/develop' into feature/gocart_suv
lwcugb Mar 27, 2025
3f3c87d
Merge branch 'develop' into wei-suv
zmoon Mar 27, 2025
0010198
Restore the column data extraction util
zmoon Mar 27, 2025
16bed5c
fix to use new GOCART version
lwcugb Mar 28, 2025
a110c23
pre-commit run fix
lwcugb Mar 28, 2025
ab3ce8e
update some comments
lwcugb May 1, 2025
cdb0abe
file name change
lwcugb May 1, 2025
124d71b
lowercase file name
lwcugb May 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ target_link_libraries(${_lib} PUBLIC CATChem_process_dust)
target_link_libraries(${_lib} PUBLIC CATChem_process_seasalt)
target_link_libraries(${_lib} PUBLIC CATChem_process_plumerise)
target_link_libraries(${_lib} PUBLIC CATChem_process_drydep)
target_link_libraries(${_lib} PUBLIC CATChem_process_volcanic)
target_link_libraries(${_lib} PUBLIC CATChem_process_chem)
set_target_properties(
${_lib}
Expand Down
5 changes: 5 additions & 0 deletions src/api/catchem.F90
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ module CATChem
use CCPr_DryDep_mod, only: cc_drydep_init => CCPr_DryDep_Init !< DryDep Process Initialization Routine
use CCPr_DryDep_mod, only: cc_drydep_run => CCPr_DryDep_Run !< DryDep Process Run Routine
use CCPr_DryDep_mod, only: cc_drydep_finalize => CCPr_DryDep_Finalize !< DryDep Process Finalization Routine
! SUVolcanicEmissions
use CCPr_Volcanic_mod, only: VolcanicStateType !< SUVolcanic State
use CCPr_Volcanic_mod, only: cc_volcanic_init => CCPr_Volcanic_Init !< SUVolcanicEmissions Process Initialization Routine
use CCPr_Volcanic_mod, only: cc_volcanic_run => CCPr_Volcanic_Run !< SUVolcanicEmissions Process Run Routine
use CCPr_Volcanic_mod, only: cc_volcanic_finalize => CCPr_Volcanic_Finalize !< SUVolcanicEmissions Process Finalization Routine
! Chemical mechanism solver
use CCPr_Chem_mod, only: cc_get_micm_version => get_micm_version

Expand Down
5 changes: 3 additions & 2 deletions src/core/chemstate_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ module ChemState_Mod
!! \param nSpeciesGas: The number of gas species.
!! \param nSpeciesAero: The number of aerosol species.
!! \param nSpeciesDust: The number of dust species.
!! \param nSpeicesSeaSalt: The number of sea salt species.
!! \param nSpeciesSeaSalt: The number of sea salt species.
!! \param SpeciesIndex: An array containing the total species index.
!! \param AeroIndex: An array containing the aerosol species index.
!! \param GasIndex: An array containing the gas species index.
!! \param DustIndex: An array containing the dust species index.
!! \param SeaSaltIndex: An array containing the sea salt species index.
!! \param chemSpecies: A 2-D array containing the concentration of each species.
!! \param DryDepIndex: An array containing the dry deposition species index.
!! \param SpeciesNames: A character array containing the names of the species.
!!
!! \ingroup core_modules
!!!>
Expand Down
94 changes: 94 additions & 0 deletions src/core/config_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,15 @@ SUBROUTINE Read_Input_File( Config , GridState, EmisState, ChemState, RC, Config
RETURN
ENDIF

call Config_Process_Volcanic(ConfigInput, Config, RC)
IF ( RC /= CC_SUCCESS ) THEN
errMsg = 'Error in "Config_Process_Volcanic"!'
CALL CC_Error( errMsg, RC, thisLoc )
CALL QFYAML_CleanUp( ConfigInput )
CALL QFYAML_CleanUp( ConfigAnchored )
RETURN
ENDIF


!========================================================================
! Config ChemState
Expand Down Expand Up @@ -1373,4 +1382,89 @@ SUBROUTINE Config_Process_DryDep( ConfigInput, Config, RC )
END SUBROUTINE Config_Process_DryDep


!> \brief Process Volcanic configuration
!!
!! This function processes the Volcanic configuration and performs the necessary actions based on the configuration.
!!
!! \param[in] ConfigInput The YAML configuration object
!! \param[inout] Config The configuration object
!! \param[out] RC The return code
!!
!! \ingroup core_modules
!!!>
SUBROUTINE Config_Process_Volcanic( ConfigInput, Config, RC )
USE CharPak_Mod, ONLY : StrSplit
USE Error_Mod
USE Config_Opt_Mod, ONLY : ConfigType

TYPE(QFYAML_t), INTENT(INOUT) :: ConfigInput ! YAML Config object
TYPE(ConfigType), INTENT(INOUT) :: Config ! Input options

!
! !OUTPUT PARAMETERS:
!
INTEGER, INTENT(OUT) :: RC ! Success or failure

! !LOCAL VARIABLES:
!
! Scalars
LOGICAL :: v_bool
INTEGER :: v_int
CHARACTER(LEN=1055) :: v_str

! Strings
CHARACTER(LEN=255) :: thisLoc
CHARACTER(LEN=512) :: errMsg
CHARACTER(LEN=QFYAML_StrLen) :: key

!========================================================================
! Config_Process_Volcanic begins here!
!========================================================================

! Initialize
RC = CC_SUCCESS
thisLoc = ' -> at Config_Process_Volcanic (in CATChem/src/core/config_mod.F90)'
errMsg = ''

! TODO #105 Fix reading of config file
key = "process%volcanic%activate"
v_bool = MISSING_BOOL
CALL QFYAML_Add_Get( ConfigInput, TRIM( key ), v_bool, "", RC )
IF ( RC /= CC_SUCCESS ) THEN
errMsg = 'Error parsing ' // TRIM( key ) // '!'
CALL CC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Config%volcanic_activate = v_bool


key = "process%volcanic%scheme_opt"
v_int = MISSING_INT
CALL QFYAML_Add_Get( ConfigInput, TRIM( key ), v_int, "", RC )
IF ( RC /= CC_SUCCESS ) THEN
errMsg = TRIM( key ) // 'Not Found, Setting Default to 1'
v_int = 1 ! default is one
RETURN
ENDIF
Config%volcanic_scheme = v_int

key = "process%volcanic%filedir"
v_str = MISSING_STR
CALL QFYAML_Add_Get( ConfigInput, TRIM( key ), v_str, "", RC )
IF ( RC /= CC_SUCCESS ) THEN
errMsg = 'Error parsing ' // TRIM( key ) // '!'
CALL CC_Warning( errMsg, RC, thisLoc )
ENDIF
Config%volcanic_filedir = TRIM( v_str )


write(*,*) "Volcanic Configuration"
write(*,*) '------------------------------------'
write(*,*) 'Config%volcanic_activate = ', Config%volcanic_activate
write(*,*) 'Config%volcanic_scheme = ', Config%volcanic_scheme
write(*,*) 'Config%volcanic_filedir = ', Config%volcanic_filedir
write(*,*) '------------------------------------'

END SUBROUTINE Config_Process_Volcanic

END MODULE config_mod
13 changes: 13 additions & 0 deletions src/core/config_opt_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ MODULE Config_Opt_Mod
!! - `drydep_activate` : Activate drydep process
!! - `drydep_scheme` : Scheme option for drydep process
!! - `drydep_resuspension` : Activate resuspension
!! - `volcanic_activate` : Activate Volcanic process
!! - `volcanic_scheme` : Scheme option for Volcanic process
!! - `volcanic_filedir` : File directory for Volcanic process
!!
!! \ingroup core_modules
!!!>
Expand Down Expand Up @@ -102,6 +105,11 @@ MODULE Config_Opt_Mod
INTEGER :: drydep_scheme
LOGICAL :: drydep_resuspension !< Turn on resuspension

! VolcanicEmissions Process
LOGICAL :: volcanic_activate
INTEGER :: volcanic_scheme
character(len=1055) :: volcanic_filedir

END TYPE ConfigType

CONTAINS
Expand Down Expand Up @@ -176,6 +184,11 @@ SUBROUTINE Set_Config( am_I_Root, Config, RC )
Config%drydep_scheme = 1
Config%drydep_resuspension = .FALSE.

! SU Volcanic Process
Config%volcanic_activate = .FALSE.
Config%volcanic_scheme = 1
Config%volcanic_filedir = ' '

END SUBROUTINE Set_Config
!> \brief Cleanup the Config options
!!
Expand Down
2 changes: 2 additions & 0 deletions src/core/metstate_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ MODULE MetState_Mod
! TIMESTEP
!---------
REAL(fp) :: TSTEP !< Time step [s]
INTEGER :: YMD ! Year, month, day
INTEGER :: HMS ! Hour, minute, second

! Logicals
!---------
Expand Down
2 changes: 2 additions & 0 deletions src/core/species_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module species_mod
logical :: is_gocart_aero !< if true, species is a GOCART aerosol species
logical :: is_dust !< if true, species is a dust
logical :: is_seasalt !< if true, species is a seasalt
logical :: is_suvolcanic

! Numerical properties
real(kind=fp) :: mw_g !< gaseous molecular weight
Expand All @@ -59,6 +60,7 @@ module species_mod
integer :: drydep_index !< drydep index in drydep array
integer :: photolysis_index !< photolysis index in photolysis array
integer :: gocart_aero_index !< gocart_aero index in gocart_aero array
integer :: suvolcanic_index !< drydep index in drydep array

! Concentration
real(kind=fp), ALLOCATABLE :: conc(:) !< species concentration [v/v] or kg/kg
Expand Down
1 change: 1 addition & 0 deletions src/process/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ add_subdirectory(dust)
add_subdirectory(seasalt)
add_subdirectory(plumerise)
add_subdirectory(drydep)
add_subdirectory(volcanic)
add_subdirectory(chem)
Loading