forked from ESCOMP/CTSM
-
Notifications
You must be signed in to change notification settings - Fork 1
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 ESCOMP#2552 from ekluzek/dust_emiss_OO
Dust emissions moved to Object Oriented (OO) design to enable bringing in the new Dust scheme
- Loading branch information
Showing
23 changed files
with
1,680 additions
and
460 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
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
719 changes: 281 additions & 438 deletions
719
src/biogeochem/DUSTMod.F90 → src/biogeochem/DustEmisBase.F90
Large diffs are not rendered by default.
Oops, something went wrong.
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,62 @@ | ||
module DustEmisFactory | ||
!--------------------------------------------------------------------------- | ||
! | ||
! Factory to figure out whihc dust emission method to instantiate | ||
! | ||
!--------------------------------------------------------------------------- | ||
use abortutils , only : endrun | ||
use shr_log_mod , only : errMsg => shr_log_errMsg | ||
use clm_varctl , only : iulog | ||
|
||
implicit none | ||
save | ||
private | ||
! | ||
public :: create_dust_emissions ! create an object of class dust_emis_base | ||
|
||
character(len=*), parameter, private :: sourcefile = & | ||
__FILE__ | ||
|
||
contains | ||
|
||
!--------------------------------------------------------------------------- | ||
|
||
function create_dust_emissions(bounds, NLFilename) result(dust_emis) | ||
!--------------------------------------------------------------------------- | ||
! Create a dust_emission base class objecct | ||
! The method implemented depends on namelist input | ||
!--------------------------------------------------------------------------- | ||
use DustEmisBase , only : dust_emis_base_type | ||
use DustEmisZender2003, only : dust_emis_zender2003_type | ||
use clm_varctl , only : dust_emis_method | ||
use decompMod , only : bounds_type | ||
use shr_kind_mod , only : CL => shr_kind_cl | ||
implicit none | ||
! Arguments | ||
class(dust_emis_base_type), allocatable :: dust_emis | ||
type(bounds_type), intent(in) :: bounds | ||
character(len=*), intent(in) :: NLFilename | ||
! Local variables | ||
|
||
select case ( trim(dust_emis_method) ) | ||
|
||
case( "Zender_2003" ) | ||
allocate(dust_emis, source=dust_emis_zender2003_type() ) | ||
|
||
! This will be added when the Leung2023 comes in | ||
!case( "Leung_2023" ) | ||
! allocate(dust_emis, source=dust_emis_zender2003_type() ) | ||
case default | ||
write(iulog,*) 'ERROR: unknown dust_emis_method: ', dust_emis_method, & | ||
errMsg(sourcefile, __LINE__) | ||
call endrun( "Unrecognized dust_emis_method" ) | ||
|
||
end select | ||
|
||
call dust_emis%Init(bounds, NLFilename) | ||
|
||
end function create_dust_emissions | ||
|
||
!--------------------------------------------------------------------------- | ||
|
||
end module DustEmisFactory |
Oops, something went wrong.