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 an empty unit tester for DUSTMod
- Loading branch information
Showing
3 changed files
with
128 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
set (pfunit_sources | ||
test_DustEmis.pf) | ||
|
||
add_pfunit_ctest(DustEmis | ||
TEST_SOURCES "${pfunit_sources}" | ||
LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) |
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,34 @@ | ||
module test_DustEmis | ||
|
||
! Tests of DustEmis | ||
|
||
use funit | ||
use DUSTMod | ||
use shr_kind_mod , only : r8 => shr_kind_r8 | ||
|
||
implicit none | ||
|
||
@TestCase | ||
type, extends(TestCase) :: TestDustEmis | ||
contains | ||
procedure :: setUp | ||
procedure :: tearDown | ||
end type TestDustEmis | ||
|
||
contains | ||
|
||
subroutine setUp(this) | ||
class(TestDustEmis), intent(inout) :: this | ||
end subroutine setUp | ||
|
||
subroutine tearDown(this) | ||
class(TestDustEmis), intent(inout) :: this | ||
end subroutine tearDown | ||
|
||
@Test | ||
subroutine check_dust_emis(this) | ||
class(TestDustEmis), intent(inout) :: this | ||
|
||
end subroutine check_dust_emis | ||
|
||
end module test_DustEmis |
88 changes: 88 additions & 0 deletions
88
src/unit_test_stubs/share_esmf/ZenderSoilErodStreamType.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,88 @@ | ||
module ZenderSoilErodStreamType | ||
|
||
!----------------------------------------------------------------------- | ||
! !DESCRIPTION: | ||
! UNIT-TEST STUB for ZenderSoilErodStreamType | ||
! | ||
! !USES | ||
use shr_kind_mod , only : r8 => shr_kind_r8, CL => shr_kind_cl | ||
use shr_log_mod , only : errMsg => shr_log_errMsg | ||
use abortutils , only : endrun | ||
use decompMod , only : bounds_type | ||
|
||
! !PUBLIC TYPES: | ||
implicit none | ||
private | ||
|
||
type, public :: soil_erod_stream_type | ||
contains | ||
|
||
! !PUBLIC MEMBER FUNCTIONS: | ||
procedure, public :: Init ! Initialize and read data in | ||
procedure, public :: CalcDustSource ! Calculate dust source spatial filter (basically truncating stream data value smaller than 0.1 following CAM's practice) based on input streams | ||
procedure, public :: UseStreams ! If streams will be used | ||
|
||
end type soil_erod_stream_type | ||
|
||
character(len=*), parameter, private :: sourcefile = & | ||
__FILE__ | ||
|
||
!============================================================================== | ||
contains | ||
!============================================================================== | ||
|
||
subroutine Init(this, bounds, NLFilename) | ||
! | ||
! Initialize the Zender soil eroditability stream object | ||
! | ||
! Uses: | ||
! | ||
! arguments | ||
implicit none | ||
class(soil_erod_stream_type) :: this | ||
type(bounds_type), intent(in) :: bounds | ||
character(len=*), intent(in) :: NLFilename ! Namelist filename | ||
! | ||
! local variables | ||
!----------------------------------------------------------------------- | ||
|
||
end subroutine Init | ||
|
||
!============================================================================== | ||
logical function UseStreams(this) | ||
! | ||
! !DESCRIPTION: | ||
! Return true if the Zender method is being used and the soil erodability | ||
! file is being used with it | ||
! | ||
! !USES: | ||
! | ||
! !ARGUMENTS: | ||
implicit none | ||
class(soil_erod_stream_type) :: this | ||
! | ||
! !LOCAL VARIABLES: | ||
UseStreams = .false. | ||
end function UseStreams | ||
|
||
!============================================================================== | ||
subroutine CalcDustSource(this, bounds, soil_erod) | ||
! | ||
! !DESCRIPTION: | ||
! Calculate the soil eroditability for the Zender dust method. | ||
! | ||
! !USES: | ||
!USES | ||
! | ||
! !ARGUMENTS: | ||
implicit none | ||
class(soil_erod_stream_type) :: this | ||
type(bounds_type) , intent(in) :: bounds | ||
real(r8) , intent(inout) :: soil_erod(bounds%begc:) ! [fraction] rock drag partition factor (roughness effect) | ||
! | ||
! !LOCAL VARIABLES: | ||
!--------------------------------------------------------------------- | ||
|
||
end subroutine CalcDustSource | ||
|
||
end module ZenderSoilErodStreamType |