#!/bin/ksh

ECEARTH=unknown
FCLENGTH=24
IFSRESOL=T21L31
OCERESOL=ORCA2
NPROCIFS=1
NPROCOCE=1
NFRCO=-1
OASIS3OLDWEIGHTS=true
OASIS3WEIGHTSDIR=unknown
DATADIR=unknown
STARTDATE=19900101

while getopts e:l:r:g:n:p:c:wW:0:1: option
do
  case $option in
    e) ECEARTH=$OPTARG;;
    l) FCLENGTH=$OPTARG;;
    r) IFSRESOL=$OPTARG;;
    g) OCERESOL=$OPTARG;;
    n) NPROCIFS=$OPTARG;;
    p) NPROCOCE=$OPTARG;;
    c) NFRCO=$OPTARG;;
    w) OASIS3OLDWEIGHTS=false;;
    W) OASIS3WEIGHTSDIR=$OPTARG;;
    0) DATADIR=$OPTARG;;
    1) STARTDATE=$OPTARG;;
    \?) exit 1;;
  esac
done

NFRCO=$((NFRCO*3600))
OASIS3TIME=$((FCLENGTH*3600))
OASIS3DATA=$DATADIR/oasis3

if [[ $OASIS3OLDWEIGHTS = "true" ]]; then
  wwrite=1
else
  wwrite=0
  ln -sf $OASIS3WEIGHTSDIR/* .
fi

case $IFSRESOL in
  T21L31 ) nxa=2048
           nya=1;;
  T42L40 ) nxa=8192
           nya=1;;
  T95L40 ) nxa=13280
           nya=1;;
  T159L62|T159L91) nxa=35718
           nya=1;;
  T255L62) nxa=88838
           nya=1;;
  T399L62) nxa=213988
           nya=1;;
  *      ) print "Unknown testcase in setupoasis3.ksh"
           exit 1;;  
esac

case $OCERESOL in
  ORCA2)  ocean_model_name=opa9
          nxo=182
          nyo=149;;
  ORCA1)  ocean_model_name=opa9
          nxo=362
          nyo=292;;
  FOcean) ocean_model_name=FOcean
          nxo=96
          nyo=48 ;;
  SlabOcean) ocean_model_name=SOcean
          nxo=96
          nyo=48 ;;
  *    )  print "Unknown testcase in setupoasis3.ksh"
          exit 1;;  
esac

case $OCERESOL in
FOcean|SlabOcean)

cat >namcouple <<EOF
 \$SEQMODE
            39
 \$END
 \$CHANNEL
  MPI1 NOBSEND
   $NPROCIFS $NPROCIFS
   $NPROCOCE $NPROCOCE
 \$END
 \$NFIELDS
            39
 \$END
 \$JOBNAME
  PSEU
 \$END
 \$NBMODEL
    2  ifsmod ${ocean_model_name}  99   99
 \$END
 \$RUNTIME
  $OASIS3TIME
 \$END
 \$INIDATE
   ${STARTDATE}
 \$END
 \$MODINFO
  NOT
 \$END
 \$NLOGPRT
  1
 \$END
 \$CALTYPE
  30
 \$END
 \$STRINGS
FOCETATM FRCOCEAN   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=1
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
FICETATM FRCSEAIC   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=2
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
FOCEUATM FRCOCEAU   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=3
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
FICEUATM FRCSEAIU   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=4
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
FOCEVATM FRCOCEAV   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=5
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
FICEVATM FRCSEAIV   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=6
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
TXOCUATM TAUX_OCE   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=7
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
TYOCUATM TAUY_OCE   4 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=8
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
TXICUATM TAUX_ICE   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=9
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
TYICUATM TAUY_ICE   4 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=10
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
TXOCVATM TAUX_ODM   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=11
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
TYOCVATM TAUY_ODM   4 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=12
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
TXICVATM TAUX_IDM   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=13
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
TYICVATM TAUY_IDM   4 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=14
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
PMEOCATM PMINEOCE  29 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=15
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
PMEICATM PMINEICE   5 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=16
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
SNWUPATM SNOWFALL  28 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=17
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
SNWEVATM SNOWEVAP   5 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=18
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
SOROCATM SSRD_OCE   7 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=19
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
NSROCATM SNSRDOCE   6 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=20
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
DQNOCATM DQDT_OCE   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=21
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
DEVOCATM DEDT_OCE   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=22
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
TREFOATM TREF_OCE   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=23
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
SORICATM SSRD_ICE   7 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=24
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
ALBICATM ALBD_ICE   7 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=25
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
NSRICATM SNSRDICE   6 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=26
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
DQNICATM DQDT_ICE   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=27
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
DEVICATM DEDT_ICE   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=28
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
TREFIATM TREF_ICE   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=29
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
RUNOFATM RUNOFOCE   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo foce SEQ=30
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
FRCOCEAN FOCATMOS 1 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya foce atmo SEQ=31
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
SSTOCEAN SSTATMOS 1 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya foce atmo SEQ=32
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
SICOCEAN FICATMOS 44 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya foce atmo SEQ=33
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
SITOCEAN TICATMOS 45 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya foce atmo SEQ=34
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
SIAOCEAN AICATMOS 46 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya foce atmo SEQ=35
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
THCK_ICE THIATMOS 45 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya foce atmo SEQ=36
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
STHK_ICE SNTATMOS 46 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya foce atmo SEQ=37
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
SUNOCEAN UOCATMOS 46 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya foce atmo SEQ=38
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
SVNOCEAN VOCATMOS 46 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya foce atmo SEQ=39
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
 \$END
EOF

;;

ORCA[12])

cat >namcouple <<EOF
 \$SEQMODE
            39
 \$END
 \$CHANNEL
  MPI1 NOBSEND
   $NPROCIFS $NPROCIFS
   $NPROCOCE $NPROCOCE
 \$END
 \$NFIELDS
            39
 \$END
 \$JOBNAME
  PSEU
 \$END
 \$NBMODEL
  2  ifsmod ${ocean_model_name}  99   99
 \$END
 \$RUNTIME
  $OASIS3TIME
 \$END
 \$INIDATE
   1990010100
 \$END
 \$MODINFO
  NOT
 \$END
 \$NLOGPRT
  1
 \$END
 \$CALTYPE
  1
 \$END
 \$STRINGS
FOCETATM FRACOCET   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=1
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
FICETATM FRACICET   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=2
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
FOCEUATM FRACOCEU   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opau SEQ=3
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
FICEUATM FRACICEU   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opau SEQ=4
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
FOCEVATM FRACOCEV   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opav SEQ=5
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
FICEVATM FRACICEV   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opav SEQ=6
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
TXOCUATM TXWOCEWU   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opau SEQ=7
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
TYOCUATM TYWOCEWU   4 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opau SEQ=8
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
TXICUATM TXIOCEWU   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opau SEQ=9
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
TYICUATM TYIOCEWU   4 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opau SEQ=10
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
TXOCVATM TXWOCEWV   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opav SEQ=11
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
TYOCVATM TYWOCEWV   4 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opav SEQ=12
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
TXICVATM TXIOCEWV   3 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opav SEQ=13
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
TYICVATM TYIOCEWV   4 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opav SEQ=14
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
PMEOCATM PMNEOCET   5 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=15
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
PMEICATM PMNEICET   5 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=16
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
SNWUPATM SNWFICET   5 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=17
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
SNWEVATM SNWEICET   7 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=18
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
SOROCATM QSSROCET   7 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=19
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
#
NSROCATM QNSROCET 6 $NFRCO 3  fldo1.nc    EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=20
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
DQNOCATM DQDTOCET   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=21
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
#
DEVOCATM DEDTOCET   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=22
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
TREFOATM TREFOCET   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=23
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
#
SORICATM QSSRICET 7 $NFRCO 3  fldo1.nc    EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=24
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
ALBICATM ALBDICET 7 $NFRCO 3  fldo1.nc    EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=25
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
NSRICATM QNSRICET 6 $NFRCO 3  fldo1.nc    EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=26
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
DQNICATM DQDTICET 1 $NFRCO 3  fldo1.nc    EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=27
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
DEVICATM DEDTICET 1 $NFRCO 3  fldo1.nc    EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=28
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
TREFIATM TREFICET   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=29
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
#
RUNOFATM RUNOFOCT   26 $NFRCO  3 flda1.nc EXPORTED
$nxa $nya $nxo $nyo atmo opat SEQ=30
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV D SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1 
#
FRCOCEAN FOCATMOS 1 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya opat atmo SEQ=31
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
SSTOCEAN SSTATMOS 1 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya opat atmo SEQ=32
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
FRCSEAIC FICATMOS 44 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya opat atmo SEQ=33
P  0  P  0
CHECKIN SCRIPR CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
SITSEAIC TICATMOS 45 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya opat atmo SEQ=34
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
ALBSEAIC AICATMOS 46 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya opat atmo SEQ=35
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
THKSEAIC THIATMOS 45 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya opat atmo SEQ=36
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
SNTSEAIC SNTATMOS 46 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya opat atmo SEQ=37
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
SUNOCEAN UOCATMOS 46 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya opau atmo SEQ=38
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
#
SVNOCEAN VOCATMOS 46 $NFRCO 3  fldo1.nc    EXPORTED
$nxo $nyo $nxa $nya opav atmo SEQ=39
P  0  P  0
CHECKIN SCRIPR  CHECKOUT
 INT=1
 CONSERV LR SCALAR LATITUDE 16 FRACAREA FIRST
 INT=1
 \$END
EOF

;;

esac

ln -sf $OASIS3DATA/cf_name_table.txt .

