# -*- Mode: ksh -*-
# This is a typical namcouple for OASIS 3.0, illustrating, in mode NONE,
# some new interpolations using the new SCRIP library. Don't hesitate 
# to ask precisions or make suggestions (oasishelp@cerfacs.fr). 
#
 $SEQMODE
# This keyword concerns the coupling algorithm. Put here the maximum number
# of fields that have to be, at one particular coupling timestep,
# necessarily exchanged sequentially in a given order.
# In mode NONE, put always 1.
#
              1
 $END
#########################################################################
 $CHANNEL
# This describes the kind of message passing you want to use.
# Choices are NONE, MPI1 or MPI2.
                NONE
 $END
#########################################################################
 $NFIELDS
# In mode NONE, this is the total number of fields that will be interpolated.
             10
 $END
#########################################################################
 $JOBNAME
# This is just descriptive, it is an acronym for this given simulation
#
  INT
 $END
##########################################################################
 $NBMODEL
# This gives you the number of models running in this experiment +
# their names. In mode NONE, put always 0.
#
  0
 $END
###########################################################################
 $RUNTIME
# This gives you the total simulated time for this run in seconds.
# In mode NONE, put the number of time occurences to interpolate 
# from the restart file.
  1
 $END
###########################################################################
 $INIDATE
# This is the initial date of the run. It is regularly updated by the
# program. This is important as in our case here, we need to complete
# the sst data coming from the Pacific OGCM with climatological data
# of the right date.
#
  00010101
 $END
###########################################################################
 $MODINFO
# Indicates if a header is encapsulated within the field brick 
# in binary restart files for all communication techniques, and  
# for coupling field exchanges for PIPE, SIPC and GMEM.
# (YES or NOT)
  NOT
 $END
###########################################################################
 $NLOGPRT
# Index of printing level in output file cplout: 0 = no printing
#  1 = main routines and field names when treated, 2 = complete output
 2
 $END
###########################################################################
 $CALTYPE
# Calendar type :  0      = 365 day calendar (no leap years)
#                  1      = 365 day, or 366 days for leap years, calendar
#                  n (>1) = n day month calendar
# This is important only if FILLING analysis is used for a coupling
# field in the run.
   30
 $END
###########################################################################
 $STRINGS
##########################################################
#
fielda_1 fieldo_1 1 1 5 flda1.nc aods1.nc EXPORTED
at42 torc 
P 0 P 2
#
CHECKIN  MASK EXTRAP SCRIPR CHECKOUT
#
 INT=1
 99999999.
 NINENN  4   1   1
 DISTWGT LR SCALAR LATLON  10  4
 INT=1
###
##########################################################
fieldo_1 fielda_1 1 1  5 fldo1.nc oaga1.nc EXPORTED
torc at42
P 2 P 0
#
 CHECKIN  MASK EXTRAP SCRIPR CHECKOUT
#
 INT=1
 99999999.
 NINENN  4   1   2
 GAUSWGT LR SCALAR LATLON  10  4   0.5
 INT=1
###
##########################################################
fieldz_1 fieldo_1 1 1  1 fldz1.nc zobl1.nc EXPORTED
lmdz torc
P 2 P 2
#
 SCRIPR 
#
 BILINEAR LR SCALAR LATLON 10
###
##########################################################
fieldb_1 fieldo_1 1 1 3 fldb1.nc bobl1.nc EXPORTED
bt42 torc 
P 0 P 2
#
 CHECKIN  SCRIPR CHECKOUT
#
 INT=1
 BILINEAR D SCALAR LATITUDE 10 
 INT=1
###
##########################################################
fielda_1 fieldo_1 1 1 3 flda1.nc aobc1.nc EXPORTED
at42 torc
P 0 P 2
#
CHECKIN SCRIPR CHECKOUT
#
 INT=1
 BICUBIC LR SCALAR LATLON  1 
 INT=1
###
##########################################################
fieldo_1 fielda_1 1 1 3 fldo1.nc oacf1.nc EXPORTED
torc at42
P 2 P 0
#
CHECKIN SCRIPR CHECKOUT
#
 INT=1
 CONSERV LR SCALAR LATLON 1 FRACAREA FIRST
 INT=1
###
##########################################################
fieldb_1 fieldo_1 1 1 3 fldb1.nc bods1.nc EXPORTED
bt42 torc 
P 0 P 2
#
CHECKIN SCRIPR CHECKOUT
#
 INT=1
 DISTWGT U SCALAR LATLON 1 4
 INT=1
###
##########################################################
fielda_1 fieldo_1 1 1 3 flda1.nc aocd1.nc EXPORTED
at42 torc
P 0 P 2
#
CHECKIN SCRIPR CHECKOUT
#
 INT=1
 CONSERV LR SCALAR LATLON 1 DESTAREA FIRST
 INT=1
###
##########################################################
###
# Vector interpolation from AT42 to TORC 
# (no projection in the Cartesian coordinate system) 
# (rotation from spherical to local coordinate system
# on torc grid is automatic as angles are defined in grids.nc)
#
a_at42_I a_t_Iout 1 1 3 aaIin.nc atIou.nc EXPORTED 
at42 torc
P 0 P 2
#
CHECKIN SCRIPR CHECKOUT
#
 INT=1
 DISTWGT LR VECTOR_I LATLON 1 4 c_at42_J
 INT=1
#
#
c_at42_J c_t_Jout 1 1 3 caJin.nc ctJou.nc EXPORTED 
at42 torc
P 0 P 2
#
CHECKIN SCRIPR CHECKOUT
#
 INT=1
 DISTWGT LR VECTOR_J LATLON 1 4 a_at42_I 
 INT=1
#
#
$END


