Mosaic two adjacent regions

Help
Ibe
2010-04-28
2015-04-09
  • Ibe

    Ibe - 2010-04-28

    Hi,

    I have two NetCDF files of adjacent regions. I want to mosaic(join or stitch) them to perform spatial analysis on it. Is it possible with NCOs?

    Thanks.

     
  • Charlie Zender

    Charlie Zender - 2010-04-28

    regular regions can be stitched together by converting the non-seam coordinate to a record coordinate, e.g., with ncecat, then stitching with ncrcat, then un-converting the record coordinate with, e.g., ncpdq. the input tiles should match in at least one dimension (the seam).
    cz

     
  • Ibe

    Ibe - 2010-04-28

    When i stitch two files together using ncecat, the lat and lon remains as of only first file's spatial extent. Let me elaborate my requirement a little; I have two files:

    -a(23,40,40) -> time|0:22,lat|0:10,lon|0:10
    -a(23,40,40) -> time|0:22,lat|10:20,lon|10:20

    I want to stitch these two files which have different spatial extents but with same time series. Would appreciate your detailed help.

    Thanks.

     
  • Charlie Zender

    Charlie Zender - 2010-04-28

    # assuming latitudes in files in1.nc and in2.nc form contiguous set
    # and that their longitudes are identical, i.e., in1.nc is arizona
    # and in2.nc is utah … try this
    ncpdq -a lat,lon,time in1.nc tmp1.nc # make lat record variable
    ncpdq -a lat,lon,time in2.nc tmp2.nc # make lat record variable
    ncrcat tmp1.nc tmp2.nc out.nc # concatenate latitudes
    ncpdq -a time,lat,lon out.nc out.nc # make time record variable

     
  • Ibe

    Ibe - 2010-04-28

    First two went well but for third line i got following error:

    ncrcat: ERROR input file temp1.nc lacks a record dimension

     
  • Ibe

    Ibe - 2010-04-28

    A follow up of the last post that "ncecat" isn't working as well instead of ncrcat.

     
  • Charlie Zender

    Charlie Zender - 2010-04-28

    # assume input files have no record dimension
    # assuming latitudes in files in1.nc and in2.nc form contiguous set
    # and that their longitudes are identical, i.e., in1.nc is arizona
    # and in2.nc is utah … try this
    ncecat in1.nc tmp1.nc # add record dimension
    ncecat in2.nc tmp2.nc # add record dimension
    ncpdq -a lat,lon,time,record tmp1.nc tmp1.nc # make lat record dimension
    ncpdq -a lat,lon,time,record tmp2.nc tmp2.nc # make lat record dimension
    ncrcat tmp1.nc tmp2.nc out.nc # concatenate latitudes
    ncwa -a record out.nc out.nc # remove record dimension
    ncpdq -a time,lat,lon out.nc out.nc # restore original dimension ordering

     
  • Charlie Zender

    Charlie Zender - 2010-04-28

    actually with NCO 4.0.1 and later those eight lines reduce to four
    if you use the new ncks -mk_red_dmn switch:

    ncks -mk_rec_dmn lat in1.nc tmp1.nc # make lat record dimension
    ncks -mk_rec_dmn lat in2.nc tmp2.nc # make lat record dimension
    ncrcat tmp1.nc tmp2.nc out.nc # concatenate latitudes
    ncpdq -a time,lat,lon out.nc out.nc # restore original dimension ordering

     
  • Ibe

    Ibe - 2010-04-29

    Following errors encountered for the respective commands given above every error one-byone:

    $ ncpdq -a latitude,longitude,time grid2.nc tmp2.nc

    ncpdq: INFO nco_var_dmn_rdr_mtd() for variable precip reports old input record dimension time is now ordinal dimension 2, new record dimension must be latitude

    ncecat grid1.nc tmp1.nc
    ncecat: tmp1.nc exists--`e'xit, `o'verwrite (i.e., delete existing file), or `a'ppend (i.e., replace duplicate and add new variables to existing file) (e/o/a)? a
    ncecat: WARNING dimension "time" is already defined in tmp1.nc
    ncecat: WARNING dimension "longitude" is already defined in tmp1.nc
    ncecat: WARNING dimension "latitude" is already defined in tmp1.nc
    nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_def_dim()
    nco_err_exit(): ERROR Error code is -54. Translation into English with nc_strerror(-54) is "NetCDF: NC_UNLIMITED size already in use"
    nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)

    $ ncecat grid2.nc tmp2.nc
    ncecat: tmp2.nc exists--`e'xit, `o'verwrite (i.e., delete existing file), or `a'ppend (i.e., replace duplicate and add new variables to existing file) (e/o/a)? a
    ncecat: WARNING dimension "time" is already defined in tmp2.nc
    ncecat: WARNING dimension "longitude" is already defined in tmp2.nc
    ncecat: WARNING dimension "latitude" is already defined in tmp2.nc
    nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_def_dim()
    nco_err_exit(): ERROR Error code is -54. Translation into English with nc_strerror(-54) is "NetCDF: NC_UNLIMITED size already in use"
    nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)

    $ ncpdq -a latitude,longitude,time,record tmp1.nc tmp1.nc
    ERROR: nco_inq_dimid() reports requested dimension "record" is not in input file
    nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_inq_dimid()
    nco_err_exit(): ERROR Error code is -46. Translation into English with nc_strerror(-46) is "NetCDF: Invalid dimension ID or name"
    nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)

    $ ncpdq -a latitude,longitude,time,record tmp2.nc tmp2.nc
    ERROR: nco_inq_dimid() reports requested dimension "record" is not in input file
    nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_inq_dimid()
    nco_err_exit(): ERROR Error code is -46. Translation into English with nc_strerror(-46) is "NetCDF: Invalid dimension ID or name"
    nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)

    $ ncrcat tmp1.nc tmp2.nc out.nc
    $ ncwa -a record out.nc out.nc
    ERROR: nco_inq_dimid() reports requested dimension "record" is not in input file
    nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_inq_dimid()
    nco_err_exit(): ERROR Error code is -46. Translation into English with nc_strerror(-46) is "NetCDF: Invalid dimension ID or name"
    nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)

    $ ncpdq -a time,latitude,longitude out.nc out.nc
    ncpdq: out.nc exists--`e'xit, `o'verwrite (i.e., delete existing file), or `a'ppend (i.e., replace duplicate and add new variables to existing file) (e/o/a)? a
    ncpdq: INFO nco_var_dmn_rdr_mtd() for variable precip reports old input record dimension latitude is now ordinal dimension 1, new record dimension must be time
    ncpdq: WARNING dimension "time" is already defined in out.nc
    ncpdq: WARNING dimension "longitude" is already defined in out.nc
    ncpdq: WARNING dimension "latitude" is already defined in out.nc
    ncpdq: WARNING Using existing definition of variable "time" in out.nc
    ncpdq: WARNING Using existing definition of variable "longitude" in out.nc
    ncpdq: WARNING Using existing definition of variable "latitude" in out.nc
    ncpdq: WARNING Using existing definition of variable "precip" in out.nc
    ncpdq: WARNING Using existing definition of variable "rstn" in out.nc
    nco_err_exit(): ERROR Short NCO-generated message (usually name of function that triggered error): nco_put_vara()
    nco_err_exit(): ERROR Error code is -57. Translation into English with nc_strerror(-57) is "NetCDF: Start+count exceeds dimension bound"
    nco_err_exit(): ERROR NCO will now exit with system call exit(EXIT_FAILURE)

    Please suggest how to tackle without error.

    Thanks.

     
  • Ibe

    Ibe - 2010-04-29

    I forgot to mention that i am using version 3.9.5 which doesn't support shorter commands provided lately by you.

     
  • Charlie Zender

    Charlie Zender - 2010-04-29

    In all cases above you should answer 'o' for overwrite, or use -O switch.
    cz

     
  • Ibe

    Ibe - 2010-04-30

    It worked. Thanks

     
  • ChaoYUE

    ChaoYUE - 2011-12-30

    Dear Charlie,

    I'm following this method to try to merge files spatially

    # assuming latitudes in files in1.nc and in2.nc form contiguous set
    # and that their longitudes are identical, i.e., in1.nc is arizona # and in2.nc is utah … try this
    ncpdq -a lat,lon,time in1.nc tmp1.nc # make lat record variable
    ncpdq -a lat,lon,time in2.nc tmp2.nc # make lat record variable
    ncrcat tmp1.nc tmp2.nc out.nc # concatenate latitudes
    ncpdq -a time,lat,lon out.nc out.nc # make time record variable

    I finished the first 2 steps, while when I try to do the third step, it prompts error like this:

    *** glibc detected *** ncrcat: double free or corruption (fasttop): 0x000000001d0a4f70 ***
    ======= Backtrace: =========
    /lib64/libc.so.6
    /lib64/libc.so.6(cfree+0x4b)
    /usr/local/install/nco/lib/libnco-4.0.6.so(nco_cln_clc_dff+0x31b)
    /usr/local/install/nco/lib/libnco-4.0.6.so(nco_cln_clc_org+0xea)
    /usr/local/install/nco/lib/libnco-4.0.6.so(nco_lmt_evl+0x686)
    ncrcat
    /lib64/libc.so.6(__libc_start_main+0xf4)
    ncrcat
    ======= Memory map: ========
    00400000-00408000 r-xp 00000000 08:06 210164                             /usr/local/install/nco-4.0.6/bin/ncra
    00608000-00609000 rw-p 00008000 08:06 210164                             /usr/local/install/nco-4.0.6/bin/ncra
    1d06f000-1d23a000 rw-p 1d06f000 00:00 0                                 
    31e4400000-31e441c000 r-xp 00000000 08:03 1442215                        /lib64/ld-2.5.so
    31e461c000-31e461d000 r-p 0001c000 08:03 1442215                        /lib64/ld-2.5.so
    31e461d000-31e461e000 rw-p 0001d000 08:03 1442215                        /lib64/ld-2.5.so
    31e4800000-31e494e000 r-xp 00000000 08:03 1442216                        /lib64/libc-2.5.so
    31e494e000-31e4b4e000 --p 0014e000 08:03 1442216                        /lib64/libc-2.5.so
    31e4b4e000-31e4b52000 r-p 0014e000 08:03 1442216                        /lib64/libc-2.5.so
    31e4b52000-31e4b53000 rw-p 00152000 08:03 1442216                        /lib64/libc-2.5.so
    31e4b53000-31e4b58000 rw-p 31e4b53000 00:00 0
    31e4c00000-31e4c82000 r-xp 00000000 08:03 1442368                        /lib64/libm-2.5.so
    31e4c82000-31e4e81000 --p 00082000 08:03 1442368                        /lib64/libm-2.5.so
    31e4e81000-31e4e82000 r-p 00081000 08:03 1442368                        /lib64/libm-2.5.so
    31e4e82000-31e4e83000 rw-p 00082000 08:03 1442368                        /lib64/libm-2.5.so
    31e5000000-31e501a000 r-xp 00000000 08:03 1667110                        /usr/lib64/libudunits2.so.0.0.0
    31e501a000-31e521a000 --p 0001a000 08:03 1667110                        /usr/lib64/libudunits2.so.0.0.0
    31e521a000-31e521b000 rw-p 0001a000 08:03 1667110                        /usr/lib64/libudunits2.so.0.0.0
    31e5800000-31e5814000 r-xp 00000000 08:03 1442361                        /lib64/libz.so.1.2.3
    31e5814000-31e5a13000 --p 00014000 08:03 1442361                        /lib64/libz.so.1.2.3
    31e5a13000-31e5a14000 rw-p 00013000 08:03 1442361                        /lib64/libz.so.1.2.3
    31e6c00000-31e6c31000 r-xp 00000000 08:03 1667125                        /usr/lib64/libidn.so.11.5.19
    31e6c31000-31e6e30000 --p 00031000 08:03 1667125                        /usr/lib64/libidn.so.11.5.19

    I searched on google and I think it's some error related with C language. So could you indicate what potential problem it can be. At the beginning I think it might because the file is too big, so I extract only ONE variable from the file and make it the size of 1M, but it still give this error.

    thanks a lot, and happy new year to you,

    Chao

     
  • Charlie Zender

    Charlie Zender - 2012-01-04

    Any core dump like this is an NCO bug. You are using NCO 4.0.6. Please post the smallest file which still demonstrates
    the bug, along with the exact command that generates the error, and I will try with the newest NCO.
    cz

     
  • ChaoYUE

    ChaoYUE - 2012-05-03

    Dear Charlie,

    It's been a long time since your answer.

    Recently a colleague of mine see this post and she has the same problem with me. I tried to give you the data and command I use to reproduce the problem. but I cannot find the link for attaching files when I reply the post. So maybe I can send to you an email with the data?

     
  • Charlie Zender

    Charlie Zender - 2012-05-04

    yes, you can email me the data files. post the commands here, though.
    cz

     
  • ChaoYUE

    ChaoYUE - 2012-05-04

    Actually I don't have your email address. maybe you can you email address to me at chaoyuejoy@gmail.com or post here (whichever as your prefer). thanks!

     
  • ChaoYUE

    ChaoYUE - 2012-05-04

    the command I use:
    ncpdq -a lat,lon,time_counter stomate_history_lai_1.nc temp1.nc
    ncpdq -a lat,lon,time_counter stomate_history_lai_2.nc temp2.nc
    ncrcat temp1.nc temp2.nc out.nc

     
  • ChaoYUE

    ChaoYUE - 2012-05-04

    ychao@asterix1 - …REGION_SIM - 21 >ncpdq -a lat,lon,time_counter stomate_history_lai_1.nc temp1.nc
    ncpdq: INFO nco_var_dmn_rdr_mtd() for variable LAI reports old input record dimension time_counter is now ordinal dimension 3, new record dimension must be lat
    ychao@asterix1 - …REGION_SIM - 22 >ncpdq -a lat,lon,time_counter stomate_history_lai_2.nc temp2.nc
    ncpdq: INFO nco_var_dmn_rdr_mtd() for variable LAI reports old input record dimension time_counter is now ordinal dimension 3, new record dimension must be lat
    ychao@asterix1 - …REGION_SIM - 23 >
    ychao@asterix1 - …REGION_SIM - 23 >ncrcat temp1.nc temp2.nc out.nc
    *** glibc detected *** ncrcat: double free or corruption (fasttop): 0x0000000001f486b0 ***
    ======= Backtrace: =========
    /lib64/libc.so.6
    /usr/local/install/nco/lib/libnco-4.0.6.so(nco_cln_clc_dff+0x378)
    /usr/local/install/nco/lib/libnco-4.0.6.so(nco_cln_clc_org+0xe2)
    /usr/local/install/nco/lib/libnco-4.0.6.so(nco_lmt_evl+0x6b4)
    ncrcat
    /lib64/libc.so.6(__libc_start_main+0xfd)
    ncrcat
    ======= Memory map: ========
    00400000-00408000 r-xp 00000000 08:05 420653                             /usr/local/install/nco-4.0.6/bin/ncra
    00607000-00608000 rw-p 00007000 08:05 420653                             /usr/local/install/nco-4.0.6/bin/ncra
    01f12000-020e0000 rw-p 00000000 00:00 0                                 
    364a000000-364a020000 r-xp 00000000 08:03 672999                         /lib64/ld-2.12.so
    364a21f000-364a220000 r-p 0001f000 08:03 672999                         /lib64/ld-2.12.so
    364a220000-364a221000 rw-p 00020000 08:03 672999                         /lib64/ld-2.12.so
    364a221000-364a222000 rw-p 00000000 00:00 0
    364a400000-364a586000 r-xp 00000000 08:03 673000                         /lib64/libc-2.12.so
    364a586000-364a786000 --p 00186000 08:03 673000                         /lib64/libc-2.12.so
    364a786000-364a78a000 r-p 00186000 08:03 673000                         /lib64/libc-2.12.so
    364a78a000-364a78b000 rw-p 0018a000 08:03 673000                         /lib64/libc-2.12.so
    364a78b000-364a790000 rw-p 00000000 00:00 0
    364a800000-364a883000 r-xp 00000000 08:03 673001                         /lib64/libm-2.12.so
    364a883000-364aa82000 --p 00083000 08:03 673001                         /lib64/libm-2.12.so
    364aa82000-364aa83000 r-p 00082000 08:03 673001                         /lib64/libm-2.12.so
    364aa83000-364aa84000 rw-p 00083000 08:03 673001                         /lib64/libm-2.12.so
    364ac00000-364ac02000 r-xp 00000000 08:03 673006                         /lib64/libdl-2.12.so
    364ac02000-364ae02000 --p 00002000 08:03 673006                         /lib64/libdl-2.12.so
    364ae02000-364ae03000 r-p 00002000 08:03 673006                         /lib64/libdl-2.12.so
    364ae03000-364ae04000 rw-p 00003000 08:03 673006                         /lib64/libdl-2.12.so
    364b000000-364b017000 r-xp 00000000 08:03 673005                         /lib64/libpthread-2.12.so
    364b017000-364b216000 --p 00017000 08:03 673005                         /lib64/libpthread-2.12.so
    364b216000-364b217000 r-p 00016000 08:03 673005                         /lib64/libpthread-2.12.so
    364b217000-364b218000 rw-p 00017000 08:03 673005                         /lib64/libpthread-2.12.so
    364b218000-364b21c000 rw-p 00000000 00:00 0
    364b400000-364b415000 r-xp 00000000 08:03 673002                         /lib64/libz.so.1.2.3
    364b415000-364b614000 --p 00015000 08:03 673002                         /lib64/libz.so.1.2.3
    364b614000-364b615000 r-p 00014000 08:03 673002                         /lib64/libz.so.1.2.3
    364b615000-364b616000 rw-p 00015000 08:03 673002                         /lib64/libz.so.1.2.3
    364b800000-364b807000 r-xp 00000000 08:03 688904                         /lib64/librt-2.12.so
    364b807000-364ba06000 --p 00007000 08:03 688904                         /lib64/librt-2.12.so
    364ba06000-364ba07000 r-p 00006000 08:03 688904                         /lib64/librt-2.12.so
    364ba07000-364ba08000 rw-p 00007000 08:03 688904                         /lib64/librt-2.12.so
    364bc00000-364bc1d000 r-xp 00000000 08:03 688907                         /lib64/libselinux.so.1
    364bc1d000-364be1c000 --p 0001d000 08:03 688907                         /lib64/libselinux.so.1
    364be1c000-364be1d000 r-p 0001c000 08:03 688907                         /lib64/libselinux.so.1
    364be1d000-364be1e000 rw-p 0001d000 08:03 688907                         /lib64/libselinux.so.1
    364be1e000-364be1f000 rw-p 00000000 00:00 0
    364c000000-364c016000 r-xp 00000000 08:03 673004                         /lib64/libresolv-2.12.so
    364c016000-364c216000 --p 00016000 08:03 673004                         /lib64/libresolv-2.12.so
    364c216000-364c217000 r-p 00016000 08:03 673004                         /lib64/libresolv-2.12.so
    364c217000-364c218000 rw-p 00017000 08:03 673004                         /lib64/libresolv-2.12.so
    364c218000-364c21a000 rw-p 00000000 00:00 0
    364d800000-364d826000 r-xp 00000000 08:03 688914                         /lib64/libexpat.so.1.5.2
    364d826000-364da25000 --p 00026000 08:03 688914                         /lib64/libexpat.so.1.5.2
    364da25000-364da28000 rw-p 00025000 08:03 688914                         /lib64/libexpat.so.1.5.2
    364dc00000-364dc1b000 r-xp 00000000 08:03 152013                         /usr/lib64/libudunits2.so.0.0.0
    364dc1b000-364de1b000 --p 0001b000 08:03 152013                         /usr/lib64/libudunits2.so.0.0.0
    364de1b000-364de1c000 rw-p 0001b000 08:03 152013                         /usr/lib64/libudunits2.so.0.0.0
    364e000000-364e016000 r-xp 00000000 08:03 688913                         /lib64/libgcc_s-4.4.6-20110824.so.1
    364e016000-364e215000 --p 00016000 08:03 688913                         /lib64/libgcc_s-4.4.6-20110824.so.1
    364e215000-364e216000 rw-p 00015000 08:03 688913                         /lib64/libgcc_s-4.4.6-20110824.so.1
    364e400000-364e7dc000 r-xp 00000000 08:03 162758                         /usr/lib64/libhdf5.so.6.0.4
    364e7dc000-364e9dc000 --p 003dc000 08:03 162758                         /usr/lib64/libhdf5.so.6.0.4
    364e9dc000-364e9e7000 rw-p 003dc000 08:03 162758                         /usr/lib64/libhdf5.so.6.0.4
    364e9e7000-364e9e8000 rw-p 00000000 00:00 0
    364f800000-364f8e8000 r-xp 00000000 08:03 146126                         /usr/lib64/libstdc++.so.6.0.13
    364f8e8000-364fae8000 --p 000e8000 08:03 146126                         /usr/lib64/libstdc++.so.6.0.13
    364fae8000-364faef000 r-p 000e8000 08:03 146126                         /usr/lib64/libstdc++.so.6.0.13
    364faef000-364faf1000 rw-p 000ef000 08:03 146126                         /usr/lib64/libstdc++.so.6.0.13
    364faf1000-364fb06000 rw-p 00000000 00:00 0
    3651400000-3651420000 r-xp 00000000 08:03 162748                         /usr/lib64/libhdf5_hl.so.6.0.4
    3651420000-3651620000 --p 00020000 08:03 162748                         /usr/lib64/libhdf5_hl.so.6.0.4
    3651620000-3651621000 rw-p 00020000 08:03 162748                         /usr/lib64/libhdf5_hl.so.6.0.4
    3651621000-3651632000 rw-p 00000000 00:00 0
    3652000000-3652003000 r-xp 00000000 08:03 688910                         /lib64/libcom_err.so.2.1Abort (core dumped)

     
  • Charlie Zender

    Charlie Zender - 2012-05-04

    i can reproduce the problem you are having and will post again when we have a fix.
    thanks for reporting this!
    TODO nco1044, possible duplicate of TODO nco1022.
    cz

     
  • Mostofa Kamal

    Mostofa Kamal - 2012-10-07

    Hi Zender,

    I want to use DAYMET  data (multiple NetCDF files of adjacent regions)  to compare the Weather research and forecasting modelling system (WRF) output. Since the domain area of my model output cover more than one DAYMET tile so I need to merge multiple DAYMET tile into single continuous data set. 

    I  have tried to follow your suggestion in this post but getting error message:

    ncks -mk_rec_dmn lat in1.nc tmp1.nc           # make lat record dimension
    ncks -mk_rec_dmn lat in2.nc tmp2.nc           # make lat record dimension
    ncrcat tmp1.nc tmp2.nc out.nc                          # concatenate latitudes

    First two went well but for third line i got following error:  \"ncrcat: ERROR input file temp1.nc lacks a record dimension\"

    I am using  NCO 4.0.8

    I also tried to follow  another suggestion by Zader

    ncecat in1.nc tmp1.nc # add record dimension
    ncecat in2.nc tmp2.nc # add record dimension
    ncpdq -a lat,lon,time,record tmp1.nc tmp1.nc # make lat record dimension
    ncpdq -a lat,lon,time,record tmp2.nc tmp2.nc # make lat record dimension
    ncrcat tmp1.nc tmp2.nc out.nc # concatenate latitudes
    ncwa -a record out.nc out.nc # remove record dimension
    ncpdq -a time,lat,lon out.nc out.nc # restore original dimension ordering

    But  this time the first 4 instruction runs fine and give the same error as before on instruction line 5th.

    Here is the description of my 1st input file:

    netcdf \\11930_2002_prcp {
    dimensions:
            x = 181 ;
            y = 214 ;
            time = 365 ;
            nv = 2 ;
    and
    variables:
    float prcp(time, y, x)

    netcdf \\11750_2002_prcp {
    dimensions:
            x = 193 ;
            y = 242 ;
            time = 365 ;
            nv = 2 ;
    and
    variables:

    float prcp(time, y, x) ;

    Thanks
    Kamal
    PhD candidate
    University of Waterloo, Canada

     
  • Anonymous - 2013-01-10

    I had the problem and I solved it using the option -D 2 for the debug mode.
    Then, when I ran my command ncrcat, it crashes telling me that the attribute "units" wasn't the same in files,
    so I removed it using "ncatted -a units,latitude,d,, file.nc" and the ncrcat worked after that…
    … maybe it should be helpfull for others

     
  • Carsten Lemmen

    Carsten Lemmen - 2015-02-18

    Dear Charlie,

    Is there any experience out there with merging with NCO a mosaic from multiprocessor output, i.e. where both lat and lon need to be stitched together ...

     
  • Charlie Zender

    Charlie Zender - 2015-02-18

    I don't know of any generic recipe.
    There are two brute-force approaches.
    First, if datasets are rectangular, then do as above and convert the dimension to be stitched into a record dimension.
    Second, if datasets are irregular, then you can put the data into ncap2 and fill in whatever array sections you have. This involves, though, renaming variables since ncap2 understands only one namespace. If you figure out something others may be interested in seeing, please post it here.
    good luck,
    cz

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks