carray-netcdf 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/carray-netcdf.gemspec +1 -1
- data/lib/io/netcdf.rb +19 -11
- data/rb_netcdflib.c +12 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea7c0ef235ff60f9bb0558e99bdbd596f76e702e81263acbf387a95d66bc55a5
|
4
|
+
data.tar.gz: b31b8079ee8e2e43056438a0da58dad60850aef25801403665cc3cbda7898652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d296e1a15df84cc736d15b56a0d975c3303c7911bc31bc3412b6f1afa7006ac820cf25c44c328f11379145edc23b3f37cae749d99bea4baff15b6bf44d6767b
|
7
|
+
data.tar.gz: d8f89d1ddbb3ea03b2a166471cf7fa9d261d8e071df66944a1ecfc425c81e33cac27b130827e5a1fce6c3a94717f42c8bc5cd0df9516359ab856f89aa0305824
|
data/carray-netcdf.gemspec
CHANGED
data/lib/io/netcdf.rb
CHANGED
@@ -702,14 +702,14 @@ class NCFileWriter
|
|
702
702
|
if definition.has_key?("variables")
|
703
703
|
definition["variables"].each do |name, var_def|
|
704
704
|
unless var_def.has_key?("type")
|
705
|
-
warn "
|
705
|
+
warn "NCFileWriter: Variable '#{name}' does not have 'type' entry in definition"
|
706
706
|
else
|
707
707
|
unless ["char","byte","short","int","float","double"].include?(var_def["type"])
|
708
708
|
raise "invalid type of NetCDF Variable '#{name}'"
|
709
709
|
end
|
710
710
|
end
|
711
711
|
unless var_def.has_key?("dim")
|
712
|
-
warn "
|
712
|
+
warn "NCFileWriter: Variable '#{name}' does not have 'dim' entry in definition"
|
713
713
|
else
|
714
714
|
unless var_def["dim"].is_a?(Array)
|
715
715
|
raise "'dim' of NetCDF Variable '#{name}' should be an Array"
|
@@ -758,15 +758,23 @@ class NCFileWriter
|
|
758
758
|
def define (definition, define_mode: true)
|
759
759
|
definition = normalize_definition(definition)
|
760
760
|
check_definition(definition)
|
761
|
-
definition["
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
761
|
+
if definition.has_key?("dimension") and definition["dimension"].is_a?(Hash)
|
762
|
+
definition["dimensions"].each do |name, len|
|
763
|
+
dim = Dim.new(self, name, len.to_i, define_mode)
|
764
|
+
@dims.push dim
|
765
|
+
@name2dim[name] = dim
|
766
|
+
end
|
767
|
+
else
|
768
|
+
warn "NCFileWriter: No dimensions in definition"
|
769
|
+
end
|
770
|
+
if definition.has_key?("variables") and definition["variables"].is_a?(Hash)
|
771
|
+
definition["variables"].each do |name, info|
|
772
|
+
var = Var.new(self, name, info, @compression, define_mode)
|
773
|
+
@vars.push var
|
774
|
+
@name2var[name] = var
|
775
|
+
end
|
776
|
+
else
|
777
|
+
warn "NCFileWriter: No variables in definition"
|
770
778
|
end
|
771
779
|
if definition.has_key?("attributes") and definition["attributes"].is_a?(Hash)
|
772
780
|
@attributes = definition["attributes"]
|
data/rb_netcdflib.c
CHANGED
@@ -2577,24 +2577,35 @@ Init_netcdflib ()
|
|
2577
2577
|
rb_define_const(mNetCDF, "NC_NOCLOBBER", INT2NUM(NC_NOCLOBBER));
|
2578
2578
|
rb_define_const(mNetCDF, "NC_DISKLESS", INT2NUM(NC_DISKLESS));
|
2579
2579
|
rb_define_const(mNetCDF, "NC_MMAP", INT2NUM(NC_MMAP));
|
2580
|
+
#if defined(NC_64BIT_DATA)
|
2580
2581
|
rb_define_const(mNetCDF, "NC_64BIT_DATA", INT2NUM(NC_64BIT_DATA));
|
2582
|
+
#endif
|
2583
|
+
#if defined(NC_CDF5)
|
2581
2584
|
rb_define_const(mNetCDF, "NC_CDF5", INT2NUM(NC_CDF5));
|
2585
|
+
#endif
|
2582
2586
|
rb_define_const(mNetCDF, "NC_CLASSIC_MODEL", INT2NUM(NC_CLASSIC_MODEL));
|
2583
2587
|
rb_define_const(mNetCDF, "NC_LOCK", INT2NUM(NC_LOCK));
|
2584
2588
|
rb_define_const(mNetCDF, "NC_SHARE", INT2NUM(NC_SHARE));
|
2585
2589
|
rb_define_const(mNetCDF, "NC_NETCDF4", INT2NUM(NC_NETCDF4));
|
2586
2590
|
rb_define_const(mNetCDF, "NC_MPIIO", INT2NUM(NC_MPIIO));
|
2591
|
+
#if defined(NC_INMEMORY)
|
2587
2592
|
rb_define_const(mNetCDF, "NC_INMEMORY", INT2NUM(NC_INMEMORY));
|
2593
|
+
#endif
|
2588
2594
|
rb_define_const(mNetCDF, "NC_PNETCDF", INT2NUM(NC_PNETCDF));
|
2589
2595
|
|
2590
2596
|
rb_define_const(mNetCDF, "NC_FORMAT_CLASSIC", INT2NUM(NC_FORMAT_CLASSIC));
|
2597
|
+
#if defined(NC_FORMAT_64BIT_OFFSET)
|
2591
2598
|
rb_define_const(mNetCDF, "NC_FORMAT_64BIT_OFFSET", INT2NUM(NC_FORMAT_64BIT_OFFSET));
|
2599
|
+
#endif
|
2592
2600
|
rb_define_const(mNetCDF, "NC_FORMAT_64BIT", INT2NUM(NC_FORMAT_64BIT));
|
2593
2601
|
rb_define_const(mNetCDF, "NC_FORMAT_NETCDF4", INT2NUM(NC_FORMAT_NETCDF4));
|
2594
2602
|
rb_define_const(mNetCDF, "NC_FORMAT_NETCDF4_CLASSIC", INT2NUM(NC_FORMAT_NETCDF4_CLASSIC));
|
2603
|
+
#if defined(NC_FORMAT_64BIT_DATA)
|
2595
2604
|
rb_define_const(mNetCDF, "NC_FORMAT_64BIT_DATA", INT2NUM(NC_FORMAT_64BIT_DATA));
|
2605
|
+
#endif
|
2606
|
+
#if defined(NC_FORMAT_CDF5)
|
2596
2607
|
rb_define_const(mNetCDF, "NC_FORMAT_CDF5", INT2NUM(NC_FORMAT_CDF5));
|
2597
|
-
|
2608
|
+
#endif
|
2598
2609
|
|
2599
2610
|
rb_define_const(mNetCDF, "NC_SIZEHINT_DEFAULT", INT2NUM(NC_SIZEHINT_DEFAULT));
|
2600
2611
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carray-netcdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroki Motoyoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: " Extension for manipulating NetCDF3 file with CArray\n"
|
14
14
|
email: ''
|