#!/bin/bash
# Script file for running CHEM1D model, no longer has a compile option- easy to do manually
#
#---------------------1D DYNAMICS and CHEMISTRY CODES-------------------
# clean up files
   rm fort.*

# Assign data files to corresponding LUNs using symbolic links

   echo " Assign restart/initialization file"
   read -e FILE_IN
   echo " Assign tag name"
   read -e TAG

#-------------------------> INPUT FILES <-----------------------------

   ln -s $FILE_IN                                             fort.2
   ln -s SWITCHES_39S.INP                                     fort.4
   ln -s timegcm_t_m_p.txt                                      fort.15
   ln -s JPL17_wong_goodclo.INP       	                      fort.23
   ln -s FLXNEWREF.INP                                        fort.24
   ln -s CROSXX.INP                                           fort.27
   ln -s THREE_BODY.INP                                       fort.29
   ln -s ODF_NEW_newflx.DAT                                   fort.30
   ln -s EDDY_C.DAT                                           fort.31
   ln -s ODF_NO.DAT                                           fort.32

#-------------------------> OUTPUT FILES <----------------------------

   ln -s $TAG.'OUT'                                           fort.3
   ln -s ERROR.OUT                                            fort.25
   ln -s CHEM.OUT                                             fort.26
   ln -s SUMMARY.DAT                                          fort.10
   ln -s $TAG.'RES.OUT'                                       fort.100

   cat fort.4 fort.23 fort.2 > $TAG.'LOG'

  ( ./chem1d_out_66 > $TAG.'LOG' ) &

   exit



