[Thread Prev][Thread Next][Index]

[ferret_users] regriding area larger than grid size



Hi Ferret users,

I would like to regrid a GCM output precipitation on a lower resolution grid defined with another netcdf file. The selected regriding operation is the simplest one, linear interpolation (@lin).

Step one : I read the GCM precip data:
yes? use pr_pmip2_0k.nc  ! d=1

Precip variable name is median and the corresponding grid is GLM1, whose caracteristics are (resol=1°):
yes? sh g glm1
    GRID GLM1
 name       axis              # pts   start                end
 XPROJ     LONGITUDE           51mr   20W(-20)             30E
 YPROJ     LATITUDE            41 r   10S                  30N
 normal    Z
 TCYS      T                   12 r   1                    12


Step 2 : I read the other netcdf file
yes? use evap_chad.nc         ! d=2

Precip variable name is evap and the corresponding grid is GQW1, (resol=0.5°):
yes? sh g gqw1
    GRID GQW1
 name       axis              # pts   start                end
 LONGITUDE LONGITUDE           37mr   7.25E                25.25E
 LATITUDE  LATITUDE            37 r   5.25N                23.25N
 LEVEL     Z (level: "uni       1 r   1                    1
TIME TIME 708 r 01-JAN-1937 00:00 09-DEC-1938 00:00

step 3: I regrid median on evap grid  GQW1:
yes? let p0 = median[d=1, gx=gqw1@lin, gy=gqw1@lin]

step 4 : I store p0 in a cdf file and get a look with ncdump :
yes? save/file=es.nc   p0 ; spa ncdump -c es.nc

Result  of dump:
LISTing to file es.nc
netcdf es {
dimensions:
    LONGITUDE0_38 = 39 ;
    LATITUDE = 37 ;
    TCYS = UNLIMITED ; // (12 currently)
variables:
    double LONGITUDE0_38(LONGITUDE0_38) ;
        LONGITUDE0_38:units = "degrees_east" ;
        LONGITUDE0_38:modulo = 360. ;
        LONGITUDE0_38:point_spacing = "even" ;
        LONGITUDE0_38:axis = "X" ;
    double LATITUDE(LATITUDE) ;
        LATITUDE:units = "degrees_north" ;
        LATITUDE:point_spacing = "even" ;
        LATITUDE:axis = "Y" ;
    double TCYS(TCYS) ;
        TCYS:axis = "T" ;
    float P0(TCYS, LATITUDE, LONGITUDE0_38) ;
        P0:missing_value = -1.e+34f ;
        P0:_FillValue = -1.e+34f ;
        P0:long_name = "MEDIAN[D=1, GX=GQW1@LIN, GY=GQW1@LIN]" ;

// global attributes:
        :history = "FERRET V6.2    8-Oct-09" ;
        :Conventions = "CF-1.0" ;
data:

LONGITUDE0_38 = -163.75, 7.25, 7.75, 8.25, 8.75, 9.25, 9.75, 10.25, 10.75,
    11.25, 11.75, 12.25, 12.75, 13.25, 13.75, 14.25, 14.75, 15.25, 15.75,
    16.25, 16.75, 17.25, 17.75, 18.25, 18.75, 19.25, 19.75, 20.25, 20.75,
    21.25, 21.75, 22.25, 22.75, 23.25, 23.75, 24.25, 24.75, 25.25, 196.25 ;

 LATITUDE = 5.25, 5.75, 6.25, 6.75, 7.25, 7.75, 8.25, 8.75, 9.25, 9.75,
    10.25, 10.75, 11.25, 11.75, 12.25, 12.75, 13.25, 13.75, 14.25, 14.75,
    15.25, 15.75, 16.25, 16.75, 17.25, 17.75, 18.25, 18.75, 19.25, 19.75,
    20.25, 20.75, 21.25, 21.75, 22.25, 22.75, 23.25 ;

 TCYS = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ;
}

My problem is that regriding on a 37x37 cell grid (GQW1) creates a 39x37 file , adding for the longitude 2 aditional points on the x-grid longitude : -163.75 and 196.25.

I don't undestand what occurs and how to prevent it. If someone could help me ...

--
Francois DELCLAUX
------------------------------------------------------------
UMR HydroSciences Montpellier
Universite Montpellier II - Place Eugene Bataillon
Case courrier MSE
34095  Montpellier Cedex 5      FRANCE
http://www.hydrosciences.fr/
mailto: delclaux@xxxxxxxxxxxxxxxxxxx
Tel : (33) (0)4 67 14 90 11      Fax : (33) (0)4 67 14 47 74
------------------------------------------------------------





[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement