Giter VIP home page Giter VIP logo

Comments (6)

lesserwhirls avatar lesserwhirls commented on September 23, 2024

Unfortunately, this scenario is far too complex for NcML and will require writing some custom code join these together using the attributes in the way you describe.

from thredds.

lesserwhirls avatar lesserwhirls commented on September 23, 2024

It might be worth reaching out the the general netCDF users email list to see if anyone has done a similar task in the past: [email protected]

from thredds.

Akshay-Hegde avatar Akshay-Hegde commented on September 23, 2024

Unfortunately, this scenario is far too complex for NcML and will require writing some custom code join these together using the attributes in the way you describe.

Thank you as you said it seems impossible to do this in NCML, however I can do this using Ferret, cdo, matlab etc.
But wanted to discover possibilities especially dynamically as variables are same across files, time and depth axis Min and Max values are known.

Is there any document on NCML ? Official website docs seems not updated.

from thredds.

cofinoa avatar cofinoa commented on September 23, 2024

Hi, @Akshay-Hegde

I have not understand your scenario. Do you have a set of samples input nc files? what is the expected result for that sample?

Regards

from thredds.

cofinoa avatar cofinoa commented on September 23, 2024

.... what means re-gridding, interpolation?

from thredds.

Akshay-Hegde avatar Akshay-Hegde commented on September 23, 2024

Hi, @Akshay-Hegde

I have not understand your scenario. Do you have a set of samples input nc files? what is the expected result for that sample?

Regards

@cofinoa

Hi as you can see below got f1.nc to f5.nc total 5 files spanning from 2012-10-13 10:00:00 to 2019-10-22 08:40:00. But in between there are some data gaps as observation did not take place during this missing period. All these files belongs to single location so latitude and longitude dimension length is just 1.

datetime-start, datetime-end, file
2012-10-13 10:00:00, 2013-11-24 08:00:00, f1.nc  
            --- here data missing -- between 2013-11-24 08:01:00 to 2013-11-24 00:59:00
2013-11-24 13:00:00, 2014-11-15 15:00:00, f2.nc  
            --- here data missing -- between 2014-11-15 15:01:00 to 2016-11-16 00:59:00
2016-11-16 13:00:00, 2017-10-08 08:00:00, f3.nc  
            --- again here
2017-10-08 12:20:00, 2018-10-10 08:20:00, f4.nc  
            --- again here
2018-10-10 14:40:00, 2019-10-22 08:40:00, f5.nc  

.... what means re-gridding, interpolation?

Yes

Also these files time axis are like this

# for f1.nc  
float Time(Time) ;
		Time:long_name = "Time" ;
		Time:units = "hours" ;
		Time:time_origin = "13-OCT-2012 10:00:00" ;

# for f2.nc  
float Time(Time) ;
		Time:long_name = "Time" ;
		Time:units = "hours" ;
		Time:time_origin = "24-NOV-2013 13:00:00" ;

  • Is it possible to combine all file it to single file with time axis from 2012-10-13 10:00:00 to 2019-10-22 08:40:00 and then merge all variables within it ?
  • Is it possible to convert existing Time variable value relative to hours since 01-JAN-1970 00:00:00 ?
$ ncdump -h f1.nc | grep 'Time = '
	Time = 9767 ;
$ ncdump -h f2.nc | grep 'Time = '
	Time = 8547 ;
$ ncdump -h f3.nc | grep 'Time = '
	Time = 7820 ;


netcdf file:test.ncml {
  dimensions:
    Lon = 1;
    Lat = 1;
    Depth = 63;
    Time = 26134;           /*  Here I need available plus missing hours */


 float Time(Time=26134);
      :long_name = "Time";
      :units = "hours";
      :time_origin = "13-OCT-2012 10:00:00"; /* Here I need  hours since 01-JAN-1970 00:00:00 */

<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
   <aggregation dimName="Time" type="joinExisting">
              
            <netcdf location="f1.nc" />
            <!-- Missing Here
                 How to define virtual dataset and fill with missing values 
                 between 2013-11-24 09:00:00 to 2013-11-24 00:00:00
            -->
            <netcdf location="f2.nc" />

            <!--- missing Here
                between 2014-11-15 16:00:00 to 2016-11-16 00:00:00
            -->

      
            <!-- can we convert these files time axis values relative to hours since 1970-JAN-01 00:00:00 -->
            <netcdf location="f3.nc" />

   </aggregation>
</netcdf>

@cofinoa Please find sample data : Google Drive

from thredds.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.