From 7e5dcea51094986298dc228e5ee7aaba98bf32e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D1=8F=20=D0=A1?= =?UTF-8?q?=D1=83=D1=8F=D0=B7=D0=BE=D0=B2=D0=B0?= <viktoriasuazova@MacBook-Pro-Viktoria.local> Date: Wed, 30 Oct 2024 23:43:25 +0300 Subject: [PATCH] bug fixed, build/run ok --- CMakeLists.txt | 8 ++++---- makefile | 2 +- srcF/sfx_config.f90 | 2 +- srcF/sfx_most_snow.f90 | 30 ++++++++---------------------- 4 files changed, 14 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ea81f2a..9b10c34 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 c14265b..e36063b 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 0528a04..b1a84f6 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 5ff26f8..9b022d1 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 ! -------------------------------------------------------------------------------- -- GitLab