[Thread Prev][Thread Next][Index]

Concatting cdf files



Hi ferreters

I am trying to merge differents cdf files in just one. These differents cdf files have two variables, salinity and temperature, but they are from differents latitude / longitude.

One dummy file (dummy.nc) was created and it covers all my region in interest (space and time coverage), with two dummies variables (s_r=1 for salinity, and t_r=1 for temperature).

The journal is recursive to read my independent cdf files to put them in just one. Name of independent cdf files are ts_LONGLAT.nc, and they are read in line marked with (1).

The problem that has been occured is that the final result recorded only the last independent cdf file. I will try to be more clear, only the last independent cdf file from my recursive journal is recorded in my newer cdf file (that one that joints independent ones).

Thank's for any help

------------------------ my template journal in use --------------------------------------------------------

can var/all;can da/all;can re/all
define symbol lon $1%95W%
define symbol lat $2%0N%

use dummy.nc ! dummies variables t_r (=1) and s_r (=1), which cover all region of interest to join independent files
set grid t_r

use ts_($lon)($lat).nc ! (1) here are variables that I have concern to put in just one cdf file (temp for temperature; salt for salinity)

set re/x=($lon)/y=($lat)

let/quiet ttemp_r=if (t_r[d=1] eq 1) then t_r[d=1]*temp else 0;
let/quiet temp_r=ttemp_r[g=my_grid@asn];
set var/title="Temperature"/units="C" temp_r

let/quiet ssalt_r=if (s_r[d=1] eq 1) then s_r[d=1]*salt else 0;
let/quiet salt_r=ssalt_r[g=my_grid@asn];
set var/title="Salinity"/units="PSU" salt_r

list/form=cdf/ ... /append/clobber temp_r,salt_r




Tonin, H. E.
School of Chemistry, Physics and Earth Sciences
Flinders University of South Australia




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement