diff --git a/configs/components/echam/echam.yaml b/configs/components/echam/echam.yaml index 4209d756a..d28d05a65 100644 --- a/configs/components/echam/echam.yaml +++ b/configs/components/echam/echam.yaml @@ -22,7 +22,7 @@ compile_infos: branch: ${echam.version} choose_version: 6.3.05p2-awiesm-2.1: - branch: "6.3.05p2-awiesm-2.1-paleodyn-2.5" #LA: change back to 6.3.05p2-awiesm-2.1 once iceberg feature is merged https://gitlab.awi.de/paleodyn/Models/echam6/-/merge_requests/4 + branch: "6.3.05p2-awiesm-2.1" clean_command: rm -rf src/echam/bin; rm -rf bin; make clean comp_command: ./config/createMakefiles.pl; autoreconf -i --force; mkdir -p src/.deps yaxt/src/.deps yaxt/tests/.deps; ./configure $configure_opts --with-fortran=intel INSTALL='/usr/bin/install -p'; make -j `nproc --all`; make install -j `nproc --all`; mkdir -p src/echam/bin; cp bin/echam6 src/echam/bin/echam6 git-repository: "https://gitlab.awi.de/paleodyn/Models/echam6.git" @@ -411,20 +411,11 @@ choose_scenario: dataset: r0008 greenhouse_dir: "${input_dir}" forcing_files: - # aerocoarse: piaerocoarse - # aerofarir: piaerofarir - # aerofin: histaerofin + aerocoarse: piaerocoarse + aerofarir: piaerofarir + aerofin: piaerofin sst: amipsst sic: amipsic - aerocoarse_1849: piaerocoarse - aerocoarse_1850: piaerocoarse - aerocoarse_1851: piaerocoarse - aerofarir_1849: piaerofarir - aerofarir_1850: piaerofarir - aerofarir_1851: piaerofarir - aerofin_1849: piaerofin - aerofin_1850: piaerofin - aerofin_1851: piaerofin ozone: ozone_hist_scenario greenhouse: greenhouse_hist_scenario volcir: histvolcir diff --git a/configs/components/pism/pism.compiletime_env_changes.yaml b/configs/components/pism/pism.compiletime_env_changes.yaml index 3922e1106..8ae8aeaec 100644 --- a/configs/components/pism/pism.compiletime_env_changes.yaml +++ b/configs/components/pism/pism.compiletime_env_changes.yaml @@ -20,10 +20,10 @@ choose_computer.name: levante: environment_changes: add_export_vars: - - "UDUNITS2_ROOT=/sw/spack-levante/udunits-2.2.28-da6pla/ #/sw/rhel6-x64/util/udunits-2.2.26-gcc64" - - "FFTW_ROOT=/sw/spack-levante/fftw-3.3.10-lnogal/ #/sw/rhel6-x64/numerics/fftw-3.3.7-openmp-gcc64" - - "PROJ_ROOT=/sw/spack-levante/proj-5.2.0-w7auht/ #/sw/rhel6-x64/graphics/proj4-4.9.3-gcc48" - - "PETSC_DIR=/sw/spack-levante/petsc-3.16.2-oorrxp/ #/sw/rhel6-x64/numerics/PETSc-3.12.2-impi2018-intel18/" + - "UDUNITS2_ROOT=/sw/spack-levante/udunits-2.2.28-da6pla/" #/sw/rhel6-x64/util/udunits-2.2.26-gcc64" + - "FFTW_ROOT=/sw/spack-levante/fftw-3.3.10-lnogal/" #/sw/rhel6-x64/numerics/fftw-3.3.7-openmp-gcc64" + - "PROJ_ROOT=/sw/spack-levante/proj-5.2.0-w7auht/" #/sw/rhel6-x64/graphics/proj4-4.9.3-gcc48" + - "PETSC_DIR=/sw/spack-levante/petsc-3.16.2-oorrxp/" #/sw/rhel6-x64/numerics/PETSc-3.12.2-impi2018-intel18/" - "HDF5_ROOT=$HDF5ROOT" - "LD_LIBRARY_PATH=/sw/spack-levante/gsl-2.7-5ou4yk/lib:$LD_LIBRARY_PATH" #- "UDUNITS2_ROOT=/home/a/a270124/model_codes/dependencies/udunits-2.2.28-6havf7" 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" 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/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 diff --git a/couplings/utils/fesom_scalar_array_to_LonLat.py b/couplings/utils/fesom_scalar_array_to_LonLat.py index 0539c4273..cf8ecf38d 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,9 +173,13 @@ 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) + + print("LA DEBUG: level_data = ", level_data) level_data[np.where(np.isnan(level_data))] = NAN_REPLACE TempFields_out[itime, ilevel, :] = level_data + print("LA DEBUG: level_data = ", level_data) + print("LA DEBUG: TempFields_out = ", TempFields_out) # ----------------------------------------------------------------