From 77ce83b2236568f7d9801d119372d85ee46acdf1 Mon Sep 17 00:00:00 2001 From: Benjamin Hillman Date: Fri, 31 Oct 2025 08:54:25 -0700 Subject: [PATCH 1/3] Add draft ecomip run script and output yaml --- run_scripts/ecomip/eamxx_ecomip_output.yaml | 42 ++++++++ run_scripts/ecomip/run.ecomip.sh | 109 ++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 run_scripts/ecomip/eamxx_ecomip_output.yaml create mode 100755 run_scripts/ecomip/run.ecomip.sh diff --git a/run_scripts/ecomip/eamxx_ecomip_output.yaml b/run_scripts/ecomip/eamxx_ecomip_output.yaml new file mode 100644 index 0000000..c4e12b2 --- /dev/null +++ b/run_scripts/ecomip/eamxx_ecomip_output.yaml @@ -0,0 +1,42 @@ +%YAML 1.2 +--- +averaging_type: average +fields: + physics_pg2: + field_names: + # For Earthcare simulators + - z_mid + - p_int + - p_mid + - T_mid + - horiz_winds + - tracers + - cldfrac_tot + - precip_total_surf_mass_flux + - precip_liq_surf_mass_flux + - precip_ice_surf_mass_flux + - omega +# - convective_mass_flux # Conditional diagnostic + - surf_radiative_T #skin_temperature + - wind_speed_10m + - sea_level_pressure + - U_at_10m + - V_at_10m + - pseudo_density + # For diagnosis + - sw_flux_up_at_model_top + - sw_flux_dn_at_model_top + - lw_flux_up_at_model_top + - lw_flux_dn_at_model_top + - sw_clrsky_flux_up_at_model_top + - lw_clrsky_flux_up_at_model_top + - IceWaterPath + - LiqWaterPath + - VapWaterPath + #- precip_accumulated_over_30min +filename_prefix: ecomip.eamxx.h +output_control: + frequency: 1 #${HIST_N} + frequency_units: nhours #${HIST_OPTION} + skip_t0_output: 'false' +... diff --git a/run_scripts/ecomip/run.ecomip.sh b/run_scripts/ecomip/run.ecomip.sh new file mode 100755 index 0000000..535b100 --- /dev/null +++ b/run_scripts/ecomip/run.ecomip.sh @@ -0,0 +1,109 @@ +#!/bin/bash +set -e +umask 022 + +script_root=${PWD} +branch="brhillman" #"decadal-production-run4" #"fix-nanobug-in-horiz-remap" #"decadal-production-run4" #"scorpio-update" +code_root=${HOME}/codes/e3sm/branches/${branch} +res=ne4pg2_ne4pg2 #ne1024pg2_ne1024pg2 #ne1024pg2_ne1024pg2 #ne1024pg2_ne1024pg2 #ne30pg2_EC30to60E2r2 +compset=F2010-SCREAMv1 +machine="pm-gpu" #chrysalis +compiler="gnugpu" #intel +project="e3sm" +walltime="00:10:00" +datestring="20250929" +casename=${branch}.${res}.${compset}.${datestring} +caseroot=${SCRATCH}/e3sm/cases/${casename} +pecount=32x1 + +mkdir -p `dirname ${caseroot}` +${code_root}/cime/scripts/create_newcase \ + --case=${caseroot} \ + --res=${res} \ + --compset=${compset} \ + --machine=${machine} \ + --compiler=${compiler} \ + --pecount=${pecount} \ + --project=${project} \ + --walltime=${walltime} + +cd ${caseroot} + +# Extract input_data_dir for user edits to the namelist +DIN_LOC_ROOT=`./xmlquery DIN_LOC_ROOT --value` + +# Change run length +./xmlchange STOP_OPTION=ndays,STOP_N=3 +./xmlchange REST_OPTION=ndays,REST_N=3 +./xmlchange RESUBMIT=0 +./xmlchange RUN_STARTDATE="2024-08-01" + +# Run setup before configuring components +./case.setup + +# Namelist options for EAMxx +if [ "${res}" == "ne1024pg2_ne1024pg2" ]; then + ./atmchange initial_conditions::Filename="${DIN_LOC_ROOT}/atm/scream/init/screami_ne1024np4L128_era5-19941001-topoadjx6t_20240214.nc" +elif [ "${res}" == "ne256pg2_ne256pg2" ]; then + ./atmchange initial_conditions::Filename="${DIN_LOC_ROOT}/atm/scream/init/screami_ne256np4L128_era5-19941001-topoadjx6t_20240123.nc" +fi + +# Turn on cosp and set frequency +./atmchange physics::atm_procs_list="mac_aero_mic,rrtmgp,cosp" +./atmchange physics::cosp::cosp_frequency_units="hours" +./atmchange physics::cosp::cosp_frequency=1 + +output_yaml_files=(`ls ${script_root}/*.yaml`) +for file in ${output_yaml_files[@]}; do + cp -v ${file} ./ + ./atmchange output_yaml_files+=${file} +done + +# Namelist options for ELM +# Specify land initial condition and surface datasets +if [ "${res}" == "ne1024pg2_ne1024pg2" ]; then +cat << EOF >> user_nl_elm + ! Set input data paths + finidat = "${DIN_LOC_ROOT}/lnd/clm2/initdata/20231226.I2010CRUELM.ne1024pg2_ICOS10.elm.r.1994-10-01-00000.nc" +EOF +elif [ "${res}" == "ne256pg2_ne256pg2" ]; then +cat << EOF >> user_nl_elm + ! Set input data paths + finidat = "${DIN_LOC_ROOT}/lnd/clm2/initdata/20240104.I2010CRUELM.ne256pg2.elm.r.1994-10-01-00000.nc" +EOF +elif [ "${res}" == "ne30pg2_EC30to60E2r2" ]; then +cat << EOF >> user_nl_elm + finidat = "$DIN_LOC_ROOT/lnd/clm2/initdata/20210802.ICRUELM-1950.ne30pg2_EC30to60E2r2.elm.r.0051-01-01-00000.nc" +EOF +fi + +# Set MOSART initial condition +if [ "${res}" == "ne1024pg2_ne1024pg2" ]; then +cat << EOF >> user_nl_mosart + finidat_rtm = "${DIN_LOC_ROOT}/rof/mosart/initdata/20231226.I2010CRUELM.ne1024pg2_ICOS10.mosart.r.1994-10-01-00000.nc" +EOF +elif [ "${res}" == "ne256pg2_ne256pg2" ]; then +cat << EOF >> user_nl_mosart + finidat_rtm = "${DIN_LOC_ROOT}/rof/mosart/initdata/20240104.I2010CRUELM.ne256pg2.mosart.r.1994-10-01-00000.nc" +EOF +fi + +# Point to new SST forcing +# TODO: need new SST data for 2024 +#./xmlchange --file env_run.xml --id SSTICE_DATA_FILENAME --val "${DIN_LOC_ROOT}/atm/cam/sst/sst_ostia_3600x7200_19940930_20151231_c20240125.nc" +#./xmlchange --file env_run.xml --id SSTICE_GRID_FILENAME --val "${DIN_LOC_ROOT}/ocn/docn7/domain.ocn.3600x7200.230522.nc" +#./xmlchange --file env_run.xml --id SSTICE_YEAR_ALIGN --val 1994 +#./xmlchange --file env_run.xml --id SSTICE_YEAR_START --val 1994 +#./xmlchange --file env_run.xml --id SSTICE_YEAR_END --val 2015 + +# Link to rundir +ln -s `./xmlquery --value RUNDIR` run + +# Copy runscript to case dir +cp ${script_root}/`basename $0` ./ + +# Setup, build, run +./case.setup +./case.build +./case.submit -a="--job-name=${casename} -t ${walltime} --mail-type=ALL --mail-user=bhillma@sandia.gov" +echo "caseroot = ${caseroot}" From bb054ea08f734b9418efa669e9ccb7be4c72111c Mon Sep 17 00:00:00 2001 From: Benjamin Hillman Date: Tue, 11 Nov 2025 15:30:54 -0800 Subject: [PATCH 2/3] Edits to ecomip script for ne1024 --- run_scripts/ecomip/run.ecomip.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/run_scripts/ecomip/run.ecomip.sh b/run_scripts/ecomip/run.ecomip.sh index 535b100..05f5b53 100755 --- a/run_scripts/ecomip/run.ecomip.sh +++ b/run_scripts/ecomip/run.ecomip.sh @@ -3,18 +3,18 @@ set -e umask 022 script_root=${PWD} -branch="brhillman" #"decadal-production-run4" #"fix-nanobug-in-horiz-remap" #"decadal-production-run4" #"scorpio-update" +branch="master" #"decadal-production-run4" #"fix-nanobug-in-horiz-remap" #"decadal-production-run4" #"scorpio-update" code_root=${HOME}/codes/e3sm/branches/${branch} -res=ne4pg2_ne4pg2 #ne1024pg2_ne1024pg2 #ne1024pg2_ne1024pg2 #ne1024pg2_ne1024pg2 #ne30pg2_EC30to60E2r2 +res=ne1024pg2_ne1024pg2 #ne30pg2_ne30pg2 #ne1024pg2_ne1024pg2 #ne1024pg2_ne1024pg2 #ne1024pg2_ne1024pg2 #ne30pg2_EC30to60E2r2 compset=F2010-SCREAMv1 machine="pm-gpu" #chrysalis compiler="gnugpu" #intel project="e3sm" -walltime="00:10:00" -datestring="20250929" -casename=${branch}.${res}.${compset}.${datestring} +walltime="01:00:00" +datestring=20251111 #`date +'%Y%m%d'` #"20251031" +casename=ecomip.${res}.${compset}.${datestring} caseroot=${SCRATCH}/e3sm/cases/${casename} -pecount=32x1 +#pecount=32x1 mkdir -p `dirname ${caseroot}` ${code_root}/cime/scripts/create_newcase \ @@ -23,7 +23,6 @@ ${code_root}/cime/scripts/create_newcase \ --compset=${compset} \ --machine=${machine} \ --compiler=${compiler} \ - --pecount=${pecount} \ --project=${project} \ --walltime=${walltime} @@ -33,19 +32,19 @@ cd ${caseroot} DIN_LOC_ROOT=`./xmlquery DIN_LOC_ROOT --value` # Change run length -./xmlchange STOP_OPTION=ndays,STOP_N=3 -./xmlchange REST_OPTION=ndays,REST_N=3 +./xmlchange STOP_OPTION=ndays,STOP_N=2 +./xmlchange REST_OPTION=ndays,REST_N=2 ./xmlchange RESUBMIT=0 -./xmlchange RUN_STARTDATE="2024-08-01" +./xmlchange RUN_STARTDATE="2024-09-02" +#./xmlchange ATM_NCPL=48 # Run setup before configuring components ./case.setup # Namelist options for EAMxx if [ "${res}" == "ne1024pg2_ne1024pg2" ]; then - ./atmchange initial_conditions::Filename="${DIN_LOC_ROOT}/atm/scream/init/screami_ne1024np4L128_era5-19941001-topoadjx6t_20240214.nc" -elif [ "${res}" == "ne256pg2_ne256pg2" ]; then - ./atmchange initial_conditions::Filename="${DIN_LOC_ROOT}/atm/scream/init/screami_ne256np4L128_era5-19941001-topoadjx6t_20240123.nc" + #./atmchange initial_conditions::filename="${DIN_LOC_ROOT}/atm/scream/init/screami_ne1024np4L128_era5-19941001-topoadjx6t_20240214.nc" + ./atmchange initial_conditions::filename="/global/cfs/cdirs/e3sm/bhillma/ecomip/ecomip_ifs_od-0001_analysis20240902T0000Z_0.05deg_ml.ne1024np4.surface_adjusted.L128.temperature_adjusted.nc" fi # Turn on cosp and set frequency From 302081f2fa80ad2f0e98249b1ca03a1103e3d528 Mon Sep 17 00:00:00 2001 From: Benjamin Hillman Date: Tue, 11 Nov 2025 15:31:38 -0800 Subject: [PATCH 3/3] Edits to ecomip yaml --- run_scripts/ecomip/eamxx_ecomip_output.yaml | 38 ++++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/run_scripts/ecomip/eamxx_ecomip_output.yaml b/run_scripts/ecomip/eamxx_ecomip_output.yaml index c4e12b2..15ae907 100644 --- a/run_scripts/ecomip/eamxx_ecomip_output.yaml +++ b/run_scripts/ecomip/eamxx_ecomip_output.yaml @@ -1,42 +1,54 @@ %YAML 1.2 --- -averaging_type: average +averaging_type: instant fields: physics_pg2: field_names: # For Earthcare simulators + - ps # For computing pressure from hybrid levels - z_mid - p_int - p_mid - T_mid - horiz_winds - tracers + - qv + - qc + - qi + - qr + - qm + - nc + - ni + - nr + - bm - cldfrac_tot - precip_total_surf_mass_flux - precip_liq_surf_mass_flux - precip_ice_surf_mass_flux - omega -# - convective_mass_flux # Conditional diagnostic + #- convective_mass_flux # Conditional diagnostic - surf_radiative_T #skin_temperature - wind_speed_10m - - sea_level_pressure - - U_at_10m - - V_at_10m + #- U_at_10m + #- V_at_10m + - SeaLevelPressure + - phis - pseudo_density # For diagnosis - - sw_flux_up_at_model_top - - sw_flux_dn_at_model_top - - lw_flux_up_at_model_top - - lw_flux_dn_at_model_top - - sw_clrsky_flux_up_at_model_top - - lw_clrsky_flux_up_at_model_top + - SW_flux_up_at_model_top + - SW_flux_dn_at_model_top + - LW_flux_up_at_model_top + - LW_flux_dn_at_model_top + - SW_clrsky_flux_up_at_model_top + - LW_clrsky_flux_up_at_model_top - IceWaterPath - LiqWaterPath - VapWaterPath #- precip_accumulated_over_30min + - diag_equiv_reflectivity filename_prefix: ecomip.eamxx.h output_control: - frequency: 1 #${HIST_N} - frequency_units: nhours #${HIST_OPTION} + frequency: 30 #${HIST_N} + frequency_units: nminutes #${HIST_OPTION} skip_t0_output: 'false' ...