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.nc
use /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 saurabhOn Wed, May 1, 2019 at 11:32 AM saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:Dear Ryo,G'dayThanks for your explanation but it is still not clear to me. I tried your way but it is showing an error **ERROR: illegal limits: Z limits of data and depth fields must match.sh gr slope[d=1], NEUTRALRHO[d=2]
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 118 r 16.81 28.51 full
normal T
GRID GFP1
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
TIME TIME 180 i 16-JAN-2004 05:14 16-DEC-2018 10:03 full
define axis/z=`NEUTRALRHO[d=2,x=@min,y=@min,l=@min,z=@min]`:`NEUTRALRHO[d=2,x=@max,y=@max,l=@max,z=@max]`:.1 axden
let zed=z[gz=slope[d=1]] + 0*slope[d=1]
let zedp=zaxreplace(zed, NEUTRALRHO[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 slopez=zaxreplace(slope[d=1],zedp,z[gz=zedaxis])
fill slopez[z=0:700@din]I am not clear where I am making mistake. This is my firs time using this method.Cheers, SaurabhOn Wed, May 1, 2019 at 9:24 AM Ryo Furue <furue@xxxxxxxxxx> wrote:Hi Saurabh,On Wed, May 1, 2019 at 9:12 PM saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:now I want to map it back to the `m` axis of depth which is define by `ohc.nc` so how I should do it ? or Do I map it first to `m` axis and after that I compute the slope ?When you convert a variable F from the z axis to the ρ axis, you do this:F_ρ = zaxreplace(F, ρ, denaxis) . . . . . (1)The field ρ(x, y, z, t) is the value of density at (x, y, z, t).Likewise, when you convert a variable G from the ρ axis to the z axis, you do this:G_z = zaxreplace(G, zed_ρ, zedaxis)That means that you need the variable "zed_ρ". The field zed_ρ(x, y, ρ, t) is the value of z at (x, y, ρ, t). That is, it's the depth of the isopycnal ρ at (x, y, t).This zed_ρ can be obtained similarly to (1):zed_ρ = zaxreplace(zed, ρ, denaxis)where zed is the "4D distribution of z":zed = z[gz=F] + 0*FThis "variable" is rather stupid: its value is the depth of each gridpoint (x, y, z, t).Hope this helps.Cheers,Ryo
--REGARDSSaurabh RathoreResearch Scholar (PhD.)Centre For Oceans, Rivers, Atmosphere & Land Science TechnologyIndian Institute Of Technology, Kharagpurcontact :- 91- 8345984434
--REGARDSSaurabh RathoreResearch Scholar (PhD.)Centre For Oceans, Rivers, Atmosphere & Land Science TechnologyIndian Institute Of Technology, Kharagpurcontact :- 91- 8345984434
Attachment:
spice.png
Description: PNG image