Menu

#21 Enlarging spatial coverage of a file

None
closed-postponed
None
5
2018-06-12
2018-06-12
DARRAS
No

Hello,

I am using NCO and trying to change spatial coverage of a netcdf file inFile.nc in order to match a larger spatial coverage.

First step I created an empty file lonArea.nc covering the missing area for the west longitudes, the two files have one identical variable called data. The two files lonArea.nc and inFile.nc have the same latitudes, the longitudes are between -77 and -75 for lonArea.nc and between -74 and -26 for inFile.nc

Then I tried the following methods :

1) I converted lon dimension into a record dimension for the two files which resulted in files named lonAreaDim.nc and InfileDim.nc. Then I used ncks -A to merge the two files : ncks -A lonAreaDime.nc InfileDim.nc

2) I tried to concatenate the two files using the following command : ncrcat -A lonArea.nc inFile.nc.

Neither of these two methods worked out.
I am sure there must be a solution with NCO tools.

Thank you in advance for your help.

Sabine

Discussion

  • DARRAS

    DARRAS - 2018-06-12

    Hello,

    I am using NCO and trying to change spatial coverage of a netcdf file inFile.nc in order to match a larger spatial coverage.

    First step I created an empty file lonArea.nc covering the missing area for the west longitudes, the two files have one identical variable called data. The two files lonArea.nc and inFile.nc have the same latitudes, the longitudes are between -77 and -75 for lonArea.nc and between -74 and -26 for inFile.nc

    Then I tried the following methods :

    1) I converted lon dimension into a record dimension for the two files which resulted in files named lonAreaDim.nc and InfileDim.nc. Then I used ncks -A to merge the two files : ncks -A lonAreaDime.nc InfileDim.nc

    2) I tried to concatenate the two files using the following command : ncrcat -A lonArea.nc inFile.nc.

    Neither of these two methods worked out.
    I am sure there must be a solution with NCO tools.

    Thank you in advance for your help.

    Sabine

     
  • Charlie Zender

    Charlie Zender - 2018-06-12

    Hi, we don't do "support-requests", we do "help". Please post this to http://sf.net/p/nco/discussion/9830

     
  • Charlie Zender

    Charlie Zender - 2018-06-12
    • status: open --> closed-postponed
    • Group: -->
     

Log in to post a comment.

MongoDB Logo MongoDB