Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Code Block
#!/bin/bash

# Setup environment
source /global/cfs/cdirs/e3sm/software/anaconda_envs/load_latest_e3sm_unified.sh
e3sm_root=${HOME}/codes/e3sm/branches/master

# Build gen_domain tool
export USER_FFLAGS='-traceback -g
-O0'
gen_domain=${e3sm_root}/cime/tools/mapping/gen_domain_files/gen_domain
cd `dirname ${gen_domain}`/src
../../..
eval $(${e3sm_root}/cime/CIME/Tools/get_case_env)
${e3sm_root}/cime/CIME/scripts/configure --macros-format Makefile --mpilib mpi-serial
(.
./.env_mach_specific.sh ; gmake)

# Set paths to mapping files
mapping_root="/global/homes/b/bhillma/cscratch/e3sm/grids/ne4"
ocn_grid_name=oQU240
atm_grid_name=ne4np4
lnd_grid_name=${atm_grid_name}

# run domain generation tool (from output directory)
domain_root=${mapping_root} 
mkdir -p ${domain_root} && cd ${domain_root}
for target_grid_name in ${lnd_grid_name} ${atm_grid_name}; do
    
    # Find conservative mapping files, use the latest file generated    
    map_ocn_to_target=`ls ${mapping_root}/map_${ocn_grid_name}_to_${target_grid_name}_monotr.*.nc | tail -n1`

    # Run domain tool code
    ${gen_domain} -m ${map_ocn_to_target} -o ${ocn_grid_name} -l ${target_grid_name}

done

...

...