1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
// -*-C++-*-
// Purpose: File to test ncdismember
// Contains nested ensembles, metadata-only leaf groups, and "in-between data"
// Usage:
// ncgen -k netCDF-4 -b -o ~/nco/data/dsm.nc ~/nco/data/dsm.cdl
// ncdismember ~/nco/data/dsm.nc /data/zender/nco/tmp cf 1.3 > ~/foo.txt 2>&1
netcdf dsm {
group: g1 {
group: g1g1 {
:metadata = "Leaf-group metadata";
} // g1g1
} // g1
group: g2 {
:metadata = "g2 group contains metadata and one variable but no shared dimensions";
variables:
float one;
data:
one=1;
} // g2
group: g3 {
:metadata = "g3 group contains metadata and one variable and one dimension";
dimensions:
lat=2;
variables:
float one_arr(lat);
data:
one_arr=1,1;
} // g3
group: g4 {
:metadata = "g4 group contains one dimension, and one subgroup";
dimensions:
lat=2;
group: g4g1 {
:metadata = "g4g1 group contains one variable that depends on an inherited dimension";
variables:
float one_arr(lat);
data:
one_arr=1,1;
} // g4g1
} // g4
group: g5 {
:metadata = "g5 group contains one dimension, one variable (in-between) data and one subgroup";
dimensions:
lat=2;
variables:
float one_arr(lat);
group: g5g1 {
:metadata = "g5g1 group contains one variable that depends on an inherited dimension";
variables:
float one_arr(lat);
data:
one_arr=1,1;
} // g5g1
} // g5
group: cesm {
group: cesm_01 {
:Conventions = "CF-1.5";
:history = "yada yada yada";
:Scenario = "Historical";
:Model = "CESM";
:Realization = "1";
dimensions:
time=4;
variables:
float tas1(time);
float tas2(time);
data:
tas1=272.1,272.1,272.1,272.1;
tas2=272.1,272.1,272.1,272.1;
} // cesm_01
group: cesm_02 {
:Conventions = "CF-1.5";
:history = "yada yada yada";
:Scenario = "Historical";
:Model = "CESM";
:Realization = "2";
dimensions:
time=4;
variables:
float tas1(time);
float tas2(time);
data:
tas1=272.2,272.2,272.2,272.2;
tas2=272.2,272.2,272.2,272.2;
} // cesm_02
} // cesm
group: ecmwf {
group: ecmwf_01 {
:Conventions = "CF-1.5";
:history = "yada yada yada";
:Scenario = "Historical";
:Model = "ECMWF";
:Realization = "1";
dimensions:
time=4;
variables:
float tas1(time);
float tas2(time);
data:
tas1=273.1,273.1,273.1,273.1;
tas2=273.1,273.1,273.1,273.1;
} // ecmwf_01
group: ecmwf_02 {
:Conventions = "CF-1.5";
:history = "yada yada yada";
:Scenario = "Historical";
:Model = "ECMWF";
:Realization = "2";
dimensions:
time=4;
variables:
float tas1(time);
float tas2(time);
data:
tas1=273.2,273.2,273.2,273.2;
tas2=273.2,273.2,273.2,273.2;
} // ecmwf_02
} // ecmwf
} // root group
|