---
title: excess_ice_pr
---
# Excess Ice 2022/06/02
----
## Additional files:
### Input .nc for streams (nuopc/cdeps only)
- exice_init_0.125x0.125_c20220516.nc
- data stream file with inital excess ice concentration ($m^3$/$m^3$)
- exice_init_0.125x0.125_ESMFmesh_c20220516.nc
- mesh for data stream file
### Added files
- `$SRCROOT/cpl/share_esmf/ExcessIceStreamType.F90`
- data stream code
### Control
- `$SRCROOT/bld/CLMBuildNamelist.pm
- added `exice_streams` group
- `$SRCROOT/bld/namelist_files/namelist_definition_ctsm.xml`
- added `use_excess_ice` flag and files for `exice_streams`
- `$SRCROOT/bld/namelist_files/namelist_defaults_ctsm.xml`
- defaults for the namelist entries above
- `$SRCROOT/src/main/clm_varctl.F90`
- added `use_excess_ice` variable
- `$SRCROOT/src/main/controlMod.F90`
- read `use_excess_ice` from the namelist and mpibroadcast it and output value to the lnd.log
### Excess ice variables
- added to `WaterStateType`:
- real `excess_ice_col` - (:,:) excess ice ammount ($kg/m^2$)
- history output `EXCESS_ICE`(active when use_excess_ice)
- real `exice_bulk_init` - (:) initial concentration - col ($m^3/m^3)
- type, private `excessicestream_type` - to call stream data reading
- added to `WaterDiagnosticBulkType`:
- real `exice_subs_col` - (:,:) per layer subsidence due to excess ice melt (m)
- real `exice_subs_tot_col` - (:) total subsidence due to excess ice melt (m)
- history output `SUBSIDENCE`(active when use_excess_ice
- real `exice_vol_col` - (:,:) per layer volumetric excess ice content (m3/m3)
- real `exice_vol_tot_col` - (:) col averaged volumetric excess ice content (m3/m3)
- history output `TOTEXICE_VOL` (active when use_excess_ice
----
everething down from here is in `$SRCROOT/src/biogeophys`
### Cold initialization
- all vars are initalized to 0.0 if `use_excess_ice` is false, in the other case:
- when excess ice is on, soil temperature is initialized to 268.17 K
- `exice_bulk_init` is outputed from reading stream, for each column it's the same as gridcell value
- `excess_ice_col` is 0.0 everywhere except layers from 1m to bedrock depth; values within the column are `exice_bulk_init` scaled by ice density and layer thickness
- diagnostic vars are initalized to zero regardless of the flag
- **soil temperature set to 268.15 in** `TemperatureType%InitCold` **when excess ice is used**
### Restart
- all vars are initalized to 0.0 and are not written to the restart file if `use_excess_ice` is false, in the other case:
- If excess ice variables are present when restart is read, they get the values from the restart file
- If they can't be read the `excess_ice_col` is calculated same way as in the ColdStart except only layers from `altmax_lastyer_indx` to `nbedrock` can contain excess ice
- all vars are written to the restart file
## Implementation
### SoilTemperatureMod
In subroutine `SoilTemperature`:
- added variables `z0`,`zi0` and `dz0` to store vertical structure before anything is calculated.
- `excess_ice_col/denice` is added `dz` and `z`,`zi` are recalculated from new `dz`, they will not differ form `dz`,`z`,`zi` when `use_excess_ice` is false
- all the other subroutines are called as before
- in the end `dz`,`z`,`zi` get back values from `z0`,`zi0` and `dz0`
-
In subroutine `SoilThermProp`
- `excess_ice_col` is added in `thk` and `cv` calculations
In subroutine `Phasechange_beta`
- added `xm2` and `xm3` variables for extra melt of excess ice
- added `wexice0` with initial value from `excess_ice_col` and is added to `wmass0`
- `exice_subs_col` is also passed here
- `imelt` flag for when excess ice is present is set to `1` after the chek for presence of `h2osoi_ice`
- `excess_ice_col` melts in the same manner as `h2osoi_ice` after but only after the latter is zero and there is positive energy left.
- `wexice` is substracted from `wmass0` whenever super cooling is calculated (so supercooled water is only added to the normal ice)
- difference between `wexice0` and updated `excess_ice_col` is added to `temperature_inst%xmf_col` (latent heat of phase change)
- `exice_subs_col` is calculated from the difference above with units in mind
### TotalWaterAndHeat
- `excess_ice_col` is added to `ice_mass` for balances
## Testing
- cold start no excess ice vs default `PASSED` (TSOI, SOILICE, SOILLIQ, ERRSOI, ERRH2O are same)
- no coldstart no excess ice vs default `PASSED` (TSOI, SOILICE, SOILLIQ, ERRSOI, ERRH2O are same)
- hybrid run with excess ice starting from no excess ice restart `PASSED`
- branch run with excess ice starting from no excess ice restart `FAILED`
- missing restart fields are not allowed for branch runs
- no coldstart run with excess ice `PASSED`
- coldstart run with excess ice `PASSED`
- resubmits for all runs `PASSED`
- merge to current master `PASSED`
## Spinup
- Generally, for I1850 compset spinup time from `clmi.I1850Clm50BgcCrop-ciso.1366-01-01.0.9x1.25_gx1v7_simyr1850_c200428.nc` with f19_g16 resolution spinup takes 100-120 years with 1901-1920 looping forcing.
- **NOTE** test I2000 with starting day 1979

## Figures
compset: `1850_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_SMOSART_SGLC_S
WAV_SESP`
resolution: `f19_g16`




compset: `1850_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_SROF_SGLC_S
WAV_SESP`
resolution: `f09_g16`
length of the run: 40 years


comset: `1850_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_SMOSART_SGLC_S
WAV_SESP`
resolution: `f19_g16`
PTS_LAT=58.902
PTS_LON=131.25
length of the run: 100 years
initialization: coldstart
variables smoothed with moving mean with 10 year window


## Extra costs
4 nodes, total 128 cores, yearly output, machine: fram
`--res f09_g16 --compset 1850_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_SROF_SGLC_S
WAV_SESP`
1 year, 10 resubmits:
- average run time:
- default run: 2:45:29
- no excess ice run: 2:46:57
- excess ice run: 2:47:18
- soiltemperature avg max runtime:
- default run: 566.3 sec
- no excess ice run: 644.2 sec
- excess ice run: 644.5
- clm_init1 avg max run time:
- default run: 0.4 sec
- no excess ice run: 0.5 sec
- excess ice run: 0.3 sec
- clm_init2 run avg max time:
- default run: 58.0 sec
- no excess ice run: 55.9 sec
- excess ice run: 61.6 sec
## Questions
Do I understand correctly that when `hist_avgflag_pertape` is not supplied -- the flag defaults to one in the specific field. And the averaging is done over the history the period specified in `hist_nhtfrq`?
## Question along the way:
- `qflx_snomelt_lyr_col` in WaterFluxType is in $mm/s$ (QSNOMELT in history) but in SoilTemperature and SnowHydrology it is in $kg/(m^2s)$
- `xmf` for layers `j<1` and `j>=1` was calculated the same way, but separated by condition
- in `TemperatureType%InitCold` there is `650: use clm_varcon ... sb` but sb is never used in this routine