Skip to content

Commit

Permalink
Add empty constructors for snow cover fraction types
Browse files Browse the repository at this point in the history
This fixes the error on cheyenne_intel related to trying to allocate an
array (n_melt) that is already allocated.
  • Loading branch information
billsacks committed Jul 30, 2019
1 parent d17ba01 commit fe169f7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/biogeophys/SnowCoverFractionMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ end function FracSnowDuringMelt_Interface
procedure, private :: ReadParamsNY07
end type snow_cover_fraction_ny07_type

interface snow_cover_fraction_ny07_type
module procedure ConstructorNY07
end interface snow_cover_fraction_ny07_type

type, extends(snow_cover_fraction_type) :: snow_cover_fraction_clm5_type
! This implements the CLM5 parameterization of snow cover fraction
private
Expand All @@ -147,6 +151,10 @@ end function FracSnowDuringMelt_Interface
procedure, private :: SetDerivedParametersClm5
end type snow_cover_fraction_clm5_type

interface snow_cover_fraction_clm5_type
module procedure ConstructorClm5
end interface snow_cover_fraction_clm5_type

character(len=*), parameter, private :: sourcefile = &
__FILE__
contains
Expand Down Expand Up @@ -206,6 +214,11 @@ end function CreateAndInitScfMethod
! Methods for N&Y07 (Niu & Yang 2007) parameterization
! ========================================================================

function ConstructorNY07()
type(snow_cover_fraction_ny07_type) :: ConstructorNY07
! DO NOTHING (simply return a variable of the appropriate type)
end function ConstructorNY07

!-----------------------------------------------------------------------
subroutine InitNY07(this, bounds, col, glc_behavior, NLFilename, params_ncid)
!
Expand Down Expand Up @@ -395,6 +408,11 @@ end function FracSnowDuringMeltNY07
! Methods for CLM5 parameterization
! ========================================================================

function ConstructorClm5()
type(snow_cover_fraction_clm5_type) :: ConstructorClm5
! DO NOTHING (simply return a variable of the appropriate type)
end function ConstructorClm5

!-----------------------------------------------------------------------
subroutine InitClm5(this, bounds, col, glc_behavior, NLFilename, params_ncid)
!
Expand Down

0 comments on commit fe169f7

Please sign in to comment.