diff --git a/src/biogeophys/TemperatureType.F90 b/src/biogeophys/TemperatureType.F90 index a256e22eb7..3771735bb7 100644 --- a/src/biogeophys/TemperatureType.F90 +++ b/src/biogeophys/TemperatureType.F90 @@ -163,10 +163,15 @@ subroutine Init(this, bounds, & logical , intent(in) :: is_simple_buildtemp ! Simple building temp is being used logical , intent(in) :: is_prog_buildtemp ! Prognostic building temp is being used real(r8) , intent(in) :: exice_init_conc_col(bounds%begc:) ! initial coldstart excess ice concentration (from the stream file) - character(len=*) , intent(in) :: NLFilename ! Namelist filename + character(len=*) , intent(in), optional :: NLFilename ! Namelist filename - call this%ReadNL(NLFilename) + if ( present(NLFilename) ) then + call this%ReadNL(NLFilename) + else ! this is needed for testing + this%excess_ice_coldstart_depth = 0.5_r8 + this%excess_ice_coldstart_temp = -5.0_r8 + endif call this%InitAllocate ( bounds ) call this%InitHistory ( bounds, is_simple_buildtemp, is_prog_buildtemp ) call this%InitCold ( bounds, & diff --git a/src/unit_test_shr/unittestDustEmisInputs.F90 b/src/unit_test_shr/unittestDustEmisInputs.F90 index 6b15680ef7..af3ad63890 100644 --- a/src/unit_test_shr/unittestDustEmisInputs.F90 +++ b/src/unit_test_shr/unittestDustEmisInputs.F90 @@ -50,6 +50,7 @@ subroutine setUp(this) character(len=5) :: NLFilename = 'none' real(r8), allocatable :: urb_em(:) + real(r8), allocatable :: exice_init_conc_col(:) integer :: begl, endl, begc, endc integer :: c type(atm2lnd_params_type) :: atm2lnd_params @@ -91,12 +92,15 @@ subroutine setUp(this) call this%frictionvel_inst%InitForTesting(bounds) allocate( urb_em(begl:endl) ) urb_em(begl:endl) = 0.99_r8 ! Arbitrary won't matter here + allocate( exice_init_conc_col(begc:endc) ) + exice_init_conc_col(begc:endc) = 0.0_r8 ! zero, so it doesn't affect anything. call this%temperature_inst%Init(bounds, & em_roof_lun=urb_em(begl:endl), & em_wall_lun=urb_em(begl:endl), & em_improad_lun=urb_em(begl:endl), & em_perroad_lun=urb_em(begl:endl), & - is_simple_buildtemp=.true., is_prog_buildtemp=.false.) + is_simple_buildtemp=.true., is_prog_buildtemp=.false., & + exice_init_conc_col = exice_init_conc_col(begc:endc)) deallocate( urb_em ) end subroutine setUp diff --git a/src/unit_test_shr/unittestWaterTypeFactory.F90 b/src/unit_test_shr/unittestWaterTypeFactory.F90 index 06362ee1d0..2d83fd0058 100644 --- a/src/unit_test_shr/unittestWaterTypeFactory.F90 +++ b/src/unit_test_shr/unittestWaterTypeFactory.F90 @@ -140,7 +140,7 @@ subroutine create_water_type(this, water_inst, & end if if (present(exice_init_conc_col)) then - SHR_ASSERT_ALL_FL((ubound(exice_init_conc_col,1) == bounds%enc), sourcefile, __LINE__) + SHR_ASSERT_ALL_FL((ubound(exice_init_conc_col,1) == bounds%endc), sourcefile, __LINE__) endif if (present(enable_consistency_checks)) then @@ -177,9 +177,9 @@ subroutine create_water_type(this, water_inst, & l_exice_coldstart_depth = 0.5_r8 endif if (present(exice_init_conc_col)) then - l_exice_init_conc_col(:,:) = exice_init_conc_col + l_exice_init_conc_col(:) = exice_init_conc_col else - l_exice_init_conc_col(:,:) = 0.01_r8 + l_exice_init_conc_col(:) = 0.0_r8 endif call water_inst%InitForTesting(bounds, params, &