From 2de3d844487901146f4a813b61f3795f12c4293c Mon Sep 17 00:00:00 2001 From: Philippe Blain Date: Thu, 15 Dec 2022 16:22:03 -0500 Subject: [PATCH] icepack_therm_vertical: use delt,delq instead of worka,workb 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 https://github.com/CICE-Consortium/Icepack/issues/375 --- columnphysics/icepack_therm_vertical.F90 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/columnphysics/icepack_therm_vertical.F90 b/columnphysics/icepack_therm_vertical.F90 index 948fd73c..a5cabe8b 100644 --- a/columnphysics/icepack_therm_vertical.F90 +++ b/columnphysics/icepack_therm_vertical.F90 @@ -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) @@ -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 @@ -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 @@ -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, &