Skip to content

Commit

Permalink
icepack_therm_vertical: use delt,delq instead of worka,workb
Browse files Browse the repository at this point in the history
In icepack_therm_vertical::icepack_step_therm1, the local variables
'worka' and 'workb' are sent to icepack_atmo::icepack_atm_boundary as
the 'delt' and 'delq' arguments. This is the sole use of these variables
in icepack_step_therm1.

These names date back to the use of global, temporary work arrays in
CICE4. Even if their values are not used, let's make the code clearer by
renaming the local variables delt and delq.

Since 'worka' is also used later on for snow redistribution computation,
let's keep its declaration.

Closes CICE-Consortium#375
  • Loading branch information
phil-blain committed Feb 12, 2024
1 parent cd2ea91 commit 2de3d84
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions columnphysics/icepack_therm_vertical.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2362,7 +2362,6 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &

real (kind=dbl_kind) :: &
worka , & ! temporary variables
workb , &
workc

! 2D coupler variables (computed for each category, then aggregated)
Expand All @@ -2381,6 +2380,8 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
Trefn , & ! air tmp reference level (K)
Urefn , & ! air speed reference level (m/s)
Qrefn , & ! air sp hum reference level (kg/kg)
delq , & ! humidity difference (kg/kg)
delt , & ! potential T difference (K)
shcoef , & ! transfer coefficient for sensible heat
lhcoef , & ! transfer coefficient for latent heat
rfrac ! water fraction retained for melt ponds
Expand Down Expand Up @@ -2575,8 +2576,8 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
Urefn = c0
lhcoef = c0
shcoef = c0
worka = c0
workb = c0
delt = c0
delq = c0

fswabsn = c0
flwoutn = c0
Expand Down Expand Up @@ -2607,7 +2608,7 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
Qa, rhoa, &
strairxn, strairyn, &
Trefn, Qrefn, &
worka, workb, &
delt, delq, &
lhcoef, shcoef, &
Cdn_atm, &
Cdn_atm_ratio_n, &
Expand Down

0 comments on commit 2de3d84

Please sign in to comment.