From dcb9d8c277c09c615610444d82ce55a215ad858c Mon Sep 17 00:00:00 2001 From: ackerlar Date: Tue, 30 Apr 2024 11:53:23 +0200 Subject: [PATCH 1/4] add wait_for_files in PISM recipe --- configs/components/pism/pism.recipes.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/components/pism/pism.recipes.yaml b/configs/components/pism/pism.recipes.yaml index 10fe9dea4..195ddab7c 100644 --- a/configs/components/pism/pism.recipes.yaml +++ b/configs/components/pism/pism.recipes.yaml @@ -15,6 +15,7 @@ prepcompute_recipe: - "assemble" - "log_used_files" + - "wait_for_iterative_coupling" - "_write_finalized_config" #- "assemble_filelists" #- "copy_tools_to_thisrun" From 0fe97b7f894e046b7e2a958e0c042034575c0658 Mon Sep 17 00:00:00 2001 From: ackerlar Date: Tue, 30 Apr 2024 12:00:26 +0200 Subject: [PATCH 2/4] fix fesom pism coupling --- couplings/fesom/coupling_fesom2ice.functions | 3 +- couplings/fesom/coupling_ice2fesom.functions | 38 ++----------------- couplings/fesom/env_fesom.py | 2 +- .../utils/fesom_scalar_array_to_LonLat.py | 6 +-- 4 files changed, 9 insertions(+), 40 deletions(-) diff --git a/couplings/fesom/coupling_fesom2ice.functions b/couplings/fesom/coupling_fesom2ice.functions index 2018dd1d3..c5fd26fcc 100644 --- a/couplings/fesom/coupling_fesom2ice.functions +++ b/couplings/fesom/coupling_fesom2ice.functions @@ -563,6 +563,8 @@ function fesom_ice_concatenate_files { echo ""; echo " * concatenating files" # New cdo versions sometimes do not allow to overwrite files for # "collective" commands. Hence delete existing old output file + [[ -f temp.tmp.nc ]] && rm temp.tmp.nc + [[ -f salt.tmp.nc ]] && rm salt.tmp.nc [[ -f ocean_file_for_ice.nc ]] && rm ocean_file_for_ice.nc ${cdo} -s ensmean ${processed_fesom1x_file3D_T_list_for_ice} temp.tmp.nc ${cdo} -s ensmean ${processed_fesom1x_file3D_S_list_for_ice} salt.tmp.nc @@ -573,7 +575,6 @@ function fesom_ice_concatenate_files { # ${processed_fesom1x_file2D_list_for_ice} \ # ${processed_fesom1x_file2Dstatic_list_for_ice} \ # ocean_file_for_ice.nc - _flag_extract_depth=1 # Extract depth axis and Clean up temporary files for file in \ diff --git a/couplings/fesom/coupling_ice2fesom.functions b/couplings/fesom/coupling_ice2fesom.functions index d2011b920..d04586a07 100644 --- a/couplings/fesom/coupling_ice2fesom.functions +++ b/couplings/fesom/coupling_ice2fesom.functions @@ -8,10 +8,10 @@ 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 + echo " since ICE_TO_FESOM=${ICE_TO_FESOM}" + return else echo " Only generating iceberg forcing so far ..." iterative_coupling_pism_ocean_prepare_ocean_icebergmodel_forcing @@ -230,41 +230,9 @@ function iterative_coupling_pism_ocean_prepare_ocean_icebergmodel_forcing { cdo -s -timmean -selname,tendency_of_ice_amount_due_to_discharge \ -setgrid,${COUPLE_DIR}/ice.griddes ${pism_discharge_file} ${COUPLE_DIR}/latest_discharge.nc - #module unload python - #if [ "$MACHINE" == "ollie" ]; then - # module load python3/3.7.7_intel2020u2 - #elif [ "$MACHINE" == "mistral" ]; then - # module load anaconda3/bleeding_edge - #fi - #if [ -f ${COUPLE_DIR}/num_non_melted_icb_file ]; then - # rm ${COUPLE_DIR}/num_non_melted_icb_file - #fi - - #if [[ "xMESH_ROTATED_fesom"=="x1" ]]; then - # if [[ ! -f ${COUPLE_DIR}/nod2d.out.rot ]]; then - # python ${FUNCTION_PATH}/../utils/rotate_mesh.py ${MESH_DIR_fesom} ${COUPLE_DIR} - # cp ${MESH_DIR_fesom}/elem2d.out ${COUPLE_DIR}/elem2d.out - # fi - # python ${FUNCTION_PATH}/../utils/icb_apply_distribution.py ${COUPLE_DIR}/latest_discharge.nc ${COUPLE_DIR} ${COUPLE_DIR} ${BASIN_FILE} - #else - # python ${FUNCTION_PATH}/../utils/icb_apply_distribution.py ${COUPLE_DIR}/latest_discharge.nc ${MESH_DIR_fesom} ${COUPLE_DIR} ${BASIN_FILE} - #fi - - #echo; echo " * Finished iceberg generation" - #if [ -f ${COUPLE_DIR}/../restart/fesom/iceberg.restart.ISM ]; then - # wc -l ${COUPLE_DIR}/../restart/fesom/iceberg.restart.ISM | awk '{ print $1 }' > ${COUPLE_DIR}/num_non_melted_icb_file - #fi use_icesheet_coupling=1 } -#function get_ib_num_after_ice_sheet_coupling { -# _a="$( wc -l icb/LON.dat | awk '{ print $1 }' )" -# _b="$( cat ../icb/num_non_melted_icb_file )" -# -# ib_num=$(( $_a + $_b )) -# general_replace_namelist_value namelist.config icebergs ib_num $ib_num -# general_replace_namelist_value namelist.config icebergs use_icesheet_coupling ".true." -#} ############################################################################ ############################################################################ diff --git a/couplings/fesom/env_fesom.py b/couplings/fesom/env_fesom.py index 74c49cc26..ba2a4dba9 100644 --- a/couplings/fesom/env_fesom.py +++ b/couplings/fesom/env_fesom.py @@ -15,7 +15,7 @@ def prepare_environment(config): "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"), + #"BASIN_FILE": config["fesom"].get("basin_file"), "MACHINE": config["computer"]["name"], "ICEBERG_DIR": config["fesom"].get("iceberg_dir", ""), diff --git a/couplings/utils/fesom_scalar_array_to_LonLat.py b/couplings/utils/fesom_scalar_array_to_LonLat.py index 0539c4273..d9a3a6004 100644 --- a/couplings/utils/fesom_scalar_array_to_LonLat.py +++ b/couplings/utils/fesom_scalar_array_to_LonLat.py @@ -85,7 +85,7 @@ def parse_arguments(): # #print('* Read the data file args.FESOM_FILE=' + " ".join(args.FESOM_FILE)) #FID = MFDataset(args.FESOM_PATH + "".join("/temp.fesom.*.01.nc")) -FID = xr.open_dataset(str(args.FESOM_PATH[0]) + str(args.FESOM_VARIABLE[0]) + ".fesom." + str(args.FESOM_YEARS[0]) + ".nc") +FID = xr.open_dataset(str(args.FESOM_PATH[0]) + str(args.FESOM_VARIABLE[0]) + ".fesom." + str(args.FESOM_YEARS[0]) + ".nc", decode_times=False) # ---------------------------------------------------------------- # @@ -164,7 +164,7 @@ def parse_arguments(): # # Prepare data for final netcdf output # - #ilevel = ilevel + 1 + ilevel = ilevel + 1 flag_verbose=False @@ -173,7 +173,7 @@ def parse_arguments(): pf.get_data(args.FESOM_PATH[0], args.FESOM_VARIABLE[0], int(args.FESOM_YEARS[0]), mesh, depth=idepth, how="mean") #, flag_verbose) else: level_data = \ - pf.get_data(args.FESOM_PATH[0], args.FESOM_VARIABLE[0], [int(args.FESOM_YEARS[0]), int(args.FESOM_YEARS[1])], mesh, depth=idepth, how="mean") #, flag_verbose) + pf.get_data(args.FESOM_PATH[0], args.FESOM_VARIABLE[0], [int(args.FESOM_YEARS[0]), int(args.FESOM_YEARS[1])], mesh, depth=idepth, how="mean", use_cftime=True) #, flag_verbose) level_data[np.where(np.isnan(level_data))] = NAN_REPLACE TempFields_out[itime, ilevel, :] = level_data From 015f9d31b3722576e24928b0191a412b5f3556b8 Mon Sep 17 00:00:00 2001 From: ackerlar Date: Tue, 30 Apr 2024 12:01:54 +0200 Subject: [PATCH 3/4] set correct PI obliquity as default for dEBM --- couplings/pism/coupling_atmosphere2pism.functions | 2 +- couplings/pism/coupling_pism2atmosphere.functions | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/couplings/pism/coupling_atmosphere2pism.functions b/couplings/pism/coupling_atmosphere2pism.functions index 51eaae644..3a2d1573b 100644 --- a/couplings/pism/coupling_atmosphere2pism.functions +++ b/couplings/pism/coupling_atmosphere2pism.functions @@ -1556,7 +1556,7 @@ ic_atm2debm_ablation_debm_run_modify_nml() { TMP=$( grep cobld $( ls -t ${COUPLE_DIR}/../run_*/work/namelist.echam | head -1 ) | sed 's/^[ \t]*//' ) prefix="cobld = " MY_OBLIQUITY=${TMP#"$prefix"} - obliquity_value=${MY_OBLIQUITY:-"23.17"} + obliquity_value=${MY_OBLIQUITY:-"23.441"} echo -e "\t\t- Generating namelist for dEBM Mass Balance Model" echo -e "\t\t- Obliquity = ${obliquity_value}" diff --git a/couplings/pism/coupling_pism2atmosphere.functions b/couplings/pism/coupling_pism2atmosphere.functions index 99f760a1f..378c22278 100644 --- a/couplings/pism/coupling_pism2atmosphere.functions +++ b/couplings/pism/coupling_pism2atmosphere.functions @@ -60,10 +60,10 @@ function pism_atmosphere_get_newest_output { # Define list of variables selected from PISM output depending on whether icebergs are used or not if [ "x${fesom_use_iceberg}" == "x1" ]; then - echo "LA DEBUG: 1" + echo " * use iceberg coupling and exclude iceberg discharge from mass balance" CDO_SELECT_VAR_LIST="thk,climatic_mass_balance,topg,${OROG_VARNAME_pism},${GLACIAL_MASK_VARNAME_pism},tendency_of_ice_amount,tendency_of_ice_amount_due_to_conservation_error,tendency_of_ice_amount_due_to_surface_mass_flux,tendency_of_ice_amount_due_to_basal_mass_flux,tendency_of_ice_amount_due_to_discharge,tendency_of_ice_amount_due_to_flow" else - echo "LA DEBUG: 2" + echo " * no iceberg coupling" CDO_SELECT_VAR_LIST="thk,climatic_mass_balance,topg,${OROG_VARNAME_pism},${GLACIAL_MASK_VARNAME_pism},tendency_of_ice_amount" fi From d253df4f171684b1adb192ef9cd8a821b375c729 Mon Sep 17 00:00:00 2001 From: BumpVersion Action Date: Tue, 30 Apr 2024 12:54:25 +0000 Subject: [PATCH 4/4] =?UTF-8?q?Bump=20version:=206.29.4=20=E2=86=92=206.29?= =?UTF-8?q?.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 2 +- setup.py | 2 +- src/esm_archiving/__init__.py | 2 +- src/esm_calendar/__init__.py | 2 +- src/esm_cleanup/__init__.py | 2 +- src/esm_database/__init__.py | 2 +- src/esm_environment/__init__.py | 2 +- src/esm_master/__init__.py | 2 +- src/esm_motd/__init__.py | 2 +- src/esm_parser/__init__.py | 2 +- src/esm_plugin_manager/__init__.py | 2 +- src/esm_profile/__init__.py | 2 +- src/esm_runscripts/__init__.py | 2 +- src/esm_tests/__init__.py | 2 +- src/esm_tools/__init__.py | 2 +- src/esm_utilities/__init__.py | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/setup.cfg b/setup.cfg index 71fa7d4b6..6b65cc310 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 6.29.4 +current_version = 6.29.5 commit = True tag = True diff --git a/setup.py b/setup.py index 3cc604175..1ecaf3f31 100644 --- a/setup.py +++ b/setup.py @@ -105,6 +105,6 @@ test_suite="tests", tests_require=test_requirements, url="https://github.com/esm-tools/esm_tools", - version="6.29.4", + version="6.29.5", zip_safe=False, ) diff --git a/src/esm_archiving/__init__.py b/src/esm_archiving/__init__.py index ef003f50f..d6e749c7a 100644 --- a/src/esm_archiving/__init__.py +++ b/src/esm_archiving/__init__.py @@ -4,7 +4,7 @@ __author__ = """Paul Gierz""" __email__ = "pgierz@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" from .esm_archiving import (archive_mistral, check_tar_lists, delete_original_data, determine_datestamp_location, diff --git a/src/esm_calendar/__init__.py b/src/esm_calendar/__init__.py index e122bddc6..8cc665b33 100644 --- a/src/esm_calendar/__init__.py +++ b/src/esm_calendar/__init__.py @@ -2,6 +2,6 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" from .esm_calendar import * diff --git a/src/esm_cleanup/__init__.py b/src/esm_cleanup/__init__.py index 9d35b0a75..387bafc81 100644 --- a/src/esm_cleanup/__init__.py +++ b/src/esm_cleanup/__init__.py @@ -2,4 +2,4 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" diff --git a/src/esm_database/__init__.py b/src/esm_database/__init__.py index d65b9b344..456175918 100644 --- a/src/esm_database/__init__.py +++ b/src/esm_database/__init__.py @@ -2,4 +2,4 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" diff --git a/src/esm_environment/__init__.py b/src/esm_environment/__init__.py index 3d8b7e341..a99e81fc1 100644 --- a/src/esm_environment/__init__.py +++ b/src/esm_environment/__init__.py @@ -2,6 +2,6 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" from .esm_environment import * diff --git a/src/esm_master/__init__.py b/src/esm_master/__init__.py index 4b454e86c..eb5ec0b63 100644 --- a/src/esm_master/__init__.py +++ b/src/esm_master/__init__.py @@ -2,7 +2,7 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" from . import database diff --git a/src/esm_motd/__init__.py b/src/esm_motd/__init__.py index 9fd6b6d1f..e6358f57a 100644 --- a/src/esm_motd/__init__.py +++ b/src/esm_motd/__init__.py @@ -2,6 +2,6 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" from .esm_motd import * diff --git a/src/esm_parser/__init__.py b/src/esm_parser/__init__.py index 5bd58fa6a..455fbd4da 100644 --- a/src/esm_parser/__init__.py +++ b/src/esm_parser/__init__.py @@ -2,7 +2,7 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" from .esm_parser import * diff --git a/src/esm_plugin_manager/__init__.py b/src/esm_plugin_manager/__init__.py index a43f088d5..d30a9313e 100644 --- a/src/esm_plugin_manager/__init__.py +++ b/src/esm_plugin_manager/__init__.py @@ -2,6 +2,6 @@ __author__ = """Dirk Barbi, Paul Gierz, Sebastian Wahl""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" from .esm_plugin_manager import * diff --git a/src/esm_profile/__init__.py b/src/esm_profile/__init__.py index 39c9db279..70e77523e 100644 --- a/src/esm_profile/__init__.py +++ b/src/esm_profile/__init__.py @@ -2,6 +2,6 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" from .esm_profile import * diff --git a/src/esm_runscripts/__init__.py b/src/esm_runscripts/__init__.py index ad2c6a7c6..1eac87d31 100644 --- a/src/esm_runscripts/__init__.py +++ b/src/esm_runscripts/__init__.py @@ -2,7 +2,7 @@ __author__ = """Dirk Barbi""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" from .batch_system import * from .chunky_parts import * diff --git a/src/esm_tests/__init__.py b/src/esm_tests/__init__.py index 54287958a..f228af95e 100644 --- a/src/esm_tests/__init__.py +++ b/src/esm_tests/__init__.py @@ -2,7 +2,7 @@ __author__ = """Miguel Andres-Martinez""" __email__ = "miguel.andres-martinez@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" from .initialization import * from .read_shipped_data import * diff --git a/src/esm_tools/__init__.py b/src/esm_tools/__init__.py index 28b0a036f..e8f33c186 100644 --- a/src/esm_tools/__init__.py +++ b/src/esm_tools/__init__.py @@ -23,7 +23,7 @@ __author__ = """Dirk Barbi, Paul Gierz""" __email__ = "dirk.barbi@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" import functools import inspect diff --git a/src/esm_utilities/__init__.py b/src/esm_utilities/__init__.py index 578e0945a..5f7176f3a 100644 --- a/src/esm_utilities/__init__.py +++ b/src/esm_utilities/__init__.py @@ -2,6 +2,6 @@ __author__ = """Paul Gierz""" __email__ = "pgierz@awi.de" -__version__ = "6.29.4" +__version__ = "6.29.5" from .utils import *