Weiming-Hu / AnalogsEnsemble

The C++ and R packages for parallel ensemble forecasts using Analog Ensemble
https://weiming-hu.github.io/AnalogsEnsemble/
MIT License
18 stars 5 forks source link

Extra dimension in the NetCDF output file #93

Closed Weiming-Hu closed 4 years ago

Weiming-Hu commented 4 years ago

The NetCDF output of anen_grib_mpi looks like the following:

login3(1010)$ ncdump -h test_2018.nc                          
netcdf test_2018 {      
dimensions:         
        num_stations = 10 ;                           
        num_test_times = 347 ;
        num_flts = 37 ;
        num_analogs = 5 ;
        num_similarity = 5 ;
        num_parameters = 6 ;
        num_search_times = 729 ;
        num_times = 8646 ;
variables:
        double analogs_time_index(num_analogs, num_flts, num_test_times, num_stations) ;
        double similarity(num_similarity, num_flts, num_test_times, num_stations) ;
        double similarity_time_index(num_similarity, num_flts, num_test_times, num_stations) ;
        double weights(num_parameters) ;
        double Xs(num_stations) ;
        double Ys(num_stations) ;
        uint64 test_times(num_test_times) ;
        uint64 search_times(num_search_times) ;
        uint64 FLTs(num_flts) ;
        string ParameterNames(num_parameters) ;
        double UpwardShortwaveRadiation(num_analogs, num_flts, num_test_times, num_stations) ;
        double DownwardShortwaveRadiation(num_analogs, num_flts, num_test_times, num_stations) ;
        double wspd_1000hPa(num_analogs, num_flts, num_test_times, num_stations) ;
        double temperature_2m(num_analogs, num_flts, num_test_times, num_stations) ;

// global attributes:
                :_NCProperties = "version=2,netcdf=4.6.2,hdf5=1.10.4" ;
                :num_analogs = 5 ;
                :num_similarity = 5 ;
                :observation_id = 0 ;
                :max_par_nan = 1 ;
                :max_flt_nan = 1 ;
                :flt_radius = 1 ;
                :operation = 1 ;
                :quick = 1 ;
                :prevent_search_future = 1 ;
                :Institute = "GEOlab @ Penn State" ;
                :Institute\ Link = "http://geolab.psu.edu" ;
                :Package = "Parallel Analog Ensemble" ;
                :Package\ Version = "v 4.0.3" ;
                :Package\ Link = "https://weiming-hu.github.io/AnalogsEnsemble" ;
                :Report\ Issues = "https://github.com/Weiming-Hu/AnalogsEnsemble/issues" ;

group: Forecasts {
  dimensions:
        num_parameters = 6 ;
        num_stations = 10 ;
        num_times = 347 ;
        num_flts = 37 ;
  variables:
        string ParameterNames(num_parameters) ;
        string ParameterCirculars(num_parameters) ;
        double Xs(num_stations) ;
        double Ys(num_stations) ;
        uint64 Times(num_times) ;
        double Data(num_flts, num_times, num_stations, num_parameters) ;
        uint64 FLTs(num_flts) ;
  } // group Forecasts

group: Observations {
  dimensions:
        num_parameters = 6 ;
        num_stations = 10 ;
        num_times = 8646 ;
  variables:
        string ParameterNames(num_parameters) ;
        string ParameterCirculars(num_parameters) ;
        double Xs(num_stations) ;
        double Ys(num_stations) ;
        uint64 Times(num_times) ;
        double Data(num_times, num_stations, num_parameters) ;
  } // group Observations
}

However, the dimension num_times in the root group is not necessary.

Weiming-Hu commented 4 years ago

Resolved in 8519a711981b23d55b41a34561898ce72ec36342