explicacion leyenda woa

48
The CSIRO netCDF version of the NODC World Ocean Atlas 2005 M.A. Collier and P.J. Durack CSIRO Marine and Atmospheric Research Paper 015 December 2006

Upload: jorge-marco-renau

Post on 21-Oct-2015

29 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005

M.A. Collier and P.J. Durack

CSIRO Marine and Atmospheric Research Paper 015 December 2006

Page 2: Explicacion Leyenda WOA
Page 3: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005

National Library of Australian Cataloguing in Publication Entry

Collier, M.A and P.J. Durack.

The CSIRO netCDF version of the NODC World Ocean Atlas 2005. ISBN: 1 921232 43 9 ISSN: 1833-2331 Title: (Series: CSIRO Marine and Atmospheric Research Paper [Online] No. 15) Address and contact details: CSIRO Marine and Atmospheric Research Private Bag No. 1, Aspendale Victoria 3195 Australia Ph: (+61 3) 9239 4400 Fax: (+61 3) 9239 4444 Email: [email protected] © CSIRO Electronic Edition 2006

Page 4: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005

Distribution list Chief of Division

Operations Manager

Project Manager

Client

Authors

Other CSIRO Staff

National Library

CMAR Libraries

Important Notice

© Copyright Commonwealth Scientific and Industrial Research Organisation

(‘CSIRO’) Australia 2006

All rights are reserved and no part of this publication covered by copyright may be reproduced or copied

in any form or by any means except with the written permission of CSIRO.

The results and analyses contained in this Report are based on a number of technical, circumstantial or

otherwise specified assumptions and parameters. The user must make its own assessment of the

suitability for its use of the information or material contained in or generated from the Report. To the

extent permitted by law, CSIRO excludes all liability to any party for expenses, losses, damages and

costs arising directly or indirectly from using this Report.

Use of this Report The use of this Report is subject to the terms on which it was prepared by CSIRO. In particular, the Report

may only be used for the following purposes.

� this Report may be copied for distribution within the Client’s organisation;

� the information in this Report may be used by the entity for which it was prepared (“the Client”), or by the Client’s contractors and agents, for the Client’s internal business operations (but not licensing to third parties);

� extracts of the Report distributed for these purposes must clearly note that the extract is part of a larger Report prepared by CSIRO for the Client.

The Report must not be used as a means of endorsement without the prior written consent of CSIRO.

The name, trade mark or logo of CSIRO must not be used without the prior written consent of CSIRO.

Page 5: Explicacion Leyenda WOA

The CSIRO netCDF version of theNODC World Ocean Atlas 2005

M.A. Collier and P.J. Durack

CSIRO Marine and Atmospheric Research

Research Paper No. 15

November 2006

CSIRO Marine and Atmospheric Research

PMB 1, Aspendale, Victoria 3195, Australia

Ph: (+61 3) 9239 4400; Fax: (+61 3) 9239 4444

E-mail: [email protected]

Page 6: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 1

Contents

1 Abstract 4

2 Background 5

3 netCDF files 6

3.1 Annual data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.2 Monthly data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.3 Seasonal data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4 Sample figures 13

5 Acknowledgments 15

6 Disclaimer 15

6.1 woa05txt2nc driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

6.2 woa05txt2nc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

6.3 woa05msk2nc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

7 Appendix 2: Example FERRET plotting scripts 39

Page 7: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 2

List of Figures

1 Directory locations of the World Ocean Atlas 2005 data. . . . . . . . . . . . . . . 7

2 Annual in-situ temperature for the global ocean. . . . . . . . . . . . . . . . . . . 13

3 Location of surface oxygen saturation observations. . . . . . . . . . . . . . . . . . 13

4 Dissolved oxygen averaged over 65− 90◦S. . . . . . . . . . . . . . . . . . . . . . . 14

Page 8: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 3

List of Tables

1 Name prefix for flies located under the directory IPCC/WOA05/processed/annual. 10

2 Name prefix for files located under the directory IPCC/WOA05/processed/monthly. 11

3 Name prefix for files located under the directory IPCC/WOA05/processed/seasonal. 12

Page 9: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 4

The CSIRO netCDF version of theNODC World Ocean Atlas 2005

M.A. Collier and P.J. Durack

CSIRO Marine and Atmospheric Research

PMB 1, Aspendale, Victoria 3195

Australia

November 2006

1 Abstract

This document lists the files that make up the CSIRO netCDF version of the NODC World

Ocean Atlas 2005. This Climate and Forecasting Metadata conventions conforming netCDF

format file archive derives from the ASCII text format files of the World Ocean Atlas 2005

available freely over the Internet and has the major advantage of being able to be imported into

most plotting and analysis tools, or numerical models, that can read netCDF files. The files

within contain temporal and spatial representation of in-situ temperature, salinity, oxygen and

dissolved inorganic nutrients.

Page 10: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 5

2 Background

The purpose of this data archive is to supply the CSIRO and broader scientific community

with a machine transparent, portable and self-describing version of the World Ocean Atlas

2005 (National Oceanographic Data Centre, 2006; Locarnini et al., 2006; Antonov et al., 2006;

Garcia et al., 2006a,b) dataset. This Atlas is referred to by the National Oceanographic Data

Center (NODC - http://www.nodc.noaa.gov) with the identifier WOA05. NODC offers the

WOA05 in ASCII text format that is highly portable but not generally compact, self-describing

or very efficient for processing and visualising. The ASCII or netCDF version of the WOA05

can be used to initialise numerical models, verify numerical model solutions, or for general

oceanographic and meteorological analysis. This work is effectively an up-date of earlier work

by Collier (2003), using the latest raw data and taking into account improvements that have

been made in data and metadata conventions since then.

Both gridded 5◦ by 5◦ and 1◦ by 1◦ longitude/latitude ASCII text format files are available

from the NODC. Only the 1◦ by 1◦ dataset was converted into netCDF format, as a coarser

horizontal version (eg. 5◦ by 5◦) can be readily generated from the finer horizontal version

through standard netCDF tools such as FERRET, NCO or Tcl-Nap1.

The standard levels for the analysed fields are 0, 10, 20, 30, 50, 75, 100, 125, 150, 200, 250,

300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1750, 2000, 2500, 3000,

3500, 4000, 4500, 5000 and 5500 metres. The tables in Section 3 list the depths for which a

particular variable is valid.1FERRET, NCO and Tcl-Nap softwares are freely available over the Internet

Page 11: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 6

3 netCDF files

A summary of the directory structure holding the raw (ASCII) and processed (netCDF) WOA05

data files is provided in Figure 1. This schematic also provides a useful summary of where

Tcl-Nap processing scripts and their input/output data are located. Note that all directory

names end in a “/” character, as is often used on computers with a UNIX opearting system, to

distinguish them from all other files.

To locate the netCDF files described in this report, you will need access to the High Per-

formance Scientific Computing (HPSC2) machine (owned and operated by CSIRO) “cherax”3.

The directory where the data are found is called “ IPCC/WOA05”. Section 7 (Appendix 2) lists

several utilities that were essential in creating the data archive described here.

There are three time-invariant files in this data set, used to determine land-sea (land-

sea.nc), basin locations (basin.nc) and mixing numbers (minnumber.nc). They are found in

IPCC/WOA05/processed/other.

landsea.nc: the land-sea mask gives the depth of each water column at each longitude/latitude

point on the earth’s surface. “Dry” (land) grid-cells are given by the missingvalue attribute

in the netCDF file. “Wet” (sea) grid-cells range in value between 1 and 40. The extra levels

beyond the thirty-three that were listed in Section 2 are 6000, 6500, 7000, 7500, 8000, 8500 and

9000 metres.

basin.nc: the earth’s ocean basins are labelled with a number in the range between 1 and 58.

Please refer to the WOA05 document for further information.

mixnumber.nc: contains the mixing number for each one-degree square at each standard

depth. The mix number is an integer between -2 and 2. Please refer to the WOA05 document

for further information.2http://hpsc.csiro.au/3Several centres have, however, began to serve the files described in this report through their own servers

Page 12: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 7

WOA05/

A00an1...A16se5

n00an1...n16se5

O00an1...O16se5

o00an1...o16se5

p00an1...p16se5

s00an1...s16se5

i00an1...i16se5

t00an1...t16se5

raw/

DATA/

aou/

nitrate/

o2sat/

oxygen/

phosphate/

salinity/

silicate/

temperature/

grid/

woa05readme.pdf

woa05readme.txt

processed/

annual/

monthly/

other/

seasonal/

utilities/

{A,n,O,o,p,s,i,t}00{an,dd,gp,ma,mn,sd,se}1.nc

{A,n,O,o,p,s,i,t}01012{an,dd,gp,ma,mn,oa,sd,se}1.nc

{A,n,O,o,p,s,i,t}01316{an,dd,gp,ma,mn,oa,sd,se}1.nc

{basin,landsea,mixnumber}.nc

{woa05txt2nc_driver,woa05txt2nc,woa05msk2nc}.tcl

Processed netCDF files

Raw ASCII files

Figure 1: Directory locations of the World Ocean Atlas 2005 data.

Each of the names given in the following tables is a netCDF file that have the suffix “.nc”.

Any locations in the table with a “-” indicate that there is no valid entry, and hence no data

available for that particular variable and analysis product. The naming convention for the

netCDF files and the variable names within them follow the system described in the WOA05

documentation. However, as monthly and seasonal data are kept in a single file (rather than

Page 13: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 8

12 and 4 separate files, respectively, in the original ASCII text format data set) the file names

have been slightly altered as described below:

[v][tp][ft][g][xx].nc

where:

[v] = variable:

t = Temperature

s = Salinity

o = Dissolved oxygen

a = Apparent oxygen utilization

x = Percentage oxygen saturation

p = Phosphate

n = Nitrate

i = Silicate

[tp] = time period:

00 = Annual data

0112 = Monthly data

1316 = Seasonal data

where the twelve months are defined as January, February, March, April, May, June, July,

August, September, October, November and December respectively. The four seasons are defined

based on the Northern Hemisphere as winter (January-March), spring (April-June), summer

(July-September) and autumn (October-December) respectively.

[ft] = file type:

an = Objectively analyzed climatology

ma = Seasonal or monthly climatology minus annual climatology

dd = Number of observations

sd = Standard deviation from statistical mean

se = Standard error of statistical mean

mn = Statistical mean

oa = Statistical mean minus objectively analyzed climatology

gp = Numer of mean values within radius of influence

[g] = grid size:

1 = one-degree square file

5 = five-degree square file

For example:

Page 14: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 9

t00an1.nc ≡ analysed annual in-situ temperature

x1316dd1.nc ≡ number of seasonal oxygen saturation observations

o0112an1.nc ≡ analysed monthly oxygen

A primary aim for the generation of this data archive was to be able to plot and analyse

the World Ocean Atlas 2005 data using the software FERRET (see Acknowledgements), and to

be suitable for parameter comparison with output from numerical ocean experiments. If users

of the CSIRO netCDF version of the NODC World Ocean Atlas 2005 require modifications to

the netCDF conventions and to suit their choice of netCDF software (see Disclaimer), please

contact the author of this report and we will try to accommodate them in a future version

release.

Page 15: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 10

3.1 Annual data

Variable Raw Objectively Statistical Seasonal Number of mean

units analyzed mean minus annual values within

climatology climatology radius of

influence

t00mn1 t00ma1 t00gp1

Salinity PPS s00an1 s00mn1 s00ma1 s00gp1

Dissolved oxygen ml l−1 o00an1 o00mn1 o00ma1 o00gp1

Apparent oxygen utilization ml l−1 A00an1 A00mn1 A00ma1 A00gp1

Percentage oxygen saturation % O00an1 O00mn1 O00ma1 O00gp1

Phosphate µM p00an1 p00mn1 p00ma1 p00gp1

Nitrate µM n00an1 n00mn1 n00ma1 n00gp1

Silicate µM i00an1 i00mn1 i00ma1 i00gp1

Variable Number of Standard Standard Statistical mean Depths

observations deviation from error of minus objectively (metres)

statistical mean statistical mean analyzed climatology

Temperature t00dd1 t00sd1 t00se1 - 0-5500

Salinity s00dd1 s00sd1 s00se1 - 0-5500

Dissolved oxygen o00dd1 o00sd1 o00se1 - 0-5500

Apparent oxygen utilization A00dd1 A00sd1 A00se1 - 0-5500

Percentage oxygen saturation O00dd1 O00sd1 O00se1 - 0-5500

Phosphate p00dd1 p00sd1 p00se1 - 0-5500

Nitrate n00dd1 n00sd1 n00se1 - 0-5500

Silicate i00dd1 i00sd1 i00se1 - 0-5500

Table 1: Name prefix for flies located under the directory IPCC/WOA05/processed/annual.

Page 16: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 11

3.2 Monthly data

Variable Raw Objectively Statistical Seasonal Number of mean

units analyzed mean minus annual values within

climatology climatology radius of

influence

Temperature ◦C t0112an1 t0112mn1 t0112ma1 t0112gp1

Salinity PPS s0112an1 s0112mn1 s0112ma1 s0112gp1

Dissolved oxygen ml l−1 o0112an1 o0112mn1 o0112ma1 o0112gp1

Apparent oxygen utilization ml l−1 A0112an1 A0112mn1 A0112ma1 a0112gp1

Percentage oxygen saturation % O0112an1 O0112ma1 O0112mn1 O0112gp1

Phosphate µM p0112an1 p0112mn1 p0112ma1 p0112gp1

Nitrate µM n0112an1 n0112mn1 n0112ma1 n0112gp1

Silicate µM i0112an1 i0112mn1 i0112ma1 i0112gp1

Variable Number of Standard Standard Statistical mean Depths

observations deviation from error of minus objectively (metres)

statistical mean statistical mean analyzed climatology

Temperature t0112dd1 t0112sd1 t0112se1 t0112oa1 0-1500

Salinity s0112dd1 s0112sd1 s0112se1 s0112oa1 0-1500

Dissolved oxygen o0112dd1 o0112sd1 o0112se1 o0112oa1 0-1500

Apparent oxygen utilization A0112dd1 A0112sd1 A0112se1 A0112oa1 0-1500

Percentage oxygen saturation O0112dd1 O0112sd1 O0112se1 O0112oa1 0-1500

Phosphate p0112dd1 p0112sd1 p0112se1 p0112oa1 0-500

Nitrate n0112dd1 n0112sd1 n0112se1 n0112oa1 0-500

Silicate i0112dd1 i0112sd1 i0112se1 i0112oa1 0-500

Table 2: Name prefix for files located under the directory IPCC/WOA05/processed/monthly.

Page 17: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 12

3.3 Seasonal data

Variable Raw Objectively Statistical Seasonal Number of mean

units analyzed mean minus annual values within

climatology climatology radius of

influence

Temperature ◦C t1316an1 t1316mn1 t1316ma1 t1316gp1

Salinity PSS s1316an1 s1316mn1 s1316ma1 s1316gp1

Dissolved oxygen ml l−1 o1316an1 o1316mn1 o1316ma1 o1316gp1

Apparent oxygen utilization ml l−1 A1316an1 A1316mn1 A1316ma1 A1316gp1

Percentage oxygen saturation % O1316an1 O1316mn1 O1316ma1 O1316gp1

Phosphate µM p1316an1 p1316mn1 p1316ma1 p1316gp1

Nitrate µM n1316an1 n1316mn1 n1316ma1 n1316gp1

Silicate µM i1316an1 i1316mn1 i1316ma1 i1316gp1

Variable Number of Standard Standard Statistical mean Depths

observations deviation from error of minus objectively (metres)

statistical mean statistical mean analyzed climatology

Temperature t1316dd1 t1316sd1 t1316se1 t1316oa1 0-5500

Salinity s1316dd1 s1316sd1 s1316se1 s1316oa1 0-5500

Dissolved oxygen O1316dd1 o1316sd1 o1316se1 o1316oa1 0-5500

Apparent oxygen utilization A1316dd1 A1316sd1 A1316se1 A1316oa1 0-5500

Percentage oxygen saturation O1316dd1 O1316sd1 O1316se1 O1316oa1 0-5500

Phosphate p1316dd1 p1316sd1 p1316se1 p1316oa1 0-500

Nitrate n1316dd1 n1316sd1 n1316se1 n1316oa1 0-500

Silicate i1316dd1 i1316sd1 i1316se1 i1316oa1 0-500

Table 3: Name prefix for files located under the directory IPCC/WOA05/processed/seasonal.

Page 18: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 13

4 Sample figures

This section includes three plots that have been made directly from the data archive using the

software FERRET. FERRET “go” journal scripts are given in Section ?? (Appendix 1). The

files utilised are t00an1.nc (◦C), O1316dd1.nc and o0112an1.nc (ml l−1), respectively.

Figure 2: Annual in-situ temperature for the global ocean.

Figure 3: Location of surface oxygen saturation observations.

Page 19: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 14

Figure 4: Dissolved oxygen averaged over 65− 90◦S.

Page 20: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 15

5 Acknowledgments

Thanks to the NODC for making the ASCII text format files directly available on DVD

and free of charge and the CSIRO HPSC (http://www.hpc.csiro.au) for helping to man-

age the archive through their massive magnetic tape/disk storage system. FERRET was used

to generate the figures in this document and is available free of charge through the Internet

(http://ferret.wrc.noaa.gov/Ferret).

6 Disclaimer

CSIRO did not generate the ASCII text format data for the World Ocean Atlas 2005, and takes

no credit or responsibility for it. The conversion of the World Ocean Atlas 2005 ASCII text

format data to netCDF format is quite straightforward, however, it is up to the users of the

CSIRO netCDF version of the NODC World Ocean Atlas 2005 to check and reassure themselves

of its numerical integrity and applicability to research applications. The CSIRO netCDF version

of the NODC World Ocean Atlas 2005 archive may be modified or updated at any time without

any prior warning. If you have any questions regarding this document, please contact the author,

preferably by e-mail.

References

Conkright, M.E, Locarnini, R.A., Garcia, H.E., O’Brien, T.D., Boyer, T.P.

Stephens, C. and J.I. Antonov. World OCEAN ATLAS 2001: Objective Analyses, Data

Statistics and Figures, CD-ROM Documentation. National Oceanographic Data Center, Silver

Spring, MD, 17, 17 pp., 2001.

Collier, M.A.. The CSIRO netCDF archive of the World Ocean Atlas 2001. CSIRO Atmo-

spheric Research internal Paper No. 26. 20 pp., 2003.

Locarnini, R. A., A. V. Mishonov, J. I. Antonov, T. P. Boyer, and H. E. Garcia.

World Ocean Atlas 2005, Volume 1: Temperature. S. Levitus, Ed. NOAA Atlas NESDIS 61,

U.S. Government Printing Office, Washington, D.C., 182 pp., 2006.

Antonov, J. I., R. A. Locarnini, T. P. Boyer, A. V. Mishonov, and H. E. Garcia.

World Ocean Atlas 2005, Volume 2: Salinity. S. Levitus, Ed. NOAA Atlas NESDIS 62, U.S.

Government Printing Office, Washington, D.C., 182 pp., 2006.

Garcia, H. E., R. A. Locarnini, T. P. Boyer, and J. I. Antonov. World Ocean Atlas

2005, Volume 3: Dissolved Oxygen, Apparent Oxygen Utilization, and Oxygen Saturation. S.

Levitus, Ed. NOAA Atlas NESDIS 63, U.S. Government Printing Office, Washington, D.C.,

342 pp., 2006

Page 21: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 16

Garcia, H. E., R. A. Locarnini, T. P. Boyer, and J. I. Antonov. World Ocean Atlas

2005, Volume 4: Nutrients (phosphate, nitrate, silicate). S. Levitus, Ed. NOAA Atlas NESDIS

64, U.S. Government Printing Office, Washington, D.C., 396 pp., 2006.

National Oceanographic Data Centre World Ocean Atlas 2005. Documentation accompa-

nying WOA05 DVD (ASCII text and portable document format). Prepared by the Ocean

Climate Laboratory, National Oceanographic Data Center, Silver Springs, MD 20910. 12pp.,

2006.

Page 22: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 17

6.1 woa05txt2nc driver

#!/usr/bin/tclsh

#CSIRO Australia

#Mark Collier November 17 2006

#Modified November 17 2006

source ~/.tclshrc

source ~col414/tcl_fun/dmget_tcl.tcl

source ~col414/ocean/data/woa05/utilities/woa05txt2nc.tcl

set V {t s o A O p n i}

set TP {"0112" "1316" "00"}

set FT {an mn ma gp dd sd se oa}

foreach v $V {

foreach tp $TP {

foreach ft $FT {

woa05txt2nc $v $tp $ft

};#ft

};#tp

};#v

exit

Page 23: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 18

6.2 woa05txt2nc

proc woa05txt2nc {v tp ft} {

##!/usr/bin/tclsh

##CSIRO Australia

##Mark Collier October 5 2006

##Modified October 5 2006

##source ~/.tclshrc

##source ~col414/tcl_fun/dmget_tcl.tcl

set tdir $::env(TMPDIR)

set clobber "yes"

set clobber "no"

if {$ft == "an"} {

nap "history = ’Objectively analyzed climatology’"

} elseif {$ft == "mn"} {

nap "history =’Statistical mean’"

} elseif {$ft == "dd"} {

nap "history =’Number of observations’"

} elseif {$ft == "ma"} {

nap "history =’Seasonal or monthly climatology minus annual climatology’"

} elseif {$ft == "sd"} {

nap "history =’Standard deviation from statistical mean’"

} elseif {$ft == "se"} {

nap "history =’Standard error from statistical mean’"

} elseif {$ft == "oa"} {

nap "history =’Statistical mean minus objectively analyzed climatology’"

} elseif {$ft == "gp"} {

nap "history =’Number of mean values within radius of influence’"

} else {

puts "ft=$ft doesn’t exist."

return

}

set g "1"

Page 24: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 19

set xx ""

if {$v == "c" || $v == "z"} {

puts "Variable $v not supported in WOA05."

return

}

if {$v == "t"} {

set idir [glob ~col414/WOA05/DATA/temperature/grid]

} elseif {$v == "s"} {

set idir [glob ~col414/WOA05/DATA/salinity/grid]

} elseif {$v == "o"} {

set idir [glob ~col414/WOA05/DATA/oxygen/grid]

} elseif {$v == "A"} {

set idir [glob ~col414/WOA05/DATA/aou/grid]

} elseif {$v == "O"} {

set idir [glob ~col414/WOA05/DATA/o2sat/grid]

} elseif {$v == "p"} {

set idir [glob ~col414/WOA05/DATA/phosphate/grid]

} elseif {$v == "n"} {

set idir [glob ~col414/WOA05/DATA/nitrate/grid]

} elseif {$v == "i"} {

set idir [glob ~col414/WOA05/DATA/silicate/grid]

} else {

puts "Variable $v unknown in WOA05."

return

}

set ifil ${v}${tp}${ft}${g}

set ofil ${ifil}.nc

if {$tp == "00"} {

set odir [glob ~col414/ocean/data/woa05/annual]

} elseif {$tp == "0112"} {

set odir [glob ~col414/ocean/data/woa05/monthly]

} elseif {$tp == "1316"} {

set odir [glob ~col414/ocean/data/woa05/seasonal]

} else {

puts "Time period $tp doesn’t exist."

return

}

Page 25: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 20

if {[file isfile $odir/$ofil] == 1 && $clobber == "no"} {

puts "$odir/$ofil exists and noclobber set."

return

}

puts "Input file=$idir/$ifil"

puts "Output file=$odir/$ofil"

puts "Temporaray file=$tdir/$ofil"

if {[file isfile $odir/$ofil] == 1 && $clobber == "yes"} {

file delete -force $tdir/$ofil

file delete -force $odir/$ofil

}

if {$tp == "0112"} {

catch {unset ifils}

foreach m {01 02 03 04 05 06 07 08 09 10 11 12} {

lappend ifils $idir/${v}${m}${ft}${g}

};#m

dmget_tcl $ifils

file delete -force $idir/$ifil;set tfil [open $idir/$ifil w];close $tfil

puts "Temporarily concatenating files:"

foreach f $ifils {

puts "$f"

exec /bin/cat $f >> $idir/$ifil

};#f

} elseif {$tp == "1316"} {

catch {unset ifils}

foreach m {13 14 15 16} {

lappend ifils $idir/${v}${m}${ft}${g}

};#m

dmget_tcl $ifils

file delete -force $idir/$ifil;set tfil [open $idir/$ifil w];close $tfil

puts "Temporarily concatenating files:"

foreach f $ifils {

puts "$f"

exec /bin/cat $f >> $idir/$ifil

};#f

};#tp

Page 26: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 21

if {$tp == "00"} {

if {$ft == "oa"} {

puts "Selection tp=$tp ft=$ft doesn’t exist."

return

}

if {$v == "c"} {

set ndep_tst "1a"

} elseif {$v == "z"} {

set ndep_tst "1b"

} else {

set ndep_tst "33"

}

if {$v == "c" && $ft == "ma" } {

puts "Selection tp=$tp, v=$v and ft==$ft doesn’t exist."

return

} elseif {$v == "z" && ($ft == "ma" || $ft == "gp" || $ft == "sd" || $ft == "se" || $ft == "oa")} {

puts "Selection tp=$tp, v=$v and ft==$ft doesn’t exist."

return

}

nap "time = f64{182.5}"

nap "time_bnds = f64{{0} {365}}"

nap "time_bnds=transpose(time_bnds,{1 0})"

} elseif {$tp == "0112"} {

if {$v == "p" || $v == "n" || $v == "i" || $v == "o" || $v == "A" || $v == "O"} {

set ndep_tst "14"

} else {

set ndep_tst "24"

}

if {$v == "c" || $v == "z"} {

puts "Selection tp=$tp and v=$v doesn’t exist."

return

}

Page 27: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 22

nap "time = f64{15 44 73.5 104 134.5 165 195.5 226.5 257 287.5 318.5 349}"

nap "time_bnds0 = f64{0 30 58 89 119 150 180 211 242 272 303 334}"

nap "time_bnds1 = f64{30 58 89 119 150 180 211 242 272 303 334 364}"

nap "time_bnds = transpose(time_bnds0 /// time_bnds1,{1 0})"

} elseif {$tp == "1316"} {

if {$v == "c" || $v == "z"} {

set ndep_tst "1"

} elseif {$v == "p" || $v == "n" || $v == "i"} {

set ndep_tst "14"

} else {

set ndep_tst "33"

}

if {$v == "z" && ($ft == "an" || $ft == "gp" || $ft == "sd" || $ft == "se" || $ft == "oa")} {

puts "Selection tp=$tp, v=$v and ft=$ft doesn’t exist."

return

}

nap "time = f64{44.5 134.5 226.0 318.0}"

nap "time_bnds0 = f64{0 89 180 272}"

nap "time_bnds1 = f64{89 180 272 364}"

nap "time_bnds = transpose(time_bnds0 /// time_bnds1,{1 0})"

}

if {$ndep_tst == "33"} {

nap "depth = f64{0 10 20 30 50 75 100 125 150 200 250 300 400 500 600 700 800 900 1000

1100 1200 1300 1400 1500 1750 2000 2500 3000 3500 4000 4500 5000 5500}"

} elseif {$ndep_tst == "24"} {

nap "depth = f64{0 10 20 30 50 75 100 125 150 200 250 300 400 500 600 700 800 900 1000

1100 1200 1300 1400 1500}"

} elseif {$ndep_tst == "14"} {

nap "depth = f64{0 10 20 30 50 75 100 125 150 200 250 300 400 500}"

} elseif {$ndep_tst == "10"} {

nap "depth = f64{0 10 20 30 50 75 100 125 150 200}"

Page 28: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 23

} elseif {$ndep_tst == "7"} {

nap "depth = f64{0 10 20 30 50 75 100}"

} elseif {$ndep_tst == "1"} {

nap "depth = f64{0}"

} elseif {$ndep_tst == "1a"} {

nap "depth = f64{50}"

nap "depth_bnds = f64{{0} {100}}"

nap "depth_bnds=transpose(depth_bnds,{1 0})"

} elseif {$ndep_tst == "1b"} {

nap "depth = f64{100}"

nap "depth_bnds = f64{{0} {200}}"

nap "depth_bnds=transpose(depth_bnds,{1 0})"

} else {

puts "Don’t know that many depths."

return

}

nap "lat = -89.5 .. 89.5 ... 1.0"

nap "lon = 0.5 .. 359.5 ... 1.0"

nap "ntim = nels(time)"

nap "ndep = nels(depth)"

nap "nlat = nels(lat)"

nap "nlon = nels(lon)"

set ntim_tcl [$ntim v]

set ndep_tcl [$ndep v]

set nlat_tcl [$nlat v]

set nlon_tcl [$nlon v]

nap "lon_bnds0 = 0.0 .. 359.0 ... 1.0"

nap "lon_bnds1 = 1.0 .. 360 ... 1.0"

nap "lat_bnds0 = -90.0 .. 89.0 ... 1.0"

nap "lat_bnds1 = -89.0 .. 90.0 ... 1.0"

Page 29: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 24

nap "lat_bnds = transpose(lat_bnds0 /// lat_bnds1,{1 0})"

nap "lon_bnds = transpose(lon_bnds0 /// lon_bnds1,{1 0})"

$time_bnds set dim time bnds

$lat_bnds set dim lat bnds

$lon_bnds set dim lon bnds

set ntimm1_tcl [expr $ntim_tcl-1]

set ndepm1_tcl [expr $ndep_tcl-1]

set nlatm1_tcl [expr $nlat_tcl-1]

set nlonm1_tcl [expr $nlon_tcl-1]

set numbers_per_line 10;set npl_tcl $numbers_per_line;set nplm1_tcl [expr $npl_tcl-1]

set characters_per_number 8;set cpn_tcl $characters_per_number;set cpnm1_tcl [expr $cpn_tcl-1]

nap "shape = (ntim//ndep//nlat//nlon)"

set ido 0

set ido 1

nap "nline=ntim*ndep*nlat*nlon/$npl_tcl"

set nline_tcl [$nline v]

if {$clobber == "yes"} {

nap "array_tmp = reshape(f32(_),shape)"

}

if {$ido == 1} {

nap "array_tmp = reshape(f32(_),shape)"

set ifh [open $idir/$ifil r]

set time_tcl 0

set depth_tcl 0

set lat_tcl 0

set lon_tcl 0

for {set l 0} {$l<$nline_tcl} {incr l} {

set line [gets $ifh]

Page 30: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 25

for {set i 0} {$i<$npl_tcl} {incr i} {

$array_tmp set value [expr [string range $line [expr $i*$cpn_tcl] [expr ($i*$cpn_tcl)+$cpnm1_tcl]]]

"$time_tcl,$depth_tcl,$lat_tcl,$lon_tcl"

set latm1_tcl [expr $lat_tcl-1]

set lonm1_tcl [expr $lon_tcl-1]

set timem1_tcl [expr $time_tcl-1]

set depthm1_tcl [expr $depth_tcl-1]

if {$depth_tcl == $ndepm1_tcl && $lat_tcl == $nlatm1_tcl && $lon_tcl == $nlonm1_tcl} {

incr time_tcl

set depth_tcl 0

set lat_tcl 0

set lon_tcl -1

} elseif {$lat_tcl == $nlatm1_tcl && $lon_tcl == $nlonm1_tcl} {

incr depth_tcl

set lat_tcl 0

set lon_tcl -1

} elseif {$lon_tcl == $nlonm1_tcl} {

incr lat_tcl

set lon_tcl -1

} elseif {$time_tcl == $ntim_tcl} {

puts "Finished."

}

##puts "[string range $line [expr $i*8] [expr ($i*8)+7]]"

incr lon_tcl

};#i

};#l

close $ifh

Page 31: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 26

};#ido

#return

nap "array=f32(array_tmp<(-99.0))"

nap "array=array*1e20"

$array set missing 1e20

nap "f32(array=array+array_tmp)"

$array set missing 1e20

$lon set unit degrees_east

$lat set unit degrees_north

$array set dim time depth lat lon

$array set coo time depth lat lon

$array netcdf $tdir/$ofil ${v}${tp}${ft}${g}

$time_bnds set missing

$time_bnds netcdf $tdir/$ofil time_bnds

$lat_bnds set missing

$lat_bnds netcdf $tdir/$ofil lat_bnds

$lon_bnds set missing

$lon_bnds netcdf $tdir/$ofil lon_bnds

nap "long_name = ’longitude’"

nap "units = ’degrees_east’"

nap "standard_name = ’longitude’"

nap "axis = ’X’"

nap "bounds = ’lon_bnds’"

$long_name netcdf $tdir/$ofil lon:long_name

$units netcdf $tdir/$ofil lon:units

$standard_name netcdf $tdir/$ofil lon:standard_name

$axis netcdf $tdir/$ofil lon:axis

$bounds netcdf $tdir/$ofil lon:bounds

nap "long_name = ’latitude’"

nap "units = ’degrees_north’"

nap "standard_name = ’latitude’"

nap "axis = ’Y’"

Page 32: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 27

nap "bounds = ’lat_bnds’"

$long_name netcdf $tdir/$ofil lat:long_name

$units netcdf $tdir/$ofil lat:units

$standard_name netcdf $tdir/$ofil lat:standard_name

$axis netcdf $tdir/$ofil lat:axis

$bounds netcdf $tdir/$ofil lat:bounds

nap "long_name = ’time’"

nap "units = ’days since 0000-01-01 00:00:00’"

nap "standard_name = ’time’"

nap "axis = ’T’"

nap "calendar = ’gregorian’"

nap "bounds = ’time_bnds’"

$long_name netcdf $tdir/$ofil time:long_name

$units netcdf $tdir/$ofil time:units

$standard_name netcdf $tdir/$ofil time:standard_name

$axis netcdf $tdir/$ofil time:axis

$calendar netcdf $tdir/$ofil time:calendar

$bounds netcdf $tdir/$ofil time:bounds

nap "long_name = ’depth’"

nap "units = ’m’"

nap "standard_name = ’depth’"

nap "axis = ’Z’"

if {$ndep_tst == "1a" || $ndep_tst == "1b"} {

$depth_bnds set dim depth bnds

nap "bounds = ’depth_bnds’"

$depth_bnds set missing

$depth_bnds netcdf $tdir/$ofil depth_bnds

$bounds netcdf $tdir/$ofil depth:bounds

}

nap "positive = ’down’"

$long_name netcdf $tdir/$ofil depth:long_name

$units netcdf $tdir/$ofil depth:units

$standard_name netcdf $tdir/$ofil depth:standard_name

$axis netcdf $tdir/$ofil depth:axis

$positive netcdf $tdir/$ofil depth:positive

Page 33: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 28

if {$v == "t"} {

nap "long_name = ’Temperature’"

nap "standard_name = ’temperature’"

nap "units = ’K’"

} elseif {$v == "s"} {

nap "long_name = ’Salinity’"

nap "standard_name = ’salinity’"

nap "units = ’1e-3’"

} elseif {$v == "o"} {

nap "long_name = ’Dissolved Oxygen’"

nap "standard_name = ’dissolved_oxygen’"

nap "units = ’ml l-1’"

} elseif {$v == "A"} {

nap "long_name = ’Apparent Oxygen Saturation’"

nap "standard_name = ’apparent_oxygen_saturation’"

nap "units = ’ml l-1’"

} elseif {$v == "O"} {

nap "long_name = ’Percentage Oxygen Saturation’"

nap "standard_name = ’percentage_oxygen_saturation’"

nap "units = ’percent’"

} elseif {$v == "p"} {

nap "long_name = ’Phosphate’"

nap "standard_name = ’phosphate’"

nap "units = ’u M’"

} elseif {$v == "n"} {

nap "long_name = ’Nitrate’"

nap "standard_name = ’nitrate’"

nap "units = ’u M’"

} elseif {$v == "i"} {

nap "long_name = ’Silicate’"

nap "standard_name = ’silicate’"

nap "units = ’u M’"

} elseif {$v == "c"} {

nap "long_name = ’Chlorophyll’"

nap "standard_name = ’chlorophyll’"

nap "units = ’mg m-3’"

} elseif {$v == "z"} {

nap "long_name = ’Zooplankton Biomass’"

nap "standard_name = ’zooplankton_biomass’"

Page 34: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 29

if {$xx == ""} {

puts "Problem, xx=$xx should not be case when v=$z."

return

} elseif {$xx == "cc"} {

nap "units = ’mg C m-3’"

} else {

nap "units = ’ml m-3’"

}

} else {

puts "Don’t know v=$v."

return

}

$long_name netcdf $tdir/$ofil ${v}${tp}${ft}${g}:long_name

$units netcdf $tdir/$ofil ${v}${tp}${ft}${g}:units

$standard_name netcdf $tdir/$ofil ${v}${tp}${ft}${g}:standard_name

nap "mv = f32(1e20)"

$mv netcdf $tdir/$ofil ${v}${tp}${ft}${g}:missing_value

nap "title = ’World Ocean Atlas 2005’"

nap "institution = ’CSIRO (CSIRO Marine and Atmospheric Research, Melbourne, Australia)’"

nap "source = ’ocean: WOA05 (1.0x1.0L33)’"

nap "project_id = ’Fourth Assessment’"

nap "experiment_id = ’climate of the 20th Century experiment (20C3M)’"

nap "contact = ’Mark Collier ([email protected]), Paul Durack ([email protected])’"

nap "realization = ’1’"

nap "Conventions = ’CF-1.0’"

nap "references = ’Model described by Gordon et al. The CSIRO Mk3 Climate System Model, 2002,

www.dar.csiro.au/publications/gordon_2002a.pdf’"

nap "history = ’Tcl version: ${::tcl_patchLevel}, NAP version: ${::nap_patchLevel}’"

nap "table_id = ’Table O1e’"

$title netcdf $tdir/$ofil :title

$institution netcdf $tdir/$ofil :institution

$source netcdf $tdir/$ofil :source

$project_id netcdf $tdir/$ofil :project_id

Page 35: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 30

$experiment_id netcdf $tdir/$ofil :experiment_id

$realization netcdf $tdir/$ofil :realization

$Conventions netcdf $tdir/$ofil :Conventions

$references netcdf $tdir/$ofil :references

$history netcdf $tdir/$ofil :history

$table_id netcdf $tdir/$ofil :table_id

puts "Copying file $tdir/$ofil to $odir/$ofil ..."

file rename -force $tdir/$ofil $odir/$ofil

if {$tp == "0112" || $tp == "1316"} {

file delete -force $idir/$ifil

}

return

exit

};#proc

Page 36: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 31

6.3 woa05msk2nc

#!/usr/bin/tclsh

#CSIRO Australia

#Mark Collier November 17 2006

#Modified November 17 2006

source ~/.tclshrc

source ~col414/tcl_fun/dmget_tcl.tcl

set tdir $::env(TMPDIR)

set idir [glob ~col414/WOA05/MASKS]

set odir [glob ~col414/ocean/data/woa05/other]

set v landsea

set v mixnumber

set v basin

if {$v == "landsea"} {

nap "long_name_v = ’Standard Depth Level’"

nap "standard_name_v = ’standard_depth_level’"

nap "units_v = ’’"

} elseif {$v == "mixnumber"} {

nap "long_name_v = ’Mixing number’"

nap "standard_name_v = ’mixing_number’"

nap "units_v = ’’"

} elseif {$v == "basin"} {

nap "long_name_v = ’Basin’"

nap "standard_name_v = ’basin’"

nap "units_v = ’’"

} else {

puts "Variable $v not known."

return

}

set ifil $v.msk

set ofil $v.nc

file delete -force $tdir/$ofil

Page 37: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 32

file delete -force $odir/$ofil

nap "time = f64{182.5}"

nap "time_bnds = f64{{0} {365}}"

nap "time_bnds=transpose(time_bnds,{1 0})"

nap "lat = -89.5 .. 89.5 ... 1.0"

nap "lon = 0.5 .. 359.5 ... 1.0"

if {$v == "landsea"} {

nap "depth = f64{0}"

} else {

nap "depth = f64{0 10 20 30 50 75 100 125 150 200 250 300 400 500 600 700 800 900 1000

1100 1200 1300 1400 1500 1750 2000 2500 3000 3500 4000 4500 5000 5500}"

}

nap "ntim = nels(time)"

nap "ndep = nels(depth)"

nap "nlat = nels(lat)"

nap "nlon = nels(lon)"

set ntim_tcl [$ntim v]

set ndep_tcl [$ndep v]

set nlat_tcl [$nlat v]

set nlon_tcl [$nlon v]

nap "lon_bnds0 = 0.0 .. 359.0 ... 1.0"

nap "lon_bnds1 = 1.0 .. 360 ... 1.0"

nap "lat_bnds0 = -90.0 .. 89.0 ... 1.0"

nap "lat_bnds1 = -89.0 .. 90.0 ... 1.0"

nap "lat_bnds = transpose(lat_bnds0 /// lat_bnds1,{1 0})"

nap "lon_bnds = transpose(lon_bnds0 /// lon_bnds1,{1 0})"

$time_bnds set dim time bnds

$lat_bnds set dim lat bnds

$lon_bnds set dim lon bnds

set ntimm1_tcl [expr $ntim_tcl-1]

Page 38: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 33

set ndepm1_tcl [expr $ndep_tcl-1]

set nlatm1_tcl [expr $nlat_tcl-1]

set nlonm1_tcl [expr $nlon_tcl-1]

set numbers_per_line 10;set npl_tcl $numbers_per_line;set nplm1_tcl [expr $npl_tcl-1]

set characters_per_number 8;set cpn_tcl $characters_per_number;set cpnm1_tcl [expr $cpn_tcl-1]

if {$v == "landsea"} {

nap "shape = (ntim//nlat//nlon)"

} else {

nap "shape = (ntim//ndep//nlat//nlon)"

}

nap "array_tmp = reshape(f32(_),shape)"

set ifh [open $idir/$ifil r]

set time_tcl 0

set depth_tcl 0

set lat_tcl 0

set lon_tcl 0

nap "nline=ntim*ndep*nlat*nlon/$npl_tcl"

set nline_tcl [$nline v]

for {set l 0} {$l<$nline_tcl} {incr l} {

set line [gets $ifh]

for {set i 0} {$i<$npl_tcl} {incr i} {

$array_tmp set value [expr [string range $line [expr $i*$cpn_tcl] [expr ($i*$cpn_tcl)+$cpnm1_tcl]]]

"$time_tcl,$depth_tcl,$lat_tcl,$lon_tcl"

set latm1_tcl [expr $lat_tcl-1]

set lonm1_tcl [expr $lon_tcl-1]

set timem1_tcl [expr $time_tcl-1]

set depthm1_tcl [expr $depth_tcl-1]

if {$depth_tcl == $ndep_tcl && $lat_tcl == $nlat_tcl && $lon_tcl == $nlon_tcl} {

incr time_tcl

set depth_tcl 0

Page 39: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 34

set lat_tcl 0

set lon_tcl -1

} elseif {$lat_tcl == $nlatm1_tcl && $lon_tcl == $nlonm1_tcl} {

incr depth_tcl

set lat_tcl 0

set lon_tcl -1

} elseif {$lon_tcl == $nlonm1_tcl} {

incr lat_tcl

set lon_tcl -1

}

incr lon_tcl

};#i

};#l

close $ifh

nap "array=f32(array_tmp<(-99.0))"

nap "array=array*1e20"

$array set missing 1e20

nap "f32(array=array+array_tmp)"

$array set missing 1e20

$lon set unit degrees_east

$lat set unit degrees_north

$array set dim time depth lat lon

$array set coo time depth lat lon

$array netcdf $tdir/$ofil $v

$time_bnds set missing

$time_bnds netcdf $tdir/$ofil time_bnds

$lat_bnds set missing

$lat_bnds netcdf $tdir/$ofil lat_bnds

$lon_bnds set missing

$lon_bnds netcdf $tdir/$ofil lon_bnds

Page 40: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 35

nap "long_name = ’longitude’"

nap "units = ’degrees_east’"

nap "standard_name = ’longitude’"

nap "axis = ’X’"

nap "bounds = ’lon_bnds’"

$long_name netcdf $tdir/$ofil lon:long_name

$units netcdf $tdir/$ofil lon:units

$standard_name netcdf $tdir/$ofil lon:standard_name

$axis netcdf $tdir/$ofil lon:axis

$bounds netcdf $tdir/$ofil lon:bounds

nap "long_name = ’latitude’"

nap "units = ’degrees_north’"

nap "standard_name = ’latitude’"

nap "axis = ’Y’"

nap "bounds = ’lat_bnds’"

$long_name netcdf $tdir/$ofil lat:long_name

$units netcdf $tdir/$ofil lat:units

$standard_name netcdf $tdir/$ofil lat:standard_name

$axis netcdf $tdir/$ofil lat:axis

$bounds netcdf $tdir/$ofil lat:bounds

nap "long_name = ’time’"

nap "units = ’days since 0000-01-01 00:00:00’"

nap "standard_name = ’time’"

nap "axis = ’T’"

nap "calendar = ’gregorian’"

nap "bounds = ’time_bnds’"

$long_name netcdf $tdir/$ofil time:long_name

$units netcdf $tdir/$ofil time:units

$standard_name netcdf $tdir/$ofil time:standard_name

$axis netcdf $tdir/$ofil time:axis

$calendar netcdf $tdir/$ofil time:calendar

$bounds netcdf $tdir/$ofil time:bounds

nap "long_name = ’depth’"

nap "units = ’m’"

nap "standard_name = ’depth’"

nap "axis = ’Z’"

nap "positive = ’down’"

Page 41: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 36

$long_name netcdf $tdir/$ofil depth:long_name

$units netcdf $tdir/$ofil depth:units

$standard_name netcdf $tdir/$ofil depth:standard_name

$axis netcdf $tdir/$ofil depth:axis

$positive netcdf $tdir/$ofil depth:positive

$long_name_v netcdf $tdir/$ofil $v:long_name

$units_v netcdf $tdir/$ofil $v:units

$standard_name_v netcdf $tdir/$ofil $v:standard_name

nap "mv = f32(1e20)"

$mv netcdf $tdir/$ofil $v:missing_value

nap "title = ’World Ocean Atlas 2005’"

nap "institution = ’CSIRO (CSIRO Marine and Atmospheric Research, Melbourne, Australia)’"

nap "source = ’ocean: WOA05 (1.0x1.0L33)’"

nap "project_id = ’Fourth Assessment’"

nap "experiment_id = ’climate of the 20th Century experiment (20C3M)’"

nap "contact = ’Mark Collier ([email protected]), Paul Durack ([email protected])’"

nap "realization = ’1’"

nap "Conventions = ’CF-1.0’"

nap "references = ’Model described by Gordon et al. The CSIRO Mk3 Climate System Model,

2002, www.dar.csiro.au/publications/gordon_2002a.pdf’"

nap "history = ’Tcl version: ${::tcl_patchLevel}, NAP version: ${::nap_patchLevel}’"

nap "table_id = ’Table O1d’"

$title netcdf $tdir/$ofil :title

$institution netcdf $tdir/$ofil :institution

$source netcdf $tdir/$ofil :source

$project_id netcdf $tdir/$ofil :project_id

$experiment_id netcdf $tdir/$ofil :experiment_id

$realization netcdf $tdir/$ofil :realization

$Conventions netcdf $tdir/$ofil :Conventions

$references netcdf $tdir/$ofil :references

$history netcdf $tdir/$ofil :history

$table_id netcdf $tdir/$ofil :table_id

puts "Copying file $tdir/$ofil to $odir/$ofil ..."

Page 42: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 37

file rename -force $tdir/$ofil $odir/$ofil

return

exit

Page 43: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 38

The Tcl-Nap code IPCC/WOA05/raw/utilities/woa05txt2nc driver.tcl generates all annual,

seasonal and monthly netCDF files in the CSIRO netcdf version of the NODC World Ocean

Atlas 2005. It loops over all combinations of variable, season and file type. It calls on the Tcl-

Nap script woa05txt2nc.tcl (procedure woa05txt2nc) to achieve this, not all combinations are

available and the procedure will report this, however, continue with the next combination. The

Tcl-Nap script woa05msk2nc.tcl generates the three time invariant files described in Section 3,

it is simply executed for each case by a simple variable identifier at the beginning of the script.

These scripts can be executed from any machine or account which includes a Tcl-Nap installation

and the raw ASCII text format files with ease.

Page 44: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 39

7 Appendix 2: Example FERRET plotting scripts

Script for figure 2:

set memory/size=50 cancel data/all cancel var/all cancel viewport

ppl dfltfnt TR

let iprint=0 let iprint=1 !generate metacode and postscript and

transfer postscript

define view/xlimits=.01,.99/ylimits=.45,.95 top define

view/xlimits=.01,.99/ylimits=.20,.70 bot

use "annual/t00an1.nc"

cancel viewport set viewport top let var1=t00an1[x=@ave,z=0:1000]

let var2=t00an1[x=@ave,z=1000:5000]

fill/axes=0,0,0,0/nolab/nokey/pal=greyscale var1

let ylo = ($ppl$yorg) let ymid = ylo + ($ppl$ylen)*8/29 let yhi =

ylo + ($ppl$ylen) let xlo = ($ppl$xorg) + ($ppl$xlen) + .2 let xhi =

xlo + .6

if ‘iprint eq 1‘ then set mode metafile:xsection.gm endif

fill/axes=1,0,1,1/set_up/nolab/nokey/lev=(0)(1)(2)(4,28,4)/pal=greyscale

var1 ppl shakey 1, 1, 0.08, 0, 4, 6, ‘xlo‘, ‘xhi‘, ‘ymid‘, ‘yhi‘

ppl fill

fill/over/axes=1,0,1,1/set_up/nolab/key/lev=(-4)(-2)(-1)(0)/pal=black/pat=3patterns

var1 ppl shakey 1, 1, 0.08, 0, 4, 6, ‘xlo‘, ‘xhi‘, ‘ylo‘, ‘ymid‘

ppl fill/over pattern solid

set viewport bot

fill/axes=0,1,1,1/nolab/nokey/lev=(0)(1)(2)(4,28,4)/pal=greyscale

var2

fill/over/axes=0,1,1,1/nolab/nokey/lev=(-4)(-2)(-1)(0)/pal=black/pat=3patterns

var2

Page 45: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 40

label -105.0,2000.0,-1.0,90,.16 "Depth (m)" label

-15.0,6000.0,-1.0,0,.16 "Latitude"

if ‘iprint eq 1‘ then cancel mode metafile sp Fprint -p portrait -l

cps -R -o xsection.ps xsection.gm endif

Page 46: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 41

Script for figure 3:

set memory/size=50 cancel data/all cancel var/all cancel viewport

ppl dfltfnt TR

let iprint=0 let iprint=1 !generate metacode and postscript and

transfer postscript

use "seasonal/c1316dd1.nc"

if ‘iprint eq 1‘ then set mode metafile:horizontal.gm endif

cancel viewport fill/nolab/nokey/pal=black/lev=(1,5,1)(200,1000,200)

c1316dd1[l=@sum] go fland

label 165.0,-105.0,-1.0,0,.16 "Longitude" label

-20.0,-20.0,-1.0,90,.16 "Latitude"

if ‘iprint eq 1‘ then cancel mode metafile sp Fprint -p portrait -l

cps -R -o horizontal.ps horizontal.gm endif

Page 47: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 42

Script for figure 4:

set memory/size=50 cancel data/all cancel var/all cancel viewport

ppl dfltfnt TR

let iprint=0 let iprint=1 !generate metacode and postscript and

transfer postscript

use "monthly/o0112an1.nc"

let var=o0112an1[y=60s:90s@ave,z=0]

fill/axes=0,0,0,0/nolab/nokey/lev=(-999)/pal=inverse_greyscale var

let ylo = ($ppl$yorg) let ymid = ylo + ($ppl$ylen)*1.2/3.4 let yhi =

ylo + ($ppl$ylen) let xlo = ($ppl$xorg) + ($ppl$xlen) + .3 let xhi =

xlo + .6

if ‘iprint eq 1‘ then set mode metafile:hovmoller.gm endif

fill/axes=1,1,1,1/set_up/nolab/nokey/lev=(7.6,9.6,.4))/pal=inverse_greyscale

var ppl shakey 1, 1, 0.08, 0, 4, 6, ‘xlo‘, ‘xhi‘, ‘ymid‘, ‘yhi‘

ppl fill

label 165.0,-900.0,-1.0,0,.16 "Longitude" label

-25.0,3790.0,-1.0,90,.16 "Month"

fill/over/axes=1,1,1,1/set_up/nolab/key/lev=(6.4,7.6,.4)/pal=black/

\ pat=3patterns var ppl shakey 1, 1, 0.08, 0, 4, 6, ‘xlo‘, ‘xhi‘,

‘ylo‘, ‘ymid‘

ppl fill/over pattern solid

if ‘iprint eq 1‘ then cancel mode metafile sp Fprint -p portrait -l

cps -R -o hovmoller.ps hovmoller.gm endif

Page 48: Explicacion Leyenda WOA

The CSIRO netCDF version of the NODC World Ocean Atlas 2005 43

CSIRO Marine and Atmospheric Research Papers

No. 001 Whetton, P.H., McInnes, K.L., Jones, R.N., Hennessy, K.J., Suppiah, R.,

Page, C.M., Bathols, J. and Durack, P.J. Australian Climate Change Projections for

Impact Assessment and Policy Application. 2005. Electronic edition only.

No. 002 Frederiksen, J.S. and Frederiksen C. Decadal Changes in Southern Hemisphere

Winter Cyclogenesis. 2006. Electronic edition only.

No. 003 Collier, M.A. The CSIRO ERA-40 2.5◦×2.5◦ archive. 2005. Electronic edition only.

No. 005 Fandry, C.B, Slawinski, D. and Penter, L.F. Two-rocks moorings data report.

2006. Electronic edition only.

No. 006 Pendrey, R.C. Central heating for marine aquarium tanks. 2006. Electronic edition

only.

No. 007 Young, S.A. The Cape Grim MiniLidar data set 1998-2000 data coverage, file format

and reading software. 2006. Electronic edition only.

No. 008 Collier, M.A., Dix, M.R., Hirst, A.C., Davies, H.L., Elliott, T.I., Gordon,

H.B., Morgan, P.J.L., O’Farrell, S.P., and Watterson, I.G. IPCC Standard Output from

the CSIRO Mk3.0 Climate System Model. 2006. In press.

No. 009 Yearsley, G.K., Last, P.R., and Hoese, D.F., Editors. Standard names of

Australian fishes. 2006. Electronic edition only.

No. 010 Okey, T.A., Editor. A trophodynamic Ecopath model of Albatross Bay, Gulf of

Carpentaria: a plausible fishing explanation for prawn catch declines. 2006. Electronic edition

only.

No. 011 Green, D.L. How Might Climate Change Affect Island Culture in the in the Torres

Strait? 2006. Electronic edition only.

No. 012 Green, D.L. Climate Change and Health: Impacts on Remote Indigenous Communities

in Northern Australia. 2006. Electronic edition only.