Re: Dear NCL users

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sat Nov 21 2009 - 21:35:45 MST

Look at your "date" variable. It is "time" on the file

     date=f->time

     double time ( time )
         units : days since 1800-1-1 00:00:00

You are testing for dates like 198201 <=== yyyymm

     ind8901 = ind(date.eq.198201) ; Jan 1982

================================================

    time = f->time
    date = ut_calendar(time, -1) ; yyyymm

Then use your code

sidong7041@hotmail.com wrote:
> Dear NCL users!
>
> Is there something wrong with my ncl file?
> My data is from "NOAA Optimum Interpolation (OI) SST V2".
>
> Si Dong
> I'm using NCL 5.1.1
> -------------------------------------------------------------------
> Error message is :
>
> fatal:Subscript out of range, error in subscript #2
> fatal:An error occurred reading sst_ts
> fatal:Execute: Error occurred at or near line 32 in file sst_jja.ncl
> -------------------------------------------------------------------
> 1
> 2;*********************************************
> 3load "/cygdrive/E/cygwin/usr/local/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> 4load "/cygdrive/E/cygwin/usr/local/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> 5load
> "/cygdrive/E/cygwin/usr/local/lib/ncarg/nclscripts/csm/contributed.ncl"
> 6load "/cygdrive/E/cygwin/usr/local/lib/ncarg/nclscripts/csm/shea_util.ncl"
> 7
> 8begin
> 9;********************************************************
> 10 f = addfile("/cygdrive/G/data/NOAA_sst/OISST/sst.mnmean.nc","r")
> 11;**************************************************************
> 12 date=f->time
> 13 sst=short2flt(f->sst)
> 14
> 15 sst@_FillValue <mailto:sst@_FillValue> = 32767
> 16
> 17; compute SEASONAL means
> 18 sst_ts = sst(lat|:,lon|:,time|:) ; (lat,lon,time)
> 19 sst_ts = runave(sst_ts, 3, 0) ; (lat,lon,time) 3-mo run ave
> 20
> 21;********************************
> 22; indices for special dates
> 23;*********************************
> 24 ind8901 = ind(date.eq.198201) ; Jan 1982
> 25 ind8912 = ind(date.eq.199912) ; Dec 1999
> 26 ind0001 = ind(date.eq.200001) ; Jan 2000
> 27 ind0012 = ind(date.eq.200812) ; Dec 2008
> 28;********************************
> 29; compute [2-mon] climatologies
> 30; over specified periods
> 31;********************************
> 32 sstAve8299 = clmMonLLT ( sst_ts(:,:,ind8901:ind8912) )
> 33 sstStd8299 = stdMonLLT ( sst_ts(:,:,ind8901:ind8912) )
> 34
> 35 sstAve0008 = clmMonLLT ( sst_ts(:,:,ind0001:ind0012) )
> 36 sstStd0008 = stdMonLLT ( sst_ts(:,:,ind0001:ind0012) )
> ;********************************
> ; compute probabilities for means difference
> ;********************************
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Nov 21 21:36:24 2009

This archive was generated by hypermail 2.1.8 : Mon Nov 23 2009 - 12:24:01 MST