[Thread Prev][Thread Next][Index]
Re: [ferret_users] synchronizing an i/j/k grid with another lon/lat/z grid
> Hey Peng,
> try to see more into the grids with command
> "show grid vmode[d=1]"
> "show grid u[d=2]"
> It helps a lot. It should say something like this:
> GRID GKK1
> name axis # pts start end
> XAX X 87 r -10.75 32.25
> YAX Y 77 r 34.25 72.25
>
> (1) You can change the grid of one of the two variables to be the same:
>
> "let u_new=u[d=2,g=GKK1]"
> then "let dmode=vmode[d=1]-u_new"
>
Hi Peter,
This one works well for me. Thanks a lot!
--- Peng
> (2) You can cut the variable on the bigger region:
>
> let vmode_small=vmode[d=1,j=97:200]
>
> (3) Or you can define new axis and change the grid of the two variables
> with
> something like this:
>
> def axis/x=-90:90:0.5 newx
> def axis/y=-90:90:0.5 newy
> def axis/z=1:50:1 newz
> def grid/x=newx/y=newy/z=newz grd
> let u_new=u[d=2,g=grd]
> let vmode_new=vmode[d=1,g=grd]
>
> Hope this helps,
> Cheers, Peter
>
>
>
> On Thu, Sep 25, 2008 at 12:25 AM, Ge Peng
> <gpeng@xxxxxxxxxxxxxxxxxxxxxxx>wrote:
>
>> Hi Ferreters,
>>
>> I have two datasets:
>>
>> Grid in dataset 1:
>> X=1:360:1; Y=1:200:1; Z=1:50:1
>>
>> Grid in dataset 2:
>> X=geolon(i=1):geolon(i=360):1, which is from -279.5 to 80.5 every 1 deg
>> Y=geolat(j=1):geolat(j=200):dlat(j), which is from -83 to 89 with
>> varying
>> dlat.
>> Z=z(k=1):z(k=50):dz(k), dz varies.
>>
>> I need to perform adding or subtracting functions between variables from
>> those two data sets.
>>
>> yes? let dmode=vmode[d=1]-u[d=2]
>> yes? sha dmode[k=1,l=1]
>>
>> *** NOTE: Ambiguous coordinates on X axis: VMODE[D=1]-U[D=2]
>> **ERROR: inconsistent sizes of data regions: Y axis
>> U[D=2] has 104 points (J=097:200)
>> expression has 200 points (J=001:200)
>>
>> How do I synchronize these two grids?
>>
>> Thanks,
>>
>> --- Peng
>>
>> -------------------------------
>> The version of ferret and dataset info:
>>
>> > ferret
>> NOAA/PMEL TMAP
>> FERRET v6
>> Linux(g77) 2.4.21-32 - 08/23/06
>> 24-Sep-08 14:54
>>
>> yes? sho data
>> currently SET data sets:
>> 1> ./dynmode_cm21_ocn_stress.nc
>> name title I J K
>> L
>> NI_DIM model i-dimension ... ... ...
>> ...
>> NJ_DIM model j-dimension ... ... ...
>> ...
>> NK_DIM number k-dimension ... ... ...
>> ...
>> NMODE_DIM
>> number of modes in file ... ... ...
>> ...
>> RC displacement mode eigenvalues 1:360 1:200 1:5
>> ...
>> VC velocity mode eigenvalues 1:360 1:200 1:5
>> ...
>> RMODE displacement modes 1:360 1:200 1:50
>> 1:5
>> VMODE velocity modes 1:360 1:200 1:50
>> 1:5
>> RN2 buoyancy frequency square at la 1:360 1:200 1:50
>> 1:5
>> VN2 buoyancy frequency square at la 1:360 1:200 1:50
>> 1:5
>>
>> 2>
>> /host/crab/data02/gpeng/cm2.1p0_oda/dta/ocn_stress_sim/
>> 19930101-20.ocean_5days.uvts.nc
>> (default)
>> name title I J K
>> L
>> TEMP Potential temperature 1:360 1:200 1:50
>> 1:5
>> SALT Salinity 1:360 1:200 1:50
>> 1:5
>> U zonal current 1:360 1:200 1:50
>> 1:5
>> V meridional current 1:360 1:200 1:50
>> 1:5
>>
>>
>> yes? list vmode[i=116,j=163,k=1,l=1,d=1]
>> VARIABLE : velocity modes (non-dimensional (unit norm over
>> depth))
>> FILENAME : dynmode_cm21_ocn_stress.nc
>> X : 116
>> Y : 163
>> Z : 1
>> T : 1
>> 0.04642
>> yes? list u[i=116,j=163,k=1,l=1,d=2]
>> VARIABLE : zonal current (m/sec)
>> FILENAME : 19930101-20.ocean_5days.uvts.nc
>> FILEPATH :
>> /host/crab/data02/gpeng/cm2.1p0_oda/dta/ocn_stress_sim/
>> LONGITUDE: 164W(-164)
>> LATITUDE : 53N
>> DEPTH (m): 5
>> TIME : 03-JAN-1993 12:00 JULIAN
>> 0.03713
>>
>>
>>
>
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement