Published using Google Docs
RIMS Calculator Instructions
Updated automatically every 5 minutes

Data Calculator Instructions


Content-


Basic Information

Data Calculator allows a user to execute algebraic and logical expressions/equations over any number of the gridded datasets in the system on the fly and display results in a form of maps, graphs, and just numbers with an option to download these results as data files in NetCDF (gridded datasets) or ASCII CSV (spreadsheet) format. The calculations are performed on the grid cell level over the full grid extent of the anchor dataset (see definition below).

"Equation" input form-
The equation has to be entered in this  input form and it can contain basic and advanced algebra operators, common mathematical and statistical functions, conditional operators, etc. These are explained below in the Operators section. A set of special instructions could be used to control the calculation results and graphical design of the result visualization by the map and the histogram. These instructions are accessible via form input options.

Conceptual Approach

The calculation equation submitted to the server gets parsed, valideated and then evaluated using the powerful Perl PDL (Perl Data Language) scripting language and data management framework of RIMS (Rapid Integrated Mapping System) developed by WSAG UNH. PDL operates over multi-dimensional arrays of binary data with multi-threading over assigned dimensions and is computationally very efficient and commonly outperforms single threaded C or FORTRAN compiled codes. The datasets entered in the equation are read from the source data files, re-gridded to anchor dataset extents and re-packed to the following dimensions order-

(x, y, t)

where the last dimension t is time and which always has size 1 for non time series datasets (e.g. elevation) or N for the number of time series layers. Accordingly t > 1 for multi-layer time series datasets. First two dimensions x and y represent a two-dimensional data layer.

Understanding primitive dimensions of the datasets in the equation is important for using operators and functions that change (reduce) dimensionality of the return/output data arrays.

Anchor and Chain Datasets

Let us define anchor and chain datasets

Anchor dataset controls and determines the following grid properties for all chain datasets in the equation-

The anchor dataset is taken "as is" for the source data file(s) while the chain datasets are re-projected, re-gridded, and nodata re-masked to match the anchor using GDAL library and tools. So, if your anchor dataset has, say, only continental US spatial domain extents and the slave dataset has originally global extent, the latter will be reduced to continental US extent and the output (if grid) will be in it as well.

After regridding and copying of nodata mask from anchor to a chain dataset, the latter may still have nodata pixels in the “good” data mask of the anchor. These are patched by a valid values as shown in the figure below-

 

RIMS has three methods for patching the nodata pixels in the chain datasets:

  1. Fixed value (common) - all nodata mismatch pixels are patched with the same value, e.g. zero.
  2. Secondary dataset (least common) - pixels are patched by values from the alternative secondary dataset (grid), e.g. high quality climate drivers of continental US domain are patched with lower quality Global climate driver layers for, say, North America extents of the Anchor dataset spatial domain. This nodata patching method is not available for the Data Calculator.
  3. Nodata erosion (most common) - The nodata pixel adjacent to valid pixels are patched by their average so all nodata pixels around the boundary of valid pixels are patched at a time. The patching process continues until all mismatched pixels around the boundary of valid pixels are done. The “islands” of the mismatched pixels inside continuous areas of nodata in the chain dataset (e.g. the pixel in the upper right corner of the illustration above) are patched by the global average of all valid “continental” pixels.

Tip to clip spatial domain by an anchor dataset:

 An anchor dataset can be used to clip calculation spatial extent to match the domain of the anchor. This can be done by applying a dummy statement at the beginning of the calculation equation. E.g. -

Runoff_d{2000-01-01}->isgood * ( lin_reg_slope(M2_t2m_y{}) )

The Runoff_d dataset has an extent of the Ob river basin only while the M2_t2m_y dataset (MERRA2 annual temperatures at 2 m) has a Global extent. Using Runoff_d as anchor results in clipping the calculations to the Ob river area as illustrated below -

Entering an dataset symbols (variables)

Equation has to present a valid mathematical and/or logical expression that contains a combination of variables and operators. In the case of this Calculator, variables are numerical gridded datasets as the calculations are applied to each of their grid cells/pixels. Dataset notations (symbols) are linked to the actual datasets that are available for Web mapping visualization and hosted on WSAG servers and NAS systems. The dataset symbols that can be used in the equation input are subdivided into three categories-

The server preset dataset symbols are grouped by a theme and listed in the table on the left of the Data Calculator area. See table circled in red ink below-

Various symbol themes/groups are accessible from the radio button switches as shown above in the top row. For example, the Land theme is circled in red ink which is displayed in the symbol table. For the user's convenience, mouse clicking on the symbols in the Dataset Table automatically pastes them to the active Equation input at the active caret position (see Elev symbol circled in grey ink that is pasted in with the link click) . This ensures that the symbols are not misspelled as these are also case sensitive. Of course, a user can type in dataset symbols directly. Also, clicking on the Input dataset name makes it to be displayed on the map above (see “Elevation” circled in the illustration above).

User defined dataset symbols for the datasets currently displayed on the map can be added by clicking “define” link next to the default dataset symbol-

After it is typed in, clicking the “Add” button validates it and adds to the list of User Defined symbols that can be displayed in the symbol list table described above and accessible through clicking “User Defined” radio button (see illustration above).

And finally, the generic “all-the-time” symbol “mData” is available as well which is always available and clicking on it pastes it to the equation at the current caret position.

Note, if a pre- or user-defined symbol for the dataset currently displayed on the map is always displayed as shown here-

For example, a very simple calculation to convert elevation from meter to kilometer units could be done by this equation Elev/1000 where symbol "Elev" represents the elevation dataset.

Operators and Basic Functions

Common algebraic and logical operators are those used by Perl PDL which are the same as in any most higher level programming languages. Few of these have PDL specific exceptions. In addition all default and some custom installed PDL function libraries are available as well. See tables below-

Basic Algebraic Operators-

Operator

Action

Example

+

Addition

Elev + 10

-

Subtraction

Elev - Bath

*

Multiplication

Elev * 100

/

Division

Elev / 1000

**

Power

Elev ** 2

%

Modulus

Elev % 1000

Logical Operators-

Operator

Action

Example

>

Greater than

Elev > 1000

>=

Greater than or Equal to

Elev >= 1000

<

Less than

Elev < 1000

<=

Less than or Equal to

Elev <= 1000

==

Equal to

Country == 236

!=

Not equal to

Country != 236

&

*Bitwise "and"

(Country == 236) & (Lon > -140)

|

*Bitwise "or"

(Country == 236) | (Country == 40)

condition(a,b,c)

PDL analog to ternary operator (a ? b : c)

condition(Elev<500 Elev : -9999

* Note- Logical “and” and ”or” operations in the Calculator equations must be bitwise operations

Logical Functions specific to PDL-

Function

Action

Example

condition(a,b,c)

RIMS analog to ternary operator (a ? b : c)

condition(Elev<0, Bath, Elev)

condition_slice(a,b,c)

RIMS analog to ternary operator (a ? b : c)

condition_slice(Bath<0, Bath, Elev)

Notes-

Some Common Mathematical Functions-

Function

Action

Example

log()

Natural logarithm

log(Elev) or Elev->log

log10()

Base 10 logarithm

log10(Elev/1000) or (Elev/1000)->log10

exp()

Exponent

exp(Elev) or Elev->exp

sqrt()

Square root

sqrt(Elev)

abs()

Absolute value

abs(Bath) or Bath->exp

pi

Trigonometric constant pi

(Lon/180)*pi

Trigonometric functions

All trigonometric functions

sin(Lat/180*pi) or (Lat/180*pi)->sin

POSIX functions

Some commonly used numeric functions

floor(Elev/1000) or (Elev/1000)->floor

 

Some Common Array Operators/Functions-

Function

Action

Input → Output

->avg

Average over all dimensions

(x,y,t) → Number

->average

Average over the first dimension

(t,x,y) → (x,y)

->sum

Sum over all dimensions

(x,y,t) → Number

->sumover

Sum over the first dimension

(t,x,y) → (x,y)

->min

Minimum over all dimensions

(x,y,t) → Number

->minimum

Minimum over the first dimension

(t,x,y) → (x,y)

->max

Minimum over all dimensions

(x,y,t) → Number

->maximum

Minimum over the first dimension

(t,x,y) → (x,y)

->minimum_ind

Index of minimum over the first dimension

(t,x,y) → (x,y)

->maximum_ind

Index of maximum over the first dimension

(t,x,y) → (x,y)

->mv(1,0)

Reorder dimension #1 to the place of #0

(x,y,t) → (y,x,t)

->mv(2,0)

Reorder dimension #2 to the place of #0

(x,y,t) → (t,x,y)

Datasets with Time Series Layers

Single Layer Referencing

Datasets with Time Series (TS) layers are indicated by a star (*) symbol in the Data Table. Each layer can be accessed via TS layer identifier in a form {YYYY-MM-DD}. For example, a difference in Sea Surface Temperature between two dates (summer and winter) could be calculated by this equation-

SeaST{2007-07-15} - SeaST{2007-12-15}

Note- In the case of this equation a user can enhance the resulting map color range by setting  Map Styling options for Min = -10 and Map Options -> Max = 20.

If no TS layer identifier is provided for a given time series dataset than the latest (last) data layer is used in the equation, e.g. equation

SeaST * 9/5 + 32

converts sea surface temperature from Celsius to Fahrenheit for the latest data layer (near real-time) in sea surface temperature (SeaST) dataset. And if a user want to do the same for some specific date, say November 12, 2007 then it could be done with this formula-

SeaST{2007-11-12} * 9/5 + 32

Range or Multiple of TS Layer Referencing

A syntax to call a set or range of Time Series (TS) layers is provided by a comma and/or double dot operator (range) in the form of

SeaST{YYYY-MM-DD, YYYY-MM-DD..YYYY-MM-DD, etc.}

where, in the case of a double dot range operator, the first data has to be earlier than the second date. Note that TS layers are added to the last dimension of the SeaST data array-

(x, y, N)

where N is a number of TS layers from a user entered set or range operators.

The shortcut or wrapper for the range operator {} is also used in the equation input form as shown in the illustration below which is equivalent to a longer way of entering the equation-

SeaST{2020-07-01 .. 2020-07-31}->mv(2,0)->average

Note, this equation returns the average monthly SeaST temperature for July, 2020.

The double dot operator returns an array of layers so that array functions could be used on them (such as min(), max(), average(), sum(), map(), etc.). For example, a number of days with surface precipitation over 100 mm/day in the month of July, 2020 could be calculated with this equation-

(PrecipN{2020-07-01..2020-07-31} > 100)->mv(2,0)->sumover

Time Series Temporal Resolutions

Different time series temporal resolutions are referenced by their specific form of referencing which are indicated in the table below-

Time Series Type

Syntax

Example

Daily

{YYYY-MM-DD}

DataDD{2020-11-12} - Nov 12, 2020

Daily Climatology

{0000-MM-DD}

DataDD{0000-07-04} - Jul 4 climatology

Monthly

{YYYY-MM-00}

DataMD{2020-01-00} - Jan, 2020

Monthly Climatology

{0000-MM-00}

DataMC{0000-10-00} - Oct climatology

Yearly

{YYYY-00-00}

DataYD{2019-00-00} - 2019

Yearly climatology

{0000-00-00}

DataYC - long term average, one layer

The logic of the date syntax is that it is the same format for all (XXXX-XX-XX) where zeroes denote something that is not available as, say, days in the monthly datasets.

Reduction of Dimensions in the Output

As it was noted in the conceptual approach of the Data Calculator, the input data has always three dimensions

(x, y, t)

where the last (time) dimension can have value 1 for for single layer datasets (e.g. elevation). Some calculations may not reduce any dimensions of the output, e.g. unit conversion. But many types of calculations commonly collapse the third (time) dimension to value 1 (one layer) or completely eliminate it, e.g. calculation of min, max, average, etc. values of a time series data. In some calculations x or y dimensions can be collapsed as well which are those where output is a longitudinal or latitudinal cross-sections of the data, e.g. Global percent of land by the latitude. All aforementioned cases are allowed and they result in the “grid” “table” or “number” types of output. See table below.

Output Type

Source Dimensions

Output Dimensions

Examples

Grid

(x, y, t)

or

(x, y, 1)

(x, y, t) or (x, y, 1)

Unit conversion

(x, y)

Average, min, max over all TS layers

Table

(x, y, t)

or

(x, y, 1)

(x, t) or (x, 1)

Lon/Lat cross-sections

(y, t) or (y, 1)

(v, t) or (v, 1)

Population by country (v)

Number

(x, y, t)

or

(x, y, 1)

0

Global population,
Total cropland area, etc.

Table notes:

Calculation output results are displayed back to the user depending of the output type (indicated in the table above) as follows-

If a popup window is closed or the user needs to access metadata for the calculations, download calculation results data (file) or init metadata file for Grid output, these are alway available for the last performed calculation by clicking “Last Calculation Info/Download” button in the lower right corner of the Calculator-

Map Styling and Other Options

Map Styling allows an option to choose color palette, its min/max range, and whether it should be in log10 scale. These have an effect only for the “Grid” output type which is displayed in the map view window. The default color palette is “Rainbow” and the default min max values are taken from the range of calculated values. The choice of color palette is quite useful as most of Precipitation calculations look much better in the “DarkBlue” colors, vegetation or irrigation in the “DarkGreen”, temperatures in “SST”, and “all over” outputs are better in “ROYG” color palette, etc.

Presently, map server processing options include controls only on “noScale” and “noOffsite” inputs, but we are planning on including a full set of MT “Processing” keys in the near future.

Other Options include choices for reading of the Chain datasets (see “Anchor and Chain Datasets” section above). These are-

Custom Statistical and Other Functions

These are created for user convenience to perform some common statistical and other calculations that may require a long statement or set of statements in the Equation Input form. For example, calculation of linear regression slope (say, for climate warming trend in C/year) can be done using this input (no line wrap)-

my @dim=era5_t2m_y{}->dims;

my $x=sequence($dim[2])->dummy(0,$dim[1])->dummy(0,$dim[0]);

my $y=era5_t2m_y {};

($dim[2]*($x*$y)->mv(2,0)->sumover - $x->mv(2,0)->sumover*$y->mv(2,0)->sumover)/($dim[2]*($x**2)->mv(2,0)->sumover - ($x->mv(2,0)->sumover)**2)

 

But it is more convenient to do it using a pre-built custom function that does exactly the same as the lengthy input above-

 lin_reg_slope(era5_t2m_y{})

The list of such custom functions is listed in the Table below-

Table of Custom Functions-

Function

Comment

lin_reg_slope(TS_dataset[,offset][,step])

Linear regression slope

Examples:
lin_reg_slope(era5_t2m_y{})
lin_reg_slope(era5_t2m_m{},5,12)


Annual temperature trend, C/year
Same, but for June only (monthly TS input)

These function are listed and available for direct paste in here-

Please, let me know, if you want to add more custom functions

Examples (the Most Useful Section!)

 As it was noted in the  “Basic Information” section, the Data Calculator is using algebraic and logical operators, common functions and equation syntax of Perl PDL (Perl Data Language) where a number of links to useful in-depth documentation and information can be found.

First, let us parse and explain some fundamentals of a few equations for some most common calculation tasks.

Global average of time series layers, e.g. calculation of average Global temperature (single number) from time series of annual 1980-2019 MERRA2 air temperature at 2 m. This is the equation to do it in variants: (1) useless unweighted simple average, and (2) area area weighted average which is very important to do since the source dataset is in the Geographical projection -

  1.  M2_t2m_y{}->avg

  2. (M2_t2m_y{}*CellArea)->sum / (CellArea->sum * M2_t2m_y{}->dim(2))

where time series range {} is entered as {1980-00-00..2019-00-00} in the form below the equation as shown in this illustration

Here, for simplicity, we are going to explain and parse the equation (1) where the very first part of the equation M2_t2m_y{} is the input array (x,y,t) with actual dimensions of (576, 361, 40) , i.e. 40 time series layers of annual temperatures and we need to calculate an average of all pixel values in all time series layers. The PDL function ->avg does an average over all dimensions resulting in a single number (see Operators and Basic Functions section above)

Average layer of time series layers, e.g. calculation of long term average temperature (single grid layer) from time series of annual 1980-2019 MERRA2 air temperature at 2 m. This is the equation to do it

M2_t2m_y{}->mv(2,0)->average

where time series range {} is entered as {1980-00-00..2019-00-00} in the form below the equation as shown in the illustration for the previous example. Note, the cell area weighing is not needed here since the output is grid.

Similarly to the first example above, the very first part of the equation M2_t2m_y{} is the input array (x,y,t) with actual dimensions of (576, 361, 40), i.e. 40 time series layers of annual temperatures and in this example we need to calculate an average of 40 values in each pixel over t dimension. The PDL function ->average is the one to use as it does averaging (see Operators and Basic Functions section above), but only over the first dimension (which is x) of the (x,y,t) array. So, we need to reorder the dimensions (#0,#1,#2) so that the time dimension (#2) moves to the place of the first dimension (#0). PDL function for reordering is ->mv(2,0) which is moving dimension #2 to the place if #0. So the result of M2_t2m_y{}->mv(2,0) part of the equation yields an array of (t,x,y). Now, the function ->average makes an average of the first dimension t and reduces dimensionality to (x,y) making an output grid layer that is displayed on the map. The output is saved to NetCDF file which can be downloaded by clicking on the “Last Calculation Info/Download” button.

Global average of each time series layer, e.g. calculation of global average temperature (single number for each layer) from time series of annual 1980-2019 MERRA2 air temperature at 2 m. This is the equation to do it in both (1) unweighted (useless), and (2) weighted forms

  1.  M2_t2m_y{}->average->average

  2. (M2_t2m_y{}*CellArea)->sumover->sumover / CellArea->sum

where time series range {} is entered as {1980-00-00..2019-00-00} in the form below the equation as shown in the illustration for the previous example.

Similarly to the previous examples above, the very first part of the equation M2_t2m_y{} is the input array (x,y,t) with actual dimensions of (576, 361, 40). As we have already learned the PDL function ->average is making averaging over the first dimension x, so that the resulting array of reduced dimensionality becomes (y,t). And repeating it over (y,t) with ->average makes an average of y dimension, making the result to have only one remaining dimension (t) which is the array of 40 numbers of average global temperature for each year from 1980 to 2019. This is “graph” output type of the Data Calculator that looks like this -

A. Table of some useful examples of calculation equations
        
Note 1: use TS-Range input for {} in the equation, e.g. 1980-00-00 .. 2019-00-00
        Note 2:
NN - use “Nearest Neighbour” read method for Chain datasets (e.g. State, Country)

#

Purpose

Output type

Comment

1a

M2_t2m_y{}->avg

Average Global temperature- simple average of everything over all dimensions

Number

Meaningless as it is not cell area weighted

1b

anchorGrid; M2_t2m_y{}->avg

Same as above, but for area of valid cells in anchorGrid dataset

Number

Everything outside of anchorGrid valid cells is masked out

2

(M2_t2m_y{}*CellArea)->sum / (CellArea->sum * M2_t2m_y{}->dim(2))

Same as in # 1 above, but weighted

Number

Useful

3

M2_t2m_y{}->mv(2,0)->average

A layer of average temperatures- average of time series layers

Grid

Useful, one layer

4

M2_t2m_y{}->average->average

An average temperatures for each time series layer

Graph

Meaningless as it is not cell area weighted

5

(M2_t2m_y{}*CellArea)->sumover->sumover / CellArea->sum

Same as in # 1 above, but weighted

Graph

Useful

6

M2_t2m_y{}*9/5 + 32

Convert Celsius units to Fahrenheit

TS Grid

No change of output dimensions

7

M2_t2m_d{2019-06-01..2019-08-31}->mv(2,0)->maximum

Summer max T, June-August 2019

Grid

Use any time series range

8

(M2_prec_d{} > 25)->mv(2,0)->sumover

Number of days with Precip > 25 mm in the input date range, e.g. July, 2019

Grid

1 layer output

9

RnffM2mc{0000-01-00..0000-12-00}->mv(2,0)->maximum_ind + 1

Month of the maximum runoff

Grid

Use 1 year monthly input

10

Elev->mv(1,0)->average

Elevation (land only) average by longitude

Graph

Elev valid pix are over land only

11

Elev->average

Same but by latitude

Graph

Elev valid pix are over land only

12

(Elev->isgood*sqrt(CellArea->max))->mv(1,0)->sumover

Land length (km) by longitude

Graph

Height of pix is constant

13

(Elev->isgood*sqrt(CellArea->max)*CellArea/CellArea->max)->sumover

or

(Elev->isgood*sqrt(CellArea->max)*cos(pi*Lat/180))->sumover

Same but by latitude

Graph

Length of pix is a function of lat

14

100*Elev->isgood->mv(1,0)->sumover / Elev->setbadtoval(0)->isgood->mv(1,0)->sumover

Land % by longitude

Graph

Elev valid pix are over land only

15

100*Elev->isgood->sumover / Elev->setbadtoval(0)->isgood->sumover

Same but by latitude

Graph

Elev valid pix are over land only

16

(Pop15*CellArea)->sum

Global population in 2015

Number

NB- Input Pop usits are per km2

17

(Pop15*CellArea*(Country == 236))->sum

or (better)

(Pop15*CellArea)->where(Country == 236)->sum

US population in 2015

Number

236 is the ID value for US, NN

18

[map((Pop15*CellArea*1e-6*(State == $_))->sum, 1..56)]

or (better)

[map((Pop15*CellArea)->where(State == $_)->sum*1e-6), 1..56)]

US population in 2015 by state

Graph

Output units are Mln people, NN

19

[map(M2_t2m_y{1980-00-00..2019-00-00}->setbadif(State != $_)->avg, 1..56)]

Long term average temperature by state

Graph

NN

20

[map(M2_t2m_y{}->setbadif(State != $_)->average->average, 1..56)]

Each year average temperature by state

TS Graph

NN

21

(SeaIce{}/100*CellArea*(Lat > 0))->sumover->sumover*1e-6

Sea Ice area in the Northern Hemisphere

Graph

Output is in Mln km2

22

M2_t2m_dc{}->mv(2,0)->maximum - M2_t2m_dc{}->mv(2,0)->minimum

Annual temperature range

Grid

Use full daily climatology input

23

M2_t2m_y{}->setbadif(!(Lon>121 & Lon<134 & Lat>60 & Lat<63))->average->average

Average temperature in a Lon/Lat box

Graph

Not area weighted average

24

M2_t2m_y{}->setbadif(Country != 30)->average->average

Average temperature of Brazil

Graph

Simple average of data grid

25

(M2_t2m_y{}*CellArea)->setbadif(Country != 30)->sumover->sumover / CellArea->setbadif(Country != 30)->sum

Weighted average temperature of Brazil

Graph

Area weighted average, NN

26

[map {my $s=$_*12; my $e=$s+11; M2_t2m_m{}->slice(",,$s:$e")->avg}

 0..M2_t2m_m{}->dim(2)/12-1]

Annual averages of monthly data

Graph

Simple average of data grid

27

my $msk=(cont_msk==2) | (cont_msk==4); M2_t2m_y{}->setbadif(!$msk)

Use data only over two continents

TS Grid

1). make variable $msk.
2). use it in the next equation

28

Elev->copybad((RiverB==3)->setvaltobad(0))

Elevation map of Mississipper river basin

Grid

Case of checked
Trim nodata margins


Appendices

Country FIPS codes

These are index IDs in the “Country” input dataset (the first one in the “Other” theme) -

This dataset contains enumerated standard FIPS codes for World countries (see table below) as country index IDs. These IDs are useful for many calculations where a single or list of countries has to be masked or processed.

Usage example: Population-2000 of China where 46 is ID value for China-

(Pop00*CellArea)->where(Country == 46)->sum

Table of country FIPS codes and ID values-

FIPS

Country

Area, km2

ID

 

FIPS

Country

Area, km2

ID

AFG

Afghanistan

654581.6

1

LSO

Lesotho

32284.9

126

ALB

Albania

27958.1

2

LBR

Liberia

95213.9

127

DZA

Algeria

2328808.0

3

LBY

Libyan Arab Jamahiriya

1630110.0

128

AGO

Angola

1251150.0

6

LTU

Lithuania

66708.2

130

ARG

Argentina

2783626.0

10

LUX

Luxembourg

1997.3

131

ARM

Armenia

30688.0

11

MKD

Macedonia

27728.5

133

AUS

Australia

7702010.0

13

MDG

Madagascar

591160.3

134

AUT

Austria

83413.1

14

MWI

Malawi

117332.0

135

AZE

Azerbaijan

84929.0

15

MYS

Malaysia

326831.3

136

BGD

Bangladesh

132829.0

19

MLI

Mali

1254710.0

138

BEL

Belgium

33310.8

21

MRT

Mauritania

1042563.0

143

BEN

Benin

118824.3

23

MEX

Mexico

1987708.0

146

BOL

Bolivia

1088052.0

26

MDA

Moldova

33650.3

148

BIH

Bosnia and Herzegovina

48862.0

27

MAR

Morocco

409787.0

153

BWA

Botswana

586165.1

28

MOZ

Mozambique

797848.9

154

BRA

Brazil

8532679.0

30

MMR

Myanmar

679113.4

155

BRN

Brunei Darussalam

6163.4

33

NAM

Namibia

823019.4

156

BGR

Bulgaria

106664.0

34

NPL

Nepal

144278.2

158

BFA

Burkina Faso

262731.1

35

NLD

Netherlands

33956.9

160

BLR

Belarus

207466.4

37

NZL

New Zealand

269425.2

162

KHM

Cambodia

186885.3

38

NIC

Nicaragua

132602.0

163

CMR

Cameroon

464024.7

39

NER

Niger

1184367.0

164

CAN

Canada

9960884.0

40

NGA

Nigeria

913629.1

165

CHL

Chile

749971.6

45

PRK

North Korea

117925.1

168

CHN

China (with Tibet)

9365543.0

46

NOR

Norway

325914.7

170

COL

Colombia

1151452.0

49

PAK

Pakistan

871060.3

173

COG

Congo  (Brazzaville)

336631.5

51

PAN

Panama

73364.5

174

CRI

Costa Rica

45655.0

53

PNG

Papua New Guinea

439000.3

175

HRV

Croatia

58851.0

54

PRY

Paraguay,Brazil

400057.7

177

CUB

Cuba

109151.9

55

PER

Peru

1287014.0

178

CYP

Cyprus

10128.8

56

PHL

Philippines

268724.6

179

CZE

Czech Republic

75936.5

57

POL

Poland

316535.9

181

DNK

Denmark

39721.8

58

PRT

Portugal

95246.2

182

DOM

Dominican Republic

43854.7

61

ROU

Romania

241174.0

186

ECU

Ecuador

265687.7

62

RUS

Russian Federation

16838760.0

187

EGY

Egypt

1000378.0

63

SAU

Saudi Arabia

1961374.0

191

SLV

El Salvador

18015.9

64

SEN

Senegal

200632.7

192

ERI

Eritrea

122246.5

66

SRB

Serbia

95874.2

151

ETH

Ethiopia

1135719.0

68

MNE

Montenegro

193

FJI

Fiji

11808.4

72

SLE

Sierra Leone

76416.3

195

FIN

Finland

329493.4

73

SVK

Slovakia

48896.0

197

FRA

France

545957.8

74

SVN

Slovenia

21434.6

198

GUF

French Guiana

83248.8

75

ZAF

South Africa

1209581.0

201

GAB

Gabon

259580.3

78

KOR

South Korea

96841.7

203

GEO

Georgia

68860.3

81

ESP

Spain

503736.4

204

DEU

Germany

361208.9

82

LKA

Sri Lanka

64343.9

206

GHA

Ghana

238658.0

83

SDN

Sudan

2491526.0

212

GRC

Greece

114796.1

86

SUR

Suriname

151053.2

213

GTM

Guatemala

115967.0

91

SWZ

Swaziland

13814.0

215

GIN

Guinea

243153.6

93

SWE

Sweden

447576.6

216

GUY

Guyana

203194.4

95

CHE

Switzerland

33849.3

217

HTI

Haiti

29244.5

96

SYR

Syrian Arab Rep.

179898.6

218

HND

Honduras

119492.2

98

TJK

Tajikistan

145088.5

220

HUN

Hungary

94519.1

100

TZA

Tanzania,

930074.4

221

ISL

Iceland

96643.8

101

THA

Thailand

509266.3

222

IND

India

3174635.0

102

TGO

Togo

55012.2

223

IDN

Indonesia

1840958.0

103

TTO

Trinidad & Tobago

6079.0

226

IRN

I. Rep. Iran

1615594.0

104

TUN

Tunisia

150758.9

227

IRQ

Iraq

437772.5

105

TUR

Turkey

784835.9

228

IRL

Ireland

70449.6

106

TKM

Turkmenistan

472058.6

229

ITA

Italy

291573.3

108

UGA

Uganda

247162.3

232

CIV

Ivory Coast

333821.7

109

UKR

Ukraine

606102.3

233

JAM

Jamaica

8807.3

110

GBR

United Kingdom

236154.2

235

JPN

Japan

363786.2

112

USA

United St. of America

9406303.0

236

JOR

Jordan

89783.4

116

URY

Uruguay

181864.9

237

KAZ

Kazakhstan

2718303.0

118

UZB

Uzbekistan

440368.1

238

KEN

Kenya

577632.5

119

VEN

Venezuela

904155.0

240

KGZ

Kyrgyzstan

194381.0

122

VNM

Viet Nam

313284.5

241

LAO

Laos

231196.0

123

COD

Zaire

2348732.0

249

LVA

Latvia

59161.9

124

ZMB

Zambia

750969.0

250

LBN

Lebanon

10265.9

125

ZWE

Zimbabwe

394442.0

251

 


US State Codes

These are index IDs in the “State” input dataset (in the “Other” theme) -

This dataset contains standard FIPS codes and IDs for US States (see table below). These IDs are useful for many calculations where a single or list of US states has to be masked or processed.

Usage example: Population-2000 of New Hampshire where 33 is state ID code for NH -

(Pop00*CellArea)->where(State == 33)->sum

Table of US State FIPS codes and ID values-

FIPS

State

ID

 

FIPS

State

ID

AL

Alabama

1

MT

Montana

30

AK

Alaska

2

NE

Nebraska

31

AZ

Arizona

4

NV

Nevada

32

AR

Arkansas

5

NH

New Hampshire

33

CA

California

6

NJ

New Jersey

34

CO

Colorado

8

NM

New Mexico

35

CT

Connecticut

9

NY

New York

36

DE

Delaware

10

NC

North Carolina

37

DC

District of Columbia

11

ND

North Dakota

38

FL

Florida

12

OH

Ohio

39

GA

Georgia

13

OK

Oklahoma

40

HI

Hawaii

15

OR

Oregon

41

ID

Idaho

16

PA

Pennsylvania

42

IL

Illinois

17

RI

Rhode Island

44

IN

Indiana

18

SC

South Carolina

45

IA

Iowa

19

SD

South Dakota

46

KS

Kansas

20

TN

Tennessee

47

KY

Kentucky

21

TX

Texas

48

LA

Louisiana

22

UT

Utah

49

ME

Maine

23

VT

Vermont

50

MD

Maryland

24

VA

Virginia

51

MA

Massachusetts

25

WA

Washington

53

MI

Michigan

26

WV

West Virginia

54

MN

Minnesota

27

WI

Wisconsin

55

MS

Mississippi

28

WY

Wyoming

56

MO

Missouri

29

 

 

 

 


River Basin codes

These are index IDs in the “RiverB” input dataset (in the “Other” theme) -

River (Watershed) Basins only with an area over 100,000 km2 are included in the table below (about 150 basins). Total number of basins in the RiverB dataset is over 10,000. So other basin IDs could be found by using i-Tool over the map above the Calculator -

Usage example: Population-2000 in Indus Basin where 26 is this basin ID code -

(Pop00*CellArea)->where(RiverB == 26)->sum

Table of River Basin ID Values and other Information

ID

Basin Name

Length, km

Area, km2

Continent

Sea

Ocean

1

Amazon

5,041

5,993,746

South America

Atlantic Ocean

Atlantic Ocean

2

Zaire

4,949

3,709,316

Africa

Atlantic Ocean

Atlantic Ocean

3

Mississippi

4,750

3,231,620

North America

Atlantic Ocean

Atlantic Ocean

4

Nile

6,238

3,076,904

Africa

Mediterranean Sea

Mediterranean

5

Parana

2,922

2,717,458

South America

Atlantic Ocean

Atlantic Ocean

6

Ob

4,092

2,525,457

Asia

Kara Sea

Arctic Ocean

7

Yenisei

5,115

2,516,145

Asia

Kara Sea

Arctic Ocean

8

Niger

3,090

2,509,111

Africa

Atlantic Ocean

Atlantic Ocean

9

Lena

4,634

2,457,938

Asia

Laptev Sea

Arctic Ocean

10

Amur

4,401

1,989,248

Asia

Pacific Ocean

Pacific Ocean

11

Chang Jiang

5,094

1,920,851

Asia

Pacific Ocean

Pacific Ocean

12

Mackenzie

3,858

1,757,521

North America

Beaufort Sea

Arctic Ocean

13

Volga

3,321

1,403,367

Europe

Caspian Sea

Land

14

Zambezi

2,738

1,384,443

Africa

Indian Ocean

Indian Ocean

15

Araye

2,235

1,200,583

Africa

Mediterranean Sea

Mediterranean

16

Bode le Depression

1,922

1,107,307

Africa

Mediterranean Sea

Mediterranean

17

Nelson

2,057

1,106,634

North America

Hudson Bay

Atlantic Ocean

18

St. Lawrence

2,647

1,034,644

North America

Atlantic Ocean

Atlantic Ocean

19

Irharhar

2,203

950,763

Africa

Mediterranean Sea

Mediterranean

20

Ganges

2,064

948,029

Asia

Indian Ocean

Indian Ocean

22

Orange

1,926

914,052

Africa

Atlantic Ocean

Atlantic Ocean

23

Shatt el Arab

2,548

878,926

Asia

Indian Ocean

Indian Ocean

24

Orinoco

2,278

837,669

South America

Atlantic Ocean

Atlantic Ocean

25

Yukon

3,123

820,635

North America

Bering Strait

Pacific Ocean

26

Indus

2,837

816,843

Asia

Indian Ocean

Indian Ocean

27

Huang He

4,603

814,942

Asia

Pacific Ocean

Pacific Ocean

28

Danube

2,535

787,517

Europe

Black Sea

Mediterranean

29

Mekong

4,308

770,627

Asia

Pacific Ocean

Pacific Ocean

30

Tocantins

2,322

767,948

South America

Atlantic Ocean

Atlantic Ocean

31

Amu-Darya

2,249

686,621

Asia

Aral Sea

Land

32

Colorado (AZ)

2,015

678,874

North America

Pacific Ocean

Pacific Ocean

33

Columbia

1,755

666,063

North America

Pacific Ocean

Pacific Ocean

34

Kolyma

2,313

656,201

Asia

East Siberian Sea

Arctic Ocean

35

Okavango

1,763

646,759

Africa

Indian Ocean

Indian Ocean

38

Sao Francisco

2,487

621,193

South America

Atlantic Ocean

Atlantic Ocean

40

Syr-Darya

1,656

546,701

Asia

Aral Sea

Land

41

Jubba

1,173

533,627

Africa

Indian Ocean

Indian Ocean

43

Dnepr

1,568

507,131

Europe

Black Sea

Mediterranean

44

Rio Grande (US)

2,342

500,757

North America

Atlantic Ocean

Atlantic Ocean

45

Senegal

1,341

434,745

Africa

Atlantic Ocean

Atlantic Ocean

46

Don

1,502

430,896

Europe

Black Sea

Mediterranean

47

Volta

1,665

418,951

Africa

Atlantic Ocean

Atlantic Ocean

48

Limpopo

1,358

415,608

Africa

Indian Ocean

Indian Ocean

49

Ruo Dong

1,076

408,120

Asia

Pacific Ocean

Pacific Ocean

50

Zhujiang

1,855

405,470

Asia

Pacific Ocean

Pacific Ocean

51

Irrawaddy

1,876

391,740

Asia

Indian Ocean

Indian Ocean

52

Dvina

1,497

362,840

Europe

Barents Sea

Arctic Ocean

54

Qattara

1,244

344,879

Africa

Mediterranean Sea

Mediterranean

55

Farah

1,342

339,224

Asia

Indian Ocean

Indian Ocean

56

Parnaiba

1,228

331,719

South America

Atlantic Ocean

Atlantic Ocean

57

Indigirka

1,632

326,534

Asia

East Siberian Sea

Arctic Ocean

58

Pechora

1,289

316,364

Europe

Barents Sea

Arctic Ocean

59

Godavari

1,235

311,550

Asia

Indian Ocean

Indian Ocean

62

Churchill (Hudson Bay)

1,762

301,987

North America

Hudson Bay

Atlantic Ocean

63

Khatanga

1,422

301,076

Asia

Laptev Sea

Arctic Ocean

64

Colorado (Argentina)

1,567

292,966

South America

Atlantic Ocean

Atlantic Ocean

65

Tamanrasett

1,086

292,526

Africa

Atlantic Ocean

Atlantic Ocean

66

Neva

879

283,390

Europe

Baltic Sea

Atlantic Ocean

68

Krishna

1,186

278,706

Asia

Indian Ocean

Indian Ocean

70

Urugay

1,451

263,637

South America

Atlantic Ocean

Atlantic Ocean

72

Baker

1,190

259,955

North America

Arctic Archipelago

Arctic Ocean

73

Salado

1,073

259,717

South America

Atlantic Ocean

Atlantic Ocean

75

Taz

1,069

252,531

Asia

Kara Sea

Arctic Ocean

77

Ural

1,580

250,384

Asia

Caspian Sea

Land

79

Yana

1,078

234,000

Asia

Laptev Sea

Arctic Ocean

80

Fraser

1,130

230,327

North America

Pacific Ocean

Pacific Ocean

82

Ogooue

897

219,915

Africa

Atlantic Ocean

Atlantic Ocean

84

Liao

1,075

211,216

Asia

Pacific Ocean

Pacific Ocean

86

Rufiji

846

205,324

Africa

Indian Ocean

Indian Ocean

88

Lake Rudolf

743

201,063

Africa

Indian Ocean

Indian Ocean

90

Wisla

995

193,610

Europe

Baltic Sea

Atlantic Ocean

91

Kura

980

188,678

Asia

Caspian Sea

Land

92

Rhine

1,120

186,089

Europe

North Sea

Atlantic Ocean

93

Great Artesian Basin

1,018

185,289

Australia

Indian Ocean

Indian Ocean

94

Anadyr

893

185,159

Asia

Bering Strait

Pacific Ocean

96

Pyasina

1,112

178,294

Asia

Kara Sea

Arctic Ocean

97

Jaji

936

176,606

Asia

Caspian Sea

Land

98

Shur

516

172,048

Asia

Indian Ocean

Indian Ocean

100

Chao Phraya

936

169,359

Asia

Pacific Ocean

Pacific Ocean

102

Magdalena

1,082

165,961

South America

Atlantic Ocean

Atlantic Ocean

107

Sanaga

848

161,140

Africa

Atlantic Ocean

Atlantic Ocean

108

Roviuna

887

155,507

Africa

Indian Ocean

Indian Ocean

109

Grande de Santiago

886

154,131

North America

Pacific Ocean

Pacific Ocean

110

San Joaquin

754

153,601

North America

Pacific Ocean

Pacific Ocean

114

Tarim

972

150,750

Asia

Indian Ocean

Indian Ocean

115

Hong

946

150,411

Asia

Pacific Ocean

Pacific Ocean

116

Koksoak

838

145,292

North America

Hudson Strait

Atlantic Ocean

117

Elbe

964

141,891

Europe

North Sea

Atlantic Ocean

118

Cuanza

957

141,620

Africa

Atlantic Ocean

Atlantic Ocean

120

Lake Balkhash

737

138,110

Asia

Aral Sea

Land

121

Hai Ho

659

137,524

Asia

Pacific Ocean

Pacific Ocean

122

Albany

1,052

136,777

North America

Hudson Bay

Atlantic Ocean

123

Taymyr

716

134,328

Australia

Indian Ocean

Indian Ocean

124

Mahanadi

910

132,386

Asia

Indian Ocean

Indian Ocean

125

Brazos

1,291

125,502

North America

Atlantic Ocean

Atlantic Ocean

126

Emba

681

125,431

Asia

Caspian Sea

Land

129

Usumacinta

614

123,933

North America

Atlantic Ocean

Atlantic Ocean

130

Odra

782

120,616

Europe

Baltic Sea

Atlantic Ocean

132

Kuskowin

893

118,096

North America

Pacific Ocean

Pacific Ocean

134

Loire

836

117,327

Europe

Atlantic Ocean

Atlantic Ocean

135

Taymyra

768

116,466

Asia

Kara Sea

Arctic Ocean

136

Nottaway

668

115,246

North America

Hudson Bay

Atlantic Ocean

139

Alabama

707

113,612

North America

Atlantic Ocean

Atlantic Ocean

140

La Grande

808

112,771

North America

Hudson Bay

Atlantic Ocean

141

Flinders

755

111,534

Australia

Indian Ocean

Indian Ocean

142

Cunene

998

111,236

Africa

Atlantic Ocean

Atlantic Ocean

143

Colorado

1,108

110,562

North America

Atlantic Ocean

Atlantic Ocean

145

Moose

545

110,339

North America

Hudson Bay

Atlantic Ocean

146

Balsas

657

110,019

North America

Pacific Ocean

Pacific Ocean

148

Save

740

108,204

Africa

Indian Ocean

Indian Ocean

149

Churchill

811

106,419

North America

Atlantic Ocean

Atlantic Ocean

151

Hayes

566

103,742

North America

Hudson Bay

Atlantic Ocean

 


Continent codes

 These are index IDs in the “Cont” input dataset (in the “Other” theme) -

This dataset contains IDs of continents and the World ocean.

Usage example: Population-2000 of Africa where 1 is its ID code -

(Pop00*CellArea)->where(Cont == 1)->sum

Table of continent ID values

ID

(Sub) Continent Name

0

Africa

1

Antarctica

2

Asia

3

Australia

4

Europe

5

Greenland

6

Indonesia

7

New Zealand

8

North America

9

Oceans

10

Papua New Guinea

11

South America

12

Indonesia

 

Questions and comments are welcome - alex.proussevitch@unh.edu

Written by Alex Prusevich
Edited by Richard Lammers, Alexander Shiklomanov, and Stanley Glidden