Skip to content

Commit

Permalink
add openmp loop in ice_oce_:coupling.F90, delete uneccessary comment …
Browse files Browse the repository at this point in the history
…in ../src/icepack_drivers/icedrv_transfer.F90
  • Loading branch information
patrickscholz committed Oct 11, 2024
1 parent 15a2ba4 commit 2efe5b0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
24 changes: 14 additions & 10 deletions src/ice_oce_coupling.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
6 changes: 0 additions & 6 deletions src/icepack_drivers/icedrv_transfer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2efe5b0

Please sign in to comment.