Re: regression at each station

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri, 31 Jul 2009 09:17:56 -0600

Hi Sunflower

I do not know GrADS/lats4d.

However, if you have an ascii [text] file that has the data in
rows and columns, you should be able to use

to read the data.

     npts = 754,
     ntim = ...
     xObs = asciiread ( "...", (/npts, ntim/), "float")

     xx = asciiread ( "...", (/ntim,npts/), "float")
     xx!0 = "time"
     xx!1 = "pts"
     xObs = xx(pts|:,time|:)

     rc = regCoef ( xObs , fo(pts|:,time|:) )

Good luck

yanling_1220 wrote:
> Dear Dennis,
> I'm afraid my poor English expression have bring some trouble in our
> conmunication with this topic.I try to describe my problem clearly this
> time.
> I think your suggestion is how to gain the regression coefficients at
> each station only with the output from 'linint2_points' (that is to say
> only within each station's GCM timeseries),but What I want to know is
> how to gained "linear regression coefficients" "tval"and"tstd"
> between GCM and observed timeseries the two timeseries data sets at each
> station.
> So,I think if I try to use the "regCoef" to do waht I want to,I must do
> like below:
> Assuming the the output from 'linint2_points' is (say)
> fo(time,pts)
> then
> rc = regCoef ( x , fo(pts|:,time|:) )
> rc(754)
> Here "x" should be observed timeseries in my research ,which have a same
> format as fo and with "time" as the right dimension.My problem pop up at
> here,how to put my station observed timeseries data into NCL as "x".
> At first,I think I only have to conversion the observed timeseries data
> in .txt to netCDF format which also with the dimension as(time,pts),if
> it is successful,the other things is easy. I tried to convert my station
> data to the GrADS station type (.dat) via Fortran coed firstly,then
> tried to convert the .dat file(with the ".ctl") into nc file via the
> "lats4d" in GrADS,but it failed.
> and I don't know which other method can put the observed timeseries
> data with dimension(time,pts).Can you have any suggestion?
> I hope I have a clear expression about my problem this time,and wish
> your advise.
> Thanks!Everything goes well.
> Regrads,
> sunflower
> ------------------------------------------------------------------------
> 没有广告的终身免费邮箱, <>
Received on Fri Jul 31 2009 - 09:17:56 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 31 2009 - 14:51:03 MDT