Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
4d76724
[dev.01] define q_building
cathyxinchangli Apr 30, 2024
c665176
[dev.02] Modify ventilation & building flux
cathyxinchangli May 1, 2024
593dc8b
[dev.03] update q_building & dehumidify
cathyxinchangli May 1, 2024
caeba35
[dev.03] update q_building & dehumidify (cont'd)
cathyxinchangli May 1, 2024
600cf4c
[dev.04] bug fix
cathyxinchangli May 2, 2024
485662c
[dev.04] bug fix (cont'd)
cathyxinchangli May 6, 2024
e2792d4
[dev.04] bug fix (cont'd)
cathyxinchangli May 6, 2024
33a79db
[dev.04] bug fix (cont'd)
cathyxinchangli May 6, 2024
7612c85
[dev.04] bug fix (cont'd)
cathyxinchangli May 6, 2024
7b6d20c
[dev.04] bug fix (cont'd)
cathyxinchangli May 6, 2024
d015119
[dev.04] bug fix (cont'd)
cathyxinchangli May 6, 2024
d1e4dad
[dev.04] bug fix (cont'd)
cathyxinchangli May 9, 2024
b40cf24
[dev.06] shift to RH setpoint
cathyxinchangli May 17, 2024
62970a7
[dev.07] debug
cathyxinchangli May 19, 2024
5c720ce
[dev.07] debug cont'd
cathyxinchangli May 20, 2024
fc0c0ee
[dev.09] put RH control inside temp control
cathyxinchangli May 22, 2024
3b74929
[dev.11] rho, cp of humid air
cathyxinchangli May 28, 2024
3afe52b
[dev.11] fix bug
cathyxinchangli May 28, 2024
5f39e20
[dev.12] change pressure to pstd
cathyxinchangli May 28, 2024
3732413
Revert "[dev.12] change pressure to pstd"
cathyxinchangli Jul 18, 2024
7bfcb5a
[dev.13] update pressure
cathyxinchangli Jul 18, 2024
5a2cf11
[dev.14] Add output for sensible AC flux
cathyxinchangli Sep 27, 2024
455d3b5
[dev.15] Calculate condensed water flux
cathyxinchangli Oct 16, 2024
997182c
[dev.15] debug
cathyxinchangli Oct 16, 2024
8fa2d87
[dev.15] debug cont'd
cathyxinchangli Oct 16, 2024
1ab522e
[dev.15] debug cont'd
cathyxinchangli Oct 16, 2024
20478c5
[dev.16] add condensate to surface runoff
cathyxinchangli Oct 17, 2024
9a592d1
[dev.16] add condensate to water balance checks
cathyxinchangli Oct 17, 2024
12fabb9
[dev.16] debug
cathyxinchangli Oct 17, 2024
1cb7864
[dev.16] change condensate flux base area
cathyxinchangli Oct 23, 2024
5b3ad0f
[dev.16.1] manual error check
cathyxinchangli Oct 23, 2024
d3d01bb
[dev.16.1] debug
cathyxinchangli Oct 24, 2024
3a67153
[dev.16.1] debug cont'd
cathyxinchangli Oct 24, 2024
7a290f2
[dev.16.1] remove write statements
cathyxinchangli Oct 24, 2024
ad41a81
[dev.16.2] update RH setpoint to 65%
cathyxinchangli Oct 24, 2024
de44b19
[dev.17] output condensate flux
cathyxinchangli May 28, 2025
6dd8032
[dev.17] debug
cathyxinchangli May 28, 2025
c2ab31a
[dev.17] debug
cathyxinchangli May 29, 2025
1b00445
[dev.17] debug
cathyxinchangli May 30, 2025
0d1268e
[dev.18] correct condensate flux calculation
cathyxinchangli Jun 12, 2025
d0af2bf
[dev.18] continue attempting to debug
cathyxinchangli Jun 12, 2025
2a4be85
Revert "[dev.18] continue attempting to debug"
cathyxinchangli Jun 13, 2025
0bf22dc
Revert "[dev.18] correct condensate flux calculation"
cathyxinchangli Jun 13, 2025
df6c4c2
[dev.18] Only correctly condensate flux calc
cathyxinchangli Jun 13, 2025
cd7b25a
[dev.18.01] change where q_buliding(l) is updated
cathyxinchangli Jun 16, 2025
1b1936a
[dev.18.02] debug: output lun level var
cathyxinchangli Jun 17, 2025
b865561
[dev.18.02] cont'd
cathyxinchangli Jun 17, 2025
c683215
[dev.18.02] cont'd 2
cathyxinchangli Jun 17, 2025
34ceff6
[dev.18.03] loop over columns separately
cathyxinchangli Jun 17, 2025
e6069b3
[dev.19] add consistency check
cathyxinchangli Jun 19, 2025
87f91dc
[dev.20] clean up
cathyxinchangli Jun 19, 2025
24e8ff9
Add ac_dehumid master toggle
cathyxinchangli Aug 4, 2026
40511d4
clean up unnecessary comments
cathyxinchangli Aug 5, 2026
3f870b0
Replace ac_dehumid with building humidity modes
cathyxinchangli Aug 8, 2026
02ef8b4
Improve readability
cathyxinchangli Aug 11, 2026
e5c8083
correct typo
cathyxinchangli Aug 11, 2026
3bdd812
update inline comments and var long_name
cathyxinchangli Aug 12, 2026
5b94e6e
Fix conflicts
olyson Aug 12, 2026
b547e72
Fix conflicts
olyson Aug 12, 2026
f59b1f6
Fix build errors
olyson Aug 12, 2026
fff8bfc
address pr comments
cathyxinchangli Aug 26, 2026
b552d64
return white space in errh2o_grc
cathyxinchangli Aug 26, 2026
8f34aa7
fix typos
cathyxinchangli Aug 26, 2026
6143a6d
Get five unit tests working
olyson Aug 27, 2026
af042b6
Replace assignment with variable name
olyson Sep 3, 2026
752b2ea
address additional comments after paired review
cathyxinchangli Sep 7, 2026
ed30f1b
Add this PR's new history fields to the master list .rst file
slevis-lmwg Sep 11, 2026
a559a47
Merge tag 'ctsm5.4.056' into dehumidification_pr
slevis-lmwg Sep 14, 2026
78f95d0
Update history_fields_*.rst with the new fields + correct histFileMod
slevis-lmwg Sep 16, 2026
62d28b5
Merge branch 'master' into dehumidification_pr
slevis-lmwg Sep 17, 2026
93a2a4a
Merge remote-tracking branch 'origin/dehumidification_pr' into dehumi…
slevis-lmwg Sep 17, 2026
2f242ba
First draft ChangeLog/ChangeSum
slevis-lmwg Sep 17, 2026
cecc6b1
Merge remote-tracking branch 'escomp/master' into dehumidification_pr
slevis-lmwg Sep 20, 2026
ec877a5
Updated ChangeLog/Sum
slevis-lmwg Sep 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2403,9 +2403,26 @@ sub setup_logic_urban {

add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'building_temp_method');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_hac');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'building_humidity_mode');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_explicit_ac');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'urban_traffic');
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'init_interp_fill_missing_urban_with_HD');
my $building_humidity_mode = $nl->get_value('building_humidity_mode');
if ($building_humidity_mode < 0 || $building_humidity_mode > 2) {
Comment thread
olyson marked this conversation as resolved.
$log->fatal_error("building_humidity_mode must be 0, 1, or 2");
}
if ($building_humidity_mode >= 1 && $nl->get_value('building_temp_method') != 1) {
$log->fatal_error("building_humidity_mode=1 or 2 requires building_temp_method=1");
}
if ($building_humidity_mode == 2) {
my $urban_hac = remove_leading_and_trailing_quotes($nl->get_value('urban_hac'));
if ($urban_hac ne 'ON' && $urban_hac ne 'ON_WASTEHEAT') {
$log->fatal_error("building_humidity_mode=2 requires urban_hac to be ON or ON_WASTEHEAT");
}
if (! value_is_true($nl->get_value('urban_explicit_ac'))) {
$log->fatal_error("building_humidity_mode=2 requires urban_explicit_ac=.true.");
}
}
}

#-------------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<calc_human_stress_indices >FAST</calc_human_stress_indices>
<calc_human_stress_indices phys="clm4_5" >NONE</calc_human_stress_indices>

<!-- Urban building humidity and air-conditioning dehumidification -->
<building_humidity_mode>0</building_humidity_mode>

<!-- Explicit, time-varying urban air conditioning adoption rate scheme -->
<urban_explicit_ac>.false.</urban_explicit_ac>
<urban_explicit_ac phys="clm6_0" >.true.</urban_explicit_ac>
Expand Down
12 changes: 12 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,18 @@ Turn urban air conditioning/heating ON or OFF and add wasteheat:
<entry id="urban_explicit_ac" type="logical" category="clm_physics"
group="clmu_inparm" valid_values="" >
If TRUE, use explicit, time-varying AC adoption rate for air-conditioning flux and interior building temperature calculations.
See Li et al. (2024), doi:10.1029/2023MS004107
</entry>

<entry id="building_humidity_mode" type="integer" category="clm_physics"
group="clmu_inparm" valid_values="0,1,2" >
Select treatment of indoor building humidity:
Comment thread
olyson marked this conversation as resolved.
0 = Existing CLMU formulation without indoor humidity or air-conditioning dehumidification
1 = Indoor humidity and latent heat exchange without air-conditioning dehumidification
2 = Indoor humidity and latent heat exchange with air-conditioning dehumidification and condensate production
Modes 1 and 2 require building_temp_method=1 (prognostic calculation of interior building temp (clm5_0)).
Mode 2 also requires urban_hac to be ON or ON_WASTEHEAT and urban_explicit_ac=.true.
See Li et al. (2026), doi:10.1038/s44284-026-00474-4
</entry>

<entry id="urban_traffic" type="logical" category="clm_physics"
Expand Down
32 changes: 31 additions & 1 deletion bld/unit_testers/build-namelist_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ sub cat_and_create_namelistinfile {
#
# Figure out number of tests that will run
#
my $ntests = 3411;
my $ntests = 3417;

if ( defined($opts{'compare'}) ) {
$ntests += 2061;
Expand Down Expand Up @@ -634,6 +634,36 @@ sub cat_and_create_namelistinfile {
system( "touch $finidat" );

my %failtest = (
"building humidity mode below range"
=>{ options=>"-envxml_dir .",
namelst=>"building_humidity_mode=-1",
phys=>"clm6_0",
},
"building humidity mode above range"
=>{ options=>"-envxml_dir .",
namelst=>"building_humidity_mode=3",
phys=>"clm6_0",
},
"humidity mode 1 with simple temperature"
=>{ options=>"-envxml_dir .",
namelst=>"building_humidity_mode=1,building_temp_method=0",
phys=>"clm6_0",
},
"humidity mode 2 with simple temperature"
=>{ options=>"-envxml_dir .",
namelst=>"building_humidity_mode=2,building_temp_method=0,urban_hac='ON',urban_explicit_ac=.true.",
phys=>"clm6_0",
},
"humidity mode 2 with AC off"
=>{ options=>"-envxml_dir .",
namelst=>"building_humidity_mode=2,building_temp_method=1,urban_hac='OFF',urban_explicit_ac=.true.",
phys=>"clm6_0",
},
"humidity mode 2 without explicit AC"
=>{ options=>"-envxml_dir .",
namelst=>"building_humidity_mode=2,building_temp_method=1,urban_hac='ON',urban_explicit_ac=.false.",
phys=>"clm6_0",
},
"cmip7_w_issp" =>{ options=>"-envxml_dir . -use_case 1850-2100_SSP2-4.5_transient",
namelst=>"",
CLM_CMIP_ERA=>"cmip7",
Expand Down
74 changes: 74 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,78 @@
===============================================================
Tag name: ctsm5.4.059
Originator(s): cathyxinchangli (Cathy Xinchang Li, U of Illinois - Urbana-Champaign)
Date: Mon Sep 21 10:55:44 AM MDT 2026
One-line Summary: Indoor humidity and A/C dehumidification

Purpose and description of changes
----------------------------------

This PR adds indoor humidity and air-conditioning dehumidification to the CLMU BEM (Building Energy Model). It prognoses indoor specific humidity, calculates sensible cooling and latent dehumidification loads, and diagnoses condensate production and routes the condensate into urban runoff. The behavior is controlled by an integer CLM namelist variable, building_humidity_mode:

0: use the existing CLMU formulation without indoor humidity or AC dehumidification;
1: enable indoor humidity and latent heat exchange, but no AC dehumidification (requires prognostic building temperature, building_temp_method=1); and
2: enable indoor humidity, latent heat exchange, dehumidification load, and condensate production (requires prognostic building temperature, urban_hac to be ON or ON_WASTEHEAT and urban_explicit_ac=.true.).

The default is set to 0 to ensure bit-for-bit reproducibility with the original scheme.

Indoor humidity and air-conditioning dehumidification are described by Li et al. (2026), doi:10.1038/s44284-026-00474-4.

Bugs fixed
----------
List of CTSM issues fixed (include CTSM Issue # and description) [one per line]:
Resolves #4162

Notes of particular relevance for users
---------------------------------------
Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables):
building_humidity_mode is added as a namelist variable

Changes to documentation:
#4195 will address the need for new docs

Contributors:
Lei Zhao (@Face2sea)
Zhiwen Luo
Keith Oleson (@olyson)
Yifan Cheng (@yifanc17)
Xiaoxiong Xie
Alvin C. G. Varquez
Mitsuna Sekiya

Notes of particular relevance for developers:
---------------------------------------------
Changes to tests or testing:
6 new tests in build-namelist_test.pl

Testing summary:
----------------
[PASS means all tests PASS; OK means tests PASS other than expected fails.]

build-namelist tests (if CLMBuildNamelist.pm has changed):

derecho - OK (2 expected fails)

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

derecho ----- OK
izumi ------- OK

Answer changes
--------------
Changes answers relative to baseline: No (read the caveat)

Caveat:
- Results remain bit-for-bit under building_humidity_mode=0 (default).
- Comparing building_humidity_mode=1 with 0, two new variables are added (QBUILD, RHBUILD), and VENTILATION and EFLXBUILD changes because they now include latent heat exchanges between indoors and outdoors, and URBAN_AC and URBAN_HEAT changes slightly because of the changes in ventilation and higher heat capacity of moist air.
- Comparing building_humidity_mode=2 with 1, three more new variables (URBAN_AC_SEN, QCOND_FROM_AC, QCOND_FROM_AC_LUN) are added, and URBAN_AC increases because it now includes sensible (for cooling) and latent (for dehumidification) heat components of urban AC demand. URBAN_HEAT, VENTILATION, EFLXBUILD, WASTEHEAT changes slightly as an indirect results of the changes in AC.

Other details
-------------
Pull Requests that document the changes (include PR ids):
https://github.com/ESCOMP/ctsm/pull/4164

===============================================================
===============================================================
Tag name: ctsm5.4.058
Originator(s): erik (Erik Kluzek,UCAR/TSS,+1 303 497 1326)
Date: Fri Sep 18 02:58:26 PM MDT 2026
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.4.059 cathyxin 09/21/2026 Indoor humidity and A/C dehumidification
ctsm5.4.058 erik 09/18/2026 Merge b4b-dev to master
ctsm5.4.057 erik 09/17/2026 CDEPS/CMEPS updates for CPLHIST mode and 1850 ndep from DATM
ctsm5.4.056 multiple 09/10/2026 Merge the wetlands branch to master
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,13 @@ PROD10C_LOSS - loss from 10-yr wood produc
PROD10N - 10-yr wood product N gN/m^2 F
PROD10N_LOSS - loss from 10-yr wood product pool gN/m^2/s F
PSurf - atmospheric pressure at surface (downscaled for glacier and hillslope columns) Pa F
P_AC - prescribed air-conditioning ownership rate a fraction between 0 and 1 F
Q2M - 2m specific humidity kg/kg T
QAF - canopy air humidity kg/kg F
QBOT - atmospheric specific humidity (downscaled to columns in glacier regions) kg/kg T
QBOT_NOT_DOWNSCALED - atmospheric specific humidity (pre-downscaling) kg/kg F
QBUILD - internal urban building air specific humidity kg/kg F
QCOND_FROM_AC - Condensed water flux from AC dehumidification mm/s F
QDIRECT_THROUGHFALL - direct throughfall of liquid (rain + above-canopy irrigation) mm/s F
QDIRECT_THROUGHFALL_SNOW - direct throughfall of snow mm/s F
QDRAI - sub-surface drainage mm/s T
Expand Down Expand Up @@ -477,6 +480,7 @@ RH2M - 2m relative humidity
RH2M_R - Rural 2m relative humidity % F
RH2M_U - Urban 2m relative humidity % F
RHAF - fractional humidity of canopy air fraction F
RHBUILD - Internal urban building air relative humidity % F
RH_LEAF - fractional humidity at leaf surface fraction F
RSCANOPY - canopy resistance s m-1 T
RSSHA - shaded leaf stomatal resistance s/m T
Expand Down Expand Up @@ -651,6 +655,7 @@ U10_ICE - 10-m wind (ice landunits on
UAF - canopy air speed m/s F
UM - wind speed plus stability effect m/s F
URBAN_AC - urban air conditioning flux W/m^2 T
URBAN_AC_SEN - sensible heat component of urban air conditioning flux W/m^2 F
URBAN_HEAT - urban heating flux W/m^2 T
USTAR - aerodynamical resistance s/m F
UST_LAKE - friction velocity (lakes only) m/s F
Expand Down
Loading
Loading