70 likes | 113 Views
Computing Monthly bias-corrected SSTs for CCAM. Jack Katzfey, J McGregor, K Nguyen and M Thatcher Mesoscale Modelling Team 27 May, 2009. Outline. Get GCM monthly SST data (PCMDI) Compute monthly GCM climatological SSTs (1961-2000) on CCAM grid
E N D
Computing Monthly bias-corrected SSTs for CCAM Jack Katzfey, J McGregor, K Nguyen and M Thatcher Mesoscale Modelling Team 27 May, 2009
Outline • Get GCM monthly SST data (PCMDI) • Compute monthly GCM climatological SSTs (1961-2000) on CCAM grid • Get ‘observed’ monthly climatological SSTs (Reynolds) on CCAM grid • For each year and month of GCM SST data: • Get data • Interpolate to model grid • Compute new SST=mts-(mgcm-clim) • Write ascii file • Interpolate monthly Sea Ice Fraction to CCAM grid and write ascii file
Procedure Get GCM monthly SST data (PCMDI) Compute monthly GCM climatological SSTs (1961-2000) Interpolate GCM SST to model grid (one) : meantsu.sh Need GCM land mask $ncks –O –d time,t gcmts.nc ts.year.mon.nc $ncrcat –O ts.*.mon.nc gcmts.mon.nc $ncra –O gcmts.mon.nc avg_gcmts.mon.nc Run “one” to interpolate avg_gcmts.mon.nc to avg_gcm_dom.mon.nc
Procedure Get ‘observed’ monthly climatological SSTs (Reynolds) Interpolate Reynolds SST to model grid (one) : mktsu.sh For each month, interpolate Reynolds to CCAM grid using “one” Only need to run once for each CCAM grid
Procedure For each year and month of GCM SST data wanted : amip.sh Interpolate SST data to CCAM grid (one) : mts Need GCM land mask (make sure 0-1) Loop over all years wanted Loop over all 12 months $ncks –O –d time,ta gcmts.nc ts.nc $ncrename –v ts,tss ts.nc $ncatted –O –a point_spacing,time,d,, ts.nc $ncatted -O -a time_origin,time,d,, ts.nc $ncatted -a units,time,m,c,"days since $ybasec-01-01 00:00" ts.nc Run “one” to interpolate to CCAM grid : mts
Procedure Get mean Reynolds SST for this month on CCAM grid : oclim Get mean GCM SST for this month on CCAM grid : gcm Compute bias corr. SST : bcts = mts – (gcm-oclim) $ncrename -O -v tsu,oclim $oclimts ntss.nc $ncrename -O -v ts,gcm $gcmts gtss.nc $ncap -O -s "mts=float(abs(tss))" mts.nc tsall.nc $ncks -A -v gcm gtss.nc tsall.nc $ncks -A -v oclim ntss.nc tsall.nc Write data in ascii format : (bcts-273.16+50)*100 $ncap -O -s 'bct1=mts-(gcm-oclim);where(bct1>200);bcts=bct1;elsehere;bcts=200;tsu=(bcts-273.16+50)*100.' tsall.nc ts.nc $nc2text -p -n 64 -f "%5.0f" 'ts.nc tsu' >> $tstxt
Procedure For each year and month of GCM Sea Ice Fraction data: Get data ($ncks) Interpolate to model grid (“one”) $ncap -O -s 'fi=float(fracice)' msic.nc fi.nc $nc2text -p -n 64 -f "%4.0f" 'fi.nc fi' >> $fitxt