Hello Ryo,
The example/method that you showed is converting a 4-d data to a 4-d data i.e. F and G are (x,y,z,t) and (x,y,rho,t). But in my case I computed the time trend of G variable so now it is 3-d (x,y,rho). So I want to map back time trend of G(x,y,rho) i.e. 3-d variable to G'(x,y,z).
use /data/rg/
rgsigmaslope.ncuse /data/rg/
neut.nc ! I took the l=@ave of density (x,y,z,t) to make it 3-d variable of (x,y,z) !
use /data/rg/
heat.nc ! I took the l=@ave of ocean heat (x,y,z,t) to make it 3-d variable of (x,y,z) !
sh gr slope[d=1],neut[d=2],heat[d=3]
GRID GRC1
name axis # pts start end subset
LONGITUDE LONGITUDE 360mr 20.5E 19.5E(379.5) full
LATITUDE LATITUDE 145 r 64.5S 79.5N full
AXDEN Z 93 r 19.104 28.304 full
normal T
GRID GOL1
name axis # pts start end subset
LON LONGITUDE 360 r 20.5E 19.5E(379.5) full
LAT LATITUDE 145 r 64.5S 79.5N full
LEV DEPTH (dbar) 58 i- 2.4811 1950.9 full
normal T
GRID GQR1
name axis # pts start end subset
LONGITUDE LONGITUDE 360mr 20.5E 19.5E(379.5) full
LATITUDE LATITUDE 145 r 64.5S 79.5N full
DEPTH_AXIS DEPTH (m) 58 i- 2.4811 1950.9 full
normal T
define axis/z=`NEUT[d=2,x=@min,y=@min,l=@min,z=@min]`:`NEUT[d=2,x=@max,y=@max,l=@max,z=@max]`:.1 axden
let zed=z[gz=heat[d=3]] + 0*heat[d=3]
!let neut=neutralrho[d=2,l=@ave]
let zedp=zaxreplace(zed, neut[d=2,gx=slope[d=1],gy=slope[d=1]], z[gz=axden])
set mem/size=5000
define axis/z=`zed[x=@min,y=@min,l=@min,z=@min]`:`zed[x=@max,y=@max,l=@max,z=@max]`:50 zedaxis
let rgz=zaxreplace(slope[d=1],zedp[gx=slope[d=1],gy=slope[d=1]],z[gz=zedaxis])
fill rgz[z=0:700@din]
The attached figure is generated after this computation but it seems odd that values at higher latitude are omitted which should not happen. I need help it this matter. Is it good to convert density of (x,y,z,t) to (x,y,z) i.r. the time mean ?
cheers saurabh