diff --git a/srcF/sfx_api_lake.f90 b/srcF/sfx_api_lake.f90 index 3279bf8174dc640c8b6337b74df323b8a32145c2..efd3b36b7acdeb4604903e323dd3f474d4f04b6a 100644 --- a/srcF/sfx_api_lake.f90 +++ b/srcF/sfx_api_lake.f90 @@ -27,7 +27,7 @@ contains real_f => c_float ! 4-byte real implicit none type (meteoDataType), intent(inout) :: meteo - real(kind=real_d), dimension(6), intent(in) :: arg + real(kind=real_f), dimension(6), intent(in) :: arg integer,intent(in) :: IVEG_sfx real(kind=real_d),intent(in) :: depth_inm real(kind=real_d),intent(in) :: lai_inm @@ -52,24 +52,26 @@ contains subroutine sfx_to_lake_out_cell(arg, sfx) !> @brief converts sfx cell output to legacy arg [AR2 INMCM format] array ! ---------------------------------------------------------------------------- - use, intrinsic :: iso_c_binding, only: real_d => c_double ! 8-byte real + use, intrinsic :: iso_c_binding, only: real_d => c_double, & + real_d => c_float! 8-byte real + implicit none type(sfxDataType), intent(in) :: sfx - real(kind=real_d), dimension(11), intent(inout) :: arg + real(kind=real_f), dimension(11), intent(inout) :: arg ! ---------------------------------------------------------------------------- - arg(1) = dble(sfx%zeta) - arg(2) = dble(sfx%Rib) - arg(3) = dble(sfx%Re) - arg(4) = dble(sfx%B) - arg(5) = dble(sfx%z0_m) - arg(6) = dble(sfx%z0_t) + arg(1) = sfx%zeta + arg(2) = sfx%Rib + arg(3) = sfx%Re + arg(4) = sfx%B + arg(5) = sfx%z0_m + arg(6) = sfx%z0_t !arg(7) = 0.0 ! arg(7) is never used in legacy code - arg(8) = dble(sfx%Cm) - arg(9) = dble(sfx%Ct) - arg(10) = dble(sfx%Km) - arg(11) = dble(sfx%Pr_t_inv) + arg(8) = sfx%Cm + arg(9) = sfx%Ct + arg(10) = sfx%Km + arg(11) = sfx%Pr_t_inv end subroutine sfx_to_lake_out_cell ! --------------------------------------------------------------------------------