<?xml version="1.0"?>
<!-- FRE Usage documentation: http://www.gfdl.noaa.gov/fms/fre -->
<!-- $Id: om1p7.xml,v 2 2008/11/12 edg Exp $ -->
<!DOCTYPE experimentSuite [
   <!ENTITY MY_ROOT        "$HOME/perth"> <!--experiment directory -->
   <!ENTITY MY_ARCHIVE     "$ARCHIVE/perth_2008_10">
   <!ENTITY SHARED_CVS_TAG "perth_2008_10">              <!-- CVS tag for shared code -->
   <!ENTITY MOM_CVS_TAG    "mom4p1_perth2008_10_18nov2008_smg">  <!-- CVS tag for MOM source -->

   <!ENTITY % script_abbrevs SYSTEM
"/home/atw/fms/diags/xml_entities/analysis/script_abbrevs.dtd"> %script_abbrevs;
   <!ENTITY analysis_cm_atmos_ts_monthly_20yr  SYSTEM "/home/atw/fms/diags/xml_entities/analysis/cm/atmos/ts/monthly/20yr.xml">
   <!ENTITY analysis_cm_atmos_ts_monthly_100yr SYSTEM "/home/atw/fms/diags/xml_entities/analysis/cm/atmos/ts/monthly/100yr.xml">
   <!ENTITY analysis_cm_atmos_av_monthly_20yr  SYSTEM "/home/atw/fms/diags/xml_entities/analysis/cm/atmos/av/monthly/20yr.xml">
   <!ENTITY analysis_cm_atmos_av_monthly_100yr SYSTEM "/home/atw/fms/diags/xml_entities/analysis/cm/atmos/av/monthly/100yr.xml">
   <!ENTITY analysis_cm_ocean_ts_annual_20yr   SYSTEM "/home/atw/fms/diags/xml_entities/analysis/cm/ocean/ts/annual/20yr.xml">
   <!ENTITY analysis_cm_ocean_ts_annual_100yr  SYSTEM "/home/atw/fms/diags/xml_entities/analysis/cm/ocean/ts/annual/100yr.xml">
   <!ENTITY analysis_cm_ocean_av_annual_20yr   SYSTEM "/home/atw/fms/diags/xml_entities/analysis/cm/ocean/av/annual/20yr.xml">
   <!ENTITY analysis_cm_ocean_av_annual_100yr  SYSTEM "/home/atw/fms/diags/xml_entities/analysis/cm/ocean/av/annual/100yr.xml">
]>

<experimentSuite rtsVersion="2">

<setup>
   <directory type="root">&MY_ROOT;</directory>
   <directory type="archive">&MY_ARCHIVE;</directory>
   <directory type="work">$TMPDIR</directory>
   <mkmfTemplate file="/home/fms/bin/mkmf.template.ia64_flt.perth"/>
   <mkmfTemplate type="debug" file="/home/fms/bin/mkmf.debugtemplate.ia64.perth"/>
   <target platform="ia64">
      <csh>
      source /opt/modules/default/init/tcsh
      module purge
      module load ifort.9.1.041
      module load icc.9.1.045
      module load mpt-1.18
      module load netcdf-3.6.2v2
      module load idb.9.1.045
      module load scsl-1.5.1.0
      module load totalview_840-0
      setenv NC_BLKSZ 64K
      setenv MPI_COREDUMP_DEBUGGER `which idb`
      alias gmake gmake -j 8 
      </csh>
   </target>
   <fmsRelease>perth</fmsRelease>
</setup>

<experiment name="om1p7_blingtest_090320" >
   <description>
   Took this from prior runs, om1p7_08118 + 081126 + 090306. 
   Copied src code from om1p7_blingtest_081126 (did not actually use cvs, though this
     cvs is from om1p7_blingtest_081126).
   Changed mom4p1 namelist to match CM2M-coarse_090201_aredi800 ocean mixing.
   Debugging new BLING with carbon, making initial 100y run.
   Changed initial conditions, diag table.
   </description>
      <cvs>
      <codeBase>mom4p1_coupled</codeBase>  
      <modelConfig>&MOM_CVS_TAG;</modelConfig>
      <cvsUpdates>
cvs co -r &SHARED_CVS_TAG; shared/{astronomy,axis_utils,constants,data_override,diag_manager,mpp,include}
cvs co -r &SHARED_CVS_TAG; shared/{exchange,time_manager,horiz_interp,drifters,random_numbers}
cvs co -r &SHARED_CVS_TAG; shared/{field_manager,fms,memutils,platform,coupler}
cvs co -r &SHARED_CVS_TAG; shared/{time_interp,tracer_manager,sat_vapor_pres,mosaic,oda_tools}
cvs co -r &SHARED_CVS_TAG; atmos_param/{monin_obukhov,diag_integral}
cvs co -r &SHARED_CVS_TAG; ice_param ice_sis coupler atmos_null land_null
cvs co -r &SHARED_CVS_TAG; ocean_shared

      cp /home/edg/updates/generic_bling/carbon/generic_BLING.090320.F90  ocean_shared/generic_tracers/generic_BLING.F90
      cp /home/edg/updates/generic_bling/generic_tracer.F90 ocean_shared/generic_tracers/generic_tracer.F90

/home/fms/bin/list_paths shared ocean_shared ice_sis land_null atmos_null ice_param
/home/fms/bin/list_paths coupler atmos_param
    </cvsUpdates>     
   </cvs>
   <compile>
     <cppDefs>-Duse_netCDF -Duse_libMPI -DUSE_OCEAN_BGC -DENABLE_ODA -DMOM4_STATIC_ARRAYS
              -DNI_=120 -DNJ_=80 -DNK_=28 -DNI_LOCAL_=20 -DNJ_LOCAL_=16</cppDefs>

<!--     <cppDefs>-Duse_netCDF -Duse_libMPI -DUSE_OCEAN_BGC -DENABLE_ODA </cppDefs>
-->
   </compile>
   <input>
      <initCond file="/archive/edg/fms/ic/ESM2-coarse.generic.initcond.090320.cpio"/>

      <gridSpec file="/archive/edg/fms/grids/om1p7p_mosaic/mosaic.nc"/>
      <diagTable file="/home/edg/perth/tables/diag_table_MOM4p1_gibgc_gbling_090320"/>
      <fieldTable file="/home/edg/omsk/input/field_tables/xland_table_om1p7_080201"/>

      <dataTable  file="/home/edg/perth/tables/data_table_gbling_om1p7_histco2"/>
      <dataTable file="/net/jgj/perth/ESM2M/input/data_table_ESM2M_topaz_1860"/>
      <fieldTable file="/home/edg/perth/tables/field_table_mdppm_core1"/>
<!--      <fieldTable file="/home/edg/perth/tables/field_table_cfc"/> -->
      <fieldTable file="/home/edg/perth/tables/field_table_abiotic"/>
      <fieldTable file="/home/edg/perth/tables/generic_bling_sweby.field_table"/>

      <namelist file="/home/edg/perth/namelists/mom4p1.090320.nml"/>
      
      <namelist name="ocean_tracer_diag_nml">
      tracer_conserve_days=1.0
      diag_step=6
      do_bitwise_exact_sum=.false.
      </namelist>
      <namelist name="ocean_model_nml">
      dt_ocean = 14400,
      layout=6,5
      time_tendency='twolevel'
      vertical_coordinate='pstar'
      baroclinic_split = 2
      surface_height_split = 1
      barotropic_split = 80
      debug=.false.
      </namelist>
      <namelist name="ocean_sbc_nml">
      use_waterflux=.true.
      temp_restore_tscale=-10.
      salt_restore_tscale=20.                  
      salt_restore_under_ice=.true.
      read_restore_mask=.true.
      restore_mask_gfdl=.true.
      max_ice_thickness=8.0
      salt_restore_as_salt_flux=.true.
      zero_net_water_restore=.true.              
      zero_net_water_coupler=.true.             
      zero_net_water_couple_restore=.true.
      zero_net_salt_restore=.true.            
      avg_sfc_velocity=.true.
      avg_sfc_temp_salt_eta=.true.
      zero_water_fluxes=.false.
      zero_heat_fluxes=.false.
      zero_surface_stress=.false.
      runoff_salinity=0.0
      </namelist>
      <namelist name="generic_tracer_nml">
      do_generic_tracer=.true.
      do_generic_BLING=.true.
      do_generic_CFC=.false.
      do_generic_TOPAZ=.false.
      </namelist>      
      <namelist name="coupler_nml">
      months = $months,
      days   = $days,
      current_date = 1,1,1,0,0,0,
      calendar = 'NOLEAP',
      dt_cpld = 14400,
      dt_atmos = 14400,
      do_atmos = .false.,
      do_land = .false.,
      do_ice = .true.,
      do_ocean = .true.,
      atmos_npes = 0,
      ocean_npes = 0,
      concurrent = .false.
      use_lag_fluxes=.true.
      check_stocks=0 
      </namelist>
      <namelist name="oda_nml">
      </namelist>
      <namelist name="oda_core_nml">
      </namelist>
      <namelist name="diag_integral_nml">
      file_name = 'diag_integral.out'
      time_units = 'days'
      output_interval = -1.0
      </namelist>
      <namelist name="diag_manager_nml">
      max_output_fields=600
      max_input_fields=600
      mix_snapshot_average_fields=.false.
      </namelist>
      <namelist name="xgrid_nml">
      make_exchange_reproduce=.false.
      interp_method = 'second_order'
      </namelist>
      <namelist name="flux_exchange_nml">
      do_area_weighted_flux=.false.
      </namelist>
      <namelist name="surface_flux_nml">
      ncar_ocean_flux = .true.
      raoult_sat_vap = .true.
      </namelist>
      <namelist name="monin_obukhov_nml">
      neutral = .true. 
      </namelist>
      <namelist name="fms_io_nml">
      threading_read='multi'
      threading_write='single'
      fileset_write='single'
      </namelist>
      <namelist name="data_override_nml">
      </namelist>      
      <namelist name="fms_nml">
      clock_grain='LOOP'
      </namelist>
      <fmsDataSets> ggrpsst topog
<!--data for surface boundary conditions -->
        /archive/fms/mom4/mom4p1/mom4p1a/data/ice/sst_ice_clim.nc
        /archive/fms/mom4/mom4p1/mom4p1a/data/CNYF_1p0/slp.clim.nc
        /archive/fms/mom4/mom4p1/mom4p1a/data/CNYF_1p0/q_10_mod.clim.nc
        /archive/fms/mom4/mom4p1/mom4p1a/data/CNYF_1p0/t_10_mod.clim.nc
        /archive/fms/mom4/mom4p1/mom4p1a/data/CNYF_1p0/u_10_mod.clim.nc
        /archive/fms/mom4/mom4p1/mom4p1a/data/CNYF_1p0/v_10_mod.clim.nc
        /archive/fms/mom4/mom4p1/mom4p1a/data/CNYF_1p0/ncar_precip_clim.nc
        /archive/fms/mom4/mom4p1/mom4p1a/data/CNYF_1p0/ncar_rad_clim.nc

<!--data for TOPAZ/BLING -->
        /archive/fms/mom4/mom4p1/mom4p1a/mom4_ecosystem/preprocessing/rho0_profile.nc
        /archive/jwd/regression_data/esm2.1/input/depflux_total.mean.1860.nc
        /archive/fms/mom4/mom4p0/mom4p0c/mom4_test8/preprocessing/fe_dep_ginoux_gregg_om3_bc.nc=Soluble_Fe_Flux_PI.nc
<!--
        /archive/jwd/regression_data/esm2.1/input/Soluble_Fe_Flux_PI.nc
-->
        /archive/jwd/regression_data/esm2.1/input/Mineral_Fe_Flux_PI.nc
        /archive/jwd/regression_data/esm2.1/input/green_etal_regrid_v4.nc

<!--Data regridded to coarse model -->        
        /archive/rds/IPCC/data/cfc11_cfc12_cfc113_ccl4_atm_am2_m30_bc-1-9999.nc=cfc.bc.nc
        /archive/rds/IPCC/data/ocmip2_siple_co2_atm_am2_m30_bc-1-9999.nc=ocmip2_siple_co2_atm_am2_bc-1-9999.nc
        /archive/edg/fms/om1p7/ocmip2_abiotic_c14_atm_hist_om1p7_bc-1-9999.nc=c14_atm_hist.nc

        /archive/jgj/omsk/prep/coarse_model/mom4p1/coarse_model_om1p7h_basin_mask.nc=restore_mask.nc
        /archive/jgj/omsk/prep/coarse_model/mom4p1/coarse_model_om1p7h_basin_mask.nc=basin_mask.nc
        /archive/jgj/omsk/prep/coarse_model/mom4p1/coarse_model_om1p7h_basin_mask.nc=mixdownslope_mask.nc

        /archive/edg/fms/om1p7/tideamp_ave_Tpoint.nc=tideamp.nc
        /archive/edg/fms/om1p7/rough_patched_Tpoint.nc=roughness_amp.nc
        /archive/edg/fms/om1p7/chlorophyll_fix.nc=chl.nc
        /archive/edg/fms/om1p7/RUNOFF.nc
        /archive/edg/fms/om1p7/bianchi_heatflux.nc=geothermal_heating.nc

        /archive/edg/fms/om1p7/salt_sfc_restore_ncar.nc=salt_sfc_restore.nc

        /archive/edg/fms/grids/om1p7p_mosaic/atmos_hgrid.nc
        /archive/edg/fms/grids/om1p7p_mosaic/atmos_mosaic.nc
        /archive/edg/fms/grids/om1p7p_mosaic/atmos_mosaicXland_mosaic.nc
        /archive/edg/fms/grids/om1p7p_mosaic/atmos_mosaicXocean_mosaic.nc
        /archive/edg/fms/grids/om1p7p_mosaic/land_hgrid.nc
        /archive/edg/fms/grids/om1p7p_mosaic/land_mosaic.nc
        /archive/edg/fms/grids/om1p7p_mosaic/land_mosaicXocean_mosaic.nc
        /archive/edg/fms/grids/om1p7p_mosaic/ocean_hgrid.nc
        /archive/edg/fms/grids/om1p7p_mosaic/ocean_mosaic.nc
        /archive/edg/fms/grids/om1p7p_mosaic/ocean_vgrid.nc
        /archive/edg/fms/grids/om1p7p_mosaic/topog.nc
      </fmsDataSets>
      <csh><![CDATA[
if (! $?fyear ) set fyear = 1990
dmget /archive/fms/mom4/mom4p1/omsk/om3_core1/INPUT/???O${fyear}.nc
cp /archive/fms/mom4/mom4p1/omsk/om3_core1/INPUT/???O${fyear}.nc .


ncatted -O -h -a calendar_type,TIME,c,c,'NOLEAP' \
              -a calendar,TIME,c,c,'365_days'     \
              -a modulo,TIME,c,c,' '              \
              -a units,TIME,c,c,'days since 1900-12-31 18:00:00' \
              -a time_origin,TIME,c,c,'31-DEC-1899 00:00:00'     \
               RUNOFF.nc
 mv slp.clim.nc slp_.nc

ncvarrename Soluble_Fe_Flux_PI.nc  fe_dep     FLUX
ncvarrename restore_mask.nc        BASIN_MASK restore_mask
ncvarrename basin_mask.nc          BASIN_MASK basin_mask
ncvarrename mixdownslope_mask.nc   BASIN_MASK mixdownslope_mask
ncvarrename roughness_amp.nc       h_amp      roughness_amp
ncvarrename ocean_topaz.res.nc     irr        irr_inst

if (! -e ocmip2_cfc.res.nc) then
  ncap --overwrite --variable --script 'cfc_11 = temp * 0.0 ; cfc_12 = temp * 0.0' ocean_temp_salt.res.nc ocmip2_cfc.res.nc
endif

ncatted -h -a modulo,time,c,c," " salt_sfc_restore.nc
ncatted -O -h -a calendar_type,time,c,c,'NOLEAP' salt_sfc_restore.nc
ncatted -O -h -a units,time,m,c,'days since 1900-01-01 00:00:00' salt_sfc_restore.nc
        ]]>
      </csh>
   </input>
   
   <runtime>      
      <regression name="days">
         <run days="2"   npes="30" ocean_layout="6,5" runTimePerJob="00:50:00"/>
      </regression>
      <regression name="months">
         <run months="3"   npes="30" ocean_layout="6,5" runTimePerJob="00:50:00"/>
      </regression>
      <regression name="year">
         <run months="12"   npes="30" ocean_layout="6,5" runTimePerJob="00:50:00"/>
      </regression>
      <regression name="basic">
         <run days="2"   npes="24" ocean_layout="6,4" runTimePerJob="00:10:00"/>
         <run days="2"   npes="30" ocean_layout="6,5" runTimePerJob="00:10:00"/>
         <run days="1 1" npes="30" ocean_layout="6,5" runTimePerJob="00:10:00"/>
      </regression>
      <regression name="restarts">
         <run days="1 1" npes="30" ocean_layout="6,5" runTimePerJob="00:20:00"/>
      </regression>
      <regression name="trapnan">
         <run days="1"   npes="30" ocean_layout="6,5" runTimePerJob="04:00:00"/>
      </regression>     

      <production simTime="100" units="years" npes="30">
        <segment simTime="12" units="months" runTime="00:20:00"/>
      </production>
   </runtime>

   <postProcess>
       <component type="ocean_bling" source="ocean_bling">
          <timeSeries freq="monthly" chunkLength="20yr"/>
          <timeSeries freq="monthly" chunkLength="100yr"/>

          <timeSeries freq="annual" chunkLength="20yr"/>
          <timeSeries freq="annual" chunkLength="100yr"/>

          <timeAverage source="monthly" interval="20yr"/>
          <timeAverage source="monthly" interval="100yr"/>

          <timeAverage source="annual" interval="20yr"/>
          <timeAverage source="annual" interval="100yr"/>
       </component>
   </postProcess> 

</experiment>

</experimentSuite>



