Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Regarding the issue with soil water simulation

Status
Not open for further replies.

lucia

luyaohuang
Member
Hello everyone,

I've recently encountered some rather perplexing issues. My total forcing rainfall is approximately 300mm, and the annual mean temperature at the station is -6 degrees Celsius. However, when I run the CLM5.0 simulation, the soil volumetric water content reaches 0.5mm3/mm3. I initially thought it might be due to the soil texture, so I set the sand content to 70% (in the top ten layers), clay content to 2%, and organic matter content to 2%. I believed that this configuration would put the soil in a dry state. Nevertheless, I am puzzled as to why the simulated soil volumetric liquid water content remains at 0.5, while the literature observations show values around 0.2. I would like to inquire if there might be a module that I haven't configured correctly, enabled, or disabled, causing my results to be so peculiar.

Here are my running commands:

import xlrd
import os
CDATE = '230914'
swampArray = []
def read_excel():
# ref: Python开发 之 Python3读写Excel文件(较全)_python excel 读写_沙振宇的博客-CSDN博客
workbook = xlrd.open_workbook(r'/data01/huangluyao/hly/model/clm/code/batchOperateClm/batchSurfData/CH4_site/PERMAFROST/per_texture.xls')
sheet = workbook.sheet_by_index(0) # index begin with 0
return sheet
def read_excel2():
# ref: Python开发 之 Python3读写Excel文件(较全)_python excel 读写_沙振宇的博客-CSDN博客
workbook = xlrd.open_workbook(r'/data01/huangluyao/hly/model/clm/code/batchOperateClm/batchSurfData/CH4_site/493site.xls')
sheet = workbook.sheet_by_index(0) # index begin with 0
return sheet
def createCase(caseName):
print("================start createCase================")
parentPath = "/data01/huangluyao/hly/model/clm/code/batchOperateClm/batchSurfData/clm5/cime/scripts/"
os.chdir(parentPath)
createCaseCommand = "./create_newcase --case " + caseName + " --compset 2000_DATM%1PT_CLM50%BGC_SICE_SOCN_MOSART_SGLC_SWAV --res CLM_USRDAT --machine hlyMachine --compiler intel --run-unsupported"
os.system(createCaseCommand)
os.chdir(caseName)
print("================createCase end================")
def xmlChange(caseName, lon, lat):
print("================start xmlChange================")
os.system("./xmlchange CLM_USRDAT_NAME=" + caseName + "/")
os.system("./xmlchange LND_DOMAIN_PATH=/data01/huangluyao/hly/model/clm/cesm/inputdata/share/domains/")
os.system("./xmlchange ATM_DOMAIN_PATH=/data01/huangluyao/hly/model/clm/cesm/inputdata/share/domains/")
domainFile = "domain.lnd.domain.lnd.LON" +str(lon) +"LAT"+str(lat) + "_noocean.nc_domain.ocn_noocean.nc." + CDATE + '.nc'
os.system("./xmlchange ATM_DOMAIN_FILE=" + domainFile)
os.system("./xmlchange LND_DOMAIN_FILE=" + domainFile)
os.system("./xmlchange DATM_MODE='CLM1PT'")
os.system("./xmlchange NTASKS=1")
os.system("./xmlchange DATM_CLMNCEP_YR_ALIGN=1979")
os.system("./xmlchange DATM_CLMNCEP_YR_START=1979")
os.system("./xmlchange DATM_CLMNCEP_YR_END=1989")
os.system("./xmlchange DIN_LOC_ROOT=/data01/huangluyao/hly/model/clm/cesm/inputdata")
os.system("./xmlchange DIN_LOC_ROOT_CLMFORC=/data01/huangluyao/hly/model/clm/cesm/inputdata/lmwg")
os.system("./xmlchange RUN_STARTDATE=1979-01-01")
os.system("./xmlchange STOP_N=10")
os.system("./xmlchange STOP_OPTION=nyears")
os.system("./xmlchange RESUBMIT=59")
os.system("./xmlchange CLM_ACCELERATED_SPINUP='on'")
os.system("./xmlchange CLM_FORCE_COLDSTART='on'")
os.system("./xmlchange REST_OPTION=nyears")
os.system("./xmlchange REST_OPTION=nyears")
print("================createCase end================")
def setup():
print("================start setup================")
os.system("./case.setup")
print("================setup end================")
def alterFile(lon, lat):
print("================start alterFile================")
# alter user_nl_clm
fsurdat = "fsurdat=\\'/data01/huangluyao/hly/model/clm/cesm/inputdata/lnd/clm2/surfdata_map/ch4_permafrsot/deal/surfdata_LON" + str(lon) +"LAT"+ str(lat) + "_16pfts_Irrig_CMIP6_simyr2000_c"+CDATE+".nc\\'"
os.system("echo " + fsurdat + " >> ./user_nl_clm")
os.system("echo hist_mfilt = 12>> ./user_nl_clm")
os.system("echo hist_nhtfrq = 0 >> ./user_nl_clm")
os.system("echo use_bedrock = .false. >> ./user_nl_clm")
stream_fldfilename_ch4finundated = "stream_fldfilename_ch4finundated=\\'/data01/huangluyao/hly/model/clm/cesm/inputdata/lnd/clm2/paramdata/finundated_inversiondata_0.9x1.25_c170706.nc\\'"
os.system("echo " + stream_fldfilename_ch4finundated + " >> ./user_nl_clm")
paramfile = "paramfile =\\'/data01/huangluyao/hly/model/clm/cesm/inputdata/lnd/clm2/paramdata/fenghuoshan/para1/para_literature/clm5_params.c171117.nc\\'"
os.system("echo " + paramfile + " >> ./user_nl_clm")
# for index in range(len(swampArray)):
# if (swampArray[index][0] == 1) & (swampArray[index][1] == 2):
# os.system("echo baseflow_scalar = 0 >> ./user_nl_clm")
# break
# alter user_nl_datm
os.system('echo taxmode = \\"cycle\\", \\"cycle\\", \\"cycle\\" >> ./user_nl_datm')
print("================alterFile end================")
def previewNameList():
print("================start previewNameList================")
os.system("./preview_namelists")
print("================previewNameList end================")
def makeUserFile(lon, lat):
print("================start makeUserFile================")
caseDocFilePath = "/data01/huangluyao/hly/model/clm/code/batchOperateClm/spinuserfile/permafrost_ch4/LON" + str(lon) + "LAT" + str(lat)
os.system("cp " + caseDocFilePath + "/user_datm.streams.txt.CLM1PT.CLM_USRDAT ./")
print("================makeUserFile end================")
def build():
print("================start build================")
os.system("./case.build --skip-provenance-check")
print("================build end================")
def submit():
print("================start submit================")
os.system("nohup ./case.submit &")
print("================submit end================")
def formatNum(num):
if num % 1 == 0.0:
return int(num)
return num
def makeSwampArray():
sheet = read_excel2()
for row in range(sheet.nrows):
swampArray.append([formatNum(sheet.cell_value(row, 0)), formatNum(sheet.cell_value(row, 1))])
if __name__ == '__main__':
# set swamp array
makeSwampArray()
# get first sheet in excel file
sheet = read_excel()
for row in range(sheet.nrows):
lon = formatNum(sheet.cell_value(row, 0))
lat = formatNum(sheet.cell_value(row, 1))
caseName = "s" + str(lon) + str(lat) + "_pf4"
createCase(caseName)
xmlChange(caseName, lon, lat)
setup()
alterFile(lon, lat)
previewNameList()
makeUserFile(lon, lat)
previewNameList()
build()
submit()
print("LON" + str(lon) + "LAT" + str(lat) + " submit success")

May I inquire if there is anything I haven't configured or activated correctly? I would greatly appreciate any suggestions from any of you
 

slevis

Moderator
Staff member
Just to make sure I understand:
The model runs without errors and simulates a soil moisture that is different from the observed?
 

lucia

luyaohuang
Member
Hello,slevis, you are absolutely right. My soil moisture simulation appears to be excessively high. However, it seems that I made an error in specifying the land cover type; it should have been grassland, but I mistakenly set it as a forest. I will adjust the land cover type to grassland and continue the simulation to observe the results. Thank you for your response.
 
Status
Not open for further replies.
Top