RE) How to remove interdecadal variation by using NCL

From: <joy0826_at_nyahnyahspammersnyahnyah>
Date: Thu, 26 Oct 2006 16:56:37 +0900

Thank you for your advices ,Shea.

I tried to remove linear trend on monthly Hadisst data (1957~2005)by using dtrend_msg.
This my NCL script.
;*************************************************
; Detrend
;************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "/user2/joy/gsn_csm_2.ncl"
;************************************************
begin

path = "/user2/joy/IOD/OBS/hadisst/sst/hadisst5705.gdat"
o_path = "/user2/joy/IOD/OBS/hadisst/detrend/detrend_sst5705.ndat"
x = new((/588,180,360/),"float")
x!0 = "time"
x!1 = "lat"
x!2 = "lon"
x&time = ispan(0,587,1)
x@_FillValue = -99999.0
do nrec = 0,587
x(nrec,:,:) = fbindirread(path,nrec,(/180,360/),"float")
end do
print(x(383,92,181))
;===================================
; DTREND
;===================================

Dx = dtrend_msg(x&time,x(lat|:,lon|:,time|:),True,False)
Dx!0 = "lat"
Dx!1 = "lon"
Dx!2 = "time"
print(Dx(92,181,383))

re_Dx = Dx(time|:,lat|:,lon|:)
do n = 0,587
fbindirwrite(o_path,re_Dx(n,:,:))
end do
end
**************************************************************************
As I put the print commend in the scripts, the result is like this
Variable: x (subsection)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 2
time : 383
_FillValue : -99999
(0) 28.34

Variable: Dx (subsection)
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 1
_FillValue : -99999
(0) 0.6002823
I don't know why 28.34 C turns to 0.6002823. I don't think I removed linear trend correctly.
Please help me again and thank you again ^^

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Oct 26 2006 - 01:56:37 MDT

This archive was generated by hypermail 2.2.0 : Wed Nov 01 2006 - 11:37:04 MST