Skip to content
Snippets Groups Projects
Commit 0f83a920 authored by Martin Schupfner's avatar Martin Schupfner
Browse files

Added scripts for deglaciation-interactive (not finalized)

parent 80efda1d
No related branches found
No related tags found
No related merge requests found
#! /bin/sh -e
#SBATCH --account=bm0021
#SBATCH --qos=esgf
##SBATCH --time=48:00:00
#SBATCH --time=02:00:00
#SBATCH --partition=shared
#SBATCH --mail-type=FAIL
#SBATCH --output=%x_%j.log
# Number of sub-simulations
n_subsim=4
#initial and final year of the experiment
spinup=0
iniyeararr=( $((4000+spinup)) 2000 2000 2000 )
finyeararr=( 8999 8999 8999 8999 )
iniyearoffset=0
iniyear=$(( 1 + $iniyearoffset + $spinup ))
finyear=$(( 26000 + $iniyearoffset - $spinup ))
#offset compared to startyear
inioffsetarr=( $(( -3999 + $iniyearoffset )) $(( 3001 + $iniyearoffset )) $(( 10001 + $iniyearoffset )) $(( 17001 + $iniyearoffset )) )
# Time axis (26000-1 BP)
## exp time total yrs new exp time offset
#a - 26000-21001 BP - 5000 yrs - 1- 5000 - - 3999
#b - 21000-14001 BP - 7000 yrs - 5001-12000 - 3001
#c - 14000- 7001 BP - 7000 yrs - 12001-19000 - 10001
#d - 7000- 1 BP - 7000 yrs - 19001-26000 - 17001
# Chunksize
# Note that there are prerequisites concerning the chunksize:
# - the defined decadal timeslizes may not overlap between two chunks!
# - decadal bounds have to be defined accordingly - "???01231" in this case
# - usually this is the case by default due to decadal model output!
chunksize=100
# Create list
for i in $(seq 0 $(( n_subsim - 1 )) )
do
for yyyy in $(seq ${iniyeararr[$i]} ${finyeararr[$i]} )
do
paramarr+=( "$i $yyyy" )
done
done
rm -f cmor_ctl_list_interactive_synch_r1i1p1f1
in=0
for i in $(seq $((iniyear-iniyear)) $chunksize $((finyear-iniyear)))
do
[[ $i -eq $((iniyear-iniyear)) ]] && continue
li=$(echo ${paramarr[$in]} | cut -d " " -f1)
ly=$(echo ${paramarr[$in]} | cut -d " " -f2)
ui=$(echo ${paramarr[$((i-1))]} | cut -d " " -f1)
uy=$(echo ${paramarr[$((i-1))]} | cut -d " " -f2)
in=$i
echo "$li $ui $ly $uy" >> cmor_ctl_list_interactive_synch_r1i1p1f1
done
[[ $i -ne $((finyear-iniyear)) ]] && {
li=$(echo ${paramarr[$in]} | cut -d " " -f1)
ly=$(echo ${paramarr[$in]} | cut -d " " -f2)
ui=$(echo ${paramarr[$((finyear-iniyear))]} | cut -d " " -f1)
uy=$(echo ${paramarr[$((finyear-iniyear))]} | cut -d " " -f2)
echo "$li $ui $ly $uy" >> cmor_ctl_list_interactive_synch_r1i1p1f1
}
make -k -j 19 -f transient-deglaciation-interactive_r1i1p1f1-CR.cmor_ctl.mk "$@"
EXP_ID = transient-deglaciation-interactive_r1i1p1f1-CR
ACCOUNT = bm0021
PARTITION = compute
SUFFIX =
ARCHIVE_SUFFIX =
TARGET_STEP=cmor
NUMCHUNKS=$(shell cat cmor_ctl_list_interactive_synch_r1i1p1f1 | wc -l )
AGGR_TIME = 00:10:00
DIAGS_TIME = 00:30:00
CMOR_TIME = 02:30:00
CMOR_FLAGS =
SBATCHFLAGS=-W
MESSAGE = $$(date +%Y-%m-%dT%H:%M:%S): CMIP6 diagnostics and CMOR rewriting ($(SUFFIX:_%=%))
.PHONY: all
.PRECIOUS: targets/$(EXP_ID).aggr$(SUFFIX).% targets/$(EXP_ID).diags$(SUFFIX).% targets/$(EXP_ID).cmor$(SUFFIX).%
all:
@echo "$(MESSAGE) started"
mkdir -vp targets
$(MAKE) $(MFLAGS) -f $(MAKEFILE_LIST) $(addprefix targets/$(EXP_ID).$(TARGET_STEP)$(SUFFIX).,$(shell seq 1 $(NUMCHUNKS)))
@echo "$(MESSAGE) finished"
targets/$(EXP_ID).aggr$(SUFFIX).%:
sbatch $(SBATCHFLAGS) --time=$(AGGR_TIME) --job-name=$(EXP_ID)_runpp_aggr$(SUFFIX) --output=%x_%j.log --comment=$* $(EXP_ID).runpp -s '$(SUFFIX)' -S '$(ARCHIVE_SUFFIX)' -A $(shell sed -n '$(*)'p < cmor_ctl_list_interactive_synch_r1i1p1f1)
@touch $@
targets/$(EXP_ID).diags$(SUFFIX).%: targets/$(EXP_ID).aggr$(SUFFIX).%
sbatch $(SBATCHFLAGS) --time=$(DIAGS_TIME) --job-name=$(EXP_ID)_runpp_diag$(SUFFIX) --output=%x_%j.log --comment=$* $(EXP_ID).runpp -s '$(SUFFIX)' -S '$(ARCHIVE_SUFFIX)' -d $(shell sed -n '$(*)'p < cmor_ctl_list_interactive_synch_r1i1p1f1)
@touch $@
targets/$(EXP_ID).cmor$(SUFFIX).%: targets/$(EXP_ID).diags$(SUFFIX).%
sbatch $(SBATCHFLAGS) --time=$(CMOR_TIME) --job-name=$(EXP_ID)_runpp_cmor$(SUFFIX) --output=%x_%j.log --comment=$* $(EXP_ID).runpp -s '$(SUFFIX)' -S '$(ARCHIVE_SUFFIX)' -c $(CMOR_FLAGS) $(shell sed -n '$(*)'p < cmor_ctl_list_interactive_synch_r1i1p1f1)
@touch $@
This diff is collapsed.
#
# experiment info:
#
_CONTROLLED_VOCABULARY_FILE=PalMod2_CV.json
_FORMULA_VAR_FILE=PalMod2_formula_terms.json
_AXIS_ENTRY_FILE=PalMod2_coordinate.json
CONVENTIONS="CF-1.7 PalMod-2.0"
TITLE="MPI-ESM1-2 output prepared for PalMod2"
_history_template="%s ; CMOR rewrote data to be consistent with <activity_id>, <Conventions> and CF standards."
EXPERIMENT_ID=transient-deglaciation-interactive
EXPERIMENT="synchronously coupled transient deglaciation with interactive ice sheets and solid earth"
#Specify VARIANT_LABEL explicitly or realization_index, physics_index, initialization_index and forcing_index:
VARIANT_LABEL=r1i1p4f1
REALIZATION_INDEX=1
INITIALIZATION_INDEX=1
PHYSICS_INDEX=4
FORCING_INDEX=1
VARIANT_INFO="Note, forcing includes volcanoes. The data are from a synchronously coupled model simulation of the last deglaciation with the MPI-ESM1.2-CR-mPISM-VILMA setup, hence, including interactive ice sheets and solid earth components."
ACTIVITY_ID=PalMod2
#MIP_ERA=PalMod2 #ONLY CMIP6
PROJECT_ID=PalMod2
REQUIRED_TIME_UNITS="days since 1-1-1 00:00:00"
#FURTHER_INFO_URL="https://furtherinfo.es-doc.org/<mip_era>.<institution_id>.<source_id>.<experiment_id>.<sub_experiment_id>.<variant_label>
#Branch Info: If needed use the following 2 attributes to define the branch time
# in Parent_Time_Units and Required_Time_Units (=child)
# else use BRANCH_DATES to give the dates in YYYYMMDD,YYYYMMDD format
#BRANCH_TIME_IN_PARENT=
#BRANCH_TIME_IN_CHILD=
#BRANCH_DATES=19000101,18500101
#BRANCH_METHOD="standard"
#PARENT_MIP_ERA=none #ONLY CMIP6
#PARENT_ACTIVITY_ID=none
#PARENT_EXPERIMENT=none
#cmip6-spinup-HR
#PARENT_EXPERIMENT_ID=none
#PARENT_SOURCE_ID=none
#PARENT_TIME_UNITS="days since 1850-1-1 00:00:00"
#PARENT_VARIANT_LABEL=none
SUB_EXPERIMENT_ID=none
SUB_EXPERIMENT=none
#
#model info:
#
SOURCE_ID=MPI-ESM1-2-CR
#MODEL_ID=MPI-ESM1-2-CR
REFERENCES="Kapsch, M.-L., Mikolajewicz, U., Ziemen, F., & Schannwell, C. (2022). Ocean response in transient simulations of the last deglaciation dominated by underlying ice-sheet reconstruction and method of meltwater distribution. Geophysical Research Letters, 49, e2021GL096767. https://doi.org/10.1029/2021GL096767\nMPI-ESM: Mauritsen, T. et al. (2019), Developments in the MPI‐M Earth System Model version 1.2 (MPI‐ESM1.2) and Its Response to Increasing CO2, J. Adv. Model. Earth Syst.,11, 998-1038, doi:10.1029/2018MS001400,\nMueller, W.A. et al. (2018): A high‐resolution version of the Max Planck Institute Earth System Model MPI‐ESM1.2‐HR. J. Adv. Model. EarthSyst.,10,1383–1413, doi:10.1029/2017MS001217"
SOURCE="MPI-ESM1.2-CR (2017): \naerosol: none, prescribed Kinne (2010)\natmos: ECHAM6.3 (spectral T31; 96 x 48 longitude/latitude; 31 levels; top level 10 hPa)\natmosChem: none\nland: JSBACH3.20\nlandIce: none/prescribed\nocean: MPIOM1.63 (bipolar GR3.0, approximately 300km; 122 x 101 longitude/latitude; 40 levels; top grid cell 0-15 m)\nocnBgchem: none\nseaIce: unnamed (thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model)\nsolidLand: none/prescribed"
SOURCE_TYPE="AOGCM ISM SLM"
#CALENDAR=proleptic_gregorian
#MAPPING_TABLE_DIR=cmip6_mapping_tables
#MAPPING_TABLE=MPIESM1_CMIP6.txt
#GRID_FILE_DIR=__GRID_FILE_DIR
#GRID_FILE=__GRID_FILE
GRID=gn
GRID_LABEL=gn
#NOMINAL_RESOLUTION read from external file
#For MPIOM/HAMOCC CR / GR30
#NOMINAL_RESOLUTION="500 km"
#For ECHAM6/JSBACH CR / T31
#NOMINAL_RESOLUTION="500 km"
CHAR_AXIS_TYPELICE="ice sheet","ice shelf","ocean","ice-free land"
CHAR_AXIS_VEGTYPE=bare_land,glacier,tropical_evergreen_trees,tropical_deciduous_trees,extra-tropical_evergreen_trees,extra-tropical_deciduous_trees,raingreen_shrubs,deciduous_shrubs,C3_grass,C4_grass,C3_pasture,C4_pasture,C3_crops,C4_crops
CHAR_AXIS_SOILPOOLS=acid-soluble_below_ground_leaf_litter,acid-soluble_below_ground_woody_litter,water-soluble_below_ground_leaf_litter,water-soluble_below_ground_woody_litter,ethanol-soluble_below_ground_leaf_litter,ethanol-soluble_below_ground_woody_litter,non-soluble_below_ground_leaf_litter,non-soluble_below_ground_woody_litter,humus_from_leaf_litter,humus_from_woody_litter
CHAR_AXIS_LANDUSE=primary_and_secondary_land,crops,pastures,urban
CHAR_AXIS_BASIN=global_ocean,atlantic_arctic_ocean,indian_pacific_ocean
CHAR_AXIS_OLINE=barents_opening,bering_strait,canadian_archipelago,denmark_strait,drake_passage,english_channel,pacific_equatorial_undercurrent,faroe_scotland_channel,florida_bahamas_strait,fram_strait,iceland_faroe_channel,indonesian_throughflow,mozambique_channel,taiwan_luzon_straits,windward_passage
CHAR_AXIS_SILINE=barents_opening,bering_strait,canadian_archipelago,fram_strait
#spectband for the 3 aeropt variables
CHAR_AXIS_SPECTBAND_aeroptbnd=1818182
CHAR_AXIS_SPECTBAND_aeroptbnd_BOUNDS=2262443,1600000
CHAR_AXIS_SPECTBAND_aeroptbnd_UNITS="m-1"
CHAR_AXIS_SPECTBAND_aerssabnd=1818182
CHAR_AXIS_SPECTBAND_aerssabnd_BOUNDS=2262443,1600000
CHAR_AXIS_SPECTBAND_aerssabnd_UNITS="m-1"
CHAR_AXIS_SPECTBAND_aerasymbnd=1818182
CHAR_AXIS_SPECTBAND_aerasymbnd_BOUNDS=2262443,1600000
CHAR_AXIS_SPECTBAND_aerasymbnd_UNITS="m-1"
# 2d-spectband for the albedos
CHAR_AXIS_SPECTBAND_albdirbnd=3225689,766690
CHAR_AXIS_SPECTBAND_albdirbnd_BOUNDS=5000000,1451379,1451379,82001
CHAR_AXIS_SPECTBAND_albdirbnd_UNITS="m-1"
CHAR_AXIS_SPECTBAND_albdiffbnd=3225689,766690
CHAR_AXIS_SPECTBAND_albdiffbnd_BOUNDS=5000000,1451379,1451379,82001
CHAR_AXIS_SPECTBAND_albdiffbnd_UNITS="m-1"
CHAR_AXIS_SPECTBAND_solbnd=1818182
CHAR_AXIS_SPECTBAND_solbnd_BOUNDS=2262443,1600000
CHAR_AXIS_SPECTBAND_solbnd_UNITS="m-1"
#T_AXIS="cmip" causes the time axis to be rewritten according to the requested time stamps
T_AXIS="cmip"
#OUTPUT_MODE="r"
OUTPUT_MODE="a"
MAX_SIZE=0
SAVE_CHUNK="n"
#For files without time axis, if one is requested:
#firsttimeval=1 (1850-01-02 00:00:00 wenn days since 1850-01-01 00:00:00)
FIRSTTIMEVAL=1
#
# institution and contact info:
#
# none of these can be set in the command line
#
DEFLATE_LEVEL=1
CONTACT=palmod2-mpi-esm@dkrz.de
#
# MPI-M
#
INSTITUTION_ID=MPI-M
INSTITUTION="Max Planck Institute for Meteorology, Hamburg 20146, Germany"
LICENSE="PalMod2 model data produced by MPI-M is licensed under a Creative Commons Attribution ShareAlike 4.0 International License (https://creativecommons.org/licenses). The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law."
#MIP_TABLE_DIR="/pool/data/CMIP6/cmip6-cmor-tables/Tables/"
MIP_TABLE_DIR="/work/bm0021/PalMod2/cmor_tables/"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment