[Thread Prev][Thread Next][Index]

Re: [ferret_users] Regridding the point locations data into spatial manner



Hi Ansley,

                 I have tried the way you told to me, but still I am getting an error. I have gone through the ferret manual and then I got that YCAT command will concatenate only for two variables.



sh da
     currently SET data sets:
    1> ./ad01_temp.nc
 name     title                             I         J         K         L         M         N
 TEMP     AD01_temp                        1:1       1:1       1:9       1:26280   ...       ...
 
    2> ./ad02_temp.nc
 name     title                             I         J         K         L         M         N
 TEMP     AD02_temp                        1:1       1:1       1:9       1:26280   ...       ...
 
    3> ./ad03_temp.nc  (default)
 name     title                             I         J         K         L         M         N
 TEMP     AD03_temp                        1:1       1:1       1:9       1:26280   ...       ...
 

def axis/x=69:69:1/units=degrees xlong
def axis/y=12:18:3/units=degrees ylat
def axis/cal=GREGORIAN/t="01-Jan-2013 00:00":"31-DEC-2015 23:00":1/units=hours thour
let dep=ZSEQUENCE({`10`,`15`,`20`,`30`,`50`,`75`,`100`,`200`,`500`})
 !-> DEFINE VARIABLE dep=ZSEQUENCE({10,15,20,30,50,75,100,200,500})
define axis/z/units="meters"/depth zdep=dep

let temp_3y = YCAT(temp[d=3], temp[d=2], temp[d=1])
 **ERROR: command syntax: YCAT(temp[d=3], temp[d=2], temp[d=1])
          The YCAT function has an incorrect number of arguments
DEFINE VARIABLE temp_3y = YCAT(temp[d=3], temp[d=2], temp[d=1])
Command file, command group, or REPEAT execution aborted

let temp0 = x[gx=xlong] + y[gy=ylat] + t[gt=thour] + z[gz=zdep]

let temp_grd_xy = RESHAPE(temp_3y, temp0)




Regards & thanks
Nanda Kishore reddy. B


On Tue, Feb 16, 2016 at 11:37 PM, Ansley C. Manke <ansley.b.manke@xxxxxxxx> wrote:
Hi,
Here I think a good way to treat the data in three datasets as one variable will be to call a function which concatenates them.
use AD01_temp.nc
use AD02_temp.nc
use AD03_temp.nc

def axis/x=69:69:1/units=degrees xlong
def axis/y=12:18:3/units=degrees ylat

! This puts the data onto an abstract y axis (with y=1,2,3,...)
let temp_3y = YCAT( AD03_temp[d=3], AD03_temp[d=2], AD03_temp[d=1])

! define a variable on your grid and use RESHAPE to put your data onto that grid.

let var_on_grid = x[gx=xlong] + y[gy=ylat]
let temp_grd_xy = RESHAPE(temp_3y, var_on_grid)

show grid
temp_grd_xy
The way I wrote that, this will put AD03_temp[d=3] at y=12, AD03_temp[d=2] at y=15, and so on.  If this is not the correct order, change the order of concatenation.  Now, if you use the variable temp_grd_xy, Ferret will read the data from each file as needed.

Ansley


On 2/14/2016 10:00 PM, Nanda Kishore Reddy wrote:
Hi,

         I have a 3 locations of data in which it contains different latitudes (i.e. uniformly spaced) but longitude, depth and time axis are fixed for all the locations. How can I regrid these point locations data into spatial manner.


can data/all; can var/all; set me/size=300

use AD01_temp.nc
use AD02_temp.nc
use AD03_temp.nc

def axis/x=69:69:1/units=degrees xlong
def axis/y=12:18:3/units=degrees ylat
def grid/x=xlong/y=ylat grd_xy

let sp_grd0 = AD03_temp[d=3,g=grd_xy@asn]
let sp_grd1= AD02_temp[d=2,g=grd_xy@asn]
let sp_grd2 = AD01_temp[d=1,g=grd_xy@asn]




Thanks & Regards
Nanda Kishore reddy. B




[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement