Skip to content

Commit

Permalink
Merge branch 'dust_emis_mod' of github.com:ekluzek/CMEPS into dust_em…
Browse files Browse the repository at this point in the history
…is_mod

 Conflicts:
	cesm/nuopc_cap_share/shr_dust_emis_mod.F90
  • Loading branch information
ekluzek committed Apr 26, 2024
2 parents 22dd074 + e22c4ea commit 8d295a7
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions cesm/nuopc_cap_share/shr_dust_emis_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ module shr_dust_emis_mod

! public member functions
public :: shr_dust_emis_readnl ! Read namelist
public :: shr_dust_emis_init ! Initialization of dust emissions data (needed?)
public :: is_dust_emis_zender ! If Zender_2003 dust emission method is being used
public :: is_dust_emis_leung ! If Leungr_2023 dust emission method is being used
public :: is_zender_soil_erod_from_lnd ! If Zender_2003 is being used and soil eroditability is in land
public :: is_zender_soil_erod_from_land ! If Zender_2003 is being used and soil eroditability is in land
public :: is_zender_soil_erod_from_atm ! If Zender_2003 is being used and soil eroditability is in atmosphere

! public data members:
Expand Down Expand Up @@ -49,12 +48,11 @@ subroutine shr_dust_emis_readnl(mpicom, NLFilename)
integer , intent(in) :: mpicom ! MPI communicator for broadcasting all all tasks

!----- local -----
integer :: i ! Indices
integer :: unitn ! namelist unit number
integer :: ierr ! error code
logical :: exists ! if file exists or not
integer :: localPet ! Local processor rank
integer :: s_logunit
integer :: s_logunit ! Output log unit
character(*),parameter :: F00 = "('(shr_dust_emis_read) ',8a)"
character(*),parameter :: subName = '(shr_dust_emis_read) '
!-----------------------------------------------------------------------------
Expand Down Expand Up @@ -131,7 +129,7 @@ end function is_dust_emis_zender

logical function is_dust_emis_leung()
! is_dust_emis_leung – Logical function, true if the Leung 2023 scheme is being used
call check_if_initiatlized()
call check_if_initialized()
if (trim(dust_emis_method) == 'Leung_2023') then
is_dust_emis_leung = .true.
else
Expand All @@ -150,37 +148,37 @@ logical function is_zender_soil_erod_from_land()
else
is_zender_soil_erod_from_land = .false.
end if
else
else
is_zender_soil_erod_from_land = .false.
end if
end if
end function is_zender_soil_erod_from_land

!===============================================================================

logical function is_zender_soil_erod_from_atm()
!is_zender_soil_erod_from_land – Logical function, true if the Zender method is being used and soil erodibility is in CAM
!is_zender_soil_erod_from_atm – Logical function, true if the Zender method is being used and soil erodibility is in CAM
call check_if_initiatlized()
if ( is_dust_emis_zender() )then
if (trim(zender_soil_erod_source) == 'atm') then
is_zender_soil_erod_from_land = .true.
if ( trim(zender_soil_erod_source) == 'atm') then
is_zender_soil_erod_from_atm = .true.
else
is_zender_soil_erod_from_land = .false.
is_zender_soil_erod_from_atm = .false.
end if
else
is_zender_soil_erod_from_land = .false.
end if
else
is_zender_soil_erod_from_atm = .false.
end if
end function is_zender_soil_erod_from_atm

!===============================================================================

subroutine check_if_initiatlized()
subroutine check_if_initialized()
if ( dust_emis_initialized )then
return
else
call shr_sys_abort( 'ERROR: dust emission namelist has NOT been read in yet,' &
' shr_dust_emis_mod is NOT initialized '//errMsg(u_FILE_u, __LINE__ )
call shr_sys_abort( 'ERROR: dust emission namelist has NOT been read in yet,' // &
' shr_dust_emis_mod is NOT initialized '//errMsg(u_FILE_u, __LINE__) )
end if
end subroutine check_if_initiatlized
end subroutine check_if_initialized

!===============================================================================

Expand Down

0 comments on commit 8d295a7

Please sign in to comment.