android 数组 append,array_append_record

本文档介绍了NCL中的array_append_record函数,该函数用于将额外的记录追加到已存在的数组中。函数原型、参数说明及返回值类型都进行了详细阐述,并通过一个实例展示了如何将两个具有相同右维度的多维数组拼接成一个新的数组。
摘要由CSDN通过智能技术生成

NCL Home >

Documentation >

Functions >

Array manipulators,

Variable manipulators

array_append_record

Attaches [appends] additional records [leftmost dimension] to a previously existing array.

Prototype

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" ; This library is automatically loaded

; from NCL V6.2.0 onward.

; No need for user to explicitly load.

function array_append_record (

x1 ,

x2 ,

opt [1] : integer

)

Arguments

x1

An array of any shape and type.

x2

An array of the same rank as x1. All dimensions

to the right of the record (leftmost) dimension must

be identical.

opt

An integer. Set to 0. Currently, not used.

Return value

A multi-dimensional array. The rightmost dimensions will be the same as

on input. The left dimension will have additional records appended

to the x1 array.

Description

See the Example

See Also

Examples

Example 1

Consider the two multi-dimensional arrays x1 and x2.

It is desired to append x2 to the x1 array and return

a new array.

Let x1(ntim1, nlat,mlon) and x2(ntim2, nlat,mlon).

Note that x1 and x2 right dimensions are the same size.

Thena = array_append_record (x1, x2, 0)

;delete(x1)

;delete(x2)

will yield a(ntim, nlat, mlon) where ntim=ntim1+ntim2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值