Commit 4dcfdd11 authored by Lars Ackermann's avatar Lars Ackermann

fix some bugs in ocean pism and pism ocean coupling

parent a857886f
......@@ -301,15 +301,6 @@ function fesom_ice_fesom_build_grid_with_lonlat_depth {
fi
done
# Several things might be needed for pyfesom. If it isn't installed;
# get it
which pip && \
for required_python_external in joblib cmocean; do
python -c "import $required_python_external" \
|| pip install --user ${required_python_external} \
&& echo -e "\t\t - Using existing ${required_python_external} for python"
done
processed_fesom1x_file3D_T_list_for_ice=""
processed_fesom1x_file3D_S_list_for_ice=""
processed_fesom1x_file2D_list_for_ice=""
......@@ -372,6 +363,15 @@ function fesom_ice_fesom_build_grid_with_lonlat_depth {
echo " ## Do not activate HOT fix"
echo "=====## ---------------------------------------------------------------"
fi
# Several things might be needed for pyfesom. If it isn't installed;
# get it
which pip && \
for required_python_external in joblib cmocean seawater; do
python -c "import $required_python_external" \
|| pip install --user ${required_python_external} \
&& echo -e "\t\t - Using existing ${required_python_external} for python"
done
# --------------------------------------------------------
# ------------------------------------------------
......
......@@ -344,7 +344,7 @@ set_glacial_mask_jsbach_update_init_file() {
res_oce=GENERIC
ntiles=11 # number of jsbach tiles
dynveg=true # setup for dynamic vegetation
dynveg=${ldynveg_esm} # setup for dynamic vegetation
c3c4crop=true # differentiate between C3 and C4 crops
lpasture=true # distinguish pastures from grasses
......@@ -481,7 +481,7 @@ EOF
echo "error in jsbach_init_file"
exit 1
fi
mv jsbach_${res_atm}_11tiles_5layers_1850.nc ${COUPLE_DIR}/jsbach_init_file_${CHUNK_START_DATE_echam}-${CHUNK_END_DATE_echam}.nc
mv jsbach_${res_atm}${res_oce}_11tiles_5layers_1850${jsbach_nc}.nc ${COUPLE_DIR}/jsbach_init_file_${CHUNK_START_DATE_echam}-${CHUNK_END_DATE_echam}.nc
echo :> ${COUPLE_DIR}/jsbach_init_override_${CHUNK_START_DATE_echam}-${CHUNK_END_DATE_echam}.dat
echo "LAND_BOUNDARY_CONDITIONS_jsbach=${COUPLE_DIR}/jsbach_init_file_${CHUNK_START_DATE_echam}-${CHUNK_END_DATE_echam}.nc" > ${COUPLE_DIR}/jsbach_init_override_${CHUNK_START_DATE_echam}-${CHUNK_END_DATE_echam}.dat
add_to ${COUPLE_DIR}/jsbach_init_override_${CHUNK_START_DATE_echam}-${CHUNK_END_DATE_echam}.dat jsbach_init_override.dat config jsbach
......@@ -685,7 +685,18 @@ set_in_jsbach_restart_file() {
echo " in: $SOURCE_FILENAME"
if [ ! -z $unpack ]; then
echo " - with unpacking from landpoint grid to latlon grid"
python ${FUNCTION_PATH}/unpack_jsbach.py $TARGET_VARNAME $RESTART_FILE
###################################################
# LA: There is a syntax error with the asteriks in the 'pack_jsbach.py' for newer
# python 2.7 versions
##################################################
module unload python3
module load python3
echo "########################"
echo "python version:"
pyv="$(python3 -V 2>&1)"
echo "$pyv"
python3 ${FUNCTION_PATH}/unpack_jsbach.py $TARGET_VARNAME $RESTART_FILE
################################################################################
# $ cdo -h replace
# NAME
......@@ -705,7 +716,7 @@ set_in_jsbach_restart_file() {
${TARGET_VARNAME}_lonlat_grid_replaced.nc
echo " - and repacking from latlon grid to landpoint grid"
# FIXME: The next line is probably wrong, or incomplete.
python ${FUNCTION_PATH}/pack_jsbach.py ${TARGET_VARNAME} ${TARGET_VARNAME}_lonlat_grid_replaced.nc ${RESTART_FILE}
python3 ${FUNCTION_PATH}/pack_jsbach.py ${TARGET_VARNAME} ${TARGET_VARNAME}_lonlat_grid_replaced.nc ${RESTART_FILE}
else
cdo -s replace \
${RESTART_FILE} \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment