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

add new awiesm version awiesm-2.6 for fesom-2.6 #1235

Merged
merged 9 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configs/components/echam/echam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ choose_general.iterative_coupling:
submodelctl:
lgfw: "${lgfw}"
lupdate_orog: "${lupdate_orography}"
hosing_correction: 1
hosing_correction: True
'*':
hosing_correction: 0
hosing_correction: False

ini_parent_date: 22941231
ini_parent_exp_id: khw0030
Expand Down
3 changes: 2 additions & 1 deletion configs/components/fesom/fesom-2.6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ required_plugins:

choose_version:
"2.6":
branch: "2.6"
branch: "2.6.1"

"2.6-paleodyn":
branch: "2.6.1"
wiso_code: true
icb_code: true
namelist_dir: "${model_dir}/config/"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
components:
- echam-6.3.05p2-awiesm-2.1
- fesom-2.6-paleodyn
- oasis3mct-2.8-paleodyn
coupling_changes:
- sed -i '/set(FESOM_COUPLED/s/OFF/ON/g' fesom-2.6/CMakeLists.txt
- sed -i '/ECHAM6_COUPLED/s/OFF/ON/g' echam-6.3.05p2/config/mh-linux
- sed -ir '/..FC_DEFINE}__cpl_mpiom/s/..FC_DEFINE}__cpl_mpiom//g' echam-6.3.05p2/configure.ac
22 changes: 22 additions & 0 deletions configs/setups/awiesm/awiesm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,14 @@ general:
- '2.1-wiso'
- '2.1-recom'
- '2.1-paleodyn-2.5'
- '2.6'

choose_version:
'2.6':
couplings:
- fesom-2.6+echam-6.3.05p2-awiesm-2.1
fesom_Dflags: "-DFESOM_COUPLED=ON -DCMAKE_INSTALL_PREFIX=../"
with_recom: false
'2.1-paleodyn-2.5':
couplings:
- fesom-2.5+echam-6.3.05p2-awiesm-2.1
Expand Down Expand Up @@ -195,6 +201,10 @@ echam:
version: "6.3.05p2-awiesm-2.1"
namelist_dir: "${general.esm_namelist_dir}/echam/${version}/${namelist_type}"
model_dir: ${general.model_dir}/echam-6.3.05p2
"2.6":
version: "6.3.05p2-awiesm-2.1"
namelist_dir: "${general.esm_namelist_dir}/echam/${version}/${namelist_type}"
model_dir: ${general.model_dir}/echam-6.3.05p2

# --- icebergs ---
choose_general.with_icb:
Expand Down Expand Up @@ -319,6 +329,16 @@ fesom:
# Variables depending on the general version of AWIESM
# ----------------------------------------------------
choose_general.version:
"2.6":
version: "2.6-paleodyn"
ALE_scheme: 'zstar'
namelist_dir: ${fesom.model_dir}/config/
add_namelist_changes:
namelist.tra:
tracer_phys:
surf_relax_s: 0.0
outdata_targets:
fesom: "*.fesom.*.nc"
"2.1-paleodyn-2.5":
version: "2.5-paleodyn"
ALE_scheme: 'zstar'
Expand Down Expand Up @@ -360,6 +380,8 @@ fesom:

namelist_changes:
namelist.config:
ale_def:
which_ale: "${ALE_scheme}"
paths:
OpbndPath: "${opbnd_dir}"
TideForcingPath: "${tide_forcing_dir}"
Expand Down
12 changes: 6 additions & 6 deletions couplings/echam/coupling_ice2echam.functions
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ ice2echam() {
while [ ${counter} -lt ${COUNT_MAX} ]
do
echo " * inside while loop "
if [ -f ${COUPLE_DIR}/../outdata/pism/latest_ex_file_pism.nc ]; then
if [ -f ${COUPLE_DIR}/ice_file_for_atmosphere.nc ]; then
break
fi

echo; echo " * File ${COUPLE_DIR}/../outdata/pism/latest_ex_file_pism.nc not found. Waiting for 10 seconds ..."
echo; echo " * File ${COUPLE_DIR}/ice_file_for_atmosphere.nc not found. Waiting for 10 seconds ..."
sleep 10
counter=$((counter+1))
done
Expand Down Expand Up @@ -400,7 +400,7 @@ set_glacial_mask_echam_make_dummy_jan_surf() {
set_glacial_mask_jsbach_update_init_file() {
echo; echo " * Generating a new JSBACH init file with updated land cover types"
# Get the Program and required .mod files
if [ -f jsbach_init_file ]; then
if [ -f ${FUNCTION_PATH}/../utils/jsbach_init_file ]; then
cp ${FUNCTION_PATH}/../utils/jsbach_init_file .
elif [ -f ${FUNCTION_PATH}/../utils/install_jsbach_init_file.sh ]; then
echo " install_jsbach_init_file.sh found. Running installation ..."
Expand Down Expand Up @@ -587,9 +587,9 @@ set_glacial_mask_jsbach_update_restart_jsbach() {
echo -e "\t\t- determining where the glacial mask has advanced and retreated"
echo -e "\t\t- New JSBACH Init File: ${COUPLE_DIR}/jsbach_init_file_${CHUNK_START_DATE_echam}-${CHUNK_END_DATE_echam}.nc"
echo -e "\t\t- Old JSBACH Init File: ${FORCING_DIR_jsbach}/jsbach.nc"
cdo -s -selvar,glac -sub \
${COUPLE_DIR}/jsbach_init_file_${CHUNK_START_DATE_echam}-${CHUNK_END_DATE_echam}.nc \
${FORCING_DIR_jsbach}/jsbach.nc \
cdo -s -sub \
-selvar,glac ${COUPLE_DIR}/jsbach_init_file_${CHUNK_START_DATE_echam}-${CHUNK_END_DATE_echam}.nc \
-selvar,glac ${FORCING_DIR_jsbach}/jsbach.nc \
${COUPLE_DIR}/update_land_cover_fractions/jsbach_glac_diff.nc 2>> ${COUPLE_DIR}/update_land_cover_fractions/cdo_stderr_ice2echam

# Make two masks: one for glacial retreat, and one for glacial advance
Expand Down
6 changes: 3 additions & 3 deletions couplings/echam/env_echam.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ def prepare_environment(config):
environment_dict = {
"ICE_TO_ECHAM": int(config["general"]["first_run_in_chunk"]),
"ECHAM_TO_ICE": int(config["general"]["last_run_in_chunk"]),
"ECHAM_TO_ISM_multiyear_mean": 1,
"ECHAM_TO_ISM_multiyear_mean": int(config["echam"].get("multi_year_mean", 1)),
"ISM_TO_ECHAM_update_orography": 1,
"ISM_TO_ECHAM_update_glacial_mask": int(config["echam"].get("update_glacial_mask", True)),
"ISM_TO_ECHAM_update_glacial_mask": int(config["echam"].get("update_glacial_mask", True).__bool__()),
"ISM_TO_ECHAM_update_land_runoff": 1,
"COUPLE_DIR": config["general"]["experiment_couple_dir"],
"RES_echam": config["echam"]["resolution"],
Expand All @@ -27,7 +27,7 @@ def prepare_environment(config):
"MACHINE": config["computer"]["name"],
"MESH_PATH_FESOM": config["fesom"]["mesh_dir"],
"HOSING_FILE_LANDICE_LOSS": config["fesom"].get("fwf_path", config["general"]["experiment_couple_dir"]),
"HOSING_CORRECTION": config["echam"].get("hosing_correction", 0), # LA: Not needed anymore with Lu's ECHAM gfw fix
"HOSING_CORRECTION": int(config["echam"].get("hosing_correction", False).__bool__()), # LA: Not needed anymore with Lu's ECHAM gfw fix
"CELL_AREA_FESOM_FILE": config["fesom"].get("fesom_cell_area_file", "fesom.mesh.diag.nc"),
"ECHAM_ALBEDO_ON_GLACIERS": config["echam"].get("albedo_on_glaciers", 0.7),
"ECHAM_GLACIAL_THRESHOLD": config["echam"].get("glacial_threshold", 0.5),
Expand Down
2 changes: 1 addition & 1 deletion couplings/fesom/coupling_ice2fesom.functions
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function ice2fesom {
. ${FUNCTION_PATH}/../pism/coupling_ocean2pism.functions

echo "ICE_TO_FESOM=${ICE_TO_FESOM:-0}"
if [[ "x$ICE_TO_FESOM"=="x0" ]]; then
if [[ "x$ICE_TO_FESOM" == "x0" ]]; then
echo " NOT generating ice forcing for ocean model"
echo " since ICE_TO_FESOM=${ICE_TO_FESOM}"
return
Expand Down
3 changes: 1 addition & 2 deletions couplings/fesom/env_fesom.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def prepare_environment(config):
environment_dict = {
"ICE_TO_FESOM": config["fesom"].get("use_icebergs", False),
"ICE_TO_FESOM": int(config["fesom"].get("use_icebergs", False).__bool__()),
"FESOM_TO_ICE": int(config["general"]["first_run_in_chunk"]),
"MESH_DIR_fesom": config["fesom"]["mesh_dir"],
"MESH_ROTATED_fesom": config["fesom"]["mesh_rotated"],
Expand All @@ -14,7 +14,6 @@ def prepare_environment(config):
"PYFESOM_PATH": "/pf/a/a270124/pyfesom2/",
"EXP_ID": config["general"]["command_line_config"]["expid"],
"iter_coup_regrid_method_ice2oce": "INTERPOLATE",
"fesom_use_icebergs": config["fesom"].get("use_icebergs", ""),
#"BASIN_FILE": config["fesom"].get("basin_file"),
"MACHINE": config["computer"]["name"],
"ICEBERG_DIR": config["fesom"].get("iceberg_dir", ""),
Expand Down
2 changes: 1 addition & 1 deletion couplings/pism/coupling_atmosphere2pism.functions
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ ic_atm2pism_regrid_downscale_generate_elevation_difference() {
echo " * LA DEBUG: INPUT_FILE_pism = ${INPUT_FILE_pism}"
echo " * LA DEBUG: INPUT_FILE_NAME_BASE_pism = ${INPUT_FILE_NAME_BASE_pism%.*}"
${cdo} -s -add \
-selvar,thk ${INPUT_FILE_pism} \
-setrtoc,-10000,0,0 \
-selvar,thk ${INPUT_FILE_pism} \
-selvar,topg ${INPUT_FILE_pism} \
${COUPLE_DIR}/${elev_hi_file} 2>> ${COUPLE_DIR}/cdo_stderr_atm2pism
fi
Expand Down
Loading