-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
114 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,41 @@ | ||
# NorCPM_esp | ||
|
||
# NorCPM Structure | ||
|
||
### Scientific description: | ||
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1169902.svg)](https://doi.org/10.5281/zenodo.1169902) | ||
|
||
### Overview | ||
NorCPM do ensemble data assimilation with NorESM1 and 2. NorCPM_ESP apply the process as an ESP component in NorESM2. Which modify model data in memory to reduce overhead time from restarting model. | ||
NorCPM_esp runs as a ESP (External System Processing) component, which is introduced since CESM2. Also in NorESM2 | ||
|
||
For now NorCPM_ESP is only DA for BLOM component. | ||
|
||
It is still under development. | ||
This component runs after all other componets at every time step, and takes no effect by default. | ||
|
||
### Usage | ||
The content in cime_config/config_compsets.xml is needed to insert to NorESM/cime_config/config_compsets.xml | ||
In NorCPM_esp, this is used to run data assimilation. Including read observation data, calculation EnKF and feedback to model. | ||
|
||
For the EnKF (Ensemble Kalman Filter), which is necessary to have multiple ensemble members. | ||
|
||
The multiple instances function is also introduced in CESM2. Which runs multiple copies of model. | ||
|
||
Check the test script in 'testscript/'. | ||
|
||
### Required settings | ||
1. Compset need be set to NHISTNCPM or NHISTNCPMfrc2 | ||
2. NINST must larger than 1. 10 is suggested for scientific meaning. | ||
3. NTASKS can be default but need to be multiple to NINST. | ||
However, it is suggested to use one node per instance (Betzy) | ||
The NTASKS_ESP need to cover all CPUs. | ||
|
||
Detail setting can be found in doc/create_norcpm_esp.sh | ||
|
||
### Usage | ||
Please start from [NorESM repo](https://github.com/NorESMhub/NorESM). | ||
In file Externals.cfg, [norcpm] section, set the required from False to True. | ||
Then use manage_externals/checkout_externals to download components. | ||
The test script can be found in NorESM/components/norcpm/doc/create_norcpm_esp.sh. | ||
Most of the settings are in env_run.xml, start with NORCPM_. | ||
|
||
### Portability | ||
It only tested on Betzy. | ||
|
||
The SST DA needs monthly file named as YYYY_MM_DD.nc and placed at specific structure of directory. | ||
|
||
### Issues | ||
1. Only OISST(daily), EN4 profiles(monthly, temperature and salnity) supported. | ||
2. Data assimilation(DA) only when middle day of model (43200) instead of day begin (00000) due to the restart time. | ||
3. EN4 DA takes more than 20 secs. Which is due to parallel method. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
#!/bin/bash -e | ||
|
||
case=norcpm_esp_test01 | ||
NINST=10 | ||
compset=NHISTNCPM | ||
STOP_N=1 | ||
STOP_OPTION=nmonth | ||
NTASKS_CPL=$((128*$NINST)) | ||
NTASKS_ATM=$((128*$NINST)) | ||
NTASKS_LND=$((128*$NINST)) | ||
NTASKS_ICE=$((128*$NINST)) | ||
NTASKS_OCN=$((123*$NINST)) #### blom_dimensions: Available processor counts: 32 42 63 77 91 123 156 186 256 354 | ||
NTASKS_ROF=$((128*$NINST)) | ||
NTASKS_GLC=$((128*$NINST)) | ||
NTASKS_WAV=$((128*$NINST)) | ||
NTASKS_ESP=$((128*$NINST)) | ||
ROOTPE_CPL=0 | ||
ROOTPE_ATM=0 | ||
ROOTPE_LND=0 | ||
ROOTPE_ICE=0 | ||
ROOTPE_OCN=0 | ||
ROOTPE_ROF=0 | ||
ROOTPE_GLC=0 | ||
ROOTPE_WAV=0 | ||
ROOTPE_ESP=0 | ||
|
||
MULTI_DRIVER=FALSE | ||
## DO NOT set anything about PAUSE | ||
|
||
pecount=S | ||
compset=${compset:-NHIST} ## NorESM | ||
res=${res:-f19_tn14} ## NorESM | ||
noresmdir="./NorESM" | ||
caseroot=. | ||
|
||
## cleaning old build | ||
echo "To clean old build:" | ||
echo " rm -rf ~/work/{archive,noresm,.}/${case}" | ||
if [ "$1" == "delete" ] ;then | ||
echo 'cleaning old bld' | ||
rm -rf ~/work/{archive,noresm,.}/${case} | ||
rm -rf ${caseroot}/${case}/ | ||
if [ "$2" == "only" ] ;then | ||
exit | ||
fi | ||
fi | ||
|
||
${noresmdir}/cime/scripts/./create_newcase --case ${case} --mach betzy --res ${res} --compset ${compset} --project nn9039k | ||
|
||
|
||
cd ${caseroot}/${case} | ||
|
||
## set NTASKS and ROOTPE | ||
./xmlchange NTASKS_ATM=$NTASKS_ATM,ROOTPE_ATM=$ROOTPE_ATM | ||
./xmlchange NTASKS_LND=$NTASKS_LND,ROOTPE_LND=$ROOTPE_LND | ||
./xmlchange NTASKS_ICE=$NTASKS_ICE,ROOTPE_ICE=$ROOTPE_ICE | ||
./xmlchange NTASKS_OCN=$NTASKS_OCN,ROOTPE_OCN=$ROOTPE_OCN | ||
./xmlchange NTASKS_CPL=$NTASKS_CPL,ROOTPE_CPL=$ROOTPE_CPL | ||
./xmlchange NTASKS_GLC=$NTASKS_GLC,ROOTPE_GLC=$ROOTPE_GLC | ||
./xmlchange NTASKS_ROF=$NTASKS_ROF,ROOTPE_ROF=$ROOTPE_ROF | ||
./xmlchange NTASKS_WAV=$NTASKS_WAV,ROOTPE_WAV=$ROOTPE_WAV | ||
./xmlchange NTASKS_ESP=$NTASKS_ESP,ROOTPE_ESP=$ROOTPE_ESP | ||
|
||
## multi-instance | ||
./xmlchange NINST_ATM=$NINST | ||
./xmlchange NINST_LND=$NINST | ||
./xmlchange NINST_ICE=$NINST | ||
./xmlchange NINST_ROF=$NINST | ||
./xmlchange NINST_GLC=$NINST | ||
./xmlchange NINST_OCN=$NINST | ||
./xmlchange NINST_WAV=$NINST | ||
./xmlchange NINST_ESP=$NINST | ||
|
||
./xmlchange STOP_N=STOP_N | ||
./xmlchange STOP_OPTION=STOP_OPTION | ||
./xmlchange --subgroup case.run JOB_WALLCLOCK_TIME=72:00:00 | ||
./xmlchange RUN_STARTDATE=1982-01-01 | ||
|
||
## soft link makes life easier | ||
ln -s $(./xmlquery RUNDIR --value) ./run | ||
ln -s $(./xmlquery EXEROOT --value) ./bld | ||
ln -s $(./xmlquery DOUT_S_ROOT --value) ./archive | ||
|
||
./case.setup | ||
#./preview_namelists | ||
./case.build | ||
./case.submit |