From 358c7cf4f0a0cd5f08a1da2b5fbb9f799c0479ab 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 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/columnphysics/icepack_therm_vertical.F90 b/columnphysics/icepack_therm_vertical.F90 index e29860eb..168670fa 100644 --- a/columnphysics/icepack_therm_vertical.F90 +++ b/columnphysics/icepack_therm_vertical.F90 @@ -2358,7 +2358,7 @@ subroutine icepack_step_therm1(dt, ncat, nilyr, nslyr, & real (kind=dbl_kind) :: & rnslyr , & ! 1 / nslyr - worka, workb ! temporary variables + worka ! temporary variable ! 2D coupler variables (computed for each category, then aggregated) real (kind=dbl_kind) :: & @@ -2376,6 +2376,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 @@ -2648,8 +2650,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 @@ -2680,7 +2682,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, &