[Thread Prev][Thread Next][Index]

Re: How to append extra values



Hi Jang,
You can write a new file with the longer Z axis.  Say the
axis was defined at {0,10,20,30,45,60}and you want the
new depth to be at z=80

yes? DEFINE AXIS new_z = {0,10,20,30,45,60,80}

!    You need to place the new values at Z=80, so  add
!    0*z[gz=newz, k=7] to the definition

yes? let p80= 0*z[gz=newz,k=7] + po4[k=6]+(po4[k=6]-po4[k=5])/3

!    See what you have defined  (with appropriate constants for X, Y, T)
!    This will show the depth at Z = 80
yes? list/x=180/y=0/L=1  p80

!    Now we want to make a new variable with the original data at
!    the original depths and the values at 80.  Put it on the new Z axis.
yes? let new_p = if (k LE 6) then p04[gz=newz] else p80[gz=newz]

!    Test what you have  (with appropriate constants for X, Y, T)
yes? list/x=180/y=0/L=1  new_p

! Save the data to a new NetCDF file.
yes? save new_p

Chan Joo Jang wrote:

> Dear Ferret users:
>
> How do I append extra values to a given netcdf file?
>
> For example,
>
> yes? use po4.nc
> yes? sho data
> currently SET data sets:
> 1> ./po4.nc (default)
> name title I J K L
> PO4 po4(mmol/m^3) 1:180 1:90 1:6 1:12
>
> yes? let p80=po4[k=6]+(po4[k=6]-po4[k=5])/3
>
> Then, I would like to append p80 to po4 at 7th depth using Ferret.
>
> Thanks in advance.
> Jang
>
> --
> Chan Joo Jang, Ph.D., Senior researcher
> (cjjang@kordi.re.kr,http://ogcm.kordi.re.kr)
> Korea Ocean Research and Development Institute
> 1270 Sa1-dong, Ansan  425-744, Korea
> Phone 82-31-400-6317 FAX 82-31-408-5823

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement