FWHIST 實驗

一株草的世界發表於2020-10-22

大氣化學模組

[sysu_syli_3@ln42%tianhe2-H FWHIST-BGC]$ ./xmlquery CAM_CONFIG_OPTS
	CAM_CONFIG_OPTS: -phys cam6 -age_of_air_trcs -chem waccm_tsmlt_mam4

./xmlchange --append "CAM_CONFIG_OPTS=-phys cam6 -chem none"

[sysu_syli_3@ln42%tianhe2-H FWHIST-BGC]$ ./xmlquery CAM_CONFIG_OPTS
	CAM_CONFIG_OPTS: -phys cam6 -age_of_air_trcs -chem waccm_tsmlt_mam4 -phys cam6 -chem none

查詢變數在哪個檔案中grep

grep CAM_CONFIG_OPTS*.xml

1. 預設,關閉大氣化學模組

1.1 create_newcase

vim FWHIST_BGCtest.sh
source FWHIST_BGCtest.sh

./create_newcase --compset FWHIST_BGC --res f09_f09_mg17 --case ~/CESM2/scratch/FWHIST_BGCtest &> FWHIST_BGCtest.create_newcase.log

在這裡插入圖片描述

查詢並修改PE配置:

[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./preview_run
CASE INFO:
  nodes: 1
  total tasks: 24
  tasks per node: 24
  thread count: 1

BATCH INFO:
ERROR: Do not know about batch job case.run
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./xmlquery NTASKS,NTHRDS,ROOTPE

Results in group mach_pes
	NTASKS: ['CPL:24', 'ATM:24', 'LND:24', 'ICE:24', 'OCN:24', 'ROF:24', 'GLC:24', 'WAV:24', 'ESP:1']
	NTHRDS: ['CPL:1', 'ATM:1', 'LND:1', 'ICE:1', 'OCN:1', 'ROF:1', 'GLC:1', 'WAV:1', 'ESP:1']
	ROOTPE: ['CPL:0', 'ATM:0', 'LND:0', 'ICE:0', 'OCN:0', 'ROF:0', 'GLC:0', 'WAV:0', 'ESP:0']

[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./xmlchange NTASKS=120
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./xmlchange NTASKS_ESP=5

1.2. setup

[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./case.setup
/BIGDATA1/sysu_syli_3/CESM2/scratch/FWHIST_BGCtest/env_mach_specific.xml already exists, delete to replace
job is case.run USER_REQUESTED_WALLTIME None USER_REQUESTED_QUEUE None WALLTIME_FORMAT %H:%M:%S
Creating batch scripts
Writing case.run script from input template /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/cime/config/cesm/machines/template.case.run
Creating file .case.run
Writing case.st_archive script from input template /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/cime/config/cesm/machines/template.st_archive
Creating file case.st_archive
Creating user_nl_xxx files for components and cpl
If an old case build already exists, might want to run 'case.build --clean' before building
You can now run './preview_run' to get more info on how your case will be run

修改user_nl_clm

vim user_nl_clm

hist_empty_htapes = .true 
hist_avgflag_pertape = 'A'
hist_nhtfrq = 0
hist_mfilt = 1
hist_fincl1="QOVER","QH2OSFC","H2OSOI","GPP","NPP","NEP","TLAI","FLDS","FSDS","Rnet","QVEGT","QSOIL","QINTR","FSH","TSA","Q2M"

setup成功之後,CASEROOT/run 目錄和CASEROOT/bld/ 目錄:
在這裡插入圖片描述
在這裡插入圖片描述

修改大氣化學模組

[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./xmlquery CAM_CONFIG_OPTS
	CAM_CONFIG_OPTS: -phys cam6 -age_of_air_trcs -chem waccm_tsmlt_mam4
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./xmlchange --append "CAM_CONFIG_OPTS=-phys cam6 -chem none"
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./xmlquery CAM_CONFIG_OPTS
	CAM_CONFIG_OPTS: -phys cam6 -age_of_air_trcs -chem waccm_tsmlt_mam4 -phys cam6 -chem none

1.3. build

# 查詢
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./xmlquery STOP_OPTION,STOP_N,RUN_TYPE,CONTINUE_RUN,RUN_REFCASE,RUN_REFDATE,RESUBMIT,RUN_STARTDATE,RUN_REFDIR,DOUT_S,DOUT_S_ROOT,JOB_WALLCLOCK_TIME

Results in group case.run
	JOB_WALLCLOCK_TIME: 00:20:00

Results in group case.st_archive
	JOB_WALLCLOCK_TIME: 0:20:00

Results in group run_begin_stop_restart
	STOP_OPTION: ndays
	STOP_N: 5
	RUN_TYPE: hybrid
	CONTINUE_RUN: FALSE
	RUN_REFCASE: b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.001_v2
	RUN_REFDATE: 1950-01-01
	RESUBMIT: 0
	RUN_STARTDATE: 1950-01-01
	RUN_REFDIR: cesm2_init

Results in group run_data_archive
	DOUT_S: FALSE

Results in group run_dout
	DOUT_S_ROOT: /BIGDATA1/sysu_syli_3/CESM2/scratch/FWHIST_BGCtest/archive

# 更改一些設定
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./xmlchange DOUT_S=TRUE
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./xmlchange JOB_WALLCLOCK_TIME=12:00:00
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCtest]$ ./xmlchange STOP_N=3,STOP_OPTION=nmonths

不斷地通過build來獲取輸入資料連結,重新下載資料

./case.build --skip-provenance-check

嘗試重新下載資料:

cp -a /BIGDATA1/sysu_syli_3/Inputdata/cesm2_init/b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.001_v2/1950-01-01/ /BIGDATA1/sysu_syli_3/inputdata/cesm2_init/b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.001_v2/1950-01-01/

chmod -R 755 /BIGDATA1/sysu_syli_3/inputdata/

沒有輸入資料並不影響build是否成功?
input file list檔案是通過/preview_namelist命令產生,有了input file list檔案才可以./check_input_data

1.4. submit

./case.submit &> BHISTtest_submit.log

報錯:

000: ERROR: chem_surfvals_readnl:: ERROR reading namelist
在這裡插入圖片描述

在這裡插入圖片描述

2. 嘗試將run_type=startup

在這裡插入圖片描述

2.1 create newcase

vim FWHIST_BGCstartup.sh
source FWHIST_BGCstartup.sh

./create_newcase --compset FWHIST_BGC --res f09_f09_mg17 --case ~/CESM2/scratch/FWHIST_BGCstartup &> FWHIST_BGCstartup.create_newcase.log

查詢並修改PE配置:

[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./xmlquery NTASKS,NTHRDS,ROOTPE

Results in group mach_pes
	NTASKS: ['CPL:24', 'ATM:24', 'LND:24', 'ICE:24', 'OCN:24', 'ROF:24', 'GLC:24', 'WAV:24', 'ESP:1']
	NTHRDS: ['CPL:1', 'ATM:1', 'LND:1', 'ICE:1', 'OCN:1', 'ROF:1', 'GLC:1', 'WAV:1', 'ESP:1']
	ROOTPE: ['CPL:0', 'ATM:0', 'LND:0', 'ICE:0', 'OCN:0', 'ROF:0', 'GLC:0', 'WAV:0', 'ESP:0']
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./xmlchange NTASKS=120
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./xmlchange NTASKS_ESP=5
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./xmlquery NTASKS,NTHRDS,ROOTPE

Results in group mach_pes
	NTASKS: ['CPL:120', 'ATM:120', 'LND:120', 'ICE:120', 'OCN:120', 'ROF:120', 'GLC:120', 'WAV:120', 'ESP:5']
	NTHRDS: ['CPL:1', 'ATM:1', 'LND:1', 'ICE:1', 'OCN:1', 'ROF:1', 'GLC:1', 'WAV:1', 'ESP:1']
	ROOTPE: ['CPL:0', 'ATM:0', 'LND:0', 'ICE:0', 'OCN:0', 'ROF:0', 'GLC:0', 'WAV:0', 'ESP:0']

預設設定:

[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./xmlquery STOP_OPTION,STOP_N,RUN_TYPE,CONTINUE_RUN,RUN_REFCASE,RUN_REFDATE,RUN_STARTDATE,RUN_REFDIR,DOUT_S,DOUT_S_ROOT,JOB_WALLCLOCK_TIME,RESUBMIT

Results in group case.run
	JOB_WALLCLOCK_TIME: 00:20:00

Results in group case.st_archive
	JOB_WALLCLOCK_TIME: 0:20:00

Results in group run_begin_stop_restart
	STOP_OPTION: ndays
	STOP_N: 5
	RUN_TYPE: hybrid
	CONTINUE_RUN: FALSE
	RUN_REFCASE: b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.001_v2
	RUN_REFDATE: 1950-01-01
	RESUBMIT: 0
	RUN_STARTDATE: 1950-01-01
	RUN_REFDIR: cesm2_init

Results in group run_data_archive
	DOUT_S: FALSE

Results in group run_dout
	DOUT_S_ROOT: /BIGDATA1/sysu_syli_3/CESM2/scratch/FWHIST_BGCstartup/archive

修改RUN_TYPE=startup

[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./xmlquery RUN_TYPE,CONTINUE_RUN,RUN_REFCASE,RUN_REFDATE,RUN_STARTDATE,RUN_REFDIR,GET_REFCASE

Results in group run_begin_stop_restart
	RUN_TYPE: hybrid
	CONTINUE_RUN: FALSE
	RUN_REFCASE: b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.001_v2
	RUN_REFDATE: 1950-01-01
	RUN_STARTDATE: 1950-01-01
	RUN_REFDIR: cesm2_init
	GET_REFCASE: TRUE

[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./xmlchange RUN_TYPE=startup,RUN_REFCASE=case.std,RUN_REFDATE=0001-01-01,RUN_STARTDATE=1850-01-01,GET_REFCASE=FALSE
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./xmlquery RUN_TYPE,CONTINUE_RUN,RUN_REFCASE,RUN_REFDATE,RUN_STARTDATE,RUN_REFDIR,GET_REFCASE

Results in group run_begin_stop_restart
	RUN_TYPE: startup
	CONTINUE_RUN: FALSE
	RUN_REFCASE: case.std
	RUN_REFDATE: 0001-01-01
	RUN_STARTDATE: 1850-01-01
	RUN_REFDIR: cesm2_init
	GET_REFCASE: FALSE

2.2 setup

[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./case.setup 
/BIGDATA1/sysu_syli_3/CESM2/scratch/FWHIST_BGCstartup/env_mach_specific.xml already exists, delete to replace
job is case.run USER_REQUESTED_WALLTIME None USER_REQUESTED_QUEUE None WALLTIME_FORMAT %H:%M:%S
Creating batch scripts
Writing case.run script from input template /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/cime/config/cesm/machines/template.case.run
Creating file .case.run
Writing case.st_archive script from input template /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/cime/config/cesm/machines/template.st_archive
Creating file case.st_archive
Creating user_nl_xxx files for components and cpl
If an old case build already exists, might want to run 'case.build --clean' before building
You can now run './preview_run' to get more info on how your case will be run

修改user_nl_clm

vim user_nl_clm

hist_empty_htapes = .true 
hist_avgflag_pertape = 'A'
hist_nhtfrq = 0  
hist_mfilt = 1
hist_fincl1="QOVER","QH2OSFC","H2OSOI","GPP","NPP","NEP","TLAI","FLDS","FSDS","Rnet","QVEGT","QSOIL","QINTR","FSH","TSA","Q2M"

修改大氣化學模組

[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./xmlquery CAM_CONFIG_OPTS
	CAM_CONFIG_OPTS: -phys cam6 -age_of_air_trcs -chem waccm_tsmlt_mam4
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./xmlchange "CAM_CONFIG_OPTS=-phys cam6 -chem none"
[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./xmlquery CAM_CONFIG_OPTS
	CAM_CONFIG_OPTS: -phys cam6 -chem none

2.3 build

事先通過./preview_namelists 生成所需的輸入檔案連結列表,隨後利用./check_input_data 檢查缺失的輸入資料,利用wget下載準備好。

[sysu_syli_3@ln42%tianhe2-H FWHIST_BGCstartup]$ ./preview_namelists 
Creating component namelists
   Calling /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/components/cam//cime_config/buildnml
     ...calling cam buildcpp to set build time options
CAM namelist copy: file1 /BIGDATA1/sysu_syli_3/CESM2/scratch/FWHIST_BGCstartup/Buildconf/camconf/atm_in file2 /BIGDATA1/sysu_syli_3/CESM2/scratch/FWHIST_BGCstartup/run/atm_in 
   Calling /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/components/clm//cime_config/buildnml
   Calling /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/components/cice//cime_config/buildnml
     ...buildnml calling cice buildcpp to set build time options
   Calling /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/cime/src/components/data_comps/docn/cime_config/buildnml
   Calling /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/components/mosart//cime_config/buildnml
   Running /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/components/cism//cime_config/buildnml 
   Calling /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/cime/src/components/stub_comps/swav/cime_config/buildnml
   Calling /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/cime/src/components/stub_comps/sesp/cime_config/buildnml
   Calling /BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/cime/src/drivers/mct/cime_config/buildnml
   NOTE: ignoring setting of rof2ocn_ice_rmapname=idmap in seq_maps.rc
   NOTE: ignoring setting of rof2ocn_liq_rmapname=idmap in seq_maps.rc
Finished creating component namelists

./check_input_data --download &> FWHIST_BGCstartup.input.log
Loading input file list: 'Buildconf/cpl.input_data_list'
Loading input file list: 'Buildconf/mosart.input_data_list'
Loading input file list: 'Buildconf/cism.input_data_list'
Loading input file list: 'Buildconf/clm.input_data_list'
  Model clm missing file finidat = '/BIGDATA1/sysu_syli_3/CESM2/inputdata/lnd/clm2/initdata_map/clmi.B1850.1171-01-01.0.9x1.25_gx1v7_simyr1850_c181029.nc'
Loading input file list: 'Buildconf/cice.input_data_list'
Loading input file list: 'Buildconf/docn.input_data_list'
Loading input file list: 'Buildconf/cam.input_data_list'
  Model cam missing file ncdata = '/BIGDATA1/sysu_syli_3/CESM2/inputdata/cesm2_init/b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.001/1950-01-01/b.e21.BWHIST.f09_g17.CMIP6-historical-WACCM.001.cam.i.1950-01-01-00000.nc'
Client protocol gftp not enabled
Using protocol wget with user anonymous and passwd user@example.edu
Could not connect to repo 'ftp://ftp.cgd.ucar.edu/cesm/inputdata'
This is most likely either a proxy, or network issue .
Trying to download file: '../inputdata_checksum.dat' to path '/BIGDATA1/sysu_syli_3/CESM2/scratch/FWHIST_BGCstartup/run/inputdata_checksum.dat.raw' using NoneType protocol.
Traceback (most recent call last):
  File "./check_input_data", line 76, in <module>
    _main_func(__doc__)
  File "./check_input_data", line 71, in _main_func
    chksum=chksum) else 1)
  File "/BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/cime/scripts/Tools/../../scripts/lib/CIME/case/check_input_data.py", line 163, in check_all_input_data
    _download_checksum_file(self.get_value("RUNDIR"))
  File "/BIGDATA1/sysu_syli_3/CESM2/my_cesm_sandbox/cime/scripts/Tools/../../scripts/lib/CIME/case/check_input_data.py", line 54, in _download_checksum_file
    success = server.getfile(rel_path, new_file)
AttributeError: 'NoneType' object has no attribute 'getfile'
./case.build --skip-provenance-check &> FWHIST_BGCstartup_build.log