Concatenate files in NCL

From: Waqar Younas <vickyqau_at_nyahnyahspammersnyahnyah>
Date: Wed Jan 29 2014 - 13:37:46 MST

Hi everyone,
Does anyone know about how to concatenate different nc files into one
single file in NCL? I have observed daily SST from 1981 to 2002 and the
dimensions are time,lat,lon. I first regrid each file to 2.5 by 2.5 and
then tried to concatenate them in NCO (ncrcat). But NCO says that the
individual file does not have record dimension in it. I cannot use ncecat
because my time is different for each file. The leap year has 366 days and
other years have 365. Surprisingly, When i concatenate original files
(without regridding, 0.5 by 0.5), it works. But when i re grid and then
concatenate it did not.
The ncdump of original file is

netcdf sst.day.mean.1982.v2 {
dimensions:
        time = UNLIMITED ; // (365 currently)
        lat = 720 ;
        lon = 1440 ;
variables:
        double time(time) ;
                time:long_name = "Time" ;
                time:units = "days since 1800-01-01 00:00:00" ;
                time:actual_range = 66474., 66838. ;
                time:delta_t = "0000-00-01 00:00:00" ;
                time:avg_period = "0000-00-01 00:00:00" ;
                time:axis = "T" ;
        float lat(lat) ;
                lat:long_name = "Latitude" ;
                lat:standard_name = "latitude" ;
                lat:units = "degrees_north" ;
                lat:actual_range = -89.875f, 89.875f ;
                lat:axis = "Y" ;
        float lon(lon) ;
                lon:long_name = "Longitude" ;
                lon:standard_name = "longitude" ;
                lon:units = "degrees_east" ;
                lon:actual_range = 0.125f, 359.875f ;
                lon:axis = "X" ;
        short sst(time, lat, lon) ;
                sst:long_name = "Daily Sea Surface Temperature" ;
                sst:units = "degC" ;
                sst:actual_range = -1.8f, 34.48f ;
                sst:valid_range = -300s, 4500s ;
                sst:unpacked_valid_range = -3.f, 45.f ;
                sst:missing_value = 32767s ;
                sst:scale_factor = 0.01f ;
                sst:add_offset = 0.f ;
                sst:precision = 2s ;
                sst:dataset = "NOAA High-resolution Blended Analysis" ;
                sst:var_desc = "Sea Surface Temperature" ;
                sst:level_desc = "Surface" ;
                sst:statistic = "Mean" ;
                sst:parent_stat = "Individual Observations" ;

// global attributes:
 and for regrided files are

netcdf obs_sst_1982_regrided_90S_90N_1 {
dimensions:
        time = 365 ;
        lat = 73 ;
        lon = 144 ;
variables:
        float sst(time, lat, lon) ;
                sst:_FillValue = 32767.f ;
                sst:_FillValue_original = 32767s ;
                sst:parent_stat = "Individual Observations" ;
                sst:statistic = "Mean" ;
                sst:level_desc = "Surface" ;
                sst:var_desc = "Sea Surface Temperature" ;
                sst:dataset = "NOAA High-resolution Blended Analysis" ;
                sst:precision = 2s ;
                sst:add_offset = 0.f ;
                sst:scale_factor = 0.01f ;
                sst:unpacked_valid_range = -3.f, 45.f ;
                sst:valid_range = -300s, 4500s ;
                sst:actual_range = -1.8f, 34.48f ;
                sst:units = "degC" ;
                sst:long_name = "Daily Sea Surface Temperature" ;
                sst:Fill_Value = 32767s ;
        double time(time) ;
                time:long_name = "Time" ;
                time:units = "days since 1800-01-01 00:00:00" ;
                time:actual_range = 66474., 66838. ;
                time:delta_t = "0000-00-01 00:00:00" ;
                time:avg_period = "0000-00-01 00:00:00" ;
                time:axis = "T" ;
        double lat(lat) ;
                lat:units = "degrees_north" ;
                lat:long_name = "latitude" ;
        double lon(lon) ;
                lon:units = "degrees_east" ;
                lon:long_name = "longitude" ;
}

The difference in is time dimension where Time="UNLIMITED" // 365 currently
whereas for regrid file it is
Time = 365

-- 
Best Regards
Waqar Younas
PhD Candidate
Natural Resources and Environmental Studies (NRES)
University of Northern British Columbia (UNBC)
Canada

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 29 13:37:59 2014

This archive was generated by hypermail 2.1.8 : Fri Feb 07 2014 - 16:39:11 MST