head	1.3;
access;
symbols;
locks;
comment	@# @;


1.3
date	2011.01.06.16.18.11;	author strandwg;	state Exp;
branches;
next	1.2;

1.2
date	2011.01.06.16.14.25;	author strandwg;	state Exp;
branches;
next	1.1;

1.1
date	2011.01.06.16.07.17;	author strandwg;	state Exp;
branches;
next	;


desc
@@


1.3
log
@*** empty log message ***
@
text
@#!/bin/csh -f
#
unlimit
set cases = ( b40.20th.track1.1deg.005 b40.20th.track1.1deg.007 b40.20th.track1.1deg.009 \
              b40.20th.track1.1deg.006 b40.20th.track1.1deg.008 b40.20th.track1.1deg.011 )
#
foreach c (${cases})
  echo ${c}" T0 at "`date`
  set ddir  = /datalocal/ccph/strandwg/SLC/data/20C/${c}
  set decad = ( 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 )
  set pathr = "."
  foreach d (${decad})
    set script = ${c}.${d}.heat.ncl
    ln -s -f ./ccsm4_heat_content_ann_mon.ncl ${script}
    echo ${c}"."${d}" T0 at "`date`
    set y0 = ${d}0
    set y1 = ${d}9
    if ( ${d} == 200 ) then
      set y0 = ${d}0
      set y1 = ${d}5
    endif
    ln -s -f ${ddir}/${c}.pop.h.{TEMP,SALT}.${y0}01-${y1}12.nc .
    sed -e "s/oldcasename/${c}/g"     ${script} >& temp ; mv temp ${script}
    sed -e "s/oldyear1/$y0/g"         ${script} >& temp ; mv temp ${script}
    sed -e "s/oldyear2/$y1/g"         ${script} >& temp ; mv temp ${script}
    sed -e "s/readfilepath/$pathr/g"  ${script} >& temp ; mv temp ${script}
    sed -e "s/filepathwrite/$pathr/g" ${script} >& temp ; mv temp ${script}
    sed -e "s/fileinannmon/monthly/g" ${script} >& temp ; mv temp ${script}
    ncl < ${script}
    if ($status == 0) then
      echo ${c}"."${d}" Tn at "`date`
      rm ${c}.pop.h.{TEMP,SALT}.${d}*.nc
    endif
  end
end
#
exit

@


1.2
log
@*** empty log message ***
@
text
@d14 1
a14 1
    ln -s -f ./ccsm4_heat_content_ann_mon.ncl 
d16 2
a17 3
    ln -s -f ${ddir}/${c}.pop.h.{TEMP,SALT}.${d}*.nc .
    set yearstart = ${d}0
    set yearend   = ${d}9
d19 2
a20 2
      set yearstart = ${d}0
      set yearend   = ${d}5
d22 1
d24 2
a25 2
    sed -e "s/oldyear1/$yearstart/g"  ${script} >& temp ; mv temp ${script}
    sed -e "s/oldyear2/$yearend/g"    ${script} >& temp ; mv temp ${script}
d29 1
a29 1
    ncl < ${script} >& /dev/null
@


1.1
log
@Initial revision
@
text
@d4 2
a5 2
set cases = ( b40.rcp2_6.1deg.001 b40.rcp2_6.1deg.002 b40.rcp2_6.1deg.003 b40.rcp2_6.1deg.004 b40.rcp2_6.1deg.005 \
              b40.rcp8_5.1deg.001 b40.rcp8_5.1deg.002 b40.rcp8_5.1deg.003 b40.rcp8_5.1deg.004 b40.rcp8_5.1deg.005 )
d9 2
a10 2
  set ddir  = /datalocal/ccph/strandwg/SLC/data/RCP/${c}
  set decad = ( 200 201 202 203 204 205 206 207 208 209 210 )
d13 3
a15 2
    ln -s -f ./ccsm4_heat_content_ann_mon.ncl heat.${d}.${c}.ncl
    echo ${d}"."${c}" T0 at "`date`
a19 3
      set yearstart = ${d}5
      set yearend   = ${d}9
    else if ( ${d} == 210 ) then
d21 12
a32 1
      set yearend   = ${d}0
a33 8
    sed -e "s/oldcasename/${c}/g"     heat.${d}.${c}.ncl >& temp ; mv temp heat.${d}.${c}.ncl
    sed -e "s/oldyear1/$yearstart/g"  heat.${d}.${c}.ncl >& temp ; mv temp heat.${d}.${c}.ncl
    sed -e "s/oldyear2/$yearend/g"    heat.${d}.${c}.ncl >& temp ; mv temp heat.${d}.${c}.ncl
    sed -e "s/readfilepath/$pathr/g"  heat.${d}.${c}.ncl >& temp ; mv temp heat.${d}.${c}.ncl
    sed -e "s/filepathwrite/$pathr/g" heat.${d}.${c}.ncl >& temp ; mv temp heat.${d}.${c}.ncl
    sed -e "s/fileinannmon/monthly/g" heat.${d}.${c}.ncl >& temp ; mv temp heat.${d}.${c}.ncl
    ncl < heat.${d}.${c}.ncl
    echo ${d}"."${c}" Tn at "`date`
@
