-
Notifications
You must be signed in to change notification settings - Fork 138
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
sensible+latent heatfluxes using linear bulk formula #371
Changes from 3 commits
cd863c4
aa871ef
d602c2c
2da0b98
dd63009
bd91a7d
b785a57
ffb374d
4cfa3ab
644d324
ef391d5
2c10349
eb58e3f
a44c806
56ccc77
4807cc4
78660ed
1ec0b3f
bee1627
2640405
81b80ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ module icepack_atmo | |
use icepack_parameters, only: cp_wv, cp_air, iceruf, zref, qqqice, TTTice, qqqocn, TTTocn | ||
use icepack_parameters, only: Lsub, Lvap, vonkar, Tffresh, zvir, gravit | ||
use icepack_parameters, only: pih, dragio, rhoi, rhos, rhow | ||
use icepack_parameters, only: atmbndy, calc_strair, formdrag | ||
use icepack_parameters, only: atmbndy, heatflux_linear, calc_strair, formdrag | ||
use icepack_tracers, only: n_iso | ||
use icepack_tracers, only: tr_iso | ||
use icepack_warnings, only: warnstr, icepack_warnings_add | ||
|
@@ -359,8 +359,16 @@ subroutine atmo_boundary_layer (sfctype, & | |
! as in Jordan et al (JGR, 1999) | ||
!------------------------------------------------------------ | ||
|
||
shcoef = rhoa * ustar * cp * rh + c1 | ||
lhcoef = rhoa * ustar * Lheat * re | ||
if (heatflux_linear) then | ||
!- Use constant coefficients for sensible and latent heat fluxes | ||
! similar to atmo_boundary_const but using (wind-Vice) instead of wind-only | ||
shcoef = (1.20e-3_dbl_kind)*cp_air*rhoa*vmag | ||
lhcoef = (1.50e-3_dbl_kind)*Lheat *rhoa*vmag | ||
else | ||
!- Use Jordan et al (JGR, 1999) formulation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove the ref to Jordan in the comment. That's referring to a small modification of the overall turbulent heat flux calculation, which came from somewhere else (documented in readthedocs, I hope). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done... |
||
shcoef = rhoa * ustar * cp * rh + c1 | ||
lhcoef = rhoa * ustar * Lheat * re | ||
endif | ||
|
||
!------------------------------------------------------------ | ||
! Compute diagnostics: 2m ref T, Q, U | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -250,11 +250,12 @@ module icepack_parameters | |
TTTocn = 5107.4_dbl_kind ! for qsat over ocn | ||
|
||
character (len=char_len), public :: & | ||
atmbndy = 'default' ! atmo boundary method, 'default' ('ccsm3') or 'constant' | ||
atmbndy = 'default' ! atmo boundary method, 'default' ('ccsm3') or 'constant' | ||
|
||
logical (kind=log_kind), public :: & | ||
calc_strair = .true. , & ! if true, calculate wind stress | ||
formdrag = .false. , & ! if true, calculate form drag | ||
heatflux_linear = .false. , & ! if true, calculate sensible+latent heatfluxes using traditional linear bulk formula | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As noted in the CICE PR, maybe there could be a third option for atmbndy instead of the new heatflux_linear flag. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If a namelist/argument exists that we can leverage to set this new option, that's preferable to creating a new namelist/argument when it makes sense. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rewritten using 'atmbndy' namelist variable as suggested. |
||
highfreq = .false. ! if true, calculate high frequency coupling | ||
|
||
integer (kind=int_kind), public :: & | ||
|
@@ -446,7 +447,7 @@ subroutine icepack_init_parameters( & | |
albicev_in, albicei_in, albsnowv_in, & | ||
ahmax_in, R_ice_in, R_pnd_in, R_snw_in, dT_mlt_in, rsnw_mlt_in, & | ||
kalg_in, kstrength_in, krdg_partic_in, krdg_redist_in, mu_rdg_in, & | ||
atmbndy_in, calc_strair_in, formdrag_in, highfreq_in, natmiter_in, & | ||
atmbndy_in, heatflux_linear_in, calc_strair_in, formdrag_in, highfreq_in, natmiter_in, & | ||
atmiter_conv_in, calc_dragio_in, & | ||
tfrz_option_in, kitd_in, kcatbound_in, hs0_in, frzpnd_in, & | ||
floeshape_in, wave_spec_in, wave_spec_type_in, nfreq_in, & | ||
|
@@ -646,12 +647,13 @@ subroutine icepack_init_parameters( & | |
TTTocn_in ! for qsat over ocn | ||
|
||
character (len=*), intent(in), optional :: & | ||
atmbndy_in ! atmo boundary method, 'default' ('ccsm3') or 'constant' | ||
atmbndy_in ! atmo boundary method, 'default' ('ccsm3') or 'constant' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry to be picky, would it be possible to not introduce whitespace changes ? It adds noise to the diff (even though we can hide it in the GitHub UI or with |
||
|
||
logical (kind=log_kind), intent(in), optional :: & | ||
calc_strair_in, & ! if true, calculate wind stress components | ||
formdrag_in, & ! if true, calculate form drag | ||
highfreq_in ! if true, use high frequency coupling | ||
calc_strair_in, & ! if true, calculate wind stress components | ||
formdrag_in, & ! if true, calculate form drag | ||
heatflux_linear_in, & ! if true, calculate sensible+latent heatfluxes using traditional linear bulk formula | ||
highfreq_in ! if true, use high frequency coupling | ||
|
||
integer (kind=int_kind), intent(in), optional :: & | ||
natmiter_in ! number of iterations for boundary layer calculations | ||
|
@@ -902,6 +904,7 @@ subroutine icepack_init_parameters( & | |
if (present(krdg_redist_in) ) krdg_redist = krdg_redist_in | ||
if (present(mu_rdg_in) ) mu_rdg = mu_rdg_in | ||
if (present(atmbndy_in) ) atmbndy = atmbndy_in | ||
if (present(heatflux_linear_in) ) heatflux_linear = heatflux_linear_in | ||
if (present(calc_strair_in) ) calc_strair = calc_strair_in | ||
if (present(formdrag_in) ) formdrag = formdrag_in | ||
if (present(highfreq_in) ) highfreq = highfreq_in | ||
|
@@ -1117,7 +1120,7 @@ subroutine icepack_query_parameters( & | |
albsnowi_out, ahmax_out, R_ice_out, R_pnd_out, R_snw_out, dT_mlt_out, & | ||
rsnw_mlt_out, dEdd_algae_out, & | ||
kalg_out, kstrength_out, krdg_partic_out, krdg_redist_out, mu_rdg_out, & | ||
atmbndy_out, calc_strair_out, formdrag_out, highfreq_out, natmiter_out, & | ||
atmbndy_out, heatflux_linear_out, calc_strair_out, formdrag_out, highfreq_out, natmiter_out, & | ||
atmiter_conv_out, calc_dragio_out, & | ||
tfrz_option_out, kitd_out, kcatbound_out, hs0_out, frzpnd_out, & | ||
floeshape_out, wave_spec_out, wave_spec_type_out, nfreq_out, & | ||
|
@@ -1326,12 +1329,13 @@ subroutine icepack_query_parameters( & | |
TTTocn_out ! for qsat over ocn | ||
|
||
character (len=*), intent(out), optional :: & | ||
atmbndy_out ! atmo boundary method, 'default' ('ccsm3') or 'constant' | ||
atmbndy_out ! atmo boundary method, 'default' ('ccsm3') or 'constant' | ||
|
||
logical (kind=log_kind), intent(out), optional :: & | ||
calc_strair_out, & ! if true, calculate wind stress components | ||
formdrag_out, & ! if true, calculate form drag | ||
highfreq_out ! if true, use high frequency coupling | ||
calc_strair_out, & ! if true, calculate wind stress components | ||
formdrag_out, & ! if true, calculate form drag | ||
heatflux_linear_out, & ! if true, calculate sensible+latent heatfluxes using traditional linear bulk formula | ||
highfreq_out ! if true, use high frequency coupling | ||
|
||
integer (kind=int_kind), intent(out), optional :: & | ||
natmiter_out ! number of iterations for boundary layer calculations | ||
|
@@ -1622,6 +1626,7 @@ subroutine icepack_query_parameters( & | |
if (present(krdg_redist_out) ) krdg_redist_out = krdg_redist | ||
if (present(mu_rdg_out) ) mu_rdg_out = mu_rdg | ||
if (present(atmbndy_out) ) atmbndy_out = atmbndy | ||
if (present(heatflux_linear_out) ) heatflux_linear = heatflux_linear | ||
if (present(calc_strair_out) ) calc_strair_out = calc_strair | ||
if (present(formdrag_out) ) formdrag_out = formdrag | ||
if (present(highfreq_out) ) highfreq_out = highfreq | ||
|
@@ -1826,6 +1831,7 @@ subroutine icepack_write_parameters(iounit) | |
write(iounit,*) " krdg_redist = ", krdg_redist | ||
write(iounit,*) " mu_rdg = ", mu_rdg | ||
write(iounit,*) " atmbndy = ", atmbndy | ||
write(iounit,*) " heatflux_linear = ", heatflux_linear | ||
write(iounit,*) " calc_strair = ", calc_strair | ||
write(iounit,*) " formdrag = ", formdrag | ||
write(iounit,*) " highfreq = ", highfreq | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, please remove literal constants from the code (here 1.20e-3_dbl_kind and 1.50e-3_dbl_kind) and place them in the Icepack constants file. I appreciate this is already done in atmo_boundary_const, but if we leave two sets of identical literal constants in the code, the code is susceptible to errors creeping in if further changes are made by another developer to just one set of constants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point w.r.t. secure code for future errors by placing the identical parameters in one place.
Will introduce p0012 and p0015.