###############################################################################
#
#      Input file for OASIS3
# 
#      This version is for use with IPSL_CM4_v1 
#
#      The file will be edited at runtime to update it for
#         - the initial date of the run
#
###############################################################################
#  
#      Input delimiters have to occupy position 1 to 9 !
#      No blank lines allowed !
#      Length of input lines <= 80 !
#
###############################################################################
#
# NFIELDS : total number of fields being exchanged.
#
 $NFIELDS
            25
 $END
###############################################################################
#
# NBMODEL : number of models and their names (CHAR*6).
#
 $NBMODEL
  2  LMDZ oceanx
 $END
###############################################################################
# 
# RUNTIME: total simulated time for the actual run in seconds (<I8)
#
 $RUNTIME
  <total_time>
 $END
###############################################################################
#
# NLOGPRT: printing level in debug file : 
#
 $NLOGPRT
   2 <lucia_ok>
 $END
# 
###############################################################################
 $STRINGS
###############################################################################
#
#                      OCEAN  --->>>  ATMOS
#                      --------------------
# Field 1 : Weighted sea surface temperature (o->a 1)
# 
O_SSTSST  SISUTESW 1 <freq_coupling>  4  sstoc.nc  <output_mode> 
362 292 96 96 torc  tlmd  LAG=<lag_oce>
P  2 P  0
LOCTRANS CHECKIN MAPPING CHECKOUT
# LOCTRANS: AVERAGE to average value over coupling period
 AVERAGE
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Mozaic: 1) mapping filename 2) connected unit 3) dataset rank 4) Maximum
#         number of overlapped neighbors
rmp_torc_to_tlmd_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
############################################################################
#
# Field 2 : Sea ice extent  (o->a 2)
#
OIceFrc SIICECOV 44 <freq_coupling>  4  sstoc.nc <output_mode>
362 292 96 96 torc  tlmd   LAG=<lag_oce>
P  2 P  0
#
LOCTRANS CHECKIN MAPPING  CHECKOUT 
 AVERAGE
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
#
rmp_torc_to_tlmd_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
#
############################################################################
#
# Field 3 : Weighted Sea Ice Temperature (o->a 3)
#
O_TepIce  SIICTEMW 34 <freq_coupling>  4  sstoc.nc  <output_mode>
362 292 96 96 torc  tlmd   LAG=<lag_oce>
P  2 P  0
LOCTRANS CHECKIN MAPPING CHECKOUT
 AVERAGE
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# 
rmp_torc_to_tlmd_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
############################################################################
#
# Field 4 : Weighted Sea ice albedo (o->a 4)
#
O_AlbIce  SIICEALW 17 <freq_coupling>  4  sstoc.nc  <output_mode>
362 292 96 96 torc  tlmd  LAG=<lag_oce>  
P  2 P  0
#
LOCTRANS CHECKIN MAPPING CHECKOUT
 AVERAGE
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
#
rmp_torc_to_tlmd_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
#
############################################################################
#
# Field 5 : Current surface (o->a 5)
O_OCurx1 CURRENTX 321 <freq_coupling>  4  sstoc.nc  <output_mode>
362 292 96 96 torc    tlmd  LAG=<lag_oce>
P  2 P  0
LOCTRANS CHECKIN MAPPING CHECKOUT
 AVERAGE
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
#
rmp_torc_to_tlmd_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1  
#
#
############################################################################
#
# Field 6 : Current surface (o->a 6)
O_OCury1 CURRENTY 321 <freq_coupling>  4  sstoc.nc  <output_mode>
362 292 96 96 torc    tlmd  LAG=<lag_oce>
P  2 P  0
LOCTRANS CHECKIN MAPPING CHECKOUT
 AVERAGE
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
#
rmp_torc_to_tlmd_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#  
############################################################################
#
# Field 7 : Current surface (o->a 7)
O_OCurz1 CURRENTZ 321 <freq_coupling>  4  sstoc.nc  <output_mode>
362 292 96 96 torc    tlmd  LAG=<lag_oce>
P  2 P  0
LOCTRANS CHECKIN MAPPING CHECKOUT
 AVERAGE
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
#
rmp_torc_to_tlmd_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
#
############################################################################
#
#                      ATMOSPHERE  --->>>  OCEAN
#                      -------------------------
############################################################################   
#
# Field 8 : wind stress along X axis (a->o 1)
#
COTAUXXU O_OTaux1 23 <freq_coupling>  3  flxat.nc   <output_mode>
96 96 362 292 tlmd    uorc  LAG=<lag_atm> 
P  0 P  2
CHECKIN SCRIPR CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
BILINEAR LR SCALAR LATLON 10
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
###########################################################################
#
# Field 9 : stress along Y axis (a->o 2)
#
COTAUYYU O_OTauy1 23 <freq_coupling>  3  flxat.nc  <output_mode>
96 96 362 292 tlmd    uorc  LAG=<lag_atm> 
P  0 P  2
CHECKIN SCRIPR CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
BILINEAR LR SCALAR LATLON 10
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
###########################################################################
#
# Field 10 :wind stress along Z axis (a->o 3)
#
COTAUZZU O_OTauz1 23 <freq_coupling>  3  flxat.nc  <output_mode>
96 96 362 292 tlmd    uorc  LAG=<lag_atm> 
P  0 P  2
CHECKIN SCRIPR CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
BILINEAR LR SCALAR LATLON 10
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
##########################################################################
#
# Field 11 : wind stress along X axis 2 (a->o 4)
#
COTAUXXV O_OTaux2  24 <freq_coupling>  3    flxat.nc  <output_mode>
96 96 362 292 tlmd    vorc  LAG=<lag_atm> 
P  0 P  2
CHECKIN SCRIPR CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
BILINEAR LR SCALAR LATLON 10
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
##########################################################################
#
# Field 12 : wind stress along Y axis 2 (a->o 5) 
#
COTAUYYV O_OTauy2  24 <freq_coupling>  3    flxat.nc  <output_mode>
96 96 362 292 tlmd    vorc  LAG=<lag_atm>
P  0 P  2
CHECKIN SCRIPR CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
BILINEAR LR SCALAR LATLON 10
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
##########################################################################
#
# Field 13 :  wind stress along Z axis 2 (a->o 6) 
#
COTAUZZV O_OTauz2  24 <freq_coupling>  3    flxat.nc  <output_mode>
96 96 362 292 tlmd    vorc  LAG=<lag_atm>
P  0 P  2
CHECKIN SCRIPR CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
BILINEAR LR SCALAR LATLON 10
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
#########################################################################
# Field 14 :  wind speed 10m (a->o 7) 
#
COWINDSP O_Wind10  56 <freq_coupling>  3    flxat.nc  <output_mode>
96 96 362 292 tlmd    torc  LAG=<lag_atm>
P  0 P  2
CHECKIN SCRIPR CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
BILINEAR LR SCALAR LATLON 10
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
# 
#########################################################################
#
# Field 15 : Total rain (a->o 8)
#
COTOTRAI OTotRain 26 <freq_coupling>  3   flxat.nc   <output_mode>
96 96 362 292 tlmd    torc  LAG=<lag_atm> 
P  0 P  2
CHECKIN MAPPING CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Interpolation method ou parametres mozaic
rmp_tlmd_to_torc_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
##########################################################################
#
# Field 16 :  Total snow (a->o 9)
#
COTOTSNO  OTotSnow 28 <freq_coupling>  3   flxat.nc   <output_mode>
96 96 362 292 tlmd    torc  LAG=<lag_atm> 
P  0 P  2
CHECKIN MAPPING CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Interpolation method ou parametres mozaic
rmp_tlmd_to_torc_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
#########################################################################
#
# Field 17 : Total evap (a->o 10)
#
COTOTEVA  OTotEvap 25 <freq_coupling>  3   flxat.nc   <output_mode>
96 96 362 292 tlmd    torc  LAG=<lag_atm> 
P  0 P  2
CHECKIN MAPPING CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Interpolation method ou parametres mozaic
rmp_tlmd_to_torc_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
##########################################################################
#
# Field 18 : Evaporation Ice  (a->o 11)
#
COICEVAP OIceEvap 41 <freq_coupling>  3   flxat.nc   <output_mode>
96 96 362 292 tlmd    torc  LAG=<lag_atm> 
P  0 P  2
CHECKIN MAPPING CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Interpolation method ou parametres mozaic
rmp_tlmd_to_torc_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
##########################################################################
#
# Field 19 : Total solar heat flux (a->o 12)
#
COQSRMIX O_QsrMix  7 <freq_coupling> 3   flxat.nc  <output_mode>
96 96 362 292 tlmd    torc  LAG=<lag_atm>
P  0 P  2
CHECKIN MAPPING CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Interpolation method or mozaic parameters
rmp_tlmd_to_torc_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
#########################################################################
#
# Field 20 : Total Non solar heat flux (a->o 13)
#
COQNSMIX O_QnsMix 6 <freq_coupling>  3   flxat.nc  <output_mode>
96 96 362 292 tlmd    torc   LAG=<lag_atm>
P  0 P  2
CHECKIN MAPPING CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Interpolation method ou parametres mozaic
rmp_tlmd_to_torc_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
###########################################################################
#
# Field 21 : solar heat flux on ice (a->o 14)
#
COSHFICE O_QsrIce  7 <freq_coupling> 3   flxat.nc  <output_mode>
96 96 362 292 tlmd    torc  LAG=<lag_atm>
P  0 P  2
CHECKIN MAPPING CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Interpolation method or mozaic parameters
rmp_tlmd_to_torc_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
############################################################################
#
# Field 22 : Non solar heat flux on ice (a->o 15)
#
CONSFICE O_QnsIce 6 <freq_coupling>  3  flxat.nc  <output_mode>
96 96 362 292 tlmd    torc  LAG=<lag_atm>
P  0 P  2
CHECKIN MAPPING CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Interpolation method ou parametres mozaic
rmp_tlmd_to_torc_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
############################################################################
#
# Field 23 : Non solar heat flux derivative (a->o 16)
#
CODFLXDT O_dQnsdT  35 <freq_coupling>  3   flxat.nc  <output_mode>
96 96 362 292 tlmd    torc  LAG=<lag_atm>
P  0 P  2
CHECKIN MAPPING CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Interpolation method ou parametres mozaic
rmp_tlmd_to_torc_MOSAIC.nc src
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
#########################################################################
#
# Field 24 : iceberg calving (a->o 17)
#
COCALVIN OCalving  36 <freq_coupling>  4  flxat.nc  <output_mode>
96 96 362 292 tlmd    torc  LAG=<lag_atm> 
P  0 P  2
CHECKIN MAPPING BLASNEW CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Interpolation method ou parametres mozaic
rmp_tlmd_to_torc_MOSAIC_calvin.nc src
# Set to ZERO \!/
1.0 0
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
#########################################################################
#
# Field 25 : liquid run-off (river + direct)  (a->o 18)
#
COLIQRUN  O_Runoff 32 <freq_coupling>  5  flxat.nc   <output_mode>
96 96 362 292 aone torc  LAG=<lag_atm> 
P  0 P  2
CHECKIN MAPPING CONSERV BLASNEW CHECKOUT
# CHECKIN: indicate computation of global, land and sea field integrals.
 INT=1
# Interpolation method ou parametres mozaic
# weights convert from kg/s to kg/m^2/s
rmp_tlmd_to_torc_MOSAIC_rivflu.nc dst
# CONSERV
GLOBAL bfb
# change units from m/s to kg/s
1000.0 0
# CHECKOUT: indicate computation of global, land and sea field integrals.
 INT=1
#
#########################################################################
# Field 26 : wind stress module (a->o 19)
#
##COTAUMOD  O_TauMod 466 <freq_coupling>  6   flxat.nc   <output_mode>
##tlmd    torc  LAG=<lag_atm> 
##P  0 P  2
##INVERT CHECKIN MASK EXTRAP INTERP CHECKOUT
# Reverse
##NORSUD WSTEST
# CHECKIN: indicate computation of global, land and sea field integrals.
## INT=1
# Mask value
##888888.
# Extrapolation method
##NINENN 2 1 1
# Interpolation method
##BICUBIPS  Z   SCALAR
# CHECKOUT: indicate computation of global, land and sea field integrals.
## INT=1
#
#########################################################################
#
 $END
