Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More engineering fixes required for the CICE initialization #993

Open
guillaumevernieres opened this issue Jan 5, 2024 · 1 comment
Open
Assignees
Labels
enhancement New feature or request SOCA Sea-ice, Ocean, and Coupled Assimilation

Comments

@guillaumevernieres
Copy link
Contributor

Description

There are a few more cases for which the CICE model forecast becomes unstable.

Solution

Something needs to be done about snow enthalpy and small sea-ice concentration values.
Solution from Philip Pegion:

  1. Removal of small sea-ice
import xarray as xr
import numpy as np
import sys
import shutil

infile=sys.argv[1]
ds_in=xr.open_dataset(infile)

var_list=['vicen','vsnon','Tsfcn','iage','alvl','vlvl', 'apnd', 'hpnd', 'ipnd',\
 'dhs', 'ffrac', 'sice001', 'qice001', 'sice002', 'qice002', 'sice003', 'qice003',\
 'sice004', 'qice004', 'sice005', 'qice005', 'sice006', 'qice006', 'sice007', 'qice007','qsno001','aicen']
for var in var_list:
    tmparr=np.where(ds_in['aicen'].values >0.15,ds_in[var],0.0)
    ds_in[var][:]=tmparr


new_frac=tmparr.sum(axis=0)
new_mask=np.where(new_frac > 0, 1.0,0.0)
ds_in['iceumask'][:]=new_mask
ds_in.to_netcdf('trimmed_'+infile)
ds_in.close()
shutil.move(infile,'old_'+infile)
shutil.move('trimmed_'+infile,infile)
  1. Limit snow enthalpy
import xarray as xr
import numpy as np
import sys

infile=sys.argv[1]
anl=xr.open_dataset('anl_'+infile)
rhos      = 330.0
cp_ice    = 2106.
c1        = 1.0
Lsub      = 2.835e6
Lvap      = 2.501e6
Lfresh=Lsub - Lvap
rnslyr=1.0
puny=1.0E-012

# icepack formulate for snow temperature
A = c1 / (rhos * cp_ice)
B = Lfresh / cp_ice
zTsn = A * anl['qsno001'][:].values + B
# icepack formula for max snow tempature
Tmax = -anl['qsno001'][:].values*puny*rnslyr /(rhos*cp_ice*anl['vsnon'][:].values)

# enthlap at max now tempetarure
Qmax=rhos*cp_ice*(Tmax-Lfresh/cp_ice)

# fill in new enthalpy where snow temperature is too high
newq=np.where(zTsn <= Tmax,anl['qsno001'][:].values,Qmax)
newf=np.where(anl['vicen'] > 0.00001,anl['aicen'][:].values,0.0)

# fill in snow enthalpy (0) where there is no snow
newq2=np.where(anl['vsnon'][:]==0.0,anl['qsno001'][:].values,newq)
anl['qsno001'][:]=newq2
anl['aicen'][:]=newf
# write out file
anl.to_netcdf(infile)

The above features need to be added to the soca2cice var change.

@guillaumevernieres guillaumevernieres added enhancement New feature or request SOCA Sea-ice, Ocean, and Coupled Assimilation labels Jan 5, 2024
@guillaumevernieres guillaumevernieres self-assigned this Jan 5, 2024
@ShastriPaturi
Copy link
Contributor

Thanks for sharing @guillaumevernieres

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SOCA Sea-ice, Ocean, and Coupled Assimilation
Projects
None yet
Development

No branches or pull requests

2 participants