#!/bin/bash
#PBS -A NCGD0011
#PBS -N mesh
#PBS -j oe
#PBS -q share
#PBS -l walltime=01:00:00
#PBS -l select=1:mpiprocs=2
#PBS -o log.out

#export TMPDIR=/glade/scratch/$USER/temp
#mkdir -p $TMPDIR
#export MPI_USE_ARRAY=false

file_i="/glade/p/cesm/cseg/inputdata/share/scripgrids/tx0.1v3_211102.nc"
file_o="/glade/p/cesm/cseg/inputdata/share/meshes/tx0.1v3_211102_ESMFmesh.nc"
mpirun `hostname` -np 2 /glade/p/cesmdata/cseg/PROGS/esmf/8.2.0b13/mpt/2.22/intel/19.1.1/bin/binO/Linux.intel.64.mpt.default/ESMF_Scrip2Unstruct $file_i $file_o  0 ESMF

file_i="/glade/p/cesm/cseg/inputdata/share/scripgrids/tx0.1v2_211102.nc"
file_o="/glade/p/cesm/cseg/inputdata/share/meshes/tx0.1v2_211102_ESMFmesh.nc"
mpirun `hostname` -np 2 /glade/p/cesmdata/cseg/PROGS/esmf/8.2.0b13/mpt/2.22/intel/19.1.1/bin/binO/Linux.intel.64.mpt.default/ESMF_Scrip2Unstruct $file_i $file_o  0 ESMF

file_i="/glade/p/cesm/cseg/inputdata/share/scripgrids/tx1v1_211102.nc"
file_o="/glade/p/cesm/cseg/inputdata/share/meshes/tx1v1_211102_ESMFmesh.nc"
mpirun `hostname` -np 2 /glade/p/cesmdata/cseg/PROGS/esmf/8.2.0b13/mpt/2.22/intel/19.1.1/bin/binO/Linux.intel.64.mpt.default/ESMF_Scrip2Unstruct $file_i $file_o  0 ESMF
