Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icepack: optionally compute 'dragio' using under-ice roughness length #612

Merged
merged 2 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions cicecore/cicedynB/general/ice_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ subroutine input_data
mu_rdg, hs0, dpscale, rfracmin, rfracmax, pndaspect, hs1, hp1, &
a_rapid_mode, Rac_rapid_mode, aspect_rapid_mode, dSdt_slow_mode, &
phi_c_slow_mode, phi_i_mushy, kalg, atmiter_conv, Pstar, Cstar, &
sw_frac, sw_dtemp, floediam, hfrazilmin, iceruf
sw_frac, sw_dtemp, floediam, hfrazilmin, iceruf, iceruf_ocn

integer (kind=int_kind) :: ktherm, kstrength, krdg_partic, krdg_redist, natmiter, &
kitd, kcatbound, ktransport
Expand All @@ -137,7 +137,7 @@ subroutine input_data
tfrz_option, frzpnd, atmbndy, wave_spec_type

logical (kind=log_kind) :: calc_Tsfc, formdrag, highfreq, calc_strair, wave_spec, &
sw_redist
sw_redist, calc_dragio

logical (kind=log_kind) :: tr_iage, tr_FY, tr_lvl, tr_pond
logical (kind=log_kind) :: tr_iso, tr_aero, tr_fsd
Expand Down Expand Up @@ -228,8 +228,8 @@ subroutine input_data

namelist /forcing_nml/ &
formdrag, atmbndy, calc_strair, calc_Tsfc, &
highfreq, natmiter, atmiter_conv, &
ustar_min, emissivity, iceruf, &
highfreq, natmiter, atmiter_conv, calc_dragio, &
ustar_min, emissivity, iceruf, iceruf_ocn, &
fbot_xfer_type, update_ocn_f, l_mpond_fresh, tfrz_option, &
oceanmixed_ice, restore_ice, restore_ocn, trestore, &
precip_units, default_season, wave_spec_type,nfreq, &
Expand Down Expand Up @@ -384,6 +384,8 @@ subroutine input_data
update_ocn_f = .false. ! include fresh water and salt fluxes for frazil
ustar_min = 0.005 ! minimum friction velocity for ocean heat flux (m/s)
iceruf = 0.0005_dbl_kind ! ice surface roughness at atmosphere interface (m)
iceruf_ocn = 0.03_dbl_kind ! under-ice roughness (m)
calc_dragio = .false. ! compute dragio from iceruf_ocn and thickness of first ocean level
emissivity = 0.985 ! emissivity of snow and ice
l_mpond_fresh = .false. ! logical switch for including meltpond freshwater
! flux feedback to ocean model
Expand Down Expand Up @@ -749,6 +751,8 @@ subroutine input_data
call broadcast_scalar(l_mpond_fresh, master_task)
call broadcast_scalar(ustar_min, master_task)
call broadcast_scalar(iceruf, master_task)
call broadcast_scalar(iceruf_ocn, master_task)
call broadcast_scalar(calc_dragio, master_task)
call broadcast_scalar(emissivity, master_task)
call broadcast_scalar(fbot_xfer_type, master_task)
call broadcast_scalar(precip_units, master_task)
Expand Down Expand Up @@ -1553,6 +1557,15 @@ subroutine input_data
endif
write(nu_diag,1030) ' fbot_xfer_type = ', trim(fbot_xfer_type),trim(tmpstr2)
write(nu_diag,1000) ' ustar_min = ', ustar_min,' : minimum value of ocean friction velocity'
if (calc_dragio) then
tmpstr2 = ' : dragio computed from iceruf_ocn'
else
tmpstr2 = ' : dragio hard-coded'
endif
write(nu_diag,1010) ' calc_dragio = ', calc_dragio,trim(tmpstr2)
if(calc_dragio) then
write(nu_diag,1002) ' iceruf_ocn = ', iceruf_ocn,' : under-ice roughness length'
endif

if (tr_fsd) then
write(nu_diag,1002) ' floediam = ', floediam, ' constant floe diameter'
Expand Down Expand Up @@ -1823,7 +1836,7 @@ subroutine input_data
wave_spec_type_in = wave_spec_type, &
wave_spec_in=wave_spec, nfreq_in=nfreq, &
tfrz_option_in=tfrz_option, kalg_in=kalg, fbot_xfer_type_in=fbot_xfer_type, &
Pstar_in=Pstar, Cstar_in=Cstar, iceruf_in=iceruf, &
Pstar_in=Pstar, Cstar_in=Cstar, iceruf_in=iceruf, iceruf_ocn_in=iceruf_ocn, calc_dragio_in=calc_dragio, &
sw_redist_in=sw_redist, sw_frac_in=sw_frac, sw_dtemp_in=sw_dtemp)
call icepack_init_tracer_flags(tr_iage_in=tr_iage, tr_FY_in=tr_FY, &
tr_lvl_in=tr_lvl, tr_iso_in=tr_iso, tr_aero_in=tr_aero, &
Expand Down
27 changes: 25 additions & 2 deletions cicecore/cicedynB/infrastructure/ice_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module ice_grid
use ice_exit, only: abort_ice
use ice_global_reductions, only: global_minval, global_maxval
use icepack_intfc, only: icepack_warnings_flush, icepack_warnings_aborted
use icepack_intfc, only: icepack_query_parameters
use icepack_intfc, only: icepack_query_parameters, icepack_init_parameters

implicit none
private
Expand Down Expand Up @@ -2372,6 +2372,9 @@ subroutine get_bathymetry
real (kind=dbl_kind) :: &
puny

logical (kind=log_kind) :: &
calc_dragio

real (kind=dbl_kind), dimension(nlevel), parameter :: &
thick = (/ & ! ocean layer thickness, m
10.01244_dbl_kind, 10.11258_dbl_kind, 10.31682_dbl_kind, &
Expand All @@ -2391,7 +2394,7 @@ subroutine get_bathymetry

character(len=*), parameter :: subname = '(get_bathymetry)'

call icepack_query_parameters(puny_out=puny)
call icepack_query_parameters(puny_out=puny, calc_dragio_out=calc_dragio)
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
Expand All @@ -2418,6 +2421,14 @@ subroutine get_bathymetry
enddo
enddo

! For consistency, set thickness_ocn_layer1 in Icepack if 'calc_dragio' is active
if (calc_dragio) then
call icepack_init_parameters(thickness_ocn_layer1_in=thick(1))
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)
endif

endif ! bathymetry_file

end subroutine get_bathymetry
Expand All @@ -2441,6 +2452,9 @@ subroutine get_bathymetry_popfile
depth , & ! total depth, m
thick ! layer thickness, cm -> m

logical (kind=log_kind) :: &
calc_dragio

character(len=*), parameter :: subname = '(get_bathymetry_popfile)'

ntmp = maxval(nint(KMT))
Expand Down Expand Up @@ -2510,6 +2524,15 @@ subroutine get_bathymetry_popfile
enddo
enddo

! For consistency, set thickness_ocn_layer1 in Icepack if 'calc_dragio' is active
call icepack_query_parameters(calc_dragio_out=calc_dragio)
if (calc_dragio) then
call icepack_init_parameters(thickness_ocn_layer1_in=thick(1))
endif
call icepack_warnings_flush(nu_diag)
if (icepack_warnings_aborted()) call abort_ice(error_message=subname, &
file=__FILE__, line=__LINE__)

deallocate(depth,thick)

end subroutine get_bathymetry_popfile
Expand Down
2 changes: 2 additions & 0 deletions configuration/scripts/ice_in
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@
atmiter_conv = 0.0d0
ustar_min = 0.0005
iceruf = 0.0005
calc_dragio = .false.
iceruf_ocn = 0.03
emissivity = 0.985
fbot_xfer_type = 'constant'
update_ocn_f = .false.
Expand Down
1 change: 1 addition & 0 deletions configuration/scripts/options/set_nml.calcdragio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
calc_dragio = .true.
1 change: 1 addition & 0 deletions configuration/scripts/tests/base_suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ restart gx3 8x2 zsal
restart gx3 8x2 gx3ncarbulk,debug
restart gx3 4x4 gx3ncarbulk,diag1
restart gx1 24x1 gx1coreii,short
smoke gx3 4x1 calcdragio
2 changes: 2 additions & 0 deletions doc/source/cice_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ either Celsius or Kelvin units).
"**C**", "", ""
"c<n>", "real(\ :math:`n`)", ""
"rotate_wind", ":math:`\bullet` if true, rotate wind/stress components to computational grid", "T"
"calc_dragio", ":math:`\bullet` if true, calculate ``dragio`` from ``iceruf_ocn`` and ``thickness_ocn_layer1``", "F"
"calc_strair", ":math:`\bullet` if true, calculate wind stress", "T"
"calc_Tsfc", ":math:`\bullet` if true, calculate surface temperature", "T"
"Cdn_atm", "atmospheric drag coefficient", ""
Expand Down Expand Up @@ -322,6 +323,7 @@ either Celsius or Kelvin units).
"ice_ref_salinity", "reference salinity for ice–ocean exchanges", "4. ppt"
"icells", "number of grid cells with specified property (for vectorization)", ""
"iceruf", ":math:`\bullet` ice surface roughness at atmosphere interface", "5.\ :math:`\times`\ 10\ :math:`^{-4}` m"
"iceruf_ocn", ":math:`\bullet` under-ice roughness (at ocean interface)", "0.03 m"
"icetmask", "ice extent mask (T-cell)", ""
"iceumask", "ice extent mask (U-cell)", ""
"idate", "the date at the end of the current time step (yyyymmdd)", ""
Expand Down