#!/bin/bash

set -e

# Created 2023-08-10 12:56:10

CASEDIR="/lcrc/group/e3sm/ac.jwolfe/E3SM_simulations/20230809.v3alpha02.piControl.ne30-oRRS18to6.chrysalis/case_scripts"

/lcrc/group/e3sm/ac.jwolfe/E3SM/code/20230809/cime/scripts/create_newcase --case 20230809.v3alpha02.piControl.ne30-oRRS18to6.chrysalis --output-root /lcrc/group/e3sm/ac.jwolfe/E3SM_simulations/20230809.v3alpha02.piControl.ne30-oRRS18to6.chrysalis --script-root "${CASEDIR}" --handle-preexisting-dirs u --compset WCYCL1850 --res ne30pg2_oRRS18to6v3 --machine chrysalis --project e3sm --walltime 30:00:00 --pecount L

cd "${CASEDIR}"

./xmlchange MAX_MPITASKS_PER_NODE=64

./xmlchange MAX_TASKS_PER_NODE=64

./xmlchange NTASKS_ATM=1800

./xmlchange NTASKS_CPL=1856

./xmlchange NTASKS_OCN=4800

./xmlchange NTASKS_WAV=1

./xmlchange NTASKS_GLC=1

./xmlchange NTASKS_ICE=1792

./xmlchange NTASKS_ROF=64

./xmlchange NTASKS_LND=64

./xmlchange NTASKS_ESP=1

./xmlchange NTASKS_IAC=1

./xmlchange NTHRDS_ATM=1

./xmlchange NTHRDS_CPL=1

./xmlchange NTHRDS_OCN=1

./xmlchange NTHRDS_WAV=1

./xmlchange NTHRDS_GLC=1

./xmlchange NTHRDS_ICE=1

./xmlchange NTHRDS_ROF=1

./xmlchange NTHRDS_LND=1

./xmlchange NTHRDS_ESP=1

./xmlchange NTHRDS_IAC=1

./xmlchange ROOTPE_ATM=0

./xmlchange ROOTPE_CPL=0

./xmlchange ROOTPE_OCN=1856

./xmlchange ROOTPE_WAV=0

./xmlchange ROOTPE_GLC=0

./xmlchange ROOTPE_ICE=0

./xmlchange ROOTPE_ROF=1792

./xmlchange ROOTPE_LND=1792

./xmlchange ROOTPE_ESP=0

./xmlchange ROOTPE_IAC=0

./xmlchange EXEROOT=/lcrc/group/e3sm/ac.jwolfe/E3SM_simulations/20230809.v3alpha02.piControl.ne30-oRRS18to6.chrysalis/build

./xmlchange RUNDIR=/lcrc/group/e3sm/ac.jwolfe/E3SM_simulations/20230809.v3alpha02.piControl.ne30-oRRS18to6.chrysalis/run

./xmlchange DOUT_S=FALSE

./xmlchange DOUT_S_ROOT=/lcrc/group/e3sm/ac.jwolfe/E3SM_simulations/20230809.v3alpha02.piControl.ne30-oRRS18to6.chrysalis/archive

./xmlchange --id CAM_CONFIG_OPTS --append --val=-cosp

./xmlchange CCSM_CO2_PPMV=284.7

./case.setup --reset

./xmlchange ATM_NCPL=96

./xmlchange LND_NCPL=96

./xmlchange OCN_NCPL=96

./xmlchange ICE_NCPL=96

./xmlchange ATM2OCN_FMAPNAME_NONLINEAR=cpl/gridmaps/ne30pg2/map_ne30pg2_to_oRRS18to6v3_trfvnp2.230806.nc

./case.build

./preview_namelists

./xmlchange RUN_STARTDATE=0001-01-01

./xmlchange STOP_OPTION=nmonths,STOP_N=24

./xmlchange REST_OPTION=nmonths,REST_N=6

./xmlchange HIST_OPTION=nyears,HIST_N=1

./xmlchange BUDGETS=TRUE

./xmlchange RESUBMIT=3

./xmlchange RUN_TYPE=startup

./xmlchange CONTINUE_RUN=FALSE

./case.submit

./case.submit

./case.submit

./case.submit

./case.submit

./case.submit

./case.submit

./case.submit

./case.submit

./case.submit

./case.setup --reset

./case.build

./case.submit

./case.setup --reset

./case.build

./case.submit

./case.submit

./case.submit

./case.submit

./case.submit

./case.submit

./case.submit

