forked from ESCOMP/CTSM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a barebones dust emission factory module to create a dust emissio…
…n class object to be used depending on the namelist option, need to add documentation to it
- Loading branch information
Showing
6 changed files
with
76 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
module DustEmisFactory | ||
|
||
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) | ||
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 | ||
class(dust_emis_base_type), allocatable :: dust_emis | ||
type(bounds_type), intent(in) :: bounds | ||
character(len=*), intent(in) :: NLFilename | ||
character(len=CL) :: method | ||
|
||
method = dust_emis_method | ||
|
||
select case ( trim(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: ', 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 |
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
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