###############################################################################
#                   CICE  
#                     | 1h 
# TEST   - GSM <-> Mediator <-> MOM5
#        -     1h     |     2h    coupling interval
#        -            | 1h
#        -           LIS
#        - Running side-by-side with WRF-Hydro
#        - Starting at 2009120100, running for 4 hours
#
###############################################################################

export TEST_DESCR="NUOPC: GSM <-1h-> MED <-1h-> CICE <-1h-> MED <-1h-> LIS <-1h-> MED <-2h-> MOM5 + WRFHYDRO ...4 hours" 

# - gsm configuration ---
export_gsm
export TASKS=110
export WLCLK=30
export CDATE=2009120100
#export NDAYS=1
export NHRS=4
export wave=126 ; export lm=64 ; export lsoil=4
export CPLFLX=.true.
export A2OI_OUT=.true.
export FHZER=1
export FHOUT=1

# - nems.configure ---
export_nems
export nems_configure=med_atm_lnd_ice_ocn_sbys_hyd
export atm_model=gsm
export atm_petlist_bounds="0 31"
export lnd_model=lis
export lnd_petlist_bounds="66 77"
export ocn_model=mom5
export ocn_petlist_bounds="32 55"
export ice_model=cice
export ice_petlist_bounds="56 59"
export hyd_model=wrfhydro
export hyd_petlist_bounds="78 109"
export med_model=nems
export med_petlist_bounds="60 65"
export coupling_interval_slow_sec=7200.0
export coupling_interval_fast_sec=3600.0

# - component specific setup calls ---
setup_cice
setup_mom5
if [ $MACHINE_ID = theia ] ; then
  setup_lis "/scratch4/NCEPDEV/nems/noscrub/Daniel.Rosen/2009_lis_t126/lis.config.gdas"
  setup_wrfhydro "/scratch4/NCEPDEV/nems/noscrub/Daniel.Rosen/2009_wrfhydro/hydro.namelist" \
    "/scratch4/NCEPDEV/nems/noscrub/Daniel.Rosen/2009_wrfhydro" \
    "/scratch4/NCEPDEV/nems/noscrub/Daniel.Rosen/2009_wrfhydro/namelist.hrldas"
elif [ $MACHINE_ID = yellowstone ] ; then
  setup_lis "/glade/p/work/dunlap/NEMS-DATA/2009_lis_t126/lis.config.gdas"
  setup_wrfhydro "/glade/p/work/dunlap/NEMS-DATA/2009_wrfhydro/hydro.namelist" \
    "/glade/p/work/dunlap/NEMS-DATA/2009_wrfhydro" \
    "/glade/p/work/dunlap/NEMS-DATA/2009_wrfhydro/namelist.hrldas"
fi

# - 
RUN_SCRIPT=rt_gfs.sh

# - validation
export CNTL_DIR=2009_nems_gsm_cice_mom5
export LIST_FILES=" \
 sigf00 sigf01 sigf02 sigf04 sigf06 sigf12 sigf24     \
 sfcf00 sfcf01 sfcf02 sfcf04 sfcf06 sfcf12 sfcf24     \
 flxf00 flxf01 flxf02 flxf04 flxf06 flxf12 flxf24     "
LIST_FILES+=" \
 field_atm_export_inst_down_lw_flx.nc                 \
 field_atm_export_inst_down_sw_flx.nc                 \
 field_atm_export_inst_down_sw_ir_dif_flx.nc          \
 field_atm_export_inst_down_sw_ir_dir_flx.nc          \
 field_atm_export_inst_down_sw_vis_dif_flx.nc         \
 field_atm_export_inst_down_sw_vis_dir_flx.nc         \
 field_atm_export_inst_laten_heat_flx.nc              \
 field_atm_export_inst_merid_moment_flx.nc            \
 field_atm_export_inst_merid_wind_height10m.nc        \
 field_atm_export_inst_net_lw_flx.nc                  \
 field_atm_export_inst_net_sw_flx.nc                  \
 field_atm_export_inst_net_sw_ir_dif_flx.nc           \
 field_atm_export_inst_net_sw_ir_dir_flx.nc           \
 field_atm_export_inst_net_sw_vis_dif_flx.nc          \
 field_atm_export_inst_net_sw_vis_dir_flx.nc          \
 field_atm_export_inst_pres_height_surface.nc         \
 field_atm_export_inst_sensi_heat_flx.nc              \
 field_atm_export_inst_spec_humid_height2m.nc         \
 field_atm_export_inst_surface_height.nc              \
 field_atm_export_inst_temp_height2m.nc               \
 field_atm_export_inst_temp_height_surface.nc         \
 field_atm_export_inst_zonal_moment_flx.nc            \
 field_atm_export_inst_zonal_wind_height10m.nc        \
 field_atm_export_mean_down_lw_flx.nc                 \
 field_atm_export_mean_down_sw_flx.nc                 \
 field_atm_export_mean_down_sw_ir_dif_flx.nc          \
 field_atm_export_mean_down_sw_ir_dir_flx.nc          \
 field_atm_export_mean_down_sw_vis_dif_flx.nc         \
 field_atm_export_mean_down_sw_vis_dir_flx.nc         \
 field_atm_export_mean_laten_heat_flx.nc              \
 field_atm_export_mean_merid_moment_flx.nc            \
 field_atm_export_mean_net_lw_flx.nc                  \
 field_atm_export_mean_net_sw_flx.nc                  \
 field_atm_export_mean_net_sw_ir_dif_flx.nc           \
 field_atm_export_mean_net_sw_ir_dir_flx.nc           \
 field_atm_export_mean_net_sw_vis_dif_flx.nc          \
 field_atm_export_mean_net_sw_vis_dir_flx.nc          \
 field_atm_export_mean_prec_rate.nc                   \
 field_atm_export_mean_sensi_heat_flx.nc              \
 field_atm_export_mean_zonal_moment_flx.nc            \
 field_atm_export_inst_merid_wind_height_lowest.nc    \
 field_atm_export_inst_pres_height_lowest.nc          \
 field_atm_export_inst_spec_humid_height_lowest.nc    \
 field_atm_export_inst_temp_height_lowest.nc          \
 field_atm_export_inst_zonal_wind_height_lowest.nc    "
LIST_FILES+=" \
 field_atm_import_ice_fraction.nc                     \
 field_atm_import_inst_ice_ir_dif_albedo.nc           \
 field_atm_import_inst_ice_ir_dir_albedo.nc           \
 field_atm_import_inst_ice_vis_dif_albedo.nc          \
 field_atm_import_inst_ice_vis_dir_albedo.nc          \
 field_atm_import_land_mask.nc                        \
 field_atm_import_mean_evap_rate_atm_into_ice.nc      \
 field_atm_import_mean_laten_heat_flx_atm_into_ice.nc \
 field_atm_import_mean_sensi_heat_flx_atm_into_ice.nc \
 field_atm_import_mean_up_lw_flx_ice.nc               \
 field_atm_import_sea_surface_temperature.nc          \
 field_atm_import_stress_on_air_ice_merid.nc          \
 field_atm_import_stress_on_air_ice_zonal.nc          "
LIST_FILES+=" \
 field_ice_export_ice_fraction.nc                     \
 field_ice_export_ice_mask.nc                         \
 field_ice_export_inst_ice_ir_dif_albedo.nc           \
 field_ice_export_inst_ice_ir_dir_albedo.nc           \
 field_ice_export_inst_ice_vis_dif_albedo.nc          \
 field_ice_export_inst_ice_vis_dir_albedo.nc          \
 field_ice_export_mean_evap_rate_atm_into_ice.nc      \
 field_ice_export_mean_laten_heat_flx_atm_into_ice.nc \
 field_ice_export_mean_sensi_heat_flx_atm_into_ice.nc \
 field_ice_export_mean_sw_pen_to_ocn.nc               \
 field_ice_export_mean_up_lw_flx_ice.nc               \
 field_ice_export_sea_ice_temperature.nc              \
 field_ice_export_stress_on_air_ice_merid.nc          \
 field_ice_export_stress_on_air_ice_zonal.nc          \
 field_ice_export_stress_on_ocn_ice_merid.nc          \
 field_ice_export_stress_on_ocn_ice_zonal.nc          "
LIST_FILES+=" \
 field_ice_import_air_density_height_lowest.nc        \
 field_ice_import_freezing_melting_potential.nc       \
 field_ice_import_inst_merid_wind_height_lowest.nc    \
 field_ice_import_inst_pres_height_lowest.nc          \
 field_ice_import_inst_spec_humid_height_lowest.nc    \
 field_ice_import_inst_temp_height_lowest.nc          \
 field_ice_import_inst_zonal_wind_height_lowest.nc    \
 field_ice_import_mean_down_lw_flx.nc                 \
 field_ice_import_mean_down_sw_ir_dif_flx.nc          \
 field_ice_import_mean_down_sw_ir_dir_flx.nc          \
 field_ice_import_mean_down_sw_vis_dif_flx.nc         \
 field_ice_import_mean_down_sw_vis_dir_flx.nc         \
 field_ice_import_mean_fprec_rate.nc                  \
 field_ice_import_mean_prec_rate.nc                   \
 field_ice_import_mixed_layer_depth.nc                \
 field_ice_import_ocn_current_merid.nc                \
 field_ice_import_ocn_current_zonal.nc                \
 field_ice_import_sea_surface_slope_merid.nc          \
 field_ice_import_sea_surface_slope_zonal.nc          \
 field_ice_import_sea_surface_temperature.nc          \
 field_ice_import_s_surf.nc                           "
LIST_FILES+=" \
 field_med_atm_a_land_mask.nc                         \
 field_med_ice_a_ice_mask.nc                          \
 field_med_ocn_a_ocean_mask.nc                        "
#LIST_FILES+=" \
# field_med_from_atm_inst_down_lw_flx.nc               \
# field_med_from_atm_inst_down_sw_flx.nc               \
# field_med_from_atm_inst_down_sw_ir_dif_flx.nc        \
# field_med_from_atm_inst_down_sw_ir_dir_flx.nc        \
# field_med_from_atm_inst_down_sw_vis_dif_flx.nc       \
# field_med_from_atm_inst_down_sw_vis_dir_flx.nc       \
# field_med_from_atm_inst_laten_heat_flx.nc            \
# field_med_from_atm_inst_merid_moment_flx.nc          \
# field_med_from_atm_inst_merid_wind_height10m.nc      \
# field_med_from_atm_inst_net_lw_flx.nc                \
# field_med_from_atm_inst_net_sw_flx.nc                \
# field_med_from_atm_inst_net_sw_ir_dif_flx.nc         \
# field_med_from_atm_inst_net_sw_ir_dir_flx.nc         \
# field_med_from_atm_inst_net_sw_vis_dif_flx.nc        \
# field_med_from_atm_inst_net_sw_vis_dir_flx.nc        \
# field_med_from_atm_inst_pres_height_surface.nc       \
# field_med_from_atm_inst_sensi_heat_flx.nc            \
# field_med_from_atm_inst_spec_humid_height2m.nc       \
# field_med_from_atm_inst_surface_height.nc            \
# field_med_from_atm_inst_temp_height2m.nc             \
# field_med_from_atm_inst_temp_height_surface.nc       \
# field_med_from_atm_inst_zonal_moment_flx.nc          \
# field_med_from_atm_inst_zonal_wind_height10m.nc      \
# field_med_from_atm_mean_down_lw_flx.nc               \
# field_med_from_atm_mean_down_sw_flx.nc               \
# field_med_from_atm_mean_down_sw_ir_dif_flx.nc        \
# field_med_from_atm_mean_down_sw_ir_dir_flx.nc        \
# field_med_from_atm_mean_down_sw_vis_dif_flx.nc       \
# field_med_from_atm_mean_down_sw_vis_dir_flx.nc       \
# field_med_from_atm_mean_laten_heat_flx.nc            \
# field_med_from_atm_mean_merid_moment_flx.nc          \
# field_med_from_atm_mean_net_lw_flx.nc                \
# field_med_from_atm_mean_net_sw_flx.nc                \
# field_med_from_atm_mean_net_sw_ir_dif_flx.nc         \
# field_med_from_atm_mean_net_sw_ir_dir_flx.nc         \
# field_med_from_atm_mean_net_sw_vis_dif_flx.nc        \
# field_med_from_atm_mean_net_sw_vis_dir_flx.nc        \
# field_med_from_atm_mean_prec_rate.nc                 \
# field_med_from_atm_mean_sensi_heat_flx.nc            \
# field_med_from_atm_mean_zonal_moment_flx.nc          \
# field_med_from_atm_inst_merid_wind_height_lowest.nc  \
# field_med_from_atm_inst_pres_height_lowest.nc        \
# field_med_from_atm_inst_spec_humid_height_lowest.nc  \
# field_med_from_atm_inst_temp_height_lowest.nc        \
# field_med_from_atm_inst_zonal_wind_height_lowest.nc  \
# field_med_from_ice_ice_fraction.nc                   \
# field_med_from_ice_inst_ice_ir_dif_albedo.nc         \
# field_med_from_ice_inst_ice_ir_dir_albedo.nc         \
# field_med_from_ice_inst_ice_vis_dif_albedo.nc        \
# field_med_from_ice_inst_ice_vis_dir_albedo.nc        \
# field_med_from_ice_mean_evap_rate_atm_into_ice.nc    \
# field_med_from_ice_mean_laten_heat_flx_atm_into_ice.nc \
# field_med_from_ice_mean_sensi_heat_flx_atm_into_ice.nc \
# field_med_from_ice_mean_sw_pen_to_ocn.nc             \
# field_med_from_ice_mean_up_lw_flx_ice.nc             \
# field_med_from_ice_sea_ice_temperature.nc            \
# field_med_from_ice_stress_on_air_ice_merid.nc        \
# field_med_from_ice_stress_on_air_ice_zonal.nc        \
# field_med_from_ice_stress_on_ocn_ice_merid.nc        \
# field_med_from_ice_stress_on_ocn_ice_zonal.nc        \
# field_med_from_ocn_ocean_mask.nc                     \
# field_med_from_ocn_ocn_current_merid.nc              \
# field_med_from_ocn_ocn_current_zonal.nc              \
# field_med_from_ocn_sea_lev.nc                        \
# field_med_from_ocn_sea_surface_temperature.nc        \
# field_med_from_ocn_s_surf.nc                         \
# field_med_to_atm_ice_fraction.nc                     \
# field_med_to_atm_inst_ice_ir_dif_albedo.nc           \
# field_med_to_atm_inst_ice_ir_dir_albedo.nc           \
# field_med_to_atm_inst_ice_vis_dif_albedo.nc          \
# field_med_to_atm_inst_ice_vis_dir_albedo.nc          \
# field_med_to_atm_land_mask.nc                        \
# field_med_to_atm_mean_evap_rate_atm_into_ice.nc      \
# field_med_to_atm_mean_laten_heat_flx_atm_into_ice.nc \
# field_med_to_atm_mean_sensi_heat_flx_atm_into_ice.nc \
# field_med_to_atm_mean_up_lw_flx_ice.nc               \
# field_med_to_atm_sea_surface_temperature.nc          \
# field_med_to_atm_stress_on_air_ice_merid.nc          \
# field_med_to_atm_stress_on_air_ice_zonal.nc          \
# field_med_to_ice_air_density_height_lowest.nc        \
# field_med_to_ice_freezing_melting_potential.nc       \
# field_med_to_ice_inst_merid_wind_height_lowest.nc    \
# field_med_to_ice_inst_pres_height_lowest.nc          \
# field_med_to_ice_inst_spec_humid_height_lowest.nc    \
# field_med_to_ice_inst_temp_height_lowest.nc          \
# field_med_to_ice_inst_zonal_wind_height_lowest.nc    \
# field_med_to_ice_mean_down_lw_flx.nc                 \
# field_med_to_ice_mean_down_sw_ir_dif_flx.nc          \
# field_med_to_ice_mean_down_sw_ir_dir_flx.nc          \
# field_med_to_ice_mean_down_sw_vis_dif_flx.nc         \
# field_med_to_ice_mean_down_sw_vis_dir_flx.nc         \
# field_med_to_ice_mean_fprec_rate.nc                  \
# field_med_to_ice_mean_prec_rate.nc                   \
# field_med_to_ice_mixed_layer_depth.nc                \
# field_med_to_ice_ocn_current_merid.nc                \
# field_med_to_ice_ocn_current_zonal.nc                \
# field_med_to_ice_sea_surface_slope_merid.nc          \
# field_med_to_ice_sea_surface_slope_zonal.nc          \
# field_med_to_ice_sea_surface_temperature.nc          \
# field_med_to_ice_s_surf.nc                           \
# field_med_to_ocn_inst_pres_height_surface.nc         \
# field_med_to_ocn_mean_evap_rate.nc                   \
# field_med_to_ocn_mean_fprec_rate.nc                  \
# field_med_to_ocn_mean_merid_moment_flx.nc            \
# field_med_to_ocn_mean_net_lw_flx.nc                  \
# field_med_to_ocn_mean_net_sw_ir_dif_flx.nc           \
# field_med_to_ocn_mean_net_sw_ir_dir_flx.nc           \
# field_med_to_ocn_mean_net_sw_vis_dif_flx.nc          \
# field_med_to_ocn_mean_net_sw_vis_dir_flx.nc          \
# field_med_to_ocn_mean_prec_rate.nc                   \
# field_med_to_ocn_mean_sensi_heat_flx.nc              \
# field_med_to_ocn_mean_zonal_moment_flx.nc            "
LIST_FILES+=" \
 field_ocn_export_ocean_mask.nc                       \
 field_ocn_export_ocn_current_merid.nc                \
 field_ocn_export_ocn_current_zonal.nc                \
 field_ocn_export_sea_lev.nc                          \
 field_ocn_export_sea_surface_temperature.nc          \
 field_ocn_export_s_surf.nc                           "
LIST_FILES+=" \
 field_ocn_import_inst_pres_height_surface.nc         \
 field_ocn_import_mean_evap_rate.nc                   \
 field_ocn_import_mean_fprec_rate.nc                  \
 field_ocn_import_mean_merid_moment_flx.nc            \
 field_ocn_import_mean_net_lw_flx.nc                  \
 field_ocn_import_mean_net_sw_ir_dif_flx.nc           \
 field_ocn_import_mean_net_sw_ir_dir_flx.nc           \
 field_ocn_import_mean_net_sw_vis_dif_flx.nc          \
 field_ocn_import_mean_net_sw_vis_dir_flx.nc          \
 field_ocn_import_mean_prec_rate.nc                   \
 field_ocn_import_mean_sensi_heat_flx.nc              \
 field_ocn_import_mean_zonal_moment_flx.nc            "
LIST_FILES+=" \
 array_gsm_grid_coord1.nc                             \
 array_gsm_grid_coord2.nc                             \
 array_med_atm_grid_area.nc                           \
 array_med_atm_grid_coord1.nc                         \
 array_med_atm_grid_coord2.nc                         \
 array_med_atm_grid_corner1.nc                        \
 array_med_atm_grid_corner2.nc                        \
 array_med_atm_grid_mask.nc                           \
 array_med_ice_grid_area.nc                           \
 array_med_ice_grid_coord1.nc                         \
 array_med_ice_grid_coord2.nc                         \
 array_med_ice_grid_corner1.nc                        \
 array_med_ice_grid_corner2.nc                        \
 array_med_ice_grid_mask.nc                           \
 array_med_med_grid_coord1.nc                         \
 array_med_med_grid_coord2.nc                         \
 array_med_med_grid_corner1.nc                        \
 array_med_med_grid_corner2.nc                        \
 array_med_ocn_grid_area.nc                           \
 array_med_ocn_grid_coord1.nc                         \
 array_med_ocn_grid_coord2.nc                         \
 array_med_ocn_grid_corner1.nc                        \
 array_med_ocn_grid_corner2.nc                        \
 array_med_ocn_grid_mask.nc                           \
 array_med_a2o_weights_bilnr.nc                       \
 array_med_a2o_weights_consv.nc                       \
 array_med_a2o_weights_patch.nc                       \
 array_med_o2a_weights_bilnr.nc                       \
 array_med_o2a_weights_consv.nc                       \
 array_med_o2a_weights_patch.nc                       "
