From 2efe5b02560331b6d15f77b7244f31de2fde67cf Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 11 Oct 2024 11:24:43 +0200 Subject: [PATCH] add openmp loop in ice_oce_:coupling.F90, delete uneccessary comment in ../src/icepack_drivers/icedrv_transfer.F90 --- src/ice_oce_coupling.F90 | 24 ++++++++++++++---------- src/icepack_drivers/icedrv_transfer.F90 | 6 ------ 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/ice_oce_coupling.F90 b/src/ice_oce_coupling.F90 index ac8ed2e1a..f61f96742 100755 --- a/src/ice_oce_coupling.F90 +++ b/src/ice_oce_coupling.F90 @@ -367,19 +367,23 @@ subroutine oce_fluxes(ice, dynamics, tracers, partit, mesh) evap_ocn_out=evaporation, & evap_out=ice_sublimation ) - ! Heat flux - heat_flux = - net_heat_flux +!$OMP PARALLEL DO + do n=1, myDim_nod2d+eDim_nod2d + ! Heat flux + heat_flux(n) = - net_heat_flux(n) - ! Freshwater flux (convert units from icepack to fesom) - water_flux = - (fresh_wa_flux * inv_rhowat) - runoff(:) + ! Freshwater flux (convert units from icepack to fesom) + water_flux(n) = - (fresh_wa_flux(n) * inv_rhowat) - runoff(n) - ! Evaporation (convert units from icepack to fesom) - evaporation = - evaporation * (1.0_WP - a_ice) * inv_rhowat + ! Evaporation (convert units from icepack to fesom) + evaporation(n) = - evaporation(n) * (1.0_WP - a_ice(n)) * inv_rhowat - ! Ice-Sublimation is added to to the freshwater in icepack --> see - ! icepack_therm_vertical.90 --> subroutine thermo_vertical(...): Line: 453 - ! freshn = freshn + evapn - (rhoi*dhi + rhos*dhs) / dt , evapn==sublimation - ice_sublimation = - ice_sublimation * inv_rhowat + ! Ice-Sublimation is added to to the freshwater in icepack --> see + ! icepack_therm_vertical.90 --> subroutine thermo_vertical(...): Line: 453 + ! freshn = freshn + evapn - (rhoi*dhi + rhos*dhs) / dt , evapn==sublimation + ice_sublimation(n) = - ice_sublimation(n) * inv_rhowat + end do +!$OMP END PARALLEL DO call init_flux_atm_ocn() diff --git a/src/icepack_drivers/icedrv_transfer.F90 b/src/icepack_drivers/icedrv_transfer.F90 index 174b48bfc..de317f285 100644 --- a/src/icepack_drivers/icedrv_transfer.F90 +++ b/src/icepack_drivers/icedrv_transfer.F90 @@ -18,12 +18,6 @@ module subroutine fesom_to_icepack(ice, mesh) use g_forcing_param, only: ncar_bulk_z_wind, ncar_bulk_z_tair, & ncar_bulk_z_shum use g_sbf, only: l_mslp -! use i_arrays, only: S_oc_array, T_oc_array, & ! Ocean and sea ice fields -! u_w, v_w, & -! stress_atmice_x, stress_atmice_y -! ! u_ice, v_ice, & - -! use i_param, only: cd_oce_ice ! Sea ice parameters use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted use icepack_intfc, only: icepack_query_parameters use icepack_intfc, only: icepack_sea_freezing_temperature