#!/bin/csh

#source /global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_cori-knl.csh

set grdnam  = "ne32x4_ATL.g"
set connam  = "outCS_ne32x4_ATL_connect.txt"

# Generate the element mesh.
#GenerateCSMesh --alt --res 30 --file ne30.g
#generate a connectivity file 
GenerateConnectivityFile --in_mesh ${grdnam} \
                              --out_type CGLL \
                              --out_np 4 \
                              --out_connect ${connam}

#ne30pg2:
set grdnam  = "ne32x4_ATLpg2.g"
set connam  = "outCS_ne32x4_ATLpg2_connect.txt"
#GenerateVolumetricMesh --in ne30.g \
#                       --out $grdnam \
#                       --np 2 \
#                       --uniform

ConvertExodusToSCRIP --in $grdnam \
                     --out ${grdnam}_scrip.nc

#generate a connectivity file 
GenerateConnectivityFile --in_mesh "$grdnam" \
                         --out_type FV \
                         --out_connect $connam
