Re: linint1_Wrap

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu, 15 Nov 2007 10:33:38 -0700

Hi Spandana,

It looks to me like linint1_Wrap is saving your metadata, as
printVarSummary(x) from your script returned this:

Type: float
Total Size: 38016 bytes
             9504 values
Number of Dimensions: 4
Dimensions and sizes: [time | 12] x [lat | 22] x [lon | 9] x [levsoi | 4]
Coordinates:
             time: [54781..55115]
             lat: [20.31112..49.72712]
             lon: [90..101.25]
             levsoi: [10..200]
Number Of Attributes: 5
   missing_value : 1e+36
   _FillValue : 1e+36
   cell_method : time: mean
   units : K
   long_name : soil temperature

By the way, as your are using the Wrap version of linint1, you do not
have to do the following:
x!0 = "time"
x!1 = "lat"
x!2 = "lon"
x!3 = "levsoi"
fo->lat = lat
fo->lon = lon
fo->time = time
fo->levsoi = (/ lNew /)

Note that lat,lon,time, and levsoi are automatically written to the file
as they are coordinate variables of x...
Good luck,
Adam

Tummuri, Spandana wrote:
> Hello Adam,
>
> Please find the entire program and printVarSummary output attached.
>
> Thanks.
> Spandana.
>
> ________________________________
>
> From: Adam Phillips [mailto:asphilli_at_cgd.ucar.edu]
> Sent: Wed 11/14/2007 11:46 AM
> To: Tummuri, Spandana
> Cc: ncl-talk_at_ucar.edu
> Subject: Re: linint1_Wrap
>
>
>
> Hi Spandana,
>
> Can you add the following for us to your script and send us the output:
> printVarSummary(levsoi)
> printVarSummary(TSOI)
> printVarSummary(lNew)
> x=linint1_Wrap (levsoi,TSOI(time|:,lat|:,lon|:,levsoi|:),False,lNew, 0)
> printVarSummary(x)
>
> Thanks,
> Adam
>
> Tummuri, Spandana wrote:
>> Hello,
>>
>> I wrote the following program to interpolate levels. I used linint1_Wrap but it still does not retain Metadata. Is there any error in my program?
>>
>> Thanks in advance.
>> Spandana Tummuri
>>
>> lat = in1->lat
>> lon = in1->lon
>> time = in1->time
>> levsoi = in1->levsoi
>> TSOI = in1->TSOI
>> nlat = dimsizes(lat)
>> mlon = dimsizes(lon)
>> ntime = dimsizes(time)
>> nlevsoi = dimsizes(levsoi)
>>
>> lNew = (/ 10, 40, 100, 200 /)
>> lNew_at_units = "centimeters"
>> lNew!0 = "levsoi"
>> x = linint1_Wrap (levsoi, TSOI(time|:,lat|:,lon|:,levsoi|:), False, lNew, 0)
>> x!0 = "time"
>> x!1 = "lat"
>> x!2 = "lon"
>> x!3 = "levsoi"
>> x_at_units = "K"
>>
>> filo="/home/stummuri/CCSM-INPUTS/s01-int.nc"
>> fo=addfile(filo,"c")
>> fo->TSOI = x
>> fo->lat = lat
>> fo->lon = lon
>> fo->time = time
>> fo->levsoi = (/ lNew /)
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> --------------------------------------------------------------
> Adam Phillips asphilli_at_ucar.edu
> National Center for Atmospheric Research tel: (303) 497-1726
> ESSL/CGD/CAS fax: (303) 497-1333
> P.O. Box 3000
> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli
>

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 15 2007 - 10:33:38 MST

This archive was generated by hypermail 2.2.0 : Sun Nov 25 2007 - 07:21:25 MST