diff --git a/CMakeLists.txt b/CMakeLists.txt index ea81f2abc374b714f09ec1ad3ad0840f61b7db77..9b10c347fc29612c0f5565582f34ccd042570855 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,10 +83,10 @@ set(SOURCES_F srcF/sfx_log_param.f90 srcF/sfx_run.f90 srcF/sfx_phys_const.f90 - srcF/sfx_z0m_all_surface - srcF/sfx_z0t_all_surface - srcF/sfx_z0m_all - srcF/sfx_z0t_all + srcF/sfx_z0m_all_surface.f90 + srcF/sfx_z0t_all_surface.f90 + srcF/sfx_z0m_all.f90 + srcF/sfx_z0t_all.f90 srcF/sfx_surface.f90 srcF/sfx_most.f90 srcF/sfx_most_param.f90 diff --git a/makefile b/makefile index c14265ba2925727ed10e4ac59049fb4e6db02d46..e36063b21f51e4d3a8e88e96593d4e2bc051e039 100644 --- a/makefile +++ b/makefile @@ -10,7 +10,7 @@ ifeq ($(COMPILER),gnu) FC = gfortran endif -OBJ_F90 = sfx_phys_const.o sfx_common.o sfx_io.o sfx_data.o sfx_surface.o sfx_log_param.o sfx_log.o sfx_most_param.o sfx_most.o sfx_sheba_param.o sfx_sheba.o sfx_esm_param.o sfx_esm.o sfx_main.o +OBJ_F90 = sfx_phys_const.o sfx_common.o sfx_config.o sfx_io.o sfx_data.o sfx_surface.o sfx_log_param.o sfx_log.o sfx_most_param.o sfx_most.o sfx_most_snow_param.o sfx_most_snow.o sfx_sheba_param.o sfx_sheba.o sfx_esm_param.o sfx_esm.o sfx_run.o sfx_main.o OBJ_F = OBJ = $(OBJ_F90) $(OBJ_F) diff --git a/srcF/sfx_config.f90 b/srcF/sfx_config.f90 index 0528a049482fdfca385dd99767857f61bbfe02a2..b1a84f67ab0277f7f560a363108c4be7122eb99c 100644 --- a/srcF/sfx_config.f90 +++ b/srcF/sfx_config.f90 @@ -1,7 +1,7 @@ #include "../includeF/sfx_def.fi" !> @brief surface flux model config subroutines -module sfx_config + module sfx_config ! modules used ! -------------------------------------------------------------------------------- diff --git a/srcF/sfx_most_snow.f90 b/srcF/sfx_most_snow.f90 index 5ff26f84a2fc617ab6334218a9db0354dd5744b8..9b022d15391c318540b722c49fa46358359caf95 100644 --- a/srcF/sfx_most_snow.f90 +++ b/srcF/sfx_most_snow.f90 @@ -23,6 +23,7 @@ module sfx_most_snow ! -------------------------------------------------------------------------------- public :: get_surface_fluxes public :: get_surface_fluxes_vec + public :: get_psi ! -------------------------------------------------------------------------------- ! -------------------------------------------------------------------------------- @@ -35,12 +36,11 @@ module sfx_most_snow contains ! -------------------------------------------------------------------------------- - subroutine get_surface_fluxes_vec(sfx, sfx2, meteo, numerics, n) + subroutine get_surface_fluxes_vec(sfx, meteo, numerics, n) !< @brief surface flux calculation for array data !< @details contains C/C++ & CUDA interface ! ---------------------------------------------------------------------------- type (sfxDataVecType), intent(inout) :: sfx - type (sfxDataAddVecType), intent(inout) :: sfx2 type (meteoDataVecType), intent(in) :: meteo type (numericsType), intent(in) :: numerics @@ -50,7 +50,7 @@ contains ! --- local variables type (meteoDataType) meteo_cell type (sfxDataType) sfx_cell - type (sfxDataAddType) sfx2_cell + integer i ! ---------------------------------------------------------------------------- @@ -60,17 +60,17 @@ contains U = meteo%U(i), dT = meteo%dT(i), Tsemi = meteo%Tsemi(i), dQ = meteo%dQ(i), & z0_m = meteo%z0_m(i)) - call get_surface_fluxes(sfx_cell, sfx2_cell, meteo_cell, numerics) + call get_surface_fluxes(sfx_cell, meteo_cell, numerics) call push_sfx_data(sfx, sfx_cell, i) - call push_sfx_data_add(sfx2, sfx2_cell, i) + end do end subroutine get_surface_fluxes_vec ! -------------------------------------------------------------------------------- ! -------------------------------------------------------------------------------- - subroutine get_surface_fluxes(sfx, sfx2, meteo, numerics) + subroutine get_surface_fluxes(sfx, meteo, numerics) !< @brief surface flux calculation for single cell !< @details contains C/C++ interface ! ---------------------------------------------------------------------------- @@ -79,7 +79,6 @@ contains #endif type (sfxDataType), intent(out) :: sfx - type (sfxDataAddType), intent(out) :: sfx2 type (meteoDataType), intent(in) :: meteo type (numericsType), intent(in) :: numerics ! ---------------------------------------------------------------------------- @@ -142,10 +141,6 @@ contains Rib_conv_lim = NaN, & Cm = NaN, Ct = NaN, Km = NaN, Pr_t_inv = NaN) - sfx2 = sfxDataAddType(phi_m = NaN, phi_h = NaN, & - hfx = NaN, mfx = NaN, Udyn = NaN, S_mean = NaN, & - Lsnow = NaN, & - z0_s = NaN, h_salt = NaN) return @@ -174,12 +169,6 @@ contains call get_charnock_roughness(z0_m, u_dyn0, U, h, numerics%maxiters_charnock) ! --- define relative height h0_m = h / z0_m - endif - if (surface_type == surface_snow) then - ! --- define surface roughness [momentum] & dynamic velocity in neutral conditions - call get_snow_roughness(z0_m, u_dyn0, U, h, numerics%maxiters_snow) - ! --- define relative height - h0_m = h / z0_m endif if (surface_type == surface_land) then ! --- define relative height @@ -190,7 +179,7 @@ contains ! --- define thermal roughness & B = log(z0_m / z0_h) Re = u_dyn0 * z0_m / nu_air - call get_thermal_roughness(z0_t, B, z0_m, Re, surface_type, u_dyn0) + call get_thermal_roughness(z0_t, B, z0_m, Re, surface_type) ! --- define relative height [thermal] h0_t = h / z0_t @@ -233,10 +222,7 @@ contains Rib_conv_lim = 0.0, & Cm = Cm, Ct = Ct, Km = Km, Pr_t_inv = Pr_t_inv) ! --- setting additional output - sfx2 = sfxDataAddType(phi_m = phi_m, phi_h = phi_h, & - hfx = hfx, mfx = mfx, Udyn = Udyn, S_mean = S_mean, & - Lsnow = Lsnow, & - z0_s = z0_m, h_salt = h_s) + end subroutine get_surface_fluxes ! --------------------------------------------------------------------------------