Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Operation between two netcdf data units. op is one of the following :

+ Addition

- Subtraction

* Multiplication

/ Division

^ Power

 


The netcdf returned by these boolean operators are boolean netcdf (containing only 1 where result is true, 0 where it is false) :

> Larger Than

< Smaller Than

>= Larger or Equal

<= Smaller or Equal

= Equal

<> Not Equal



netcdf ( netcdf op number )
netcdf ( number
op netcdf )

Operations between netcdf and numbers. op is any of the operations defined above.

...


netcdf ( netcdf and netcdf )
netcdf ( netcdf or netcdf )

...

creates a netcdf netcdf3 with values of 1 where the corresponding values of netcdf2 and netcdf2 are both non zero, and 0 otherwise.

...


Anchor
attributes
attributes

definition attributes( netcdf )

...

attr_list = attributes(netcdf)
date = attr_list.DATE

levelist = attr_list.LEVELIST


Anchor
dimensions

...

dimensions

list dimensions( netcdf )

This returns a list of numbers, each representing one of the dimensions of the data held in the netcdf :

...

e.g. if the current variable is a cross section, the output list would have two numbers, the first the number of levels, the second the number of points along the horizontal.

...


Anchor
dimension_names
dimension_names

list dimension_names(netcdf)

Returns a list of the dimension names for the current netcdf variable.


Anchor
global_attributes
global_attributes

definition global_attributes( netcdf )

Returns a definition variable holding the netcdf's global metadata.


Anchor
max
max

Anchor
min
min

netcdf max( netcdf,netcdf )
netcdf min( netcdf,netcdf )

Returns the netcdf of maximum (minimum) value of the two input netcdf.

 


netcdf max( netcdf,number )
netcdf min( netcdf,number )

Returns the netcdf of the maximum (minimum) of the number and the netcdf values.


Anchor
mod

...

mod

netcdf mod( netcdf,netcdf )

Returns a netcdf whose values are the remainder of the division of the first netcdf by the second netcdf. Where the values of the second netcdf are larger than those of the first, the output value is set to the integer part of the value of the first netcdf. Note that only the integer parts of the inputs are considered in the calculation, meaning that a second parameter of 0.5 would cause a division by zero.


Anchor
netcdf_auto_rescale_values_to_fit_packed_type
netcdf_auto_rescale_values_to_fit_packed_type

none netcdf_auto_rescale_values_to_fit_packed_type( number )  (Metview 5)

Sets whether Metview automatically rescales values if they overflow the packed data type of the current variable. Setting the input number to 1 enables the rescaling (which is the default behaviour), setting it to 0 disables it. If disabled, and the computed values overflow the data type, the macro will fail.


Anchor
netcdf_auto_translate_times
netcdf_auto_translate_times

none netcdf_auto_translate_times( number )   (Metview 5)

Sets whether Metview automatically translates time variables into dates when retrieving with the value() or values() functions. Setting the input number to 1 enables the translation (which is the default behaviour), setting it to 0 disables it. If disabled, these functions will instead return the raw numbers encoded in the netCDF variable. This is a global option, not specific to a particular netcdf file.


Anchor
netcdf_preserve_missing_values
netcdf_preserve_missing_values

none netcdf_preserve_missing_values(

...

number

...

)

...

(Metview

...

5)

Sets whether Metview correctly handles missing values by not including them in computations. Set the input number to 1 to ensure the correct treatment of missing values, or set it to 0 to revert to Metview 4's behaviour of considering them to be normal numbers. This is a global option, not specific to a particular netcdf file.


Anchor
netcdf_auto_scale_values
netcdf_auto_scale_values

none netcdf_auto_scale_values( number )   (Metview 5)

Sets whether Metview automatically applies scale_factor and add_set attributes if they are present. Setting the input number to 1 enables the scaling (which is the default behaviour), setting it to 0 disables it. If disabled, the the raw numbers encoded in the netCDF variable will be used in any calculations. This is a global option, not specific to a particular netcdf file.


Anchor
setcurrent
setcurrent

none setcurrent( netcdf, number )
none
setcurrent( netcdf, string )

...

var_list = variables(netcdf)
for i = 1 to count(var_list) do

    setcurrent(netcdf, i)

    netcdf = netcdf - 273.15
# acts on current variable only
end for


Anchor

...

value
value

number or date or string value ( netcdf, number )

Returns the nth (second parameter) value of the current netcdf variable.

...


Anchor
values
values

vector or date or list values( netcdf )
vector or date or list
values( netcdf,list )

...

v = values(nc, ['all', 2, 5])


Anchor

...

variables
variables

list variables( netcdf )

Extracts the variable names of the variables contained in a netcdf and returns them as a list of strings. Count the number of elements in the output list to give you the number of variables. The netcdf produced by the Metview applications are uni-variable, so in their case this returns a single element list.

...