Convert data for another resolution

From: Sara Reis <sarareislima_at_nyahnyahspammersnyahnyah>
Date: Thu, 8 Mar 2007 15:31:10 -0300 (ART)

Hi, NCL users!
 
 I need to convert a data type of an archive "prate_media2.nc" with not constant resolutions (specified below) for the resolution of 2,5x2,5 (LATITUDE = 88.75, 86.25, 83.75,...,-83.75, -86.25, -88.75 and LONGITUDE = 1.25, 3.75, 6.25,...,353.75, 356.25, 358.75).
 
 At archive "prate_media2.nc", the lat has 94 values and the lon has 192 values.
 I want the new lat with 72 values and the new lon with 144 values (because of the new resolution).
 
 My script...
 
 begin
 
 in = addfile("prate_media2.nc", "w")
      data = in->prate
 
   new_lon = fspan(1.25, 358.75, 144)
   new_lat = fspan(88.75, -88.75, 72)
 
   new_data = linint2_Wrap(data&lon,data&lat,inmatrix,True,new_data,new_data,0)
 
   new_data!0 ="lat"
   new_data!1 = "lon"
   new_data&lat = new_lat
   new_data&lon = new_lon
  
   in->prate = new_data ; THE PROBLEM IS HERE
 
 end
 
 THE LAT AND LON OF THE ARCHIVE ".nc":
  lat = 88.542, 86.6531, 84.7532, 82.8508, 80.9473, 79.0435, 77.1394, 75.2351,
     73.3307, 71.4262, 69.5217, 67.6171, 65.7125, 63.8079, 61.9033, 59.9986,
     58.0939, 56.1893, 54.2846, 52.3799, 50.4752, 48.5705, 46.6658, 44.7611,
    ...
      -67.6171, -69.5217, -71.4262, -73.3307, -75.2351, -77.1394, -79.0435,
     -80.9473, -82.8508, -84.7532, -86.6531, -88.542 ;
 
  lon = 0, 1.875, 3.75, 5.625, 7.5, 9.375, 11.25, 13.125, 15, 16.875, 18.75,
     20.625, 22.5, 24.375, 26.25, 28.125, 30, 31.875, 33.75, 35.625, 37.5,
     39.375, 41.25, 43.125, 45, 46.875, 48.75, 50.625, 52.5, 54.375, 56.25,
    ...
     331.875, 333.75, 335.625, 337.5, 339.375, 341.25, 343.125, 345, 346.875,
     348.75, 350.625, 352.5, 354.375, 356.25, 358.125 ;
 
 Can`t I do this?
 
 Thaks a lot...
 
 Sara
 
 __________________________________________________
Fale com seus amigos de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 08 2007 - 11:31:10 MST

This archive was generated by hypermail 2.2.0 : Mon Mar 12 2007 - 11:26:34 MDT