Skip to content

Commit

Permalink
icepack_therm_vertical: rename worka,workb to delt,delq
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.

Closes CICE-Consortium#375
  • Loading branch information
phil-blain committed Sep 5, 2023
1 parent 8a84662 commit aa5fbfa
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions columnphysics/icepack_therm_vertical.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2395,8 +2395,7 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, &
n ! category index

real (kind=dbl_kind) :: &
rnslyr , & ! 1 / nslyr
worka, workb ! temporary variables
rnslyr ! 1 / nslyr

! 2D coupler variables (computed for each category, then aggregated)
real (kind=dbl_kind) :: &
Expand All @@ -2414,6 +2413,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 @@ -2687,8 +2688,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 @@ -2719,7 +2720,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 aa5fbfa

Please sign in to comment.