[cmor] 01/04: release 3.2.4
Alastair McKinstry
mckinstry at moszumanska.debian.org
Sat Jul 29 10:18:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository cmor.
commit 7721a3a1bf956734b04be6b82a0e31e90c933171
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Tue Jul 4 12:49:33 2017 +0100
release 3.2.4
---
INSTALL | 4 +-
Lib/__init__.py | 4 +-
Lib/cmor_const.py | 6 +-
Lib/convertCSVFile.py | 29 +-
Lib/git2svn.py | 31 +-
Lib/pywrapper.py | 728 ++--
LibCV/PrePARE/PrePARE.py | 131 +-
LibCV/__init__.py | 1 -
LibCV/pywrapper.py | 77 +-
Makefile.in | 7 +-
README.md | 5 +-
RELEASE-NOTES | 2 +
Src/_cmormodule.c | 1005 +++---
Src/cmor.c | 5316 ++++++++++++++--------------
Src/cmor_CV.c | 1607 +++++----
Src/cmor_axes.c | 2777 +++++++--------
Src/cmor_cfortran_interface.c | 801 +++--
Src/cmor_grids.c | 1330 +++----
Src/cmor_md5.c | 374 +-
Src/cmor_tables.c | 852 +++--
Src/cmor_variables.c | 4579 ++++++++++++------------
Test/check_results.py | 2 +-
Test/cmor_speed_and_compression.py | 2 +-
Test/cmor_speed_and_compression_01.py | 3 +-
Test/cmor_speed_and_compression_02.py | 131 +-
Test/common_user_input.json | 2 +-
Test/speed_test_table_A | 92 +-
Test/test_python_CMIP6_CV_forcenoparent.py | 4 +-
Test/test_python_filename_time_range.py | 543 +++
Test/test_python_forecast_time.py | 102 +
Test/test_python_joerg_4.py | 4 +-
Test/test_python_user_interface_03.py | 2 +-
Test/test_sophie.f90 | 11 +-
TestTables/CMIP6_3hr.json | 70 +-
TestTables/CMIP6_6hrLev.json | 25 +-
TestTables/CMIP6_6hrPlev.json | 116 +-
TestTables/CMIP6_6hrPlevPt.json | 210 +-
TestTables/CMIP6_AERday.json | 22 +-
TestTables/CMIP6_AERfx.json | 3 +-
TestTables/CMIP6_AERhr.json | 24 +-
TestTables/CMIP6_AERmon.json | 337 +-
TestTables/CMIP6_AERmonZ.json | 24 +-
TestTables/CMIP6_Amon.json | 230 +-
TestTables/CMIP6_Amon_json_hfls | 400 +++
TestTables/CMIP6_CF3hr.json | 116 +-
TestTables/CMIP6_CFday.json | 115 +-
TestTables/CMIP6_CFmon.json | 185 +-
TestTables/CMIP6_CFsubhr.json | 214 +-
TestTables/CMIP6_CFsubhrOff.json | 14 +-
TestTables/CMIP6_CV.json | 500 ++-
TestTables/CMIP6_E1hr.json | 69 +-
TestTables/CMIP6_E1hrClimMon.json | 10 +-
TestTables/CMIP6_E3hr.json | 70 +-
TestTables/CMIP6_E3hrPt.json | 359 +-
TestTables/CMIP6_E6hrZ.json | 29 +-
TestTables/CMIP6_Eday.json | 502 ++-
TestTables/CMIP6_EdayZ.json | 36 +-
TestTables/CMIP6_Efx.json | 83 +-
TestTables/CMIP6_Emon.json | 1531 ++++----
TestTables/CMIP6_EmonZ.json | 74 +-
TestTables/CMIP6_Esubhr.json | 125 +-
TestTables/CMIP6_Eyr.json | 101 +-
TestTables/CMIP6_IfxAnt.json | 19 +-
TestTables/CMIP6_IfxGre.json | 19 +-
TestTables/CMIP6_ImonAnt.json | 55 +-
TestTables/CMIP6_ImonGre.json | 55 +-
TestTables/CMIP6_IyrAnt.json | 56 +-
TestTables/CMIP6_IyrGre.json | 56 +-
TestTables/CMIP6_LImon.json | 72 +-
TestTables/CMIP6_Lmon.json | 105 +-
TestTables/CMIP6_Oclim.json | 127 +-
TestTables/CMIP6_Oday.json | 34 +-
TestTables/CMIP6_Odec.json | 69 +-
TestTables/CMIP6_Ofx.json | 38 +-
TestTables/CMIP6_Omon.json | 1033 ++++--
TestTables/CMIP6_Omonbad.json | 1 +
TestTables/CMIP6_Oyr.json | 566 +--
TestTables/CMIP6_SIday.json | 56 +-
TestTables/CMIP6_SImon.json | 231 +-
TestTables/CMIP6_cf3hr_0.json | 5 +
TestTables/CMIP6_cf3hr_1.json | 6 +-
TestTables/CMIP6_cf3hr_2.json | 7 +
TestTables/CMIP6_chunking.json | 2 +-
TestTables/CMIP6_coordinate.json | 808 +++--
TestTables/CMIP6_day.json | 136 +-
TestTables/CMIP6_fx.json | 35 +-
TestTables/CMIP6_grids.json | 14 +-
TestTables/python_test_table_A | 3 +-
configure | 20 +-
configure.ac | 4 +-
include/cmor.h | 11 +-
include/cmor_func_def.h | 2 +
scripts/createCMIP6CV.py | 1 -
93 files changed, 16693 insertions(+), 13111 deletions(-)
diff --git a/INSTALL b/INSTALL
index 8442240..6f107cf 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,6 +1,6 @@
INSTALLATION INSTRUCTIONS
-------------------------
-Climate Model Output Rewriter (CMOR) version 3.2.3 installation instructions.
+Climate Model Output Rewriter (CMOR) version 3.2.4 installation instructions.
DOWNLOAD
@@ -13,7 +13,7 @@ cd CMOR
INSTALLATION
------------
-CMOR 3.2.3 requires external packages that need to be installed first.
+CMOR 3.2.4 requires external packages that need to be installed first.
It can be compiled/linked against either NetCDF3 or NetCDF4. If you
decide to go with NetCDF4 be sure to build NetCDF4 with the
--enable-netcdf-4 option!
diff --git a/Lib/__init__.py b/Lib/__init__.py
index 1eb3f8d..2364701 100644
--- a/Lib/__init__.py
+++ b/Lib/__init__.py
@@ -1,6 +1,6 @@
import os
import sys
-xml_pth = os.path.join(sys.prefix,"share","udunits","udunits2.xml")
+xml_pth = os.path.join(sys.prefix, "share", "udunits", "udunits2.xml")
if os.path.exists(xml_pth):
os.environ["UDUNITS2_XML_PATH"] = xml_pth
@@ -9,7 +9,7 @@ from cmor_const import *
from pywrapper import (
CMORError, axis, variable, write, setup, load_table, set_table, zfactor,
close, grid, set_grid_mapping, time_varying_grid_coordinate, dataset_json,
- set_cur_dataset_attribute, get_cur_dataset_attribute,
+ set_cur_dataset_attribute, get_cur_dataset_attribute,
has_cur_dataset_attribute, set_variable_attribute, get_variable_attribute,
has_variable_attribute, get_final_filename, set_deflate)
diff --git a/Lib/cmor_const.py b/Lib/cmor_const.py
index 1b15cb5..906f7f7 100644
--- a/Lib/cmor_const.py
+++ b/Lib/cmor_const.py
@@ -35,7 +35,5 @@ CMOR_REPLACE_4
"""
for att in atts.split():
- attnm=att
- exec("%s = _cmor.getCMOR_defaults_include('%s')" % (att,att))
-
-
+ attnm = att
+ exec("%s = _cmor.getCMOR_defaults_include('%s')" % (att, att))
diff --git a/Lib/convertCSVFile.py b/Lib/convertCSVFile.py
index 36a83ac..d14bb17 100644
--- a/Lib/convertCSVFile.py
+++ b/Lib/convertCSVFile.py
@@ -4,6 +4,8 @@ import pdb
# ==============================================================
# replaceString()
# ==============================================================
+
+
def replaceString(var_entry, var, field):
"""
Replace a <field> with a string (deleting "<" and ">")
@@ -15,6 +17,8 @@ def replaceString(var_entry, var, field):
# ==============================================================
# deleteLIne()
# ==============================================================
+
+
def deleteLine(var_entry, field):
"""
delete line with <field> in it
@@ -25,16 +29,17 @@ def deleteLine(var_entry, field):
# ==============================================================
# deleteComa()
# ==============================================================
+
+
def deleteComa(var_entry):
"""
delete last ',' char before '}'
"""
- var_entry = re.sub(r',(\s*)}', r'\n\1}',var_entry)
+ var_entry = re.sub(r',(\s*)}', r'\n\1}', var_entry)
return var_entry
-
-expt_template ="""
+expt_template = """
"<experiment_id>": {
"experiment": "<title>",
"sub_experiment_id": "<sub_experiment_id>",
@@ -54,16 +59,18 @@ with open('../Tables/CMIP6_expt_list_062116.csv', 'rU') as csvfile:
spamreader = csv.reader(csvfile, dialect=csv.excel)
for row in spamreader:
if row[1] == 'original label':
- break
+ break
expt = ""
- for row in spamreader:
-## if (row[5] == "") & (row[22] != ""):
-## print i
- if (row[9] != "" ):
+ for row in spamreader:
+ # if (row[5] == "") & (row[22] != ""):
+ # print i
+ if (row[9] != ""):
expt = expt + expt_template
expt = replaceString(expt, row[9], "experiment_id")
expt = replaceString(expt, row[17].replace('"', '\''), "title")
- expt = replaceString(expt, row[18].replace('"', '\''), "sub_experiment_id")
+ expt = replaceString(
+ expt, row[18].replace(
+ '"', '\''), "sub_experiment_id")
expt = replaceString(expt, row[2], "mip")
expt = replaceString(expt, row[14], "required_source_type")
expt = replaceString(expt, row[15], "add_source_type")
@@ -77,10 +84,10 @@ with open('../Tables/CMIP6_expt_list_062116.csv', 'rU') as csvfile:
expt = deleteLine(expt, "parent_sub_experiment_id")
expt = deleteLine(expt, "parent_activity_id")
expt = deleteLine(expt, "parent_mip_era")
- expt = deleteComa(expt )
+ expt = deleteComa(expt)
#nexpt = expt + "\"Dummy\":{}\n }"
expt = expt + "\n }\n}"
-expt = deleteComa(expt )
+expt = deleteComa(expt)
print expt
diff --git a/Lib/git2svn.py b/Lib/git2svn.py
index 0a80afa..1326c8f 100644
--- a/Lib/git2svn.py
+++ b/Lib/git2svn.py
@@ -1,31 +1,32 @@
-import os,sys
+import os
+import sys
-svn=sys.argv[1]
+svn = sys.argv[1]
git = os.popen("git status").readlines()
-modfiles =[]
-delfiles=[]
-newfiles=[]
+modfiles = []
+delfiles = []
+newfiles = []
for l in git:
- if l.find("new file:")>-1:
+ if l.find("new file:") > -1:
newfiles.append(l.split()[3])
- if l.find("modified:")>-1:
+ if l.find("modified:") > -1:
modfiles.append(l.split()[2])
- if l.find("deleted:")>-1:
+ if l.find("deleted:") > -1:
delfiles.append(l.split()[2])
-for f in modfiles+newfiles:
- cmd = "cp -pf %s %s/%s" % (f,svn,f)
- print 'Cp:',cmd
+for f in modfiles + newfiles:
+ cmd = "cp -pf %s %s/%s" % (f, svn, f)
+ print 'Cp:', cmd
os.popen(cmd).readlines()
for f in newfiles:
- cmd = "cd %s ; svn add %s" % (svn,f)
- print 'svn add :',cmd
+ cmd = "cd %s ; svn add %s" % (svn, f)
+ print 'svn add :', cmd
os.popen(cmd).readlines()
for f in delfiles:
- cmd = "cd %s ; svn delete --force %s" % (svn,f)
- print 'svn del :',cmd
+ cmd = "cd %s ; svn delete --force %s" % (svn, f)
+ print 'svn del :', cmd
os.popen(cmd).readlines()
diff --git a/Lib/pywrapper.py b/Lib/pywrapper.py
index b01da29..83e7520 100644
--- a/Lib/pywrapper.py
+++ b/Lib/pywrapper.py
@@ -8,31 +8,34 @@ from _cmor import CMORError
try:
import cdtime
has_cdtime = True
-except:
+except BaseException:
has_cdtime = False
try:
import cdms2
has_cdms2 = True
-except:
+except BaseException:
has_cdms2 = False
try:
import MV2
has_MV2 = True
-except:
+except BaseException:
has_MV2 = False
try:
import numpy.oldnumeric.ma.MaskedArray
has_oldma = True
-except:
+except BaseException:
has_oldma = False
-def time_varying_grid_coordinate(grid_id, table_entry,units,type='f',missing_value=None):
+
+def time_varying_grid_coordinate(
+ grid_id, table_entry, units, type='f', missing_value=None):
""" Create a cmor variable for grid coordinates in case of time varying grids
Usage:
- coord_grid_id = grid_time_varying_coordinate(grid_id, table_entry,units,type='f',missing_value=None)
+ coord_grid_id = grid_time_varying_coordinate(
+ grid_id, table_entry,units,type='f',missing_value=None)
Where:
grid_id : The grid_id return by a call to cmor.grid
table_entry: The name of the variable in the CMOR table
@@ -46,29 +49,35 @@ def time_varying_grid_coordinate(grid_id, table_entry,units,type='f',missing_val
omitted or assigned the value 'none' (i.e., missing_value='none').
"""
if not isinstance(table_entry, str):
- raise Exception, "Error you must pass a string for the variable table_entry"
+ raise Exception(
+ "Error you must pass a string for the variable table_entry")
if not isinstance(units, str):
- raise Exception, "Error you must pass a string for the variable units"
+ raise Exception("Error you must pass a string for the variable units")
if not isinstance(type, str):
- raise Exception, "error tpye must a a string"
+ raise Exception("error tpye must a a string")
type = type.lower()
if type == 's':
type = 'c'
if type not in ["c", "d", "f", "l", "i"]:
- raise Exception, 'error unknown type: "%s", must be one of: "c","d","f","l","i"'
+ raise Exception(
+ 'error unknown type: "%s", must be one of: "c","d","f","l","i"')
if not isinstance(grid_id, (int, numpy.int, numpy.int32)):
- raise Exception, "error grid_id must be an integer"
-
+ raise Exception("error grid_id must be an integer")
+
grid_id = int(grid_id)
if missing_value is not None:
- if not isinstance(missing_value, (float, int, numpy.float, numpy.float32, numpy.int, numpy.int32)):
- raise Exception, "error missing_value must be a number, you passed: %s" % type(missing_value)
+ if not isinstance(missing_value, (float, int, numpy.float,
+ numpy.float32, numpy.int, numpy.int32)):
+ raise Exception(
+ "error missing_value must be a number, you passed: %s" %
+ type(missing_value))
missing_value = float(missing_value)
- return _cmor.time_varying_grid_coordinate(grid_id, table_entry, units, type, missing_value)
+ return _cmor.time_varying_grid_coordinate(
+ grid_id, table_entry, units, type, missing_value)
def _to_numpy(vals, message):
@@ -77,15 +86,24 @@ def _to_numpy(vals, message):
elif not isinstance(vals, numpy.ndarray):
try:
vals = numpy.ascontiguousarray(vals.filled())
- except:
- raise Exception, "Error could not convert %s to a numpy array" % message
+ except BaseException:
+ raise Exception(
+ "Error could not convert %s to a numpy array" %
+ message)
return vals
-def grid(axis_ids,latitude=None,longitude=None,latitude_vertices=None,longitude_vertices=None,nvertices=None):
+
+def grid(axis_ids, latitude=None, longitude=None,
+ latitude_vertices=None, longitude_vertices=None, nvertices=None):
""" Creates a cmor grid
Usage:
- grid_id = grid(axis_ids,latitude,longitude,latitude_vertices=None,longitude_vertices=None)
+ grid_id = grid(
+ axis_ids,
+ latitude,
+ longitude,
+ latitude_vertices=None,
+ longitude_vertices=None)
Where:
axis_ids : array contianing the axes ids for this grid.
latitude/longitude: the values for longitude/latitude arrays (unless it is a time varying grid)
@@ -99,88 +117,104 @@ def grid(axis_ids,latitude=None,longitude=None,latitude_vertices=None,longitude_
axis_ids = numpy.ascontiguousarray(axis_ids.filled())
elif has_cdms2 and cdms2.isVariable(axis_ids):
axis_ids = numpy.ascontiguousarray(axis_ids.filled())
- elif isinstance(axis_ids,(list,tuple)):
+ elif isinstance(axis_ids, (list, tuple)):
axis_ids = numpy.ascontiguousarray(axis_ids)
elif not isinstance(axis_ids, numpy.ndarray):
- raise Exception, "Error could not convert axis_ids list to a numpy array"
+ raise Exception(
+ "Error could not convert axis_ids list to a numpy array")
- if numpy.ndim(axis_ids)>1:
- raise Exception, "error axes list/array must be 1D"
+ if numpy.ndim(axis_ids) > 1:
+ raise Exception("error axes list/array must be 1D")
if latitude is not None:
latitude = _to_numpy(latitude, 'latitude')
- if numpy.ndim(latitude)!=len(axis_ids):
- raise Exception, "latitude's rank does not match number of axes passed via axis_ids"
+ if numpy.ndim(latitude) != len(axis_ids):
+ raise Exception(
+ "latitude's rank does not match number of axes passed via axis_ids")
type = latitude.dtype.char
nvert = 0
- if not type in ['d','f','i','l']:
- raise Exception, "latitude array must be of type 'd','f','l' or 'i'"
+ if not type in ['d', 'f', 'i', 'l']:
+ raise Exception(
+ "latitude array must be of type 'd','f','l' or 'i'")
longitude = _to_numpy(longitude, 'longitude')
- if numpy.ndim(longitude)!=len(axis_ids):
- raise Exception, "longitude's rank does not match number of axes passed via axis_ids"
+ if numpy.ndim(longitude) != len(axis_ids):
+ raise Exception(
+ "longitude's rank does not match number of axes passed via axis_ids")
- ## print 'longitude type:',longitude.dtype.char
- if longitude.dtype.char!=type:
+ # print 'longitude type:',longitude.dtype.char
+ if longitude.dtype.char != type:
longitude = longitude.astype(type)
elif longitude is not None:
- raise Exception, "latitude and longitude must be BOTH an array or None"
+ raise Exception("latitude and longitude must be BOTH an array or None")
else:
- type='f'
- if nvertices is None :
- nvert=0
+ type = 'f'
+ if nvertices is None:
+ nvert = 0
else:
nvert = nvertices
if latitude_vertices is not None:
latitude_vertices = _to_numpy(latitude_vertices, 'latitude_vertices')
- if numpy.ndim(latitude_vertices)!=len(axis_ids)+1:
- raise Exception, "latitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)"
-## print 'latitude_vert type:',latitude_vertices.dtype.char
- if latitude_vertices.dtype.char!=type:
+ if numpy.ndim(latitude_vertices) != len(axis_ids) + 1:
+ raise Exception(
+ "latitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)")
+# print 'latitude_vert type:',latitude_vertices.dtype.char
+ if latitude_vertices.dtype.char != type:
latitude_vertices = latitude_vertices.astype(type)
nvert = latitude_vertices.shape[-1]
if nvertices is not None:
- if nvert!=nvertices:
- raise Exception,"you passed nvertices as: %i, but from your latitude_vertices it seems to be: %i" % (nvertices,nvert)
+ if nvert != nvertices:
+ raise Exception(
+ "you passed nvertices as: %i, but from your latitude_vertices it seems to be: %i" %
+ (nvertices, nvert))
if longitude_vertices is not None:
- longitude_vertices = _to_numpy(longitude_vertices, 'longitude_vertices')
- if numpy.ndim(longitude_vertices)!=len(axis_ids)+1:
- raise Exception, "longitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)"
-## print 'longitude_vert type:',longitude_vertices.dtype.char
- if longitude_vertices.dtype.char!=type:
+ longitude_vertices = _to_numpy(
+ longitude_vertices, 'longitude_vertices')
+ if numpy.ndim(longitude_vertices) != len(axis_ids) + 1:
+ raise Exception(
+ "longitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)")
+# print 'longitude_vert type:',longitude_vertices.dtype.char
+ if longitude_vertices.dtype.char != type:
longitude_vertices = longitude_vertices.astype(type)
nvert2 = longitude_vertices.shape[-1]
if latitude_vertices is None:
nvert = nvert2
- elif nvert!=nvert2:
- raise Exception, "error in shape longitude_vertices and latitude_vertices seem to have different # of vertices: %i vs %i, %s" % (nvert,nvert2, str(longitude_vertices.shape ))
+ elif nvert != nvert2:
+ raise Exception(
+ "error in shape longitude_vertices and latitude_vertices seem to have different # of vertices: %i vs %i, %s" %
+ (nvert, nvert2, str(
+ longitude_vertices.shape)))
if nvertices is not None:
- if nvert!=nvertices:
- raise Exception,"you passed nvertices as: %i, but from your longitude_vertices it seems to be: %i" % (nvertices,nvert)
+ if nvert != nvertices:
+ raise Exception(
+ "you passed nvertices as: %i, but from your longitude_vertices it seems to be: %i" %
+ (nvertices, nvert))
-## if area is not None:
-## if not isinstance(area,numpy.ndarray):
-## try:
+# if area is not None:
+# if not isinstance(area,numpy.ndarray):
+# try:
## area = numpy.ascontiguousarray(area.filled())
-## except:
+# except:
## raise Exception, "Error could not convert area to a numpy array"
-## if numpy.rank(area)!=len(axis_ids):
+# if numpy.rank(area)!=len(axis_ids):
## raise Exception, "area's rank does not match number of axes passed via axis_ids"
-## if area.dtype.char!=type:
+# if area.dtype.char!=type:
## area = area.astype(type)
n = len(axis_ids)
- axis_ids=axis_ids.astype('i');
- return _cmor.grid(n,axis_ids,type,latitude,longitude,nvert,latitude_vertices,longitude_vertices)
+ axis_ids = axis_ids.astype('i')
+ return _cmor.grid(n, axis_ids, type, latitude, longitude,
+ nvert, latitude_vertices, longitude_vertices)
-def set_grid_mapping(grid_id,mapping_name,parameter_names,parameter_values=None,parameter_units=None):
+def set_grid_mapping(grid_id, mapping_name, parameter_names,
+ parameter_values=None, parameter_units=None):
"""Sets the grid mapping for CF convention
Usage:
set_grid_mapping(grid_id,mapping_name,parameter_names,parameter_values,parameter_units)
@@ -191,71 +225,89 @@ def set_grid_mapping(grid_id,mapping_name,parameter_names,parameter_values=None,
parameter_values :: array/list of parameter values in the same order of parameter_names (ignored if parameter_names is ditcionary)
parameter_units :: array/list of parameter units in the same order of parameter_names (ignored if parameter_names is ditcionary)
"""
- if not isinstance(grid_id,(numpy.int32,int,long)):
- raise Exception, "grid_id must be an integer: %s"%type(grid_id)
- if not isinstance(mapping_name,str):
- raise Exception, "mapping name must be a string"
+ if not isinstance(grid_id, (numpy.int32, int, long)):
+ raise Exception("grid_id must be an integer: %s" % type(grid_id))
+ if not isinstance(mapping_name, str):
+ raise Exception("mapping name must be a string")
- if isinstance(parameter_names,dict):
+ if isinstance(parameter_names, dict):
pnms = []
pvals = []
punit = []
for k in parameter_names.keys():
pnms.append(k)
val = parameter_names[k]
- if isinstance(val,dict):
+ if isinstance(val, dict):
ks = val.keys()
if not 'value' in ks or not 'units' in ks:
- raise Exception, "error parameter_names key '%s' dictionary does not contain both 'units' and 'value' keys" % k
+ raise Exception(
+ "error parameter_names key '%s' dictionary does not contain both 'units' and 'value' keys" %
+ k)
pvals.append(val['value'])
punit.append(val['units'])
- elif isinstance(val,(list,tuple)):
- if len(val)>2:
- raise Exception, "parameter_names '%s' as more than 2 values" % k
+ elif isinstance(val, (list, tuple)):
+ if len(val) > 2:
+ raise Exception(
+ "parameter_names '%s' as more than 2 values" %
+ k)
for v in val:
- if isinstance(v,str):
+ if isinstance(v, str):
punit.append(v)
try:
pvals.append(float(v))
- except:
+ except BaseException:
pass
- if len(pvals)!=len(punit) or len(pvals)!=len(pnms):
- raise Exception, "could not figure out values for parameter_name: '%s' " % k
+ if len(pvals) != len(punit) or len(pvals) != len(pnms):
+ raise Exception(
+ "could not figure out values for parameter_name: '%s' " %
+ k)
else:
- raise Exception, "could not figure out values for parameter_name: '%s' " % k
- elif isinstance(parameter_names,(list,tuple)):
+ raise Exception(
+ "could not figure out values for parameter_name: '%s' " %
+ k)
+ elif isinstance(parameter_names, (list, tuple)):
pnms = list(parameter_names)
# now do code for parameter_units
if parameter_values is None:
- raise Exception, "you must pass a list or array for parameter_values"
+ raise Exception(
+ "you must pass a list or array for parameter_values")
if parameter_units is None:
- raise Exception, "you must pass a list for parameter_units"
- if not isinstance(parameter_units,(list,tuple)):
- raise Exception, "you must pass a list for parameter_units"
- if len(parameter_units)!=len(pnms):
- raise Exception, "length of parameter_units list does not match length of parameter_names"
+ raise Exception("you must pass a list for parameter_units")
+ if not isinstance(parameter_units, (list, tuple)):
+ raise Exception("you must pass a list for parameter_units")
+ if len(parameter_units) != len(pnms):
+ raise Exception(
+ "length of parameter_units list does not match length of parameter_names")
punit = list(parameter_units)
- if isinstance(parameter_values,(list,tuple)):
+ if isinstance(parameter_values, (list, tuple)):
pvals = list(parameter_values)
else:
try:
pvals = numpy.ascontiguousarray(parameter_values.filled())
- except:
- raise Exception, "Error could not convert parameter_values to a numpy array"
+ except BaseException:
+ raise Exception(
+ "Error could not convert parameter_values to a numpy array")
if len(pvals) != len(parameter_names):
- raise Exception, "length of parameter_values list does not match length of parameter_names"
+ raise Exception(
+ "length of parameter_values list does not match length of parameter_names")
else:
- raise Exception, "parameter_names must be either dictionary or list"
+ raise Exception("parameter_names must be either dictionary or list")
pvals = numpy.ascontiguousarray(pvals).astype('d')
- return _cmor.set_grid_mapping(grid_id,mapping_name,pnms,pvals,punit)
-
+ return _cmor.set_grid_mapping(grid_id, mapping_name, pnms, pvals, punit)
-def axis(table_entry,units=None,length=None,coord_vals=None,cell_bounds=None,interval=None):
+def axis(table_entry, units=None, length=None,
+ coord_vals=None, cell_bounds=None, interval=None):
""" Creates an cmor_axis
Usage:
- axis_id = axis(table_entry,units=None,length=None,coord_vals=None,cell_bounds=None,interval=None)
+ axis_id = axis(
+ table_entry,
+ units=None,
+ length=None,
+ coord_vals=None,
+ cell_bounds=None,
+ interval=None)
Where:
table_entry: table_entry in the cmor table
units: the axis units
@@ -264,30 +316,31 @@ def axis(table_entry,units=None,length=None,coord_vals=None,cell_bounds=None,int
cell_bounds: numpy or MV2 array, if coord_vals is a cdms2 axis then will try to obtain bounds from it
interval: a string used for time axes only (???)
"""
- if not isinstance(table_entry,str):
- raise Exception, "You need to pass a table_entry to match in the cmor table"
+ if not isinstance(table_entry, str):
+ raise Exception(
+ "You need to pass a table_entry to match in the cmor table")
if coord_vals is None:
if cell_bounds is not None:
- raise Exception, "you passed cell_bounds but no coords"
+ raise Exception("you passed cell_bounds but no coords")
else:
- if has_cdms2 and isinstance(coord_vals,cdms2.axis.TransientAxis):
+ if has_cdms2 and isinstance(coord_vals, cdms2.axis.TransientAxis):
if units is None:
- if hasattr(coord_vals,"units"):
+ if hasattr(coord_vals, "units"):
units = coord_vals.units
if cell_bounds is None:
cell_bounds = coord_vals.getBounds()
- if interval is None and hasattr(coord_vals,"interval"):
+ if interval is None and hasattr(coord_vals, "interval"):
interval = coord_vals.interval
coord_vals = numpy.ascontiguousarray(coord_vals[:])
- elif isinstance(coord_vals,(list,tuple)):
+ elif isinstance(coord_vals, (list, tuple)):
coord_vals = numpy.ascontiguousarray(coord_vals)
elif has_cdms2 and cdms2.isVariable(coord_vals):
if units is None:
- if hasattr(coord_vals,"units"):
+ if hasattr(coord_vals, "units"):
units = coord_vals.units
- if interval is None and hasattr(coord_vals,"interval"):
+ if interval is None and hasattr(coord_vals, "interval"):
interval = coord_vals.interval
coord_vals = numpy.ascontiguousarray(coord_vals.filled())
elif has_oldma and numpy.oldnumeric.ma.isMA(coord_vals):
@@ -295,11 +348,12 @@ def axis(table_entry,units=None,length=None,coord_vals=None,cell_bounds=None,int
elif numpy.ma.isMA(coord_vals):
coord_vals = numpy.ascontiguousarray(coord_vals.filled())
- if not isinstance(coord_vals,numpy.ndarray):
- raise Exception, "Error coord_vals must be an array or cdms2 axis or list/tuple"
+ if not isinstance(coord_vals, numpy.ndarray):
+ raise Exception(
+ "Error coord_vals must be an array or cdms2 axis or list/tuple")
- if numpy.ndim(coord_vals)>1:
- raise Exception, "Error, you must pass a 1D array!"
+ if numpy.ndim(coord_vals) > 1:
+ raise Exception("Error, you must pass a 1D array!")
if numpy.ma.isMA(cell_bounds):
cell_bounds = numpy.ascontiguousarray(cell_bounds.filled())
@@ -309,23 +363,27 @@ def axis(table_entry,units=None,length=None,coord_vals=None,cell_bounds=None,int
cell_bounds = numpy.ascontiguousarray(cell_bounds.filled())
elif has_cdms2 and cdms2.isVariable(cell_bounds):
cell_bounds = numpy.ascontiguousarray(cell_bounds.filled())
- elif isinstance(cell_bounds,(list,tuple)):
+ elif isinstance(cell_bounds, (list, tuple)):
cell_bounds = numpy.ascontiguousarray(cell_bounds)
if cell_bounds is not None:
- if numpy.ndim(cell_bounds)>2:
- raise Exception, "Error cell_bounds rank must be at most 2"
- if numpy.ndim(cell_bounds)==2:
- if cell_bounds.shape[0]!=coord_vals.shape[0]:
- raise Exception, "Error, coord_vals and cell_bounds do not have the same length"
- if cell_bounds.shape[1]!=2:
- raise Exception, "Error, cell_bounds' second dimension must be of length 2"
+ if numpy.ndim(cell_bounds) > 2:
+ raise Exception("Error cell_bounds rank must be at most 2")
+ if numpy.ndim(cell_bounds) == 2:
+ if cell_bounds.shape[0] != coord_vals.shape[0]:
+ raise Exception(
+ "Error, coord_vals and cell_bounds do not have the same length")
+ if cell_bounds.shape[1] != 2:
+ raise Exception(
+ "Error, cell_bounds' second dimension must be of length 2")
cbnds = 2
cell_bounds = numpy.ascontiguousarray(numpy.ravel(cell_bounds))
else:
cbnds = 1
- if len(cell_bounds)!=len(coord_vals)+1:
- raise Exception, "error cell_bounds are %i long and axes coord_vals are %i long this is not consistent" % (len(cell_bounds),len(coord_vals))
+ if len(cell_bounds) != len(coord_vals) + 1:
+ raise Exception(
+ "error cell_bounds are %i long and axes coord_vals are %i long this is not consistent" %
+ (len(cell_bounds), len(coord_vals)))
else:
cbnds = 0
@@ -333,28 +391,29 @@ def axis(table_entry,units=None,length=None,coord_vals=None,cell_bounds=None,int
l = len(coord_vals)
type = coord_vals.dtype.char[0]
- if not type in ['i','l','f','d','S']:
- raise Exception, "error allowed data type are: i,l,f,d or S"
+ if not type in ['i', 'l', 'f', 'd', 'S']:
+ raise Exception("error allowed data type are: i,l,f,d or S")
if type == 'S':
type = 'c'
cbnds = 0
for s in coord_vals:
- #print 'testing:',s,len(s)
- if len(s)>cbnds:
+ # print 'testing:',s,len(s)
+ if len(s) > cbnds:
cbnds = len(s)
- #cbnds+=1
+ # cbnds+=1
else:
l = 0
type = 'd'
if cell_bounds is not None:
- if type !=cell_bounds.dtype.char:
+ if type != cell_bounds.dtype.char:
cell_bounds = cell_bounds.astype(type)
if units is None:
if coord_vals is not None:
- raise Exception, "Error you need to provide the units your coord_vals are in"
+ raise Exception(
+ "Error you need to provide the units your coord_vals are in")
else:
units = "1"
@@ -364,31 +423,38 @@ def axis(table_entry,units=None,length=None,coord_vals=None,cell_bounds=None,int
if length is not None:
l = int(length)
- return _cmor.axis(table_entry,units,l,coord_vals,type,cell_bounds,cbnds,interval)
+ return _cmor.axis(table_entry, units, l, coord_vals,
+ type, cell_bounds, cbnds, interval)
-def variable(table_entry,units,axis_ids,type='f',missing_value=None,tolerance = 1.e-4,positive=None,original_name=None,history=None,comment=None):
- if not isinstance(table_entry,str):
- raise Exception, "Error you must pass a string for the variable table_entry"
+def variable(table_entry, units, axis_ids, type='f', missing_value=None,
+ tolerance=1.e-4, positive=None, original_name=None, history=None, comment=None):
- if not isinstance(units,str):
- raise Exception, "Error you must pass a string for the variable units"
+ if not isinstance(table_entry, str):
+ raise Exception(
+ "Error you must pass a string for the variable table_entry")
+
+ if not isinstance(units, str):
+ raise Exception("Error you must pass a string for the variable units")
if original_name is not None:
- if not isinstance(original_name,str):
- raise Exception, "Error you must pass a string for the variable original_name"
+ if not isinstance(original_name, str):
+ raise Exception(
+ "Error you must pass a string for the variable original_name")
else:
original_name = ""
if history is not None:
- if not isinstance(history,str):
- raise Exception, "Error you must pass a string for the variable history"
+ if not isinstance(history, str):
+ raise Exception(
+ "Error you must pass a string for the variable history")
else:
history = ""
if comment is not None:
- if not isinstance(comment,str):
- raise Exception, "Error you must pass a string for the variable comment"
+ if not isinstance(comment, str):
+ raise Exception(
+ "Error you must pass a string for the variable comment")
else:
comment = ""
@@ -398,21 +464,23 @@ def variable(table_entry,units,axis_ids,type='f',missing_value=None,tolerance =
axis_ids = numpy.ascontiguousarray(axis_ids.filled())
elif has_cdms2 and cdms2.isVariable(axis_ids):
axis_ids = numpy.ascontiguousarray(axis_ids.filled())
- elif isinstance(axis_ids,(list,tuple)):
+ elif isinstance(axis_ids, (list, tuple)):
axis_ids = numpy.ascontiguousarray(axis_ids)
elif not isinstance(axis_ids, numpy.ndarray):
- raise Exception, "Error could not convert axis_ids list to a numpy array"
+ raise Exception(
+ "Error could not convert axis_ids list to a numpy array")
- if numpy.ndim(axis_ids)>1:
- raise Exception, "error axis_ids list/array must be 1D"
+ if numpy.ndim(axis_ids) > 1:
+ raise Exception("error axis_ids list/array must be 1D")
- if not isinstance(type,str):
- raise Exception, "error tpye must a a string"
+ if not isinstance(type, str):
+ raise Exception("error tpye must a a string")
type = type.lower()
if type == 's':
- type ='c'
- if not type in ["c","d","f","l","i"]:
- raise Exception, 'error unknown type: "%s", must be one of: "c","d","f","l","i"'
+ type = 'c'
+ if not type in ["c", "d", "f", "l", "i"]:
+ raise Exception(
+ 'error unknown type: "%s", must be one of: "c","d","f","l","i"')
ndims = len(axis_ids)
@@ -431,31 +499,39 @@ def variable(table_entry,units,axis_ids,type='f',missing_value=None,tolerance =
else:
comment = str(comment)
- if not isinstance(tolerance,(float,int,numpy.float,numpy.float32,numpy.int,numpy.int32)):
- raise Exception, "error tolerance must be a number"
+ if not isinstance(tolerance, (float, int, numpy.float,
+ numpy.float32, numpy.int, numpy.int32)):
+ raise Exception("error tolerance must be a number")
tolerance = float(tolerance)
if missing_value is not None:
- if not isinstance(missing_value,(float,int,numpy.float,numpy.float32,numpy.int,numpy.int32)):
- raise Exception, "error missing_value must be a number, you passed: %s" % repr(missing_value)
+ if not isinstance(missing_value, (float, int, numpy.float,
+ numpy.float32, numpy.int, numpy.int32)):
+ raise Exception(
+ "error missing_value must be a number, you passed: %s" %
+ repr(missing_value))
missing_value = float(missing_value)
- axis_ids=axis_ids.astype('i')
- return _cmor.variable(table_entry,units,ndims,axis_ids,type,missing_value,tolerance,positive,original_name,history,comment)
+ axis_ids = axis_ids.astype('i')
+ return _cmor.variable(table_entry, units, ndims, axis_ids, type,
+ missing_value, tolerance, positive, original_name, history, comment)
+
-def zfactor(zaxis_id,zfactor_name,units="",axis_ids=None,type=None,zfactor_values=None,zfactor_bounds=None):
+def zfactor(zaxis_id, zfactor_name, units="", axis_ids=None,
+ type=None, zfactor_values=None, zfactor_bounds=None):
- if not isinstance(zaxis_id,(int,numpy.int,numpy.int32)):
- raise Exception, "error zaxis_id must be a number"
+ if not isinstance(zaxis_id, (int, numpy.int, numpy.int32)):
+ raise Exception("error zaxis_id must be a number")
zaxis_id = int(zaxis_id)
- if not isinstance(zfactor_name,str):
- raise Exception, "Error you must pass a string for the variable zfactor_name"
+ if not isinstance(zfactor_name, str):
+ raise Exception(
+ "Error you must pass a string for the variable zfactor_name")
- if not isinstance(units,str):
- raise Exception, "Error you must pass a string for the variable units"
+ if not isinstance(units, str):
+ raise Exception("Error you must pass a string for the variable units")
if numpy.ma.isMA(axis_ids):
axis_ids = numpy.ascontiguousarray(axis_ids.filled())
@@ -465,17 +541,18 @@ def zfactor(zaxis_id,zfactor_name,units="",axis_ids=None,type=None,zfactor_value
axis_ids = numpy.ascontiguousarray(axis_ids.filled())
elif has_cdms2 and cdms2.isVariable(axis_ids):
axis_ids = numpy.ascontiguousarray(axis_ids.filled())
- elif isinstance(axis_ids,(list,tuple)):
+ elif isinstance(axis_ids, (list, tuple)):
axis_ids = numpy.ascontiguousarray(axis_ids)
elif axis_ids is None:
pass
- elif isinstance(axis_ids,(int,numpy.int,numpy.int32)):
- axis_ids = numpy.array([axis_ids,])
+ elif isinstance(axis_ids, (int, numpy.int, numpy.int32)):
+ axis_ids = numpy.array([axis_ids, ])
elif not isinstance(axis_ids, numpy.ndarray):
- raise Exception, "Error could not convert axis_ids list to a numpy array"
+ raise Exception(
+ "Error could not convert axis_ids list to a numpy array")
- if numpy.ndim(axis_ids)>1:
- raise Exception, "error axis_ids list/array must be 1D"
+ if numpy.ndim(axis_ids) > 1:
+ raise Exception("error axis_ids list/array must be 1D")
if axis_ids is None:
ndims = 0
@@ -483,13 +560,15 @@ def zfactor(zaxis_id,zfactor_name,units="",axis_ids=None,type=None,zfactor_value
else:
ndims = len(axis_ids)
-## if ndims>1 and zfactor_values is not None:
+# if ndims>1 and zfactor_values is not None:
## raise Exception, "Error you can only pass zfactor_values for zfactor with rank <=1"
-## if ndims>1 and zfactor_bounds is not None:
-## raise Exception, "Error you can only pass zfactor_bounds for zfactor with rank <=1"
+# if ndims>1 and zfactor_bounds is not None:
+# raise Exception, "Error you can only pass zfactor_bounds for zfactor
+# with rank <=1"
if zfactor_values is not None:
- if isinstance(zfactor_values,(float,int,numpy.float,numpy.float32,numpy.int,numpy.int32)):
+ if isinstance(zfactor_values, (float, int, numpy.float,
+ numpy.float32, numpy.int, numpy.int32)):
zfactor_values = numpy.array((zfactor_values,))
elif numpy.ma.isMA(zfactor_values):
zfactor_values = numpy.ascontiguousarray(zfactor_values.filled())
@@ -497,32 +576,36 @@ def zfactor(zaxis_id,zfactor_name,units="",axis_ids=None,type=None,zfactor_value
zfactor_values = numpy.ascontiguousarray(zfactor_values.filled())
elif has_cdms2 and cdms2.isVariable(zfactor_values):
zfactor_values = numpy.ascontiguousarray(zfactor_values.filled())
- elif isinstance(zfactor_values,(list,tuple)):
+ elif isinstance(zfactor_values, (list, tuple)):
zfactor_values = numpy.ascontiguousarray(zfactor_values)
elif not isinstance(zfactor_values, numpy.ndarray):
- raise Exception, "Error could not convert zfactor_values to a numpy array"
+ raise Exception(
+ "Error could not convert zfactor_values to a numpy array")
if type is None:
try:
type = zfactor_values.dtype.char
- except:
- if isinstance(zfactor_values,(float,numpy.float,numpy.float32)):
+ except BaseException:
+ if isinstance(zfactor_values,
+ (float, numpy.float, numpy.float32)):
type = 'f'
- elif isinstance(zfactor_values,(int,numpy.int,numpy.int32)):
+ elif isinstance(zfactor_values, (int, numpy.int, numpy.int32)):
type = 'd'
else:
- raise Exception, "Error unknown type for zfactor_values: %s" % repr(zfactor_values)
+ raise Exception(
+ "Error unknown type for zfactor_values: %s" %
+ repr(zfactor_values))
elif type is None:
- type='d'
-
+ type = 'd'
- if not isinstance(type,str):
- raise Exception, "error tpye must a a string"
+ if not isinstance(type, str):
+ raise Exception("error tpye must a a string")
type = type.lower()
if type == 's':
- type ='c'
- if not type in ["c","d","f","l","i"]:
- raise Exception, 'error unknown type: "%s", must be one of: "c","d","f","l","i"'
+ type = 'c'
+ if not type in ["c", "d", "f", "l", "i"]:
+ raise Exception(
+ 'error unknown type: "%s", must be one of: "c","d","f","l","i"')
if zfactor_bounds is not None:
if numpy.ma.isMA(zfactor_bounds):
@@ -531,45 +614,52 @@ def zfactor(zaxis_id,zfactor_name,units="",axis_ids=None,type=None,zfactor_value
zfactor_bounds = numpy.ascontiguousarray(zfactor_bounds.filled())
elif has_cdms2 and cdms2.isVariable(zfactor_bounds):
zfactor_bounds = numpy.ascontiguousarray(zfactor_bounds.filled())
- elif isinstance(zfactor_bounds,(list,tuple)):
+ elif isinstance(zfactor_bounds, (list, tuple)):
zfactor_bounds = numpy.ascontiguousarray(zfactor_bounds)
elif not isinstance(zfactor_bounds, numpy.ndarray):
- raise Exception, "Error could not convert zfactor_bounds to a numpy array"
- if numpy.ndim(zfactor_bounds)>2:
- raise Exception, "error zfactor_bounds must be rank 2 at most"
- elif numpy.ndim(zfactor_bounds)==2:
- if zfactor_bounds.shape[1]!=2:
- raise Exception, "error zfactor_bounds' 2nd dimension must be of length 2"
- bnds =[]
+ raise Exception(
+ "Error could not convert zfactor_bounds to a numpy array")
+ if numpy.ndim(zfactor_bounds) > 2:
+ raise Exception("error zfactor_bounds must be rank 2 at most")
+ elif numpy.ndim(zfactor_bounds) == 2:
+ if zfactor_bounds.shape[1] != 2:
+ raise Exception(
+ "error zfactor_bounds' 2nd dimension must be of length 2")
+ bnds = []
b = zfactor_bounds[0]
for i in range(zfactor_bounds.shape[0]):
b = zfactor_bounds[i]
bnds.append(b[0])
- if (i<zfactor_bounds.shape[0]-1) and (b[1]!=zfactor_bounds[i+1][0]):
- raise Exception, "error zfactor_bounds have gaps between them"
+ if (i < zfactor_bounds.shape[0] -
+ 1) and (b[1] != zfactor_bounds[i + 1][0]):
+ raise Exception(
+ "error zfactor_bounds have gaps between them")
bnds.append(zfactor_bounds[-1][1])
- zfactor_bounds=numpy.array(bnds)
+ zfactor_bounds = numpy.array(bnds)
axis_ids = axis_ids.astype('i')
-## print "sending",zaxis_id,zfactor_name,units,ndims,axis_ids,type,zfactor_values,zfactor_bounds
- return _cmor.zfactor(zaxis_id,zfactor_name,units,ndims,axis_ids,type,zfactor_values,zfactor_bounds)
+# print
+# "sending",zaxis_id,zfactor_name,units,ndims,axis_ids,type,zfactor_values,zfactor_bounds
+ return _cmor.zfactor(zaxis_id, zfactor_name, units,
+ ndims, axis_ids, type, zfactor_values, zfactor_bounds)
-def write(var_id,data,ntimes_passed=None,file_suffix="",time_vals=None,time_bnds=None,store_with=None):
+def write(var_id, data, ntimes_passed=None, file_suffix="",
+ time_vals=None, time_bnds=None, store_with=None):
""" write data to a cmor variable
Usage:
ierr = write(var_id,data,ntimes_passed=None,file_suffix="",time_vals=None,time_bnds=None,store_with=None
"""
- if not isinstance(var_id,(int,numpy.int,numpy.int32)):
- raise Exception, "error var_id must be an integer"
+ if not isinstance(var_id, (int, numpy.int, numpy.int32)):
+ raise Exception("error var_id must be an integer")
var_id = int(var_id)
- if not isinstance(file_suffix,str):
- raise Exception, "Error file_suffix must be a string"
+ if not isinstance(file_suffix, str):
+ raise Exception("Error file_suffix must be a string")
if store_with is not None:
- if not isinstance(store_with,(int,numpy.int,numpy.int32)):
- raise Exception, "error store_with must be an integer"
+ if not isinstance(store_with, (int, numpy.int, numpy.int32)):
+ raise Exception("error store_with must be an integer")
store_with = int(store_with)
if numpy.ma.isMA(data):
@@ -580,11 +670,10 @@ def write(var_id,data,ntimes_passed=None,file_suffix="",time_vals=None,time_bnds
if time_vals is None:
time_vals = data.getTime()
data = numpy.ascontiguousarray(data.filled())
- elif isinstance(data,(list,tuple)):
+ elif isinstance(data, (list, tuple)):
data = numpy.ascontiguousarray(data)
elif not isinstance(data, numpy.ndarray):
- raise Exception, "Error could not convert data to a numpy array"
-
+ raise Exception("Error could not convert data to a numpy array")
if time_vals is None:
pass
@@ -592,61 +681,60 @@ def write(var_id,data,ntimes_passed=None,file_suffix="",time_vals=None,time_bnds
time_vals = numpy.ascontiguousarray(time_vals.filled())
elif has_oldma and numpy.oldnumeric.ma.isMA(time_vals):
time_vals = numpy.ascontiguousarray(time_vals.filled())
- elif has_cdms2 and isinstance(time_vals,cdms2.axis.TransientAxis):
+ elif has_cdms2 and isinstance(time_vals, cdms2.axis.TransientAxis):
if time_bnds is None:
time_bnds = time_vals.getBounds()
time_vals = numpy.ascontiguousarray(time_vals[:])
elif has_cdms2 and cdms2.isVariable(time_vals):
time_vals = numpy.ascontiguousarray(time_vals.filled())
- elif isinstance(time_vals,(list,tuple)):
+ elif isinstance(time_vals, (list, tuple)):
time_vals = numpy.ascontiguousarray(time_vals)
elif not isinstance(time_vals, numpy.ndarray):
try:
time_vals = numpy.ascontiguousarray(time_vals)
- except:
- raise Exception, "Error could not convert time_vals to a numpy array"
+ except BaseException:
+ raise Exception(
+ "Error could not convert time_vals to a numpy array")
if time_vals is not None:
type = time_vals.dtype.char
- if not type in ['f','d','i','l']:
- raise Exception, "Error time_vals type must one of: 'f','d','i','l', please convert first"
- time_vals=time_vals.astype("d")
-
+ if not type in ['f', 'd', 'i', 'l']:
+ raise Exception(
+ "Error time_vals type must one of: 'f','d','i','l', please convert first")
+ time_vals = time_vals.astype("d")
if ntimes_passed is None:
if time_vals is None:
ntimes_passed = 0
else:
ntimes_passed = len(time_vals)
- if not isinstance(ntimes_passed,(int,numpy.int,numpy.int32)):
- raise Exception, "error ntimes_passed must be an integer"
+ if not isinstance(ntimes_passed, (int, numpy.int, numpy.int32)):
+ raise Exception("error ntimes_passed must be an integer")
ntimes_passed = int(ntimes_passed)
-
- #At that ponit we check that shapes matches!
- goodshape = _cmor.get_original_shape(var_id,1)
+ # At that ponit we check that shapes matches!
+ goodshape = _cmor.get_original_shape(var_id, 1)
osh = data.shape
- ogoodshape=list(goodshape)
- sh=list(osh)
- j=0
- while sh.count(1)>0:
+ ogoodshape = list(goodshape)
+ sh = list(osh)
+ j = 0
+ while sh.count(1) > 0:
sh.remove(1)
- while goodshape.count(1)>0:
+ while goodshape.count(1) > 0:
goodshape.remove(1)
for i in range(len(goodshape)):
- if goodshape[i]!=0:
- if sh[j]!=goodshape[i]:
- if goodshape[i]!=1:
- raise Exception,"Error: your data shape (%s) does not match the expected variable shape (%s)\nCheck your variable dimensions before caling cmor_write" % (str(osh),str(ogoodshape))
- j+=1
- elif ntimes_passed!=1:
- j+=1
-
-
+ if goodshape[i] != 0:
+ if sh[j] != goodshape[i]:
+ if goodshape[i] != 1:
+ raise Exception(
+ "Error: your data shape (%s) does not match the expected variable shape (%s)\nCheck your variable dimensions before caling cmor_write" %
+ (str(osh), str(ogoodshape)))
+ j += 1
+ elif ntimes_passed != 1:
+ j += 1
data = numpy.ascontiguousarray(numpy.ravel(data))
-
if time_bnds is not None:
if numpy.ma.isMA(time_bnds):
time_bnds = numpy.ascontiguousarray(time_bnds.filled())
@@ -656,57 +744,66 @@ def write(var_id,data,ntimes_passed=None,file_suffix="",time_vals=None,time_bnds
if time_vals is None:
time_vals = time_bnds.getTime()
time_bnds = numpy.ascontiguousarray(time_bnds.filled())
- elif isinstance(time_bnds,(list,tuple)):
+ elif isinstance(time_bnds, (list, tuple)):
time_bnds = numpy.ascontiguousarray(time_bnds)
elif not isinstance(time_bnds, numpy.ndarray):
- raise Exception, "Error could not convert time_bnds to a numpy array"
-
- if numpy.ndim(time_bnds)>2:
- raise Exception, "bounds rank cannot be greater than 2"
- elif numpy.ndim(time_bnds)==2:
- if time_bnds.shape[1]!=2:
- raise Exception, "error time_bnds' 2nd dimension must be of length 2"
- bnds =[]
+ raise Exception(
+ "Error could not convert time_bnds to a numpy array")
+
+ if numpy.ndim(time_bnds) > 2:
+ raise Exception("bounds rank cannot be greater than 2")
+ elif numpy.ndim(time_bnds) == 2:
+ if time_bnds.shape[1] != 2:
+ raise Exception(
+ "error time_bnds' 2nd dimension must be of length 2")
+ bnds = []
if time_bnds.shape[0] > 1:
_check_time_bounds_contiguous(time_bnds)
bnds = _flatten_time_bounds(time_bnds)
else:
bnds = time_bnds.ravel()
- time_bnds=numpy.array(bnds)
- else: # ok it is a rank 1!
- if numpy.ndim(time_vals)==0:
- ltv=1
+ time_bnds = numpy.array(bnds)
+ else: # ok it is a rank 1!
+ if numpy.ndim(time_vals) == 0:
+ ltv = 1
else:
- ltv=len(time_vals)
- if len(time_bnds)!=ltv+1:
- raise Exception,"error time_bnds if 1D must be 1 elt greater than time_vals, you have %i vs %i" % (len(time_bnds),ltv)
- bnds=[]
+ ltv = len(time_vals)
+ if len(time_bnds) != ltv + 1:
+ raise Exception(
+ "error time_bnds if 1D must be 1 elt greater than time_vals, you have %i vs %i" %
+ (len(time_bnds), ltv))
+ bnds = []
for i in range(ltv):
- bnds.append([time_bnds[i],time_bnds[i+1]])
- bnds=numpy.array(bnds)
+ bnds.append([time_bnds[i], time_bnds[i + 1]])
+ bnds = numpy.array(bnds)
bnds = _flatten_time_bounds(bnds)
- time_bnds=numpy.array(bnds)
+ time_bnds = numpy.array(bnds)
if time_bnds is not None:
type = time_bnds.dtype.char
- if not type in ['f','d','i','l']:
- raise Exception, "Error time_bnds type must one of: 'f','d','i','l', please convert first"
- time_bnds=time_bnds.astype("d")
+ if not type in ['f', 'd', 'i', 'l']:
+ raise Exception(
+ "Error time_bnds type must one of: 'f','d','i','l', please convert first")
+ time_bnds = time_bnds.astype("d")
type = data.dtype.char
- if not type in ['f','d','i','l']:
- raise Exception, "Error data type must one of: 'f','d','i','l', please convert first"
+ if not type in ['f', 'd', 'i', 'l']:
+ raise Exception(
+ "Error data type must one of: 'f','d','i','l', please convert first")
+
+ return _cmor.write(var_id, data, type, ntimes_passed,
+ time_vals, time_bnds, store_with)
- return _cmor.write(var_id,data,type,ntimes_passed,time_vals,time_bnds,store_with)
def _check_time_bounds_contiguous(time_bnds):
'''
checks that time bounds are contiguous
'''
- for i in range(time_bnds.shape[0] - 1 ):
+ for i in range(time_bnds.shape[0] - 1):
b = time_bnds[i]
- if b[1]!=time_bnds[i+1][0]:
- raise Exception, "error time_bnds have gaps between them"
+ if b[1] != time_bnds[i + 1][0]:
+ raise Exception("error time_bnds have gaps between them")
+
def _flatten_time_bounds(time_bnds):
'''
@@ -717,7 +814,9 @@ def _flatten_time_bounds(time_bnds):
bnds.extend([time_bnds[i][0], time_bnds[i][1]])
return bnds
-def setup(inpath='.',netcdf_file_action=cmor_const.CMOR_PRESERVE,set_verbosity=cmor_const.CMOR_NORMAL,exit_control=cmor_const.CMOR_NORMAL,logfile=None,create_subdirectories=1):
+
+def setup(inpath='.', netcdf_file_action=cmor_const.CMOR_PRESERVE, set_verbosity=cmor_const.CMOR_NORMAL,
+ exit_control=cmor_const.CMOR_NORMAL, logfile=None, create_subdirectories=1):
"""
Usage cmor_setup(inpath='.',netcdf_file_action=cmor.CMOR_PRESERVE,set_verbosity=cmor.CMOR_NORMAL,exit_control=cmor.CMOR_NORMAL)
Where:
@@ -730,52 +829,62 @@ def setup(inpath='.',netcdf_file_action=cmor_const.CMOR_PRESERVE,set_verbosity=c
exit_control: CMOR_EXIT_ON_WARNING, CMOR_EXIT_ON_MAJOR, CMOR_NORMAL
create_subdirectories: 1 to create subdirectories structure, 0 to dump files directly where cmor_dataset tells to
"""
- if not isinstance(exit_control,int) or not exit_control in [ cmor_const.CMOR_EXIT_ON_WARNING, cmor_const.CMOR_EXIT_ON_MAJOR, cmor_const.CMOR_NORMAL]:
- raise Exception, "exit_control must an integer valid values are: CMOR_EXIT_ON_WARNING, CMOR_EXIT_ON_MAJOR, CMOR_NORMAL"
-
- if not isinstance(netcdf_file_action,int) or not netcdf_file_action in [ cmor_const.CMOR_PRESERVE, cmor_const.CMOR_APPEND, cmor_const.CMOR_REPLACE, cmor_const.CMOR_PRESERVE_3, cmor_const.CMOR_APPEND_3, cmor_const.CMOR_REPLACE_3,cmor_const.CMOR_PRESERVE_4, cmor_const.CMOR_APPEND_4, cmor_const.CMOR_REPLACE_4 ]:
- raise Exception, "netcdf_file_action must be an integer. Valid values are: CMOR_PRESERVE, CMOR_APPEND, CMOR_REPLACE, CMOR_PRESERVE_3, CMOR_APPEND_3 or CMOR_REPLACE_3, CMOR_PRESERVE_4, CMOR_APPEND_4 or CMOR_REPLACE_4"
-
- if not isinstance(set_verbosity,int) or not set_verbosity in [ cmor_const.CMOR_QUIET, cmor_const.CMOR_NORMAL]:
- raise Exception, "set_verbosity must an integer valid values are: CMOR_QUIET, CMOR_NORMAL"
-
- if not isinstance(inpath,str) and not os.path.exists(inpath):
- raise Exception, "path must be a Valid path"
+ if not isinstance(exit_control, int) or not exit_control in [
+ cmor_const.CMOR_EXIT_ON_WARNING, cmor_const.CMOR_EXIT_ON_MAJOR, cmor_const.CMOR_NORMAL]:
+ raise Exception(
+ "exit_control must an integer valid values are: CMOR_EXIT_ON_WARNING, CMOR_EXIT_ON_MAJOR, CMOR_NORMAL")
+
+ if not isinstance(netcdf_file_action, int) or not netcdf_file_action in [cmor_const.CMOR_PRESERVE, cmor_const.CMOR_APPEND, cmor_const.CMOR_REPLACE,
+ cmor_const.CMOR_PRESERVE_3, cmor_const.CMOR_APPEND_3, cmor_const.CMOR_REPLACE_3, cmor_const.CMOR_PRESERVE_4, cmor_const.CMOR_APPEND_4, cmor_const.CMOR_REPLACE_4]:
+ raise Exception("netcdf_file_action must be an integer. Valid values are: CMOR_PRESERVE, CMOR_APPEND, CMOR_REPLACE, CMOR_PRESERVE_3, CMOR_APPEND_3 or CMOR_REPLACE_3, CMOR_PRESERVE_4, CMOR_APPEND_4 or CMOR_REPLACE_4")
+
+ if not isinstance(set_verbosity, int) or not set_verbosity in [
+ cmor_const.CMOR_QUIET, cmor_const.CMOR_NORMAL]:
+ raise Exception(
+ "set_verbosity must an integer valid values are: CMOR_QUIET, CMOR_NORMAL")
+
+ if not isinstance(inpath, str) and not os.path.exists(inpath):
+ raise Exception("path must be a Valid path")
if logfile is None:
logfile = ""
- if not create_subdirectories in [0,1]:
- raise Exception, "create_subdirectories must be 0 or 1"
- return _cmor.setup(inpath,netcdf_file_action,set_verbosity,exit_control,logfile,create_subdirectories)
+ if not create_subdirectories in [0, 1]:
+ raise Exception("create_subdirectories must be 0 or 1")
+ return _cmor.setup(inpath, netcdf_file_action, set_verbosity,
+ exit_control, logfile, create_subdirectories)
+
def load_table(table):
""" loads a cmor table
Usage:
load_table(table)
"""
- if not isinstance(table,str):
- raise Exception, "Error, must pass a string"
-## if not os.path.exists(table):
+ if not isinstance(table, str):
+ raise Exception("Error, must pass a string")
+# if not os.path.exists(table):
## raise Exception, "Error, the table you specified (%s) does not exists" % table
return _cmor.load_table(table)
+
def dataset_json(rcfile):
""" load dataset JSON file
Usage:
dataset_json(rcfile)
"""
- if not isinstance(rcfile,str):
- raise Exception, "Error, must pass a string"
-## if not os.path.exists(table):
+ if not isinstance(rcfile, str):
+ raise Exception("Error, must pass a string")
+# if not os.path.exists(table):
## raise Exception, "Error, the table you specified (%s) does not exists" % table
return _cmor.dataset_json(rcfile)
+
def set_table(table):
- if not isinstance(table,int):
- raise Exception, "error you need to pass and integer as the table id"
+ if not isinstance(table, int):
+ raise Exception("error you need to pass and integer as the table id")
return _cmor.set_table(table)
-def close(var_id=None,file_name=False, preserve=False):
+
+def close(var_id=None, file_name=False, preserve=False):
""" Close CMOR variables/file
Usage:
cmor.close(varid=None)
@@ -784,22 +893,22 @@ def close(var_id=None,file_name=False, preserve=False):
[file_name] True/False (default False) if True: return name of the file just closed, works only if var_id is not None
[preserve] True/False (default False) if True: close the file but preserve the var definition in CMOR to write more data with this variable (into a new file)
"""
- if var_id is not None and not isinstance(var_id,int):
- raise Exception, "Error var_id must be None or a integer"
+ if var_id is not None and not isinstance(var_id, int):
+ raise Exception("Error var_id must be None or a integer")
if (preserve is False):
if (file_name is False):
- return _cmor.close(var_id,0,0)
+ return _cmor.close(var_id, 0, 0)
else:
- return _cmor.close(var_id,1,0)
+ return _cmor.close(var_id, 1, 0)
else:
if (file_name is False):
- return _cmor.close(var_id,0,1)
+ return _cmor.close(var_id, 0, 1)
else:
- return _cmor.close(var_id,1,1)
+ return _cmor.close(var_id, 1, 1)
-def set_cur_dataset_attribute(name,value):
+def set_cur_dataset_attribute(name, value):
"""Sets an attribute onto the current cmor dataset
Usage:
cmor.set_cur_dataset_attribute(name,value)
@@ -808,10 +917,11 @@ def set_cur_dataset_attribute(name,value):
value: is the value for this attribute
"""
if value is None:
- val=""
+ val = ""
else:
val = str(value)
- return _cmor.set_cur_dataset_attribute(name,val)
+ return _cmor.set_cur_dataset_attribute(name, val)
+
def has_cur_dataset_attribute(name):
"""determines if the current cmor dataset has an attribute
@@ -822,11 +932,12 @@ def has_cur_dataset_attribute(name):
Returns True if the dataset has the attribute, False otherwise
"""
test = _cmor.has_cur_dataset_attribute(name)
- if test == 0 :
+ if test == 0:
return True
else:
return False
+
def get_cur_dataset_attribute(name):
"""Gets an attribute from the current cmor dataset
Usage:
@@ -840,7 +951,8 @@ def get_cur_dataset_attribute(name):
else:
return None
-def set_variable_attribute(var_id,name,value):
+
+def set_variable_attribute(var_id, name, value):
"""Sets an attribute onto a cmor variable
Usage:
cmor.set_variable_attribute(var_id,name,value)
@@ -850,12 +962,13 @@ def set_variable_attribute(var_id,name,value):
value : is the value for this attribute
"""
if value is None:
- val=""
+ val = ""
else:
val = str(value)
- return _cmor.set_variable_attribute(var_id,name,val)
+ return _cmor.set_variable_attribute(var_id, name, val)
-def set_deflate(var_id,shuffle,deflate,deflate_level):
+
+def set_deflate(var_id, shuffle, deflate, deflate_level):
"""Sets shuffle/deflate on a cmor variable
Usage:
cmor.set_deflate(var_id, shuffle, deflate, deflate_level)
@@ -871,7 +984,8 @@ def set_deflate(var_id,shuffle,deflate,deflate_level):
return _cmor.set_deflate(var_id, shuffle, deflate, deflate_level)
-def has_variable_attribute(var_id,name):
+
+def has_variable_attribute(var_id, name):
"""determines if the a cmor variable has an attribute
Usage:
cmor.het_variable_attribute(name)
@@ -880,13 +994,14 @@ def has_variable_attribute(var_id,name):
name: is the name of the attribute
Returns True if the dataset has the attribute, False otherwise
"""
- test = _cmor.has_variable_attribute(var_id,name)
- if test == 0 :
+ test = _cmor.has_variable_attribute(var_id, name)
+ if test == 0:
return True
else:
return False
-def get_variable_attribute(var_id,name):
+
+def get_variable_attribute(var_id, name):
"""Gets an attribute from a cmor variable
Usage:
cmor.get_variable_attribute(name)
@@ -895,14 +1010,15 @@ def get_variable_attribute(var_id,name):
name: is the name of the attribute
Returns none if attribute is non-existant
"""
- ## print 'In there asking for attribute: ',name,'on var',var_id
- if has_variable_attribute(var_id,name):
- ## print 'Seems to have it',var_id,name
- return _cmor.get_variable_attribute(var_id,name)
+ # print 'In there asking for attribute: ',name,'on var',var_id
+ if has_variable_attribute(var_id, name):
+ # print 'Seems to have it',var_id,name
+ return _cmor.get_variable_attribute(var_id, name)
else:
return None
+
def get_final_filename():
- """ Retrieve renamed file after cmor.close() has been called. This is useful to reopen the file in the same program.
- """
- return _cmor.get_final_filename()
+ """ Retrieve renamed file after cmor.close() has been called. This is useful to reopen the file in the same program.
+ """
+ return _cmor.get_final_filename()
diff --git a/LibCV/PrePARE/PrePARE.py b/LibCV/PrePARE/PrePARE.py
index 393f881..5f99ac0 100644
--- a/LibCV/PrePARE/PrePARE.py
+++ b/LibCV/PrePARE/PrePARE.py
@@ -48,12 +48,14 @@ class JSONAction(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
fn = values
if not os.path.isfile(fn):
- raise argparse.ArgumentTypeError('JSONAction:{0} is file not found'.format(fn))
+ raise argparse.ArgumentTypeError(
+ 'JSONAction:{0} is file not found'.format(fn))
f = open(fn)
lines = f.readlines()
jsonobject = json.loads(" ".join(lines))
if not jsonobject:
- raise argparse.ArgumentTypeError('JSONAction:{0} is file not a valid JSON file'.format(fn))
+ raise argparse.ArgumentTypeError(
+ 'JSONAction:{0} is file not a valid JSON file'.format(fn))
setattr(namespace, self.dest, values)
@@ -68,7 +70,8 @@ class CDMSAction(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
fn = values
if not os.path.isfile(fn):
- raise argparse.ArgumentTypeError('CDMSAction:{0} does not exist'.format(fn))
+ raise argparse.ArgumentTypeError(
+ 'CDMSAction:{0} does not exist'.format(fn))
f = cdms2.open(fn)
setattr(namespace, self.dest, f)
@@ -84,11 +87,13 @@ class readable_dir(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
prospective_dir = values
if not os.path.isdir(prospective_dir):
- raise argparse.ArgumentTypeError('readable_dir:{0} is not a valid path'.format(prospective_dir))
+ raise argparse.ArgumentTypeError(
+ 'readable_dir:{0} is not a valid path'.format(prospective_dir))
if os.access(prospective_dir, os.R_OK):
setattr(namespace, self.dest, prospective_dir)
else:
- raise argparse.ArgumentTypeError('readable_dir:{0} is not a readable dir'.format(prospective_dir))
+ raise argparse.ArgumentTypeError(
+ 'readable_dir:{0} is not a readable dir'.format(prospective_dir))
# =========================
@@ -120,18 +125,18 @@ class checkCMIP6(object):
# Initilaze arrays
# -------------------------------------------------------------------
self.cmip6_table = args.cmip6_table
- self.infile = args.infile
+ self.infile = args.infile
self.attributes = self.infile.listglobal()
- self.variables = self.infile.listvariable()
+ self.variables = self.infile.listvariable()
if args.variable is not None:
- self.var = [args.variable]
+ self.var = [args.variable]
else:
# -------------------------------------------------------------------
# find variable that contains a "history" (should only be one)
# -------------------------------------------------------------------
self.var = [self.infile.variable_id]
- if((self.var == []) or (len(self.var) > 1)):
+ if((self.var == []) or (len(self.var) > 1)):
print bcolors.FAIL
print "!!!!!!!!!!!!!!!!!!!!!!!!!"
print "! Error: The input file does not have an history attribute and the CMIP6 variable could not be found"
@@ -139,21 +144,20 @@ class checkCMIP6(object):
print "! Check your file or use CMOR 3.x to achieve compliance for ESGF publication."
print "!!!!!!!!!!!!!!!!!!!!!!!!!"
print bcolors.ENDC
-
+
raise KeyboardInterrupt
try:
self.keys = self.infile.listattribute(self.var[0])
- except:
+ except BaseException:
print bcolors.FAIL
print "!!!!!!!!!!!!!!!!!!!!!!!!!"
print "! Error: The variable " + self.var[0] + " could not be found"
print "! Check your file variables "
print "!!!!!!!!!!!!!!!!!!!!!!!!!"
print bcolors.ENDC
-
- raise
+ raise
# -------------------------------------------------------------------
# call setup() to clean all 'C' internal memory.
@@ -163,23 +167,42 @@ class checkCMIP6(object):
# -------------------------------------------------------------------
# Set Control Vocabulary file to use (default from cmor.h)
# -------------------------------------------------------------------
- cmip6_cv.set_cur_dataset_attribute(cmip6_cv.GLOBAL_CV_FILENAME, cmip6_cv.TABLE_CONTROL_FILENAME)
- cmip6_cv.set_cur_dataset_attribute(cmip6_cv.FILE_PATH_TEMPLATE, cmip6_cv.CMOR_DEFAULT_PATH_TEMPLATE)
- cmip6_cv.set_cur_dataset_attribute(cmip6_cv.FILE_NAME_TEMPLATE, cmip6_cv.CMOR_DEFAULT_FILE_TEMPLATE)
- cmip6_cv.set_cur_dataset_attribute(cmip6_cv.GLOBAL_ATT_FURTHERINFOURLTMPL, cmip6_cv.CMOR_DEFAULT_FURTHERURL_TEMPLATE)
- cmip6_cv.set_cur_dataset_attribute(cmip6_cv.CMOR_AXIS_ENTRY_FILE, "CMIP6_coordinate.json")
- cmip6_cv.set_cur_dataset_attribute(cmip6_cv.CMOR_FORMULA_VAR_FILE, "CMIP6_formula_terms.json")
+ cmip6_cv.set_cur_dataset_attribute(
+ cmip6_cv.GLOBAL_CV_FILENAME,
+ cmip6_cv.TABLE_CONTROL_FILENAME)
+ cmip6_cv.set_cur_dataset_attribute(
+ cmip6_cv.FILE_PATH_TEMPLATE,
+ cmip6_cv.CMOR_DEFAULT_PATH_TEMPLATE)
+ cmip6_cv.set_cur_dataset_attribute(
+ cmip6_cv.FILE_NAME_TEMPLATE,
+ cmip6_cv.CMOR_DEFAULT_FILE_TEMPLATE)
+ cmip6_cv.set_cur_dataset_attribute(
+ cmip6_cv.GLOBAL_ATT_FURTHERINFOURLTMPL,
+ cmip6_cv.CMOR_DEFAULT_FURTHERURL_TEMPLATE)
+ cmip6_cv.set_cur_dataset_attribute(
+ cmip6_cv.CMOR_AXIS_ENTRY_FILE,
+ "CMIP6_coordinate.json")
+ cmip6_cv.set_cur_dataset_attribute(
+ cmip6_cv.CMOR_FORMULA_VAR_FILE,
+ "CMIP6_formula_terms.json")
# -------------------------------------------------------------------
# Create alist of all Global Attributes and set "dataset"
# -------------------------------------------------------------------
- self.dictGbl = {key: self.infile.getglobal(key) for key in self.attributes}
- ierr = [cmip6_cv.set_cur_dataset_attribute(key, value) for key, value in self.dictGbl.iteritems()]
+ self.dictGbl = {key: self.infile.getglobal(
+ key) for key in self.attributes}
+ ierr = [
+ cmip6_cv.set_cur_dataset_attribute(
+ key,
+ value) for key,
+ value in self.dictGbl.iteritems()]
if(self.dictGbl["sub_experiment_id"] not in ["none"]):
- member_id = self.dictGbl["sub_experiment_id"] + '-' +self.dictGbl["variant_label"]
+ member_id = self.dictGbl["sub_experiment_id"] + \
+ '-' + self.dictGbl["variant_label"]
else:
member_id = self.dictGbl["variant_label"]
- cmip6_cv.set_cur_dataset_attribute(cmip6_cv.GLOBAL_ATT_MEMBER_ID, member_id)
+ cmip6_cv.set_cur_dataset_attribute(
+ cmip6_cv.GLOBAL_ATT_MEMBER_ID, member_id)
self.setDoubleValue('branch_time_in_parent')
self.setDoubleValue('branch_time_in_child')
@@ -187,25 +210,26 @@ class checkCMIP6(object):
# Create a dictionnary of attributes for var
# -------------------------------------------------------------------
self.dictVars = dict((y, x) for y, x in
- [(key, value) for key in self.keys
- if self.infile.getattribute(self.var[0], key) is not None
- for value in [self.infile.getattribute(self.var[0], key)]])
+ [(key, value) for key in self.keys
+ if self.infile.getattribute(self.var[0], key) is not None
+ for value in [self.infile.getattribute(self.var[0], key)]])
try:
- self.calendar = self.infile.getAxis('time').calendar
- self.timeunits = self.infile.getAxis('time').units
- except:
- self.calendar = "gregorian"
- self.timeunits = "days since ?"
+ self.calendar = self.infile.getAxis('time').calendar
+ self.timeunits = self.infile.getAxis('time').units
+ except BaseException:
+ self.calendar = "gregorian"
+ self.timeunits = "days since ?"
# -------------------------------------------------------------------
# Load CMIP6 table into memory
# -------------------------------------------------------------------
self.table_id = cmip6_cv.load_table(self.cmip6_table)
def setDoubleValue(self, attribute):
- if( cmip6_cv.has_cur_dataset_attribute(attribute) ):
- if(isinstance(self.dictGbl[attribute],numpy.ndarray) and type(self.dictGbl[attribute][0]) == numpy.float64):
+ if(cmip6_cv.has_cur_dataset_attribute(attribute)):
+ if(isinstance(self.dictGbl[attribute], numpy.ndarray) and isinstance(self.dictGbl[attribute][0], numpy.float64)):
self.dictGbl[attribute] = self.dictGbl[attribute][0]
- cmip6_cv.set_cur_dataset_attribute(attribute,self.dictGbl[attribute])
+ cmip6_cv.set_cur_dataset_attribute(
+ attribute, self.dictGbl[attribute])
def ControlVocab(self):
'''
@@ -214,11 +238,16 @@ class checkCMIP6(object):
1. Validate required attribute if presents and some values.
2. Validate registered institution and institution_id
3. Validate registered source and source_id
- 4. Validate experiment, experiment_id and attribute associated with the experiment.
+ 4. Validate experiment, experiment_id and all attributes associated with this experiment.
+ Make sure that all attributes associate with the experiment_id found in CMIP6_CV.json
+ are set to the appropriate values.
5. Validate grid_label and grid_resolution
6. Validate creation time in ISO format (YYYY-MM-DDTHH:MM:SS)
7. Validate furtherinfourl from CV internal template
8. Validate variable attributes with CMOR JSON table.
+ 9. Validate parent_* attribute
+ 10. Validate sub_experiment_* atributes.
+ 11. Validate that all *_index are integers.
'''
cmip6_cv.check_requiredattributes(self.table_id)
cmip6_cv.check_institution(self.table_id)
@@ -231,22 +260,27 @@ class checkCMIP6(object):
cmip6_cv.check_subExpID(self.table_id)
try:
startimebnds = self.infile['time_bnds'][0][0]
- endtimebnds = self.infile['time_bnds'][-1][1]
- except:
+ endtimebnds = self.infile['time_bnds'][-1][1]
+ except BaseException:
startimebnds = 0
- endtimebnds = 0
+ endtimebnds = 0
try:
startime = self.infile['time'][0]
- endtime = self.infile['time'][-1]
- except:
+ endtime = self.infile['time'][-1]
+ except BaseException:
startime = 0
- endtime = 0
+ endtime = 0
varunits = self.infile[self.var[0]].units
varmissing = self.infile[self.var[0]]._FillValue[0]
- varid = cmip6_cv.setup_variable(self.var[0], varunits, varmissing, startime, endtime,
- startimebnds, endtimebnds)
+ varid = cmip6_cv.setup_variable(self.var[0], varunits, varmissing, startime, endtime,
+ startimebnds, endtimebnds)
fn = os.path.basename(self.infile.id)
- cmip6_cv.check_filename(self.table_id, varid, self.calendar, self.timeunits, fn)
+ cmip6_cv.check_filename(
+ self.table_id,
+ varid,
+ self.calendar,
+ self.timeunits,
+ fn)
if not isinstance(self.dictGbl['realization_index'], numpy.ndarray):
print bcolors.FAIL
@@ -277,7 +311,7 @@ class checkCMIP6(object):
print bcolors.ENDC
cmip6_cv.set_CV_Error()
- prepLIST = cmip6_cv.list_variable_attributes(varid)
+ prepLIST = cmip6_cv.list_variable_attributes(varid)
for key in prepLIST:
if(key == "comment"):
continue
@@ -316,7 +350,7 @@ class checkCMIP6(object):
if isinstance(table_value, numpy.ndarray):
table_value = table_value[0]
if isinstance(table_value, float):
- table_value = "{0:.2g}".format(table_value)
+ table_value = "{0:.2g}".format(table_value)
print bcolors.FAIL
print "====================================================================================="
print "CMIP6 variable " + self.var[0] + " requires \"" + key + "\":\"" + str(table_value) + "\"."
@@ -324,7 +358,6 @@ class checkCMIP6(object):
print bcolors.ENDC
cmip6_cv.set_CV_Error()
-
if(cmip6_cv.get_CV_Error()):
raise KeyboardInterrupt
print bcolors.OKGREEN
@@ -346,7 +379,7 @@ def main():
help='specify geophysical variable name')
parser.add_argument('cmip6_table',
- help='CMIP6 CMOR table (JSON file) ex: Tables/CMIP6_Amon.json',
+ help='CMIP6 CMOR table (JSON file) ex: Tables/CMIP6_Amon.json',
action=JSONAction)
parser.add_argument('infile',
@@ -386,5 +419,5 @@ if(__name__ == '__main__'):
print "!!!!!!!!!!!!!!!!!!!!!!!!!"
print bcolors.ENDC
sys.exit(-1)
- except:
+ except BaseException:
sys.exit(-1)
diff --git a/LibCV/__init__.py b/LibCV/__init__.py
index fe85109..f8a17fa 100644
--- a/LibCV/__init__.py
+++ b/LibCV/__init__.py
@@ -1,4 +1,3 @@
from cmor_const import *
from pywrapper import setup, load_table, set_table, close, set_cur_dataset_attribute, get_cur_dataset_attribute, has_cur_dataset_attribute, set_variable_attribute, list_variable_attributes, get_variable_attribute, has_variable_attribute, check_institution, check_sourceID, check_experiment, check_grids, check_requiredattributes, check_ISOTime, check_furtherinfourl, get_CV_Error, setup_variable, set_CV_Error, check_parentExpID, check_subExpID, check_filename
-
diff --git a/LibCV/pywrapper.py b/LibCV/pywrapper.py
index d6df766..576a851 100644
--- a/LibCV/pywrapper.py
+++ b/LibCV/pywrapper.py
@@ -5,46 +5,54 @@ Created on Fri Feb 19 11:33:52 2016
@author: Denis Nadeau LLNL, Charles Doutriaux LLNL
'''
-import cmor_const,numpy,os,_cmip6_cv
+import cmor_const
+import numpy
+import os
+import _cmip6_cv
import signal
+
def sig_handler(signum, frame):
- os.kill(os.getpid(),signal.SIGABRT)
+ os.kill(os.getpid(), signal.SIGABRT)
+
signal.signal(signal.SIGTERM, sig_handler)
try:
import cdtime
has_cdtime = True
-except:
+except BaseException:
has_cdtime = False
try:
import cdms2
has_cdms2 = True
-except:
+except BaseException:
has_cdms2 = False
try:
import MV2
has_MV2 = True
-except:
+except BaseException:
has_MV2 = False
try:
import numpy.oldnumeric.ma.MaskedArray
has_oldma = True
-except:
+except BaseException:
has_oldma = False
+
def _to_numpy(vals, message):
if isinstance(vals, (list, tuple)):
vals = numpy.ascontiguousarray(vals)
elif not isinstance(vals, numpy.ndarray):
try:
vals = numpy.ascontiguousarray(vals.filled())
- except:
- raise Exception, "Error could not convert %s to a numpy array" % message
+ except BaseException:
+ raise Exception(
+ "Error could not convert %s to a numpy array" %
+ message)
return vals
@@ -61,22 +69,24 @@ def setup(inpath='.',
exit_control: CMOR_EXIT_ON_WARNING, CMOR_EXIT_ON_MAJOR, CMOR_NORMAL
create_subdirectories: 1 to create subdirectories structure, 0 to dump files directly where cmor_dataset tells to
"""
- if not isinstance(exit_control,int) or not exit_control in [ cmor_const.CMOR_EXIT_ON_WARNING,
+ if not isinstance(exit_control, int) or not exit_control in [cmor_const.CMOR_EXIT_ON_WARNING,
cmor_const.CMOR_EXIT_ON_MAJOR,
cmor_const.CMOR_NORMAL]:
- raise Exception, "exit_control must an integer valid values are: CMOR_EXIT_ON_WARNING, " \
- "CMOR_EXIT_ON_MAJOR, CMOR_NORMAL"
+ raise Exception("exit_control must an integer valid values are: CMOR_EXIT_ON_WARNING, "
+ "CMOR_EXIT_ON_MAJOR, CMOR_NORMAL")
- if not isinstance(set_verbosity, int) or not set_verbosity in [ cmor_const.CMOR_QUIET, cmor_const.CMOR_NORMAL]:
- raise Exception, "set_verbosity must an integer valid values are: CMOR_QUIET, CMOR_NORMAL"
+ if not isinstance(set_verbosity, int) or not set_verbosity in [
+ cmor_const.CMOR_QUIET, cmor_const.CMOR_NORMAL]:
+ raise Exception(
+ "set_verbosity must an integer valid values are: CMOR_QUIET, CMOR_NORMAL")
if not isinstance(inpath, str) and not os.path.exists(inpath):
- raise Exception, "path must be a Valid path"
+ raise Exception("path must be a Valid path")
if logfile is None:
logfile = ""
if create_subdirectories not in [0, 1]:
- raise Exception, "create_subdirectories must be 0 or 1"
+ raise Exception("create_subdirectories must be 0 or 1")
CMOR_PRESERVE = 10
return(_cmip6_cv.setup(inpath, CMOR_PRESERVE, set_verbosity, exit_control, logfile, create_subdirectories))
@@ -87,7 +97,7 @@ def load_table(table):
load_table(table)
"""
if not isinstance(table, str):
- raise Exception, "Error, must pass a string"
+ raise Exception("Error, must pass a string")
# if not os.path.exists(table):
# raise Exception, "Error, the table you specified (%s) does not exists" % table
return _cmip6_cv.load_table(table)
@@ -95,7 +105,7 @@ def load_table(table):
def set_table(table):
if not isinstance(table, int):
- raise Exception, "error you need to pass and integer as the table id"
+ raise Exception("error you need to pass and integer as the table id")
return(_cmip6_cv.set_table(table))
@@ -111,7 +121,7 @@ def close(var_id=None, file_name=False, preserve=False):
definition in CMOR to write more data with this variable (into a new file)
"""
if var_id is not None and not isinstance(var_id, int):
- raise Exception, "Error var_id must be None or a integer"
+ raise Exception("Error var_id must be None or a integer")
if (preserve is False):
if (file_name is False):
@@ -212,6 +222,7 @@ def list_variable_attributes(var_id):
var_list = _cmip6_cv.list_variable_attributes(var_id)
return var_list
+
def get_variable_attribute(var_id, name):
"""Gets an attribute from a cmor variable
Usage:
@@ -264,13 +275,14 @@ def check_filename(table_id, var_name, calendar, timeunits, infile):
cmip6_cv.check_filename(table_id, var_id)
Where:
table_id is the table id returned by load_table()
- var_name is the variable name
+ var_name is the variable name
Return 0 on success
'''
- ierr = _cmip6_cv.check_filename(table_id, var_name,
+ ierr = _cmip6_cv.check_filename(table_id, var_name,
calendar, timeunits, infile)
return(ierr)
+
def check_experiment(table_id):
'''
Validate Experiment and Experiement_id against Control Vocabulary file.
@@ -329,10 +341,11 @@ def check_subExpID(table_id):
ierr = _cmip6_cv.check_subExpID(table_id)
return(ierr)
+
def check_parentExpID(table_id):
'''
Validate that parent_experiement is set to appropriate value
- if parent is set to "no parent" validate that other related
+ if parent is set to "no parent" validate that other related
attributes are set to "no parent"
if parent is set to any string, validate all related attributes.
@@ -346,6 +359,7 @@ def check_parentExpID(table_id):
ierr = _cmip6_cv.check_parentExpID(table_id)
return(ierr)
+
def check_ISOTime():
'''
Validate that creation attribute contains time
@@ -359,10 +373,11 @@ def check_ISOTime():
return(ierr)
-def setup_variable(name, units, missing, startime, endtime, startimebnds, endtimebnds):
+def setup_variable(name, units, missing, startime,
+ endtime, startimebnds, endtimebnds):
'''
Create variable attributes from the table loaded by load_table.
-
+
Usage:
cmip6_cv.check_variable( name, units, missing )
Where:
@@ -376,8 +391,17 @@ def setup_variable(name, units, missing, startime, endtime, startimebnds, endtim
return: variable_id on success
-1 on failure
'''
- ierr = _cmip6_cv.setup_variable(name, units, missing, startime, endtime, startimebnds, endtimebnds)
+ ierr = _cmip6_cv.setup_variable(
+ name,
+ units,
+ missing,
+ startime,
+ endtime,
+ startimebnds,
+ endtimebnds)
return(ierr)
+
+
def get_CV_Error():
'''
return 0 if no error was set by CV
@@ -385,6 +409,7 @@ def get_CV_Error():
ierr = _cmip6_cv.get_CV_Error()
return(ierr)
+
def set_CV_Error():
'''
set CV_ERROR to 1.
@@ -392,6 +417,7 @@ def set_CV_Error():
_cmip6_cv.set_CV_Error()
return
+
def check_furtherinfourl(table_id):
'''
Validate further info URL attribute using REGEX found in Control Vocabulary file.
@@ -404,6 +430,3 @@ def check_furtherinfourl(table_id):
'''
ierr = _cmip6_cv.check_furtherinfourl(table_id)
return(ierr)
-
-
-
diff --git a/Makefile.in b/Makefile.in
index 25259f6..934d48e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -6,6 +6,7 @@ CPPFLAGS_USER=""
USERFFLAGS=@USERFFLAGS@
#MODULE_SUFFIX="mod"
PREFIX=@prefix@
+PYTHONPATH=@prefix@/lib/python2.7/site-packages
FCFLAGS=@FCFLAGS@
PYTHONEXEC=@PYTHONEXEC@
NO_COLOR2=\x1b[0m
@@ -145,6 +146,7 @@ ifeq ($(UNAME), Linux)
endif
python:
@echo "Building Python interface"
+ @if [ ! -d "${PYTHONPATH}" ]; then mkdir -p ${PYTHONPATH}; fi
@${PYTHONEXEC} setup.py install @CDATPREFIX@
test_a_python:
@echo "${OK_COLOR}Testing ${TEST_NAME} ${NO_COLOR}"
@@ -195,7 +197,7 @@ test_python: python
env TEST_NAME=Test/test_python_1D_var.py make test_a_python
env TEST_NAME=Test/test_python_2Gb_file.py make test_a_python
env TEST_NAME=Test/test_python_2Gb_slice.py make test_a_python
- env TEST_NAME=Test/test_python_3hr.py make test_a_python
+# env TEST_NAME=Test/test_python_3hr.py make test_a_python
env TEST_NAME=Test/test_python_YYYMMDDHH_exp_fmt.py make test_a_python
# @env TEST_NAME=Test/test_python_alastair_1.py make test_a_python
env TEST_NAME=Test/test_python_cfmip_site_axis_test.py make test_a_python
@@ -207,10 +209,11 @@ test_python: python
env TEST_NAME=Test/test_python_reverted_lats.py make test_a_python
env TEST_NAME=Test/test_lon_gt_360.py make test_a_python
env TEST_NAME=Test/test_lon_thro_360.py make test_a_python
- env TEST_NAME=Test/test_python_jamie_11.py make test_a_python
+# env TEST_NAME=Test/test_python_jamie_11.py make test_a_python
env TEST_NAME=Test/test_python_joerg_tim2_clim_02.py make test_a_python
env TEST_NAME=Test/test_site_ts.py make test_a_python
env TEST_NAME=Test/test_python_free_wrapping_issue.py make test_a_python
+ env TEST_NAME=Test/test_python_filename_time_range.py make test_a_python
test_case:
@echo "${OK_COLOR}Testing: "${TEST_NAME}" with input file: ${INPUT_FILE}${NO_COLOR}"
diff --git a/README.md b/README.md
index 3ce9b33..554f900 100644
--- a/README.md
+++ b/README.md
@@ -4,9 +4,8 @@ Climate Model Output Rewriter
CMOR 3.2 documentation can be found here: http://cmor.llnl.gov
-
-[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.556207.svg)](https://doi.org/10.5281/zenodo.556207)
-[![stable version](https://img.shields.io/badge/stable%20version-3.2.3-brightgreen.svg)](https://github.com/PCMDI/cmor/releases/tag/3.2.3)
+[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.810184.svg)](https://doi.org/10.5281/zenodo.810184)
+[![stable version](https://img.shields.io/badge/stable%20version-3.2.4-brightgreen.svg)](https://github.com/PCMDI/cmor/releases/tag/3.2.4)
![platforms](https://img.shields.io/badge/platforms-linux%20|%20osx-lightgrey.svg)
[![Anaconda-Server Badge](https://anaconda.org/pcmdi/cmor/badges/installer/conda.svg)](https://conda.anaconda.org/pcmdi)
[![Anaconda-Server Badge](https://anaconda.org/pcmdi/cmor/badges/downloads.svg)](https://anaconda.org/pcmdi)
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index e1e9e3c..bf1a239 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,3 +1,5 @@
+2017-06-16 : Release 3.2.4
+2017-04-19 : Release 3.2.3
2017-02-22 : Release 3.2.2
2016-11-23 : Release 3.2.0
2016-09-08 : Release 3.1.2
diff --git a/Src/_cmormodule.c b/Src/_cmormodule.c
index c6d454f..6c1a7f4 100644
--- a/Src/_cmormodule.c
+++ b/Src/_cmormodule.c
@@ -6,10 +6,11 @@
static PyObject *CMORError;
volatile sig_atomic_t raise_exception = 0;
char *exception_message = "Problem with 'cmor.%s'. Please check the logfile "
- "(if defined).";
+ "(if defined).";
int signal_to_catch = SIGTERM;
-void signal_handler(int signal) {
+void signal_handler(int signal)
+{
if (signal == signal_to_catch) {
raise_exception = 1;
}
@@ -19,312 +20,311 @@ void signal_handler(int signal) {
/* PyCMOR_get_original_shape() */
/************************************************************************/
-static PyObject *PyCMOR_get_original_shape( PyObject * self,
- PyObject * args ) {
+static PyObject *PyCMOR_get_original_shape(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
- int i, shape_array[CMOR_MAX_DIMENSIONS], var_id, blank_time;
+ int i, shape_array[CMOR_MAX_DIMENSIONS], var_id, blank_time;
i = CMOR_MAX_DIMENSIONS;
PyObject *mylist;
- if( !PyArg_ParseTuple( args, "ii", &var_id, &blank_time ) )
- return NULL;
- cmor_get_original_shape( &var_id, &shape_array[0], &i,
- blank_time );
+ if (!PyArg_ParseTuple(args, "ii", &var_id, &blank_time))
+ return NULL;
+ cmor_get_original_shape(&var_id, &shape_array[0], &i, blank_time);
- mylist = PyList_New( 0 );
- for( i = 0; i < CMOR_MAX_DIMENSIONS; i++ ) {
- if( shape_array[i] != -1 ) {
- PyList_Append( mylist, PyInt_FromLong( shape_array[i] ) );
- }
+ mylist = PyList_New(0);
+ for (i = 0; i < CMOR_MAX_DIMENSIONS; i++) {
+ if (shape_array[i] != -1) {
+ PyList_Append(mylist, PyInt_FromLong(shape_array[i]));
+ }
}
- Py_INCREF( mylist );
-
+ Py_INCREF(mylist);
+
if (raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "get_original_shape");
return NULL;
}
-
- return(mylist);
+
+ return (mylist);
}
/************************************************************************/
/* PyCMOR_set_cur_dataset_attribute() */
/************************************************************************/
-static PyObject *PyCMOR_set_cur_dataset_attribute(PyObject *self,
- PyObject *args) {
- signal(signal_to_catch, signal_handler);
- char *name;
- char *value;
- int ierr;
-
- if( !PyArg_ParseTuple( args, "ss", &name, &value ) )
- return(NULL);
-
- ierr = cmor_set_cur_dataset_attribute(name, value, 1);
-
- if (ierr != 0 || raise_exception) {
- raise_exception = 0;
- PyErr_Format(CMORError, exception_message, "set_cur_dataset_attribute");
- return NULL;
- }
-
- return( Py_BuildValue( "i", ierr ));
+static PyObject *PyCMOR_set_cur_dataset_attribute(PyObject * self,
+ PyObject * args)
+{
+ signal(signal_to_catch, signal_handler);
+ char *name;
+ char *value;
+ int ierr;
+
+ if (!PyArg_ParseTuple(args, "ss", &name, &value))
+ return (NULL);
+
+ ierr = cmor_set_cur_dataset_attribute(name, value, 1);
+
+ if (ierr != 0 || raise_exception) {
+ raise_exception = 0;
+ PyErr_Format(CMORError, exception_message, "set_cur_dataset_attribute");
+ return NULL;
+ }
+
+ return (Py_BuildValue("i", ierr));
}
/************************************************************************/
/* PyCMOR_get_cur_dataset_attribute() */
/************************************************************************/
-static PyObject *PyCMOR_get_cur_dataset_attribute( PyObject * self,
- PyObject * args ) {
+static PyObject *PyCMOR_get_cur_dataset_attribute(PyObject * self,
+ PyObject * args)
+{
signal(signal_to_catch, signal_handler);
char *name;
char value[CMOR_MAX_STRING];
int ierr;
- if( !PyArg_ParseTuple( args, "s", &name ) )
- return NULL;
-
- ierr = cmor_get_cur_dataset_attribute( name, value );
-
+ if (!PyArg_ParseTuple(args, "s", &name))
+ return NULL;
+
+ ierr = cmor_get_cur_dataset_attribute(name, value);
+
if (ierr != 0 || raise_exception) {
raise_exception = 0;
- PyErr_Format(CMORError, exception_message,
- "get_cur_dataset_attribute");
+ PyErr_Format(CMORError, exception_message, "get_cur_dataset_attribute");
return NULL;
}
- return( Py_BuildValue( "s", value ));
+ return (Py_BuildValue("s", value));
}
/************************************************************************/
/* PyCMOR_has_cur_dataset_attribute() */
/************************************************************************/
-static PyObject *PyCMOR_has_cur_dataset_attribute( PyObject * self,
- PyObject * args ) {
+static PyObject *PyCMOR_has_cur_dataset_attribute(PyObject * self,
+ PyObject * args)
+{
signal(signal_to_catch, signal_handler);
char *name;
int ierr;
- if( !PyArg_ParseTuple( args, "s", &name ) )
- return NULL;
- ierr = cmor_has_cur_dataset_attribute( name );
+ if (!PyArg_ParseTuple(args, "s", &name))
+ return NULL;
+ ierr = cmor_has_cur_dataset_attribute(name);
if (raise_exception) {
raise_exception = 0;
- PyErr_Format(CMORError, exception_message,
- "has_cur_dataset_attribute");
+ PyErr_Format(CMORError, exception_message, "has_cur_dataset_attribute");
return NULL;
}
-
- return( Py_BuildValue( "i", ierr ));
+
+ return (Py_BuildValue("i", ierr));
}
/************************************************************************/
/* PyCMOR_set_deflate() */
/************************************************************************/
-static PyObject *PyCMOR_set_deflate( PyObject * self,
- PyObject * args ) {
+static PyObject *PyCMOR_set_deflate(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int ierr, var_id, shuffle, deflate, deflate_level;
- if( !PyArg_ParseTuple( args, "iiii", &var_id, &shuffle, &deflate, &deflate_level ) )
+ if (!PyArg_ParseTuple
+ (args, "iiii", &var_id, &shuffle, &deflate, &deflate_level))
return NULL;
- ierr = cmor_set_deflate( var_id, shuffle, deflate, deflate_level );
-
+ ierr = cmor_set_deflate(var_id, shuffle, deflate, deflate_level);
+
if (ierr != 0 || raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "set_deflate");
return NULL;
}
-
- return( Py_BuildValue( "i", ierr ));
+
+ return (Py_BuildValue("i", ierr));
}
/************************************************************************/
/* PyCMOR_set_variable_attribute() */
/************************************************************************/
-static PyObject *PyCMOR_set_variable_attribute( PyObject * self,
- PyObject * args ) {
+static PyObject *PyCMOR_set_variable_attribute(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
char *name;
char *value;
int ierr, var_id;
- if( !PyArg_ParseTuple( args, "iss", &var_id, &name, &value ) )
- return NULL;
-
- ierr =
- cmor_set_variable_attribute( var_id, name, 'c', ( void * ) value );
-
+ if (!PyArg_ParseTuple(args, "iss", &var_id, &name, &value))
+ return NULL;
+
+ ierr = cmor_set_variable_attribute(var_id, name, 'c', (void *)value);
+
if (ierr != 0 || raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "set_variable_attribute");
return NULL;
}
-
- return( Py_BuildValue( "i", ierr ));
+
+ return (Py_BuildValue("i", ierr));
}
/************************************************************************/
/* PyCMOR_get_variable_attribute() */
/************************************************************************/
-static PyObject *PyCMOR_get_variable_attribute( PyObject * self,
- PyObject * args ) {
+static PyObject *PyCMOR_get_variable_attribute(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
char *name;
char value[CMOR_MAX_STRING];
int ierr, var_id;
- if( !PyArg_ParseTuple( args, "is", &var_id, &name ) )
- return NULL;
-
- ierr = cmor_get_variable_attribute( var_id, name, ( void * ) value );
-
+ if (!PyArg_ParseTuple(args, "is", &var_id, &name))
+ return NULL;
+
+ ierr = cmor_get_variable_attribute(var_id, name, (void *)value);
+
if (ierr != 0 || raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "get_variable_attribute");
return NULL;
}
- return( Py_BuildValue( "s", value ));
+ return (Py_BuildValue("s", value));
}
/************************************************************************/
/* PyCMOR_has_variable_attribute() */
/************************************************************************/
-static PyObject *PyCMOR_has_variable_attribute( PyObject * self,
- PyObject * args ) {
+static PyObject *PyCMOR_has_variable_attribute(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
char *name;
int ierr, var_id;
- if( !PyArg_ParseTuple( args, "is", &var_id, &name ) )
- return NULL;
-
- ierr = cmor_has_variable_attribute( var_id, name );
-
+ if (!PyArg_ParseTuple(args, "is", &var_id, &name))
+ return NULL;
+
+ ierr = cmor_has_variable_attribute(var_id, name);
+
if (raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "has_variable_attribute");
return NULL;
}
-
- return( Py_BuildValue( "i", ierr ));
+
+ return (Py_BuildValue("i", ierr));
}
/************************************************************************/
/* PyCMOR_setup() */
/************************************************************************/
-static PyObject *PyCMOR_setup( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_setup(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int mode, ierr, netcdf, verbosity, createsub;
char *path;
char *logfile;
- if( !PyArg_ParseTuple
- ( args, "siiisi", &path, &netcdf, &verbosity, &mode, &logfile,
- &createsub ) )
- return NULL;
- if( strcmp( logfile, "" ) == 0 ) {
- ierr =
- cmor_setup( path, &netcdf, &verbosity, &mode, NULL,
- &createsub );
+ if (!PyArg_ParseTuple
+ (args, "siiisi", &path, &netcdf, &verbosity, &mode, &logfile,
+ &createsub))
+ return NULL;
+ if (strcmp(logfile, "") == 0) {
+ ierr = cmor_setup(path, &netcdf, &verbosity, &mode, NULL, &createsub);
} else {
- ierr =
- cmor_setup( path, &netcdf, &verbosity, &mode, logfile,
- &createsub );
+ ierr =
+ cmor_setup(path, &netcdf, &verbosity, &mode, logfile, &createsub);
}
-
+
if (ierr != 0 || raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "setup");
return NULL;
}
-
- return( Py_BuildValue( "i", ierr ));
+
+ return (Py_BuildValue("i", ierr));
}
/************************************************************************/
/* PyCMOR_getincvalues() */
/************************************************************************/
-static PyObject *PyCMOR_getincvalues( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_getincvalues(PyObject * self, PyObject * args)
+{
char *att_name;
- if( !PyArg_ParseTuple( args, "s", &att_name ) ) {
- return NULL;
+ if (!PyArg_ParseTuple(args, "s", &att_name)) {
+ return NULL;
}
- if( strcmp( att_name, "CMOR_MAX_STRING" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_MAX_STRING ));
- } else if( strcmp( att_name, "CMOR_MAX_ELEMENTS" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_MAX_ELEMENTS ));
- } else if( strcmp( att_name, "CMOR_MAX_AXES" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_MAX_AXES ));
- } else if( strcmp( att_name, "CMOR_MAX_VARIABLES" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_MAX_VARIABLES ));
- } else if( strcmp( att_name, "CMOR_MAX_GRIDS" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_MAX_GRIDS ));
- } else if( strcmp( att_name, "CMOR_MAX_DIMENSIONS" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_MAX_DIMENSIONS ));
- } else if( strcmp( att_name, "CMOR_MAX_ATTRIBUTES" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_MAX_ATTRIBUTES ));
- } else if( strcmp( att_name, "CMOR_MAX_ERRORS" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_MAX_ERRORS ));
- } else if( strcmp( att_name, "CMOR_MAX_TABLES" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_MAX_TABLES ));
- } else if( strcmp( att_name, "CMOR_MAX_GRID_ATTRIBUTES" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_MAX_GRID_ATTRIBUTES ));
- } else if( strcmp( att_name, "CMOR_QUIET" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_QUIET ));
- } else if( strcmp( att_name, "CMOR_EXIT_ON_MAJOR" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_EXIT_ON_MAJOR ));
- } else if( strcmp( att_name, "CMOR_EXIT" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_EXIT ));
- } else if( strcmp( att_name, "CMOR_EXIT_ON_WARNING" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_EXIT_ON_WARNING ));
- } else if( strcmp( att_name, "CMOR_VERSION_MAJOR" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_VERSION_MAJOR ));
- } else if( strcmp( att_name, "CMOR_VERSION_MINOR" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_VERSION_MINOR ));
- } else if( strcmp( att_name, "CMOR_VERSION_PATCH" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_VERSION_PATCH ));
- } else if( strcmp( att_name, "CMOR_CF_VERSION_MAJOR" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_CF_VERSION_MAJOR ));
- } else if( strcmp( att_name, "CMOR_CF_VERSION_MINOR" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_CF_VERSION_MINOR ));
- } else if( strcmp( att_name, "CMOR_WARNING" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_WARNING ));
- } else if( strcmp( att_name, "CMOR_NORMAL" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_NORMAL ));
- } else if( strcmp( att_name, "CMOR_CRITICAL" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_CRITICAL ));
- } else if( strcmp( att_name, "CMOR_N_VALID_CALS" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_N_VALID_CALS ));
- } else if( strcmp( att_name, "CMOR_PRESERVE" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_PRESERVE ));
- } else if( strcmp( att_name, "CMOR_APPEND" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_APPEND ));
- } else if( strcmp( att_name, "CMOR_REPLACE" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_REPLACE ));
- } else if( strcmp( att_name, "CMOR_PRESERVE_3" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_PRESERVE_3 ));
- } else if( strcmp( att_name, "CMOR_APPEND_3" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_APPEND_3 ));
- } else if( strcmp( att_name, "CMOR_REPLACE_3" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_REPLACE_3 ));
- } else if( strcmp( att_name, "CMOR_PRESERVE_4" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_PRESERVE_4 ));
- } else if( strcmp( att_name, "CMOR_APPEND_4" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_APPEND_4 ));
- } else if( strcmp( att_name, "CMOR_REPLACE_4" ) == 0 ) {
- return( Py_BuildValue( "i", CMOR_REPLACE_4 ));
+ if (strcmp(att_name, "CMOR_MAX_STRING") == 0) {
+ return (Py_BuildValue("i", CMOR_MAX_STRING));
+ } else if (strcmp(att_name, "CMOR_MAX_ELEMENTS") == 0) {
+ return (Py_BuildValue("i", CMOR_MAX_ELEMENTS));
+ } else if (strcmp(att_name, "CMOR_MAX_AXES") == 0) {
+ return (Py_BuildValue("i", CMOR_MAX_AXES));
+ } else if (strcmp(att_name, "CMOR_MAX_VARIABLES") == 0) {
+ return (Py_BuildValue("i", CMOR_MAX_VARIABLES));
+ } else if (strcmp(att_name, "CMOR_MAX_GRIDS") == 0) {
+ return (Py_BuildValue("i", CMOR_MAX_GRIDS));
+ } else if (strcmp(att_name, "CMOR_MAX_DIMENSIONS") == 0) {
+ return (Py_BuildValue("i", CMOR_MAX_DIMENSIONS));
+ } else if (strcmp(att_name, "CMOR_MAX_ATTRIBUTES") == 0) {
+ return (Py_BuildValue("i", CMOR_MAX_ATTRIBUTES));
+ } else if (strcmp(att_name, "CMOR_MAX_ERRORS") == 0) {
+ return (Py_BuildValue("i", CMOR_MAX_ERRORS));
+ } else if (strcmp(att_name, "CMOR_MAX_TABLES") == 0) {
+ return (Py_BuildValue("i", CMOR_MAX_TABLES));
+ } else if (strcmp(att_name, "CMOR_MAX_GRID_ATTRIBUTES") == 0) {
+ return (Py_BuildValue("i", CMOR_MAX_GRID_ATTRIBUTES));
+ } else if (strcmp(att_name, "CMOR_QUIET") == 0) {
+ return (Py_BuildValue("i", CMOR_QUIET));
+ } else if (strcmp(att_name, "CMOR_EXIT_ON_MAJOR") == 0) {
+ return (Py_BuildValue("i", CMOR_EXIT_ON_MAJOR));
+ } else if (strcmp(att_name, "CMOR_EXIT") == 0) {
+ return (Py_BuildValue("i", CMOR_EXIT));
+ } else if (strcmp(att_name, "CMOR_EXIT_ON_WARNING") == 0) {
+ return (Py_BuildValue("i", CMOR_EXIT_ON_WARNING));
+ } else if (strcmp(att_name, "CMOR_VERSION_MAJOR") == 0) {
+ return (Py_BuildValue("i", CMOR_VERSION_MAJOR));
+ } else if (strcmp(att_name, "CMOR_VERSION_MINOR") == 0) {
+ return (Py_BuildValue("i", CMOR_VERSION_MINOR));
+ } else if (strcmp(att_name, "CMOR_VERSION_PATCH") == 0) {
+ return (Py_BuildValue("i", CMOR_VERSION_PATCH));
+ } else if (strcmp(att_name, "CMOR_CF_VERSION_MAJOR") == 0) {
+ return (Py_BuildValue("i", CMOR_CF_VERSION_MAJOR));
+ } else if (strcmp(att_name, "CMOR_CF_VERSION_MINOR") == 0) {
+ return (Py_BuildValue("i", CMOR_CF_VERSION_MINOR));
+ } else if (strcmp(att_name, "CMOR_WARNING") == 0) {
+ return (Py_BuildValue("i", CMOR_WARNING));
+ } else if (strcmp(att_name, "CMOR_NORMAL") == 0) {
+ return (Py_BuildValue("i", CMOR_NORMAL));
+ } else if (strcmp(att_name, "CMOR_CRITICAL") == 0) {
+ return (Py_BuildValue("i", CMOR_CRITICAL));
+ } else if (strcmp(att_name, "CMOR_N_VALID_CALS") == 0) {
+ return (Py_BuildValue("i", CMOR_N_VALID_CALS));
+ } else if (strcmp(att_name, "CMOR_PRESERVE") == 0) {
+ return (Py_BuildValue("i", CMOR_PRESERVE));
+ } else if (strcmp(att_name, "CMOR_APPEND") == 0) {
+ return (Py_BuildValue("i", CMOR_APPEND));
+ } else if (strcmp(att_name, "CMOR_REPLACE") == 0) {
+ return (Py_BuildValue("i", CMOR_REPLACE));
+ } else if (strcmp(att_name, "CMOR_PRESERVE_3") == 0) {
+ return (Py_BuildValue("i", CMOR_PRESERVE_3));
+ } else if (strcmp(att_name, "CMOR_APPEND_3") == 0) {
+ return (Py_BuildValue("i", CMOR_APPEND_3));
+ } else if (strcmp(att_name, "CMOR_REPLACE_3") == 0) {
+ return (Py_BuildValue("i", CMOR_REPLACE_3));
+ } else if (strcmp(att_name, "CMOR_PRESERVE_4") == 0) {
+ return (Py_BuildValue("i", CMOR_PRESERVE_4));
+ } else if (strcmp(att_name, "CMOR_APPEND_4") == 0) {
+ return (Py_BuildValue("i", CMOR_APPEND_4));
+ } else if (strcmp(att_name, "CMOR_REPLACE_4") == 0) {
+ return (Py_BuildValue("i", CMOR_REPLACE_4));
} else {
- /* Return NULL Python Object */
- Py_INCREF( Py_None );
- return( Py_None);
+ /* Return NULL Python Object */
+ Py_INCREF(Py_None);
+ return (Py_None);
}
}
@@ -332,8 +332,9 @@ static PyObject *PyCMOR_getincvalues( PyObject * self, PyObject * args ) {
/* PyCMOR_getFinalFilename() */
/************************************************************************/
-static PyObject *PyCMOR_getFinalFilename( PyObject * self, PyObject * args ) {
- return(Py_BuildValue( "s", cmor_getFinalFilename()));
+static PyObject *PyCMOR_getFinalFilename(PyObject * self, PyObject * args)
+{
+ return (Py_BuildValue("s", cmor_getFinalFilename()));
}
@@ -341,54 +342,57 @@ static PyObject *PyCMOR_getFinalFilename( PyObject * self, PyObject * args ) {
/* PyCMOR_dataset_json() */
/************************************************************************/
-static PyObject *PyCMOR_dataset_json( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_dataset_json(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int ierr;
char *rcfile;
- if( !PyArg_ParseTuple( args, "s", &rcfile ) ) {
- return( Py_BuildValue( "i", -1));
+ if (!PyArg_ParseTuple(args, "s", &rcfile)) {
+ return (Py_BuildValue("i", -1));
}
- ierr = cmor_dataset_json( rcfile );
-
+ ierr = cmor_dataset_json(rcfile);
+
if (ierr != 0 || raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "dataset_json");
return NULL;
}
-
- return( Py_BuildValue( "i", ierr));
+
+ return (Py_BuildValue("i", ierr));
}
/************************************************************************/
/* PyCMOR_load_table() */
/************************************************************************/
-static PyObject *PyCMOR_load_table( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_load_table(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int ierr, table_id;
char *table;
- if( !PyArg_ParseTuple( args, "s", &table ) )
- return NULL;
-
- ierr = cmor_load_table( table, &table_id );
-
+ if (!PyArg_ParseTuple(args, "s", &table))
+ return NULL;
+
+ ierr = cmor_load_table(table, &table_id);
+
if (ierr != 0 || raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "load_table");
return NULL;
}
- return( Py_BuildValue( "i", table_id ));
+ return (Py_BuildValue("i", table_id));
}
/************************************************************************/
/* PyCMOR_axis() */
/************************************************************************/
-static PyObject *PyCMOR_axis( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_axis(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int ierr, axis_id, n = 0;
char *name;
@@ -407,75 +411,68 @@ static PyObject *PyCMOR_axis( PyObject * self, PyObject * args ) {
/* HUGE assumtion here is that the data is contiguous! */
/************************************************************************/
- if( !PyArg_ParseTuple
- ( args, "ssiOcOis", &name, &units, &length, &coords_obj, &type,
- &bounds_obj, &cell_bounds_ndim, &interval ) )
- return NULL;
+ if (!PyArg_ParseTuple
+ (args, "ssiOcOis", &name, &units, &length, &coords_obj, &type,
+ &bounds_obj, &cell_bounds_ndim, &interval))
+ return NULL;
- if( coords_obj == Py_None ) {
- coord_vals = NULL;
+ if (coords_obj == Py_None) {
+ coord_vals = NULL;
} else {
- coords =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( coords_obj,
- NPY_NOTYPE,
- 1, 0 );
-
- if( PyArray_NDIM(coords) != 1 ) {
- printf
- ( "ok we need to pass contiguous flattened arrays only!\n" );
- return NULL;
- }
-
- if( type != 'c' ) {
- coord_vals = ( void * ) PyArray_DATA(coords);
- n = cell_bounds_ndim;
- } else {
- tmpstr =
- ( char * ) malloc( sizeof ( char ) * length *
- ( cell_bounds_ndim + 1 ) );
- for( ierr = 0; ierr < length; ierr++ ) {
- coord_vals = ( void * ) PyArray_GETPTR1( coords, ierr );
- strncpy( &tmpstr[ierr * ( cell_bounds_ndim + 1 )],
- coord_vals, cell_bounds_ndim );
- tmpstr[ierr * ( cell_bounds_ndim + 1 ) +
- cell_bounds_ndim] = '\0';
- }
- coord_vals = &tmpstr[0];
- n = cell_bounds_ndim + 1;
- for( ierr = 0; ierr < length; ierr++ ) {
- }
- }
- }
-
- if( bounds_obj == Py_None ) {
- cell_bounds = NULL;
+ coords =
+ (PyArrayObject *) PyArray_ContiguousFromObject(coords_obj,
+ NPY_NOTYPE, 1, 0);
+
+ if (PyArray_NDIM(coords) != 1) {
+ printf("ok we need to pass contiguous flattened arrays only!\n");
+ return NULL;
+ }
+
+ if (type != 'c') {
+ coord_vals = (void *)PyArray_DATA(coords);
+ n = cell_bounds_ndim;
+ } else {
+ tmpstr =
+ (char *)malloc(sizeof(char) * length * (cell_bounds_ndim + 1));
+ for (ierr = 0; ierr < length; ierr++) {
+ coord_vals = (void *)PyArray_GETPTR1(coords, ierr);
+ strncpy(&tmpstr[ierr * (cell_bounds_ndim + 1)],
+ coord_vals, cell_bounds_ndim);
+ tmpstr[ierr * (cell_bounds_ndim + 1) + cell_bounds_ndim] = '\0';
+ }
+ coord_vals = &tmpstr[0];
+ n = cell_bounds_ndim + 1;
+ for (ierr = 0; ierr < length; ierr++) {
+ }
+ }
+ }
+
+ if (bounds_obj == Py_None) {
+ cell_bounds = NULL;
} else {
- bounds =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( bounds_obj,
- NPY_NOTYPE,
- 1, 0 );
- if( PyArray_NDIM(bounds) != 1 ) {
- printf
- ( "ok we need to pass contiguous flattened arrays only!\n" );
- return NULL;
- }
- cell_bounds = ( void * ) PyArray_DATA(bounds);
+ bounds =
+ (PyArrayObject *) PyArray_ContiguousFromObject(bounds_obj,
+ NPY_NOTYPE, 1, 0);
+ if (PyArray_NDIM(bounds) != 1) {
+ printf("ok we need to pass contiguous flattened arrays only!\n");
+ return NULL;
+ }
+ cell_bounds = (void *)PyArray_DATA(bounds);
}
ierr =
- cmor_axis( &axis_id, name, units, length, coord_vals, type,
- cell_bounds, n, interval );
-
+ cmor_axis(&axis_id, name, units, length, coord_vals, type,
+ cell_bounds, n, interval);
- if( coords != NULL ) {
- Py_DECREF( coords );
+ if (coords != NULL) {
+ Py_DECREF(coords);
}
- if( bounds != NULL ) {
- Py_DECREF( bounds );
+ if (bounds != NULL) {
+ Py_DECREF(bounds);
}
- if( type == 'c' ) {
- free( tmpstr );
+ if (type == 'c') {
+ free(tmpstr);
}
if (ierr != 0 || raise_exception) {
@@ -484,32 +481,34 @@ static PyObject *PyCMOR_axis( PyObject * self, PyObject * args ) {
return NULL;
}
- return( Py_BuildValue( "i", axis_id ));
+ return (Py_BuildValue("i", axis_id));
}
/************************************************************************/
/* PyCMOR_set_table() */
/************************************************************************/
-static PyObject *PyCMOR_set_table( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_set_table(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int table, ierr;
- if( !PyArg_ParseTuple( args, "i", &table ) )
- return NULL;
-
- ierr = cmor_set_table( table );
-
+ if (!PyArg_ParseTuple(args, "i", &table))
+ return NULL;
+
+ ierr = cmor_set_table(table);
+
if (ierr != 0 || raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "set_table");
return NULL;
}
-
- return( Py_BuildValue( "i", ierr));
+
+ return (Py_BuildValue("i", ierr));
}
-static PyObject *PyCMOR_variable( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_variable(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int ierr, var_id;
char *name;
@@ -531,59 +530,58 @@ static PyObject *PyCMOR_variable( PyObject * self, PyObject * args ) {
PyArrayObject *axes = NULL;
/* HUGE assumtion here is that the data is contiguous! */
- if( !PyArg_ParseTuple
- ( args, "ssiOcOdssss", &name, &units, &ndims, &axes_obj, &type,
- &missing_obj, &tol, &positive, &original_name, &history,
- &comment ) )
- return NULL;
+ if (!PyArg_ParseTuple
+ (args, "ssiOcOdssss", &name, &units, &ndims, &axes_obj, &type,
+ &missing_obj, &tol, &positive, &original_name, &history, &comment))
+ return NULL;
axes =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( axes_obj,
- NPY_NOTYPE,
- 1, 0 );
+ (PyArrayObject *) PyArray_ContiguousFromObject(axes_obj,
+ NPY_NOTYPE, 1, 0);
- if( PyArray_NDIM(axes) != 1 ) {
- printf( "ok we need to pass contiguous flattened arrays only!\n" );
- return NULL;
+ if (PyArray_NDIM(axes) != 1) {
+ printf("ok we need to pass contiguous flattened arrays only!\n");
+ return NULL;
}
- axes_ids = ( int * ) PyArray_DATA(axes);
+ axes_ids = (int *)PyArray_DATA(axes);
- if( missing_obj == Py_None ) {
- pass_missing = NULL;
+ if (missing_obj == Py_None) {
+ pass_missing = NULL;
} else {
- missing = PyFloat_AsDouble( missing_obj );
- if( type == 'd' )
- pass_missing = &missing;
- else if( type == 'f' ) {
- fmissing = ( float ) missing;
- pass_missing = &fmissing;
- } else if( type == 'l' ) {
- lmissing = ( long ) missing;
- pass_missing = &lmissing;
- } else if( type == 'i' ) {
- imissing = ( int ) missing;
- pass_missing = &imissing;
- }
+ missing = PyFloat_AsDouble(missing_obj);
+ if (type == 'd')
+ pass_missing = &missing;
+ else if (type == 'f') {
+ fmissing = (float)missing;
+ pass_missing = &fmissing;
+ } else if (type == 'l') {
+ lmissing = (long)missing;
+ pass_missing = &lmissing;
+ } else if (type == 'i') {
+ imissing = (int)missing;
+ pass_missing = &imissing;
+ }
}
ierr =
- cmor_variable( &var_id, name, units, ndims, axes_ids, type,
- pass_missing, &tol, positive, original_name,
- history, comment );
- if( axes != NULL ) {
- Py_DECREF( axes );
+ cmor_variable(&var_id, name, units, ndims, axes_ids, type,
+ pass_missing, &tol, positive, original_name,
+ history, comment);
+ if (axes != NULL) {
+ Py_DECREF(axes);
}
-
+
if (ierr != 0 || raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "variable");
return NULL;
}
-
- return( Py_BuildValue( "i", var_id ));
+
+ return (Py_BuildValue("i", var_id));
}
-static PyObject *PyCMOR_zfactor( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_zfactor(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int ierr, zvar_id;
int itmp;
@@ -601,71 +599,67 @@ static PyObject *PyCMOR_zfactor( PyObject * self, PyObject * args ) {
/* HUGE assumtion here is that the data is contiguous! */
/* -------------------------------------------------------------------- */
- if( !PyArg_ParseTuple
- ( args, "issiOcOO", &axis_id, &name, &units, &ndims, &axes_obj,
- &type, &values_obj, &bounds_obj ) )
- return NULL;
+ if (!PyArg_ParseTuple
+ (args, "issiOcOO", &axis_id, &name, &units, &ndims, &axes_obj,
+ &type, &values_obj, &bounds_obj))
+ return NULL;
- if( axes_obj == Py_None ) {
- axes_ids = NULL;
+ if (axes_obj == Py_None) {
+ axes_ids = NULL;
} else {
- if( ndims > 1 ) {
- axes =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( axes_obj,
- NPY_NOTYPE,
- 1, 0 );
- axes_ids = ( void * ) PyArray_DATA(axes);
- } else {
- itmp = ( int ) PyInt_AsLong( axes_obj );
- axes_ids = &itmp;
- }
- }
-
-
- if( values_obj == Py_None ) {
- values = NULL;
+ if (ndims > 1) {
+ axes =
+ (PyArrayObject *) PyArray_ContiguousFromObject(axes_obj,
+ NPY_NOTYPE, 1, 0);
+ axes_ids = (void *)PyArray_DATA(axes);
+ } else {
+ itmp = (int)PyInt_AsLong(axes_obj);
+ axes_ids = &itmp;
+ }
+ }
+
+ if (values_obj == Py_None) {
+ values = NULL;
} else {
- values_array =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( values_obj,
- NPY_NOTYPE,
- 1, 0 );
- values = ( void * ) PyArray_DATA(values_array);
+ values_array =
+ (PyArrayObject *) PyArray_ContiguousFromObject(values_obj,
+ NPY_NOTYPE, 1, 0);
+ values = (void *)PyArray_DATA(values_array);
}
- if( bounds_obj == Py_None ) {
- bounds = NULL;
+ if (bounds_obj == Py_None) {
+ bounds = NULL;
} else {
- bounds_array =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( bounds_obj,
- NPY_NOTYPE,
- 1, 0 );
- bounds = ( void * ) PyArray_DATA(bounds_array);
+ bounds_array =
+ (PyArrayObject *) PyArray_ContiguousFromObject(bounds_obj,
+ NPY_NOTYPE, 1, 0);
+ bounds = (void *)PyArray_DATA(bounds_array);
}
ierr =
- cmor_zfactor( &zvar_id, axis_id, name, units, ndims, axes_ids,
- type, values, bounds );
- if( axes != NULL ) {
- Py_DECREF( axes );
+ cmor_zfactor(&zvar_id, axis_id, name, units, ndims, axes_ids,
+ type, values, bounds);
+ if (axes != NULL) {
+ Py_DECREF(axes);
}
- if( values_array != NULL ) {
- Py_DECREF( values_array );
+ if (values_array != NULL) {
+ Py_DECREF(values_array);
}
- if( bounds_array != NULL ) {
- Py_DECREF( bounds_array );
+ if (bounds_array != NULL) {
+ Py_DECREF(bounds_array);
}
-
+
if (ierr != 0 || raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "zfactor");
return NULL;
}
-
- return( Py_BuildValue( "i", zvar_id ));
-}
+ return (Py_BuildValue("i", zvar_id));
+}
-static PyObject *PyCMOR_grid_mapping( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_grid_mapping(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int ierr;
PyObject *param_nm_obj, *param_val_obj, *param_un_obj, *tmp;
@@ -677,34 +671,33 @@ static PyObject *PyCMOR_grid_mapping( PyObject * self, PyObject * args ) {
char units[CMOR_MAX_GRID_ATTRIBUTES][CMOR_MAX_STRING];
/* HUGE assumtion here is that the data is contiguous! */
- if( !PyArg_ParseTuple
- ( args, "isOOO", &gid, &name, ¶m_nm_obj, ¶m_val_obj,
- ¶m_un_obj ) )
- return NULL;
+ if (!PyArg_ParseTuple
+ (args, "isOOO", &gid, &name, ¶m_nm_obj, ¶m_val_obj,
+ ¶m_un_obj))
+ return NULL;
param_val_arr =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( param_val_obj,
- NPY_NOTYPE,
- 1, 0 );
+ (PyArrayObject *) PyArray_ContiguousFromObject(param_val_obj,
+ NPY_NOTYPE, 1, 0);
param_val = PyArray_DATA(param_val_arr);
- n = PyList_Size( param_nm_obj );
- for( i = 0; i < n; i++ ) {
- tmp = PyList_GetItem( param_nm_obj, i );
- strcpy( nms[i], PyString_AsString( tmp ) );
- //Py_DECREF(tmp); //Not needed get_item does not increase ref
- tmp = PyList_GetItem( param_un_obj, i );
- strcpy( units[i], PyString_AsString( tmp ) );
- //Py_DECREF(tmp); // Not need get_item does not incref
+ n = PyList_Size(param_nm_obj);
+ for (i = 0; i < n; i++) {
+ tmp = PyList_GetItem(param_nm_obj, i);
+ strcpy(nms[i], PyString_AsString(tmp));
+ //Py_DECREF(tmp); //Not needed get_item does not increase ref
+ tmp = PyList_GetItem(param_un_obj, i);
+ strcpy(units[i], PyString_AsString(tmp));
+ //Py_DECREF(tmp); // Not need get_item does not incref
}
ierr =
- cmor_set_grid_mapping( gid, name, n, ( char * ) nms,
- CMOR_MAX_STRING, param_val,
- ( char * ) units, CMOR_MAX_STRING );
+ cmor_set_grid_mapping(gid, name, n, (char *)nms,
+ CMOR_MAX_STRING, param_val,
+ (char *)units, CMOR_MAX_STRING);
- if( param_val_arr != NULL ) {
- Py_DECREF( param_val_arr );
+ if (param_val_arr != NULL) {
+ Py_DECREF(param_val_arr);
}
if (ierr != 0 || raise_exception) {
@@ -712,15 +705,16 @@ static PyObject *PyCMOR_grid_mapping( PyObject * self, PyObject * args ) {
PyErr_Format(CMORError, exception_message, "grid_mapping");
return NULL;
}
-
- return( Py_BuildValue( "i", ierr));
+
+ return (Py_BuildValue("i", ierr));
}
/************************************************************************/
/* PyCMOR_write() */
/************************************************************************/
-static PyObject *PyCMOR_write( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_write(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int ierr, var_id;
PyObject *data_obj = NULL;
@@ -740,61 +734,53 @@ static PyObject *PyCMOR_write( PyObject * self, PyObject * args ) {
int *ref;
int iref;
-
- if( !PyArg_ParseTuple
- ( args, "iOsiOOO", &var_id, &data_obj, &itype, &ntimes,
- ×_obj, ×_bnds_obj, &ref_obj ) )
- return NULL;
+ if (!PyArg_ParseTuple
+ (args, "iOsiOOO", &var_id, &data_obj, &itype, &ntimes,
+ ×_obj, ×_bnds_obj, &ref_obj))
+ return NULL;
data_array =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( data_obj,
- NPY_NOTYPE,
- 1, 0 );
+ (PyArrayObject *) PyArray_ContiguousFromObject(data_obj,
+ NPY_NOTYPE, 1, 0);
data = PyArray_DATA(data_array);
- if( times_obj == Py_None ) {
- times = NULL;
+ if (times_obj == Py_None) {
+ times = NULL;
} else {
- if( ntimes > 1 ) {
- times_array =
- ( PyArrayObject * )
- PyArray_ContiguousFromObject( times_obj, NPY_NOTYPE, 1,
- 0 );
- times = ( void * ) PyArray_DATA(times_array);
- } else {
- itime = ( double ) PyFloat_AsDouble( times_obj );
- times = &itime;
- }
- }
-
- if( times_bnds_obj == Py_None ) {
- times_bnds = NULL;
+ if (ntimes > 1) {
+ times_array = (PyArrayObject *)
+ PyArray_ContiguousFromObject(times_obj, NPY_NOTYPE, 1, 0);
+ times = (void *)PyArray_DATA(times_array);
+ } else {
+ itime = (double)PyFloat_AsDouble(times_obj);
+ times = &itime;
+ }
+ }
+
+ if (times_bnds_obj == Py_None) {
+ times_bnds = NULL;
} else {
- times_bnds_array =
- ( PyArrayObject * )
- PyArray_ContiguousFromObject( times_bnds_obj, NPY_NOTYPE,
- 1, 0 );
- times_bnds = ( void * ) PyArray_DATA(times_bnds_array);
+ times_bnds_array = (PyArrayObject *)
+ PyArray_ContiguousFromObject(times_bnds_obj, NPY_NOTYPE, 1, 0);
+ times_bnds = (void *)PyArray_DATA(times_bnds_array);
}
- if( ref_obj == Py_None ) {
- ref = NULL;
+ if (ref_obj == Py_None) {
+ ref = NULL;
} else {
- iref = ( int ) PyInt_AsLong( ref_obj );
- ref = &iref;
+ iref = (int)PyInt_AsLong(ref_obj);
+ ref = &iref;
}
type = itype[0];
ierr = 0;
- ierr =
- cmor_write( var_id, data, type, ntimes, times, times_bnds,
- ref );
- Py_DECREF( data_array );
- if( times_array != NULL ) {
- Py_DECREF( times_array );
+ ierr = cmor_write(var_id, data, type, ntimes, times, times_bnds, ref);
+ Py_DECREF(data_array);
+ if (times_array != NULL) {
+ Py_DECREF(times_array);
}
- if( times_bnds_array != NULL ) {
- Py_DECREF( times_bnds_array );
+ if (times_bnds_array != NULL) {
+ Py_DECREF(times_bnds_array);
}
if (ierr != 0 || raise_exception) {
@@ -802,15 +788,16 @@ static PyObject *PyCMOR_write( PyObject * self, PyObject * args ) {
PyErr_Format(CMORError, exception_message, "write");
return NULL;
}
-
- return( Py_BuildValue( "i", ierr));
+
+ return (Py_BuildValue("i", ierr));
}
/************************************************************************/
/* PyCMOR_close() */
/************************************************************************/
-static PyObject *PyCMOR_close( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_close(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
PyObject *var;
int varid, ierr;
@@ -819,35 +806,33 @@ static PyObject *PyCMOR_close( PyObject * self, PyObject * args ) {
int preserved_id;
char file_name[CMOR_MAX_STRING];
- if( !PyArg_ParseTuple( args, "Oii", &var, &dofile, &dopreserve ) ) {
- return NULL;
+ if (!PyArg_ParseTuple(args, "Oii", &var, &dofile, &dopreserve)) {
+ return NULL;
}
- if( var == Py_None ) {
- ierr = cmor_close( );
- if( ierr != 0 ) {
- return NULL;
- } else {
- return( Py_BuildValue( "i", ierr ));
- }
+ if (var == Py_None) {
+ ierr = cmor_close();
+ if (ierr != 0) {
+ return NULL;
+ } else {
+ return (Py_BuildValue("i", ierr));
+ }
} else {
- varid = ( int ) PyInt_AsLong( var );
-
- if( dopreserve == 1 ) {
- if( dofile == 1 ) {
- ierr =
- cmor_close_variable( varid, &file_name[0],
- &preserved_id );
- } else {
- ierr = cmor_close_variable( varid, NULL, &preserved_id );
- }
- } else {
- if( dofile == 1 ) {
- ierr = cmor_close_variable( varid, &file_name[0], NULL );
- } else {
- ierr = cmor_close_variable( varid, NULL, NULL );
- }
- }
+ varid = (int)PyInt_AsLong(var);
+
+ if (dopreserve == 1) {
+ if (dofile == 1) {
+ ierr = cmor_close_variable(varid, &file_name[0], &preserved_id);
+ } else {
+ ierr = cmor_close_variable(varid, NULL, &preserved_id);
+ }
+ } else {
+ if (dofile == 1) {
+ ierr = cmor_close_variable(varid, &file_name[0], NULL);
+ } else {
+ ierr = cmor_close_variable(varid, NULL, NULL);
+ }
+ }
}
if (ierr != 0 || raise_exception) {
@@ -855,11 +840,11 @@ static PyObject *PyCMOR_close( PyObject * self, PyObject * args ) {
PyErr_Format(CMORError, exception_message, "close");
return NULL;
} else {
- if( dofile == 1 ) {
- return( Py_BuildValue( "s", file_name ));
- } else {
- return( Py_BuildValue( "i", ierr ));
- }
+ if (dofile == 1) {
+ return (Py_BuildValue("s", file_name));
+ } else {
+ return (Py_BuildValue("i", ierr));
+ }
}
}
@@ -867,8 +852,9 @@ static PyObject *PyCMOR_close( PyObject * self, PyObject * args ) {
/* PyCMOR_time_varying_grid_coordinate() */
/************************************************************************/
-static PyObject *PyCMOR_time_varying_grid_coordinate( PyObject * self,
- PyObject * args ) {
+static PyObject *PyCMOR_time_varying_grid_coordinate(PyObject * self,
+ PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int ierr, grid_id, coord_var_id;
char *table_entry;
@@ -879,20 +865,19 @@ static PyObject *PyCMOR_time_varying_grid_coordinate( PyObject * self,
void *pass_missing;
/* HUGE assumtion here is that the data is contiguous! */
- if( !PyArg_ParseTuple
- ( args, "isscO", &grid_id, &table_entry, &units, &type,
- &missing_obj ) )
- return NULL;
- if( missing_obj == Py_None ) {
- pass_missing = NULL;
+ if (!PyArg_ParseTuple
+ (args, "isscO", &grid_id, &table_entry, &units, &type, &missing_obj))
+ return NULL;
+ if (missing_obj == Py_None) {
+ pass_missing = NULL;
} else {
- missing = PyFloat_AsDouble( missing_obj );
- pass_missing = ( void * ) &missing;
+ missing = PyFloat_AsDouble(missing_obj);
+ pass_missing = (void *)&missing;
}
ierr =
- cmor_time_varying_grid_coordinate( &coord_var_id, grid_id,
- table_entry, units, type,
- pass_missing, NULL );
+ cmor_time_varying_grid_coordinate(&coord_var_id, grid_id,
+ table_entry, units, type,
+ pass_missing, NULL);
if (ierr != 0 || raise_exception) {
raise_exception = 0;
@@ -900,102 +885,97 @@ static PyObject *PyCMOR_time_varying_grid_coordinate( PyObject * self,
"time_varying_grid_coordinate");
return NULL;
}
-
- return( Py_BuildValue( "i", coord_var_id ));
+
+ return (Py_BuildValue("i", coord_var_id));
}
/************************************************************************/
/* PyCMOR_grid() */
/************************************************************************/
-static PyObject *PyCMOR_grid( PyObject * self, PyObject * args ) {
+static PyObject *PyCMOR_grid(PyObject * self, PyObject * args)
+{
signal(signal_to_catch, signal_handler);
int ierr;
PyObject *axes_obj, *lat_obj, *lon_obj, *blat_obj, *blon_obj;
PyArrayObject *axes_arr = NULL, *lat_arr = NULL, *lon_arr = NULL,
- *blat_arr = NULL, *blon_arr = NULL;
+ *blat_arr = NULL, *blon_arr = NULL;
void *axes, *lon, *lat, *blon, *blat;
char type;
int nvert, ndims;
int id;
char itype;
- if( !PyArg_ParseTuple
- ( args, "iOcOOiOO", &ndims, &axes_obj, &itype, &lat_obj, &lon_obj,
- &nvert, &blat_obj, &blon_obj ) )
- return NULL;
+ if (!PyArg_ParseTuple
+ (args, "iOcOOiOO", &ndims, &axes_obj, &itype, &lat_obj, &lon_obj,
+ &nvert, &blat_obj, &blon_obj))
+ return NULL;
type = itype;
axes_arr =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( axes_obj,
- NPY_NOTYPE,
- 1, 0 );
- axes = ( void * ) PyArray_DATA(axes_arr);
+ (PyArrayObject *) PyArray_ContiguousFromObject(axes_obj,
+ NPY_NOTYPE, 1, 0);
+ axes = (void *)PyArray_DATA(axes_arr);
- if( lat_obj == Py_None ) {
- lat = NULL;
+ if (lat_obj == Py_None) {
+ lat = NULL;
} else {
- lat_arr =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( lat_obj,
- NPY_NOTYPE,
- 1, 0 );
- lat = ( void * ) PyArray_DATA(lat_arr);
+ lat_arr =
+ (PyArrayObject *) PyArray_ContiguousFromObject(lat_obj,
+ NPY_NOTYPE, 1, 0);
+ lat = (void *)PyArray_DATA(lat_arr);
}
- if( lon_obj == Py_None ) {
- lon = NULL;
+ if (lon_obj == Py_None) {
+ lon = NULL;
} else {
- lon_arr =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( lon_obj,
- NPY_NOTYPE,
- 1, 0 );
- lon = ( void * ) PyArray_DATA(lon_arr);
+ lon_arr =
+ (PyArrayObject *) PyArray_ContiguousFromObject(lon_obj,
+ NPY_NOTYPE, 1, 0);
+ lon = (void *)PyArray_DATA(lon_arr);
}
- if( blat_obj == Py_None ) {
- blat = NULL;
+ if (blat_obj == Py_None) {
+ blat = NULL;
} else {
- blat_arr =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( blat_obj,
- NPY_NOTYPE,
- 1, 0 );
- blat = ( void * ) PyArray_DATA(blat_arr);
+ blat_arr =
+ (PyArrayObject *) PyArray_ContiguousFromObject(blat_obj,
+ NPY_NOTYPE, 1, 0);
+ blat = (void *)PyArray_DATA(blat_arr);
}
- if( blon_obj == Py_None ) {
- blon = NULL;
+ if (blon_obj == Py_None) {
+ blon = NULL;
} else {
- blon_arr =
- ( PyArrayObject * ) PyArray_ContiguousFromObject( blon_obj,
- NPY_NOTYPE,
- 1, 0 );
- blon = ( void * ) PyArray_DATA(blon_arr);
+ blon_arr =
+ (PyArrayObject *) PyArray_ContiguousFromObject(blon_obj,
+ NPY_NOTYPE, 1, 0);
+ blon = (void *)PyArray_DATA(blon_arr);
}
- ierr =
- cmor_grid( &id, ndims, axes, type, lat, lon, nvert, blat, blon );
+ ierr = cmor_grid(&id, ndims, axes, type, lat, lon, nvert, blat, blon);
- if( axes_arr != NULL ) {
- Py_DECREF( axes_arr );
+ if (axes_arr != NULL) {
+ Py_DECREF(axes_arr);
}
- if( lat_arr != NULL ) {
- Py_DECREF( lat_arr );
+ if (lat_arr != NULL) {
+ Py_DECREF(lat_arr);
}
- if( blat_arr != NULL ) {
- Py_DECREF( blat_arr );
+ if (blat_arr != NULL) {
+ Py_DECREF(blat_arr);
}
- if( lon_arr != NULL ) {
- Py_DECREF( lon_arr );
+ if (lon_arr != NULL) {
+ Py_DECREF(lon_arr);
}
- if( blon_arr != NULL ) {
- Py_DECREF( blon_arr );
+ if (blon_arr != NULL) {
+ Py_DECREF(blon_arr);
}
-
+
if (ierr != 0 || raise_exception) {
raise_exception = 0;
PyErr_Format(CMORError, exception_message, "grid");
return NULL;
}
- return( Py_BuildValue( "i", id ));
+ return (Py_BuildValue("i", id));
}
static PyMethodDef MyExtractMethods[] = {
@@ -1013,7 +993,7 @@ static PyMethodDef MyExtractMethods[] = {
{"set_grid_mapping", PyCMOR_grid_mapping, METH_VARARGS},
{"getCMOR_defaults_include", PyCMOR_getincvalues, METH_VARARGS},
{"close", PyCMOR_close, METH_VARARGS},
- {"set_cur_dataset_attribute",PyCMOR_set_cur_dataset_attribute,
+ {"set_cur_dataset_attribute", PyCMOR_set_cur_dataset_attribute,
METH_VARARGS},
{"get_cur_dataset_attribute", PyCMOR_get_cur_dataset_attribute,
METH_VARARGS},
@@ -1028,13 +1008,14 @@ static PyMethodDef MyExtractMethods[] = {
{"get_original_shape", PyCMOR_get_original_shape, METH_VARARGS},
{"get_final_filename", PyCMOR_getFinalFilename, METH_VARARGS},
{"set_deflate", PyCMOR_set_deflate, METH_VARARGS},
- {NULL, NULL} /*sentinel */
+ {NULL, NULL} /*sentinel */
};
-PyMODINIT_FUNC init_cmor( void ) {
+PyMODINIT_FUNC init_cmor(void)
+{
PyObject *cmor_module;
cmor_module = Py_InitModule("_cmor", MyExtractMethods);
- import_array( );
+ import_array();
CMORError = PyErr_NewException("_cmor.CMORError", NULL, NULL);
PyModule_AddObject(cmor_module, "CMORError", CMORError);
}
diff --git a/Src/cmor.c b/Src/cmor.c
index c7dd58b..99fa449 100644
--- a/Src/cmor.c
+++ b/Src/cmor.c
@@ -20,7 +20,6 @@
#include <unistd.h>
#include <signal.h>
-
/* ==================================================================== */
/* this is defining NETCDF4 variable if we are */
/* using NETCDF3 not used anywhere else */
@@ -28,32 +27,32 @@
#ifndef NC_NETCDF4
#define NC_NETCDF4 0
#define NC_CLASSIC_MODEL 0
-int nc_def_var_deflate( int i, int j, int k, int l, int m ) {
- return( 0 );
+int nc_def_var_deflate(int i, int j, int k, int l, int m)
+{
+ return (0);
};
-int nc_def_var_chunking( int i, int j, int k, size_t * l ) {
- return( 0 );
+
+int nc_def_var_chunking(int i, int j, int k, size_t * l)
+{
+ return (0);
};
#endif
/* -------------------------------------------------------------------- */
/* function declaration */
/* -------------------------------------------------------------------- */
-extern int cmor_set_cur_dataset_attribute_internal( char *name,
- char *value,
- int optional );
+extern int cmor_set_cur_dataset_attribute_internal(char *name,
+ char *value, int optional);
-extern int cmor_set_variable_attribute_internal( int id,
- char *attribute_name,
- char type, void *value );
-extern int cmor_history_contains( int var_id, char *add );
+extern int cmor_set_variable_attribute_internal(int id,
+ char *attribute_name,
+ char type, void *value);
+extern int cmor_history_contains(int var_id, char *add);
-extern void cdCompAdd( cdCompTime comptime,
- double value,
- cdCalenType calendar, cdCompTime * result );
+extern void cdCompAdd(cdCompTime comptime,
+ double value, cdCalenType calendar, cdCompTime * result);
-extern void cdCompAddMixed( cdCompTime ct,
- double value, cdCompTime * result );
+extern void cdCompAddMixed(cdCompTime ct, double value, cdCompTime * result);
/* -------------------------------------------------------------------- */
/* Global Variable */
@@ -62,7 +61,7 @@ int USE_NETCDF_4;
int cleanup_varid = -1;
const char CMOR_VALID_CALENDARS[CMOR_N_VALID_CALS][CMOR_MAX_STRING] =
- { "gregorian",
+ { "gregorian",
"standard",
"proleptic_gregorian",
"noleap",
@@ -77,7 +76,6 @@ int CV_ERROR = 0;
ut_system *ut_read = NULL;
FILE *output_logfile;
-
/* -------------------------------------------------------------------- */
/* Variable related to cmor */
/* -------------------------------------------------------------------- */
@@ -110,36 +108,37 @@ char cmor_traceback_info[CMOR_MAX_STRING];
/**************************************************************************/
/* cmor_mkdir() */
/**************************************************************************/
-int cmor_mkdir(const char *dir) {
- char tmp[PATH_MAX];
- char *p = NULL;
- size_t len;
- int ierr;
- cmor_add_traceback( "cmor_mkdir" );
-
- snprintf(tmp, sizeof(tmp),"%s",dir);
- len = strlen(tmp);
- if(tmp[len - 1] == '/')
- tmp[len - 1] = 0;
- for(p = tmp + 1; *p; p++){
- if(*p == '/') {
- *p = 0;
- mkdir(tmp, ( S_IRWXU | S_IRWXG | S_IRWXO ));
- *p = '/';
- }
+int cmor_mkdir(const char *dir)
+{
+ char tmp[PATH_MAX];
+ char *p = NULL;
+ size_t len;
+ int ierr;
+ cmor_add_traceback("cmor_mkdir");
+
+ snprintf(tmp, sizeof(tmp), "%s", dir);
+ len = strlen(tmp);
+ if (tmp[len - 1] == '/')
+ tmp[len - 1] = 0;
+ for (p = tmp + 1; *p; p++) {
+ if (*p == '/') {
+ *p = 0;
+ mkdir(tmp, (S_IRWXU | S_IRWXG | S_IRWXO));
+ *p = '/';
}
- ierr = mkdir(tmp, ( S_IRWXU | S_IRWXG | S_IRWXO ));
- cmor_pop_traceback( );
- return(ierr);
+ }
+ ierr = mkdir(tmp, (S_IRWXU | S_IRWXG | S_IRWXO));
+ cmor_pop_traceback();
+ return (ierr);
}
-
/**************************************************************************/
/* */
/* cmorstringstring() */
/* */
/**************************************************************************/
-int cmor_stringinstring( char *dest, char *src ) {
+int cmor_stringinstring(char *dest, char *src)
+{
/* -------------------------------------------------------------------- */
/* returns 1 if dest contains the words of src. */
/* The end of a word is either a space, a period or null. */
@@ -148,35 +147,34 @@ int cmor_stringinstring( char *dest, char *src ) {
/* period is used internal to a word. */
/* -------------------------------------------------------------------- */
char *pstr = dest;
- cmor_add_traceback( "cmor_stringinstring" );
+ cmor_add_traceback("cmor_stringinstring");
- while( ( pstr = strstr( pstr, src ) ) ) {
+ while ((pstr = strstr(pstr, src))) {
/* -------------------------------------------------------------------- */
/* if this word is at the beginning of msg or preceeded by a */
/* space */
/* -------------------------------------------------------------------- */
- if( pstr == dest || pstr[-1] == ' ' ) {
+ if (pstr == dest || pstr[-1] == ' ') {
/* -------------------------------------------------------------------- */
/* if it isn't a substring match */
/* -------------------------------------------------------------------- */
- if( ( pstr[strlen( src )] == ' ' ) ||
- ( pstr[strlen( src )] == 0 ) ||
- ( pstr[strlen( src )] == '.' ) ) {
+ if ((pstr[strlen(src)] == ' ') ||
+ (pstr[strlen(src)] == 0) || (pstr[strlen(src)] == '.')) {
/* -------------------------------------------------------------------- */
/* then return( 1 ) to indicate string found */
/* -------------------------------------------------------------------- */
- return( 1 );
- }
- }
- pstr++; /* In which case, skip to the next char */
+ return (1);
+ }
+ }
+ pstr++; /* In which case, skip to the next char */
}
/* -------------------------------------------------------------------- */
/* nothing like src is in dest, and so return the location of the end*/
/* of string */
/* -------------------------------------------------------------------- */
- cmor_pop_traceback( );
- return( 0 );
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
@@ -184,23 +182,24 @@ int cmor_stringinstring( char *dest, char *src ) {
/* cmor_cat_unique_string() */
/* */
/************************************************************************/
-void cmor_cat_unique_string( char *dest, char *src ) {
+void cmor_cat_unique_string(char *dest, char *src)
+{
int offset;
int spare_space;
- cmor_add_traceback( "cmor_cat_unique_string" );
+ cmor_add_traceback("cmor_cat_unique_string");
/* -------------------------------------------------------------------- */
/* if this string is in msg */
/* -------------------------------------------------------------------- */
- if( !cmor_stringinstring( dest, src ) ) {
- if( ( offset = strlen( dest ) ) ) {
- strcat( dest + offset, " " );
- offset++;
- spare_space = CMOR_MAX_STRING - offset - 1;
- strncat( dest + offset, src, spare_space );
- } else {
- strncpy( dest, src, CMOR_MAX_STRING );
- }
+ if (!cmor_stringinstring(dest, src)) {
+ if ((offset = strlen(dest))) {
+ strcat(dest + offset, " ");
+ offset++;
+ spare_space = CMOR_MAX_STRING - offset - 1;
+ strncat(dest + offset, src, spare_space);
+ } else {
+ strncpy(dest, src, CMOR_MAX_STRING);
+ }
}
cmor_pop_traceback();
}
@@ -210,182 +209,181 @@ void cmor_cat_unique_string( char *dest, char *src ) {
/* cmor_check_forcing_validity() */
/* */
/**************************************************************************/
-int cmor_check_forcing_validity( int table_id, char *value ) {
+int cmor_check_forcing_validity(int table_id, char *value)
+{
int i, j, n, found = 0;
char msg[CMOR_MAX_STRING];
char astr[CMOR_MAX_STRING];
char **bstr;
-
cmor_add_traceback("cmor_check_forcing_validity");
- if( cmor_tables[table_id].nforcings == 0 ) {
+ if (cmor_tables[table_id].nforcings == 0) {
cmor_pop_traceback();
- return(0);
+ return (0);
}
- strcpy( astr, value );
+ strcpy(astr, value);
found = 0;
-
- for( i = 0; i < strlen( astr ); i++ ) {
- if( astr[i] == ',' )
- astr[i] = ' ';
+
+ for (i = 0; i < strlen(astr); i++) {
+ if (astr[i] == ',')
+ astr[i] = ' ';
/* -------------------------------------------------------------------- */
/* removes everything after first parenthesis */
/* -------------------------------------------------------------------- */
- if( astr[i] == '(' )
- astr[i] = '\0';
+ if (astr[i] == '(')
+ astr[i] = '\0';
}
- cmor_convert_string_to_list( astr, 'c', ( void ** ) &bstr, &n );
- if( n == 0 ){
+ cmor_convert_string_to_list(astr, 'c', (void **)&bstr, &n);
+ if (n == 0) {
cmor_pop_traceback();
- return(0);
- }
- for( i = 0; i < n; i++ ) {
- found = 0;
- for( j = 0; j < cmor_tables[table_id].nforcings; j++ ) {
- if( strcmp( bstr[i], cmor_tables[table_id].forcings[j] ) == 0 ) {
- found = 1;
- break;
- }
- }
- if( found == 0 ) {
- sprintf( msg, "forcing attribute elt %i (%s) is not valid for\n! "
- "table %s, valid values are:", i,
- bstr[i], cmor_tables[table_id].szTable_id );
- for( j = 0; j < cmor_tables[table_id].nforcings; j++ ) {
- strncat( msg, " ", CMOR_MAX_STRING - strlen( msg ) );
- strncat( msg, cmor_tables[table_id].forcings[j],
- CMOR_MAX_STRING - strlen( msg ) );
- strncat( msg, ",", CMOR_MAX_STRING - strlen( msg ) );
- }
- msg[strlen( msg ) - 1] = '\0';
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback();
- return(-1);
- }
+ return (0);
+ }
+ for (i = 0; i < n; i++) {
+ found = 0;
+ for (j = 0; j < cmor_tables[table_id].nforcings; j++) {
+ if (strcmp(bstr[i], cmor_tables[table_id].forcings[j]) == 0) {
+ found = 1;
+ break;
+ }
+ }
+ if (found == 0) {
+ sprintf(msg, "forcing attribute elt %i (%s) is not valid for\n! "
+ "table %s, valid values are:", i, bstr[i],
+ cmor_tables[table_id].szTable_id);
+ for (j = 0; j < cmor_tables[table_id].nforcings; j++) {
+ strncat(msg, " ", CMOR_MAX_STRING - strlen(msg));
+ strncat(msg, cmor_tables[table_id].forcings[j],
+ CMOR_MAX_STRING - strlen(msg));
+ strncat(msg, ",", CMOR_MAX_STRING - strlen(msg));
+ }
+ msg[strlen(msg) - 1] = '\0';
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
+ }
}
/* -------------------------------------------------------------------- */
/* Ok now we need to clean up the memory allocations.... */
/* -------------------------------------------------------------------- */
- for( i = 0; i < n; i++ ) {
- free( bstr[i] );
+ for (i = 0; i < n; i++) {
+ free(bstr[i]);
}
- free( bstr );
+ free(bstr);
cmor_pop_traceback();
- return(0);
+ return (0);
}
/**************************************************************************/
/* cmor_check_expt_id() */
/**************************************************************************/
-int cmor_check_expt_id( char *szExptID, int nTableID,
- char *szGblAttLong, char *szGblAttShort ) {
+int cmor_check_expt_id(char *szExptID, int nTableID,
+ char *szGblAttLong, char *szGblAttShort)
+{
int i, j;
char szTableExptID[CMOR_MAX_STRING];
char szTableShtExptID[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_check_expt_id" );
+ cmor_add_traceback("cmor_check_expt_id");
j = 1;
- for( i = 0; i <= cmor_tables[nTableID].nexps; i++ ) {
+ for (i = 0; i <= cmor_tables[nTableID].nexps; i++) {
strncpy(szTableExptID,
- cmor_tables[nTableID].expt_ids[i],
- CMOR_MAX_STRING);
+ cmor_tables[nTableID].expt_ids[i], CMOR_MAX_STRING);
strncpy(szTableShtExptID,
- cmor_tables[nTableID].sht_expt_ids[i],
- CMOR_MAX_STRING);
-
- if( ( strncmp( szTableExptID, szExptID, CMOR_MAX_STRING ) == 0 ) ||
- ( strncmp( szTableShtExptID, szExptID, CMOR_MAX_STRING ) == 0 ) ) {
- j = 0;
- cmor_set_cur_dataset_attribute_internal( szGblAttLong,
- szTableExptID, 0 );
- cmor_set_cur_dataset_attribute_internal( szGblAttShort,
- szTableShtExptID, 1 );
- strncpy( szExptID, szTableShtExptID,CMOR_MAX_STRING );
- break;
- }
+ cmor_tables[nTableID].sht_expt_ids[i], CMOR_MAX_STRING);
+
+ if ((strncmp(szTableExptID, szExptID, CMOR_MAX_STRING) == 0) ||
+ (strncmp(szTableShtExptID, szExptID, CMOR_MAX_STRING) == 0)) {
+ j = 0;
+ cmor_set_cur_dataset_attribute_internal(szGblAttLong,
+ szTableExptID, 0);
+ cmor_set_cur_dataset_attribute_internal(szGblAttShort,
+ szTableShtExptID, 1);
+ strncpy(szExptID, szTableShtExptID, CMOR_MAX_STRING);
+ break;
+ }
}
cmor_pop_traceback();
- return( j );
+ return (j);
}
/************************************************************************/
/* strncpytrim() */
/************************************************************************/
-int strncpytrim( char *out, char *in, int max ) {
+int strncpytrim(char *out, char *in, int max)
+{
int i, n, j, k;
cmor_add_traceback("strncpytrim");
j = 0;
- n = strlen( in );
+ n = strlen(in);
- if( n > max ) {
- n = max;
+ if (n > max) {
+ n = max;
}
-/* -------------------------------------------------------------------- */
-/* Look for first space position and last space position and */
-/* copy interval characters in out. */
-/* -------------------------------------------------------------------- */
- while( ( in[j] == ' ' ) && ( j < n ) ) {
- j++;
+ /* -------------------------------------------------------------------- */
+ /* Look for first space position and last space position and */
+ /* copy interval characters in out. */
+ /* -------------------------------------------------------------------- */
+ while ((in[j] == ' ') && (j < n)) {
+ j++;
}
k = n - 1;
- while( ( in[k] == ' ' ) && ( k > 0 ) ) {
- k--;
+ while ((in[k] == ' ') && (k > 0)) {
+ k--;
}
- for( i = j; i <= k; i++ ) {
- out[i - j] = in[i];
+ for (i = j; i <= k; i++) {
+ out[i - j] = in[i];
}
out[i - j] = '\0';
cmor_pop_traceback();
- return( 0 );
+ return (0);
}
-
/************************************************************************/
/* cmor_is_setup() */
/************************************************************************/
-void cmor_is_setup( void ) {
+void cmor_is_setup(void)
+{
extern int CMOR_HAS_BEEN_SETUP;
char msg[CMOR_MAX_STRING];
- extern void cmor_handle_error( char error_msg[CMOR_MAX_STRING],
- int level );
+ extern void cmor_handle_error(char error_msg[CMOR_MAX_STRING], int level);
- cmor_add_traceback( "cmor_is_setup" );
+ cmor_add_traceback("cmor_is_setup");
- if( CMOR_HAS_BEEN_SETUP == 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "You need to run cmor_setup before calling any cmor_function" );
- cmor_handle_error( msg, CMOR_NOT_SETUP );
+ if (CMOR_HAS_BEEN_SETUP == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "You need to run cmor_setup before calling any cmor_function");
+ cmor_handle_error(msg, CMOR_NOT_SETUP);
}
- cmor_pop_traceback( );
+ cmor_pop_traceback();
return;
}
/************************************************************************/
/* cmor_add_traceback() */
/************************************************************************/
-void cmor_add_traceback( char *name ) {
+void cmor_add_traceback(char *name)
+{
char tmp[CMOR_MAX_STRING];
-
- if( strlen( cmor_traceback_info ) == 0 ) {
- sprintf( cmor_traceback_info, "%s\n! ", name );
+ if (strlen(cmor_traceback_info) == 0) {
+ sprintf(cmor_traceback_info, "%s\n! ", name);
} else {
- sprintf( tmp, "%s\n! called from: %s", name, cmor_traceback_info );
- strncpy( cmor_traceback_info, tmp, CMOR_MAX_STRING );
+ sprintf(tmp, "%s\n! called from: %s", name, cmor_traceback_info);
+ strncpy(cmor_traceback_info, tmp, CMOR_MAX_STRING);
}
return;
}
@@ -393,136 +391,138 @@ void cmor_add_traceback( char *name ) {
/************************************************************************/
/* cmor_pop_traceback() */
/************************************************************************/
-void cmor_pop_traceback( void ) {
+void cmor_pop_traceback(void)
+{
int i;
char tmp[CMOR_MAX_STRING];
- strcpy( tmp, "" );
- for( i = 0; i < strlen( cmor_traceback_info ); i++ ) {
- if( strncmp( &cmor_traceback_info[i], "called from: ", 13 ) == 0 ) {
- strcpy( tmp, &cmor_traceback_info[i + 13] );
- break;
- }
+ strcpy(tmp, "");
+ for (i = 0; i < strlen(cmor_traceback_info); i++) {
+ if (strncmp(&cmor_traceback_info[i], "called from: ", 13) == 0) {
+ strcpy(tmp, &cmor_traceback_info[i + 13]);
+ break;
+ }
}
- strcpy( cmor_traceback_info, tmp );
+ strcpy(cmor_traceback_info, tmp);
return;
}
/************************************************************************/
/* cmor_have_NetCDF4() */
/************************************************************************/
-int cmor_have_NetCDF4( void ) {
+int cmor_have_NetCDF4(void)
+{
char version[50];
int major;
cmor_pop_traceback();
- strncpy( version, nc_inq_libvers( ), 50 );
- sscanf( version, "%1d%*s", &major );
- if( major != 4 ){
+ strncpy(version, nc_inq_libvers(), 50);
+ sscanf(version, "%1d%*s", &major);
+ if (major != 4) {
cmor_pop_traceback();
- return( 1 );
+ return (1);
}
cmor_pop_traceback();
- return( 0 );
+ return (0);
}
-
/************************************************************************/
/* cmor_prep_units() */
/************************************************************************/
-int cmor_prep_units( char *uunits,
- char *cunits,
- ut_unit ** user_units,
- ut_unit ** cmor_units,
- cv_converter ** ut_cmor_converter ) {
+int cmor_prep_units(char *uunits,
+ char *cunits,
+ ut_unit ** user_units,
+ ut_unit ** cmor_units, cv_converter ** ut_cmor_converter)
+{
extern ut_system *ut_read;
char local_unit[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
- extern void cmor_handle_error( char error_msg[CMOR_MAX_STRING],
- int level );
- cmor_add_traceback( "cmor_prep_units" );
- cmor_is_setup( );
- *cmor_units = ut_parse( ut_read, cunits, UT_ASCII );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: analyzing units from cmor (%s)", cunits );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
+ extern void cmor_handle_error(char error_msg[CMOR_MAX_STRING], int level);
+
+ cmor_add_traceback("cmor_prep_units");
+ cmor_is_setup();
+ *cmor_units = ut_parse(ut_read, cunits, UT_ASCII);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: analyzing units from cmor (%s)", cunits);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
}
- strncpy( local_unit, uunits, CMOR_MAX_STRING );
- ut_trim( local_unit, UT_ASCII );
- *user_units = ut_parse( ut_read, local_unit, UT_ASCII );
+ strncpy(local_unit, uunits, CMOR_MAX_STRING);
+ ut_trim(local_unit, UT_ASCII);
+ *user_units = ut_parse(ut_read, local_unit, UT_ASCII);
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: analyzing units from user (%s)", local_unit );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: analyzing units from user (%s)", local_unit);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
}
- if( ut_are_convertible( *cmor_units, *user_units ) == 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: cmor and user units are incompatible: %s and %s",
- cunits, uunits );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
+ if (ut_are_convertible(*cmor_units, *user_units) == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: cmor and user units are incompatible: %s and %s",
+ cunits, uunits);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
}
- *ut_cmor_converter = ut_get_converter( *user_units, *cmor_units );
+ *ut_cmor_converter = ut_get_converter(*user_units, *cmor_units);
- if( *ut_cmor_converter == NULL ) {
+ if (*ut_cmor_converter == NULL) {
}
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error getting converter from %s to %s", cunits,
- local_unit );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error getting converter from %s to %s", cunits,
+ local_unit);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
}
- cmor_pop_traceback( );
- return( 0 );
+ cmor_pop_traceback();
+ return (0);
}
-
/************************************************************************/
/* cmor_have_NetCDF41min() */
/************************************************************************/
-int cmor_have_NetCDF41min( void ) {
+int cmor_have_NetCDF41min(void)
+{
char version[50];
int major, minor;
cmor_add_traceback("cmor_have_NetCDF41min");
- strncpy( version, nc_inq_libvers( ), 50 );
- sscanf( version, "%1d%*c%1d%*s", &major, &minor );
- if( major > 4 ){
+ strncpy(version, nc_inq_libvers(), 50);
+ sscanf(version, "%1d%*c%1d%*s", &major, &minor);
+ if (major > 4) {
cmor_pop_traceback();
- return( 0 );
+ return (0);
}
- if( major < 4 ) {
+ if (major < 4) {
cmor_pop_traceback();
- return( 1 );
+ return (1);
}
- if( minor < 1 ) {
+ if (minor < 1) {
cmor_pop_traceback();
- return( 1 );
+ return (1);
}
cmor_pop_traceback();
- return( 0 );
+ return (0);
}
/************************************************************************/
/* cmor_handle_error() */
/************************************************************************/
-void cmor_handle_error(char error_msg[CMOR_MAX_STRING], int level) {
+void cmor_handle_error(char error_msg[CMOR_MAX_STRING], int level)
+{
int i;
char msg[CMOR_MAX_STRING];
extern FILE *output_logfile;
@@ -608,105 +608,111 @@ void cmor_handle_error(char error_msg[CMOR_MAX_STRING], int level) {
}
}
+void cmor_handle_error_var(char error_msg[CMOR_MAX_STRING], int level,
+ int var_id)
+{
+ cmor_vars[var_id].error = 1;
+ cmor_handle_error(error_msg, level);
+}
/************************************************************************/
/* cmor_reset_variable() */
/************************************************************************/
-void cmor_reset_variable( int var_id ) {
+void cmor_reset_variable(int var_id)
+{
extern cmor_var_t cmor_vars[];
int j;
- cmor_vars[var_id].self = -1;
- cmor_vars[var_id].grid_id = -1;
- cmor_vars[var_id].sign = 1;
- cmor_vars[var_id].zfactor = -1;
- cmor_vars[var_id].ref_table_id = -1;
- cmor_vars[var_id].ref_var_id = -1;
- cmor_vars[var_id].initialized = -1;
- cmor_vars[var_id].closed = 0;
- cmor_vars[var_id].nc_var_id = -999;
-
- for( j = 0; j < CMOR_MAX_VARIABLES; j++ ) {
- cmor_vars[var_id].nc_zfactors[j] = -999;
- }
-
- cmor_vars[var_id].nzfactor = 0;
- cmor_vars[var_id].ntimes_written = 0;
-
- for( j = 0; j < 10; j++ ) {
- cmor_vars[var_id].ntimes_written_coords[j] = -1;
- cmor_vars[var_id].associated_ids[j] = -1;
- cmor_vars[var_id].ntimes_written_associated[j] = 0;
- }
-
- cmor_vars[var_id].time_nc_id = -999;
- cmor_vars[var_id].time_bnds_nc_id = -999;
- cmor_vars[var_id].id[0] = '\0';
- cmor_vars[var_id].ndims = 0;
-
- for( j = 0; j < CMOR_MAX_DIMENSIONS; j++ ) {
+ cmor_vars[var_id].self = -1;
+ cmor_vars[var_id].grid_id = -1;
+ cmor_vars[var_id].sign = 1;
+ cmor_vars[var_id].zfactor = -1;
+ cmor_vars[var_id].ref_table_id = -1;
+ cmor_vars[var_id].ref_var_id = -1;
+ cmor_vars[var_id].initialized = -1;
+ cmor_vars[var_id].error = 0;
+ cmor_vars[var_id].closed = 0;
+ cmor_vars[var_id].nc_var_id = -999;
+
+ for (j = 0; j < CMOR_MAX_VARIABLES; j++) {
+ cmor_vars[var_id].nc_zfactors[j] = -999;
+ }
+
+ cmor_vars[var_id].nzfactor = 0;
+ cmor_vars[var_id].ntimes_written = 0;
+
+ for (j = 0; j < 10; j++) {
+ cmor_vars[var_id].ntimes_written_coords[j] = -1;
+ cmor_vars[var_id].associated_ids[j] = -1;
+ cmor_vars[var_id].ntimes_written_associated[j] = 0;
+ }
+
+ cmor_vars[var_id].time_nc_id = -999;
+ cmor_vars[var_id].time_bnds_nc_id = -999;
+ cmor_vars[var_id].id[0] = '\0';
+ cmor_vars[var_id].ndims = 0;
+
+ for (j = 0; j < CMOR_MAX_DIMENSIONS; j++) {
/* -------------------------------------------------------------------- */
/* place holder for singleton axes ids */
/* -------------------------------------------------------------------- */
- cmor_vars[var_id].singleton_ids[j] = -1;
- cmor_vars[var_id].axes_ids[j] = -1;
- cmor_vars[var_id].original_order[j] = -1;
-
- }
-
- for( j = 0; j < CMOR_MAX_ATTRIBUTES; j++ ) {
- cmor_vars[var_id].attributes_values_char[j][0] = '\0';
- cmor_vars[var_id].attributes_values_num[j] = -999.;
- cmor_vars[var_id].attributes_type[j] = '\0';
- cmor_vars[var_id].attributes[j][0] = '\0';
- }
-
- cmor_vars[var_id].nattributes = 0;
- cmor_vars[var_id].type = '\0';
- cmor_vars[var_id].itype = 'N';
- cmor_vars[var_id].missing = 1.e20;
- cmor_vars[var_id].omissing = 1.e20;
- cmor_vars[var_id].tolerance = 1.e-4;
- cmor_vars[var_id].valid_min = 1.e20;
- cmor_vars[var_id].valid_max = 1.e20;
- cmor_vars[var_id].ok_min_mean_abs = 1.e20;
- cmor_vars[var_id].ok_max_mean_abs = 1.e20;
- cmor_vars[var_id].shuffle = 0;
- cmor_vars[var_id].deflate = 1;
- cmor_vars[var_id].deflate_level = 1;
- cmor_vars[var_id].nomissing = 1;
- cmor_vars[var_id].iunits[0] = '\0';
- cmor_vars[var_id].ounits[0] = '\0';
- cmor_vars[var_id].isbounds = 0;
- cmor_vars[var_id].needsinit = 1;
- cmor_vars[var_id].zaxis = -1;
-
- if( cmor_vars[var_id].values != NULL ) {
- free( cmor_vars[var_id].values );
- }
-
- cmor_vars[var_id].values = NULL;
- cmor_vars[var_id].first_time = -999.;
- cmor_vars[var_id].last_time = -999.;
- cmor_vars[var_id].first_bound = 1.e20;
- cmor_vars[var_id].last_bound = 1.e20;
- cmor_vars[var_id].base_path[0] = '\0';
- cmor_vars[var_id].current_path[0] = '\0';
- cmor_vars[var_id].suffix[0] = '\0';
- cmor_vars[var_id].suffix_has_date = 0;
+ cmor_vars[var_id].singleton_ids[j] = -1;
+ cmor_vars[var_id].axes_ids[j] = -1;
+ cmor_vars[var_id].original_order[j] = -1;
+
+ }
+
+ for (j = 0; j < CMOR_MAX_ATTRIBUTES; j++) {
+ cmor_vars[var_id].attributes_values_char[j][0] = '\0';
+ cmor_vars[var_id].attributes_values_num[j] = -999.;
+ cmor_vars[var_id].attributes_type[j] = '\0';
+ cmor_vars[var_id].attributes[j][0] = '\0';
+ }
+
+ cmor_vars[var_id].nattributes = 0;
+ cmor_vars[var_id].type = '\0';
+ cmor_vars[var_id].itype = 'N';
+ cmor_vars[var_id].missing = 1.e20;
+ cmor_vars[var_id].omissing = 1.e20;
+ cmor_vars[var_id].tolerance = 1.e-4;
+ cmor_vars[var_id].valid_min = 1.e20;
+ cmor_vars[var_id].valid_max = 1.e20;
+ cmor_vars[var_id].ok_min_mean_abs = 1.e20;
+ cmor_vars[var_id].ok_max_mean_abs = 1.e20;
+ cmor_vars[var_id].shuffle = 0;
+ cmor_vars[var_id].deflate = 1;
+ cmor_vars[var_id].deflate_level = 1;
+ cmor_vars[var_id].nomissing = 1;
+ cmor_vars[var_id].iunits[0] = '\0';
+ cmor_vars[var_id].ounits[0] = '\0';
+ cmor_vars[var_id].isbounds = 0;
+ cmor_vars[var_id].needsinit = 1;
+ cmor_vars[var_id].zaxis = -1;
+
+ if (cmor_vars[var_id].values != NULL) {
+ free(cmor_vars[var_id].values);
+ }
+
+ cmor_vars[var_id].values = NULL;
+ cmor_vars[var_id].first_time = -999.;
+ cmor_vars[var_id].last_time = -999.;
+ cmor_vars[var_id].first_bound = 1.e20;
+ cmor_vars[var_id].last_bound = 1.e20;
+ cmor_vars[var_id].base_path[0] = '\0';
+ cmor_vars[var_id].current_path[0] = '\0';
+ cmor_vars[var_id].suffix[0] = '\0';
+ cmor_vars[var_id].suffix_has_date = 0;
+ cmor_vars[var_id].frequency[0] = '\0';
}
-
/************************************************************************/
/* cmor_setup() */
/************************************************************************/
-int cmor_setup( char *path,
- int *netcdf,
- int *verbosity,
- int *mode,
- char *logfile,
- int *create_subdirectories ) {
-
+int cmor_setup(char *path,
+ int *netcdf,
+ int *verbosity,
+ int *mode, char *logfile, int *create_subdirectories)
+{
extern cmor_axis_t cmor_axes[];
extern int CMOR_TABLE, cmor_ntables;
@@ -727,28 +733,26 @@ int cmor_setup( char *path,
extern FILE *output_logfile;
extern int did_history;
- strcpy( cmor_traceback_info, "" );
- cmor_add_traceback( "cmor_setup" );
+ strcpy(cmor_traceback_info, "");
+ cmor_add_traceback("cmor_setup");
/* -------------------------------------------------------------------- */
/* ok we need to know if we are using NC3 or 4 */
/* -------------------------------------------------------------------- */
USE_NETCDF_4 = -1;
- if( cmor_have_NetCDF4( ) == 0 ) {
+ if (cmor_have_NetCDF4() == 0) {
USE_NETCDF_4 = 1;
- if( cmor_have_NetCDF41min( ) != 0 ) {
- sprintf( msg,
+ if (cmor_have_NetCDF41min() != 0) {
+ sprintf(msg,
"You are using a wrong version of NetCDF4 (%s), \n! "
- "you need 4.1",
- nc_inq_libvers( ) );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ "you need 4.1", nc_inq_libvers());
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
} else {
- sprintf( msg,
+ sprintf(msg,
"You are using a wrong version of NetCDF (%s), you need \n! "
- "4.1 or an earlier netCDF release.",
- nc_inq_libvers( ) );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ "4.1 or an earlier netCDF release.", nc_inq_libvers());
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
did_history = 0;
CMOR_HAS_BEEN_SETUP = 1;
@@ -767,11 +771,11 @@ int cmor_setup( char *path,
} else {
if (*mode != CMOR_EXIT_ON_WARNING && *mode != CMOR_EXIT_ON_MAJOR
- && *mode != CMOR_NORMAL) {
+ && *mode != CMOR_NORMAL) {
snprintf(msg, CMOR_MAX_STRING,
- "exit mode can be either CMOR_EXIT_ON_WARNING CMOR_NORMAL "
- "or CMOR_EXIT_ON_MAJOR");
+ "exit mode can be either CMOR_EXIT_ON_WARNING CMOR_NORMAL "
+ "or CMOR_EXIT_ON_MAJOR");
cmor_handle_error(msg, CMOR_CRITICAL);
}
@@ -786,7 +790,7 @@ int cmor_setup( char *path,
if (*verbosity != CMOR_QUIET && *verbosity != CMOR_NORMAL) {
snprintf(msg, CMOR_MAX_STRING,
- "verbosity mode can be either CMOR_QUIET or CMOR_NORMAL");
+ "verbosity mode can be either CMOR_QUIET or CMOR_NORMAL");
cmor_handle_error(msg, CMOR_NORMAL);
}
CMOR_VERBOSITY = *verbosity;
@@ -812,21 +816,21 @@ int cmor_setup( char *path,
ptr = localtime(<);
snprintf(msg, CMOR_MAX_STRING, "%s_%.4i-%.2i-%.2iT%.2i:%.2i:%.2i",
- tmplogfile, ptr->tm_year + 1900, ptr->tm_mon + 1,
- ptr->tm_mday, ptr->tm_hour, ptr->tm_min, ptr->tm_sec);
+ tmplogfile, ptr->tm_year + 1900, ptr->tm_mon + 1,
+ ptr->tm_mday, ptr->tm_hour, ptr->tm_min, ptr->tm_sec);
fclose(output_logfile);
rename(tmplogfile, msg);
snprintf(msg2, CMOR_MAX_STRING,
- "Logfile %s already exist.\n! Renamed to: %s", tmplogfile,
- msg);
+ "Logfile %s already exist.\n! Renamed to: %s", tmplogfile,
+ msg);
output_logfile = NULL;
output_logfile = fopen(tmplogfile, "w");
if (output_logfile == NULL) {
snprintf(msg2, CMOR_MAX_STRING,
- "Could not open logfile %s for writing", tmplogfile);
+ "Could not open logfile %s for writing", tmplogfile);
cmor_handle_error(msg2, CMOR_CRITICAL);
}
cmor_handle_error(msg2, CMOR_WARNING);
@@ -835,26 +839,24 @@ int cmor_setup( char *path,
if (output_logfile == NULL) {
snprintf(msg2, CMOR_MAX_STRING,
- "Could not open logfile %s for writing", tmplogfile);
+ "Could not open logfile %s for writing", tmplogfile);
cmor_handle_error(msg2, CMOR_CRITICAL);
}
}
}
-
-
if (netcdf == NULL) {
CMOR_NETCDF_MODE = CMOR_PRESERVE;
} else {
if (*netcdf != CMOR_PRESERVE_4 && *netcdf != CMOR_APPEND_4
- && *netcdf != CMOR_REPLACE_4 && *netcdf != CMOR_PRESERVE_3
- && *netcdf != CMOR_APPEND_3 && *netcdf != CMOR_REPLACE_3) {
+ && *netcdf != CMOR_REPLACE_4 && *netcdf != CMOR_PRESERVE_3
+ && *netcdf != CMOR_APPEND_3 && *netcdf != CMOR_REPLACE_3) {
snprintf(msg, CMOR_MAX_STRING,
- "file mode can be either CMOR_PRESERVE, CMOR_APPEND, "
- "CMOR_REPLACE, CMOR_PRESERVE_4, CMOR_APPEND_4, "
- "CMOR_REPLACE_4, CMOR_PRESERVE_3, CMOR_APPEND_3 or "
- "CMOR_REPLACE_3");
+ "file mode can be either CMOR_PRESERVE, CMOR_APPEND, "
+ "CMOR_REPLACE, CMOR_PRESERVE_4, CMOR_APPEND_4, "
+ "CMOR_REPLACE_4, CMOR_PRESERVE_3, CMOR_APPEND_3 or "
+ "CMOR_REPLACE_3");
cmor_handle_error(msg, CMOR_CRITICAL);
}
CMOR_NETCDF_MODE = *netcdf;
@@ -863,8 +865,8 @@ int cmor_setup( char *path,
/* Make sure we are not trying to use NETCDF4 mode while linked against NetCDF3 */
if (((CMOR_NETCDF_MODE == CMOR_PRESERVE_4)
- || (CMOR_NETCDF_MODE == CMOR_REPLACE_4)
- || (CMOR_NETCDF_MODE == CMOR_APPEND_4)) && (USE_NETCDF_4 == 0)) {
+ || (CMOR_NETCDF_MODE == CMOR_REPLACE_4)
+ || (CMOR_NETCDF_MODE == CMOR_APPEND_4)) && (USE_NETCDF_4 == 0)) {
sprintf(msg,
"You are trying to use a NetCDF4 mode but linked against "
"NetCDF3 libraries");
@@ -912,7 +914,7 @@ int cmor_setup( char *path,
cmor_axes[i].cvalues = NULL;
cmor_axes[i].length = 0;
- cmor_axes[i].revert = 1; /* 1 means no reverse -1 means reverse */
+ cmor_axes[i].revert = 1; /* 1 means no reverse -1 means reverse */
cmor_axes[i].offset = 0;
cmor_axes[i].type = '\0';
@@ -937,9 +939,9 @@ int cmor_setup( char *path,
}
if ((CMOR_CREATE_SUBDIRECTORIES != 1)
- && (CMOR_CREATE_SUBDIRECTORIES != 0)) {
+ && (CMOR_CREATE_SUBDIRECTORIES != 0)) {
snprintf(msg, CMOR_MAX_STRING,
- "cmor_setup: create_subdirectories must be 0 or 1");
+ "cmor_setup: create_subdirectories must be 0 or 1");
cmor_handle_error(msg, CMOR_CRITICAL);
}
@@ -969,7 +971,7 @@ int cmor_setup( char *path,
if (ut_get_status() != UT_SUCCESS) {
snprintf(msg, CMOR_MAX_STRING,
- "Udunits: creating dimlessnew base unit");
+ "Udunits: creating dimlessnew base unit");
cmor_handle_error(msg, CMOR_CRITICAL);
}
@@ -978,7 +980,7 @@ int cmor_setup( char *path,
if (myutstatus != UT_SUCCESS) {
snprintf(msg, CMOR_MAX_STRING,
- "Udunits: Error mapping dimless 'eq' unit");
+ "Udunits: Error mapping dimless 'eq' unit");
cmor_handle_error(msg, CMOR_CRITICAL);
}
@@ -1070,137 +1072,134 @@ int cmor_setup( char *path,
}
cmor_pop_traceback();
- return( 0 );
+ return (0);
}
/************************************************************************/
/* cmor_open_inpathFile() */
/************************************************************************/
-json_object *cmor_open_inpathFile(char *szFilename ) {
+json_object *cmor_open_inpathFile(char *szFilename)
+{
FILE *table_file;
char szFullName[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
char *buffer;
- int nFileSize;
+ int nFileSize;
json_object *oJSON;
- cmor_add_traceback( "cmor_open_inpathFile" );
+ cmor_add_traceback("cmor_open_inpathFile");
/* -------------------------------------------------------------------- */
/* Try to find file in current directory or in cmor_iput_path */
/* -------------------------------------------------------------------- */
strcpy(szFullName, szFilename);
- table_file = fopen( szFullName, "r" );
+ table_file = fopen(szFullName, "r");
int read_size;
- if( table_file == NULL ) {
- if( szFilename[0] != '/' ) {
- snprintf( szFullName, CMOR_MAX_STRING, "%s/%s", cmor_input_path,
- szFilename );
- table_file = fopen( szFullName, "r" );
+ if (table_file == NULL) {
+ if (szFilename[0] != '/') {
+ snprintf(szFullName, CMOR_MAX_STRING, "%s/%s", cmor_input_path,
+ szFilename);
+ table_file = fopen(szFullName, "r");
}
- if( table_file == NULL ) {
- snprintf( szFullName, CMOR_MAX_STRING, "Could not find file: %s",
- szFilename );
- cmor_handle_error( szFullName, CMOR_NORMAL );
+ if (table_file == NULL) {
+ snprintf(szFullName, CMOR_MAX_STRING, "Could not find file: %s",
+ szFilename);
+ cmor_handle_error(szFullName, CMOR_NORMAL);
cmor_ntables -= 1;
- cmor_pop_traceback( );
- return( NULL );
+ cmor_pop_traceback();
+ return (NULL);
}
}
/* -------------------------------------------------------------------- */
/* Read the entire file in memory */
/* -------------------------------------------------------------------- */
- fseek(table_file,0,SEEK_END);
- nFileSize = ftell( table_file );
- rewind( table_file );
- buffer = (char *) malloc( sizeof(char) * (nFileSize + 1) );
- read_size = fread( buffer, sizeof(char), nFileSize, table_file );
+ fseek(table_file, 0, SEEK_END);
+ nFileSize = ftell(table_file);
+ rewind(table_file);
+ buffer = (char *)malloc(sizeof(char) * (nFileSize + 1));
+ read_size = fread(buffer, sizeof(char), nFileSize, table_file);
buffer[nFileSize] = '\0';
/* -------------------------------------------------------------------- */
/* print error and exist if this is not a JSON file */
/* -------------------------------------------------------------------- */
- if(buffer[0]!= '{') {
+ if (buffer[0] != '{') {
free(buffer);
- buffer=NULL;
- snprintf( msg, CMOR_MAX_STRING,
- "Could not understand file \"%s\" Is this a JSON CMOR table?",
- szFullName );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_ntables--;
- cmor_pop_traceback( );
- return(NULL);
+ buffer = NULL;
+ snprintf(msg, CMOR_MAX_STRING,
+ "Could not understand file \"%s\" Is this a JSON CMOR table?",
+ szFullName);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_ntables--;
+ cmor_pop_traceback();
+ return (NULL);
}
/* -------------------------------------------------------------------- */
/* print error and exit if file was not completely read */
/* -------------------------------------------------------------------- */
- if( nFileSize != read_size ) {
+ if (nFileSize != read_size) {
free(buffer);
- buffer=NULL;
- snprintf( msg, CMOR_MAX_STRING,
- "Could not read file %s check file permission",
- szFullName );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_ntables--;
- cmor_pop_traceback( );
- return(NULL);
+ buffer = NULL;
+ snprintf(msg, CMOR_MAX_STRING,
+ "Could not read file %s check file permission", szFullName);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_ntables--;
+ cmor_pop_traceback();
+ return (NULL);
}
/* -------------------------------------------------------------------- */
/* parse buffer into json object */
/* -------------------------------------------------------------------- */
oJSON = json_tokener_parse(buffer);
- if( oJSON == NULL ){
- snprintf( msg, CMOR_MAX_STRING,
- "Please validate JSON File!\n! "
- "USE: http://jsonlint.com/\n! "
- "Syntax Error in file: %s\n! "
- "%s",szFullName, buffer );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (oJSON == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Please validate JSON File!\n! "
+ "USE: http://jsonlint.com/\n! "
+ "Syntax Error in file: %s\n! " "%s", szFullName, buffer);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
cmor_pop_traceback();
- if(buffer != NULL) {
+ if (buffer != NULL) {
free(buffer);
- buffer=NULL;
+ buffer = NULL;
}
- if( table_file != NULL ) {
+ if (table_file != NULL) {
fclose(table_file);
}
- return(oJSON);
+ return (oJSON);
}
/************************************************************************/
/* cmor_dataset_json() */
/************************************************************************/
-int cmor_dataset_json(char * ressource){
+int cmor_dataset_json(char *ressource)
+{
extern cmor_dataset_def cmor_current_dataset;
int ierr;
- cmor_add_traceback( "cmor_dataset_json" );
+ cmor_add_traceback("cmor_dataset_json");
cmor_is_setup();
char szVal[CMOR_MAX_STRING];
json_object *json_obj;
- strncpytrim( cmor_current_dataset.path_template,
- CMOR_DEFAULT_PATH_TEMPLATE,
- CMOR_MAX_STRING);
+ strncpytrim(cmor_current_dataset.path_template,
+ CMOR_DEFAULT_PATH_TEMPLATE, CMOR_MAX_STRING);
- strncpytrim( cmor_current_dataset.file_template,
- CMOR_DEFAULT_FILE_TEMPLATE,
- CMOR_MAX_STRING );
+ strncpytrim(cmor_current_dataset.file_template,
+ CMOR_DEFAULT_FILE_TEMPLATE, CMOR_MAX_STRING);
- strncpytrim( cmor_current_dataset.furtherinfourl,
- CMOR_DEFAULT_FURTHERURL_TEMPLATE,
- CMOR_MAX_STRING );
+ strncpytrim(cmor_current_dataset.furtherinfourl,
+ CMOR_DEFAULT_FURTHERURL_TEMPLATE, CMOR_MAX_STRING);
json_obj = cmor_open_inpathFile(ressource);
- if(json_obj == NULL) {
- return( 1 );
+ if (json_obj == NULL) {
+ return (1);
}
/* -------------------------------------------------------------------- */
@@ -1220,30 +1219,28 @@ int cmor_dataset_json(char * ressource){
/* -------------------------------------------------------------------- */
json_object_object_foreach(json_obj, key, value) {
- if(key[0] == '#') {
+ if (!value) {
+ continue;
+ }
+ if (key[0] == '#') {
continue;
}
strcpy(szVal, json_object_get_string(value));
- if(strcmp(key, FILE_OUTPUTPATH) == 0 ) {
- strncpytrim( cmor_current_dataset.outpath,
- szVal,
- CMOR_MAX_STRING );
+ if (strcmp(key, FILE_OUTPUTPATH) == 0) {
+ strncpytrim(cmor_current_dataset.outpath, szVal, CMOR_MAX_STRING);
continue;
- } else if(strcmp(key, FILE_PATH_TEMPLATE ) == 0 ){
- strncpytrim( cmor_current_dataset.path_template,
- szVal,
- CMOR_MAX_STRING );
+ } else if (strcmp(key, FILE_PATH_TEMPLATE) == 0) {
+ strncpytrim(cmor_current_dataset.path_template,
+ szVal, CMOR_MAX_STRING);
continue;
- } else if(strcmp(key, FILE_NAME_TEMPLATE) == 0 ){
- strncpytrim( cmor_current_dataset.file_template,
- szVal,
- CMOR_MAX_STRING );
+ } else if (strcmp(key, FILE_NAME_TEMPLATE) == 0) {
+ strncpytrim(cmor_current_dataset.file_template,
+ szVal, CMOR_MAX_STRING);
continue;
- } else if(strcmp(key, GLOBAL_ATT_FURTHERINFOURL) == 0 ){
- strncpytrim( cmor_current_dataset.furtherinfourl,
- szVal,
- CMOR_MAX_STRING );
+ } else if (strcmp(key, GLOBAL_ATT_FURTHERINFOURL) == 0) {
+ strncpytrim(cmor_current_dataset.furtherinfourl,
+ szVal, CMOR_MAX_STRING);
}
@@ -1255,23 +1252,24 @@ int cmor_dataset_json(char * ressource){
/* -------------------------------------------------------------------- */
/* Verify if the output directory exist */
/* -------------------------------------------------------------------- */
- ierr = cmor_outpath_exist(cmor_current_dataset.outpath);
- if( ierr ) {
+ ierr = cmor_outpath_exist(cmor_current_dataset.outpath);
+ if (ierr) {
cmor_pop_traceback();
return (1);
}
- if(json_obj != NULL) {
+ if (json_obj != NULL) {
json_object_put(json_obj);
}
cmor_pop_traceback();
- return( 0 );
+ return (0);
}
/************************************************************************/
/* cmor_put_nc_num_attribute() */
/************************************************************************/
int cmor_put_nc_num_attribute(int ncid, int nc_var_id, char *name, char type,
- double value, char *var_name) {
+ double value, char *var_name)
+{
char msg[CMOR_MAX_STRING];
int ierr;
@@ -1288,23 +1286,21 @@ int cmor_put_nc_num_attribute(int ncid, int nc_var_id, char *name, char type,
}
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) setting numerical attribute"
- " %s on variable %s", ierr, nc_strerror(ierr), name,
- var_name);
+ "NetCDF Error (%i: %s) setting numerical attribute"
+ " %s on variable %s", ierr, nc_strerror(ierr), name, var_name);
cmor_handle_error(msg, CMOR_CRITICAL);
}
cmor_pop_traceback();
- return( ierr );
+ return (ierr);
}
/************************************************************************/
/* cmor_put_nc_char_attribute() */
/************************************************************************/
int cmor_put_nc_char_attribute(int ncid,
- int nc_var_id,
- char *name,
- char *value,
- char *var_name) {
+ int nc_var_id,
+ char *name, char *value, char *var_name)
+{
int k, ierr;
char msg[CMOR_MAX_STRING];
@@ -1316,34 +1312,37 @@ int cmor_put_nc_char_attribute(int ncid,
ierr = nc_put_att_text(ncid, nc_var_id, name, k + 1, value);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) setting attribute: '%s' "
- "on variable (%s)",
- ierr, nc_strerror(ierr), name, var_name);
+ "NetCDF Error (%i: %s) setting attribute: '%s' "
+ "on variable (%s)",
+ ierr, nc_strerror(ierr), name, var_name);
cmor_handle_error(msg, CMOR_CRITICAL);
}
}
cmor_pop_traceback();
- return( ierr) ;
+ return (ierr);
}
+
/************************************************************************/
/* cmor_set_cur_dataset_attribute() */
/************************************************************************/
-int cmor_set_cur_dataset_attribute(char *name, char *value, int optional) {
- int rc;
- cmor_add_traceback("cmor_set_cur_dataset_attribute");
- cmor_is_setup();
+int cmor_set_cur_dataset_attribute(char *name, char *value, int optional)
+{
+ int rc;
+ cmor_add_traceback("cmor_set_cur_dataset_attribute");
+ cmor_is_setup();
- rc = cmor_set_cur_dataset_attribute_internal(name, value, optional);
+ rc = cmor_set_cur_dataset_attribute_internal(name, value, optional);
- cmor_pop_traceback();
- return(rc);
+ cmor_pop_traceback();
+ return (rc);
}
/************************************************************************/
/* cmor_set_cur_dataset_attribute_internal() */
/************************************************************************/
int cmor_set_cur_dataset_attribute_internal(char *name, char *value,
- int optional) {
+ int optional)
+{
int i, n;
char msg[CMOR_MAX_STRING];
extern cmor_dataset_def cmor_current_dataset;
@@ -1353,28 +1352,27 @@ int cmor_set_cur_dataset_attribute_internal(char *name, char *value,
cmor_trim_string(value, msg);
- if ((int) strlen(name) > CMOR_MAX_STRING) {
+ if ((int)strlen(name) > CMOR_MAX_STRING) {
snprintf(msg, CMOR_MAX_STRING,
- "Dataset error, attribute name: %s; length (%i) is "
- "greater than limit: %i",
- name, (int) strlen(name), CMOR_MAX_STRING);
+ "Dataset error, attribute name: %s; length (%i) is "
+ "greater than limit: %i",
+ name, (int)strlen(name), CMOR_MAX_STRING);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
- return( 1 );
+ return (1);
}
if ((value == NULL) || (msg[0] == '\0')) {
if (optional == 1) {
cmor_pop_traceback();
- return( 0 );
+ return (0);
} else {
snprintf(msg, CMOR_MAX_STRING,
- "Dataset error, required attribute %s was not "
- "passed or blanked",
- name);
+ "Dataset error, required attribute %s was not "
+ "passed or blanked", name);
cmor_handle_error(msg, CMOR_CRITICAL);
cmor_pop_traceback();
- return( 1 );
+ return (1);
}
}
@@ -1396,208 +1394,197 @@ int cmor_set_cur_dataset_attribute_internal(char *name, char *value,
name, CMOR_MAX_ELEMENTS);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
- return( 1 );
+ return (1);
}
- if(strcmp(msg, FILE_PATH_TEMPLATE ) == 0 ){
+ if (strcmp(msg, FILE_PATH_TEMPLATE) == 0) {
cmor_trim_string(value, msg);
- strncpytrim( cmor_current_dataset.path_template,
- msg,
- CMOR_MAX_STRING );
- } else if(strcmp(msg, FILE_NAME_TEMPLATE) == 0 ){
+ strncpytrim(cmor_current_dataset.path_template, msg, CMOR_MAX_STRING);
+ } else if (strcmp(msg, FILE_NAME_TEMPLATE) == 0) {
cmor_trim_string(value, msg);
- strncpytrim( cmor_current_dataset.file_template,
- msg,
- CMOR_MAX_STRING );
+ strncpytrim(cmor_current_dataset.file_template, msg, CMOR_MAX_STRING);
- } else if(strcmp(msg, GLOBAL_ATT_FURTHERINFOURLTMPL) == 0 ){
+ } else if (strcmp(msg, GLOBAL_ATT_FURTHERINFOURLTMPL) == 0) {
cmor_trim_string(value, msg);
- strncpytrim( cmor_current_dataset.furtherinfourl,
- msg,
- CMOR_MAX_STRING );
+ strncpytrim(cmor_current_dataset.furtherinfourl, msg, CMOR_MAX_STRING);
} else {
strncpy(cmor_current_dataset.attributes[n].names, msg, CMOR_MAX_STRING);
cmor_trim_string(value, msg);
strncpytrim(cmor_current_dataset.attributes[n].values, msg,
- CMOR_MAX_STRING);
+ CMOR_MAX_STRING);
cmor_current_dataset.nattributes += 1;
}
cmor_pop_traceback();
- return( 0 );
+ return (0);
}
/************************************************************************/
/* cmor_get_cur_dataset_attribute() */
/************************************************************************/
-int cmor_get_cur_dataset_attribute( char *name, char *value ) {
+int cmor_get_cur_dataset_attribute(char *name, char *value)
+{
int i, n;
char msg[CMOR_MAX_STRING];
extern cmor_dataset_def cmor_current_dataset;
- cmor_add_traceback( "cmor_get_cur_dataset_attribute" );
- cmor_is_setup( );
- if( strlen( name ) > CMOR_MAX_STRING ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Dataset: %s length is greater than limit: %i",
- name, CMOR_MAX_STRING );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return( 1 );
+ cmor_add_traceback("cmor_get_cur_dataset_attribute");
+ cmor_is_setup();
+ if (strlen(name) > CMOR_MAX_STRING) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Dataset: %s length is greater than limit: %i",
+ name, CMOR_MAX_STRING);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
}
n = -1;
- for( i = 0; i <= cmor_current_dataset.nattributes; i++ ) {
- if( strcmp( name, cmor_current_dataset.attributes[i].names ) == 0 )
- n = i;
- }
- if( n == -1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Dataset: current dataset does not have attribute : %s",
- name );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return( 1 );
- }
- strncpy( value, cmor_current_dataset.attributes[n].values,
- CMOR_MAX_STRING );
- cmor_pop_traceback( );
- return( 0 );
+ for (i = 0; i <= cmor_current_dataset.nattributes; i++) {
+ if (strcmp(name, cmor_current_dataset.attributes[i].names) == 0)
+ n = i;
+ }
+ if (n == -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Dataset: current dataset does not have attribute : %s", name);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ strncpy(value, cmor_current_dataset.attributes[n].values, CMOR_MAX_STRING);
+ cmor_pop_traceback();
+ return (0);
}
-
-
-
-
/************************************************************************/
/* cmor_has_cur_dataset_attribute() */
/************************************************************************/
-int cmor_has_cur_dataset_attribute( char *name ) {
+int cmor_has_cur_dataset_attribute(char *name)
+{
int i, n;
char msg[CMOR_MAX_STRING];
extern cmor_dataset_def cmor_current_dataset;
- cmor_add_traceback( "cmor_has_cur_dataset_attribute" );
- cmor_is_setup( );
- if( ( int ) strlen( name ) > CMOR_MAX_STRING ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Dataset: attribute name (%s) length\n! "
- "(%i) is greater than limit: %i",
- name, ( int ) strlen( name ), CMOR_MAX_STRING );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return( 1 );
+ cmor_add_traceback("cmor_has_cur_dataset_attribute");
+ cmor_is_setup();
+ if ((int)strlen(name) > CMOR_MAX_STRING) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Dataset: attribute name (%s) length\n! "
+ "(%i) is greater than limit: %i",
+ name, (int)strlen(name), CMOR_MAX_STRING);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
}
n = -1;
- for( i = 0; i <= cmor_current_dataset.nattributes; i++ ) {
- if( strcmp( name, cmor_current_dataset.attributes[i].names ) == 0 )
- n = i;
+ for (i = 0; i <= cmor_current_dataset.nattributes; i++) {
+ if (strcmp(name, cmor_current_dataset.attributes[i].names) == 0)
+ n = i;
}
- if( n == -1 ) {
- cmor_pop_traceback( );
- return( 1 );
+ if (n == -1) {
+ cmor_pop_traceback();
+ return (1);
}
- cmor_pop_traceback( );
- return( 0 );
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_outpath_exist() */
/************************************************************************/
-int cmor_outpath_exist(char *outpath) {
+int cmor_outpath_exist(char *outpath)
+{
struct stat buf;
char msg[CMOR_MAX_STRING];
FILE *test_file = NULL;
int ierr;
- cmor_add_traceback( "cmor_outpath_exist" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_outpath_exist");
+ cmor_is_setup();
/* -------------------------------------------------------------------- */
/* Very first thing is to make sure the output path does exist */
/* -------------------------------------------------------------------- */
- if( stat( cmor_current_dataset.outpath, &buf ) == 0 ) {
- if( S_ISREG( buf.st_mode ) != 0 ) {
- sprintf( msg,
- "You defined your output directory to be: '%s',\n! "
- "but it appears to be a regular file not a directory",
- cmor_current_dataset.outpath );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return(1);
- } else if( S_ISDIR( buf.st_mode ) == 0 ) {
- sprintf( msg,
- "You defined your output directory to be: '%s',\n! "
- "but it appears to be a special file not a directory",
- cmor_current_dataset.outpath );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return(1);
+ if (stat(cmor_current_dataset.outpath, &buf) == 0) {
+ if (S_ISREG(buf.st_mode) != 0) {
+ sprintf(msg,
+ "You defined your output directory to be: '%s',\n! "
+ "but it appears to be a regular file not a directory",
+ cmor_current_dataset.outpath);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ } else if (S_ISDIR(buf.st_mode) == 0) {
+ sprintf(msg,
+ "You defined your output directory to be: '%s',\n! "
+ "but it appears to be a special file not a directory",
+ cmor_current_dataset.outpath);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
}
/* -------------------------------------------------------------------- */
/* ok if not root then test permissions */
/* -------------------------------------------------------------------- */
- if( getuid( ) != 0 ) {
- strcpy( msg, cmor_current_dataset.outpath );
- strncat( msg, "/tmp.cmor.test", CMOR_MAX_STRING );
- test_file = fopen( msg, "w" );
- if( test_file == NULL ) {
+ if (getuid() != 0) {
+ strcpy(msg, cmor_current_dataset.outpath);
+ strncat(msg, "/tmp.cmor.test", CMOR_MAX_STRING);
+ test_file = fopen(msg, "w");
+ if (test_file == NULL) {
- sprintf( msg,
- "You defined your output directory to be: '%s', but\n! "
+ sprintf(msg,
+ "You defined your output directory to be: '%s', but\n! "
"you do not have read/write permissions on it",
- cmor_current_dataset.outpath );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return(1);
+ cmor_current_dataset.outpath);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
} else {
- fclose( test_file );
- remove( msg );
+ fclose(test_file);
+ remove(msg);
}
}
- } else if( errno == ENOENT ) {
- sprintf( msg,
- "You defined your output directory to be: '%s', but this\n! "
+ } else if (errno == ENOENT) {
+ sprintf(msg,
+ "You defined your output directory to be: '%s', but this\n! "
"directory does not exist. CMOR will create it!",
- cmor_current_dataset.outpath );
- cmor_handle_error( msg, CMOR_WARNING );
+ cmor_current_dataset.outpath);
+ cmor_handle_error(msg, CMOR_WARNING);
/* -------------------------------------------------------------------- */
/* Create directory with 755 permission for user */
/* -------------------------------------------------------------------- */
ierr = mkdir(cmor_current_dataset.outpath, S_IRWXU | S_IRGRP | S_IXGRP |
- S_IROTH | S_IXOTH);
- if( ierr != 0 ) {
- sprintf( msg,
+ S_IROTH | S_IXOTH);
+ if (ierr != 0) {
+ sprintf(msg,
"CMOR was unable to create this directory %s\n! "
"You do not have write permissions!",
- cmor_current_dataset.outpath );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return(1);
+ cmor_current_dataset.outpath);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
}
-
- } else if( errno == EACCES ) {
- sprintf( msg,
- "You defined your output directory to be: '%s', but we\n! "
+ } else if (errno == EACCES) {
+ sprintf(msg,
+ "You defined your output directory to be: '%s', but we\n! "
"cannot access it, please check permissions",
- cmor_current_dataset.outpath );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return(1);
-
+ cmor_current_dataset.outpath);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
}
- cmor_pop_traceback( );
- return(0);
+ cmor_pop_traceback();
+ return (0);
}
-
/************************************************************************/
/* cmor_convert_string_to_list() */
/************************************************************************/
-int cmor_convert_string_to_list( char *invalues, char type, void **target,
- int *nelts ) {
+int cmor_convert_string_to_list(char *invalues, char type, void **target,
+ int *nelts)
+{
int i, j, k, itmp;
long l;
double d;
@@ -1607,500 +1594,524 @@ int cmor_convert_string_to_list( char *invalues, char type, void **target,
char msg2[CMOR_MAX_STRING];
j = 1;
- cmor_add_traceback( "cmor_convert_string_to_list" );
-
+ cmor_add_traceback("cmor_convert_string_to_list");
+
/* -------------------------------------------------------------------- */
/* trim this so no extra spaces after or before */
/* -------------------------------------------------------------------- */
- strncpytrim( values, invalues, CMOR_MAX_STRING );
- k = 1; /* 1 means we are on characters */
- for( i = 0; i < strlen( values ); i++ ) {
- if( values[i] == ' ' ) {
- if( k == 1 ) {
- j++;
- k = 0;
- }
- while( values[i + 1] == ' ' )
- i++;
- } else {
- k = 1;
- }
+ strncpytrim(values, invalues, CMOR_MAX_STRING);
+ k = 1; /* 1 means we are on characters */
+ for (i = 0; i < strlen(values); i++) {
+ if (values[i] == ' ') {
+ if (k == 1) {
+ j++;
+ k = 0;
+ }
+ while (values[i + 1] == ' ')
+ i++;
+ } else {
+ k = 1;
+ }
}
*nelts = j;
- if( type == 'i' )
- *target = malloc( j * sizeof ( int ) );
- else if( type == 'f' )
- *target = malloc( j * sizeof ( float ) );
- else if( type == 'l' )
- *target = malloc( j * sizeof ( long ) );
- else if( type == 'd' )
- *target = malloc( j * sizeof ( double ) );
- else if( type == 'c' )
- *target = ( char ** ) malloc( j * sizeof ( char * ) );
+ if (type == 'i')
+ *target = malloc(j * sizeof(int));
+ else if (type == 'f')
+ *target = malloc(j * sizeof(float));
+ else if (type == 'l')
+ *target = malloc(j * sizeof(long));
+ else if (type == 'd')
+ *target = malloc(j * sizeof(double));
+ else if (type == 'c')
+ *target = (char **)malloc(j * sizeof(char *));
else {
- snprintf( msg, CMOR_MAX_STRING,
- "unknown conversion '%c' for list: %s", type, values );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ snprintf(msg, CMOR_MAX_STRING,
+ "unknown conversion '%c' for list: %s", type, values);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
- if( *target == NULL ) {
- snprintf( msg, CMOR_MAX_STRING, "mallocing '%c' for list: %s",
- type, values );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (*target == NULL) {
+ snprintf(msg, CMOR_MAX_STRING, "mallocing '%c' for list: %s",
+ type, values);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
j = 0;
msg[0] = '\0';
k = 0;
itmp = 1;
- for( i = 0; i < strlen( values ); i++ ) {
- if( values[i] == ' ' ) { /* ok next world */
- if( itmp == 1 ) {
- itmp = 0;
- msg[i - k] = '\0';
- strncpytrim( msg2, msg, CMOR_MAX_STRING );
- if( type == 'i' ) {
- sscanf( msg2, "%d", &itmp );
- ( ( int * ) *target )[j] = ( int ) itmp;
- } else if( type == 'l' ) {
- sscanf( msg2, "%ld", &l );
- ( ( long * ) *target )[j] = ( long ) l;
- } else if( type == 'f' ) {
- sscanf( msg2, "%f", &f );
- ( ( float * ) *target )[j] = ( float ) f;
- } else if( type == 'd' ) {
- sscanf( msg2, "%lf", &d );
- ( ( double * ) *target )[j] = ( double ) d;
- } else if( type == 'c' ) {
- ( ( char ** ) *target )[j] =
- ( char * ) malloc( 13 * sizeof ( char ) );
- strncpy( ( ( char ** ) *target )[j], msg2, 12 );
- }
- j++;
- }
- while( values[i + 1] == ' ' )
- i++;
- k = i + 1;
- } else {
- msg[i - k] = values[i];
- itmp = 1;
- }
+ for (i = 0; i < strlen(values); i++) {
+ if (values[i] == ' ') { /* ok next world */
+ if (itmp == 1) {
+ itmp = 0;
+ msg[i - k] = '\0';
+ strncpytrim(msg2, msg, CMOR_MAX_STRING);
+ if (type == 'i') {
+ sscanf(msg2, "%d", &itmp);
+ ((int *)*target)[j] = (int)itmp;
+ } else if (type == 'l') {
+ sscanf(msg2, "%ld", &l);
+ ((long *)*target)[j] = (long)l;
+ } else if (type == 'f') {
+ sscanf(msg2, "%f", &f);
+ ((float *)*target)[j] = (float)f;
+ } else if (type == 'd') {
+ sscanf(msg2, "%lf", &d);
+ ((double *)*target)[j] = (double)d;
+ } else if (type == 'c') {
+ ((char **)*target)[j] = (char *)malloc(13 * sizeof(char));
+ strncpy(((char **)*target)[j], msg2, 12);
+ }
+ j++;
+ }
+ while (values[i + 1] == ' ')
+ i++;
+ k = i + 1;
+ } else {
+ msg[i - k] = values[i];
+ itmp = 1;
+ }
}
/* -------------------------------------------------------------------- */
/* ok now the last one */
/* -------------------------------------------------------------------- */
msg[i - k] = '\0';
- strncpytrim( msg2, msg, CMOR_MAX_STRING );
- if( type == 'i' ) {
- sscanf( msg2, "%d", &itmp );
- ( ( int * ) *target )[j] = ( int ) itmp;
- } else if( type == 'l' ) {
- sscanf( msg2, "%ld", &l );
- ( ( long * ) *target )[j] = ( long ) l;
- } else if( type == 'f' ) {
- sscanf( msg2, "%f", &f );
- ( ( float * ) *target )[j] = ( float ) f;
- } else if( type == 'd' ) {
- sscanf( msg2, "%lf", &d );
- ( ( double * ) *target )[j] = ( double ) d;
- } else if( type == 'c' ) {
- ( ( char ** ) *target )[j] =
- ( char * ) malloc( 13 * sizeof ( char ) );
- strncpy( ( ( char ** ) *target )[j], msg2, 12 );
- }
- cmor_pop_traceback( );
- return( 0 );
+ strncpytrim(msg2, msg, CMOR_MAX_STRING);
+ if (type == 'i') {
+ sscanf(msg2, "%d", &itmp);
+ ((int *)*target)[j] = (int)itmp;
+ } else if (type == 'l') {
+ sscanf(msg2, "%ld", &l);
+ ((long *)*target)[j] = (long)l;
+ } else if (type == 'f') {
+ sscanf(msg2, "%f", &f);
+ ((float *)*target)[j] = (float)f;
+ } else if (type == 'd') {
+ sscanf(msg2, "%lf", &d);
+ ((double *)*target)[j] = (double)d;
+ } else if (type == 'c') {
+ ((char **)*target)[j] = (char *)malloc(13 * sizeof(char));
+ strncpy(((char **)*target)[j], msg2, 12);
+ }
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_define_zfactors_vars() */
/************************************************************************/
-int cmor_define_zfactors_vars( int var_id, int ncid, int *nc_dim,
- char *formula_terms, int *nzfactors,
- int *zfactors, int *nc_zfactors, int i,
- int dim_bnds ) {
+int cmor_define_zfactors_vars(int var_id, int ncid, int *nc_dim,
+ char *formula_terms, int *nzfactors,
+ int *zfactors, int *nc_zfactors, int i,
+ int dim_bnds)
+{
char msg[CMOR_MAX_STRING];
char ctmp[CMOR_MAX_STRING];
int ierr = 0, l, m, k, n, j, m2, found, nelts, *int_list = NULL;
int dim_holder[CMOR_MAX_VARIABLES];
int lnzfactors;
int ics, icd, icdl, ia;
- cmor_add_traceback( "cmor_define_zfactors_vars" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_define_zfactors_vars");
+ cmor_is_setup();
lnzfactors = *nzfactors;
-
+
/* -------------------------------------------------------------------- */
/* now figures out the variables for z_factor and loops thru it */
/* -------------------------------------------------------------------- */
- n = strlen(formula_terms);
- for (j = 0; j < n; j++) {
- while ((formula_terms[j] != ':') && (j < n)) {
- j++;
- }
+ n = strlen(formula_terms);
+ for (j = 0; j < n; j++) {
+ while ((formula_terms[j] != ':') && (j < n)) {
+ j++;
+ }
/* -------------------------------------------------------------------- */
/* at this point we skipped the name thingy */
/* -------------------------------------------------------------------- */
- j++;
- while (formula_terms[j] == ' ') {
- j++;
- } /* ok we skipped the blanks as well */
- /* ok now we can start scanning the zvar name */
- k = j;
- while ((formula_terms[j] != ' ') && (formula_terms[j] != '\0')) {
- ctmp[j - k] = formula_terms[j];
- j++;
- }
-
+ j++;
+ while (formula_terms[j] == ' ') {
+ j++;
+ } /* ok we skipped the blanks as well */
+ /* ok now we can start scanning the zvar name */
+ k = j;
+ while ((formula_terms[j] != ' ') && (formula_terms[j] != '\0')) {
+ ctmp[j - k] = formula_terms[j];
+ j++;
+ }
+
/* -------------------------------------------------------------------- */
/* all right here we reach a blank, the name is finsihed */
/* -------------------------------------------------------------------- */
- ctmp[j - k] = '\0';
-
+ ctmp[j - k] = '\0';
+
/* -------------------------------------------------------------------- */
/* here we try to match with the actual variable */
/* -------------------------------------------------------------------- */
- l = -1;
- for (k = 0; k < cmor_nvars + 1; k++) {
- if (strcmp(ctmp, cmor_vars[k].id) == 0) {
+ l = -1;
+ for (k = 0; k < cmor_nvars + 1; k++) {
+ if (strcmp(ctmp, cmor_vars[k].id) == 0) {
/* -------------------------------------------------------------------- */
/* ok that is not enough! We need to know if the dims match! */
/* -------------------------------------------------------------------- */
- nelts = 0;
- for (m = 0; m < cmor_vars[k].ndims; m++) {
- for (m2 = 0; m2 < cmor_vars[var_id].ndims; m2++) {
- if (cmor_vars[k].axes_ids[m]
- == cmor_vars[var_id].axes_ids[m2]) {
- nelts += 1;
- break;
- }
- }
- }
- if (nelts == cmor_vars[k].ndims) {
- l = k;
- break;
- }
- }
- }
-
- if (l == -1) {
+ nelts = 0;
+ for (m = 0; m < cmor_vars[k].ndims; m++) {
+ for (m2 = 0; m2 < cmor_vars[var_id].ndims; m2++) {
+ if (cmor_vars[k].axes_ids[m]
+ == cmor_vars[var_id].axes_ids[m2]) {
+ nelts += 1;
+ break;
+ }
+ }
+ }
+ if (nelts == cmor_vars[k].ndims) {
+ l = k;
+ break;
+ }
+ }
+ }
+
+ if (l == -1) {
/* -------------------------------------------------------------------- */
/* ok this looks bad! last hope is that the */
/* zfactor is actually a coordinate! */
/* -------------------------------------------------------------------- */
- found = 0;
- for (m = 0; m < cmor_vars[var_id].ndims; m++) {
- if (strcmp(cmor_axes[cmor_vars[var_id].axes_ids[m]].id, ctmp)
- == 0) {
- found = 1;
- break;
- }
+ found = 0;
+ for (m = 0; m < cmor_vars[var_id].ndims; m++) {
+ if (strcmp(cmor_axes[cmor_vars[var_id].axes_ids[m]].id, ctmp)
+ == 0) {
+ found = 1;
+ break;
+ }
/* -------------------------------------------------------------------- */
/* ok this axes has bounds let's check against his name + _bnds then*/
/* -------------------------------------------------------------------- */
- if (cmor_axes[cmor_vars[var_id].axes_ids[m]].bounds != NULL) {
-
- sprintf(msg, "%s_bnds",
- cmor_axes[cmor_vars[var_id].axes_ids[m]].id);
- if (strcmp(msg, ctmp) == 0) {
- found = 1;
- break;
- }
- }
- }
- if (found == 0) {
- snprintf(msg, CMOR_MAX_STRING,
- "could not find the zfactor variable: %s,\n! "
- "please define it first, while defining zfactors\n! "
- "for variable %s (table %s)", ctmp,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
- cmor_pop_traceback();
- return (1);
- }
- } else {
- found = 0;
- }
+ if (cmor_axes[cmor_vars[var_id].axes_ids[m]].bounds != NULL) {
+
+ sprintf(msg, "%s_bnds",
+ cmor_axes[cmor_vars[var_id].axes_ids[m]].id);
+ if (strcmp(msg, ctmp) == 0) {
+ found = 1;
+ break;
+ }
+ }
+ }
+ if (found == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "could not find the zfactor variable: %s,\n! "
+ "please define it first, while defining zfactors\n! "
+ "for variable %s (table %s)", ctmp,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].ref_table_id].
+ szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ cmor_pop_traceback();
+ return (1);
+ }
+ } else {
+ found = 0;
+ }
/* -------------------------------------------------------------------- */
/* now figure out if we already defined this zfactor var */
/* -------------------------------------------------------------------- */
- for (k = 0; k < lnzfactors; k++)
- if (zfactors[k] == l)
- found = 1;
- if (found == 0) {
+ for (k = 0; k < lnzfactors; k++)
+ if (zfactors[k] == l)
+ found = 1;
+ if (found == 0) {
/* -------------------------------------------------------------------- */
/* ok it is a new one */
/* -------------------------------------------------------------------- */
- zfactors[lnzfactors] = l;
+ zfactors[lnzfactors] = l;
/* -------------------------------------------------------------------- */
/* ok we need to figure out the dimensions of that zfactor */
/* and then define the variable */
/* -------------------------------------------------------------------- */
- for (k = 0; k < cmor_vars[l].ndims; k++) {
- found = 0;
- for (m = 0; m < cmor_vars[var_id].ndims; m++) {
- if (strcmp(cmor_axes[cmor_vars[var_id].axes_ids[m]].id,
- cmor_axes[cmor_vars[l].axes_ids[k]].id) == 0) {
- found = 1;
- dim_holder[k] = nc_dim[m];
+ for (k = 0; k < cmor_vars[l].ndims; k++) {
+ found = 0;
+ for (m = 0; m < cmor_vars[var_id].ndims; m++) {
+ if (strcmp(cmor_axes[cmor_vars[var_id].axes_ids[m]].id,
+ cmor_axes[cmor_vars[l].axes_ids[k]].id) == 0) {
+ found = 1;
+ dim_holder[k] = nc_dim[m];
/* -------------------------------------------------------------------- */
/* ok here we mark this factor has time varying if necessary */
/* so that we can count the number of time written and make */
/* sure it matches the variable */
/* -------------------------------------------------------------------- */
- if (cmor_axes[cmor_vars[var_id].axes_ids[m]].axis
- == 'T') {
- for (ia = 0; ia < 10; ia++) {
- if (cmor_vars[var_id].associated_ids[ia]
- == -1) {
- cmor_vars[var_id].associated_ids[ia] = l;
- break;
- }
- }
- }
- break;
- }
- }
- if (found == 0) {
- snprintf(msg, CMOR_MAX_STRING,
- "variable \"%s\" (table: %s) has axis \"%s\"\n! "
- "defined with formula terms, but term \"%s\"\n! "
- "depends on axis \"%s\" which is not part of\n! "
- "the variable", cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].szTable_id,
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id, ctmp,
- cmor_axes[cmor_vars[l].axes_ids[k]].id);
- cmor_handle_error(msg, CMOR_CRITICAL);
- }
- }
+ if (cmor_axes[cmor_vars[var_id].axes_ids[m]].axis
+ == 'T') {
+ for (ia = 0; ia < 10; ia++) {
+ if (cmor_vars[var_id].associated_ids[ia]
+ == -1) {
+ cmor_vars[var_id].associated_ids[ia] = l;
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+ if (found == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "variable \"%s\" (table: %s) has axis \"%s\"\n! "
+ "defined with formula terms, but term \"%s\"\n! "
+ "depends on axis \"%s\" which is not part of\n! "
+ "the variable", cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].ref_table_id].
+ szTable_id,
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id, ctmp,
+ cmor_axes[cmor_vars[l].axes_ids[k]].id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+ }
/* -------------------------------------------------------------------- */
/* at that point we can define the var */
/* -------------------------------------------------------------------- */
- if (dim_bnds == -1) { /* we are not defining a bnds one */
- if (cmor_vars[l].type == 'd')
- ierr = nc_def_var(ncid, cmor_vars[l].id, NC_DOUBLE,
- cmor_vars[l].ndims, &dim_holder[0],
- &nc_zfactors[lnzfactors]);
- else if (cmor_vars[l].type == 'f')
- ierr = nc_def_var(ncid, cmor_vars[l].id, NC_FLOAT,
- cmor_vars[l].ndims, &dim_holder[0],
- &nc_zfactors[lnzfactors]);
- else if (cmor_vars[l].type == 'l')
- ierr = nc_def_var(ncid, cmor_vars[l].id, NC_INT,
- cmor_vars[l].ndims, &dim_holder[0],
- &nc_zfactors[lnzfactors]);
- else if (cmor_vars[l].type == 'i')
- ierr = nc_def_var(ncid, cmor_vars[l].id, NC_INT,
- cmor_vars[l].ndims, &dim_holder[0],
- &nc_zfactors[lnzfactors]);
- if (ierr != NC_NOERR) {
- snprintf(msg, CMOR_MAX_STRING,
- "NC Error (%i: %s) for variable %s (table %s)\n! "
- "error defining zfactor var: %i (%s)", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].szTable_id,
- lnzfactors, cmor_vars[l].id);
- cmor_handle_error(msg, CMOR_CRITICAL);
- }
+ if (dim_bnds == -1) { /* we are not defining a bnds one */
+ if (cmor_vars[l].type == 'd')
+ ierr = nc_def_var(ncid, cmor_vars[l].id, NC_DOUBLE,
+ cmor_vars[l].ndims, &dim_holder[0],
+ &nc_zfactors[lnzfactors]);
+ else if (cmor_vars[l].type == 'f')
+ ierr = nc_def_var(ncid, cmor_vars[l].id, NC_FLOAT,
+ cmor_vars[l].ndims, &dim_holder[0],
+ &nc_zfactors[lnzfactors]);
+ else if (cmor_vars[l].type == 'l')
+ ierr = nc_def_var(ncid, cmor_vars[l].id, NC_INT,
+ cmor_vars[l].ndims, &dim_holder[0],
+ &nc_zfactors[lnzfactors]);
+ else if (cmor_vars[l].type == 'i')
+ ierr = nc_def_var(ncid, cmor_vars[l].id, NC_INT,
+ cmor_vars[l].ndims, &dim_holder[0],
+ &nc_zfactors[lnzfactors]);
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NC Error (%i: %s) for variable %s (table %s)\n! "
+ "error defining zfactor var: %i (%s)", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].ref_table_id].
+ szTable_id, lnzfactors, cmor_vars[l].id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
/* -------------------------------------------------------------------- */
/* Compression stuff */
/* -------------------------------------------------------------------- */
- if ((CMOR_NETCDF_MODE != CMOR_REPLACE_3)
- && (CMOR_NETCDF_MODE != CMOR_PRESERVE_3)
- && (CMOR_NETCDF_MODE != CMOR_APPEND_3)) {
- if (cmor_vars[l].ndims > 0) {
- int nTableID = cmor_vars[l].ref_table_id;
- ics = cmor_tables[nTableID].vars[nTableID].shuffle;
- icd = cmor_tables[nTableID].vars[nTableID].deflate;
- icdl =
- cmor_tables[nTableID].vars[nTableID].deflate_level;
- ierr = nc_def_var_deflate(ncid, nc_zfactors[lnzfactors],
- ics, icd, icdl);
-
- if (ierr != NC_NOERR) {
- snprintf(msg, CMOR_MAX_STRING,
- "NCError (%i: %s) defining compression\n! "
- "parameters for zfactor variable %s for\n! "
- "variable '%s' (table %s)", ierr,
- nc_strerror(ierr), cmor_vars[l].id,
- cmor_vars[var_id].id,
- cmor_tables[nTableID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
- }
- }
- }
+ if ((CMOR_NETCDF_MODE != CMOR_REPLACE_3)
+ && (CMOR_NETCDF_MODE != CMOR_PRESERVE_3)
+ && (CMOR_NETCDF_MODE != CMOR_APPEND_3)) {
+ if (cmor_vars[l].ndims > 0) {
+ int nTableID = cmor_vars[l].ref_table_id;
+ ics = cmor_tables[nTableID].vars[nTableID].shuffle;
+ icd = cmor_tables[nTableID].vars[nTableID].deflate;
+ icdl =
+ cmor_tables[nTableID].vars[nTableID].deflate_level;
+ ierr = nc_def_var_deflate(ncid, nc_zfactors[lnzfactors],
+ ics, icd, icdl);
+
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NCError (%i: %s) defining compression\n! "
+ "parameters for zfactor variable %s for\n! "
+ "variable '%s' (table %s)", ierr,
+ nc_strerror(ierr), cmor_vars[l].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nTableID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+ }
+ }
/* -------------------------------------------------------------------- */
/* Creates attribute related to that variable */
/* -------------------------------------------------------------------- */
- for (k = 0; k < cmor_vars[l].nattributes; k++) {
+ for (k = 0; k < cmor_vars[l].nattributes; k++) {
/* -------------------------------------------------------------------- */
/* first of all we need to make sure it is not an empty attribute */
/* -------------------------------------------------------------------- */
- if (cmor_has_variable_attribute(l,
- cmor_vars[l].attributes[k]) != 0) {
+ if (cmor_has_variable_attribute(l,
+ cmor_vars[l].
+ attributes[k]) != 0) {
/* -------------------------------------------------------------------- */
/* deleted attribute continue on */
/* -------------------------------------------------------------------- */
- continue;
- }
- if (strcmp(cmor_vars[l].attributes[k], "flag_values")
- == 0) {
+ continue;
+ }
+ if (strcmp(cmor_vars[l].attributes[k], "flag_values")
+ == 0) {
/* -------------------------------------------------------------------- */
/* ok we need to convert the string to a list of int */
/* -------------------------------------------------------------------- */
- ierr = cmor_convert_string_to_list(
- cmor_vars[l].attributes_values_char[k], 'i',
- (void *) &int_list, &nelts);
-
- ierr = nc_put_att_int(ncid, nc_zfactors[lnzfactors],
- "flag_values",
- NC_INT, nelts, int_list);
-
- if (ierr != NC_NOERR) {
- snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) setting flags\n! "
- "numerical attribute on zfactor\n! "
- "variable %s for variable %s (table %s)",
- ierr, nc_strerror(ierr), cmor_vars[l].id,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
- }
- free(int_list);
- } else if (cmor_vars[l].attributes_type[k] == 'c') {
- ierr = cmor_put_nc_char_attribute(ncid,
- nc_zfactors[lnzfactors],
- cmor_vars[l].attributes[k],
- cmor_vars[l].attributes_values_char[k],
- cmor_vars[l].id);
- } else {
- ierr = cmor_put_nc_num_attribute(ncid,
- nc_zfactors[lnzfactors],
- cmor_vars[l].attributes[k],
- cmor_vars[l].attributes_type[k],
- cmor_vars[l].attributes_values_num[k],
- cmor_vars[l].id);
- }
- }
- lnzfactors += 1;
- } else {
+ ierr =
+ cmor_convert_string_to_list(cmor_vars[l].
+ attributes_values_char[k],
+ 'i', (void *)&int_list,
+ &nelts);
+
+ ierr = nc_put_att_int(ncid, nc_zfactors[lnzfactors],
+ "flag_values",
+ NC_INT, nelts, int_list);
+
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NetCDF Error (%i: %s) setting flags\n! "
+ "numerical attribute on zfactor\n! "
+ "variable %s for variable %s (table %s)",
+ ierr, nc_strerror(ierr), cmor_vars[l].id,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+ free(int_list);
+ } else if (cmor_vars[l].attributes_type[k] == 'c') {
+ ierr = cmor_put_nc_char_attribute(ncid,
+ nc_zfactors
+ [lnzfactors],
+ cmor_vars[l].
+ attributes[k],
+ cmor_vars[l].
+ attributes_values_char
+ [k], cmor_vars[l].id);
+ } else {
+ ierr = cmor_put_nc_num_attribute(ncid,
+ nc_zfactors
+ [lnzfactors],
+ cmor_vars[l].
+ attributes[k],
+ cmor_vars[l].
+ attributes_type[k],
+ cmor_vars[l].
+ attributes_values_num
+ [k], cmor_vars[l].id);
+ }
+ }
+ lnzfactors += 1;
+ } else {
/* -------------------------------------------------------------------- */
/* ok now we need to see if we have bounds on that variable */
/* -------------------------------------------------------------------- */
- dim_holder[cmor_vars[l].ndims] = dim_bnds;
- if (cmor_vars[l].type == 'd')
- ierr = nc_def_var(ncid, cmor_vars[l].id, NC_DOUBLE,
- cmor_vars[l].ndims + 1, &dim_holder[0],
- &nc_zfactors[lnzfactors]);
- else if (cmor_vars[l].type == 'f')
- ierr = nc_def_var(ncid, cmor_vars[l].id, NC_FLOAT,
- cmor_vars[l].ndims + 1, &dim_holder[0],
- &nc_zfactors[lnzfactors]);
- else if (cmor_vars[l].type == 'l')
- ierr = nc_def_var(ncid, cmor_vars[l].id, NC_INT,
- cmor_vars[l].ndims + 1, &dim_holder[0],
- &nc_zfactors[lnzfactors]);
- else if (cmor_vars[l].type == 'i')
- ierr = nc_def_var(ncid, cmor_vars[l].id, NC_INT,
- cmor_vars[l].ndims + 1, &dim_holder[0],
- &nc_zfactors[lnzfactors]);
- if (ierr != NC_NOERR) {
- snprintf(msg, CMOR_MAX_STRING,
- "NC Error (%i: %s) for variable %s (table: %s),\n! "
- "error defining zfactor var: %i (%s)", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].szTable_id,
- lnzfactors, cmor_vars[l].id);
- cmor_handle_error(msg, CMOR_CRITICAL);
- }
+ dim_holder[cmor_vars[l].ndims] = dim_bnds;
+ if (cmor_vars[l].type == 'd')
+ ierr = nc_def_var(ncid, cmor_vars[l].id, NC_DOUBLE,
+ cmor_vars[l].ndims + 1, &dim_holder[0],
+ &nc_zfactors[lnzfactors]);
+ else if (cmor_vars[l].type == 'f')
+ ierr = nc_def_var(ncid, cmor_vars[l].id, NC_FLOAT,
+ cmor_vars[l].ndims + 1, &dim_holder[0],
+ &nc_zfactors[lnzfactors]);
+ else if (cmor_vars[l].type == 'l')
+ ierr = nc_def_var(ncid, cmor_vars[l].id, NC_INT,
+ cmor_vars[l].ndims + 1, &dim_holder[0],
+ &nc_zfactors[lnzfactors]);
+ else if (cmor_vars[l].type == 'i')
+ ierr = nc_def_var(ncid, cmor_vars[l].id, NC_INT,
+ cmor_vars[l].ndims + 1, &dim_holder[0],
+ &nc_zfactors[lnzfactors]);
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NC Error (%i: %s) for variable %s (table: %s),\n! "
+ "error defining zfactor var: %i (%s)", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].ref_table_id].
+ szTable_id, lnzfactors, cmor_vars[l].id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
/* -------------------------------------------------------------------- */
/* Creates attribute related to that variable */
/* -------------------------------------------------------------------- */
- for (k = 0; k < cmor_vars[l].nattributes; k++) {
+ for (k = 0; k < cmor_vars[l].nattributes; k++) {
/* -------------------------------------------------------------------- */
/* first of all we need to make sure it is not an empty attribute */
/* -------------------------------------------------------------------- */
- if (cmor_has_variable_attribute(l,
- cmor_vars[l].attributes[k]) != 0) {
+ if (cmor_has_variable_attribute(l,
+ cmor_vars[l].
+ attributes[k]) != 0) {
/* -------------------------------------------------------------------- */
/* deleted attribute continue on */
/* -------------------------------------------------------------------- */
- continue;
- }
- if (strcmp(cmor_vars[l].attributes[k], "flag_values")
- == 0) {
+ continue;
+ }
+ if (strcmp(cmor_vars[l].attributes[k], "flag_values")
+ == 0) {
/* -------------------------------------------------------------------- */
/* ok we need to convert the string to a list of int */
/* -------------------------------------------------------------------- */
- ierr = cmor_convert_string_to_list(
- cmor_vars[l].attributes_values_char[k], 'i',
- (void *) &int_list, &nelts);
-
- ierr = nc_put_att_int(ncid, nc_zfactors[lnzfactors],
- "flag_values",
- NC_INT, nelts, int_list);
-
- if (ierr != NC_NOERR) {
- snprintf(msg,
- CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) setting flags numerical "
- "attribute on zfactor variable %s for variable "
- "%s (table: %s)", ierr,
- nc_strerror(ierr), cmor_vars[l].id,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
- }
- free(int_list);
-
- } else if (cmor_vars[l].attributes_type[k] == 'c') {
- ierr = cmor_put_nc_char_attribute(ncid,
- nc_zfactors[lnzfactors],
- cmor_vars[l].attributes[k],
- cmor_vars[l].attributes_values_char[k],
- cmor_vars[l].id);
- } else {
- ierr = cmor_put_nc_num_attribute(ncid,
- nc_zfactors[lnzfactors],
- cmor_vars[l].attributes[k],
- cmor_vars[l].attributes_type[k],
- cmor_vars[l].attributes_values_num[k],
- cmor_vars[l].id);
- }
- }
-
- lnzfactors += 1;
- }
- }
-
- while ((formula_terms[j] == ' ') && (formula_terms[j] != '\0')) {
- j++;
- } /* skip the other whites */
- }
- *nzfactors = lnzfactors;
- cmor_pop_traceback();
- return (0);
+ ierr =
+ cmor_convert_string_to_list(cmor_vars[l].
+ attributes_values_char[k],
+ 'i', (void *)&int_list,
+ &nelts);
+
+ ierr = nc_put_att_int(ncid, nc_zfactors[lnzfactors],
+ "flag_values",
+ NC_INT, nelts, int_list);
+
+ if (ierr != NC_NOERR) {
+ snprintf(msg,
+ CMOR_MAX_STRING,
+ "NetCDF Error (%i: %s) setting flags numerical "
+ "attribute on zfactor variable %s for variable "
+ "%s (table: %s)", ierr,
+ nc_strerror(ierr), cmor_vars[l].id,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+ free(int_list);
+
+ } else if (cmor_vars[l].attributes_type[k] == 'c') {
+ ierr = cmor_put_nc_char_attribute(ncid,
+ nc_zfactors
+ [lnzfactors],
+ cmor_vars[l].
+ attributes[k],
+ cmor_vars[l].
+ attributes_values_char
+ [k], cmor_vars[l].id);
+ } else {
+ ierr = cmor_put_nc_num_attribute(ncid,
+ nc_zfactors
+ [lnzfactors],
+ cmor_vars[l].
+ attributes[k],
+ cmor_vars[l].
+ attributes_type[k],
+ cmor_vars[l].
+ attributes_values_num
+ [k], cmor_vars[l].id);
+ }
+ }
+
+ lnzfactors += 1;
+ }
+ }
+
+ while ((formula_terms[j] == ' ') && (formula_terms[j] != '\0')) {
+ j++;
+ } /* skip the other whites */
+ }
+ *nzfactors = lnzfactors;
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_flip_hybrid() */
/************************************************************************/
-void cmor_flip_hybrid( int var_id, int i, char *a, char *b, char *abnds,
- char *bbnds ) {
+void cmor_flip_hybrid(int var_id, int i, char *a, char *b, char *abnds,
+ char *bbnds)
+{
int doflip, j, k, l = 0;
double tmp;
extern cmor_var_t cmor_vars[CMOR_MAX_VARIABLES];
extern cmor_axis_t cmor_axes[CMOR_MAX_AXES];
- cmor_add_traceback( "cmor_flip_hybrid" );
+ cmor_add_traceback("cmor_flip_hybrid");
/* -------------------------------------------------------------------- */
/* here we need to look and see if we need to flip the */
@@ -2116,112 +2127,114 @@ void cmor_flip_hybrid( int var_id, int i, char *a, char *b, char *abnds,
pTableAxis = &cmor_tables[nVarAxisTableID].axes[nVarAxisTableID];
-
- if( pTableAxis->stored_direction == 'd' ) {
+ if (pTableAxis->stored_direction == 'd') {
/* -------------------------------------------------------------------- */
/* decrease stuff */
/* -------------------------------------------------------------------- */
- if( pVarAxis->values[1] > pVarAxis->values[0] )
- doflip = 1;
+ if (pVarAxis->values[1] > pVarAxis->values[0])
+ doflip = 1;
} else {
/* -------------------------------------------------------------------- */
/* increase stuff */
/* -------------------------------------------------------------------- */
- if( pVarAxis->values[1] < pVarAxis->values[0] )
- doflip = 1;
+ if (pVarAxis->values[1] < pVarAxis->values[0])
+ doflip = 1;
}
- if( doflip == 1 ) {
+ if (doflip == 1) {
/* -------------------------------------------------------------------- */
/* look for a coeff */
/* -------------------------------------------------------------------- */
- k = -1;
- for( j = 0; j <= cmor_nvars; j++ )
- if( ( strcmp( cmor_vars[j].id, a ) == 0 ) &&
- ( cmor_vars[j].zaxis == cmor_vars[var_id].axes_ids[i] ) ) {
- k = j;
- break;
- }
+ k = -1;
+ for (j = 0; j <= cmor_nvars; j++)
+ if ((strcmp(cmor_vars[j].id, a) == 0) &&
+ (cmor_vars[j].zaxis == cmor_vars[var_id].axes_ids[i])) {
+ k = j;
+ break;
+ }
/* -------------------------------------------------------------------- */
/* look for b coeff */
/* -------------------------------------------------------------------- */
- if( b != NULL ) {
- l = -1;
- for( j = 0; j <= cmor_nvars; j++ ) {
- if( ( strcmp( cmor_vars[j].id, b ) == 0 ) &&
- ( cmor_vars[j].zaxis == cmor_vars[var_id].axes_ids[i] ) ) {
- l = j;
- break;
- }
- }
- }
-
- for( j = 0; j < pVarAxis->length / 2; j++ ) {
-
- tmp = pVarAxis->values[j];
- pVarAxis->values[j] = pVarAxis->values[pVarAxis->length - 1 - j];
- pVarAxis->values[pVarAxis->length -1 - j] = tmp;
-
- tmp = cmor_vars[k].values[j];
- cmor_vars[k].values[j] =
- cmor_vars[k].values[pVarAxis->length - 1 - j];
- cmor_vars[k].values[pVarAxis->length - 1 - j] = tmp;
-
- if( b != NULL ) {
- tmp = cmor_vars[l].values[j];
- cmor_vars[l].values[j] =
- cmor_vars[l].values[pVarAxis->length - 1 - j];
- cmor_vars[l].values[pVarAxis->length - 1 - j] = tmp;
- }
- }
-
- if( pVarAxis->bounds != NULL ) {
- k = -1;
- for( j = 0; j <= cmor_nvars; j++ ) {
- if( ( strcmp( cmor_vars[j].id, abnds ) == 0 ) &&
- ( cmor_vars[j].zaxis == cmor_vars[var_id].axes_ids[i] ) ) {
- k = j;
- break;
- }
- }
-
- if( bbnds != NULL ) {
- l = -1;
- for( j = 0; j <= cmor_nvars; j++ ) {
- if( ( strcmp( cmor_vars[j].id, bbnds ) == 0 ) &&
- ( cmor_vars[j].zaxis == cmor_vars[var_id].axes_ids[i])) {
- l = j;
- break;
- }
- }
- }
-
- for( j = 0; j < pVarAxis->length; j++ ) {
- int length = pVarAxis->length;
- tmp = pVarAxis->bounds[j];
- pVarAxis->bounds[j] = pVarAxis->bounds[length * 2 - 1 - j];
- pVarAxis->bounds[length * 2 - 1 - j] = tmp;
-
- tmp = cmor_vars[k].values[j];
- cmor_vars[k].values[j] = cmor_vars[k].values[length * 2 - 1 - j];
- cmor_vars[k].values[length * 2 - 1 - j] = tmp;
-
- if( bbnds != NULL ) {
- tmp = cmor_vars[l].values[j];
- cmor_vars[l].values[j] = cmor_vars[l].values[length*2-1-j];
- cmor_vars[l].values[length*2-1-j] = tmp;
- }
- }
- }
- }
- cmor_pop_traceback( );
+ if (b != NULL) {
+ l = -1;
+ for (j = 0; j <= cmor_nvars; j++) {
+ if ((strcmp(cmor_vars[j].id, b) == 0) &&
+ (cmor_vars[j].zaxis == cmor_vars[var_id].axes_ids[i])) {
+ l = j;
+ break;
+ }
+ }
+ }
+
+ for (j = 0; j < pVarAxis->length / 2; j++) {
+
+ tmp = pVarAxis->values[j];
+ pVarAxis->values[j] = pVarAxis->values[pVarAxis->length - 1 - j];
+ pVarAxis->values[pVarAxis->length - 1 - j] = tmp;
+
+ tmp = cmor_vars[k].values[j];
+ cmor_vars[k].values[j] =
+ cmor_vars[k].values[pVarAxis->length - 1 - j];
+ cmor_vars[k].values[pVarAxis->length - 1 - j] = tmp;
+
+ if (b != NULL) {
+ tmp = cmor_vars[l].values[j];
+ cmor_vars[l].values[j] =
+ cmor_vars[l].values[pVarAxis->length - 1 - j];
+ cmor_vars[l].values[pVarAxis->length - 1 - j] = tmp;
+ }
+ }
+
+ if (pVarAxis->bounds != NULL) {
+ k = -1;
+ for (j = 0; j <= cmor_nvars; j++) {
+ if ((strcmp(cmor_vars[j].id, abnds) == 0) &&
+ (cmor_vars[j].zaxis == cmor_vars[var_id].axes_ids[i])) {
+ k = j;
+ break;
+ }
+ }
+
+ if (bbnds != NULL) {
+ l = -1;
+ for (j = 0; j <= cmor_nvars; j++) {
+ if ((strcmp(cmor_vars[j].id, bbnds) == 0) &&
+ (cmor_vars[j].zaxis == cmor_vars[var_id].axes_ids[i])) {
+ l = j;
+ break;
+ }
+ }
+ }
+
+ for (j = 0; j < pVarAxis->length; j++) {
+ int length = pVarAxis->length;
+ tmp = pVarAxis->bounds[j];
+ pVarAxis->bounds[j] = pVarAxis->bounds[length * 2 - 1 - j];
+ pVarAxis->bounds[length * 2 - 1 - j] = tmp;
+
+ tmp = cmor_vars[k].values[j];
+ cmor_vars[k].values[j] =
+ cmor_vars[k].values[length * 2 - 1 - j];
+ cmor_vars[k].values[length * 2 - 1 - j] = tmp;
+
+ if (bbnds != NULL) {
+ tmp = cmor_vars[l].values[j];
+ cmor_vars[l].values[j] =
+ cmor_vars[l].values[length * 2 - 1 - j];
+ cmor_vars[l].values[length * 2 - 1 - j] = tmp;
+ }
+ }
+ }
+ }
+ cmor_pop_traceback();
return;
}
/************************************************************************/
/* cmor_set_refvar( ) */
/************************************************************************/
-int cmor_set_refvar( int var_id, int *refvar, int ntimes_passed ) {
+int cmor_set_refvar(int var_id, int *refvar, int ntimes_passed)
+{
/* -------------------------------------------------------------------- */
/* Return either associated variable id or passed variable id */
@@ -2232,59 +2245,61 @@ int cmor_set_refvar( int var_id, int *refvar, int ntimes_passed ) {
int ierr;
cmor_add_traceback("cmor_set_refvar");
- if( refvar != NULL ) {
- nRefVarID = ( int ) *refvar;
-
- if( cmor_vars[nRefVarID].initialized == -1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "You are trying to write variable \"%s\" in association\n! "
- "with variable \"%s\" (table %s), but you you need to\n! "
- "write the associated variable first in order to\n! "
- "initialize the file and dimensions.",
- cmor_vars[nRefVarID].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (refvar != NULL) {
+ nRefVarID = (int)*refvar;
+
+ if (cmor_vars[nRefVarID].initialized == -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "You are trying to write variable \"%s\" in association\n! "
+ "with variable \"%s\" (table %s), but you you need to\n! "
+ "write the associated variable first in order to\n! "
+ "initialize the file and dimensions.",
+ cmor_vars[nRefVarID].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
/* -------------------------------------------------------------------- */
/* ok now we need to scan the netcdf file */
/* to figure the ncvarid associated */
/* -------------------------------------------------------------------- */
- ierr = nc_inq_varid( cmor_vars[nRefVarID].initialized,
- cmor_vars[var_id].id,
- &cmor_vars[var_id].nc_var_id );
-
- if( ierr != NC_NOERR ) {
- sprintf( msg,
- "Could not find variable: '%s' (table: %s) in file of\n! "
- "associated variable: '%s'",
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id,
- cmor_vars[*refvar].id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- cmor_vars[var_id].ntimes_written =
- cmor_vars[nRefVarID].ntimes_written - ntimes_passed;
+ ierr = nc_inq_varid(cmor_vars[nRefVarID].initialized,
+ cmor_vars[var_id].id, &cmor_vars[var_id].nc_var_id);
+
+ if (ierr != NC_NOERR) {
+ sprintf(msg,
+ "Could not find variable: '%s' (table: %s) in file of\n! "
+ "associated variable: '%s'",
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ cmor_vars[*refvar].id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+ cmor_vars[var_id].ntimes_written =
+ cmor_vars[nRefVarID].ntimes_written - ntimes_passed;
}
cmor_pop_traceback();
return (nRefVarID);
}
+
/************************************************************************/
/* cmor_validate_activity_id() */
/************************************************************************/
-int cmor_validate_activity_id(int nVarRefTblID) {
- int ierr=0;
+int cmor_validate_activity_id(int nVarRefTblID)
+{
+ int ierr = 0;
cmor_add_traceback("cmor_validate_activity_id");
cmor_pop_traceback();
- return(ierr);
+ return (ierr);
}
/************************************************************************/
/* cmor_checkMissing() */
/************************************************************************/
-void cmor_checkMissing(int varid, int var_id, char type) {
+void cmor_checkMissing(int varid, int var_id, char type)
+{
char msg[CMOR_MAX_STRING];
int nVarRefTblID;
@@ -2294,21 +2309,23 @@ void cmor_checkMissing(int varid, int var_id, char type) {
if (cmor_vars[varid].nomissing == 0) {
if (cmor_vars[varid].itype != type) {
snprintf(msg, CMOR_MAX_STRING,
- "You defined variable \"%s\" (table %s) with a missing\n! "
- "value of type \"%c\", but you are now writing data of\n! "
- "type: \"%c\" this may lead to some spurious handling\n! "
- "of the missing values", cmor_vars[varid].id,
- cmor_tables[nVarRefTblID].szTable_id,
- cmor_vars[varid].itype, type);
+ "You defined variable \"%s\" (table %s) with a missing\n! "
+ "value of type \"%c\", but you are now writing data of\n! "
+ "type: \"%c\" this may lead to some spurious handling\n! "
+ "of the missing values", cmor_vars[varid].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ cmor_vars[varid].itype, type);
cmor_handle_error(msg, CMOR_WARNING);
}
}
cmor_pop_traceback();
}
+
/************************************************************************/
/* cmor_validateFilename() */
/************************************************************************/
-int cmor_validateFilename(char *outname, int var_id) {
+int cmor_validateFilename(char *outname, int var_id)
+{
int cmode;
int ierr;
FILE *fperr;
@@ -2323,8 +2340,8 @@ int cmor_validateFilename(char *outname, int var_id) {
if (USE_NETCDF_4 == 1) {
cmode = NC_NETCDF4 | NC_CLASSIC_MODEL;
if ((CMOR_NETCDF_MODE == CMOR_REPLACE_3)
- || (CMOR_NETCDF_MODE == CMOR_PRESERVE_3)
- || (CMOR_NETCDF_MODE == CMOR_APPEND_3)) {
+ || (CMOR_NETCDF_MODE == CMOR_PRESERVE_3)
+ || (CMOR_NETCDF_MODE == CMOR_APPEND_3)) {
cmode = NC_CLOBBER;
}
} else {
@@ -2332,12 +2349,12 @@ int cmor_validateFilename(char *outname, int var_id) {
}
if ((CMOR_NETCDF_MODE == CMOR_REPLACE_4)
- || (CMOR_NETCDF_MODE == CMOR_REPLACE_3)) {
+ || (CMOR_NETCDF_MODE == CMOR_REPLACE_3)) {
ierr = nc_create(outname, NC_CLOBBER | cmode, &ncid);
} else if ((CMOR_NETCDF_MODE == CMOR_PRESERVE_4)
- || (CMOR_NETCDF_MODE == CMOR_PRESERVE_3)) {
+ || (CMOR_NETCDF_MODE == CMOR_PRESERVE_3)) {
/* -------------------------------------------------------------------- */
/* ok first let's check if the file does exists or not */
/* -------------------------------------------------------------------- */
@@ -2345,16 +2362,16 @@ int cmor_validateFilename(char *outname, int var_id) {
fperr = fopen(outname, "r");
if (fperr != NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "Output file ( %s ) already exists, remove file\n! "
- "or use CMOR_REPLACE or CMOR_APPEND for\n! "
- "CMOR_NETCDF_MODE value in cmor_setup", outname);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "Output file ( %s ) already exists, remove file\n! "
+ "or use CMOR_REPLACE or CMOR_APPEND for\n! "
+ "CMOR_NETCDF_MODE value in cmor_setup", outname);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
ierr = fclose(fperr);
- fperr=NULL;
+ fperr = NULL;
}
ierr = nc_create(outname, NC_NOCLOBBER | cmode, &ncid);
} else if ((CMOR_NETCDF_MODE == CMOR_APPEND_4)
- || (CMOR_NETCDF_MODE == CMOR_APPEND_3)) {
+ || (CMOR_NETCDF_MODE == CMOR_APPEND_3)) {
/* -------------------------------------------------------------------- */
/* ok first let's check if the file does exists or not */
/* -------------------------------------------------------------------- */
@@ -2367,59 +2384,59 @@ int cmor_validateFilename(char *outname, int var_id) {
/* -------------------------------------------------------------------- */
ierr = nc_create(outname, NC_CLOBBER | cmode, &ncid);
- } else { /*ok it was there already */
+ } else { /*ok it was there already */
ierr = fclose(fperr);
- fperr=NULL;
+ fperr = NULL;
ierr = nc_open(outname, NC_WRITE, &ncid);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) opening file: %s", ierr,
- nc_strerror(ierr), outname);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) opening file: %s", ierr,
+ nc_strerror(ierr), outname);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
ierr = nc_inq_dimid(ncid, "time", &i);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) looking for time\n! "
- "dimension in file: %s", ierr,
- nc_strerror(ierr), outname);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) looking for time\n! "
+ "dimension in file: %s", ierr,
+ nc_strerror(ierr), outname);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
ierr = nc_inq_dimlen(ncid, i, &nctmp);
- cmor_vars[var_id].ntimes_written = (int) nctmp;
+ cmor_vars[var_id].ntimes_written = (int)nctmp;
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) looking for time\n! "
- "dimension length in file: %s", ierr,
- nc_strerror(ierr), outname);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) looking for time\n! "
+ "dimension length in file: %s", ierr,
+ nc_strerror(ierr), outname);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
ierr = nc_inq_varid(ncid, cmor_vars[var_id].id,
- &cmor_vars[var_id].nc_var_id);
+ &cmor_vars[var_id].nc_var_id);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) looking for variable\n! "
- "'%s' in file: %s", ierr, nc_strerror(ierr),
- cmor_vars[var_id].id, outname);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) looking for variable\n! "
+ "'%s' in file: %s", ierr, nc_strerror(ierr),
+ cmor_vars[var_id].id, outname);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
ierr = nc_inq_varid(ncid, "time", &cmor_vars[var_id].time_nc_id);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) looking for time of\n! "
- "variable '%s' in file: %s", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id, outname);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) looking for time of\n! "
+ "variable '%s' in file: %s", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id, outname);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
/* -------------------------------------------------------------------- */
@@ -2427,18 +2444,18 @@ int cmor_validateFilename(char *outname, int var_id) {
/* -------------------------------------------------------------------- */
starts[0] = 0;
ierr = nc_get_var1_double(ncid, cmor_vars[var_id].time_nc_id,
- &starts[0], &cmor_vars[var_id].first_time);
+ &starts[0],
+ &cmor_vars[var_id].first_time);
starts[0] = cmor_vars[var_id].ntimes_written - 1;
ierr = nc_get_var1_double(ncid, cmor_vars[var_id].time_nc_id,
- &starts[0], &cmor_vars[var_id].last_time);
+ &starts[0], &cmor_vars[var_id].last_time);
- if (cmor_tables[cmor_axes[cmor_vars[var_id].axes_ids[i]].
- ref_table_id].axes[cmor_axes[cmor_vars[var_id].
- axes_ids[i]].
- ref_axis_id].
- climatology
- == 1) {
+ if (cmor_tables
+ [cmor_axes[cmor_vars[var_id].axes_ids[i]].ref_table_id].
+ axes[cmor_axes
+ [cmor_vars[var_id].axes_ids[i]].ref_axis_id].climatology ==
+ 1) {
snprintf(msg, CMOR_MAX_STRING, "climatology");
strncpy(ctmp, "climatology_bnds", CMOR_MAX_STRING);
@@ -2449,9 +2466,9 @@ int cmor_validateFilename(char *outname, int var_id) {
ierr = nc_inq_varid(ncid, ctmp, &i);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) looking for time bounds\n! "
- "of variable '%s' in file: %s", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id, outname);
+ "NetCDF Error (%i: %s) looking for time bounds\n! "
+ "of variable '%s' in file: %s", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id, outname);
cmor_handle_error(msg, CMOR_WARNING);
ierr = NC_NOERR;
} else {
@@ -2463,35 +2480,37 @@ int cmor_validateFilename(char *outname, int var_id) {
starts[0] = cmor_vars[var_id].ntimes_written - 1;
starts[1] = 1;
ierr = nc_get_var1_double(ncid,
- cmor_vars[var_id].time_bnds_nc_id, &starts[0],
- &cmor_vars[var_id].last_bound);
+ cmor_vars[var_id].time_bnds_nc_id,
+ &starts[0],
+ &cmor_vars[var_id].last_bound);
starts[1] = 0;
ierr = nc_get_var1_double(ncid,
- cmor_vars[var_id].time_bnds_nc_id, &starts[0],
- &cmor_vars[var_id].first_bound);
+ cmor_vars[var_id].time_bnds_nc_id,
+ &starts[0],
+ &cmor_vars[var_id].first_bound);
}
cmor_vars[var_id].initialized = ncid;
}
} else {
snprintf(msg, CMOR_MAX_STRING, "Unknown CMOR_NETCDF_MODE file mode: %i",
- CMOR_NETCDF_MODE);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ CMOR_NETCDF_MODE);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) creating file: %s", ierr,
- nc_strerror(ierr), outname);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) creating file: %s", ierr,
+ nc_strerror(ierr), outname);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
cmor_pop_traceback();
- return( ncid );
+ return (ncid);
}
-
/************************************************************************/
/* cmor_setGblAttr() */
/************************************************************************/
-int cmor_setGblAttr(int var_id) {
+int cmor_setGblAttr(int var_id)
+{
struct tm *ptr;
time_t lt;
char msg[CMOR_MAX_STRING];
@@ -2506,23 +2525,24 @@ int cmor_setGblAttr(int var_id) {
regex_t regex;
int numchar;
int nVarRefTblID;
+ int ref_var_id;
int rc;
- int ierr=0;
+ int ierr = 0;
cmor_add_traceback("cmor_setGblAttr");
nVarRefTblID = cmor_vars[var_id].ref_table_id;
+ ref_var_id = cmor_vars[var_id].ref_var_id;
- if( cmor_has_cur_dataset_attribute( GLOBAL_ATT_FORCING ) == 0 ) {
- cmor_get_cur_dataset_attribute( GLOBAL_ATT_FORCING, ctmp2 );
- ierr += cmor_check_forcing_validity( nVarRefTblID,
- ctmp2 );
+ if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_FORCING) == 0) {
+ cmor_get_cur_dataset_attribute(GLOBAL_ATT_FORCING, ctmp2);
+ ierr += cmor_check_forcing_validity(nVarRefTblID, ctmp2);
}
/* -------------------------------------------------------------------- */
/* Defined "product" from Table if not defined by users */
/* -------------------------------------------------------------------- */
- if( cmor_has_cur_dataset_attribute( GLOBAL_ATT_PRODUCT ) != 0 ) {
+ if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_PRODUCT) != 0) {
strncpy(ctmp2, cmor_tables[nVarRefTblID].product, CMOR_MAX_STRING);
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_PRODUCT, ctmp2, 1);
}
@@ -2533,16 +2553,16 @@ int cmor_setGblAttr(int var_id) {
lt = time(NULL);
ptr = gmtime(<);
snprintf(msg, CMOR_MAX_STRING, "%.4i-%.2i-%.2iT%.2i:%.2i:%.2iZ",
- ptr->tm_year + 1900, ptr->tm_mon + 1, ptr->tm_mday, ptr->tm_hour,
- ptr->tm_min, ptr->tm_sec);
+ ptr->tm_year + 1900, ptr->tm_mon + 1, ptr->tm_mday, ptr->tm_hour,
+ ptr->tm_min, ptr->tm_sec);
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_CREATION_DATE, msg, 0);
if (did_history == 0) {
snprintf(ctmp, CMOR_MAX_STRING,
- "%s CMOR rewrote data to be consistent with CF standards"
- " and %s requirements.", msg,
- cmor_tables[nVarRefTblID].mip_era);
+ "%s CMOR rewrote data to be consistent with CF standards"
+ " and %s requirements.", msg,
+ cmor_tables[nVarRefTblID].mip_era);
if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_HISTORY) == 0) {
cmor_get_cur_dataset_attribute(GLOBAL_ATT_HISTORY, msg);
@@ -2562,30 +2582,27 @@ int cmor_setGblAttr(int var_id) {
/* -------------------------------------------------------------------- */
/* Set attribute data_specs_versions for netCDF file (CMIP6) */
/* -------------------------------------------------------------------- */
- if( cmor_tables[nVarRefTblID].data_specs_version != '\0' ) {
- snprintf(msg, CMOR_MAX_STRING, "%s",
- cmor_tables[nVarRefTblID].data_specs_version);
- cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_DATASPECSVERSION,
- msg, 0);
+ if (cmor_tables[nVarRefTblID].data_specs_version != '\0') {
+ snprintf(msg, CMOR_MAX_STRING, "%s",
+ cmor_tables[nVarRefTblID].data_specs_version);
+ cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_DATASPECSVERSION,
+ msg, 0);
}
/* -------------------------------------------------------------------- */
/* Set attribute frequency for netCDF file (CMIP6) */
/* -------------------------------------------------------------------- */
- snprintf(msg, CMOR_MAX_STRING, "%s",
- cmor_tables[nVarRefTblID].frequency);
+ snprintf(msg, CMOR_MAX_STRING, "%s", cmor_vars[var_id].frequency);
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_FREQUENCY, msg, 0);
/* -------------------------------------------------------------------- */
/* Set attribute variable_id for netCDF file (CMIP6) */
/* -------------------------------------------------------------------- */
- snprintf(msg, CMOR_MAX_STRING, "%s",
- cmor_vars[var_id].id);
+ snprintf(msg, CMOR_MAX_STRING, "%s", cmor_vars[var_id].id);
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_VARIABLE_ID, msg, 0);
/* -------------------------------------------------------------------- */
/* Set attribute Table_ID for netCDF file (CMIP6) */
/* -------------------------------------------------------------------- */
- snprintf(msg, CMOR_MAX_STRING, "%s",
- cmor_tables[nVarRefTblID].szTable_id);
+ snprintf(msg, CMOR_MAX_STRING, "%s", cmor_tables[nVarRefTblID].szTable_id);
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_TABLE_ID, msg, 0);
@@ -2593,10 +2610,10 @@ int cmor_setGblAttr(int var_id) {
/* Set attribute Table_Info for netCDF file (CMIP6) */
/* -------------------------------------------------------------------- */
snprintf(msg, CMOR_MAX_STRING, "Creation Date:(%s) MD5:",
- cmor_tables[nVarRefTblID].date);
+ cmor_tables[nVarRefTblID].date);
for (i = 0; i < 16; i++) {
- sprintf(&ctmp[2 * i], "%02x", cmor_tables[nVarRefTblID].md5[i]);
+ sprintf(&ctmp[2 * i], "%02x", cmor_tables[nVarRefTblID].md5[i]);
}
ctmp[32] = '\0';
strcat(msg, ctmp);
@@ -2612,7 +2629,7 @@ int cmor_setGblAttr(int var_id) {
/* Set attribute Title for netCDF file (CMIP6) */
/* -------------------------------------------------------------------- */
snprintf(msg, CMOR_MAX_STRING, GLOBAL_ATT_TITLE_MSG, ctmp,
- cmor_tables[nVarRefTblID].mip_era);
+ cmor_tables[nVarRefTblID].mip_era);
/* -------------------------------------------------------------------- */
/* Change Title if not provided by user. */
/* -------------------------------------------------------------------- */
@@ -2622,29 +2639,32 @@ int cmor_setGblAttr(int var_id) {
/* -------------------------------------------------------------------- */
/* check source and model_id are identical */
/* -------------------------------------------------------------------- */
- if (cmor_tables[nVarRefTblID].mip_era[0] != '\0' ){
- cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_MIP_ERA,
- cmor_tables[nVarRefTblID].mip_era, 0);
+ if (cmor_tables[nVarRefTblID].mip_era[0] != '\0') {
+ cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_MIP_ERA,
+ cmor_tables[nVarRefTblID].
+ mip_era, 0);
}
/* -------------------------------------------------------------------- */
/* first check if the variable itself has a realm */
/* -------------------------------------------------------------------- */
- if (cmor_tables[nVarRefTblID].vars[var_id].realm[0] != '\0') {
- szToken = strtok(cmor_tables[nVarRefTblID].vars[var_id].realm, " ");
- if( szToken != NULL){
+ if (cmor_tables[nVarRefTblID].vars[ref_var_id].realm[0] != '\0') {
+ szToken = strtok(cmor_tables[nVarRefTblID].vars[ref_var_id].realm, " ");
+ if (szToken != NULL) {
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_REALM,
- szToken, 0);
+ szToken, 0);
} else {
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_REALM,
- cmor_tables[nVarRefTblID].vars[var_id].realm, 0);
+ cmor_tables[nVarRefTblID].
+ vars[ref_var_id].realm, 0);
}
} else {
/* -------------------------------------------------------------------- */
/* ok it didn't so we're using the value from the table */
/* -------------------------------------------------------------------- */
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_REALM,
- cmor_tables[nVarRefTblID].realm, 0);
+ cmor_tables[nVarRefTblID].realm,
+ 0);
}
cmor_generate_uuid();
/* -------------------------------------------------------------------- */
@@ -2657,9 +2677,9 @@ int cmor_setGblAttr(int var_id) {
/* If CELLMEASURE is set to @OPT we don't do anything */
/* -------------------------------------------------------------------- */
if ((strcmp(ctmp, "@OPT") == 0) || (strcmp(ctmp, "--OPT") == 0)
- || (strcmp(ctmp, "--MODEL") == 0)) {
+ || (strcmp(ctmp, "--MODEL") == 0)) {
cmor_set_variable_attribute(var_id,
- VARIABLE_ATT_CELLMEASURES, 'c', "");
+ VARIABLE_ATT_CELLMEASURES, 'c', "");
} else {
/* -------------------------------------------------------------------- */
/* Extract 2 words after "area:" or "volume:" if exist. */
@@ -2669,13 +2689,13 @@ int cmor_setGblAttr(int var_id) {
rc = regexec(®ex, ctmp, n_matches, m, 0);
if (rc == REG_NOMATCH) {
snprintf(msg, CMOR_MAX_STRING,
- "Your table (%s) does not contains CELL_MEASURES\n! "
- "that matches 'area: <text> volume: <text>\n! "
- "CMOR cannot build the 'external_variable' attribute.\n! "
- "Check the following variable: '%s'.\n!",
- cmor_tables[nVarRefTblID].szTable_id,
- cmor_vars[var_id].id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "Your table (%s) does not contains CELL_MEASURES\n! "
+ "that matches 'area: <text> volume: <text>\n! "
+ "CMOR cannot build the 'external_variable' attribute.\n! "
+ "Check the following variable: '%s'.\n!",
+ cmor_tables[nVarRefTblID].szTable_id,
+ cmor_vars[var_id].id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
regfree(®ex);
return (-1);
@@ -2683,22 +2703,23 @@ int cmor_setGblAttr(int var_id) {
words[0] = '\0';
ctmp2[0] = '\0';
for (i = 0; i < n_matches; i++) {
- numchar = (int) m[i].rm_eo - (int) m[i].rm_so;
+ numchar = (int)m[i].rm_eo - (int)m[i].rm_so;
/* -------------------------------------------------------------------- */
/* If rm_so is negative, there is not more matches. */
/* -------------------------------------------------------------------- */
- if (((int) m[i].rm_so < 0) || (numchar == 0)) {
+ if (((int)m[i].rm_so < 0) || (numchar == 0)) {
break;
}
strncpy(words, ctmp + m[i].rm_so, numchar);
words[numchar] = '\0';
- if(strstr(words, ":") != 0) {
+ if (strstr(words, ":") != 0) {
continue;
}
cmor_trim_string(words, trimword);
- if((strcmp(trimword, AREA) != 0) && (strcmp(trimword, VOLUME) != 0)
- && (strlen(trimword) != strlen(ctmp))) {
+ if ((strcmp(trimword, AREA) != 0)
+ && (strcmp(trimword, VOLUME) != 0)
+ && (strlen(trimword) != strlen(ctmp))) {
/* -------------------------------------------------------------------- */
/* Rejects all word area and volume. */
/* -------------------------------------------------------------------- */
@@ -2709,17 +2730,17 @@ int cmor_setGblAttr(int var_id) {
strncat(ctmp2, trimword, numchar);
}
}
- }
+ }
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_EXTERNAL_VAR,
- ctmp2, 0);
+ ctmp2, 0);
regfree(®ex);
}
}
- if( cmor_has_cur_dataset_attribute(GLOBAL_ATT_INSTITUTION_ID) == 0) {
+ if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_INSTITUTION_ID) == 0) {
ierr += cmor_CV_setInstitution(cmor_tables[nVarRefTblID].CV);
}
- if( cmor_has_cur_dataset_attribute(GLOBAL_IS_CMIP6) == 0) {
+ if (cmor_has_cur_dataset_attribute(GLOBAL_IS_CMIP6) == 0) {
ierr += cmor_CV_checkSourceID(cmor_tables[nVarRefTblID].CV);
ierr += cmor_CV_checkExperiment(cmor_tables[nVarRefTblID].CV);
ierr += cmor_CV_checkGrids(cmor_tables[nVarRefTblID].CV);
@@ -2729,12 +2750,14 @@ int cmor_setGblAttr(int var_id) {
}
ierr += cmor_CV_checkGblAttributes(cmor_tables[nVarRefTblID].CV);
ierr += cmor_CV_checkISOTime(GLOBAL_ATT_CREATION_DATE);
- return(ierr);
+ return (ierr);
}
+
/************************************************************************/
/* cmor_writeGblAttr() */
/************************************************************************/
-int cmor_writeGblAttr(int var_id, int ncid, int ncafid) {
+int cmor_writeGblAttr(int var_id, int ncid, int ncafid)
+{
char msg[CMOR_MAX_STRING];
int ierr;
float afloat, d;
@@ -2757,28 +2780,28 @@ int cmor_writeGblAttr(int var_id, int ncid, int ncafid) {
if (cmor_tables[nVarRefTblID].cf_version > afloat) {
snprintf(msg, CMOR_MAX_STRING,
- "Your table (%s) claims to enforce CF version %f but\n! "
- "this version of the library is designed for CF up\n! "
- "to: %i.%i, you were writing variable: %s\n! ",
- cmor_tables[nVarRefTblID].szTable_id,
- cmor_tables[nVarRefTblID].cf_version, CMOR_CF_VERSION_MAJOR,
- CMOR_CF_VERSION_MINOR, cmor_vars[var_id].id);
+ "Your table (%s) claims to enforce CF version %f but\n! "
+ "this version of the library is designed for CF up\n! "
+ "to: %i.%i, you were writing variable: %s\n! ",
+ cmor_tables[nVarRefTblID].szTable_id,
+ cmor_tables[nVarRefTblID].cf_version, CMOR_CF_VERSION_MAJOR,
+ CMOR_CF_VERSION_MINOR, cmor_vars[var_id].id);
cmor_handle_error(msg, CMOR_WARNING);
}
/* -------------------------------------------------------------------- */
/* cmor_ver */
/* -------------------------------------------------------------------- */
snprintf(msg, CMOR_MAX_STRING, "%i.%i.%i", CMOR_VERSION_MAJOR,
- CMOR_VERSION_MINOR, CMOR_VERSION_PATCH);
+ CMOR_VERSION_MINOR, CMOR_VERSION_PATCH);
ierr = nc_put_att_text(ncid, NC_GLOBAL, GLOBAL_ATT_CMORVERSION,
- strlen(msg) + 1, msg);
+ strlen(msg) + 1, msg);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) writing variable %s (table: %s)\n! "
- "global att cmor_version (%f)", ierr, nc_strerror(ierr),
- cmor_vars[var_id].id, cmor_tables[nVarRefTblID].szTable_id,
- afloat);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) writing variable %s (table: %s)\n! "
+ "global att cmor_version (%f)", ierr, nc_strerror(ierr),
+ cmor_vars[var_id].id, cmor_tables[nVarRefTblID].szTable_id,
+ afloat);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
if (ncid != ncafid) {
@@ -2787,14 +2810,14 @@ int cmor_writeGblAttr(int var_id, int ncid, int ncafid) {
/* cmor_ver */
/* -------------------------------------------------------------------- */
ierr = nc_put_att_text(ncid, NC_GLOBAL, GLOBAL_ATT_CMORVERSION,
- strlen(msg) + 1, msg);
+ strlen(msg) + 1, msg);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) writing variable %s\n! "
- "(table: %s) global att cmor_version (%f)", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id, afloat);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) writing variable %s\n! "
+ "(table: %s) global att cmor_version (%f)", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id, afloat);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
cmor_pop_traceback();
@@ -2806,15 +2829,16 @@ int cmor_writeGblAttr(int var_id, int ncid, int ncafid) {
/************************************************************************/
int cmor_attNameCmp(const void *v1, const void *v2)
{
- const attributes_def *c1 = v1;
- const attributes_def *c2 = v2;
- return(strcmp (c1->names, c2->names));
+ const attributes_def *c1 = v1;
+ const attributes_def *c2 = v2;
+ return (strcmp(c1->names, c2->names));
}
/************************************************************************/
/* cmor_generate_uuid() */
/************************************************************************/
-void cmor_generate_uuid(){
+void cmor_generate_uuid()
+{
uuid_t *myuuid;
uuid_fmt_t fmt;
void *myuuid_str = NULL;
@@ -2837,19 +2861,19 @@ void cmor_generate_uuid(){
/* -------------------------------------------------------------------- */
uuid_export(myuuid, fmt, &myuuid_str, &uuidlen);
- if( cmor_has_cur_dataset_attribute( GLOBAL_ATT_TRACKING_PREFIX ) == 0 ) {
- cmor_get_cur_dataset_attribute( GLOBAL_ATT_TRACKING_PREFIX, value );
+ if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_TRACKING_PREFIX) == 0) {
+ cmor_get_cur_dataset_attribute(GLOBAL_ATT_TRACKING_PREFIX, value);
- strncpy(cmor_current_dataset.tracking_id,
- value, CMOR_MAX_STRING);
+ strncpy(cmor_current_dataset.tracking_id, value, CMOR_MAX_STRING);
strcat(cmor_current_dataset.tracking_id, "/");
- strcat(cmor_current_dataset.tracking_id, (char *) myuuid_str);
+ strcat(cmor_current_dataset.tracking_id, (char *)myuuid_str);
} else {
- strncpy(cmor_current_dataset.tracking_id, (char *) myuuid_str,
+ strncpy(cmor_current_dataset.tracking_id, (char *)myuuid_str,
CMOR_MAX_STRING);
}
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_TRACKING_ID,
- cmor_current_dataset.tracking_id, 0);
+ cmor_current_dataset.tracking_id,
+ 0);
free(myuuid_str);
uuid_destroy(myuuid);
cmor_pop_traceback();
@@ -2859,7 +2883,8 @@ void cmor_generate_uuid(){
/************************************************************************/
/* cmor_write_all_atributes() */
/************************************************************************/
-void cmor_write_all_attributes(int ncid, int ncafid, int var_id) {
+void cmor_write_all_attributes(int ncid, int ncafid, int var_id)
+{
int ierr;
char msg[CMOR_MAX_STRING];
char value[CMOR_MAX_STRING];
@@ -2872,29 +2897,29 @@ void cmor_write_all_attributes(int ncid, int ncafid, int var_id) {
cmor_add_traceback("cmor_write_all_attributes");
nVarRefTblID = cmor_vars[var_id].ref_table_id;
- qsort( cmor_current_dataset.attributes, cmor_current_dataset.nattributes,
- sizeof(struct attributes), cmor_attNameCmp);
+ qsort(cmor_current_dataset.attributes, cmor_current_dataset.nattributes,
+ sizeof(struct attributes), cmor_attNameCmp);
for (i = 0; i < cmor_current_dataset.nattributes; i++) {
/* -------------------------------------------------------------------- */
/* Skip "calendar" global attribute */
/* -------------------------------------------------------------------- */
if (strcmp(cmor_current_dataset.attributes[i].names,
- GLOBAL_ATT_CALENDAR) == 0) {
+ GLOBAL_ATT_CALENDAR) == 0) {
continue;
}
/* -------------------------------------------------------------------- */
/* Skip "tracking_prefix" global attribute */
/* -------------------------------------------------------------------- */
if (strcmp(cmor_current_dataset.attributes[i].names,
- GLOBAL_ATT_TRACKING_PREFIX) == 0) {
+ GLOBAL_ATT_TRACKING_PREFIX) == 0) {
continue;
}
/* -------------------------------------------------------------------- */
/* Write license last, not now!! */
/* -------------------------------------------------------------------- */
if (strcmp(cmor_current_dataset.attributes[i].names,
- GLOBAL_ATT_LICENSE) == 0) {
+ GLOBAL_ATT_LICENSE) == 0) {
continue;
}
/* -------------------------------------------------------------------- */
@@ -2902,70 +2927,70 @@ void cmor_write_all_attributes(int ncid, int ncafid, int var_id) {
/* -------------------------------------------------------------------- */
rc = strcmp(cmor_current_dataset.attributes[i].names,
- GLOBAL_ATT_BRANCH_TIME);
+ GLOBAL_ATT_BRANCH_TIME);
/* -------------------------------------------------------------------- */
/* matches "branch_time" and "branch_time_something" */
/* -------------------------------------------------------------------- */
- if ((rc == 0) || (rc == 95 )) {
+ if ((rc == 0) || (rc == 95)) {
sscanf(cmor_current_dataset.attributes[i].values, "%lf", &tmps[0]);
ierr = nc_put_att_double(ncid, NC_GLOBAL,
- cmor_current_dataset.attributes[i].names, NC_DOUBLE, 1,
- &tmps[0]);
+ cmor_current_dataset.attributes[i].names,
+ NC_DOUBLE, 1, &tmps[0]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) for variable %s\n! "
- "(table: %s) writing global att: %s (%s)\n! ",
- ierr, nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id,
- cmor_current_dataset.attributes[i].names,
- cmor_current_dataset.attributes[i].values);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) for variable %s\n! "
+ "(table: %s) writing global att: %s (%s)\n! ",
+ ierr, nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ cmor_current_dataset.attributes[i].names,
+ cmor_current_dataset.attributes[i].values);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
if (ncid != ncafid) {
ierr = nc_put_att_double(ncafid, NC_GLOBAL,
- cmor_current_dataset.attributes[i].names, NC_DOUBLE, 1,
- &tmps[0]);
+ cmor_current_dataset.attributes[i].
+ names, NC_DOUBLE, 1, &tmps[0]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) for variable\n! "
- "%s (table: %s), writing global att\n! "
- "to metafile: %s (%s)", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id,
- cmor_current_dataset.attributes[i].names,
- cmor_current_dataset.attributes[i].values);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) for variable\n! "
+ "%s (table: %s), writing global att\n! "
+ "to metafile: %s (%s)", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ cmor_current_dataset.attributes[i].names,
+ cmor_current_dataset.attributes[i].values);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
- } else if( (strcmp(cmor_current_dataset.attributes[i].names,
- GLOBAL_ATT_REALIZATION) == 0) ||
- (strcmp(cmor_current_dataset.attributes[i].names,
- GLOBAL_ATT_INITIA_IDX) == 0) ||
- (strcmp(cmor_current_dataset.attributes[i].names,
- GLOBAL_ATT_PHYSICS_IDX) == 0) ||
- (strcmp(cmor_current_dataset.attributes[i].names,
- GLOBAL_ATT_FORCING_IDX) == 0)) {
+ } else if ((strcmp(cmor_current_dataset.attributes[i].names,
+ GLOBAL_ATT_REALIZATION) == 0) ||
+ (strcmp(cmor_current_dataset.attributes[i].names,
+ GLOBAL_ATT_INITIA_IDX) == 0) ||
+ (strcmp(cmor_current_dataset.attributes[i].names,
+ GLOBAL_ATT_PHYSICS_IDX) == 0) ||
+ (strcmp(cmor_current_dataset.attributes[i].names,
+ GLOBAL_ATT_FORCING_IDX) == 0)) {
sscanf(cmor_current_dataset.attributes[i].values, "%d", &itmp2);
ierr = nc_put_att_int(ncid, NC_GLOBAL,
- cmor_current_dataset.attributes[i].names,
- NC_INT, 1,
- &itmp2);
+ cmor_current_dataset.attributes[i].names,
+ NC_INT, 1, &itmp2);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) for variable %s\n! "
- "(table: %s) writing global att: %s (%s)\n! ",
- ierr, nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id,
- cmor_current_dataset.attributes[i].names,
- cmor_current_dataset.attributes[i].values);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) for variable %s\n! "
+ "(table: %s) writing global att: %s (%s)\n! ",
+ ierr, nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ cmor_current_dataset.attributes[i].names,
+ cmor_current_dataset.attributes[i].values);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
} else {
itmp2 = strlen(cmor_current_dataset.attributes[i].values);
if (itmp2 < CMOR_DEF_ATT_STR_LEN) {
- int nNbAttrs = strlen(cmor_current_dataset.attributes[i].values);
+ int nNbAttrs =
+ strlen(cmor_current_dataset.attributes[i].values);
for (itmp2 = nNbAttrs; itmp2 < CMOR_DEF_ATT_STR_LEN; itmp2++) {
cmor_current_dataset.attributes[i].values[itmp2] = '\0';
}
@@ -2979,33 +3004,37 @@ void cmor_write_all_attributes(int ncid, int ncafid, int var_id) {
/* -------------------------------------------------------------------- */
if (cmor_current_dataset.attributes[i].names[0] != '_') {
ierr = nc_put_att_text(ncid, NC_GLOBAL,
- cmor_current_dataset.attributes[i].names, itmp2,
- cmor_current_dataset.attributes[i].values);
+ cmor_current_dataset.attributes[i].names,
+ itmp2,
+ cmor_current_dataset.attributes[i].
+ values);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) for variable %s\n! "
- "(table: %s) writing global att: %s (%s)",
- ierr, nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id,
- cmor_current_dataset.attributes[i].names,
- cmor_current_dataset.attributes[i].values);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) for variable %s\n! "
+ "(table: %s) writing global att: %s (%s)",
+ ierr, nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ cmor_current_dataset.attributes[i].names,
+ cmor_current_dataset.attributes[i].values);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
if (ncid != ncafid) {
ierr = nc_put_att_text(ncafid, NC_GLOBAL,
- cmor_current_dataset.attributes[i].names, itmp2,
- cmor_current_dataset.attributes[i].values);
+ cmor_current_dataset.attributes[i].
+ names, itmp2,
+ cmor_current_dataset.attributes[i].
+ values);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) for variable %s\n! "
- "(table %s), writing global att to\n! "
- "metafile: %s (%s)", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id,
- cmor_current_dataset.attributes[i].names,
- cmor_current_dataset.attributes[i].values);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) for variable %s\n! "
+ "(table %s), writing global att to\n! "
+ "metafile: %s (%s)", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ cmor_current_dataset.attributes[i].names,
+ cmor_current_dataset.attributes[i].values);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
}
@@ -3014,38 +3043,35 @@ void cmor_write_all_attributes(int ncid, int ncafid, int var_id) {
/* -------------------------------------------------------------------- */
/* Write license attribute */
/* -------------------------------------------------------------------- */
- if( cmor_has_cur_dataset_attribute( GLOBAL_ATT_LICENSE ) == 0 ) {
+ if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_LICENSE) == 0) {
- cmor_get_cur_dataset_attribute( GLOBAL_ATT_LICENSE, value );
+ cmor_get_cur_dataset_attribute(GLOBAL_ATT_LICENSE, value);
itmp2 = strlen(value);
- ierr = nc_put_att_text(ncid, NC_GLOBAL,GLOBAL_ATT_LICENSE, itmp2,
- value);
+ ierr = nc_put_att_text(ncid, NC_GLOBAL, GLOBAL_ATT_LICENSE, itmp2,
+ value);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) for variable %s\n! "
- "(table: %s) writing global att: %s (%s)",
- ierr, nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id,
- GLOBAL_ATT_LICENSE,
- value);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) for variable %s\n! "
+ "(table: %s) writing global att: %s (%s)",
+ ierr, nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ GLOBAL_ATT_LICENSE, value);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
if (ncid != ncafid) {
ierr = nc_put_att_text(ncafid, NC_GLOBAL,
- GLOBAL_ATT_LICENSE, itmp2,
- value);
+ GLOBAL_ATT_LICENSE, itmp2, value);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) for variable %s\n! "
- "(table %s), writing global att to\n! "
- "metafile: %s (%s)", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id,
- GLOBAL_ATT_LICENSE,
- value);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) for variable %s\n! "
+ "(table %s), writing global att to\n! "
+ "metafile: %s (%s)", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ GLOBAL_ATT_LICENSE, value);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
}
@@ -3060,10 +3086,11 @@ void cmor_define_dimensions(int var_id, int ncid,
int *nc_dim,
int *nc_vars, int *nc_bnds_vars,
int *nc_vars_af,
- size_t *nc_dim_chunking, int *dim_bnds,
+ size_t * nc_dim_chunking, int *dim_bnds,
int *zfactors, int *nc_zfactors,
- int *nc_dim_af, int *nzfactors){
- int i,j,k,l,n;
+ int *nc_dim_af, int *nzfactors)
+{
+ int i, j, k, l, n;
char msg[CMOR_MAX_STRING];
char ctmp[CMOR_MAX_STRING];
char ctmp2[CMOR_MAX_STRING];
@@ -3099,7 +3126,8 @@ void cmor_define_dimensions(int var_id, int ncid,
if ((i == 0) && (cmor_axes[nAxisID].axis == 'T'))
j = NC_UNLIMITED;
- if ((cmor_axes[nAxisID].axis == 'X') || (cmor_axes[nAxisID].axis == 'Y')) {
+ if ((cmor_axes[nAxisID].axis == 'X')
+ || (cmor_axes[nAxisID].axis == 'Y')) {
nc_dim_chunking[i] = j;
} else if (cmor_axes[nAxisID].isgridaxis == 1) {
nc_dim_chunking[i] = j;
@@ -3110,26 +3138,26 @@ void cmor_define_dimensions(int var_id, int ncid,
ierr = nc_def_dim(ncid, cmor_axes[nAxisID].id, j, &nc_dim[i]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i:%s) for dimension definition of\n! "
- "axis: %s (%i), for variable %i (%s, table: %s)",
- ierr, nc_strerror(ierr), cmor_axes[nAxisID].id, nAxisID,
- var_id, cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
+ "NetCDF error (%i:%s) for dimension definition of\n! "
+ "axis: %s (%i), for variable %i (%s, table: %s)",
+ ierr, nc_strerror(ierr), cmor_axes[nAxisID].id, nAxisID,
+ var_id, cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
ierr = nc_enddef(ncid);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
nc_dim_af[i] = nc_dim[i];
if (ncid != ncafid) {
ierr = nc_def_dim(ncafid, cmor_axes[nAxisID].id, j, &nc_dim_af[i]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) for dimension definition\n! "
- "of axis: %s (%i) in metafile, variable %s "
- "(table: %s)", ierr, nc_strerror(ierr),
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id, i,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) for dimension definition\n! "
+ "of axis: %s (%i) in metafile, variable %s "
+ "(table: %s)", ierr, nc_strerror(ierr),
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id, i,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
}
@@ -3140,11 +3168,11 @@ void cmor_define_dimensions(int var_id, int ncid,
ierr = nc_def_dim(ncafid, "bnds", 2, dim_bnds);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NC error (%i: %s), error creating bnds dimension to\n! "
- "metafile, variable %s (table: %s)", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NC error (%i: %s), error creating bnds dimension to\n! "
+ "metafile, variable %s (table: %s)", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
/* -------------------------------------------------------------------- */
@@ -3161,46 +3189,47 @@ void cmor_define_dimensions(int var_id, int ncid,
/* -------------------------------------------------------------------- */
/* first we need to figure out the output type */
/* -------------------------------------------------------------------- */
- switch (cmor_tables[pAxis->ref_table_id].axes[pAxis->ref_axis_id].type) {
-
- case ('f'):
- j = NC_FLOAT;
- break;
- case ('d'):
- j = NC_DOUBLE;
- break;
- case ('i'):
- j = NC_INT;
- break;
- default:
- j = NC_DOUBLE;
- break;
+ switch (cmor_tables[pAxis->ref_table_id].axes[pAxis->ref_axis_id].
+ type) {
+
+ case ('f'):
+ j = NC_FLOAT;
+ break;
+ case ('d'):
+ j = NC_DOUBLE;
+ break;
+ case ('i'):
+ j = NC_INT;
+ break;
+ default:
+ j = NC_DOUBLE;
+ break;
}
ierr = nc_def_var(ncid, pAxis->id, j, 1, &nc_dim[i], &nc_vars[i]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) for variable %s\n! "
- "(table: %s) error defining dim var: %i (%s)",
- ierr, nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id, i, pAxis->id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) for variable %s\n! "
+ "(table: %s) error defining dim var: %i (%s)",
+ ierr, nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id, i, pAxis->id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
-
nc_vars_af[i] = nc_vars[i];
if (ncid != ncafid) {
ierr = nc_def_var(ncafid, pAxis->id, j, 1, &nc_dim_af[i],
- &nc_vars_af[i]);
+ &nc_vars_af[i]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s ) for variable %s\n! "
- "(table: %s) error defining dim var: %i\n! "
- "(%s) in metafile", ierr, nc_strerror(ierr),
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id, i, pAxis->id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s ) for variable %s\n! "
+ "(table: %s) error defining dim var: %i\n! "
+ "(%s) in metafile", ierr, nc_strerror(ierr),
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id, i,
+ pAxis->id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
@@ -3213,7 +3242,8 @@ void cmor_define_dimensions(int var_id, int ncid,
/* first need to figure out if the "region name is defined */
/* -------------------------------------------------------------------- */
strcpy(ctmp,
- cmor_tables[pAxis->ref_table_id].axes[pAxis->ref_axis_id].cname);
+ cmor_tables[pAxis->ref_table_id].axes[pAxis->ref_axis_id].
+ cname);
if (ctmp[0] == '\0') {
strcpy(ctmp, "geo_region");
@@ -3237,9 +3267,8 @@ void cmor_define_dimensions(int var_id, int ncid,
}
cmor_set_variable_attribute_internal(var_id,
- VARIABLE_ATT_COORDINATES,
- 'c',
- msg);
+ VARIABLE_ATT_COORDINATES,
+ 'c', msg);
l = 0;
for (j = 0; j < pAxis->length; j++) {
@@ -3255,24 +3284,24 @@ void cmor_define_dimensions(int var_id, int ncid,
ierr = nc_def_dim(ncid, "strlen", l, &tmp_dims[1]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) for dummy 'strlen'\n! "
- "dimension definition of axis: %s (%i) in\n! "
- "metafile, while writing variable %s (table: %s)",
- ierr, nc_strerror(ierr), pAxis->id, i,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) for dummy 'strlen'\n! "
+ "dimension definition of axis: %s (%i) in\n! "
+ "metafile, while writing variable %s (table: %s)",
+ ierr, nc_strerror(ierr), pAxis->id, i,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
tmp_dims[0] = nc_dim[i];
ierr = nc_def_var(ncid, ctmp, NC_CHAR, 2, &tmp_dims[0],
- &nc_vars[i]);
+ &nc_vars[i]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) for variable %s\n! "
- "(table: %s) error defining dim var: %i (%s)",
- ierr, nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id, i, pAxis->id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) for variable %s\n! "
+ "(table: %s) error defining dim var: %i (%s)",
+ ierr, nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id, i, pAxis->id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
nc_vars_af[i] = nc_vars[i];
@@ -3283,27 +3312,28 @@ void cmor_define_dimensions(int var_id, int ncid,
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) for dummy 'strlen'\n! "
- "dimension definition of axis: %s (%i) in\n! "
- "metafile, while writing variable %s "
- "(table: %s)", ierr, nc_strerror(ierr),
- pAxis->id, i, cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) for dummy 'strlen'\n! "
+ "dimension definition of axis: %s (%i) in\n! "
+ "metafile, while writing variable %s "
+ "(table: %s)", ierr, nc_strerror(ierr),
+ pAxis->id, i, cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
tmp_dims[0] = nc_dim_af[i];
ierr = nc_def_var(ncafid, ctmp, NC_CHAR, 1, &tmp_dims[0],
- &nc_vars_af[i]);
+ &nc_vars_af[i]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) for variable %s\n! "
- "(table: %s) error defining dim var:\n! "
- "%i (%s) in metafile", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id, i, pAxis->id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) for variable %s\n! "
+ "(table: %s) error defining dim var:\n! "
+ "%i (%s) in metafile", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id, i,
+ pAxis->id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
}
@@ -3320,45 +3350,46 @@ void cmor_define_dimensions(int var_id, int ncid,
/* variable in order to change */
/* the "bounds" attribute into "climatology" */
/* -------------------------------------------------------------------- */
- if (cmor_tables[pAxis->ref_table_id].axes[pAxis->ref_axis_id].climatology
- == 1) {
+ if (cmor_tables[pAxis->ref_table_id].axes[pAxis->ref_axis_id].
+ climatology == 1) {
snprintf(msg, CMOR_MAX_STRING, "climatology");
strncpy(ctmp, "climatology_bnds", CMOR_MAX_STRING);
}
}
dims_bnds_ids[0] = nc_dim[i];
dims_bnds_ids[1] = *dim_bnds;
- switch (cmor_tables[pAxis->ref_table_id].axes[pAxis->ref_axis_id].type) {
- case ('f'):
- j = NC_FLOAT;
- break;
- case ('d'):
- j = NC_DOUBLE;
- break;
- case ('i'):
- j = NC_INT;
- break;
- default:
- j = NC_DOUBLE;
- break;
+ switch (cmor_tables[pAxis->ref_table_id].axes[pAxis->ref_axis_id].
+ type) {
+ case ('f'):
+ j = NC_FLOAT;
+ break;
+ case ('d'):
+ j = NC_DOUBLE;
+ break;
+ case ('i'):
+ j = NC_INT;
+ break;
+ default:
+ j = NC_DOUBLE;
+ break;
}
ierr = nc_def_var(ncafid, ctmp, j, 2, &dims_bnds_ids[0],
- &nc_bnds_vars[i]);
+ &nc_bnds_vars[i]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) for variable %s\n! "
- "(table: %s) error defining bounds dim var: %i (%s)",
- ierr, nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id, i, pAxis->id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) for variable %s\n! "
+ "(table: %s) error defining bounds dim var: %i (%s)",
+ ierr, nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id, i, pAxis->id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
/* -------------------------------------------------------------------- */
/* Compression stuff */
/* -------------------------------------------------------------------- */
if ((CMOR_NETCDF_MODE != CMOR_REPLACE_3)
- && (CMOR_NETCDF_MODE != CMOR_PRESERVE_3)
- && (CMOR_NETCDF_MODE != CMOR_APPEND_3)) {
+ && (CMOR_NETCDF_MODE != CMOR_PRESERVE_3)
+ && (CMOR_NETCDF_MODE != CMOR_APPEND_3)) {
cmor_var_t *pVar;
pVar = &cmor_vars[var_id];
@@ -3368,15 +3399,15 @@ void cmor_define_dimensions(int var_id, int ncid,
icdl = pVar->deflate_level;
ierr = nc_def_var_deflate(ncafid, nc_bnds_vars[i], ics, icd,
- icdl);
+ icdl);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NCError (%i: %s) defining compression\n! "
- "parameters for bounds variable %s for\n! "
- "variable '%s' (table: %s)", ierr,
- nc_strerror(ierr), ctmp, cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NCError (%i: %s) defining compression\n! "
+ "parameters for bounds variable %s for\n! "
+ "variable '%s' (table: %s)", ierr,
+ nc_strerror(ierr), ctmp, cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
@@ -3387,15 +3418,15 @@ void cmor_define_dimensions(int var_id, int ncid,
if (i == 0)
cmor_vars[var_id].time_bnds_nc_id = nc_bnds_vars[i];
ierr = nc_put_att_text(ncafid, nc_vars[i], msg, strlen(ctmp) + 1,
- ctmp);
+ ctmp);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) for variable %s\n! "
- "(table: %s) error defining bounds attribute\n! "
- "var: %i (%s)", ierr, nc_strerror(ierr),
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id, i, pAxis->id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) for variable %s\n! "
+ "(table: %s) error defining bounds attribute\n! "
+ "var: %i (%s)", ierr, nc_strerror(ierr),
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id, i, pAxis->id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
/* -------------------------------------------------------------------- */
@@ -3403,77 +3434,81 @@ void cmor_define_dimensions(int var_id, int ncid,
/* -------------------------------------------------------------------- */
for (j = 0; j < cmor_axes[cmor_vars[var_id].axes_ids[i]].nattributes;
- j++) {
+ j++) {
if (strcmp(cmor_axes[cmor_vars[var_id].axes_ids[i]].attributes[j],
- "z_factors") == 0) {
+ "z_factors") == 0) {
/* -------------------------------------------------------------------- */
/* ok this part checks for z_factor things */
/* creates the formula terms attriubte */
/* -------------------------------------------------------------------- */
strncpy(msg,
- cmor_axes[cmor_vars[var_id].axes_ids[i]].attributes_values_char[j],
- CMOR_MAX_STRING);
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ attributes_values_char[j], CMOR_MAX_STRING);
n = strlen(msg) + 1;
ierr = nc_put_att_text(ncid, nc_vars[i], "formula_terms", n,
- msg);
+ msg);
if (ierr != NC_NOERR) {
snprintf(ctmp, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) writing formula term "
- "att (%s) for axis %i (%s), variable %s "
- "(table: %s)", ierr, nc_strerror(ierr), msg,
- i, cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) writing formula term "
+ "att (%s) for axis %i (%s), variable %s "
+ "(table: %s)", ierr, nc_strerror(ierr), msg,
+ i, cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
if (ncid != ncafid) {
ierr = nc_put_att_text(ncafid, nc_vars_af[i],
- "formula_terms", n, msg);
+ "formula_terms", n, msg);
if (ierr != NC_NOERR) {
snprintf(ctmp, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) writing formula "
- "term att (%s) for axis %i (%s), variable "
- "%s (table: %s)", ierr,
- nc_strerror(ierr), msg, i,
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(ctmp, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) writing formula "
+ "term att (%s) for axis %i (%s), variable "
+ "%s (table: %s)", ierr,
+ nc_strerror(ierr), msg, i,
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(ctmp, CMOR_CRITICAL, var_id);
}
}
ierr = cmor_define_zfactors_vars(var_id, ncafid, &nc_dim_af[0],
- msg, nzfactors, &zfactors[0], &nc_zfactors[0], i, -1);
- } else if (strcmp(
- cmor_axes[cmor_vars[var_id].axes_ids[i]].attributes[j],
- "z_bounds_factors") == 0) {
+ msg, nzfactors, &zfactors[0],
+ &nc_zfactors[0], i, -1);
+ } else
+ if (strcmp
+ (cmor_axes[cmor_vars[var_id].axes_ids[i]].attributes[j],
+ "z_bounds_factors") == 0) {
cmor_get_axis_attribute(cmor_vars[var_id].axes_ids[i],
- "formula", 'c', &msg);
+ "formula", 'c', &msg);
n = strlen(msg) + 1;
ierr = nc_put_att_text(ncafid, nc_bnds_vars[i], "formula", n,
- msg);
+ msg);
cmor_get_axis_attribute(cmor_vars[var_id].axes_ids[i],
- "standard_name", 'c', &msg);
+ "standard_name", 'c', &msg);
n = strlen(msg);
ierr = nc_put_att_text(ncafid, nc_bnds_vars[i], "standard_name",
- n, msg);
+ n, msg);
cmor_get_axis_attribute(cmor_vars[var_id].axes_ids[i], "units",
- 'c', &msg);
+ 'c', &msg);
n = strlen(msg) + 1;
ierr = nc_put_att_text(ncafid, nc_bnds_vars[i], "units", n,
- msg);
+ msg);
/*formula terms */
strncpy(msg,
- cmor_axes[cmor_vars[var_id].axes_ids[i]].attributes_values_char[j],
- CMOR_MAX_STRING);
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ attributes_values_char[j], CMOR_MAX_STRING);
n = strlen(msg) + 1;
ierr = nc_put_att_text(ncafid, nc_bnds_vars[i], "formula_terms",
- n, msg);
+ n, msg);
ierr = cmor_define_zfactors_vars(var_id, ncafid, nc_dim, msg,
- nzfactors, &zfactors[0], &nc_zfactors[0], i, *dim_bnds);
- } else if (strcmp(
- cmor_axes[cmor_vars[var_id].axes_ids[i]].attributes[j],
- "interval") == 0) {
+ nzfactors, &zfactors[0],
+ &nc_zfactors[0], i, *dim_bnds);
+ } else
+ if (strcmp
+ (cmor_axes[cmor_vars[var_id].axes_ids[i]].attributes[j],
+ "interval") == 0) {
if (cmor_has_variable_attribute(var_id, "cell_methods") == 0) {
cmor_get_variable_attribute(var_id, "cell_methods", msg);
} else {
@@ -3506,7 +3541,7 @@ void cmor_define_dimensions(int var_id, int ncid,
/* interval or not in order to add it */
/* -------------------------------------------------------------------- */
cmor_get_axis_attribute(cmor_vars[var_id].axes_ids[i],
- "interval", 'c', ctmp);
+ "interval", 'c', ctmp);
cmor_trim_string(ctmp, ctmp3);
@@ -3526,18 +3561,20 @@ void cmor_define_dimensions(int var_id, int ncid,
ctmp2[icdl + 1 + ierr] = '\0';
}
cmor_set_variable_attribute_internal(var_id,
- "cell_methods",
- 'c',
- ctmp2);
+ "cell_methods",
+ 'c', ctmp2);
break;
}
}
} else {
- if ((cmor_tables[cmor_axes[cmor_vars[var_id].axes_ids[i]].ref_table_id].axes[cmor_axes[cmor_vars[var_id].axes_ids[i]].ref_axis_id].type
- == 'c')
- && (strcmp(
- cmor_axes[cmor_vars[var_id].axes_ids[i]].attributes[j],
- "units") == 0)) {
+ if ((cmor_tables
+ [cmor_axes[cmor_vars[var_id].axes_ids[i]].ref_table_id].
+ axes[cmor_axes[cmor_vars[var_id].axes_ids[i]].ref_axis_id].
+ type == 'c')
+ &&
+ (strcmp
+ (cmor_axes[cmor_vars[var_id].axes_ids[i]].attributes[j],
+ "units") == 0)) {
/* -------------------------------------------------------------------- */
/* passing we do not want the units attribute */
/* -------------------------------------------------------------------- */
@@ -3547,28 +3584,45 @@ void cmor_define_dimensions(int var_id, int ncid,
if (pAxis->attributes_type[j] == 'c') {
ierr = cmor_put_nc_char_attribute(ncid, nc_vars[i],
- pAxis->attributes[j],
- pAxis->attributes_values_char[j],
- cmor_vars[var_id].id);
+ pAxis->attributes[j],
+ pAxis->
+ attributes_values_char
+ [j],
+ cmor_vars[var_id].id);
if (ncid != ncafid) {
ierr = cmor_put_nc_char_attribute(ncafid,
- nc_vars_af[i], pAxis->attributes[j],
- pAxis->attributes_values_char[j],
- cmor_vars[var_id].id);
+ nc_vars_af[i],
+ pAxis->
+ attributes[j],
+ pAxis->
+ attributes_values_char
+ [j],
+ cmor_vars[var_id].
+ id);
}
} else {
ierr = cmor_put_nc_num_attribute(ncid, nc_vars[i],
- pAxis->attributes[j], pAxis->attributes_type[j],
- pAxis->attributes_values_num[j],
- cmor_vars[var_id].id);
+ pAxis->attributes[j],
+ pAxis->
+ attributes_type[j],
+ pAxis->
+ attributes_values_num
+ [j],
+ cmor_vars[var_id].id);
if (ncid != ncafid) {
ierr = cmor_put_nc_num_attribute(ncafid,
- nc_vars_af[i], pAxis->attributes[j],
- pAxis->attributes_type[j],
- pAxis->attributes_values_num[j],
- cmor_vars[var_id].id);
+ nc_vars_af[i],
+ pAxis->
+ attributes[j],
+ pAxis->
+ attributes_type[j],
+ pAxis->
+ attributes_values_num
+ [j],
+ cmor_vars[var_id].
+ id);
}
}
}
@@ -3582,12 +3636,13 @@ void cmor_define_dimensions(int var_id, int ncid,
/* cmor_grids_def() */
/************************************************************************/
int cmor_grids_def(int var_id, int nGridID, int ncafid, int *nc_dim_af,
- int *nc_associated_vars) {
+ int *nc_associated_vars)
+{
int ierr;
int m;
char msg[CMOR_MAX_STRING];
double tmps[2];
- int i,j,k,l;
+ int i, j, k, l;
int nc_dims_associated[CMOR_MAX_AXES];
int nVarRefTblID = cmor_vars[var_id].ref_table_id;
int m2[5];
@@ -3608,68 +3663,69 @@ int cmor_grids_def(int var_id, int nGridID, int ncafid, int *nc_dim_af,
/* -------------------------------------------------------------------- */
cmor_set_variable_attribute_internal(var_id,
- VARIALBE_ATT_GRIDMAPPING,
- 'c',
- cmor_grids[nGridID].mapping);
+ VARIALBE_ATT_GRIDMAPPING,
+ 'c', cmor_grids[nGridID].mapping);
ierr = nc_def_var(ncafid, cmor_grids[nGridID].mapping, NC_INT, 0,
- &nc_dims_associated[0], &m);
+ &nc_dims_associated[0], &m);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) while defining\n! "
- "associated grid mapping variable %s for\n! "
- "variable %s (table: %s)", ierr, nc_strerror(ierr),
- cmor_grids[nGridID].mapping, cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) while defining\n! "
+ "associated grid mapping variable %s for\n! "
+ "variable %s (table: %s)", ierr, nc_strerror(ierr),
+ cmor_grids[nGridID].mapping, cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
/* -------------------------------------------------------------------- */
/* Creates attributes related to that variable */
/* -------------------------------------------------------------------- */
ierr = cmor_put_nc_char_attribute(ncafid, m, "grid_mapping_name",
- cmor_grids[nGridID].mapping, cmor_vars[var_id].id);
- for (k = 0; k < cmor_grids[cmor_vars[var_id].grid_id].nattributes;
- k++) {
+ cmor_grids[nGridID].mapping,
+ cmor_vars[var_id].id);
+ for (k = 0; k < cmor_grids[cmor_vars[var_id].grid_id].nattributes; k++) {
if (strcmp(cmor_grids[nGridID].attributes_names[k],
- "standard_parallel1") == 0
- || strcmp(cmor_grids[nGridID].attributes_names[k],
- "standard_parallel2") == 0) {
+ "standard_parallel1") == 0
+ || strcmp(cmor_grids[nGridID].attributes_names[k],
+ "standard_parallel2") == 0) {
i = -nGridID - CMOR_MAX_GRIDS;
if ((cmor_has_grid_attribute(i, "standard_parallel1") == 0)
- && (cmor_has_grid_attribute(i, "standard_parallel2")
- == 0)) {
+ && (cmor_has_grid_attribute(i, "standard_parallel2")
+ == 0)) {
cmor_get_grid_attribute(i, "standard_parallel1", &tmps[0]);
cmor_get_grid_attribute(i, "standard_parallel2", &tmps[1]);
ierr = nc_put_att_double(ncafid, m, "standard_parallel",
- NC_DOUBLE, 2, &tmps[0]);
+ NC_DOUBLE, 2, &tmps[0]);
} else if (cmor_has_grid_attribute(i, "standard_parallel1")
- == 0) {
+ == 0) {
cmor_get_grid_attribute(i, "standard_parallel1", &tmps[0]);
ierr = nc_put_att_double(ncafid, m, "standard_parallel",
- NC_DOUBLE, 1, &tmps[0]);
+ NC_DOUBLE, 1, &tmps[0]);
} else {
cmor_get_grid_attribute(i, "standard_parallel2", &tmps[0]);
ierr = nc_put_att_double(ncafid, m, "standard_parallel",
- NC_DOUBLE, 1, &tmps[0]);
+ NC_DOUBLE, 1, &tmps[0]);
}
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) writing\n! "
- "standard_parallel to file, variable:\n! "
- "%s (table: %s)", ierr, nc_strerror(ierr),
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_NORMAL);
+ "NetCDF Error (%i: %s) writing\n! "
+ "standard_parallel to file, variable:\n! "
+ "%s (table: %s)", ierr, nc_strerror(ierr),
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_NORMAL, var_id);
cmor_pop_traceback();
return (1);
}
} else {
ierr = cmor_put_nc_num_attribute(ncafid, m,
- cmor_grids[nGridID].attributes_names[k], 'd',
- cmor_grids[nGridID].attributes_values[k],
- cmor_grids[nGridID].mapping);
+ cmor_grids[nGridID].
+ attributes_names[k], 'd',
+ cmor_grids[nGridID].
+ attributes_values[k],
+ cmor_grids[nGridID].mapping);
}
}
}
@@ -3703,19 +3759,23 @@ int cmor_grids_def(int var_id, int nGridID, int ncafid, int *nc_dim_af,
if (m2[i] == 0 && (i == 0 || i == 1)) {
if (cmor_has_variable_attribute(var_id, "coordinates")
- == 0) {
- cmor_get_variable_attribute(var_id, "coordinates", &msg);
+ == 0) {
+ cmor_get_variable_attribute(var_id, "coordinates",
+ &msg);
cmor_cat_unique_string(msg,
- cmor_vars[cmor_grids[nGridID].associated_variables[i]].id);
+ cmor_vars[cmor_grids
+ [nGridID].
+ associated_variables
+ [i]].id);
} else {
strncpy(msg,
- cmor_vars[cmor_grids[nGridID].associated_variables[i]].id,
+ cmor_vars[cmor_grids[nGridID].
+ associated_variables[i]].id,
CMOR_MAX_STRING - strlen(msg));
}
cmor_set_variable_attribute_internal(var_id,
- "coordinates",
- 'c',
- msg);
+ "coordinates",
+ 'c', msg);
m2[i] = 1;
}
l++;
@@ -3732,43 +3792,45 @@ int cmor_grids_def(int var_id, int nGridID, int ncafid, int *nc_dim_af,
m = 1;
ierr = nc_def_dim(ncafid, "vertices",
- cmor_axes[cmor_vars[j].axes_ids[cmor_vars[j].ndims
- - 1]].length, &nc_dims_associated[l]);
+ cmor_axes[cmor_vars[j].
+ axes_ids[cmor_vars[j].ndims -
+ 1]].length,
+ &nc_dims_associated[l]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) while defining\n! "
- "vertices dimension, variable %s\n! "
- "(table: %s)", ierr, nc_strerror(ierr),
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) while defining\n! "
+ "vertices dimension, variable %s\n! "
+ "(table: %s)", ierr, nc_strerror(ierr),
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
mtype = cmor_vars[j].type;
if (mtype == 'd')
ierr = nc_def_var(ncafid, cmor_vars[j].id, NC_DOUBLE,
- cmor_vars[j].ndims, &nc_dims_associated[0],
- &nc_associated_vars[i]);
+ cmor_vars[j].ndims, &nc_dims_associated[0],
+ &nc_associated_vars[i]);
else if (mtype == 'f')
ierr = nc_def_var(ncafid, cmor_vars[j].id, NC_FLOAT,
- cmor_vars[j].ndims, &nc_dims_associated[0],
- &nc_associated_vars[i]);
+ cmor_vars[j].ndims, &nc_dims_associated[0],
+ &nc_associated_vars[i]);
else if (mtype == 'l')
ierr = nc_def_var(ncafid, cmor_vars[j].id, NC_INT,
- cmor_vars[j].ndims, &nc_dims_associated[0],
- &nc_associated_vars[i]);
+ cmor_vars[j].ndims, &nc_dims_associated[0],
+ &nc_associated_vars[i]);
else if (mtype == 'i')
ierr = nc_def_var(ncafid, cmor_vars[j].id, NC_INT,
- cmor_vars[j].ndims, &nc_dims_associated[0],
- &nc_associated_vars[i]);
+ cmor_vars[j].ndims, &nc_dims_associated[0],
+ &nc_associated_vars[i]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) while defining\n! "
- "associated variable %s, of variable\n! "
- "%s (table: %s)", ierr, nc_strerror(ierr),
- cmor_vars[j].id, cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF error (%i: %s) while defining\n! "
+ "associated variable %s, of variable\n! "
+ "%s (table: %s)", ierr, nc_strerror(ierr),
+ cmor_vars[j].id, cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
/* -------------------------------------------------------------------- */
@@ -3780,7 +3842,7 @@ int cmor_grids_def(int var_id, int nGridID, int ncafid, int *nc_dim_af,
/* first of all we need to make sure it is not an empty attribute */
/* -------------------------------------------------------------------- */
if (cmor_has_variable_attribute(j, cmor_vars[j].attributes[k])
- != 0) {
+ != 0) {
/* -------------------------------------------------------------------- */
/* deleted attribute continue on */
/* -------------------------------------------------------------------- */
@@ -3790,36 +3852,45 @@ int cmor_grids_def(int var_id, int nGridID, int ncafid, int *nc_dim_af,
/* -------------------------------------------------------------------- */
/* ok we need to convert the string to a list of int */
/* -------------------------------------------------------------------- */
- ierr = cmor_convert_string_to_list(
- cmor_vars[j].attributes_values_char[k], 'i',
- (void *) &int_list, &nelts);
+ ierr =
+ cmor_convert_string_to_list(cmor_vars[j].
+ attributes_values_char[k],
+ 'i', (void *)&int_list,
+ &nelts);
ierr = nc_put_att_int(ncafid, nc_associated_vars[i],
- "flag_values", NC_INT, nelts, int_list);
+ "flag_values", NC_INT, nelts,
+ int_list);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) setting\n! "
- "flags numerical attribute on\n! "
- "associated variable %s, for\n! "
- "variable %s (table: %s)", ierr,
- nc_strerror(ierr), cmor_vars[j].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) setting\n! "
+ "flags numerical attribute on\n! "
+ "associated variable %s, for\n! "
+ "variable %s (table: %s)", ierr,
+ nc_strerror(ierr), cmor_vars[j].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
free(int_list);
} else if (cmor_vars[j].attributes_type[k] == 'c') {
ierr = cmor_put_nc_char_attribute(ncafid,
- nc_associated_vars[i], cmor_vars[j].attributes[k],
- cmor_vars[j].attributes_values_char[k],
- cmor_vars[j].id);
+ nc_associated_vars[i],
+ cmor_vars[j].
+ attributes[k],
+ cmor_vars[j].
+ attributes_values_char[k],
+ cmor_vars[j].id);
} else {
ierr = cmor_put_nc_num_attribute(ncafid,
- nc_associated_vars[i], cmor_vars[j].attributes[k],
- cmor_vars[j].attributes_type[k],
- cmor_vars[j].attributes_values_num[k],
- cmor_vars[j].id);
+ nc_associated_vars[i],
+ cmor_vars[j].attributes[k],
+ cmor_vars[j].
+ attributes_type[k],
+ cmor_vars[j].
+ attributes_values_num[k],
+ cmor_vars[j].id);
}
}
/* -------------------------------------------------------------------- */
@@ -3827,44 +3898,52 @@ int cmor_grids_def(int var_id, int nGridID, int ncafid, int *nc_dim_af,
/* -------------------------------------------------------------------- */
if ((CMOR_NETCDF_MODE != CMOR_REPLACE_3)
- && (CMOR_NETCDF_MODE != CMOR_PRESERVE_3)
- && (CMOR_NETCDF_MODE != CMOR_APPEND_3)) {
+ && (CMOR_NETCDF_MODE != CMOR_PRESERVE_3)
+ && (CMOR_NETCDF_MODE != CMOR_APPEND_3)) {
if (cmor_vars[j].ndims > 0) {
- ics = cmor_tables[cmor_vars[j].ref_table_id].
- vars[cmor_vars[j].ref_var_id].shuffle;
- icd = cmor_tables[cmor_vars[j].ref_table_id].
- vars[cmor_vars[j].ref_var_id].deflate;
- icdl = cmor_tables[cmor_vars[j].ref_table_id].
- vars[cmor_vars[j].ref_var_id].deflate_level;
+ ics =
+ cmor_tables[cmor_vars[j].ref_table_id].vars[cmor_vars[j].
+ ref_var_id].
+ shuffle;
+ icd =
+ cmor_tables[cmor_vars[j].ref_table_id].vars[cmor_vars[j].
+ ref_var_id].
+ deflate;
+ icdl =
+ cmor_tables[cmor_vars[j].ref_table_id].vars[cmor_vars[j].
+ ref_var_id].
+ deflate_level;
ierr = nc_def_var_deflate(ncafid, nc_associated_vars[i],
- ics, icd, icdl);
+ ics, icd, icdl);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) defining\n! "
- "compression parameters for\n! "
- "associated variable '%s' for\n! "
- "variable %s (table: %s)", ierr,
- nc_strerror(ierr), cmor_vars[j].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) defining\n! "
+ "compression parameters for\n! "
+ "associated variable '%s' for\n! "
+ "variable %s (table: %s)", ierr,
+ nc_strerror(ierr), cmor_vars[j].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
}
}
}
cmor_pop_traceback();
- return(0);
+ return (0);
}
+
/************************************************************************/
/* create_singleton_dimensions() */
/************************************************************************/
void create_singleton_dimensions(int var_id, int ncid, int *nc_singletons,
- int *nc_singletons_bnds, int *dim_bnds){
+ int *nc_singletons_bnds, int *dim_bnds)
+{
int ierr;
- int i,j,k;
+ int i, j, k;
char msg[CMOR_MAX_STRING];
int nVarRefTblID;
@@ -3877,25 +3956,27 @@ void create_singleton_dimensions(int var_id, int ncid, int *nc_singletons,
for (i = 0; i < CMOR_MAX_DIMENSIONS; i++) {
j = cmor_vars[var_id].singleton_ids[i];
if (j != -1) {
- if (cmor_tables[cmor_axes[j].ref_table_id].axes[cmor_axes[j].ref_axis_id].type
- == 'c') {
- ierr = nc_def_dim(ncid, "strlen", strlen(
- cmor_tables[cmor_axes[j].ref_table_id].axes[cmor_axes[j].ref_axis_id].cvalue),
- &k);
- ierr = nc_def_var(ncid, cmor_axes[j].id, NC_CHAR, 1, &k,
- &nc_singletons[i]);
+ if (cmor_tables[cmor_axes[j].ref_table_id].
+ axes[cmor_axes[j].ref_axis_id].type == 'c') {
+ ierr =
+ nc_def_dim(ncid, "strlen",
+ strlen(cmor_tables[cmor_axes[j].ref_table_id].
+ axes[cmor_axes[j].ref_axis_id].cvalue), &k);
+ ierr =
+ nc_def_var(ncid, cmor_axes[j].id, NC_CHAR, 1, &k,
+ &nc_singletons[i]);
} else {
ierr = nc_def_var(ncid, cmor_axes[j].id, NC_DOUBLE, 0,
- &nc_singletons[i], &nc_singletons[i]);
+ &nc_singletons[i], &nc_singletons[i]);
}
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) defining scalar variable\n! "
- "%s for variable %s (table: %s)", ierr,
- nc_strerror(ierr), cmor_axes[j].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) defining scalar variable\n! "
+ "%s for variable %s (table: %s)", ierr,
+ nc_strerror(ierr), cmor_axes[j].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
/* -------------------------------------------------------------------- */
/* now puts on its attributes */
@@ -3903,35 +3984,41 @@ void create_singleton_dimensions(int var_id, int ncid, int *nc_singletons,
for (k = 0; k < cmor_axes[j].nattributes; k++) {
if (cmor_axes[j].attributes_type[k] == 'c') {
ierr = cmor_put_nc_char_attribute(ncid, nc_singletons[i],
- cmor_axes[j].attributes[k],
- cmor_axes[j].attributes_values_char[k],
- cmor_vars[var_id].id);
+ cmor_axes[j].
+ attributes[k],
+ cmor_axes[j].
+ attributes_values_char[k],
+ cmor_vars[var_id].id);
} else {
ierr = cmor_put_nc_num_attribute(ncid, nc_singletons[i],
- cmor_axes[j].attributes[k],
- cmor_axes[j].attributes_type[k],
- cmor_axes[j].attributes_values_num[k],
- cmor_vars[var_id].id);
+ cmor_axes[j].attributes[k],
+ cmor_axes[j].
+ attributes_type[k],
+ cmor_axes[j].
+ attributes_values_num[k],
+ cmor_vars[var_id].id);
}
}
/* -------------------------------------------------------------------- */
/* ok we need to see if there's bounds as well... */
/* -------------------------------------------------------------------- */
- if (cmor_axes[j].bounds != NULL) { /*yep */
+ if (cmor_axes[j].bounds != NULL) { /*yep */
snprintf(msg, CMOR_MAX_STRING, "%s_bnds", cmor_axes[j].id);
ierr = cmor_put_nc_char_attribute(ncid, nc_singletons[i],
- "bounds", msg, cmor_vars[var_id].id);
- ierr = nc_def_var(ncid, msg, NC_DOUBLE, 1, dim_bnds,
- &nc_singletons_bnds[i]);
+ "bounds", msg,
+ cmor_vars[var_id].id);
+ ierr =
+ nc_def_var(ncid, msg, NC_DOUBLE, 1, dim_bnds,
+ &nc_singletons_bnds[i]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) defining scalar\n! "
- "bounds variable %s for variable %s (table: %s)",
- ierr, nc_strerror(ierr), cmor_axes[j].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) defining scalar\n! "
+ "bounds variable %s for variable %s (table: %s)",
+ ierr, nc_strerror(ierr), cmor_axes[j].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
}
@@ -3939,18 +4026,20 @@ void create_singleton_dimensions(int var_id, int ncid, int *nc_singletons,
cmor_pop_traceback();
}
+
/************************************************************************/
/* cmor_write() */
/************************************************************************/
-int cmor_write( int var_id, void *data, char type,
- int ntimes_passed, double *time_vals, double *time_bounds,
- int *refvar ) {
+int cmor_write(int var_id, void *data, char type,
+ int ntimes_passed, double *time_vals, double *time_bounds,
+ int *refvar)
+{
extern cmor_var_t cmor_vars[CMOR_MAX_VARIABLES];
extern cmor_axis_t cmor_axes[CMOR_MAX_AXES];
extern int cmor_nvars;
extern cmor_dataset_def cmor_current_dataset;
- int i, ierr = 0, ncid, ncafid;
+ int i, ierr = 0, ncid, ncafid;
char outname[CMOR_MAX_STRING];
char ctmp[CMOR_MAX_STRING];
char ctmp2[CMOR_MAX_STRING];
@@ -3972,32 +4061,29 @@ int cmor_write( int var_id, void *data, char type,
int nc_zfactors[CMOR_MAX_VARIABLES];
int refvarid;
- int nVarRefTblID;
+ int nVarRefTblID;
char szPathTemplate[CMOR_MAX_STRING];
char outpath[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_write" );
-
+ cmor_add_traceback("cmor_write");
nVarRefTblID = cmor_vars[var_id].ref_table_id;
- strcpy( appending_to, "" ); /* initialize to nothing */
- strcpy( outname, "" );
- strcpy( ctmp, "" );
- strcpy( msg, "" );
- strcpy( ctmp2, "" );
- strcpy( outpath,"" );
+ strcpy(appending_to, ""); /* initialize to nothing */
+ strcpy(outname, "");
+ strcpy(ctmp, "");
+ strcpy(msg, "");
+ strcpy(ctmp2, "");
+ strcpy(outpath, "");
- cmor_is_setup( );
- if( var_id > cmor_nvars ) {
+ cmor_is_setup();
+ if (var_id > cmor_nvars) {
- cmor_handle_error( "var_id %i not defined", CMOR_CRITICAL );
- cmor_pop_traceback( );
- return(-1);
+ cmor_handle_error("var_id %i not defined", CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (-1);
};
-
-
ierr += cmor_addVersion();
ierr += cmor_addRIPF(ctmp);
@@ -4005,16 +4091,14 @@ int cmor_write( int var_id, void *data, char type,
/* Make sure that variable_id is set Global Attributes and for */
/* File and Path template */
/* -------------------------------------------------------------------- */
- cmor_set_cur_dataset_attribute_internal(
- GLOBAL_ATT_VARIABLE_ID,
- cmor_vars[var_id].id,
- 1);
+ cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_VARIABLE_ID,
+ cmor_vars[var_id].id, 1);
ctmp[0] = '\0';
/* -------------------------------------------------------------------- */
/* here we check that the variable actually has all */
/* the required attributes set */
/* -------------------------------------------------------------------- */
- ierr += cmor_has_required_variable_attributes( var_id );
+ ierr += cmor_has_required_variable_attributes(var_id);
/* -------------------------------------------------------------------- */
/* Do we have associated variables (z_factors)? */
@@ -4031,103 +4115,103 @@ int cmor_write( int var_id, void *data, char type,
/* Variable never been thru cmor_write, */
/* we need to define everything */
/* -------------------------------------------------------------------- */
- if( cmor_vars[refvarid].initialized == -1 ) {
-
- if( cmor_vars[refvarid].type != type ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Converted type from '%c' to '%c'", type,
- cmor_vars[refvarid].type );
- cmor_update_history( refvarid, msg );
- }
+ if (cmor_vars[refvarid].initialized == -1) {
+ if (cmor_vars[refvarid].type != type) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Converted type from '%c' to '%c'", type,
+ cmor_vars[refvarid].type);
+ cmor_update_history(refvarid, msg);
+ }
- ierr += cmor_setGblAttr(var_id);
+ ierr += cmor_setGblAttr(var_id);
/* -------------------------------------------------------------------- */
/* Figures out path */
/* -------------------------------------------------------------------- */
- strncpy(szPathTemplate, cmor_current_dataset.path_template,
- CMOR_MAX_STRING);
+ strncpy(szPathTemplate, cmor_current_dataset.path_template,
+ CMOR_MAX_STRING);
/* -------------------------------------------------------------------- */
/* Add outpath prefix if exist. */
/* -------------------------------------------------------------------- */
- strncpytrim( outname, cmor_current_dataset.outpath,
- CMOR_MAX_STRING);
+ strncpytrim(outname, cmor_current_dataset.outpath, CMOR_MAX_STRING);
/* -------------------------------------------------------------------- */
/* Make sure last character is '/'. */
/* -------------------------------------------------------------------- */
- if((strlen(outname) > 0) && (outname[strlen(outname)] != '/' )) {
+ if ((strlen(outname) > 0) && (outname[strlen(outname)] != '/')) {
strncat(outname, "/", CMOR_MAX_STRING);
}
- if( CMOR_CREATE_SUBDIRECTORIES == 1 ) {
- ierr += cmor_CreateFromTemplate(nVarRefTblID, szPathTemplate, outname, "/");
- } else {
- ierr += cmor_CreateFromTemplate( nVarRefTblID, szPathTemplate, msg, "/");
- }
+ if (CMOR_CREATE_SUBDIRECTORIES == 1) {
+ ierr +=
+ cmor_CreateFromTemplate(nVarRefTblID, szPathTemplate, outname,
+ "/");
+ } else {
+ ierr +=
+ cmor_CreateFromTemplate(nVarRefTblID, szPathTemplate, msg, "/");
+ }
- if( ierr != 0 ) {
- sprintf( ctmp,
- "Cannot continue until you fix the errors listed above: %d", ierr);
- cmor_handle_error( ctmp, CMOR_CRITICAL );
- }
+ if (ierr != 0) {
+ sprintf(ctmp,
+ "Cannot continue until you fix the errors listed above: %d",
+ ierr);
+ cmor_handle_error_var(ctmp, CMOR_CRITICAL, var_id);
+ }
- ierr = cmor_mkdir(outname);
- if( (ierr != 0) && (errno != EEXIST ) ) {
- sprintf( ctmp,
+ ierr = cmor_mkdir(outname);
+ if ((ierr != 0) && (errno != EEXIST)) {
+ sprintf(ctmp,
"creating outpath: %s, for variable %s (table: %s). "
"Not enough permission?",
outname, cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].
- ref_table_id].szTable_id );
- cmor_handle_error( ctmp, CMOR_CRITICAL );
+ cmor_tables[cmor_vars[var_id].ref_table_id].szTable_id);
+ cmor_handle_error_var(ctmp, CMOR_CRITICAL, var_id);
}
- strncat( outname, "/", CMOR_MAX_STRING - strlen( outname ) );
+ strncat(outname, "/", CMOR_MAX_STRING - strlen(outname));
/* -------------------------------------------------------------------- */
/* Verify that var name does not contain "_" or "-" */
/* -------------------------------------------------------------------- */
- for( i = 0; i < strlen( cmor_vars[var_id].id ); i++ ) {
- if( ( cmor_vars[var_id].id[i] == '_' ) ||
- ( cmor_vars[var_id].id[i] == '-' ) ) {
- snprintf( outname, CMOR_MAX_STRING,
- "var_id cannot contain %c you passed: %s "
- "(table: %s). Please check your input tables\n! ",
- cmor_vars[var_id].id[i], cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id );
- cmor_handle_error( outname, CMOR_CRITICAL );
- }
- }
+ for (i = 0; i < strlen(cmor_vars[var_id].id); i++) {
+ if ((cmor_vars[var_id].id[i] == '_') ||
+ (cmor_vars[var_id].id[i] == '-')) {
+ snprintf(outname, CMOR_MAX_STRING,
+ "var_id cannot contain %c you passed: %s "
+ "(table: %s). Please check your input tables\n! ",
+ cmor_vars[var_id].id[i], cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(outname, CMOR_CRITICAL, var_id);
+ }
+ }
/* -------------------------------------------------------------------- */
/* Create/Save filename */
/* -------------------------------------------------------------------- */
- ierr = cmor_CreateFromTemplate(nVarRefTblID,
- cmor_current_dataset.file_template,
- outname, "_");
-
+ ierr = cmor_CreateFromTemplate(nVarRefTblID,
+ cmor_current_dataset.file_template,
+ outname, "_");
- strcat(outpath, outname);
- strncpy(outname, outpath, CMOR_MAX_STRING);
- strncpytrim(cmor_vars[var_id].base_path, outname, CMOR_MAX_STRING);
- strcat(outname, "XXXXXX");
- ierr = mkstemp(outname);
- unlink(outname);
+ strcat(outpath, outname);
+ strncpy(outname, outpath, CMOR_MAX_STRING);
+ strncpytrim(cmor_vars[var_id].base_path, outname, CMOR_MAX_STRING);
+ strcat(outname, "XXXXXX");
+ ierr = mkstemp(outname);
+ unlink(outname);
/* -------------------------------------------------------------------- */
/* Add Process ID and a random number to filename */
/* -------------------------------------------------------------------- */
- sprintf( msg, "%d", ( int ) getpid( ) );
- strncat( outname, msg, CMOR_MAX_STRING - strlen( outname ) );
+ sprintf(msg, "%d", (int)getpid());
+ strncat(outname, msg, CMOR_MAX_STRING - strlen(outname));
/* -------------------------------------------------------------------- */
/* Add the '.nc' extension */
/* -------------------------------------------------------------------- */
- strncat( outname, ".nc", CMOR_MAX_STRING - strlen( outname ) );
- strncpytrim( cmor_vars[var_id].current_path, outname, CMOR_MAX_STRING );
+ strncat(outname, ".nc", CMOR_MAX_STRING - strlen(outname));
+ strncpytrim(cmor_vars[var_id].current_path, outname, CMOR_MAX_STRING);
/* -------------------------------------------------------------------- */
/* Decides NetCDF mode */
/* -------------------------------------------------------------------- */
- ncid = cmor_validateFilename(outname, var_id);
+ ncid = cmor_validateFilename(outname, var_id);
/* -------------------------------------------------------------------- */
/* we closed and reopened the same test, in case we */
/* were appending, in which case all declaration have */
@@ -4139,196 +4223,199 @@ int cmor_write( int var_id, void *data, char type,
/* */
/* define global attributes */
/* -------------------------------------------------------------------- */
- if( cmor_current_dataset.initiated == 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "you need to initialize the dataset by calling "
- "cmor_dataset before calling cmor_write" );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return( 1 );
- }
+ if (cmor_current_dataset.initiated == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "you need to initialize the dataset by calling "
+ "cmor_dataset before calling cmor_write");
+ cmor_handle_error_var(msg, CMOR_NORMAL, var_id);
+ cmor_pop_traceback();
+ return (1);
+ }
- cleanup_varid = var_id;
- ncafid = ncid;
+ cleanup_varid = var_id;
+ ncafid = ncid;
/* -------------------------------------------------------------------- */
/* make sure we are in def mode */
/* -------------------------------------------------------------------- */
- ierr = nc_redef( ncafid );
- if( ierr != NC_NOERR && ierr != NC_EINDEFINE ) {
- snprintf( msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) putting metadata file (%s) in\n! "
- "def mode, nc file id was: %i, you were writing\n! "
- "variable %s (table: %s)",
- ierr, nc_strerror( ierr ),
- cmor_current_dataset.associated_file_name, ncafid,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- ierr = cmor_writeGblAttr(var_id, ncid, ncafid);
- if(ierr != 0) {
- return(ierr);
- }
+ ierr = nc_redef(ncafid);
+ if (ierr != NC_NOERR && ierr != NC_EINDEFINE) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NetCDF Error (%i: %s) putting metadata file (%s) in\n! "
+ "def mode, nc file id was: %i, you were writing\n! "
+ "variable %s (table: %s)",
+ ierr, nc_strerror(ierr),
+ cmor_current_dataset.associated_file_name, ncafid,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+ ierr = cmor_writeGblAttr(var_id, ncid, ncafid);
+ if (ierr != 0) {
+ return (ierr);
+ }
/* -------------------------------------------------------------------- */
/* store netcdf file id associated with this variable */
/* -------------------------------------------------------------------- */
- cmor_vars[var_id].initialized = ncid;
+ cmor_vars[var_id].initialized = ncid;
/* -------------------------------------------------------------------- */
/* define dimensions in NetCDF file */
/* -------------------------------------------------------------------- */
cmor_define_dimensions(var_id, ncid, ncafid, time_bounds, nc_dim,
- nc_vars, nc_bnds_vars, nc_vars_af, nc_dim_chunking, &dim_bnds,
- zfactors, nc_zfactors,nc_dim_af, &nzfactors);
+ nc_vars, nc_bnds_vars, nc_vars_af,
+ nc_dim_chunking, &dim_bnds, zfactors,
+ nc_zfactors, nc_dim_af, &nzfactors);
/* -------------------------------------------------------------------- */
/* Store the dimension id for reuse when writing */
/* over multiple call to cmor_write */
/* -------------------------------------------------------------------- */
- cmor_vars[var_id].time_nc_id = nc_vars[0];
+ cmor_vars[var_id].time_nc_id = nc_vars[0];
int nGridID;
nGridID = cmor_vars[var_id].grid_id;
/* -------------------------------------------------------------------- */
/* check if it is a grid thing */
/* -------------------------------------------------------------------- */
- if( nGridID > -1 ) {
- ierr = cmor_grids_def(var_id, nGridID,ncafid, nc_dim_af,
- nc_associated_vars);
- if(ierr) return(ierr);
- }
-
- create_singleton_dimensions(var_id, ncid,
- nc_singletons, nc_singletons_bnds, &dim_bnds);
+ if (nGridID > -1) {
+ ierr = cmor_grids_def(var_id, nGridID, ncafid, nc_dim_af,
+ nc_associated_vars);
+ if (ierr)
+ return (ierr);
+ }
+ create_singleton_dimensions(var_id, ncid,
+ nc_singletons, nc_singletons_bnds,
+ &dim_bnds);
/* -------------------------------------------------------------------- */
/* Creating variable to write */
/* -------------------------------------------------------------------- */
- mtype = cmor_vars[var_id].type;
- if( mtype == 'd' )
- ierr =
- nc_def_var( ncid, cmor_vars[var_id].id, NC_DOUBLE,
- cmor_vars[var_id].ndims, &nc_dim[0],
- &nc_vars[cmor_vars[var_id].ndims] );
- else if( mtype == 'f' )
- ierr =
- nc_def_var( ncid, cmor_vars[var_id].id, NC_FLOAT,
- cmor_vars[var_id].ndims, &nc_dim[0],
- &nc_vars[cmor_vars[var_id].ndims] );
- else if( mtype == 'l' )
- ierr =
- nc_def_var( ncid, cmor_vars[var_id].id, NC_INT,
- cmor_vars[var_id].ndims, &nc_dim[0],
- &nc_vars[cmor_vars[var_id].ndims] );
- else if( mtype == 'i' )
- ierr =
- nc_def_var( ncid, cmor_vars[var_id].id, NC_INT,
- cmor_vars[var_id].ndims, &nc_dim[0],
- &nc_vars[cmor_vars[var_id].ndims] );
- if( ierr != NC_NOERR ) {
- snprintf( msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) writing variable: %s (table: %s)",
- ierr, nc_strerror( ierr ), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ mtype = cmor_vars[var_id].type;
+ if (mtype == 'd')
+ ierr =
+ nc_def_var(ncid, cmor_vars[var_id].id, NC_DOUBLE,
+ cmor_vars[var_id].ndims, &nc_dim[0],
+ &nc_vars[cmor_vars[var_id].ndims]);
+ else if (mtype == 'f')
+ ierr =
+ nc_def_var(ncid, cmor_vars[var_id].id, NC_FLOAT,
+ cmor_vars[var_id].ndims, &nc_dim[0],
+ &nc_vars[cmor_vars[var_id].ndims]);
+ else if (mtype == 'l')
+ ierr =
+ nc_def_var(ncid, cmor_vars[var_id].id, NC_INT,
+ cmor_vars[var_id].ndims, &nc_dim[0],
+ &nc_vars[cmor_vars[var_id].ndims]);
+ else if (mtype == 'i')
+ ierr =
+ nc_def_var(ncid, cmor_vars[var_id].id, NC_INT,
+ cmor_vars[var_id].ndims, &nc_dim[0],
+ &nc_vars[cmor_vars[var_id].ndims]);
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NetCDF Error (%i: %s) writing variable: %s (table: %s)",
+ ierr, nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
/* -------------------------------------------------------------------- */
/* Store the var id for reuse when writing */
/* over multiple call to cmor_write and for cmor_close */
/* -------------------------------------------------------------------- */
- cmor_vars[var_id].nc_var_id = nc_vars[cmor_vars[var_id].ndims];
+ cmor_vars[var_id].nc_var_id = nc_vars[cmor_vars[var_id].ndims];
- cmor_create_var_attributes(var_id, ncid, ncafid, nc_vars, nc_bnds_vars,
- nc_vars_af, nc_associated_vars, nc_singletons, nc_singletons_bnds,
- nc_zfactors, zfactors, nzfactors, nc_dim_chunking, outname);
+ cmor_create_var_attributes(var_id, ncid, ncafid, nc_vars, nc_bnds_vars,
+ nc_vars_af, nc_associated_vars,
+ nc_singletons, nc_singletons_bnds,
+ nc_zfactors, zfactors, nzfactors,
+ nc_dim_chunking, outname);
} else {
/* --------------------------------------------------------------------- */
/* Variable already been thru cmor_write, */
/* we just get the netcdf file id */
/* -------------------------------------------------------------------- */
- ncid = cmor_vars[refvarid].initialized;
+ ncid = cmor_vars[refvarid].initialized;
/* -------------------------------------------------------------------- */
/* generates a new unique id */
/* -------------------------------------------------------------------- */
- cmor_generate_uuid();
- cmor_get_cur_dataset_attribute( GLOBAL_ATT_TRACKING_ID, ctmp2 );
- ierr = nc_put_att_text( ncid, NC_GLOBAL, GLOBAL_ATT_TRACKING_ID,
- strlen(ctmp2), ctmp2 );
- if( ierr != NC_NOERR ) {
- snprintf( msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) for variable %s (table: %s)\n! "
- "writing global attribute: %s (%s)",
- ierr, nc_strerror( ierr ), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id,
- "tracking_id",
- (char *) ctmp2 );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ cmor_generate_uuid();
+ cmor_get_cur_dataset_attribute(GLOBAL_ATT_TRACKING_ID, ctmp2);
+ ierr = nc_put_att_text(ncid, NC_GLOBAL, GLOBAL_ATT_TRACKING_ID,
+ strlen(ctmp2), ctmp2);
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NetCDF error (%i: %s) for variable %s (table: %s)\n! "
+ "writing global attribute: %s (%s)",
+ ierr, nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ "tracking_id", (char *)ctmp2);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
/* -------------------------------------------------------------------- */
/* in case we are doing a zfactor var */
/* -------------------------------------------------------------------- */
- cmor_vars[var_id].time_nc_id = cmor_vars[refvarid].time_nc_id;
- cmor_vars[var_id].time_bnds_nc_id = cmor_vars[refvarid].time_bnds_nc_id;
+ cmor_vars[var_id].time_nc_id = cmor_vars[refvarid].time_nc_id;
+ cmor_vars[var_id].time_bnds_nc_id = cmor_vars[refvarid].time_bnds_nc_id;
}
/* -------------------------------------------------------------------- */
/* here we add the number of time */
/* written for the associated variable */
/* -------------------------------------------------------------------- */
- if( ( refvar != NULL ) && ( cmor_vars[refvarid].grid_id > -1 )
- && ( cmor_grids[cmor_vars[refvarid].grid_id].istimevarying == 1 ) ) {
- for( i = 0; i < 4; i++ ) {
- if( cmor_grids[cmor_vars[refvarid].grid_id].associated_variables
- [i] == var_id ) {
- if( cmor_vars[refvarid].ntimes_written_coords[i] == -1 ) {
- cmor_vars[refvarid].ntimes_written_coords[i] =
- ntimes_passed;
- } else {
- cmor_vars[refvarid].ntimes_written_coords[i] +=
- ntimes_passed;
- }
- }
- }
- }
- if( refvar != NULL ) {
- for( i = 0; i < 10; i++ ) {
- if( cmor_vars[*refvar].associated_ids[i] == var_id ) {
- if( cmor_vars[*refvar].ntimes_written_associated[i] == 0 ) {
- cmor_vars[*refvar].ntimes_written_associated[i] =
- ntimes_passed;
- } else {
- cmor_vars[*refvar].ntimes_written_associated[i] +=
- ntimes_passed;
- }
- }
- }
- }
- cmor_write_var_to_file( ncid, &cmor_vars[var_id], data, type,
- ntimes_passed, time_vals, time_bounds );
- cmor_pop_traceback( );
- return( 0 );
+ if ((refvar != NULL) && (cmor_vars[refvarid].grid_id > -1)
+ && (cmor_grids[cmor_vars[refvarid].grid_id].istimevarying == 1)) {
+ for (i = 0; i < 4; i++) {
+ if (cmor_grids[cmor_vars[refvarid].grid_id].associated_variables
+ [i] == var_id) {
+ if (cmor_vars[refvarid].ntimes_written_coords[i] == -1) {
+ cmor_vars[refvarid].ntimes_written_coords[i] =
+ ntimes_passed;
+ } else {
+ cmor_vars[refvarid].ntimes_written_coords[i] +=
+ ntimes_passed;
+ }
+ }
+ }
+ }
+ if (refvar != NULL) {
+ for (i = 0; i < 10; i++) {
+ if (cmor_vars[*refvar].associated_ids[i] == var_id) {
+ if (cmor_vars[*refvar].ntimes_written_associated[i] == 0) {
+ cmor_vars[*refvar].ntimes_written_associated[i] =
+ ntimes_passed;
+ } else {
+ cmor_vars[*refvar].ntimes_written_associated[i] +=
+ ntimes_passed;
+ }
+ }
+ }
+ }
+ cmor_write_var_to_file(ncid, &cmor_vars[var_id], data, type,
+ ntimes_passed, time_vals, time_bounds);
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_create_var_attributes() */
/************************************************************************/
void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
- int *nc_vars, int *nc_bnds_vars,
- int *nc_vars_af, int *nc_associated_vars,
- int *nc_singletons, int *nc_singletons_bnds,
- int *nc_zfactors, int *zfactors, int nzfactors,
- size_t *nc_dim_chunking, char *outname) {
+ int *nc_vars, int *nc_bnds_vars,
+ int *nc_vars_af, int *nc_associated_vars,
+ int *nc_singletons, int *nc_singletons_bnds,
+ int *nc_zfactors, int *zfactors, int nzfactors,
+ size_t * nc_dim_chunking, char *outname)
+{
size_t starts[2], counts[2];
- int i, j, k, l, ho;
+ int i, j, k, l, ho;
int ierr;
char msg[CMOR_MAX_STRING];
int nVarRefTblID = cmor_vars[var_id].ref_table_id;
@@ -4345,7 +4432,7 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
/* first of all we need to make sure it is not an empty attribute */
/* -------------------------------------------------------------------- */
if (cmor_has_variable_attribute(var_id, cmor_vars[var_id].attributes[j])
- != 0) {
+ != 0) {
/* -------------------------------------------------------------------- */
/* deleted attribute continue on */
/* -------------------------------------------------------------------- */
@@ -4356,41 +4443,45 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
/* ok we need to convert the string to a list of int */
/* -------------------------------------------------------------------- */
- ierr = cmor_convert_string_to_list(
- cmor_vars[var_id].attributes_values_char[j], 'i',
- (void *) &int_list, &nelts);
- ierr = nc_put_att_int(ncid, cmor_vars[var_id].nc_var_id,
- "flag_values", NC_INT, nelts, int_list);
+ ierr =
+ cmor_convert_string_to_list(cmor_vars[var_id].
+ attributes_values_char[j], 'i',
+ (void *)&int_list, &nelts);
+ ierr =
+ nc_put_att_int(ncid, cmor_vars[var_id].nc_var_id, "flag_values",
+ NC_INT, nelts, int_list);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) setting flags numerical\n! "
- "attribute on variable %s (table: %s)", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) setting flags numerical\n! "
+ "attribute on variable %s (table: %s)", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
free(int_list);
} else if (cmor_vars[var_id].attributes_type[j] == 'c') {
ierr = cmor_put_nc_char_attribute(ncid,
- cmor_vars[var_id].nc_var_id,
- cmor_vars[var_id].attributes[j],
- cmor_vars[var_id].attributes_values_char[j],
- cmor_vars[var_id].id);
+ cmor_vars[var_id].nc_var_id,
+ cmor_vars[var_id].attributes[j],
+ cmor_vars[var_id].
+ attributes_values_char[j],
+ cmor_vars[var_id].id);
} else {
ierr = cmor_put_nc_num_attribute(ncid,
-
- cmor_vars[var_id].nc_var_id,
- cmor_vars[var_id].attributes[j],
- cmor_vars[var_id].attributes_type[j],
- cmor_vars[var_id].attributes_values_num[j],
- cmor_vars[var_id].id);
+ cmor_vars[var_id].nc_var_id,
+ cmor_vars[var_id].attributes[j],
+ cmor_vars[var_id].
+ attributes_type[j],
+ cmor_vars[var_id].
+ attributes_values_num[j],
+ cmor_vars[var_id].id);
}
}
if ((CMOR_NETCDF_MODE != CMOR_REPLACE_3)
- && (CMOR_NETCDF_MODE != CMOR_PRESERVE_3)
- && (CMOR_NETCDF_MODE != CMOR_APPEND_3)) {
+ && (CMOR_NETCDF_MODE != CMOR_PRESERVE_3)
+ && (CMOR_NETCDF_MODE != CMOR_APPEND_3)) {
/* -------------------------------------------------------------------- */
/* Compression stuff */
/* -------------------------------------------------------------------- */
@@ -4401,16 +4492,15 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
ics = pVar->shuffle;
icd = pVar->deflate;
icdl = pVar->deflate_level;
- ierr = nc_def_var_deflate(ncid, pVar->nc_var_id, ics, icd,
- icdl);
+ ierr = nc_def_var_deflate(ncid, pVar->nc_var_id, ics, icd, icdl);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) defining compression\n! "
- "parameters for variable '%s' (table: %s)", ierr,
- nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) defining compression\n! "
+ "parameters for variable '%s' (table: %s)", ierr,
+ nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
/* -------------------------------------------------------------------- */
/* Chunking stuff */
@@ -4419,26 +4509,25 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
#ifndef NC_CHUNKED
#define NC_CHUNKED 0
#endif
- size_t nc_dim_chunking[cmor_vars[var_id].ndims];
- bChunk = cmor_set_chunking(var_id, nVarRefTblID,
- nc_dim_chunking);
- if (bChunk != -1
- && (!((cmor_vars[var_id].grid_id > -1)
- && (cmor_grids[cmor_vars[var_id].grid_id].istimevarying == 1)))) {
- ierr = nc_def_var_chunking(ncid, cmor_vars[var_id].nc_var_id,
- NC_CHUNKED, &nc_dim_chunking[0]);
+ size_t nc_dim_chunking[cmor_vars[var_id].ndims];
+ bChunk = cmor_set_chunking(var_id, nVarRefTblID, nc_dim_chunking);
+ if (bChunk != -1 && (!((cmor_vars[var_id].grid_id > -1)
+ && (cmor_grids[cmor_vars[var_id].grid_id].
+ istimevarying == 1)))) {
+ ierr =
+ nc_def_var_chunking(ncid, cmor_vars[var_id].nc_var_id, NC_CHUNKED,
+ &nc_dim_chunking[0]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) defining chunking\n! "
- "parameters for variable '%s' (table: %s)",
- ierr, nc_strerror(ierr), cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) defining chunking\n! "
+ "parameters for variable '%s' (table: %s)",
+ ierr, nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
}
-
/* -------------------------------------------------------------------- */
/* Done with NetCDF file definitions */
/* -------------------------------------------------------------------- */
@@ -4446,17 +4535,17 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
ierr = nc_enddef(ncid);
if (ierr != NC_NOERR && ierr != NC_ENOTINDEFINE) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) leaving definition mode for file %s",
- ierr, nc_strerror(ierr), outname);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) leaving definition mode for file %s",
+ ierr, nc_strerror(ierr), outname);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
ierr = nc_enddef(ncafid);
if (ierr != NC_NOERR && ierr != NC_ENOTINDEFINE) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) leaving definition mode for metafile %s",
- ierr, nc_strerror(ierr),
- cmor_current_dataset.associated_file_name);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) leaving definition mode for metafile %s",
+ ierr, nc_strerror(ierr),
+ cmor_current_dataset.associated_file_name);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
/* -------------------------------------------------------------------- */
@@ -4473,12 +4562,11 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
/* we only need to do this if ho != hi */
/* -------------------------------------------------------------------- */
if (cmor_axes[cmor_vars[var_id].axes_ids[i]].hybrid_out
- != cmor_axes[cmor_vars[var_id].axes_ids[i]].hybrid_in) {
+ != cmor_axes[cmor_vars[var_id].axes_ids[i]].hybrid_in) {
ho = 0;
if (cmor_axes[cmor_vars[var_id].axes_ids[i]].hybrid_out != 0) {
ho = cmor_axes[cmor_vars[var_id].axes_ids[i]].hybrid_out;
- } else if (cmor_axes[cmor_vars[var_id].axes_ids[i]].hybrid_in
- != 0) {
+ } else if (cmor_axes[cmor_vars[var_id].axes_ids[i]].hybrid_in != 0) {
ho = cmor_axes[cmor_vars[var_id].axes_ids[i]].hybrid_in;
}
if (ho != 0) {
@@ -4495,25 +4583,25 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
k = -1;
for (j = 0; j <= cmor_nvars; j++)
if ((strcmp(cmor_vars[j].id, "a") == 0)
- && (cmor_vars[j].zaxis
- == cmor_vars[var_id].axes_ids[i])) {
+ && (cmor_vars[j].zaxis
+ == cmor_vars[var_id].axes_ids[i])) {
k = j;
break;
}
if (k == -1) {
snprintf(msg, CMOR_MAX_STRING,
- "could not find 'a' coeff for axis: %s,\n! "
- "for variable %s (table: %s)",
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "could not find 'a' coeff for axis: %s,\n! "
+ "for variable %s (table: %s)",
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
for (j = 0;
- j < cmor_axes[cmor_vars[var_id].axes_ids[i]].length;
- j++)
+ j < cmor_axes[cmor_vars[var_id].axes_ids[i]].length;
+ j++)
cmor_axes[cmor_vars[var_id].axes_ids[i]].values[j] =
- cmor_vars[k].values[j];
+ cmor_vars[k].values[j];
/* -------------------------------------------------------------------- */
/* look for b coeff */
/* -------------------------------------------------------------------- */
@@ -4521,25 +4609,25 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
k = -1;
for (j = 0; j <= cmor_nvars; j++)
if ((strcmp(cmor_vars[j].id, "b") == 0)
- && (cmor_vars[j].zaxis
- == cmor_vars[var_id].axes_ids[i])) {
+ && (cmor_vars[j].zaxis
+ == cmor_vars[var_id].axes_ids[i])) {
k = j;
break;
}
if (k == -1) {
snprintf(msg, CMOR_MAX_STRING,
- "could find 'b' coeff for axis: %s,\n! "
- "for variable %s (table: %s)",
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "could find 'b' coeff for axis: %s,\n! "
+ "for variable %s (table: %s)",
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
for (j = 0;
- j < cmor_axes[cmor_vars[var_id].axes_ids[i]].length;
- j++) {
+ j < cmor_axes[cmor_vars[var_id].axes_ids[i]].length;
+ j++) {
cmor_axes[cmor_vars[var_id].axes_ids[i]].values[j] +=
- cmor_vars[k].values[j];
+ cmor_vars[k].values[j];
}
/* -------------------------------------------------------------------- */
/* do we have bounds to treat as well? */
@@ -4549,49 +4637,49 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
k = -1;
for (j = 0; j <= cmor_nvars; j++)
if ((strcmp(cmor_vars[j].id, "a_bnds") == 0)
- && (cmor_vars[j].zaxis
- == cmor_vars[var_id].axes_ids[i])) {
+ && (cmor_vars[j].zaxis
+ == cmor_vars[var_id].axes_ids[i])) {
k = j;
break;
}
if (k == -1) {
snprintf(msg, CMOR_MAX_STRING,
- "could not find 'a_bnds' coeff for\n! "
- "axis: %s, for variable %s (table: %s)",
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "could not find 'a_bnds' coeff for\n! "
+ "axis: %s, for variable %s (table: %s)",
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ id, cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
for (j = 0;
- j
- < cmor_axes[cmor_vars[var_id].axes_ids[i]].length
- * 2; j++)
+ j
+ < cmor_axes[cmor_vars[var_id].axes_ids[i]].length
+ * 2; j++)
cmor_axes[cmor_vars[var_id].axes_ids[i]].bounds[j] =
- cmor_vars[k].values[j];
+ cmor_vars[k].values[j];
k = -1;
for (j = 0; j <= cmor_nvars; j++)
if ((strcmp(cmor_vars[j].id, "b_bnds") == 0)
- && (cmor_vars[j].zaxis
- == cmor_vars[var_id].axes_ids[i])) {
+ && (cmor_vars[j].zaxis
+ == cmor_vars[var_id].axes_ids[i])) {
k = j;
break;
}
if (k == -1) {
snprintf(msg, CMOR_MAX_STRING,
- "could find 'b_bnds' coef for axis:\n! "
- " %s, for variable %s (table: %s)",
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "could find 'b_bnds' coef for axis:\n! "
+ " %s, for variable %s (table: %s)",
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ id, cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
for (j = 0;
- j
- < cmor_axes[cmor_vars[var_id].axes_ids[i]].length
- * 2; j++)
- cmor_axes[cmor_vars[var_id].axes_ids[i]].bounds[j] +=
- cmor_vars[k].values[j];
+ j
+ < cmor_axes[cmor_vars[var_id].axes_ids[i]].length
+ * 2; j++)
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ bounds[j] += cmor_vars[k].values[j];
}
cmor_flip_hybrid(var_id, i, "a", "b", "a_bnds", "b_bnds");
/* -------------------------------------------------------------------- */
@@ -4604,50 +4692,50 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
k = -1;
for (j = 0; j <= cmor_nvars; j++)
if ((strcmp(cmor_vars[j].id, "ap") == 0)
- && (cmor_vars[j].zaxis
- == cmor_vars[var_id].axes_ids[i])) {
+ && (cmor_vars[j].zaxis
+ == cmor_vars[var_id].axes_ids[i])) {
k = j;
break;
}
if (k == -1) {
snprintf(msg, CMOR_MAX_STRING,
- "could not find 'ap' coeff for axis:\n! "
- "%s, for variable %s (table: %s)",
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "could not find 'ap' coeff for axis:\n! "
+ "%s, for variable %s (table: %s)",
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
for (j = 0;
- j < cmor_axes[cmor_vars[var_id].axes_ids[i]].length;
- j++)
+ j < cmor_axes[cmor_vars[var_id].axes_ids[i]].length;
+ j++)
cmor_axes[cmor_vars[var_id].axes_ids[i]].values[j] =
- cmor_vars[k].values[j] / cmor_vars[l].values[0];
+ cmor_vars[k].values[j] / cmor_vars[l].values[0];
/* -------------------------------------------------------------------- */
/* look for b coeff */
/* -------------------------------------------------------------------- */
k = -1;
for (j = 0; j <= cmor_nvars; j++)
if ((strcmp(cmor_vars[j].id, "b") == 0)
- && (cmor_vars[j].zaxis
- == cmor_vars[var_id].axes_ids[i])) {
+ && (cmor_vars[j].zaxis
+ == cmor_vars[var_id].axes_ids[i])) {
k = j;
break;
}
if (k == -1) {
snprintf(msg, CMOR_MAX_STRING,
- "could find 'b' coef for axis: %s,\n! "
- "for variable %s (table: %s)",
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "could find 'b' coef for axis: %s,\n! "
+ "for variable %s (table: %s)",
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
for (j = 0;
- j < cmor_axes[cmor_vars[var_id].axes_ids[i]].length;
- j++)
+ j < cmor_axes[cmor_vars[var_id].axes_ids[i]].length;
+ j++)
cmor_axes[cmor_vars[var_id].axes_ids[i]].values[j] +=
- cmor_vars[k].values[j];
+ cmor_vars[k].values[j];
/* -------------------------------------------------------------------- */
/* deals with bounds */
@@ -4657,51 +4745,51 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
k = -1;
for (j = 0; j <= cmor_nvars; j++)
if ((strcmp(cmor_vars[j].id, "ap_bnds") == 0)
- && (cmor_vars[j].zaxis
- == cmor_vars[var_id].axes_ids[i])) {
+ && (cmor_vars[j].zaxis
+ == cmor_vars[var_id].axes_ids[i])) {
k = j;
break;
}
if (k == -1) {
snprintf(msg, CMOR_MAX_STRING,
- "could not find 'ap_bnds' coeff for\n! "
- "axis: %s, for variable %s\n! "
- "(table: %s)",
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "could not find 'ap_bnds' coeff for\n! "
+ "axis: %s, for variable %s\n! "
+ "(table: %s)",
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ id, cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
for (j = 0;
- j
- < cmor_axes[cmor_vars[var_id].axes_ids[i]].length
- * 2; j++)
+ j
+ < cmor_axes[cmor_vars[var_id].axes_ids[i]].length
+ * 2; j++)
cmor_axes[cmor_vars[var_id].axes_ids[i]].bounds[j] =
- cmor_vars[k].values[j]
- / cmor_vars[l].values[0];
+ cmor_vars[k].values[j]
+ / cmor_vars[l].values[0];
k = -1;
for (j = 0; j <= cmor_nvars; j++)
if ((strcmp(cmor_vars[j].id, "b_bnds") == 0)
- && (cmor_vars[j].zaxis
- == cmor_vars[var_id].axes_ids[i])) {
+ && (cmor_vars[j].zaxis
+ == cmor_vars[var_id].axes_ids[i])) {
k = j;
break;
}
if (k == -1) {
snprintf(msg, CMOR_MAX_STRING,
- "could find 'b_bnds' coef for axis:\n! "
- "%s, for variable %s (table: %s)",
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "could find 'b_bnds' coef for axis:\n! "
+ "%s, for variable %s (table: %s)",
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ id, cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
for (j = 0;
- j
- < cmor_axes[cmor_vars[var_id].axes_ids[i]].length
- * 2; j++)
- cmor_axes[cmor_vars[var_id].axes_ids[i]].bounds[j] +=
- cmor_vars[k].values[j];
+ j
+ < cmor_axes[cmor_vars[var_id].axes_ids[i]].length
+ * 2; j++)
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ bounds[j] += cmor_vars[k].values[j];
}
cmor_flip_hybrid(var_id, i, "ap", "b", "ap_bnds", "b_bnds");
/* -------------------------------------------------------------------- */
@@ -4711,25 +4799,25 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
k = -1;
for (j = 0; j <= cmor_nvars; j++)
if ((strcmp(cmor_vars[j].id, "sigma") == 0)
- && (cmor_vars[j].zaxis
- == cmor_vars[var_id].axes_ids[i])) {
+ && (cmor_vars[j].zaxis
+ == cmor_vars[var_id].axes_ids[i])) {
k = j;
break;
}
if (k == -1) {
snprintf(msg, CMOR_MAX_STRING,
- "could not find 'sigma' coeff for axis:\n! "
- "%s, for variable %s (table: %s)",
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "could not find 'sigma' coeff for axis:\n! "
+ "%s, for variable %s (table: %s)",
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
for (j = 0;
- j < cmor_axes[cmor_vars[var_id].axes_ids[i]].length;
- j++)
+ j < cmor_axes[cmor_vars[var_id].axes_ids[i]].length;
+ j++)
cmor_axes[cmor_vars[var_id].axes_ids[i]].values[j] =
- cmor_vars[k].values[j];
+ cmor_vars[k].values[j];
/* -------------------------------------------------------------------- */
/* deals with bounds */
/* -------------------------------------------------------------------- */
@@ -4738,26 +4826,26 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
k = -1;
for (j = 0; j <= cmor_nvars; j++)
if ((strcmp(cmor_vars[j].id, "sigma_bnds") == 0)
- && (cmor_vars[j].zaxis
- == cmor_vars[var_id].axes_ids[i])) {
+ && (cmor_vars[j].zaxis
+ == cmor_vars[var_id].axes_ids[i])) {
k = j;
break;
}
if (k == -1) {
snprintf(msg, CMOR_MAX_STRING,
- "could not find 'sigma_bnds' coeff\n! "
- "for axis: %s, for variable %s (table: %s)",
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "could not find 'sigma_bnds' coeff\n! "
+ "for axis: %s, for variable %s (table: %s)",
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ id, cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
for (j = 0;
- j
- < cmor_axes[cmor_vars[var_id].axes_ids[i]].length
- * 2; j++)
+ j
+ < cmor_axes[cmor_vars[var_id].axes_ids[i]].length
+ * 2; j++)
cmor_axes[cmor_vars[var_id].axes_ids[i]].bounds[j] =
- cmor_vars[k].values[j];
+ cmor_vars[k].values[j];
}
}
cmor_flip_hybrid(var_id, i, "sigma", NULL, "sigma_bnds", NULL);
@@ -4766,67 +4854,72 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
if (cmor_axes[cmor_vars[var_id].axes_ids[i]].cvalues == NULL) {
if (cmor_axes[cmor_vars[var_id].axes_ids[i]].store_in_netcdf == 1) {
ierr = nc_put_var_double(ncid, nc_vars[i],
- cmor_axes[cmor_vars[var_id].axes_ids[i]].values);
+ cmor_axes[cmor_vars[var_id].
+ axes_ids[i]].values);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) writing axis '%s'\n! "
- "values for variable %s (table: %s)", ierr,
- nc_strerror(ierr),
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) writing axis '%s'\n! "
+ "values for variable %s (table: %s)", ierr,
+ nc_strerror(ierr),
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
if (ncid != ncafid) {
ierr = nc_put_var_double(ncafid, nc_vars_af[i],
- cmor_axes[cmor_vars[var_id].axes_ids[i]].values);
+ cmor_axes[cmor_vars[var_id].
+ axes_ids[i]].values);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) writing axis '%s'\n! "
- "values to metafile, for variable %s "
- "(table: %s)", ierr, nc_strerror(ierr),
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) writing axis '%s'\n! "
+ "values to metafile, for variable %s "
+ "(table: %s)", ierr, nc_strerror(ierr),
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
}
} else {
for (j = 0; j < cmor_axes[cmor_vars[var_id].axes_ids[i]].length;
- j++) {
+ j++) {
starts[0] = j;
starts[1] = 0;
counts[0] = 1;
- counts[1] = strlen(
- cmor_axes[cmor_vars[var_id].axes_ids[i]].cvalues[j]);
- ierr = nc_put_vara_text(ncid, nc_vars[i], starts, counts,
- cmor_axes[cmor_vars[var_id].axes_ids[i]].cvalues[j]);
+ counts[1] =
+ strlen(cmor_axes[cmor_vars[var_id].axes_ids[i]].cvalues[j]);
+ ierr =
+ nc_put_vara_text(ncid, nc_vars[i], starts, counts,
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ cvalues[j]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) writing axis '%s'\n! "
- "value number %d (%s), for variable %s "
- "(table: %s)", ierr, nc_strerror(ierr),
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id, j,
- cmor_axes[cmor_vars[var_id].axes_ids[i]].cvalues[j],
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) writing axis '%s'\n! "
+ "value number %d (%s), for variable %s "
+ "(table: %s)", ierr, nc_strerror(ierr),
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id, j,
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ cvalues[j], cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
if (ncid != ncafid) {
ierr =
- nc_put_vara_text(ncafid, nc_vars_af[i], starts,
- counts,
- cmor_axes[cmor_vars[var_id].axes_ids[i]].cvalues[j]);
+ nc_put_vara_text(ncafid, nc_vars_af[i], starts,
+ counts,
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ cvalues[j]);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) writing axis '%s'\n! "
- "values to metafile, for variable %s\n! "
- "(table: %s)", ierr, nc_strerror(ierr),
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) writing axis '%s'\n! "
+ "values to metafile, for variable %s\n! "
+ "(table: %s)", ierr, nc_strerror(ierr),
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
}
@@ -4836,17 +4929,18 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
/* -------------------------------------------------------------------- */
if (cmor_axes[cmor_vars[var_id].axes_ids[i]].bounds != NULL) {
ierr = nc_put_var_double(ncafid, nc_bnds_vars[i],
- cmor_axes[cmor_vars[var_id].axes_ids[i]].bounds);
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ bounds);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NC error (%i: %s) on variable %s writing\n! "
- "bounds for dim %i (%s), for variable %s\n! "
- "(table: %s)", ierr, nc_strerror(ierr),
- cmor_vars[var_id].id, i,
- cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NC error (%i: %s) on variable %s writing\n! "
+ "bounds for dim %i (%s), for variable %s\n! "
+ "(table: %s)", ierr, nc_strerror(ierr),
+ cmor_vars[var_id].id, i,
+ cmor_axes[cmor_vars[var_id].axes_ids[i]].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
}
@@ -4858,32 +4952,36 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
if (cmor_grids[cmor_vars[var_id].grid_id].istimevarying == 0) {
for (i = 0; i < 4; i++) {
j =
- cmor_grids[cmor_vars[var_id].grid_id].associated_variables[i];
- if (j != -1) { /* we need to write this variable */
+ cmor_grids[cmor_vars[var_id].grid_id].associated_variables[i];
+ if (j != -1) { /* we need to write this variable */
cmor_vars[j].nc_var_id = nc_associated_vars[i];
switch (i) {
- case (0):
- cmor_write_var_to_file(ncafid, &cmor_vars[j],
- cmor_grids[cmor_vars[var_id].grid_id].lats, 'd',
- 0, NULL, NULL);
- break;
- case (1):
- cmor_write_var_to_file(ncafid, &cmor_vars[j],
- cmor_grids[cmor_vars[var_id].grid_id].lons, 'd',
- 0, NULL, NULL);
- break;
- case (2):
- cmor_write_var_to_file(ncafid, &cmor_vars[j],
- cmor_grids[cmor_vars[var_id].grid_id].blats,
- 'd', 0, NULL, NULL);
- break;
- case (3):
- cmor_write_var_to_file(ncafid, &cmor_vars[j],
- cmor_grids[cmor_vars[var_id].grid_id].blons,
- 'd', 0, NULL, NULL);
- break;
- default:
- break;
+ case (0):
+ cmor_write_var_to_file(ncafid, &cmor_vars[j],
+ cmor_grids[cmor_vars[var_id].
+ grid_id].lats, 'd',
+ 0, NULL, NULL);
+ break;
+ case (1):
+ cmor_write_var_to_file(ncafid, &cmor_vars[j],
+ cmor_grids[cmor_vars[var_id].
+ grid_id].lons, 'd',
+ 0, NULL, NULL);
+ break;
+ case (2):
+ cmor_write_var_to_file(ncafid, &cmor_vars[j],
+ cmor_grids[cmor_vars[var_id].
+ grid_id].blats, 'd',
+ 0, NULL, NULL);
+ break;
+ case (3):
+ cmor_write_var_to_file(ncafid, &cmor_vars[j],
+ cmor_grids[cmor_vars[var_id].
+ grid_id].blons, 'd',
+ 0, NULL, NULL);
+ break;
+ default:
+ break;
}
}
}
@@ -4901,7 +4999,8 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
if (cmor_vars[zfactors[i]].values != NULL) {
cmor_vars[zfactors[i]].nc_var_id = nc_zfactors[i];
cmor_write_var_to_file(ncafid, &cmor_vars[zfactors[i]],
- cmor_vars[zfactors[i]].values, 'd', 0, NULL, NULL);
+ cmor_vars[zfactors[i]].values, 'd', 0, NULL,
+ NULL);
}
}
/* -------------------------------------------------------------------- */
@@ -4918,36 +5017,37 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
if (j != -1) {
if (cmor_tables[nRefAxTableID].axes[nRefAxisID].type == 'c') {
ierr = nc_put_var_text(ncid, nc_singletons[i],
- cmor_tables[nRefAxTableID].axes[nRefAxisID].cvalue);
+ cmor_tables[nRefAxTableID].
+ axes[nRefAxisID].cvalue);
} else {
ierr = nc_put_var_double(ncid, nc_singletons[i],
- cmor_axes[j].values);
+ cmor_axes[j].values);
}
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) writing scalar variable\n! "
- "%s for variable %s (table: %s), value: %lf",
- ierr, nc_strerror(ierr), cmor_axes[j].id,
- cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id,
- cmor_axes[j].values[0]);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) writing scalar variable\n! "
+ "%s for variable %s (table: %s), value: %lf",
+ ierr, nc_strerror(ierr), cmor_axes[j].id,
+ cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ cmor_axes[j].values[0]);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
/* -------------------------------------------------------------------- */
/* now see if we need bounds */
/* -------------------------------------------------------------------- */
if (cmor_axes[j].bounds != NULL) {
ierr = nc_put_var_double(ncid, nc_singletons_bnds[i],
- cmor_axes[j].bounds);
+ cmor_axes[j].bounds);
if (ierr != NC_NOERR) {
snprintf(msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) writing scalar bounds\n! "
- "variable %s for variable %s (table: %s),\n! "
- "values: %lf, %lf", ierr, nc_strerror(ierr),
- cmor_axes[j].id, cmor_vars[var_id].id,
- cmor_tables[nVarRefTblID].szTable_id,
- cmor_axes[j].bounds[0], cmor_axes[j].bounds[1]);
- cmor_handle_error(msg, CMOR_CRITICAL);
+ "NetCDF Error (%i: %s) writing scalar bounds\n! "
+ "variable %s for variable %s (table: %s),\n! "
+ "values: %lf, %lf", ierr, nc_strerror(ierr),
+ cmor_axes[j].id, cmor_vars[var_id].id,
+ cmor_tables[nVarRefTblID].szTable_id,
+ cmor_axes[j].bounds[0], cmor_axes[j].bounds[1]);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
}
@@ -4955,11 +5055,13 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid,
cmor_current_dataset.associate_file = ncafid;
cmor_pop_traceback();
}
+
/************************************************************************/
/* cmor_CreateFromTemplate() */
/************************************************************************/
int cmor_CreateFromTemplate(int nVarRefTblID, char *template,
- char *szJoin, char *separator ){
+ char *szJoin, char *separator)
+{
char *szToken;
char *szFirstItem;
char tmp[CMOR_MAX_STRING];
@@ -4969,7 +5071,7 @@ int cmor_CreateFromTemplate(int nVarRefTblID, char *template,
pTable = &cmor_tables[nVarRefTblID];
- cmor_add_traceback( "cmor_CreateFromTemplate" );
+ cmor_add_traceback("cmor_CreateFromTemplate");
cmor_is_setup();
strcpy(path_template, template);
@@ -4979,25 +5081,25 @@ int cmor_CreateFromTemplate(int nVarRefTblID, char *template,
/* -------------------------------------------------------------------- */
szToken = strtok(path_template, GLOBAL_SEPARATORS);
int optional = 0;
- while(szToken) {
+ while (szToken) {
/* -------------------------------------------------------------------- */
/* Is this an optional token. */
/* -------------------------------------------------------------------- */
- if(strncmp(szToken, GLOBAL_OPENOPTIONAL, 1) == 0 ) {
+ if (strncmp(szToken, GLOBAL_OPENOPTIONAL, 1) == 0) {
optional = 1;
- } else if(strncmp(szToken, GLOBAL_CLOSEOPTIONAL, 1) == 0 ) {
+ } else if (strncmp(szToken, GLOBAL_CLOSEOPTIONAL, 1) == 0) {
optional = 0;
/* -------------------------------------------------------------------- */
/* This token must be a global attribute, a table header attribute */
/* or an internal attribute. Otherwise we just skip it and the */
/* user get a warning. */
/* -------------------------------------------------------------------- */
- } else if( cmor_has_cur_dataset_attribute( szToken ) == 0 ) {
- cmor_get_cur_dataset_attribute( szToken, tmp );
+ } else if (cmor_has_cur_dataset_attribute(szToken) == 0) {
+ cmor_get_cur_dataset_attribute(szToken, tmp);
szFirstItem = strstr(tmp, " ");
- if( szFirstItem != NULL ) {
+ if (szFirstItem != NULL) {
/* -------------------------------------------------------------------- */
/* Copy only the first characters before " " for multiple words token */
/* -------------------------------------------------------------------- */
@@ -5007,38 +5109,37 @@ int cmor_CreateFromTemplate(int nVarRefTblID, char *template,
}
strcat(szJoin, separator);
- } else if (cmor_get_table_attr(szToken, pTable, tmp ) == 0 ){
+ } else if (cmor_get_table_attr(szToken, pTable, tmp) == 0) {
strncat(szJoin, tmp, CMOR_MAX_STRING);
strcat(szJoin, separator);
- } else if( strcmp(szToken, OUTPUT_TEMPLATE_RIPF) == 0) {
+ } else if (strcmp(szToken, OUTPUT_TEMPLATE_RIPF) == 0) {
rc = cmor_addRIPF(szJoin);
- if(!rc) {
- return(rc);
+ if (!rc) {
+ return (rc);
}
strcat(szJoin, separator);
- } else if(strcmp(szToken, GLOBAL_ATT_VARIABLE_ID) == 0) {
+ } else if (strcmp(szToken, GLOBAL_ATT_VARIABLE_ID) == 0) {
strncat(szJoin, szToken, CMOR_MAX_STRING);
strcat(szJoin, separator);
- // check if attribute start with '_"
+ // check if attribute start with '_"
} else {
char szInternalAtt[CMOR_MAX_STRING];
strcpy(szInternalAtt, GLOBAL_INTERNAL);
strncat(szInternalAtt, szToken, strlen(szToken));
- if( cmor_has_cur_dataset_attribute( szInternalAtt ) == 0 ) {
- cmor_get_cur_dataset_attribute( szInternalAtt, tmp );
- if( !optional) {
- strncat(szJoin,tmp,CMOR_MAX_STRING);
- strcat(szJoin, separator );
- }
- else {
+ if (cmor_has_cur_dataset_attribute(szInternalAtt) == 0) {
+ cmor_get_cur_dataset_attribute(szInternalAtt, tmp);
+ if (!optional) {
+ strncat(szJoin, tmp, CMOR_MAX_STRING);
+ strcat(szJoin, separator);
+ } else {
/* -------------------------------------------------------------------- */
/* Skip "no-driver for filename if optional is set to 1 */
/* -------------------------------------------------------------------- */
- if(strcmp(tmp, GLOBAL_ATT_VAL_NODRIVER)!=0) {
- strncat(szJoin,tmp,CMOR_MAX_STRING);
- strcat(szJoin, separator );
+ if (strcmp(tmp, GLOBAL_ATT_VAL_NODRIVER) != 0) {
+ strncat(szJoin, tmp, CMOR_MAX_STRING);
+ strcat(szJoin, separator);
}
}
@@ -5046,7 +5147,7 @@ int cmor_CreateFromTemplate(int nVarRefTblID, char *template,
/* Just Copy the token without a separator */
/* -------------------------------------------------------------------- */
} else {
- strncat(szJoin,szToken,CMOR_MAX_STRING);
+ strncat(szJoin, szToken, CMOR_MAX_STRING);
}
}
@@ -5055,38 +5156,42 @@ int cmor_CreateFromTemplate(int nVarRefTblID, char *template,
/* -------------------------------------------------------------------- */
/* If the last character is the separator delete it. */
/* -------------------------------------------------------------------- */
- if( strcmp( &szJoin[ strlen( szJoin ) - 1 ], separator ) == 0 ) {
- szJoin[ strlen( szJoin ) - 1 ] = '\0';
+ if (strcmp(&szJoin[strlen(szJoin) - 1], separator) == 0) {
+ szJoin[strlen(szJoin) - 1] = '\0';
}
- cmor_pop_traceback( );
+ cmor_pop_traceback();
return (0);
}
+
/************************************************************************/
/* cmor_addVersion() */
/************************************************************************/
-int cmor_addVersion(){
+int cmor_addVersion()
+{
time_t t;
- struct tm* tm;
+ struct tm *tm;
char szVersion[CMOR_MAX_STRING];;
char szDate[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_addVersion" );
+ cmor_add_traceback("cmor_addVersion");
cmor_is_setup();
time(&t);
tm = localtime(&t);
- strcpy(szVersion,"v");
+ strcpy(szVersion, "v");
strftime(szDate, CMOR_MAX_STRING, "%Y%m%d", tm);
strcat(szVersion, szDate);
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_VERSION, szVersion, 1);
cmor_pop_traceback();
- return(0);
+ return (0);
}
+
/************************************************************************/
/* cmor_addRIPF() */
/************************************************************************/
-int cmor_addRIPF(char *variant) {
+int cmor_addRIPF(char *variant)
+{
char tmp[CMOR_MAX_STRING];
int realization_index;
int initialization_index;
@@ -5094,13 +5199,13 @@ int cmor_addRIPF(char *variant) {
int forcing_index;
int reti;
regex_t regex;
- int ierr=0;
+ int ierr = 0;
char szValue[CMOR_MAX_STRING];
char szVariant[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_addRipf" );
+ cmor_add_traceback("cmor_addRipf");
cmor_is_setup();
reti = regcomp(®ex, "^[[:digit:]]\\{1,\\}$", 0);
@@ -5109,23 +5214,22 @@ int cmor_addRIPF(char *variant) {
/* -------------------------------------------------------------------- */
if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_REALIZATION) == 0) {
cmor_get_cur_dataset_attribute(GLOBAL_ATT_REALIZATION, tmp);
- if(strlen(tmp) > 4) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your realization_index \"%s\" is invalid. \n! "
- "It cannot contains more than 4 digits. \n! ",
- tmp );
- cmor_handle_error( msg, CMOR_NORMAL );
- ierr+=-1;
+ if (strlen(tmp) > 4) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your realization_index \"%s\" is invalid. \n! "
+ "It cannot contains more than 4 digits. \n! ", tmp);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ ierr += -1;
}
- reti = regexec(®ex, tmp , 0, NULL, 0);
- if(reti) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your realization_index \"%s\" is invalid. \n! "
- "It must contain only characters between 0 and 9 \n!",
- tmp );
- cmor_handle_error( msg, CMOR_NORMAL );
- ierr+=-1;
+ reti = regexec(®ex, tmp, 0, NULL, 0);
+ if (reti) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your realization_index \"%s\" is invalid. \n! "
+ "It must contain only characters between 0 and 9 \n!",
+ tmp);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ ierr += -1;
}
sscanf(tmp, "%d", &realization_index);
@@ -5137,23 +5241,22 @@ int cmor_addRIPF(char *variant) {
/* -------------------------------------------------------------------- */
if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_INITIA_IDX) == 0) {
cmor_get_cur_dataset_attribute(GLOBAL_ATT_INITIA_IDX, tmp);
- if(strlen(tmp) > 4) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your initialization_index \"%s\" is invalid. \n! "
- "It cannot contains more than 4 digits. \n! ",
- tmp );
- cmor_handle_error( msg, CMOR_NORMAL );
- ierr+=-1;
+ if (strlen(tmp) > 4) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your initialization_index \"%s\" is invalid. \n! "
+ "It cannot contains more than 4 digits. \n! ", tmp);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ ierr += -1;
}
- reti = regexec(®ex, tmp , 0, NULL, 0);
- if(reti) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your initialization_index \"%s\" is invalid. \n! "
- "It must contain only characters between 0 and 9 \n!",
- tmp );
- cmor_handle_error( msg, CMOR_NORMAL );
- ierr+=-1;
+ reti = regexec(®ex, tmp, 0, NULL, 0);
+ if (reti) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your initialization_index \"%s\" is invalid. \n! "
+ "It must contain only characters between 0 and 9 \n!",
+ tmp);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ ierr += -1;
}
sscanf(tmp, "%d", &initialization_index);
@@ -5166,24 +5269,22 @@ int cmor_addRIPF(char *variant) {
/* -------------------------------------------------------------------- */
if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_PHYSICS_IDX) == 0) {
cmor_get_cur_dataset_attribute(GLOBAL_ATT_PHYSICS_IDX, tmp);
- if(strlen(tmp) > 4) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your physics_index \"%s\" is invalid. \n! "
- "It cannot contains more than 4 digits. \n! ",
- tmp );
- cmor_handle_error( msg, CMOR_NORMAL );
- ierr+=-1;
-
+ if (strlen(tmp) > 4) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your physics_index \"%s\" is invalid. \n! "
+ "It cannot contains more than 4 digits. \n! ", tmp);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ ierr += -1;
}
- reti = regexec(®ex, tmp , 0, NULL, 0);
- if(reti) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your physics_index \"%s\" is invalid. \n! "
- "It must contain only characters between 0 and 9 \n!",
- tmp );
- cmor_handle_error( msg, CMOR_NORMAL );
- ierr+=-1;
+ reti = regexec(®ex, tmp, 0, NULL, 0);
+ if (reti) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your physics_index \"%s\" is invalid. \n! "
+ "It must contain only characters between 0 and 9 \n!",
+ tmp);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ ierr += -1;
}
sscanf(tmp, "%d", &physics_index);
@@ -5195,24 +5296,22 @@ int cmor_addRIPF(char *variant) {
/* -------------------------------------------------------------------- */
if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_FORCING_IDX) == 0) {
cmor_get_cur_dataset_attribute(GLOBAL_ATT_FORCING_IDX, tmp);
- if(strlen(tmp) > 4) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your forcing_index \"%s\" is invalid. \n! "
- "It cannot contains more than 4 digits. \n! ",
- tmp );
- cmor_handle_error( msg, CMOR_NORMAL );
- ierr+=-1;
-
+ if (strlen(tmp) > 4) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your forcing_index \"%s\" is invalid. \n! "
+ "It cannot contains more than 4 digits. \n! ", tmp);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ ierr += -1;
}
- reti = regexec(®ex, tmp , 0, NULL, 0);
- if(reti) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your forcing_index \"%s\" is invalid. \n! "
- "It must contain only characters between 0 and 9 \n!",
- tmp );
- cmor_handle_error( msg, CMOR_NORMAL );
- ierr+=-1;
+ reti = regexec(®ex, tmp, 0, NULL, 0);
+ if (reti) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your forcing_index \"%s\" is invalid. \n! "
+ "It must contain only characters between 0 and 9 \n!",
+ tmp);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ ierr += -1;
}
sscanf(tmp, "%d", &forcing_index);
@@ -5220,34 +5319,36 @@ int cmor_addRIPF(char *variant) {
snprintf(tmp, CMOR_MAX_STRING, "f%d", forcing_index);
strncat(variant, tmp, CMOR_MAX_STRING - strlen(variant));
}
- cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_VARIANT_LABEL, variant, 1);
+ cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_VARIANT_LABEL, variant,
+ 1);
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_MEMBER_ID, variant, 1);
// append sub_experiment_id
- if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_SUB_EXPT_ID) ==0) {
+ if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_SUB_EXPT_ID) == 0) {
cmor_get_cur_dataset_attribute(GLOBAL_ATT_SUB_EXPT_ID, szValue);
cmor_get_cur_dataset_attribute(GLOBAL_ATT_MEMBER_ID, szVariant);
if (strcmp(szValue, NONE) != 0) {
// not already in variant
- if(strstr(szVariant, szValue) == NULL) {
+ if (strstr(szVariant, szValue) == NULL) {
strcat(szValue, "-");
strcat(szValue, szVariant);
- cmor_set_cur_dataset_attribute_internal(
- GLOBAL_ATT_MEMBER_ID, szValue, 1);
+ cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_MEMBER_ID,
+ szValue, 1);
}
}
}
regfree(®ex);
cmor_pop_traceback();
- return(ierr);
+ return (ierr);
}
/************************************************************************/
/* cmor_close_variable() */
/************************************************************************/
-int cmor_close_variable( int var_id, char *file_name, int *preserve ) {
+int cmor_close_variable(int var_id, char *file_name, int *preserve)
+{
int ierr;
extern int cmor_nvars;
char outname[CMOR_MAX_STRING];
@@ -5256,379 +5357,361 @@ int cmor_close_variable( int var_id, char *file_name, int *preserve ) {
char ctmp[CMOR_MAX_STRING];
char ctmp2[CMOR_MAX_STRING];
cdCalenType icalo;
- cdCompTime comptime;
+ cdCompTime starttime, endtime;
int i, j, n;
- double interval;
struct stat buf;
off_t sz;
- long maxsz = ( long ) pow( 2, 32 ) - 1;
+ long maxsz = (long)pow(2, 32) - 1;
- cmor_add_traceback( "cmor_close_variable" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_close_variable");
+ cmor_is_setup();
cleanup_varid = var_id;
/* -------------------------------------------------------------------- */
/* initialized contains ncic, so we close file only once. */
/* -------------------------------------------------------------------- */
- if( cmor_vars[var_id].initialized != -1 ) {
- ierr = nc_close( cmor_vars[var_id].initialized );
+ if (cmor_vars[var_id].initialized != -1 && cmor_vars[var_id].error == 0) {
+ ierr = nc_close(cmor_vars[var_id].initialized);
- if( ierr != NC_NOERR ) {
- snprintf( msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s) closing variable %s (table: %s)\n! ",
- ierr, nc_strerror( ierr ), cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].
- ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NetCDF Error (%i: %s) closing variable %s (table: %s)\n! ",
+ ierr, nc_strerror(ierr), cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
/* -------------------------------------------------------------------- */
/* Ok we need to make the associated variables */
/* have been written in the case of a time varying grid */
/* -------------------------------------------------------------------- */
- if( ( cmor_vars[var_id].grid_id > -1 )
- && ( cmor_grids[cmor_vars[var_id].grid_id].istimevarying ==
- 1 ) ) {
- for( i = 0; i < 4; i++ ) {
- if( cmor_grids[cmor_vars[var_id].grid_id].associated_variables[i] != -1 ) {
+ if ((cmor_vars[var_id].grid_id > -1)
+ && (cmor_grids[cmor_vars[var_id].grid_id].istimevarying == 1)) {
+ for (i = 0; i < 4; i++) {
+ if (cmor_grids[cmor_vars[var_id].grid_id].
+ associated_variables[i] != -1) {
/* -------------------------------------------------------------------- */
/* ok this associated coord should be stored */
/* -------------------------------------------------------------------- */
- if( cmor_vars[var_id].ntimes_written !=
- cmor_vars[var_id].ntimes_written_coords[i] ) {
+ if (cmor_vars[var_id].ntimes_written !=
+ cmor_vars[var_id].ntimes_written_coords[i]) {
/* -------------------------------------------------------------------- */
/* ok we either wrote more or less data but */
/* in any case not the right amount! */
/* -------------------------------------------------------------------- */
- if( cmor_vars[var_id].ntimes_written == 0 ) {
- for( j = 0; j < cmor_vars[var_id].ndims; j++ ) {
- if( cmor_axes
- [cmor_vars[var_id].axes_ids[j]].axis ==
- 'T' ) {
- sprintf( ctmp2, "%i",
- cmor_axes[cmor_vars
- [var_id].axes_ids
- [j]].length );
- break;
- }
- }
- } else {
- sprintf( ctmp2, "%i",
- cmor_vars[var_id].ntimes_written );
- }
- if( cmor_vars[var_id].ntimes_written_coords[i] == -1 ) {
- sprintf( ctmp, "no" );
- } else {
- sprintf( ctmp, "%i",
- cmor_vars
- [var_id].ntimes_written_coords[i] );
- }
- snprintf( msg, CMOR_MAX_STRING,
- "while closing variable %i (%s, table %s)\n! "
- "we noticed it has a time varying grid, \n! "
- "you wrote %s time steps for the variable,\n! "
- "but its associated variable %i (%s) has\n! "
- "%s times written",
- cmor_vars[var_id].self,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id, ctmp2,
- cmor_vars[cmor_grids
- [cmor_vars[var_id].
- grid_id].associated_variables
- [i]].self,
- cmor_vars[cmor_grids
- [cmor_vars[var_id].
- grid_id].associated_variables
- [i]].id, ctmp );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- }
- }
- for( i = 0; i < 10; i++ ) {
- if( cmor_vars[var_id].associated_ids[i] != -1 ) {
- if( cmor_vars[var_id].ntimes_written !=
- cmor_vars[var_id].ntimes_written_associated[i] ) {
- sprintf( ctmp2, "%i",
- cmor_vars[var_id].ntimes_written );
- sprintf( ctmp, "%i",
- cmor_vars[var_id].ntimes_written_associated
- [i] );
- snprintf( msg, CMOR_MAX_STRING,
- "while closing variable %i (%s, table %s) we\n! "
- "noticed it has a time varying associated\n! "
- "variable, you wrote %s time steps for the\n! "
- "variable, but its associated variable %i (%s)\n! "
- "has %s times written",
- cmor_vars[var_id].self, cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].
- ref_table_id].szTable_id, ctmp2,
- cmor_vars[cmor_vars[var_id].associated_ids
- [i]].self,
- cmor_vars[cmor_vars[var_id].associated_ids
- [i]].id, ctmp );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- }
+ if (cmor_vars[var_id].ntimes_written == 0) {
+ for (j = 0; j < cmor_vars[var_id].ndims; j++) {
+ if (cmor_axes
+ [cmor_vars[var_id].axes_ids[j]].axis ==
+ 'T') {
+ sprintf(ctmp2, "%i",
+ cmor_axes[cmor_vars
+ [var_id].axes_ids
+ [j]].length);
+ break;
+ }
+ }
+ } else {
+ sprintf(ctmp2, "%i",
+ cmor_vars[var_id].ntimes_written);
+ }
+ if (cmor_vars[var_id].ntimes_written_coords[i] == -1) {
+ sprintf(ctmp, "no");
+ } else {
+ sprintf(ctmp, "%i",
+ cmor_vars[var_id].ntimes_written_coords[i]);
+ }
+ snprintf(msg, CMOR_MAX_STRING,
+ "while closing variable %i (%s, table %s)\n! "
+ "we noticed it has a time varying grid, \n! "
+ "you wrote %s time steps for the variable,\n! "
+ "but its associated variable %i (%s) has\n! "
+ "%s times written",
+ cmor_vars[var_id].self,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id, ctmp2,
+ cmor_vars[cmor_grids
+ [cmor_vars[var_id].grid_id].
+ associated_variables[i]].self,
+ cmor_vars[cmor_grids
+ [cmor_vars[var_id].grid_id].
+ associated_variables[i]].id, ctmp);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+ }
+ }
+ }
+ for (i = 0; i < 10; i++) {
+ if (cmor_vars[var_id].associated_ids[i] != -1) {
+ if (cmor_vars[var_id].ntimes_written !=
+ cmor_vars[var_id].ntimes_written_associated[i]) {
+ sprintf(ctmp2, "%i", cmor_vars[var_id].ntimes_written);
+ sprintf(ctmp, "%i",
+ cmor_vars[var_id].ntimes_written_associated[i]);
+ snprintf(msg, CMOR_MAX_STRING,
+ "while closing variable %i (%s, table %s) we\n! "
+ "noticed it has a time varying associated\n! "
+ "variable, you wrote %s time steps for the\n! "
+ "variable, but its associated variable %i (%s)\n! "
+ "has %s times written",
+ cmor_vars[var_id].self, cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].ref_table_id].
+ szTable_id, ctmp2,
+ cmor_vars[cmor_vars[var_id].associated_ids[i]].
+ self,
+ cmor_vars[cmor_vars[var_id].associated_ids[i]].id,
+ ctmp);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+ }
+ }
/* -------------------------------------------------------------------- */
/* ok at that point we need to construct the final name! */
/* -------------------------------------------------------------------- */
- strncpytrim( outname, cmor_vars[var_id].base_path,
- CMOR_MAX_STRING );
- if( cmor_tables
- [cmor_axes[cmor_vars[var_id].axes_ids[0]].
- ref_table_id].axes[cmor_axes[cmor_vars[var_id].axes_ids[0]].
- ref_axis_id].axis == 'T' ) {
- cmor_get_axis_attribute( cmor_vars[var_id].axes_ids[0],
- "units", 'c', &msg );
- cmor_get_cur_dataset_attribute( "calendar", msg2 );
-
- if( cmor_calendar_c2i( msg2, &icalo ) != 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Cannot convert times for calendar: %s,\n! "
- "closing variable %s (table: %s)",
- msg2, cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].
- ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
- }
-/* -------------------------------------------------------------------- */
-/* ok makes a comptime out of input */
-/* -------------------------------------------------------------------- */
-
- i = cmor_vars[var_id].axes_ids[0];
- j = cmor_axes[i].ref_table_id;
- i = cmor_axes[i].ref_axis_id;
- if( ( cmor_tables[j].axes[i].climatology == 1 )
- && ( cmor_vars[var_id].first_bound != 1.e20 ) ) {
- cdRel2Comp( icalo, msg, cmor_vars[var_id].first_bound,
- &comptime );
- } else {
- cdRel2Comp( icalo, msg, cmor_vars[var_id].first_time,
- &comptime );
- }
-/* -------------------------------------------------------------------- */
-/* need to figure out the approximate interval */
-/* -------------------------------------------------------------------- */
- int nVarAxisID;
- int nVarRefTable;
- int nVarRefAxisID;
-
- nVarAxisID = cmor_vars[var_id].axes_ids[0];
- nVarRefTable = cmor_axes[nVarAxisID].ref_table_id;
- nVarRefAxisID = cmor_axes[nVarAxisID].ref_axis_id;
-
- interval = cmor_convert_interval_to_seconds(
- cmor_tables[nVarRefTable].interval,
- cmor_tables[nVarRefTable].axes[nVarRefAxisID].units );
-
-/* -------------------------------------------------------------------- */
-/* first time point */
-/* -------------------------------------------------------------------- */
-
- strncat( outname, "_", CMOR_MAX_STRING - strlen( outname ) );
- snprintf( msg2, CMOR_MAX_STRING, "%.4ld", comptime.year );
- strncat( outname, msg2, CMOR_MAX_STRING - strlen( outname ) );
-/* -------------------------------------------------------------------- */
-/* less than a year */
-/* -------------------------------------------------------------------- */
-
- if( interval < 29.E6 ) {
- snprintf( msg2, CMOR_MAX_STRING, "%.2i", comptime.month );
- strncat( outname, msg2,
- CMOR_MAX_STRING - strlen( outname ) );
- }
-/* -------------------------------------------------------------------- */
-/* less than a month */
-/* -------------------------------------------------------------------- */
- if( interval < 2.E6 ) {
- snprintf( msg2, CMOR_MAX_STRING, "%.2i", comptime.day );
- strncat( outname, msg2,
- CMOR_MAX_STRING - strlen( outname ) );
- }
-/* -------------------------------------------------------------------- */
-/* less than a day */
-/* -------------------------------------------------------------------- */
- if( interval < 86000 ) {
- snprintf( msg2, CMOR_MAX_STRING, "%.2i",
- ( int ) comptime.hour );
- strncat( outname, msg2,
- CMOR_MAX_STRING - strlen( outname ) );
- }
-/* -------------------------------------------------------------------- */
-/* less than 6hr */
-/* -------------------------------------------------------------------- */
- if( interval < 21000 ) {
-/* -------------------------------------------------------------------- */
-/* from now on add 1 more level of precision since that frequency */
-/* -------------------------------------------------------------------- */
+ strncpytrim(outname, cmor_vars[var_id].base_path, CMOR_MAX_STRING);
+ if (cmor_tables
+ [cmor_axes[cmor_vars[var_id].axes_ids[0]].
+ ref_table_id].axes[cmor_axes[cmor_vars[var_id].axes_ids[0]].
+ ref_axis_id].axis == 'T') {
+ cmor_get_axis_attribute(cmor_vars[var_id].axes_ids[0], "units", 'c',
+ &msg);
+ cmor_get_cur_dataset_attribute("calendar", msg2);
- ierr = ( int ) (( comptime.hour -
- ( int ) ( comptime.hour )) * 60. );
- snprintf( msg2, CMOR_MAX_STRING, "%.2i", ierr );
- strncat( outname, msg2,
- CMOR_MAX_STRING - strlen( outname ) );
- }
- if( interval < 3000 ) { /* less than an hour */
- snprintf( msg2, CMOR_MAX_STRING, "%.2i",
- ( int ) (( comptime.hour -
- ( int ) ( comptime.hour ) ) *
- 3600. ) - ierr * 60 );
- strncat( outname, msg2,
- CMOR_MAX_STRING - strlen( outname ) );
- }
-
-/* -------------------------------------------------------------------- */
-/* separator between first and last time */
+ if (cmor_calendar_c2i(msg2, &icalo) != 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Cannot convert times for calendar: %s,\n! "
+ "closing variable %s (table: %s)", msg2,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].ref_table_id].
+ szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ cmor_pop_traceback();
+ return (1);
+ }
/* -------------------------------------------------------------------- */
+/* ok makes a comptime for start and end time */
+/* -------------------------------------------------------------------- */
+
+ i = cmor_vars[var_id].axes_ids[0];
+ j = cmor_axes[i].ref_table_id;
+ i = cmor_axes[i].ref_axis_id;
+ if (cmor_tables[j].axes[i].climatology == 1) {
+ starttime.year = 0;
+ starttime.month = 0;
+ starttime.day = 0;
+ starttime.hour = 0.0;
+ endtime = starttime;
+ cdRel2Comp(icalo, msg, cmor_vars[var_id].first_bound,
+ &starttime);
+ cdRel2Comp(icalo, msg, cmor_vars[var_id].last_bound, &endtime);
+ } else {
+ cdRel2Comp(icalo, msg, cmor_vars[var_id].first_time,
+ &starttime);
+ cdRel2Comp(icalo, msg, cmor_vars[var_id].last_time, &endtime);
+ }
- strncat( outname, "-", CMOR_MAX_STRING - strlen( outname ) );
-
- if( ( cmor_tables[j].axes[i].climatology == 1 )
- && ( cmor_vars[var_id].last_bound != 1.e20 ) ) {
- cdRel2Comp( icalo, msg, cmor_vars[var_id].last_bound,
- &comptime );
/* -------------------------------------------------------------------- */
-/* ok apparently we don't like the new time format */
-/* if it's ending at midnight exactly so I'm removing */
-/* one second... */
+/* We want start and end times that are greater than */
+/* x minutes 59.5 seconds to be set to x+1 minutes 0 seconds */
+/* so add a half second so that when floats are converted to */
+/* integers, this will round to nearest second (we know that */
+/* the time coordinates are positive */
+/* */
+/* note that in the following, cdCompAdd expects the increment added */
+/* to be expressed in units of hours */
/* -------------------------------------------------------------------- */
- if( icalo == cdMixed ) {
- cdCompAddMixed( comptime, -1. / 3600., &comptime );
- } else {
- cdCompAdd( comptime, -1. / 3600., icalo, &comptime );
- }
- } else {
- cdRel2Comp( icalo, msg, cmor_vars[var_id].last_time,
- &comptime );
- }
+ if (icalo == cdMixed) {
+ cdCompAddMixed(starttime, 0.5 / 3600., &starttime);
+ cdCompAddMixed(endtime, 0.5 / 3600., &endtime);
+ } else {
+ cdCompAdd(starttime, 0.5 / 3600., icalo, &starttime);
+ cdCompAdd(endtime, 0.5 / 3600., icalo, &endtime);
+ }
/* -------------------------------------------------------------------- */
-/* last time point */
-/* -------------------------------------------------------------------- */
- snprintf( msg2, CMOR_MAX_STRING, "%.4ld", comptime.year );
- strncat( outname, msg2, CMOR_MAX_STRING - strlen( outname ) );
-
-/* -------------------------------------------------------------------- */
-/* less than a year */
-/* -------------------------------------------------------------------- */
- if( interval < 29.E6 ) {
- snprintf( msg2, CMOR_MAX_STRING, "%.2i", comptime.month );
- strncat( outname, msg2,
- CMOR_MAX_STRING - strlen( outname ) );
- }
-/* -------------------------------------------------------------------- */
-/* less than a month */
+/* need to figure out the frequency */
/* -------------------------------------------------------------------- */
+ int frequency_code;
+ char frequency[CMOR_MAX_STRING];
+ char start_string[CMOR_MAX_STRING];
+ char end_string[CMOR_MAX_STRING];
+ int start_seconds, end_seconds, start_minutes, end_minutes;
- if( interval < 2.E6 ) {
- snprintf( msg2, CMOR_MAX_STRING, "%.2i", comptime.day );
- strncat( outname, msg2,
- CMOR_MAX_STRING - strlen( outname ) );
- }
-/* -------------------------------------------------------------------- */
-/* less than a day */
-/* -------------------------------------------------------------------- */
+ if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_FREQUENCY) == 0) {
+ cmor_get_cur_dataset_attribute(GLOBAL_ATT_FREQUENCY, frequency);
+ }
- if( interval < 86000 ) {
- snprintf( msg2, CMOR_MAX_STRING, "%.2i",
- ( int ) comptime.hour );
- strncat( outname, msg2,
- CMOR_MAX_STRING - strlen( outname ) );
- }
-/* -------------------------------------------------------------------- */
-/* less than 6hr */
-/* -------------------------------------------------------------------- */
+ if (strstr(frequency, "yr") != NULL) {
+ frequency_code = 1;
+ } else if (strstr(frequency, "dec") != NULL) {
+ frequency_code = 1;
+ } else if (strstr(frequency, "monClim") != NULL) {
+ frequency_code = 6;
+ } else if (strstr(frequency, "mon") != NULL) {
+ frequency_code = 2;
+ } else if (strstr(frequency, "day") != NULL) {
+ frequency_code = 3;
+ } else if (strstr(frequency, "subhr") != NULL) {
+ frequency_code = 5;
+ } else if (strstr(frequency, "hr") != NULL) {
+ frequency_code = 4;
+ } else if (strstr(frequency, "fx") != NULL) {
+ frequency_code = 99;
+ } else {
+ frequency_code = 0;
+ }
- if( interval < 21000 ) {
-/* -------------------------------------------------------------------- */
-/* from now on add 1 more level of precision since that frequency */
-/* -------------------------------------------------------------------- */
+ switch (frequency_code) {
+ case 1:
+ /* frequency is yr, decadal */
+ snprintf(start_string, CMOR_MAX_STRING, "%.4ld",
+ starttime.year);
+ snprintf(end_string, CMOR_MAX_STRING, "%.4ld", endtime.year);
+ break;
+ case 2:
+ /* frequency is mon */
+ snprintf(start_string, CMOR_MAX_STRING, "%.4ld%.2i",
+ starttime.year, starttime.month);
+ snprintf(end_string, CMOR_MAX_STRING, "%.4ld%.2i",
+ endtime.year, endtime.month);
+ break;
+ case 3:
+ /* frequency is day */
+ snprintf(start_string, CMOR_MAX_STRING, "%.4ld%.2i%.2i",
+ starttime.year, starttime.month, starttime.day);
+ snprintf(end_string, CMOR_MAX_STRING, "%.4ld%.2i%.2i",
+ endtime.year, endtime.month, endtime.day);
+ break;
+ case 4:
+ /* frequency is 6hr, 3hr, 1hr */
+ /* round to the nearest minute */
+ start_minutes = round((starttime.hour -
+ (int)starttime.hour) * 60.);
+ end_minutes = round((endtime.hour - (int)endtime.hour) * 60.);
+ snprintf(start_string, CMOR_MAX_STRING,
+ "%.4ld%.2i%.2i%.2i%.2i", starttime.year,
+ starttime.month, starttime.day, (int)starttime.hour,
+ start_minutes);
+ snprintf(end_string, CMOR_MAX_STRING, "%.4ld%.2i%.2i%.2i%.2i",
+ endtime.year, endtime.month, endtime.day,
+ (int)endtime.hour, end_minutes);
+ break;
+ case 5:
+ /* frequency is subhr */
+ /* round to the nearest second */
+ start_seconds = (int)((starttime.hour - (int)starttime.hour)
+ * 3600);
+ end_seconds =
+ (int)((endtime.hour - (int)endtime.hour) * 3600);
+ snprintf(start_string, CMOR_MAX_STRING,
+ "%.4ld%.2i%.2i%.2i%.2i%.2i", starttime.year,
+ starttime.month, starttime.day, (int)starttime.hour,
+ (int)(start_seconds / 60), (start_seconds % 60));
+ snprintf(end_string, CMOR_MAX_STRING,
+ "%.4ld%.2i%.2i%.2i%.2i%.2i", endtime.year,
+ endtime.month, endtime.day, (int)endtime.hour,
+ (int)(end_seconds / 60), (end_seconds % 60));
+
+ break;
+ case 6:
+ // frequency is monClim
+ // add/subtract 1 hour (this is overkill, but safe)
+ // to prevent truncation errors from possibly leading you to
+ // the wrong month
+ //
+ // note that cdCompAdd expects the increment added to be
+ // expressed in units of hours
+
+ if (icalo == cdMixed) {
+ cdCompAddMixed(starttime, 1.0, &starttime);
+ cdCompAddMixed(endtime, -1.0, &endtime);
+ } else {
+ cdCompAdd(starttime, 1.0, icalo, &starttime);
+ cdCompAdd(endtime, -1.0, icalo, &endtime);
+ }
+ snprintf(start_string, CMOR_MAX_STRING, "%.4ld%.2i",
+ starttime.year, starttime.month);
+ snprintf(end_string, CMOR_MAX_STRING, "%.4ld%.2i",
+ endtime.year, endtime.month);
+ break;
+ case 99:
+ /* frequency is fx */
+ /* don't need to do anything, time string will ignored in next step */
+ break;
+ default:
+ snprintf(msg, CMOR_MAX_STRING,
+ "Cannot find frequency %s. Closing variable %s (table: %s)",
+ frequency, cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].ref_table_id].
+ szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ cmor_pop_traceback();
+ return (1);
+ }
- ierr =
- ( int ) ( ( comptime.hour -
- ( int ) ( comptime.hour ) ) * 60. );
- snprintf( msg2, CMOR_MAX_STRING, "%.2i", ierr );
- strncat( outname, msg2,
- CMOR_MAX_STRING - strlen( outname ) );
- }
-/* -------------------------------------------------------------------- */
-/* less than an hour */
-/* -------------------------------------------------------------------- */
- if( interval < 3000 ) {
- snprintf( msg2, CMOR_MAX_STRING, "%.2i",
- ( int ) ( ( comptime.hour -
- ( int ) ( comptime.hour ) ) *
- 3600. ) - ierr * 60 );
- strncat( outname, msg2,
- CMOR_MAX_STRING - strlen( outname ) );
- }
+ strncat(outname, "_", CMOR_MAX_STRING - strlen(outname));
+ strncat(outname, start_string, CMOR_MAX_STRING - strlen(outname));
+ strncat(outname, "-", CMOR_MAX_STRING - strlen(outname));
+ strncat(outname, end_string, CMOR_MAX_STRING - strlen(outname));
- if( cmor_tables
- [cmor_axes[cmor_vars[var_id].axes_ids[0]].
- ref_table_id].axes[cmor_axes[cmor_vars[var_id].
- axes_ids[0]].
- ref_axis_id].climatology == 1 ) {
- strncat( outname, "-clim",
- CMOR_MAX_STRING - strlen( outname ) );
- }
- }
+ if (cmor_tables
+ [cmor_axes[cmor_vars[var_id].axes_ids[0]].ref_table_id].
+ axes[cmor_axes[cmor_vars[var_id].axes_ids[0]].
+ ref_axis_id].climatology == 1) {
+ strncat(outname, "-clim", CMOR_MAX_STRING - strlen(outname));
+ }
+ }
- if( cmor_vars[var_id].suffix_has_date == 1 ) {
+ if (cmor_vars[var_id].suffix_has_date == 1) {
/* -------------------------------------------------------------------- */
/* all right we need to pop out the date part.... */
/* -------------------------------------------------------------------- */
- n = strlen( cmor_vars[var_id].suffix );
- i = 0;
- while( cmor_vars[var_id].suffix[i] != '_' )
- i++;
- i++;
- while( ( cmor_vars[var_id].suffix[i] != '_' ) && i < n )
- i++;
+ n = strlen(cmor_vars[var_id].suffix);
+ i = 0;
+ while (cmor_vars[var_id].suffix[i] != '_')
+ i++;
+ i++;
+ while ((cmor_vars[var_id].suffix[i] != '_') && i < n)
+ i++;
/* -------------------------------------------------------------------- */
/* ok now we have the length of dates */
/* at this point we are either at the */
/* _clim the actual _suffix or the end (==nosuffix) */
/* checking if _clim needs to be added */
/* -------------------------------------------------------------------- */
- if( cmor_tables
- [cmor_axes[cmor_vars[var_id].axes_ids[i]].
- ref_table_id].axes[cmor_axes[cmor_vars[var_id].
- axes_ids[0]].
- ref_axis_id].climatology == 1 ) {
- i += 5;
- }
- strcpy( msg, "" );
- for( j = i; j < n; j++ ) {
- msg[j - i] = cmor_vars[var_id].suffix[i];
- msg[j - i + 1] = '\0';
- }
- } else {
- strncpy( msg, cmor_vars[var_id].suffix, CMOR_MAX_STRING );
- }
-
- if( strlen( msg ) > 0 ) {
- strncat( outname, "_", CMOR_MAX_STRING - strlen( outname ) );
- strncat( outname, msg, CMOR_MAX_STRING - strlen( outname ) );
- }
- strncat( outname, ".nc", CMOR_MAX_STRING - strlen( outname ) );
+ if (cmor_tables
+ [cmor_axes[cmor_vars[var_id].axes_ids[i]].
+ ref_table_id].axes[cmor_axes[cmor_vars[var_id].axes_ids[0]].
+ ref_axis_id].climatology == 1) {
+ i += 5;
+ }
+ strcpy(msg, "");
+ for (j = i; j < n; j++) {
+ msg[j - i] = cmor_vars[var_id].suffix[i];
+ msg[j - i + 1] = '\0';
+ }
+ } else {
+ strncpy(msg, cmor_vars[var_id].suffix, CMOR_MAX_STRING);
+ }
+ if (strlen(msg) > 0) {
+ strncat(outname, "_", CMOR_MAX_STRING - strlen(outname));
+ strncat(outname, msg, CMOR_MAX_STRING - strlen(outname));
+ }
+ strncat(outname, ".nc", CMOR_MAX_STRING - strlen(outname));
/* -------------------------------------------------------------------- */
/* ok now we can actually move the file */
/* here we need to make sure we are not in preserve mode! */
/* -------------------------------------------------------------------- */
- if( ( CMOR_NETCDF_MODE == CMOR_PRESERVE_4 )
- || ( CMOR_NETCDF_MODE == CMOR_PRESERVE_3 ) ) {
- FILE *fperr;
+ if ((CMOR_NETCDF_MODE == CMOR_PRESERVE_4)
+ || (CMOR_NETCDF_MODE == CMOR_PRESERVE_3)) {
+ FILE *fperr;
/* -------------------------------------------------------------------- */
/* ok first let's check if the file does exists or not */
@@ -5639,87 +5722,87 @@ int cmor_close_variable( int var_id, char *file_name, int *preserve ) {
sprintf(msg, "%s.copy", outname);
if (rename(cmor_vars[var_id].current_path, msg) == 0) {
snprintf(msg, CMOR_MAX_STRING,
- "Output file ( %s ) already exists,\n! "
- "remove file or use CMOR_REPLACE or\n! "
- "CMOR_APPEND for CMOR_NETCDF_MODE value\n! "
- "in cmor_setup for convenience the file\n! "
- "you were trying to write has been saved\n! "
- "at: %s.copy", outname, outname);
+ "Output file ( %s ) already exists,\n! "
+ "remove file or use CMOR_REPLACE or\n! "
+ "CMOR_APPEND for CMOR_NETCDF_MODE value\n! "
+ "in cmor_setup for convenience the file\n! "
+ "you were trying to write has been saved\n! "
+ "at: %s.copy", outname, outname);
} else {
snprintf(msg, CMOR_MAX_STRING,
- "Output file ( %s ) already exists,\n! "
- "remove file or use CMOR_REPLACE or\n! "
- "CMOR_APPEND for CMOR_NETCDF_MODE value in\n! "
- "cmor_setup.", outname);
+ "Output file ( %s ) already exists,\n! "
+ "remove file or use CMOR_REPLACE or\n! "
+ "CMOR_APPEND for CMOR_NETCDF_MODE value in\n! "
+ "cmor_setup.", outname);
}
ierr = fclose(fperr);
- fperr=NULL;
- cmor_handle_error(msg, CMOR_CRITICAL);
+ fperr = NULL;
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
}
}
- ierr = rename( cmor_vars[var_id].current_path, outname );
- if( ierr != 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "could not rename temporary file: %s to final file\n"
- "name: %s",
- cmor_vars[var_id].current_path, outname );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- if( file_name != NULL ) {
- strncpy( file_name, outname, CMOR_MAX_STRING );
- }
- strncpy( cmor_current_dataset.finalfilename, outname,
- CMOR_MAX_STRING);
+ ierr = rename(cmor_vars[var_id].current_path, outname);
+ if (ierr != 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "could not rename temporary file: %s to final file\n"
+ "name: %s", cmor_vars[var_id].current_path, outname);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+ if (file_name != NULL) {
+ strncpy(file_name, outname, CMOR_MAX_STRING);
+ }
+ strncpy(cmor_current_dataset.finalfilename, outname, CMOR_MAX_STRING);
/* -------------------------------------------------------------------- */
/* At this point we need to check the file's size */
/* and issue a warning if greater than 4Gb */
/* -------------------------------------------------------------------- */
- stat( outname, &buf );
- sz = buf.st_size;
- if( sz > maxsz ) {
- sprintf( msg,
- "Closing file: %s size is greater than 4Gb, while\n! "
- "this is acceptable \n! ",
- outname );
- cmor_handle_error( msg, CMOR_WARNING );
- }
-
- if( preserve != NULL ) {
- cmor_vars[var_id].initialized = -1;
- cmor_vars[var_id].ntimes_written = 0;
- cmor_vars[var_id].time_nc_id = -999;
- cmor_vars[var_id].time_bnds_nc_id = -999;
- for( i = 0; i < 10; i++ ) {
- cmor_vars[var_id].ntimes_written_coords[i] = -1;
- cmor_vars[var_id].ntimes_written_associated[i] = 0;
- cmor_vars[var_id].associated_ids[i] = -1;
- cmor_vars[var_id].nc_var_id = -999;
- }
- for( i = 0; i < cmor_vars[var_id].nattributes; i++ ) {
- if( strcmp( cmor_vars[var_id].attributes[i],
- "cell_methods" ) == 0 ) {
- cmor_set_variable_attribute_internal( var_id,
- "cell_methods",
- 'c',
- cmor_tables[cmor_vars[var_id].ref_table_id].
- vars[cmor_vars[var_id].ref_var_id].cell_methods );
- }
- }
- } else {
- cmor_reset_variable( var_id );
- cmor_vars[var_id].closed = 1;
- }
+// stat(outname, &buf);
+// sz = buf.st_size;
+// if (sz > maxsz) {
+// sprintf(msg, "Closing file: %s size is greater than 4Gb, while\n! "
+// "this is acceptable \n! ", outname);
+// cmor_handle_error_var(msg, CMOR_WARNING, var_id);
+// }
+
+ if (preserve != NULL) {
+ cmor_vars[var_id].initialized = -1;
+ cmor_vars[var_id].ntimes_written = 0;
+ cmor_vars[var_id].time_nc_id = -999;
+ cmor_vars[var_id].time_bnds_nc_id = -999;
+ for (i = 0; i < 10; i++) {
+ cmor_vars[var_id].ntimes_written_coords[i] = -1;
+ cmor_vars[var_id].ntimes_written_associated[i] = 0;
+ cmor_vars[var_id].associated_ids[i] = -1;
+ cmor_vars[var_id].nc_var_id = -999;
+ }
+ for (i = 0; i < cmor_vars[var_id].nattributes; i++) {
+ if (strcmp(cmor_vars[var_id].attributes[i], "cell_methods")
+ == 0) {
+ cmor_set_variable_attribute_internal(var_id, "cell_methods",
+ 'c',
+ cmor_tables[cmor_vars
+ [var_id].
+ ref_table_id].vars
+ [cmor_vars[var_id].
+ ref_var_id].
+ cell_methods);
+ }
+ }
+ } else {
+ cmor_reset_variable(var_id);
+ cmor_vars[var_id].closed = 1;
+ }
}
cleanup_varid = -1;
- cmor_pop_traceback( );
- return( 0 );
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_close() */
/************************************************************************/
-int cmor_close(void) {
+int cmor_close(void)
+{
int i, j, k;
extern int cmor_nvars;
char msg[CMOR_MAX_STRING];
@@ -5732,16 +5815,16 @@ int cmor_close(void) {
output_logfile = stderr;
for (i = 0; i < cmor_nvars + 1; i++) {
- if (cmor_vars[i].initialized != -1) {
+ if (cmor_vars[i].initialized != -1 && cmor_vars[i].error == 0) {
if (cmor_vars[i].closed == 0) {
cmor_close_variable(i, NULL, NULL);
}
} else if ((cmor_vars[i].needsinit == 1)
- && (cmor_vars[i].closed != 1)) {
+ && (cmor_vars[i].closed != 1)) {
snprintf(msg, CMOR_MAX_STRING,
- "variable %s (%i, table: %s) has been defined\n! "
- "but never initialized", cmor_vars[i].id, i,
- cmor_tables[cmor_vars[i].ref_table_id].szTable_id);
+ "variable %s (%i, table: %s) has been defined\n! "
+ "but never initialized", cmor_vars[i].id, i,
+ cmor_tables[cmor_vars[i].ref_table_id].szTable_id);
cmor_handle_error(msg, CMOR_WARNING);
}
}
@@ -5805,19 +5888,19 @@ int cmor_close(void) {
fprintf(output_logfile, "! ------\n! CMOR is now closed.\n! ------\n! "
"During execution we encountered:\n! ");
#ifdef COLOREDOUTPUT
- fprintf( output_logfile, "%c[%d;%dm", 0X1B, 1, 34 );
+ fprintf(output_logfile, "%c[%d;%dm", 0X1B, 1, 34);
#endif
fprintf(output_logfile, "%3i Warning(s)", cmor_nwarnings);
#ifdef COLOREDOUTPUT
- fprintf( output_logfile, "%c[%dm", 0X1B, 0 );
+ fprintf(output_logfile, "%c[%dm", 0X1B, 0);
#endif
fprintf(output_logfile, "\n! ");
#ifdef COLOREDOUTPUT
- fprintf( output_logfile, "%c[%d;%dm", 0X1B, 1, 31 );
+ fprintf(output_logfile, "%c[%d;%dm", 0X1B, 1, 31);
#endif
fprintf(output_logfile, "%3i Error(s)", cmor_nerrors);
#ifdef COLOREDOUTPUT
- fprintf( output_logfile, "%c[%dm", 0X1B, 0 );
+ fprintf(output_logfile, "%c[%dm", 0X1B, 0);
#endif
fprintf(output_logfile,
"\n! ------\n! Please review them.\n! ------\n! \n");
@@ -5838,52 +5921,55 @@ int cmor_close(void) {
/************************************************************************/
/* cmor_getFinalFilenane() */
/************************************************************************/
-char *cmor_getFinalFilename() {
- cmor_add_traceback( "cmor_close" );
- cmor_is_setup( );
+char *cmor_getFinalFilename()
+{
+ cmor_add_traceback("cmor_close");
+ cmor_is_setup();
- if(cmor_current_dataset.finalfilename[0] != '\0') {
- cmor_pop_traceback( );
- return( cmor_current_dataset.finalfilename );
+ if (cmor_current_dataset.finalfilename[0] != '\0') {
+ cmor_pop_traceback();
+ return (cmor_current_dataset.finalfilename);
}
- cmor_pop_traceback( );
- return( NULL );
+ cmor_pop_traceback();
+ return (NULL);
}
+
/************************************************************************/
/* cmor_trim_string() */
/************************************************************************/
-void cmor_trim_string( char *in, char *out ) {
+void cmor_trim_string(char *in, char *out)
+{
int n, i, j;
- if( in == NULL ) {
- out = NULL;
- return;
+ if (in == NULL) {
+ out = NULL;
+ return;
}
- n = strlen( in );
+ n = strlen(in);
- if( n == 0 ) {
- out[0] = '\0';
- return;
+ if (n == 0) {
+ out[0] = '\0';
+ return;
}
- if( n > CMOR_MAX_STRING )
- n = CMOR_MAX_STRING;
+ if (n > CMOR_MAX_STRING)
+ n = CMOR_MAX_STRING;
j = 0;
- for( i = 0; i < n; i++ ) {
- if( in[i] != ' ' && in[i] != '\n' && in[i] != '\t' ) {
- break;
- } else {
- j++;
- }
+ for (i = 0; i < n; i++) {
+ if (in[i] != ' ' && in[i] != '\n' && in[i] != '\t') {
+ break;
+ } else {
+ j++;
+ }
}
- for( i = j; i < n; i++ ) {
- out[i - j] = in[i];
+ for (i = j; i < n; i++) {
+ out[i - j] = in[i];
}
out[i - j] = '\0';
- n = strlen( out );
+ n = strlen(out);
i = n;
- while( ( out[i] == '\0' || out[i] == ' ' ) ) {
- out[i] = '\0';
- i--;
+ while ((out[i] == '\0' || out[i] == ' ')) {
+ out[i] = '\0';
+ i--;
}
}
diff --git a/Src/cmor_CV.c b/Src/cmor_CV.c
index ee4acd6..da916e3 100644
--- a/Src/cmor_CV.c
+++ b/Src/cmor_CV.c
@@ -10,109 +10,102 @@
#include "arraylist.h"
#include "libgen.h"
-extern void cdCompAdd( cdCompTime comptime,
- double value,
- cdCalenType calendar, cdCompTime * result );
-
-extern void cdCompAddMixed( cdCompTime ct,
- double value, cdCompTime * result );
+extern void cdCompAdd(cdCompTime comptime,
+ double value, cdCalenType calendar, cdCompTime * result);
+extern void cdCompAddMixed(cdCompTime ct, double value, cdCompTime * result);
/************************************************************************/
/* cmor_CV_set_att() */
/************************************************************************/
-void cmor_CV_set_att(cmor_CV_def_t *CV,
- char *szKey,
- json_object *joValue) {
+void cmor_CV_set_att(cmor_CV_def_t * CV, char *szKey, json_object * joValue)
+{
json_bool bValue;
double dValue;
int nValue;
array_list *pArray;
int k, length;
-
strcpy(CV->key, szKey);
- if( json_object_is_type( joValue, json_type_null) ) {
+ if (json_object_is_type(joValue, json_type_null)) {
printf("Will not save NULL JSON type from CV.json\n");
- } else if(json_object_is_type( joValue, json_type_boolean)) {
+ } else if (json_object_is_type(joValue, json_type_boolean)) {
bValue = json_object_get_boolean(joValue);
- CV->nValue = (int) bValue;
+ CV->nValue = (int)bValue;
CV->type = CV_integer;
- } else if(json_object_is_type( joValue, json_type_double)) {
+ } else if (json_object_is_type(joValue, json_type_double)) {
dValue = json_object_get_double(joValue);
CV->dValue = dValue;
CV->type = CV_double;
- } else if(json_object_is_type( joValue, json_type_int)) {
+ } else if (json_object_is_type(joValue, json_type_int)) {
nValue = json_object_get_int(joValue);
CV->nValue = nValue;
CV->type = CV_integer;
/* -------------------------------------------------------------------- */
/* if value is a JSON object, recursively call in this function */
/* -------------------------------------------------------------------- */
- } else if(json_object_is_type( joValue, json_type_object)) {
+ } else if (json_object_is_type(joValue, json_type_object)) {
int nCVId = -1;
int nbObject = 0;
- cmor_CV_def_t * oValue;
- int nTableID = CV->table_id; /* Save Table ID */
+ cmor_CV_def_t *oValue;
+ int nTableID = CV->table_id; /* Save Table ID */
json_object_object_foreach(joValue, key, value) {
nbObject++;
oValue = (cmor_CV_def_t *) realloc(CV->oValue,
- sizeof(cmor_CV_def_t) * nbObject);
+ sizeof(cmor_CV_def_t) *
+ nbObject);
CV->oValue = oValue;
nCVId++;
cmor_CV_init(&CV->oValue[nCVId], nTableID);
- cmor_CV_set_att(&CV->oValue[nCVId], key, value );
+ cmor_CV_set_att(&CV->oValue[nCVId], key, value);
}
- CV->nbObjects=nbObject;
+ CV->nbObjects = nbObject;
CV->type = CV_object;
-
- } else if(json_object_is_type( joValue, json_type_array)) {
+ } else if (json_object_is_type(joValue, json_type_array)) {
pArray = json_object_get_array(joValue);
length = array_list_length(pArray);
json_object *joItem;
CV->anElements = length;
- for(k=0; k<length; k++) {
+ for (k = 0; k < length; k++) {
joItem = (json_object *) array_list_get_idx(pArray, k);
strcpy(CV->aszValue[k], json_object_get_string(joItem));
}
- CV->type=CV_stringarray;
+ CV->type = CV_stringarray;
- } else if(json_object_is_type( joValue, json_type_string)) {
+ } else if (json_object_is_type(joValue, json_type_string)) {
strcpy(CV->szValue, json_object_get_string(joValue));
- CV->type=CV_string;
+ CV->type = CV_string;
}
-
-
}
-
/************************************************************************/
/* cmor_CV_init() */
/************************************************************************/
-void cmor_CV_init( cmor_CV_def_t *CV, int table_id ) {
+void cmor_CV_init(cmor_CV_def_t * CV, int table_id)
+{
int i;
- cmor_is_setup( );
+ cmor_is_setup();
cmor_add_traceback("_init_CV_def");
CV->table_id = table_id;
- CV->type = CV_undef; //undefined
+ CV->type = CV_undef; //undefined
CV->nbObjects = -1;
CV->nValue = -1;
CV->key[0] = '\0';
CV->szValue[0] = '\0';
- CV->dValue=-9999.9;
+ CV->dValue = -9999.9;
CV->oValue = NULL;
- for(i=0; i< CMOR_MAX_JSON_ARRAY; i++) {
- CV->aszValue[i][0]='\0';
+ for (i = 0; i < CMOR_MAX_JSON_ARRAY; i++) {
+ CV->aszValue[i][0] = '\0';
}
CV->anElements = -1;
@@ -122,47 +115,47 @@ void cmor_CV_init( cmor_CV_def_t *CV, int table_id ) {
/************************************************************************/
/* cmor_CV_print() */
/************************************************************************/
-void cmor_CV_print(cmor_CV_def_t *CV) {
+void cmor_CV_print(cmor_CV_def_t * CV)
+{
int k;
if (CV != NULL) {
- if(CV->key[0] != '\0'){
+ if (CV->key[0] != '\0') {
printf("key: %s \n", CV->key);
- }
- else {
+ } else {
return;
}
- switch(CV->type) {
-
- case CV_string:
- printf("value: %s\n", CV->szValue);
- break;
-
- case CV_integer:
- printf("value: %d\n", CV->nValue);
- break;
-
- case CV_stringarray:
- printf("value: [\n");
- for (k = 0; k < CV->anElements; k++) {
- printf("value: %s\n", CV->aszValue[k]);
- }
- printf(" ]\n");
- break;
-
- case CV_double:
- printf("value: %lf\n", CV->dValue);
- break;
-
- case CV_object:
- printf("*** nbObjects=%d\n", CV->nbObjects);
- for(k=0; k< CV->nbObjects; k++){
- cmor_CV_print(&CV->oValue[k]);
- }
- break;
-
- case CV_undef:
- break;
+ switch (CV->type) {
+
+ case CV_string:
+ printf("value: %s\n", CV->szValue);
+ break;
+
+ case CV_integer:
+ printf("value: %d\n", CV->nValue);
+ break;
+
+ case CV_stringarray:
+ printf("value: [\n");
+ for (k = 0; k < CV->anElements; k++) {
+ printf("value: %s\n", CV->aszValue[k]);
+ }
+ printf(" ]\n");
+ break;
+
+ case CV_double:
+ printf("value: %lf\n", CV->dValue);
+ break;
+
+ case CV_object:
+ printf("*** nbObjects=%d\n", CV->nbObjects);
+ for (k = 0; k < CV->nbObjects; k++) {
+ cmor_CV_print(&CV->oValue[k]);
+ }
+ break;
+
+ case CV_undef:
+ break;
}
}
@@ -171,18 +164,19 @@ void cmor_CV_print(cmor_CV_def_t *CV) {
/************************************************************************/
/* cmor_CV_printall() */
/************************************************************************/
-void cmor_CV_printall() {
- int j,i;
+void cmor_CV_printall()
+{
+ int j, i;
cmor_CV_def_t *CV;
int nCVs;
/* -------------------------------------------------------------------- */
/* Parse tree and print key values. */
/* -------------------------------------------------------------------- */
- for( i = 0; i < CMOR_MAX_TABLES; i++ ) {
- if(cmor_tables[i].CV != NULL) {
+ for (i = 0; i < CMOR_MAX_TABLES; i++) {
+ if (cmor_tables[i].CV != NULL) {
printf("table %s\n", cmor_tables[i].szTable_id);
nCVs = cmor_tables[i].CV->nbObjects;
- for( j=0; j<= nCVs; j++ ) {
+ for (j = 0; j <= nCVs; j++) {
CV = &cmor_tables[i].CV[j];
cmor_CV_print(CV);
}
@@ -193,7 +187,8 @@ void cmor_CV_printall() {
/************************************************************************/
/* cmor_CV_search_child_key() */
/************************************************************************/
-cmor_CV_def_t *cmor_CV_search_child_key(cmor_CV_def_t *CV, char *key){
+cmor_CV_def_t *cmor_CV_search_child_key(cmor_CV_def_t * CV, char *key)
+{
int i;
cmor_CV_def_t *searchCV;
int nbCVs = -1;
@@ -202,109 +197,115 @@ cmor_CV_def_t *cmor_CV_search_child_key(cmor_CV_def_t *CV, char *key){
nbCVs = CV->nbObjects;
// Look at this objects
- if(strcmp(CV->key, key)== 0){
+ if (strcmp(CV->key, key) == 0) {
cmor_pop_traceback();
- return(CV);
+ return (CV);
}
-
// Look at each of object key
- for(i = 0; i< nbCVs; i++) {
- // Is there a branch on that object?
- if(&CV->oValue[i] != NULL) {
- searchCV = cmor_CV_search_child_key(&CV->oValue[i], key);
- if(searchCV != NULL ){
- cmor_pop_traceback();
- return(searchCV);
- }
- }
- }
- cmor_pop_traceback();
- return(NULL);
+ for (i = 0; i < nbCVs; i++) {
+ // Is there a branch on that object?
+ if (&CV->oValue[i] != NULL) {
+ searchCV = cmor_CV_search_child_key(&CV->oValue[i], key);
+ if (searchCV != NULL) {
+ cmor_pop_traceback();
+ return (searchCV);
+ }
+ }
+ }
+ cmor_pop_traceback();
+ return (NULL);
}
/************************************************************************/
/* cmor_CV_rootsearch() */
/************************************************************************/
-cmor_CV_def_t * cmor_CV_rootsearch(cmor_CV_def_t *CV, char *key){
+cmor_CV_def_t *cmor_CV_rootsearch(cmor_CV_def_t * CV, char *key)
+{
int i;
int nbCVs = -1;
cmor_add_traceback("_CV_rootsearch");
// Look at first objects
- if(strcmp(CV->key, key)== 0){
+ if (strcmp(CV->key, key) == 0) {
cmor_pop_traceback();
- return(CV);
+ return (CV);
}
// Is there more than 1 object?
- if( CV->nbObjects != -1 ) {
+ if (CV->nbObjects != -1) {
nbCVs = CV->nbObjects;
}
// Look at each of object key
- for(i = 1; i< nbCVs; i++) {
- if(strcmp(CV[i].key, key)== 0){
+ for (i = 1; i < nbCVs; i++) {
+ if (strcmp(CV[i].key, key) == 0) {
cmor_pop_traceback();
- return(&CV[i]);
+ return (&CV[i]);
}
}
cmor_pop_traceback();
- return(NULL);
+ return (NULL);
}
+
/************************************************************************/
/* cmor_CV_get_value() */
/************************************************************************/
-char *cmor_CV_get_value(cmor_CV_def_t *CV, char *key) {
+char *cmor_CV_get_value(cmor_CV_def_t * CV, char *key)
+{
- switch(CV->type) {
- case CV_string:
- return(CV->szValue);
- break;
+ switch (CV->type) {
+ case CV_string:
+ return (CV->szValue);
+ break;
- case CV_integer:
- sprintf(CV->szValue, "%d", CV->nValue);
- break;
+ case CV_integer:
+ sprintf(CV->szValue, "%d", CV->nValue);
+ break;
- case CV_stringarray:
- return(CV->aszValue[0]);
- break;
+ case CV_stringarray:
+ return (CV->aszValue[0]);
+ break;
- case CV_double:
- sprintf(CV->szValue, "%lf", CV->dValue);
- break;
+ case CV_double:
+ sprintf(CV->szValue, "%lf", CV->dValue);
+ break;
- case CV_object:
- return(NULL);
- break;
+ case CV_object:
+ return (NULL);
+ break;
- case CV_undef:
- CV->szValue[0]='\0';
- break;
- }
+ case CV_undef:
+ CV->szValue[0] = '\0';
+ break;
+ }
- return(CV->szValue);
+ return (CV->szValue);
}
+
/************************************************************************/
/* cmor_CV_free() */
/************************************************************************/
-void cmor_CV_free(cmor_CV_def_t *CV) {
+void cmor_CV_free(cmor_CV_def_t * CV)
+{
int k;
/* -------------------------------------------------------------------- */
/* Recursively go down the tree and free branch */
/* -------------------------------------------------------------------- */
- if(CV->oValue != NULL) {
- for(k=0; k< CV->nbObjects; k++){
+ if (CV->oValue != NULL) {
+ for (k = 0; k < CV->nbObjects; k++) {
cmor_CV_free(&CV->oValue[k]);
}
}
- if(CV->oValue != NULL) {
+ if (CV->oValue != NULL) {
free(CV->oValue);
- CV->oValue=NULL;
+ CV->oValue = NULL;
}
}
+
/************************************************************************/
/* cmor_CV_checkFurtherInfoURL() */
/************************************************************************/
-int cmor_CV_checkFurtherInfoURL(int nVarRefTblID){
+int cmor_CV_checkFurtherInfoURL(int nVarRefTblID)
+{
char szFurtherInfoURLTemplate[CMOR_MAX_STRING];
char szFurtherInfoURL[CMOR_MAX_STRING];
char copyURL[CMOR_MAX_STRING];
@@ -318,9 +319,9 @@ int cmor_CV_checkFurtherInfoURL(int nVarRefTblID){
char *fileURL;
char *szToken;
- szFurtherInfoURL[0]='\0';
- szFurtherInfoFileURL[0]='\0';
- szFurtherInfoBaseURL[0]='\0';
+ szFurtherInfoURL[0] = '\0';
+ szFurtherInfoFileURL[0] = '\0';
+ szFurtherInfoBaseURL[0] = '\0';
cmor_add_traceback("_CV_checkFurtherInfoURL");
/* -------------------------------------------------------------------- */
@@ -333,8 +334,8 @@ int cmor_CV_checkFurtherInfoURL(int nVarRefTblID){
/* If this is a string with no token we have nothing to do. */
/* -------------------------------------------------------------------- */
szToken = strtok(szFurtherInfoURLTemplate, "<>");
- if( strcmp(szToken, cmor_current_dataset.furtherinfourl) == 0) {
- return(0);
+ if (strcmp(szToken, cmor_current_dataset.furtherinfourl) == 0) {
+ return (0);
}
strncpy(szFurtherInfoURLTemplate, cmor_current_dataset.furtherinfourl,
CMOR_MAX_STRING);
@@ -343,59 +344,56 @@ int cmor_CV_checkFurtherInfoURL(int nVarRefTblID){
/* -------------------------------------------------------------------- */
strcpy(copyURL, szFurtherInfoURLTemplate);
baseURL = dirname(copyURL);
- cmor_CreateFromTemplate( nVarRefTblID, baseURL,
- szFurtherInfoBaseURL, "/" );
+ cmor_CreateFromTemplate(nVarRefTblID, baseURL, szFurtherInfoBaseURL, "/");
strcpy(copyURL, szFurtherInfoURLTemplate);
fileURL = basename(copyURL);
- cmor_CreateFromTemplate( nVarRefTblID, fileURL,
- szFurtherInfoFileURL, "." );
+ cmor_CreateFromTemplate(nVarRefTblID, fileURL, szFurtherInfoFileURL, ".");
strncpy(szFurtherInfoURL, szFurtherInfoBaseURL, CMOR_MAX_STRING);
strcat(szFurtherInfoURL, "/");
- strncat(szFurtherInfoURL, szFurtherInfoFileURL, strlen(szFurtherInfoFileURL));
+ strncat(szFurtherInfoURL, szFurtherInfoFileURL,
+ strlen(szFurtherInfoFileURL));
- if(cmor_has_cur_dataset_attribute(GLOBAL_ATT_FURTHERINFOURL) == 0) {
- cmor_get_cur_dataset_attribute(GLOBAL_ATT_FURTHERINFOURL, szValue );
- if( strncmp(szFurtherInfoURL, szValue, CMOR_MAX_STRING) != 0) {
+ if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_FURTHERINFOURL) == 0) {
+ cmor_get_cur_dataset_attribute(GLOBAL_ATT_FURTHERINFOURL, szValue);
+ if (strncmp(szFurtherInfoURL, szValue, CMOR_MAX_STRING) != 0) {
cmor_get_cur_dataset_attribute(CV_INPUTFILENAME, CV_Filename);
- snprintf( msg, CMOR_MAX_STRING,
- "The further info in attribute does not match "
- "the one found in your Control Vocabulary(CV) File. \n! "
- "We found \"%s\" and \n! "
- "CV requires \"%s\" \n! "
-
- "Check your Control Vocabulary file \"%s\".\n! ",
- szValue,
- szFurtherInfoURL,
- CV_Filename);
+ snprintf(msg, CMOR_MAX_STRING,
+ "The further info in attribute does not match "
+ "the one found in your Control Vocabulary(CV) File. \n! "
+ "We found \"%s\" and \n! "
+ "CV requires \"%s\" \n! "
+ "Check your Control Vocabulary file \"%s\".\n! ",
+ szValue, szFurtherInfoURL, CV_Filename);
- cmor_handle_error( msg, CMOR_WARNING );
- cmor_pop_traceback( );
- return(-1);
+ cmor_handle_error(msg, CMOR_WARNING);
+ cmor_pop_traceback();
+ return (-1);
}
}
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_FURTHERINFOURL,
- szFurtherInfoURL, 0);
- cmor_pop_traceback( );
- return(0);
+ szFurtherInfoURL, 0);
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* get_CV_Error() */
/************************************************************************/
-int get_CV_Error(){
- return(CV_ERROR);
+int get_CV_Error()
+{
+ return (CV_ERROR);
}
-
/************************************************************************/
/* cmor_CV_checkSourceType() */
/************************************************************************/
-int cmor_CV_checkSourceType(cmor_CV_def_t *CV_exp, char *szExptID){
+int cmor_CV_checkSourceType(cmor_CV_def_t * CV_exp, char *szExptID)
+{
int nObjects;
cmor_CV_def_t *CV_exp_attr;
char szAddSourceType[CMOR_MAX_STRING];
@@ -419,8 +417,8 @@ int cmor_CV_checkSourceType(cmor_CV_def_t *CV_exp, char *szExptID){
szAddSourceTypeCpy[0] = '\0';
szReqSourceTypeCpy[0] = '\0';
szSourceType[0] = '\0';
- nbGoodType=0;
- nbSourceType=-1;
+ nbGoodType = 0;
+ nbSourceType = -1;
cmor_get_cur_dataset_attribute(CV_INPUTFILENAME, CV_Filename);
szAddSourceType[0] = '\0';
@@ -428,24 +426,24 @@ int cmor_CV_checkSourceType(cmor_CV_def_t *CV_exp, char *szExptID){
// Parse all experiment attributes get source type related attr.
for (i = 0; i < nObjects; i++) {
CV_exp_attr = &CV_exp->oValue[i];
- if(strcmp(CV_exp_attr->key, CV_EXP_ATTR_ADDSOURCETYPE) == 0 ) {
- for(j = 0; j< CV_exp_attr->anElements; j++) {
- strcat(szAddSourceType, CV_exp_attr->aszValue[j]);
- strcat(szAddSourceType, " ");
- strcat(szAddSourceTypeCpy, CV_exp_attr->aszValue[j]);
- strcat(szAddSourceTypeCpy, " ");
-
- }
+ if (strcmp(CV_exp_attr->key, CV_EXP_ATTR_ADDSOURCETYPE) == 0) {
+ for (j = 0; j < CV_exp_attr->anElements; j++) {
+ strcat(szAddSourceType, CV_exp_attr->aszValue[j]);
+ strcat(szAddSourceType, " ");
+ strcat(szAddSourceTypeCpy, CV_exp_attr->aszValue[j]);
+ strcat(szAddSourceTypeCpy, " ");
+
+ }
continue;
}
- if(strcmp(CV_exp_attr->key, CV_EXP_ATTR_REQSOURCETYPE) == 0) {
- for(j = 0; j< CV_exp_attr->anElements; j++) {
- strcat(szReqSourceType, CV_exp_attr->aszValue[j]);
- strcat(szReqSourceType, " ");
- strcat(szReqSourceTypeCpy, CV_exp_attr->aszValue[j]);
- strcat(szReqSourceTypeCpy, " ");
-
- }
+ if (strcmp(CV_exp_attr->key, CV_EXP_ATTR_REQSOURCETYPE) == 0) {
+ for (j = 0; j < CV_exp_attr->anElements; j++) {
+ strcat(szReqSourceType, CV_exp_attr->aszValue[j]);
+ strcat(szReqSourceType, " ");
+ strcat(szReqSourceTypeCpy, CV_exp_attr->aszValue[j]);
+ strcat(szReqSourceTypeCpy, " ");
+
+ }
continue;
}
@@ -459,7 +457,7 @@ int cmor_CV_checkSourceType(cmor_CV_def_t *CV_exp, char *szExptID){
nbSourceType = 1;
} else {
cmor_pop_traceback();
- return(-1);
+ return (-1);
}
while ((ptr = strpbrk(ptr, " ")) != NULL) {
nbSourceType++;
@@ -469,20 +467,20 @@ int cmor_CV_checkSourceType(cmor_CV_def_t *CV_exp, char *szExptID){
szTokenRequired = strtok(szReqSourceType, " ");
- while(szTokenRequired != NULL) {
- if(strstr(szSourceType, szTokenRequired) == NULL) {
+ while (szTokenRequired != NULL) {
+ if (strstr(szSourceType, szTokenRequired) == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "The following source type(s) \"%s\" are required and\n! "
- "some source type(s) could not be found in your "
- "input file. \n! "
- "Your file contains a source type of \"%s\".\n! "
- "Check your Control Vocabulary file \"%s\".\n! ",
- szReqSourceTypeCpy, szSourceType, CV_Filename);
+ "The following source type(s) \"%s\" are required and\n! "
+ "some source type(s) could not be found in your "
+ "input file. \n! "
+ "Your file contains a source type of \"%s\".\n! "
+ "Check your Control Vocabulary file \"%s\".\n! ",
+ szReqSourceTypeCpy, szSourceType, CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
- return(-1);
+ return (-1);
} else {
nbGoodType++;
}
@@ -507,26 +505,27 @@ int cmor_CV_checkSourceType(cmor_CV_def_t *CV_exp, char *szExptID){
if (nbGoodType != nbSourceType) {
snprintf(msg, CMOR_MAX_STRING,
- "You source_type attribute contains invalid source types\n! "
- "Your source type is set to \"%s\". The required source types\n! "
- "are \"%s\" and possible additional source types are \"%s\" \n! "
- "Check your Control Vocabulary file \"%s\".\n! ",
- szSourceType, szReqSourceTypeCpy, szAddSourceTypeCpy,
- CV_Filename);
+ "You source_type attribute contains invalid source types\n! "
+ "Your source type is set to \"%s\". The required source types\n! "
+ "are \"%s\" and possible additional source types are \"%s\" \n! "
+ "Check your Control Vocabulary file \"%s\".\n! ",
+ szSourceType, szReqSourceTypeCpy, szAddSourceTypeCpy,
+ CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
- return(-1);
+ return (-1);
}
- cmor_pop_traceback( );
- return(0);
-
+ cmor_pop_traceback();
+ return (0);
}
+
/************************************************************************/
/* cmor_CV_checkSourceID() */
/************************************************************************/
-int cmor_CV_checkSourceID(cmor_CV_def_t *CV){
+int cmor_CV_checkSourceID(cmor_CV_def_t * CV)
+{
cmor_CV_def_t *CV_source_ids;
cmor_CV_def_t *CV_source_id = NULL;
@@ -537,9 +536,9 @@ int cmor_CV_checkSourceID(cmor_CV_def_t *CV){
char CV_Filename[CMOR_MAX_STRING];
int rc;
int i;
- int j=0;
+ int j = 0;
- cmor_is_setup( );
+ cmor_is_setup();
cmor_add_traceback("_CV_checkSourceID");
cmor_get_cur_dataset_attribute(CV_INPUTFILENAME, CV_Filename);
/* -------------------------------------------------------------------- */
@@ -547,102 +546,99 @@ int cmor_CV_checkSourceID(cmor_CV_def_t *CV){
/* -------------------------------------------------------------------- */
CV_source_ids = cmor_CV_rootsearch(CV, CV_KEY_SOURCE_IDS);
- if(CV_source_ids == NULL){
- snprintf( msg, CMOR_MAX_STRING,
- "Your \"source_ids\" key could not be found in\n! "
- "your Control Vocabulary file.(%s)\n! ",
- CV_Filename);
+ if (CV_source_ids == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your \"source_ids\" key could not be found in\n! "
+ "your Control Vocabulary file.(%s)\n! ", CV_Filename);
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(-1);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
}
-
// retrieve source_id
rc = cmor_get_cur_dataset_attribute(GLOBAL_ATT_SOURCE_ID, szSource_ID);
- if( rc != 0 ){
- snprintf( msg, CMOR_MAX_STRING,
- "You \"%s\" is not defined, check your required attributes\n! "
- "See Control Vocabulary JSON file.(%s)\n! ",
- GLOBAL_ATT_SOURCE_ID,
- CV_Filename);
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(-1);
+ if (rc != 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "You \"%s\" is not defined, check your required attributes\n! "
+ "See Control Vocabulary JSON file.(%s)\n! ",
+ GLOBAL_ATT_SOURCE_ID, CV_Filename);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
}
-
// Validate source_id
for (i = 0; i < CV_source_ids->nbObjects; i++) {
CV_source_id = &CV_source_ids->oValue[i];
if (strncmp(CV_source_id->key, szSource_ID, CMOR_MAX_STRING) == 0) {
// Make sure that "source" exist.
- if(cmor_has_cur_dataset_attribute(GLOBAL_ATT_SOURCE) != 0 ) {
+ if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_SOURCE) != 0) {
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_SOURCE,
- CV_source_id->aszValue[0], 1);
+ CV_source_id->
+ aszValue[0], 1);
}
// Check source with experiment_id label.
rc = cmor_get_cur_dataset_attribute(GLOBAL_ATT_SOURCE, szSource);
- for( j=0; j < CV_source_id->nbObjects; j++) {
- if( strcmp(CV_source_id->oValue[j].key, CV_KEY_SOURCE_LABEL) == 0) {
- break;
- }
+ for (j = 0; j < CV_source_id->nbObjects; j++) {
+ if (strcmp(CV_source_id->oValue[j].key, CV_KEY_SOURCE_LABEL) ==
+ 0) {
+ break;
+ }
}
- if( j == CV_source_id->nbObjects) {
+ if (j == CV_source_id->nbObjects) {
snprintf(msg, CMOR_MAX_STRING,
- "Could not find %s string in source_id section.\n! \n! \n! "
- "See Control Vocabulary JSON file. (%s)\n! ",
- CV_KEY_SOURCE_LABEL,
- CV_Filename);
+ "Could not find %s string in source_id section.\n! \n! \n! "
+ "See Control Vocabulary JSON file. (%s)\n! ",
+ CV_KEY_SOURCE_LABEL, CV_Filename);
cmor_handle_error(msg, CMOR_WARNING);
break;
}
- if (strncmp(CV_source_id->oValue[j].szValue, szSource, CMOR_MAX_STRING) != 0) {
+ if (strncmp
+ (CV_source_id->oValue[j].szValue, szSource,
+ CMOR_MAX_STRING) != 0) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" with value \n! \"%s\" "
- "will be replaced with "
- "value \n! \"%s\".\n! \n! \n! "
- "See Control Vocabulary JSON file.(%s)\n! ",
- GLOBAL_ATT_SOURCE, szSource,
- CV_source_id->oValue[j].szValue,
- CV_Filename);
+ "Your input attribute \"%s\" with value \n! \"%s\" "
+ "will be replaced with "
+ "value \n! \"%s\".\n! \n! \n! "
+ "See Control Vocabulary JSON file.(%s)\n! ",
+ GLOBAL_ATT_SOURCE, szSource,
+ CV_source_id->oValue[j].szValue, CV_Filename);
cmor_handle_error(msg, CMOR_WARNING);
}
break;
}
}
// We could not found the Source ID in the CV file
- if( i == CV_source_ids->nbObjects) {
-
+ if (i == CV_source_ids->nbObjects) {
- snprintf( msg, CMOR_MAX_STRING,
- "The source_id, \"%s\", which you specified in your \n! "
- "input file could not be found in \n! "
- "your Controlled Vocabulary file. (%s) \n! \n! "
- "Please correct your input file or contact "
- "cmor at listserv.llnl.gov to register\n! "
- "a new source. ",
- szSource_ID, CV_Filename);
+ snprintf(msg, CMOR_MAX_STRING,
+ "The source_id, \"%s\", which you specified in your \n! "
+ "input file could not be found in \n! "
+ "your Controlled Vocabulary file. (%s) \n! \n! "
+ "Please correct your input file or contact "
+ "cmor at listserv.llnl.gov to register\n! "
+ "a new source. ", szSource_ID, CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
- return(-1);
+ return (-1);
}
// Set/replace attribute.
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_SOURCE_ID,
- CV_source_id->key,1);
+ CV_source_id->key, 1);
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_SOURCE,
- CV_source_id->oValue[j].szValue,1);
+ CV_source_id->oValue[j].szValue, 1);
cmor_pop_traceback();
- return(0);
+ return (0);
}
/************************************************************************/
/* CV_VerifyNBElement() */
/************************************************************************/
-int CV_VerifyNBElement(cmor_CV_def_t *CV) {
- char msg[CMOR_MAX_STRING];
- char CV_Filename[CMOR_MAX_STRING];
+int CV_VerifyNBElement(cmor_CV_def_t * CV)
+{
+ char msg[CMOR_MAX_STRING];
+ char CV_Filename[CMOR_MAX_STRING];
cmor_get_cur_dataset_attribute(CV_INPUTFILENAME, CV_Filename);
cmor_add_traceback("_CV_VerifyNBElement");
// printf("**** CV->key: %s\n", CV->key);
@@ -650,76 +646,80 @@ int CV_VerifyNBElement(cmor_CV_def_t *CV) {
// printf("**** CV->asValue: %s\n", CV->aszValue[0]);
// printf("**** CV->szValue: %s\n", CV->szValue);
- if( CV->anElements >1 ){
- snprintf( msg, CMOR_MAX_STRING,
- "Your %s has more than 1 element\n! "
- "only the first one will be used\n! "
- "Check your Control Vocabulary file \"%s\".\n! ",
- CV->key, CV_Filename);
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(1);
- } else if (CV->anElements == -1) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your %s has more than 0 element\n! "
- "Check your Control Vocabulary file \"%s\".\n! ",
- CV->key, CV_Filename);
-
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(1);
- }
- cmor_pop_traceback( );
- return(0);
+ if (CV->anElements > 1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your %s has more than 1 element\n! "
+ "only the first one will be used\n! "
+ "Check your Control Vocabulary file \"%s\".\n! ",
+ CV->key, CV_Filename);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ } else if (CV->anElements == -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your %s has more than 0 element\n! "
+ "Check your Control Vocabulary file \"%s\".\n! ",
+ CV->key, CV_Filename);
+
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ cmor_pop_traceback();
+ return (0);
}
+
/************************************************************************/
/* CV_CompareNoParent() */
/************************************************************************/
-int CV_CompareNoParent(char *szKey) {
- char msg[CMOR_MAX_STRING];
- char szValue[CMOR_MAX_STRING];
+int CV_CompareNoParent(char *szKey)
+{
+ char msg[CMOR_MAX_STRING];
+ char szValue[CMOR_MAX_STRING];
cmor_add_traceback("_CV_CompareNoParent");
- if (cmor_has_cur_dataset_attribute(szKey) ==0) {
- cmor_get_cur_dataset_attribute(szKey, szValue);
- if (strcmp(szValue, NO_PARENT) != 0) {
- snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute %s with value \"%s\" \n! "
- "will be replaced with value \"%s\".\n! ", szKey,
- szValue, NO_PARENT);
- cmor_set_cur_dataset_attribute_internal(szKey, NO_PARENT,
- 1);
- cmor_handle_error(msg, CMOR_WARNING);
- cmor_pop_traceback( );
- return (-1);
- }
- }
- cmor_pop_traceback( );
- return (0);
+ if (cmor_has_cur_dataset_attribute(szKey) == 0) {
+ cmor_get_cur_dataset_attribute(szKey, szValue);
+ if (strcmp(szValue, NO_PARENT) != 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your input attribute %s with value \"%s\" \n! "
+ "will be replaced with value \"%s\".\n! ", szKey,
+ szValue, NO_PARENT);
+ cmor_set_cur_dataset_attribute_internal(szKey, NO_PARENT, 1);
+ cmor_handle_error(msg, CMOR_WARNING);
+ cmor_pop_traceback();
+ return (-1);
+ }
+ }
+ cmor_pop_traceback();
+ return (0);
}
+
/************************************************************************/
/* InArray() */
/************************************************************************/
-int CV_IsStringInArray(cmor_CV_def_t *CV, char *szValue) {
+int CV_IsStringInArray(cmor_CV_def_t * CV, char *szValue)
+{
int nElements;
int i;
- int found=0;
+ int found = 0;
cmor_add_traceback("_CV_InArray");
nElements = CV->anElements;
for (i = 0; i < nElements; i++) {
if (strcmp(CV->aszValue[i], szValue) == 0) {
- found=1;
+ found = 1;
break;
}
}
- cmor_pop_traceback( );
- return(found);
+ cmor_pop_traceback();
+ return (found);
}
/************************************************************************/
/* cmor_CV_checkSubExpID() */
/************************************************************************/
-int cmor_CV_checkSubExpID(cmor_CV_def_t *CV) {
+int cmor_CV_checkSubExpID(cmor_CV_def_t * CV)
+{
cmor_CV_def_t *CV_experiment_id;
cmor_CV_def_t *CV_experiment;
cmor_CV_def_t *CV_experiment_sub_exp_id;
@@ -742,19 +742,18 @@ int cmor_CV_checkSubExpID(cmor_CV_def_t *CV) {
CV_sub_experiment_id = cmor_CV_rootsearch(CV, CV_KEY_SUB_EXPERIMENT_ID);
if (CV_sub_experiment_id == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "Your \"sub_experiment_id\" key could not be found in\n! "
- "your Control Vocabulary file.(%s)\n! ", CV_Filename);
+ "Your \"sub_experiment_id\" key could not be found in\n! "
+ "your Control Vocabulary file.(%s)\n! ", CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
return (-1);
}
-
// Look for experiment_id section
CV_experiment_id = cmor_CV_rootsearch(CV, CV_KEY_EXPERIMENT_ID);
if (CV_experiment_id == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "Your \"experiment_id\" key could not be found in\n! "
- "your Control Vocabulary file.(%s)\n! ", CV_Filename);
+ "Your \"experiment_id\" key could not be found in\n! "
+ "your Control Vocabulary file.(%s)\n! ", CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
return (-1);
@@ -763,21 +762,21 @@ int cmor_CV_checkSubExpID(cmor_CV_def_t *CV) {
CV_experiment = cmor_CV_search_child_key(CV_experiment_id, szExperiment_ID);
if (CV_experiment == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "Your experiment_id \"%s\" defined in your input file\n! "
- "could not be found in your Control Vocabulary file.(%s)\n! ",
- szExperiment_ID, CV_Filename);
+ "Your experiment_id \"%s\" defined in your input file\n! "
+ "could not be found in your Control Vocabulary file.(%s)\n! ",
+ szExperiment_ID, CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
return (-1);
}
// sub_experiment_id
CV_experiment_sub_exp_id = cmor_CV_search_child_key(CV_experiment,
- GLOBAL_ATT_SUB_EXPT_ID);
+ GLOBAL_ATT_SUB_EXPT_ID);
if (CV_experiment_sub_exp_id == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "Your \"%s\" defined in your input file\n! "
- "could not be found in your Control Vocabulary file.(%s)\n! ",
- GLOBAL_ATT_SUB_EXPT_ID, CV_Filename);
+ "Your \"%s\" defined in your input file\n! "
+ "could not be found in your Control Vocabulary file.(%s)\n! ",
+ GLOBAL_ATT_SUB_EXPT_ID, CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
return (-1);
@@ -787,20 +786,20 @@ int cmor_CV_checkSubExpID(cmor_CV_def_t *CV) {
// sub_experiment_id not found and set to "none"
if (CV_IsStringInArray(CV_experiment_sub_exp_id, NONE)) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" was not defined and \n! "
- "will be set to \"%s\"\n! "
- "as defined in your Control Vocabulary file \"%s\".\n! ",
- GLOBAL_ATT_SUB_EXPT_ID, NONE, CV_Filename);
+ "Your input attribute \"%s\" was not defined and \n! "
+ "will be set to \"%s\"\n! "
+ "as defined in your Control Vocabulary file \"%s\".\n! ",
+ GLOBAL_ATT_SUB_EXPT_ID, NONE, CV_Filename);
cmor_handle_error(msg, CMOR_WARNING);
- cmor_set_cur_dataset_attribute_internal( GLOBAL_ATT_SUB_EXPT_ID,
- NONE, 1);
+ cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_SUB_EXPT_ID,
+ NONE, 1);
} else {
// can't be "none".
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined properly \n! "
- "for your experiment \"%s\" \n! \n! "
- "See Control Vocabulary JSON file.(%s)\n! ",
- GLOBAL_ATT_SUB_EXPT_ID, szExperiment_ID, CV_Filename);
+ "Your input attribute \"%s\" is not defined properly \n! "
+ "for your experiment \"%s\" \n! \n! "
+ "See Control Vocabulary JSON file.(%s)\n! ",
+ GLOBAL_ATT_SUB_EXPT_ID, szExperiment_ID, CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
return (-1);
@@ -815,23 +814,24 @@ int cmor_CV_checkSubExpID(cmor_CV_def_t *CV) {
// only 1 element in list set it!
if (CV_experiment_sub_exp_id->anElements == 1) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" defined as \"%s\" "
- "will be replaced with \n! "
- "\"%s\" as defined in your Control Vocabulary file.\n! ",
- GLOBAL_ATT_SUB_EXPT_ID, szSubExptID,
- CV_experiment_sub_exp_id->aszValue[0]);
+ "Your input attribute \"%s\" defined as \"%s\" "
+ "will be replaced with \n! "
+ "\"%s\" as defined in your Control Vocabulary file.\n! ",
+ GLOBAL_ATT_SUB_EXPT_ID, szSubExptID,
+ CV_experiment_sub_exp_id->aszValue[0]);
cmor_handle_error(msg, CMOR_WARNING);
- cmor_set_cur_dataset_attribute_internal( GLOBAL_ATT_SUB_EXPT_ID,
- CV_experiment_sub_exp_id->aszValue[0], 1);
+ cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_SUB_EXPT_ID,
+ CV_experiment_sub_exp_id->
+ aszValue[0], 1);
} else {
// too many options.
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined properly \n! "
- "for your experiment \"%s\"\n! "
- "There is more than 1 option for this sub_experiment.\n! "
- "See Control Vocabulary JSON file.(%s)\n! ",
- GLOBAL_ATT_SUB_EXPT_ID, szExperiment_ID, CV_Filename);
+ "Your input attribute \"%s\" is not defined properly \n! "
+ "for your experiment \"%s\"\n! "
+ "There is more than 1 option for this sub_experiment.\n! "
+ "See Control Vocabulary JSON file.(%s)\n! ",
+ GLOBAL_ATT_SUB_EXPT_ID, szExperiment_ID, CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
return (-1);
@@ -841,22 +841,22 @@ int cmor_CV_checkSubExpID(cmor_CV_def_t *CV) {
// sub_experiment has not been defined!
if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_SUB_EXPT) != 0) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" was not defined and \n! "
- "will be set to \"%s\" \n! "
- "as defined in your Control Vocabulary file \"%s\".\n! ",
- GLOBAL_ATT_SUB_EXPT, NONE, CV_Filename);
+ "Your input attribute \"%s\" was not defined and \n! "
+ "will be set to \"%s\" \n! "
+ "as defined in your Control Vocabulary file \"%s\".\n! ",
+ GLOBAL_ATT_SUB_EXPT, NONE, CV_Filename);
cmor_handle_error(msg, CMOR_WARNING);
- cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_SUB_EXPT,
- NONE, 1);
+ cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_SUB_EXPT, NONE, 1);
} else {
cmor_get_cur_dataset_attribute(GLOBAL_ATT_SUB_EXPT, szValue);
- CV_sub_experiment_id_key = cmor_CV_search_child_key(
- CV_sub_experiment_id, szSubExptID);
+ CV_sub_experiment_id_key =
+ cmor_CV_search_child_key(CV_sub_experiment_id, szSubExptID);
if (CV_sub_experiment_id_key == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "Your \"sub_experiment\" text describing \n! "
- "sub_experiment_id \"%s\" could not be found in \n! "
- "your Control Vocabulary file.(%s)\n! ", szSubExptID, CV_Filename);
+ "Your \"sub_experiment\" text describing \n! "
+ "sub_experiment_id \"%s\" could not be found in \n! "
+ "your Control Vocabulary file.(%s)\n! ", szSubExptID,
+ CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
return (-1);
@@ -864,27 +864,29 @@ int cmor_CV_checkSubExpID(cmor_CV_def_t *CV) {
if (strcmp(szValue, CV_sub_experiment_id_key->szValue) != 0) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" defined as \"%s\" "
- "will be replaced with \n! "
- "\"%s\" as defined in your Control Vocabulary file.\n! ",
- GLOBAL_ATT_SUB_EXPT, szValue, CV_sub_experiment_id_key->szValue);
+ "Your input attribute \"%s\" defined as \"%s\" "
+ "will be replaced with \n! "
+ "\"%s\" as defined in your Control Vocabulary file.\n! ",
+ GLOBAL_ATT_SUB_EXPT, szValue,
+ CV_sub_experiment_id_key->szValue);
cmor_handle_error(msg, CMOR_WARNING);
- cmor_set_cur_dataset_attribute_internal( GLOBAL_ATT_SUB_EXPT,
- CV_sub_experiment_id_key->szValue, 1);
+ cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_SUB_EXPT,
+ CV_sub_experiment_id_key->
+ szValue, 1);
}
}
// append sub-experiment_id
- if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_SUB_EXPT_ID) ==0) {
+ if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_SUB_EXPT_ID) == 0) {
cmor_get_cur_dataset_attribute(GLOBAL_ATT_SUB_EXPT_ID, szValue);
cmor_get_cur_dataset_attribute(GLOBAL_ATT_MEMBER_ID, szVariant);
if (strcmp(szValue, NONE) != 0) {
// not already in variant
- if(strstr(szVariant, szValue) == NULL) {
+ if (strstr(szVariant, szValue) == NULL) {
strcat(szValue, "-");
strcat(szValue, szVariant);
- cmor_set_cur_dataset_attribute_internal(
- GLOBAL_ATT_MEMBER_ID, szValue, 1);
+ cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_MEMBER_ID,
+ szValue, 1);
}
}
}
@@ -892,10 +894,12 @@ int cmor_CV_checkSubExpID(cmor_CV_def_t *CV) {
cmor_pop_traceback();
return (0);
}
+
/************************************************************************/
/* cmor_CV_checkParentExpID() */
/************************************************************************/
-int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
+int cmor_CV_checkParentExpID(cmor_CV_def_t * CV)
+{
cmor_CV_def_t *CV_experiment_ids;
cmor_CV_def_t *CV_experiment;
cmor_CV_def_t *CV_parent_exp_id;
@@ -929,8 +933,8 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
CV_experiment_ids = cmor_CV_rootsearch(CV, CV_KEY_EXPERIMENT_ID);
if (CV_experiment_ids == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "Your \"experiment_id\" key could not be found in\n! "
- "your Control Vocabulary file.(%s)\n! ", CV_Filename);
+ "Your \"experiment_id\" key could not be found in\n! "
+ "your Control Vocabulary file.(%s)\n! ", CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
@@ -938,37 +942,37 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
}
// Get specified experiment
CV_experiment = cmor_CV_search_child_key(CV_experiment_ids,
- szExperiment_ID);
+ szExperiment_ID);
if (CV_experiment == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "Your experiment_id \"%s\" defined in your input file\n! "
- "could not be found in your Control Vocabulary file.(%s)\n! ",
- szExperiment_ID, CV_Filename);
+ "Your experiment_id \"%s\" defined in your input file\n! "
+ "could not be found in your Control Vocabulary file.(%s)\n! ",
+ szExperiment_ID, CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
return (-1);
}
-
// Do we have a parent_experiment_id?
if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_PARENT_EXPT_ID) != 0) {
CV_parent_exp_id = cmor_CV_search_child_key(CV_experiment,
- PARENT_ACTIVITY_ID);
+ PARENT_ACTIVITY_ID);
if (CV_IsStringInArray(CV_parent_exp_id, NO_PARENT)) {
cmor_pop_traceback();
return (0);
} else {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined properly \n! "
- "for your experiment \"%s\"\n!\n! "
- "See Control Vocabulary JSON file.(%s)\n! ",
- GLOBAL_ATT_PARENT_EXPT_ID, CV_experiment->key, CV_Filename);
+ "Your input attribute \"%s\" is not defined properly \n! "
+ "for your experiment \"%s\"\n!\n! "
+ "See Control Vocabulary JSON file.(%s)\n! ",
+ GLOBAL_ATT_PARENT_EXPT_ID, CV_experiment->key,
+ CV_Filename);
cmor_handle_error(msg, CMOR_CRITICAL);
}
}
// The provider defined a parent experiment.
if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_PARENT_EXPT_ID) == 0) {
cmor_get_cur_dataset_attribute(GLOBAL_ATT_PARENT_EXPT_ID,
- szParentExpValue);
+ szParentExpValue);
// "no parent" case
if (strcmp(szParentExpValue, NO_PARENT) == 0) {
CV_CompareNoParent(PARENT_ACTIVITY_ID);
@@ -980,13 +984,13 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
// Do we have branch_time_in_child?
if (cmor_has_cur_dataset_attribute(BRANCH_TIME_IN_CHILD) == 0) {
cmor_get_cur_dataset_attribute(BRANCH_TIME_IN_CHILD,
- szBranchTimeInChild);
+ szBranchTimeInChild);
rc = sscanf(szBranchTimeInChild, "%lf", &dBranchTimeInChild);
if ((rc == 0) || (rc == EOF)) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute branch_time_in_child \"%s\" "
- "is not a double floating point \n! ",
- szBranchTimeInChild);
+ "Your input attribute branch_time_in_child \"%s\" "
+ "is not a double floating point \n! ",
+ szBranchTimeInChild);
cmor_handle_error(msg, CMOR_WARNING);
}
@@ -996,11 +1000,11 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
cmor_get_cur_dataset_attribute(BRANCH_TIME_IN_PARENT, szValue);
if (strcmp(szValue, "0.0") != 0) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute %s %s \n! "
- "has been replaced with 0.0 \n! ",
- BRANCH_TIME_IN_PARENT, szValue);
- cmor_set_cur_dataset_attribute_internal(
- BRANCH_TIME_IN_PARENT, "0.0", 1);
+ "Your input attribute %s %s \n! "
+ "has been replaced with 0.0 \n! ",
+ BRANCH_TIME_IN_PARENT, szValue);
+ cmor_set_cur_dataset_attribute_internal
+ (BRANCH_TIME_IN_PARENT, "0.0", 1);
cmor_handle_error(msg, CMOR_WARNING);
}
@@ -1013,37 +1017,37 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
// Parent Activity ID
if (cmor_has_cur_dataset_attribute(PARENT_ACTIVITY_ID) != 0) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined properly \n! "
- "for your experiment \"%s\"\n!\n! "
- "See Control Vocabulary JSON file.(%s)\n! ",
- PARENT_ACTIVITY_ID, CV_experiment->key, CV_Filename);
+ "Your input attribute \"%s\" is not defined properly \n! "
+ "for your experiment \"%s\"\n!\n! "
+ "See Control Vocabulary JSON file.(%s)\n! ",
+ PARENT_ACTIVITY_ID, CV_experiment->key, CV_Filename);
cmor_handle_error(msg, CMOR_CRITICAL);
} else {
cmor_get_cur_dataset_attribute(PARENT_ACTIVITY_ID, szValue);
CV_parent_activity_id = cmor_CV_search_child_key(CV_experiment,
- PARENT_ACTIVITY_ID);
+ PARENT_ACTIVITY_ID);
if (CV_IsStringInArray(CV_parent_activity_id, szValue) == 0) {
if (CV_parent_activity_id->anElements == 1) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute parent_activity_id \"%s\" defined as \"%s\" "
- "will be replaced with \n! "
- "\"%s\" as defined in your Control Vocabulary file.\n! ",
- PARENT_ACTIVITY_ID, szValue,
- CV_parent_activity_id->aszValue[0]);
+ "Your input attribute parent_activity_id \"%s\" defined as \"%s\" "
+ "will be replaced with \n! "
+ "\"%s\" as defined in your Control Vocabulary file.\n! ",
+ PARENT_ACTIVITY_ID, szValue,
+ CV_parent_activity_id->aszValue[0]);
cmor_handle_error(msg, CMOR_WARNING);
- cmor_set_cur_dataset_attribute_internal(
- PARENT_ACTIVITY_ID,
- CV_parent_activity_id->aszValue[0], 1);
+ cmor_set_cur_dataset_attribute_internal
+ (PARENT_ACTIVITY_ID,
+ CV_parent_activity_id->aszValue[0], 1);
} else {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined properly \n! "
- "for your experiment \"%s\"\n! "
- "There is more than 1 option for this experiment.\n! "
- "See Control Vocabulary JSON file.(%s)\n! ",
- PARENT_ACTIVITY_ID, CV_experiment->key,
- CV_Filename);
+ "Your input attribute \"%s\" is not defined properly \n! "
+ "for your experiment \"%s\"\n! "
+ "There is more than 1 option for this experiment.\n! "
+ "See Control Vocabulary JSON file.(%s)\n! ",
+ PARENT_ACTIVITY_ID, CV_experiment->key,
+ CV_Filename);
cmor_handle_error(msg, CMOR_WARNING);
}
}
@@ -1051,41 +1055,40 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
// branch method
if (cmor_has_cur_dataset_attribute(BRANCH_METHOD)) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined \n! "
- "properly for %s \n! "
- "Please describe the spin-up procedure as defined \n! "
- "in CMIP6 documentations.\n! ",
- BRANCH_METHOD, szExperiment_ID);
+ "Your input attribute \"%s\" is not defined \n! "
+ "properly for %s \n! "
+ "Please describe the spin-up procedure as defined \n! "
+ "in CMIP6 documentations.\n! ",
+ BRANCH_METHOD, szExperiment_ID);
cmor_handle_error(msg, CMOR_CRITICAL);
} else {
cmor_get_cur_dataset_attribute(BRANCH_METHOD, szBranchMethod);
if (strlen(szBranchMethod) == 0) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute %s is an empty string\n! "
- "Please describe the spin-up procedure as defined \n! "
- "in CMIP6 documentations.\n! ",
- BRANCH_METHOD);
+ "Your input attribute %s is an empty string\n! "
+ "Please describe the spin-up procedure as defined \n! "
+ "in CMIP6 documentations.\n! ", BRANCH_METHOD);
}
}
// branch_time_in_child
if (cmor_has_cur_dataset_attribute(BRANCH_TIME_IN_CHILD)) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined \n! "
- "properly for %s \n! "
- "Please refer to the CMIP6 documentations.\n! ",
- BRANCH_TIME_IN_CHILD, szExperiment_ID);
+ "Your input attribute \"%s\" is not defined \n! "
+ "properly for %s \n! "
+ "Please refer to the CMIP6 documentations.\n! ",
+ BRANCH_TIME_IN_CHILD, szExperiment_ID);
cmor_handle_error(msg, CMOR_CRITICAL);
} else {
cmor_get_cur_dataset_attribute(BRANCH_TIME_IN_CHILD,
- szBranchTimeInChild);
+ szBranchTimeInChild);
rc = sscanf(szBranchTimeInChild, "%lf", &dBranchTimeInChild);
if ((rc == 0) || (rc == EOF)) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute branch_time_in_child \"%s\" "
- "is not a double floating point \n! ",
- szBranchTimeInChild);
+ "Your input attribute branch_time_in_child \"%s\" "
+ "is not a double floating point \n! ",
+ szBranchTimeInChild);
cmor_handle_error(msg, CMOR_CRITICAL);
}
}
@@ -1093,47 +1096,47 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
// branch_time_in_parent
if (cmor_has_cur_dataset_attribute(BRANCH_TIME_IN_PARENT)) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined \n! "
- "properly for %s \n! "
- "Please refer to the CMIP6 documentations.\n! ",
- BRANCH_TIME_IN_PARENT, szExperiment_ID);
+ "Your input attribute \"%s\" is not defined \n! "
+ "properly for %s \n! "
+ "Please refer to the CMIP6 documentations.\n! ",
+ BRANCH_TIME_IN_PARENT, szExperiment_ID);
cmor_handle_error(msg, CMOR_CRITICAL);
} else {
cmor_get_cur_dataset_attribute(BRANCH_TIME_IN_PARENT,
- szBranchTimeInParent);
+ szBranchTimeInParent);
rc = sscanf(szBranchTimeInParent, "%lf", &dBranchTimeInParent);
if ((rc == 0) || (rc == EOF)) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute branch_time_in_parent \"%s\" "
- "is not a double floating point \n! ",
- szBranchTimeInParent);
+ "Your input attribute branch_time_in_parent \"%s\" "
+ "is not a double floating point \n! ",
+ szBranchTimeInParent);
cmor_handle_error(msg, CMOR_CRITICAL);
}
}
// parent_time_units
if (cmor_has_cur_dataset_attribute(PARENT_TIME_UNITS)) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined \n! "
- "properly for %s \n! "
- "Please refer to the CMIP6 documentations.\n! ",
- PARENT_TIME_UNITS, szExperiment_ID);
+ "Your input attribute \"%s\" is not defined \n! "
+ "properly for %s \n! "
+ "Please refer to the CMIP6 documentations.\n! ",
+ PARENT_TIME_UNITS, szExperiment_ID);
cmor_handle_error(msg, CMOR_CRITICAL);
} else {
char template[CMOR_MAX_STRING];
int reti;
cmor_get_cur_dataset_attribute(PARENT_TIME_UNITS,
- szParentTimeUnits);
+ szParentTimeUnits);
strcpy(template,
- "^days[[:space:]]since[[:space:]][[:digit:]]\\{4,4\\}-[[:digit:]]\\{1,2\\}-[[:digit:]]\\{1,2\\}");
+ "^days[[:space:]]since[[:space:]][[:digit:]]\\{4,4\\}-[[:digit:]]\\{1,2\\}-[[:digit:]]\\{1,2\\}");
reti = regcomp(®ex, template, 0);
if (reti) {
snprintf(msg, CMOR_MAX_STRING,
- "You regular expression \"%s\" is invalid. \n! "
- "Please refer to the CMIP6 documentations.\n! ",
- template);
+ "You regular expression \"%s\" is invalid. \n! "
+ "Please refer to the CMIP6 documentations.\n! ",
+ template);
regfree(®ex);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
@@ -1145,9 +1148,9 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
reti = regexec(®ex, szParentTimeUnits, 0, NULL, 0);
if (reti == REG_NOMATCH) {
snprintf(msg, CMOR_MAX_STRING,
- "Your \"%s\" set to \"%s\" is invalid. \n! "
- "Please refer to the CMIP6 documentations.\n! ",
- PARENT_TIME_UNITS, szParentTimeUnits);
+ "Your \"%s\" set to \"%s\" is invalid. \n! "
+ "Please refer to the CMIP6 documentations.\n! ",
+ PARENT_TIME_UNITS, szParentTimeUnits);
regfree(®ex);
cmor_handle_error(msg, CMOR_NORMAL);
}
@@ -1156,26 +1159,26 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
// parent_variant_label
if (cmor_has_cur_dataset_attribute(PARENT_VARIANT_LABEL)) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined \n! "
- "properly for %s \n! "
- "Please refer to the CMIP6 documentations.\n! ",
- PARENT_VARIANT_LABEL, szExperiment_ID);
+ "Your input attribute \"%s\" is not defined \n! "
+ "properly for %s \n! "
+ "Please refer to the CMIP6 documentations.\n! ",
+ PARENT_VARIANT_LABEL, szExperiment_ID);
cmor_handle_error(msg, CMOR_CRITICAL);
} else {
char template[CMOR_MAX_STRING];
int reti;
cmor_get_cur_dataset_attribute(PARENT_VARIANT_LABEL,
- szParentVariantLabel);
+ szParentVariantLabel);
strcpy(template,
- "^r[[:digit:]]\\{1,\\}i[[:digit:]]\\{1,\\}p[[:digit:]]\\{1,\\}f[[:digit:]]\\{1,\\}$");
+ "^r[[:digit:]]\\{1,\\}i[[:digit:]]\\{1,\\}p[[:digit:]]\\{1,\\}f[[:digit:]]\\{1,\\}$");
reti = regcomp(®ex, template, 0);
if (reti) {
snprintf(msg, CMOR_MAX_STRING,
- "You regular expression \"%s\" is invalid. \n! "
- "Please refer to the CMIP6 documentations.\n! ",
- template);
+ "You regular expression \"%s\" is invalid. \n! "
+ "Please refer to the CMIP6 documentations.\n! ",
+ template);
regfree(®ex);
cmor_handle_error(msg, CMOR_NORMAL);
}
@@ -1185,9 +1188,9 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
reti = regexec(®ex, szParentVariantLabel, 0, NULL, 0);
if (reti == REG_NOMATCH) {
snprintf(msg, CMOR_MAX_STRING,
- "You \"%s\" set to \"%s\" is invalid. \n! "
- "Please refer to the CMIP6 documentations.\n! ",
- PARENT_VARIANT_LABEL, szParentVariantLabel);
+ "You \"%s\" set to \"%s\" is invalid. \n! "
+ "Please refer to the CMIP6 documentations.\n! ",
+ PARENT_VARIANT_LABEL, szParentVariantLabel);
regfree(®ex);
cmor_handle_error(msg, CMOR_NORMAL);
}
@@ -1196,21 +1199,21 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
// parent_source_id
if (cmor_has_cur_dataset_attribute(PARENT_SOURCE_ID) != 0) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined \n! "
- "properly for %s \n! "
- "Please refer to the CMIP6 documentations.\n! ",
- PARENT_SOURCE_ID, szExperiment_ID);
+ "Your input attribute \"%s\" is not defined \n! "
+ "properly for %s \n! "
+ "Please refer to the CMIP6 documentations.\n! ",
+ PARENT_SOURCE_ID, szExperiment_ID);
cmor_handle_error(msg, CMOR_NORMAL);
} else {
cmor_get_cur_dataset_attribute(PARENT_SOURCE_ID,
- szParentSourceId);
+ szParentSourceId);
CV_source_id = cmor_CV_rootsearch(CV, CV_KEY_SOURCE_IDS);
if (CV_source_id == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "Your \"source_id\" key could not be found in\n! "
- "your Control Vocabulary file.(%s)\n! ",
- CV_Filename);
+ "Your \"source_id\" key could not be found in\n! "
+ "your Control Vocabulary file.(%s)\n! ",
+ CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
@@ -1218,14 +1221,14 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
}
// Get specified experiment
cmor_get_cur_dataset_attribute(PARENT_SOURCE_ID,
- szParentSourceId);
+ szParentSourceId);
CV_source = cmor_CV_search_child_key(CV_source_id,
- szParentSourceId);
+ szParentSourceId);
if (CV_source == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "Your parent_source_id \"%s\" defined in your input file\n! "
- "could not be found in your Control Vocabulary file.(%s)\n! ",
- szParentSourceId, CV_Filename);
+ "Your parent_source_id \"%s\" defined in your input file\n! "
+ "could not be found in your Control Vocabulary file.(%s)\n! ",
+ szParentSourceId, CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
return (-1);
@@ -1234,23 +1237,23 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
// parent_mip_era
if (cmor_has_cur_dataset_attribute(PARENT_MIP_ERA) != 0) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" is not defined \n! "
- "properly for %s \n! "
- "Please refer to the CMIP6 documentations.\n! ",
- PARENT_MIP_ERA, szExperiment_ID);
+ "Your input attribute \"%s\" is not defined \n! "
+ "properly for %s \n! "
+ "Please refer to the CMIP6 documentations.\n! ",
+ PARENT_MIP_ERA, szExperiment_ID);
cmor_handle_error(msg, CMOR_CRITICAL);
} else {
cmor_get_cur_dataset_attribute(PARENT_MIP_ERA, szValue);
if (strcmp(CMIP6, szValue) != 0) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" defined as \"%s\" "
- "will be replaced with \n! "
- "\"%s\" as defined in your Control Vocabulary file.\n! ",
- PARENT_MIP_ERA, szValue, CMIP6);
+ "Your input attribute \"%s\" defined as \"%s\" "
+ "will be replaced with \n! "
+ "\"%s\" as defined in your Control Vocabulary file.\n! ",
+ PARENT_MIP_ERA, szValue, CMIP6);
cmor_handle_error(msg, CMOR_WARNING);
- cmor_set_cur_dataset_attribute_internal(
- PARENT_MIP_ERA, szValue, 1);
+ cmor_set_cur_dataset_attribute_internal(PARENT_MIP_ERA,
+ szValue, 1);
}
}
}
@@ -1262,7 +1265,8 @@ int cmor_CV_checkParentExpID(cmor_CV_def_t *CV) {
/************************************************************************/
/* cmor_CV_checkExperiment() */
/************************************************************************/
-int cmor_CV_checkExperiment( cmor_CV_def_t *CV){
+int cmor_CV_checkExperiment(cmor_CV_def_t * CV)
+{
cmor_CV_def_t *CV_experiment_ids;
cmor_CV_def_t *CV_experiment;
cmor_CV_def_t *CV_experiment_attr;
@@ -1286,29 +1290,27 @@ int cmor_CV_checkExperiment( cmor_CV_def_t *CV){
/* Find experiment_ids dictionary in Control Vocabulary */
/* -------------------------------------------------------------------- */
CV_experiment_ids = cmor_CV_rootsearch(CV, CV_KEY_EXPERIMENT_ID);
- if(CV_experiment_ids == NULL){
- snprintf( msg, CMOR_MAX_STRING,
- "Your \"experiment_ids\" key could not be found in\n! "
- "your Control Vocabulary file.(%s)\n! ",
- CV_Filename);
+ if (CV_experiment_ids == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your \"experiment_ids\" key could not be found in\n! "
+ "your Control Vocabulary file.(%s)\n! ", CV_Filename);
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(-1);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
}
- CV_experiment = cmor_CV_search_child_key( CV_experiment_ids,
- szExperiment_ID);
+ CV_experiment = cmor_CV_search_child_key(CV_experiment_ids,
+ szExperiment_ID);
- if(CV_experiment == NULL){
- snprintf( msg, CMOR_MAX_STRING,
- "Your experiment_id \"%s\" defined in your input file\n! "
- "could not be found in your Control Vocabulary file.(%s)\n! ",
- szExperiment_ID,
- CV_Filename);
+ if (CV_experiment == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your experiment_id \"%s\" defined in your input file\n! "
+ "could not be found in your Control Vocabulary file.(%s)\n! ",
+ szExperiment_ID, CV_Filename);
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(-1);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
}
nObjects = CV_experiment->nbObjects;
@@ -1319,52 +1321,52 @@ int cmor_CV_checkExperiment( cmor_CV_def_t *CV){
rc = cmor_has_cur_dataset_attribute(CV_experiment_attr->key);
strcpy(szExpValue, CV_experiment_attr->szValue);
// Validate source type first
- if(strcmp(CV_experiment_attr->key, CV_EXP_ATTR_DESCRIPTION) == 0) {
- continue;
+ if (strcmp(CV_experiment_attr->key, CV_EXP_ATTR_DESCRIPTION) == 0) {
+ continue;
}
- if(strcmp(CV_experiment_attr->key, CV_EXP_ATTR_REQSOURCETYPE) == 0) {
+ if (strcmp(CV_experiment_attr->key, CV_EXP_ATTR_REQSOURCETYPE) == 0) {
cmor_CV_checkSourceType(CV_experiment, szExperiment_ID);
continue;
}
// Warn user if experiment value from input file is different than
// Control Vocabulary value.
// experiment from Control Vocabulary will replace User entry value.
- if( rc == 0) {
+ if (rc == 0) {
cmor_get_cur_dataset_attribute(CV_experiment_attr->key, szValue);
- if( CV_experiment_attr->anElements > 0) {
- for( j = 0; j < CV_experiment_attr->anElements; j++) {
- //
- // Find a string that match this value in the list?
- //
- if( strncmp( CV_experiment_attr->aszValue[j], szValue,
- CMOR_MAX_STRING) == 0) {
- break;
- }
- }
+ if (CV_experiment_attr->anElements > 0) {
+ for (j = 0; j < CV_experiment_attr->anElements; j++) {
+ //
+ // Find a string that match this value in the list?
+ //
+ if (strncmp(CV_experiment_attr->aszValue[j], szValue,
+ CMOR_MAX_STRING) == 0) {
+ break;
+ }
+ }
if (j == CV_experiment_attr->anElements) {
if (CV_experiment_attr->anElements == 1) {
strcpy(szExpValue, CV_experiment_attr->aszValue[0]);
bWarning = TRUE;
} else {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" with value \n! \"%s\" "
- "is not set properly and \n! "
- "has multiple possible candidates \n! "
- "defined for experiment_id \"%s\".\n! \n! "
- "See Control Vocabulary JSON file.(%s)\n! ",
- CV_experiment_attr->key, szValue,
- CV_experiment->key, CV_Filename);
+ "Your input attribute \"%s\" with value \n! \"%s\" "
+ "is not set properly and \n! "
+ "has multiple possible candidates \n! "
+ "defined for experiment_id \"%s\".\n! \n! "
+ "See Control Vocabulary JSON file.(%s)\n! ",
+ CV_experiment_attr->key, szValue,
+ CV_experiment->key, CV_Filename);
cmor_handle_error(msg, CMOR_CRITICAL);
}
}
} else
- //
- // Check for string instead of list of string object!
- //
+ //
+ // Check for string instead of list of string object!
+ //
if (CV_experiment_attr->szValue[0] != '\0') {
if (strncmp(CV_experiment_attr->szValue, szValue,
- CMOR_MAX_STRING) != 0) {
+ CMOR_MAX_STRING) != 0) {
strcpy(szExpValue, CV_experiment_attr->szValue);
bWarning = TRUE;
}
@@ -1372,18 +1374,18 @@ int cmor_CV_checkExperiment( cmor_CV_def_t *CV){
}
if (bWarning == TRUE) {
snprintf(msg, CMOR_MAX_STRING,
- "Your input attribute \"%s\" with value \n! \"%s\" "
- "will be replaced with "
- "value \"%s\"\n! "
- "as defined for experiment_id \"%s\".\n! \n! "
- "See Control Vocabulary JSON file.(%s)\n! ",
- CV_experiment_attr->key, szValue, szExpValue,
- CV_experiment->key, CV_Filename);
+ "Your input attribute \"%s\" with value \n! \"%s\" "
+ "will be replaced with "
+ "value \"%s\"\n! "
+ "as defined for experiment_id \"%s\".\n! \n! "
+ "See Control Vocabulary JSON file.(%s)\n! ",
+ CV_experiment_attr->key, szValue, szExpValue,
+ CV_experiment->key, CV_Filename);
cmor_handle_error(msg, CMOR_WARNING);
}
// Set/replace attribute.
cmor_set_cur_dataset_attribute_internal(CV_experiment_attr->key,
- szExpValue, 1);
+ szExpValue, 1);
if (cmor_has_cur_dataset_attribute(CV_experiment_attr->key) == 0) {
cmor_get_cur_dataset_attribute(CV_experiment_attr->key, szValue);
}
@@ -1396,11 +1398,11 @@ int cmor_CV_checkExperiment( cmor_CV_def_t *CV){
/************************************************************************/
/* cmor_CV_checkFilename() */
/************************************************************************/
-int cmor_CV_checkFilename(cmor_CV_def_t *CV,
- int var_id,
- char *szInTimeCalendar,
- char *szInTimeUnits,
- char *infile) {
+int cmor_CV_checkFilename(cmor_CV_def_t * CV,
+ int var_id,
+ char *szInTimeCalendar,
+ char *szInTimeUnits, char *infile)
+{
cdCalenType icalo;
char outname[CMOR_MAX_STRING];
@@ -1414,47 +1416,48 @@ int cmor_CV_checkFilename(cmor_CV_def_t *CV,
outname[0] = '\0';
ierr = cmor_CreateFromTemplate(0, cmor_current_dataset.file_template,
- outname, "_");
+ outname, "_");
cmor_get_cur_dataset_attribute(CV_INPUTFILENAME, CV_Filename);
- timeDim=-1;
- for(i = 0; i< cmor_tables[0].vars[0].ndims; i++){
+ timeDim = -1;
+ for (i = 0; i < cmor_tables[0].vars[0].ndims; i++) {
int dim = cmor_tables[0].vars[0].dimensions[i];
- if(cmor_tables[0].axes[dim].axis == 'T'){
- timeDim=dim;
+ if (cmor_tables[0].axes[dim].axis == 'T') {
+ timeDim = dim;
break;
}
}
- if (timeDim != -1){
+ if (timeDim != -1) {
// retrieve calendar
if (cmor_calendar_c2i(szInTimeCalendar, &icalo) != 0) {
snprintf(szInTimeUnits, CMOR_MAX_STRING,
- "Cannot convert times for calendar: %s,\n! "
- "closing variable %s (table: %s)", szInTimeCalendar,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].szTable_id);
- cmor_handle_error(szInTimeUnits, CMOR_CRITICAL);
+ "Cannot convert times for calendar: %s,\n! "
+ "closing variable %s (table: %s)", szInTimeCalendar,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].ref_table_id].szTable_id);
+ cmor_handle_error_var(szInTimeUnits, CMOR_CRITICAL, var_id);
cmor_pop_traceback();
return (1);
}
//Compute timestamps
if ((cmor_tables[0].axes[timeDim].climatology == 1)
- && (cmor_vars[0].first_bound != 1.e20)) {
+ && (cmor_vars[0].first_bound != 1.e20)) {
cdRel2Comp(icalo, szInTimeUnits, cmor_vars[0].first_bound,
- &comptime);
+ &comptime);
} else {
cdRel2Comp(icalo, szInTimeUnits, cmor_vars[0].first_time,
- &comptime);
+ &comptime);
}
/* -------------------------------------------------------------------- */
/* need to figure out the approximate interval */
/* -------------------------------------------------------------------- */
interval = cmor_convert_interval_to_seconds(cmor_tables[0].interval,
- cmor_tables[0].axes[timeDim].units);
+ cmor_tables[0].
+ axes[timeDim].units);
//first time point
strncat(outname, "_", CMOR_MAX_STRING - strlen(outname));
@@ -1473,26 +1476,23 @@ int cmor_CV_checkFilename(cmor_CV_def_t *CV,
}
// hour
if (interval < 86000) {
- snprintf(szTmp, CMOR_MAX_STRING, "%.2i", (int) comptime.hour);
- strncat(outname, szTmp,
- CMOR_MAX_STRING - strlen(outname));
+ snprintf(szTmp, CMOR_MAX_STRING, "%.2i", (int)comptime.hour);
+ strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname));
}
if (interval < 21000) {
/* -------------------------------------------------------------------- */
/* from now on add 1 more level of precision since that frequency */
/* -------------------------------------------------------------------- */
- ierr = (int) ((comptime.hour - (int) (comptime.hour)) * 60.);
+ ierr = (int)((comptime.hour - (int)(comptime.hour)) * 60.);
snprintf(szTmp, CMOR_MAX_STRING, "%.2i", ierr);
- strncat(outname, szTmp,
- CMOR_MAX_STRING - strlen(outname));
+ strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname));
}
- if (interval < 3000) { /* less than an hour */
+ if (interval < 3000) { /* less than an hour */
snprintf(szTmp, CMOR_MAX_STRING, "%.2i",
- (int) ((comptime.hour - (int) (comptime.hour)) * 3600.)
- - ierr * 60);
- strncat(outname, szTmp,
- CMOR_MAX_STRING - strlen(outname));
+ (int)((comptime.hour - (int)(comptime.hour)) * 3600.)
+ - ierr * 60);
+ strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname));
}
/* -------------------------------------------------------------------- */
@@ -1502,9 +1502,9 @@ int cmor_CV_checkFilename(cmor_CV_def_t *CV,
strncat(outname, "-", CMOR_MAX_STRING - strlen(outname));
if ((cmor_tables[0].axes[timeDim].climatology == 1)
- && (cmor_vars[0].last_bound != 1.e20)) {
+ && (cmor_vars[0].last_bound != 1.e20)) {
cdRel2Comp(icalo, szInTimeUnits, cmor_vars[0].last_bound,
- &comptime);
+ &comptime);
/* -------------------------------------------------------------------- */
/* ok apparently we don't like the new time format */
/* if it's ending at midnight exactly so I'm removing */
@@ -1531,8 +1531,7 @@ int cmor_CV_checkFilename(cmor_CV_def_t *CV,
/* -------------------------------------------------------------------- */
if (interval < 29.E6) {
snprintf(szTmp, CMOR_MAX_STRING, "%.2i", comptime.month);
- strncat(outname, szTmp,
- CMOR_MAX_STRING - strlen(outname));
+ strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname));
}
/* -------------------------------------------------------------------- */
/* less than a month */
@@ -1540,17 +1539,15 @@ int cmor_CV_checkFilename(cmor_CV_def_t *CV,
if (interval < 2.E6) {
snprintf(szTmp, CMOR_MAX_STRING, "%.2i", comptime.day);
- strncat(outname, szTmp,
- CMOR_MAX_STRING - strlen(outname));
+ strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname));
}
/* -------------------------------------------------------------------- */
/* less than a day */
/* -------------------------------------------------------------------- */
if (interval < 86000) {
- snprintf(szTmp, CMOR_MAX_STRING, "%.2i", (int) comptime.hour);
- strncat(outname, szTmp,
- CMOR_MAX_STRING - strlen(outname));
+ snprintf(szTmp, CMOR_MAX_STRING, "%.2i", (int)comptime.hour);
+ strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname));
}
/* -------------------------------------------------------------------- */
/* less than 6hr */
@@ -1561,25 +1558,22 @@ int cmor_CV_checkFilename(cmor_CV_def_t *CV,
/* from now on add 1 more level of precision since that frequency */
/* -------------------------------------------------------------------- */
- ierr = (int) ((comptime.hour - (int) (comptime.hour)) * 60.);
+ ierr = (int)((comptime.hour - (int)(comptime.hour)) * 60.);
snprintf(szTmp, CMOR_MAX_STRING, "%.2i", ierr);
- strncat(outname, szTmp,
- CMOR_MAX_STRING - strlen(outname));
+ strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname));
}
/* -------------------------------------------------------------------- */
/* less than an hour */
/* -------------------------------------------------------------------- */
if (interval < 3000) {
snprintf(szTmp, CMOR_MAX_STRING, "%.2i",
- (int) ((comptime.hour - (int) (comptime.hour)) * 3600.)
- - ierr * 60);
- strncat(outname, szTmp,
- CMOR_MAX_STRING - strlen(outname));
+ (int)((comptime.hour - (int)(comptime.hour)) * 3600.)
+ - ierr * 60);
+ strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname));
}
if (cmor_tables[0].axes[timeDim].climatology == 1) {
- strncat(outname, "-clim",
- CMOR_MAX_STRING - strlen(outname));
+ strncat(outname, "-clim", CMOR_MAX_STRING - strlen(outname));
}
}
@@ -1603,7 +1597,7 @@ int cmor_CV_checkFilename(cmor_CV_def_t *CV,
if (cmor_tables[0].axes[timeDim].climatology == 1) {
i += 5;
}
- strcpy(szTmp,"");
+ strcpy(szTmp, "");
for (j = i; j < n; j++) {
szTmp[j - i] = cmor_vars[var_id].suffix[i];
szTmp[j - i + 1] = '\0';
@@ -1619,16 +1613,16 @@ int cmor_CV_checkFilename(cmor_CV_def_t *CV,
strncat(outname, ".nc", CMOR_MAX_STRING - strlen(outname));
if (strcmp(infile, outname) != 0) {
snprintf(szTmp, CMOR_MAX_STRING, "Your filename \n! "
- "\"%s\" \n! "
- "does not match the CMIP6 requirement.\n! \n! "
- "Your output filename should be: \n! "
- "\"%s\"\n! \n! "
- "and should follow this template: \n!"
- "\"%s\"\n! \n! "
- "See your Control Vocabulary file.(%s)\n! ", infile, outname,
- cmor_current_dataset.file_template, CV_Filename);
-
- cmor_handle_error(szTmp, CMOR_NORMAL);
+ "\"%s\" \n! "
+ "does not match the CMIP6 requirement.\n! \n! "
+ "Your output filename should be: \n! "
+ "\"%s\"\n! \n! "
+ "and should follow this template: \n!"
+ "\"%s\"\n! \n! "
+ "See your Control Vocabulary file.(%s)\n! ", infile, outname,
+ cmor_current_dataset.file_template, CV_Filename);
+
+ cmor_handle_error_var(szTmp, CMOR_NORMAL, var_id);
cmor_pop_traceback();
return (-1);
}
@@ -1636,10 +1630,12 @@ int cmor_CV_checkFilename(cmor_CV_def_t *CV,
return (0);
}
+
/************************************************************************/
/* cmor_CV_setInstitution() */
/************************************************************************/
-int cmor_CV_setInstitution(cmor_CV_def_t *CV) {
+int cmor_CV_setInstitution(cmor_CV_def_t * CV)
+{
cmor_CV_def_t *CV_institution_ids;
cmor_CV_def_t *CV_institution;
@@ -1660,8 +1656,7 @@ int cmor_CV_setInstitution(cmor_CV_def_t *CV) {
rc = cmor_has_cur_dataset_attribute(CMOR_INPUTFILENAME);
if (rc == 0) {
cmor_get_cur_dataset_attribute(CMOR_INPUTFILENAME, CMOR_Filename);
- }
- else {
+ } else {
CMOR_Filename[0] = '\0';
}
cmor_get_cur_dataset_attribute(CV_INPUTFILENAME, CV_Filename);
@@ -1670,40 +1665,40 @@ int cmor_CV_setInstitution(cmor_CV_def_t *CV) {
/* Find Institution dictionaries in Control Vocabulary */
/* -------------------------------------------------------------------- */
CV_institution_ids = cmor_CV_rootsearch(CV, CV_KEY_INSTITUTION_ID);
- if(CV_institution_ids == NULL) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your \"%s\" key could not be found in\n! "
- "your Control Vocabulary file.(%s)\n! ",
- CV_KEY_INSTITUTION_ID, CV_Filename);
-
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(-1);
- }
- CV_institution = cmor_CV_search_child_key( CV_institution_ids,
- szInstitution_ID);
-
- if(CV_institution == NULL){
- snprintf( msg, CMOR_MAX_STRING,
- "The institution_id, \"%s\", found in your \n! "
- "input file (%s) could not be found in \n! "
- "your Controlled Vocabulary file. (%s) \n! \n! "
- "Please correct your input file or contact "
- "\"cmor at listserv.llnl.gov\" to register\n! "
- "a new institution_id. \n! \n! "
- "See \"http://cmor.llnl.gov/mydoc_cmor3_CV/\" for further information about\n! "
- "the \"institution_id\" and \"institution\" global attributes. " ,
- szInstitution_ID, CMOR_Filename, CV_Filename);
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(-1);
+ if (CV_institution_ids == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your \"%s\" key could not be found in\n! "
+ "your Control Vocabulary file.(%s)\n! ",
+ CV_KEY_INSTITUTION_ID, CV_Filename);
+
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
+ }
+ CV_institution = cmor_CV_search_child_key(CV_institution_ids,
+ szInstitution_ID);
+
+ if (CV_institution == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "The institution_id, \"%s\", found in your \n! "
+ "input file (%s) could not be found in \n! "
+ "your Controlled Vocabulary file. (%s) \n! \n! "
+ "Please correct your input file or contact "
+ "\"cmor at listserv.llnl.gov\" to register\n! "
+ "a new institution_id. \n! \n! "
+ "See \"http://cmor.llnl.gov/mydoc_cmor3_CV/\" for further information about\n! "
+ "the \"institution_id\" and \"institution\" global attributes. ",
+ szInstitution_ID, CMOR_Filename, CV_Filename);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
}
/* -------------------------------------------------------------------- */
/* Did the user defined an Institution Attribute? */
/* -------------------------------------------------------------------- */
- rc = cmor_has_cur_dataset_attribute( GLOBAL_ATT_INSTITUTION );
- if( rc == 0 ) {
+ rc = cmor_has_cur_dataset_attribute(GLOBAL_ATT_INSTITUTION);
+ if (rc == 0) {
/* -------------------------------------------------------------------- */
/* Retrieve institution and compare with the one we have in the */
/* Control Vocabulary file. If it does not matches tell the user */
@@ -1715,25 +1710,26 @@ int cmor_CV_setInstitution(cmor_CV_def_t *CV) {
/* -------------------------------------------------------------------- */
/* Check if an institution has been defined! If not we exit. */
/* -------------------------------------------------------------------- */
- if(CV_institution->szValue[0] == '\0'){
- snprintf( msg, CMOR_MAX_STRING,
- "There is no institution associated to institution_id \"%s\"\n! "
- "in your Control Vocabulary file.\n! "
- "Check your \"%s\" dictionary!!\n! ",
- CV_KEY_INSTITUTION_ID, szInstitution_ID);
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(-1);
+ if (CV_institution->szValue[0] == '\0') {
+ snprintf(msg, CMOR_MAX_STRING,
+ "There is no institution associated to institution_id \"%s\"\n! "
+ "in your Control Vocabulary file.\n! "
+ "Check your \"%s\" dictionary!!\n! ",
+ CV_KEY_INSTITUTION_ID, szInstitution_ID);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
}
/* -------------------------------------------------------------------- */
/* Check if they have the same string */
/* -------------------------------------------------------------------- */
- if(strncmp(szInstitution, CV_institution->szValue, CMOR_MAX_STRING) != 0){
- snprintf( msg, CMOR_MAX_STRING,
- "Your input attribute institution \"%s\" will be replaced with \n! "
- "\"%s\" as defined in your Control Vocabulary file.\n! ",
- szInstitution, CV_institution->szValue);
- cmor_handle_error( msg, CMOR_WARNING );
+ if (strncmp(szInstitution, CV_institution->szValue, CMOR_MAX_STRING) !=
+ 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your input attribute institution \"%s\" will be replaced with \n! "
+ "\"%s\" as defined in your Control Vocabulary file.\n! ",
+ szInstitution, CV_institution->szValue);
+ cmor_handle_error(msg, CMOR_WARNING);
}
}
/* -------------------------------------------------------------------- */
@@ -1742,7 +1738,7 @@ int cmor_CV_setInstitution(cmor_CV_def_t *CV) {
cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_INSTITUTION,
CV_institution->szValue, 1);
cmor_pop_traceback();
- return(0);
+ return (0);
}
/************************************************************************/
@@ -1752,19 +1748,20 @@ int cmor_CV_setInstitution(cmor_CV_def_t *CV) {
/* */
/* i.e. "mip_era": [ "CMIP6", "CMIP5" ] */
/************************************************************************/
-int cmor_CV_ValidateAttribute(cmor_CV_def_t *CV, char *szKey){
+int cmor_CV_ValidateAttribute(cmor_CV_def_t * CV, char *szKey)
+{
cmor_CV_def_t *attr_CV;
char szValue[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
char CV_Filename[CMOR_MAX_STRING];
- char szValids[CMOR_MAX_STRING*2];
- char szOutput[CMOR_MAX_STRING*2];
+ char szValids[CMOR_MAX_STRING * 2];
+ char szOutput[CMOR_MAX_STRING * 2];
int i;
regex_t regex;
int reti;
int ierr;
- cmor_add_traceback( "_CV_ValidateAttribute" );
+ cmor_add_traceback("_CV_ValidateAttribute");
szValids[0] = '\0';
szOutput[0] = '\0';
@@ -1774,72 +1771,73 @@ int cmor_CV_ValidateAttribute(cmor_CV_def_t *CV, char *szKey){
/* -------------------------------------------------------------------- */
/* This attribute does not need validation. */
/* -------------------------------------------------------------------- */
- if(attr_CV == NULL) {
- cmor_pop_traceback( );
- return(0);
+ if (attr_CV == NULL) {
+ cmor_pop_traceback();
+ return (0);
}
- ierr = cmor_get_cur_dataset_attribute( szKey, szValue );
- for(i=0; i< attr_CV->anElements; i++) {
- reti = regcomp(®ex, attr_CV->aszValue[i],0);
- if(reti) {
- snprintf( msg, CMOR_MAX_STRING,
- "You regular expression \"%s\" is invalid. \n! "
- "Check your Control Vocabulary file \"%s\".\n! ",
- attr_CV->aszValue[i], CV_Filename );
+ ierr = cmor_get_cur_dataset_attribute(szKey, szValue);
+ for (i = 0; i < attr_CV->anElements; i++) {
+ reti = regcomp(®ex, attr_CV->aszValue[i], 0);
+ if (reti) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "You regular expression \"%s\" is invalid. \n! "
+ "Check your Control Vocabulary file \"%s\".\n! ",
+ attr_CV->aszValue[i], CV_Filename);
regfree(®ex);
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(-1);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
}
/* -------------------------------------------------------------------- */
/* Execute regular expression */
/* -------------------------------------------------------------------- */
reti = regexec(®ex, szValue, 0, NULL, 0);
- if(!reti) {
+ if (!reti) {
regfree(®ex);
break;
}
regfree(®ex);
}
- if( ierr != 0) {
- cmor_pop_traceback( );
- return(-1);
+ if (ierr != 0) {
+ cmor_pop_traceback();
+ return (-1);
}
/* -------------------------------------------------------------------- */
/* We could not validate this attribute, exit. */
/* -------------------------------------------------------------------- */
- if( i == (attr_CV->anElements) ) {
- for(i=0; i< attr_CV->anElements; i++) {
+ if (i == (attr_CV->anElements)) {
+ for (i = 0; i < attr_CV->anElements; i++) {
strcat(szValids, "\"");
strncat(szValids, attr_CV->aszValue[i], CMOR_MAX_STRING);
strcat(szValids, "\" ");
}
- snprintf( szOutput, 132, "%s ...", szValids);
-
- snprintf( msg, CMOR_MAX_STRING,
- "The attribute \"%s\" could not be validated. \n! "
- "The current input value is "
- "\"%s\" which is not valid \n! "
- "Valid values must match the regular expression:"
- "\n! \t[%s] \n! \n! "
- "Check your Control Vocabulary file \"%s\".\n! ",
- szKey, szValue, szOutput, CV_Filename);
-
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(-1);
- }
- cmor_pop_traceback( );
- return(0);
+ snprintf(szOutput, 132, "%s ...", szValids);
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "The attribute \"%s\" could not be validated. \n! "
+ "The current input value is "
+ "\"%s\" which is not valid \n! "
+ "Valid values must match the regular expression:"
+ "\n! \t[%s] \n! \n! "
+ "Check your Control Vocabulary file \"%s\".\n! ",
+ szKey, szValue, szOutput, CV_Filename);
+
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
+ }
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_CV_checkGrids() */
/************************************************************************/
-int cmor_CV_checkGrids(cmor_CV_def_t *CV) {
+int cmor_CV_checkGrids(cmor_CV_def_t * CV)
+{
int rc;
char szGridLabel[CMOR_MAX_STRING];
char szGridResolution[CMOR_MAX_STRING];
@@ -1850,37 +1848,35 @@ int cmor_CV_checkGrids(cmor_CV_def_t *CV) {
cmor_CV_def_t *CV_grid_resolution;
int i;
- cmor_add_traceback( "_CV_checkGrids" );
+ cmor_add_traceback("_CV_checkGrids");
- rc = cmor_has_cur_dataset_attribute( GLOBAL_ATT_GRID_LABEL );
- if( rc == 0 ) {
- cmor_get_cur_dataset_attribute( GLOBAL_ATT_GRID_LABEL,
- szGridLabel);
+ rc = cmor_has_cur_dataset_attribute(GLOBAL_ATT_GRID_LABEL);
+ if (rc == 0) {
+ cmor_get_cur_dataset_attribute(GLOBAL_ATT_GRID_LABEL, szGridLabel);
}
/* -------------------------------------------------------------------- */
/* "gr followed by a digit is a valid grid (regrid) */
/* -------------------------------------------------------------------- */
- if( ( strcmp(szGridLabel, CV_KEY_GRIDLABEL_GR ) >= '0') &&
- ( strcmp(szGridLabel, CV_KEY_GRIDLABEL_GR ) <= '9')) {
+ if ((strcmp(szGridLabel, CV_KEY_GRIDLABEL_GR) >= '0') &&
+ (strcmp(szGridLabel, CV_KEY_GRIDLABEL_GR) <= '9')) {
strcpy(szGridLabel, CV_KEY_GRIDLABEL_GR);
}
- rc = cmor_has_cur_dataset_attribute( GLOBAL_ATT_GRID_RESOLUTION );
- if( rc == 0 ) {
- cmor_get_cur_dataset_attribute( GLOBAL_ATT_GRID_RESOLUTION,
- szGridResolution);
+ rc = cmor_has_cur_dataset_attribute(GLOBAL_ATT_GRID_RESOLUTION);
+ if (rc == 0) {
+ cmor_get_cur_dataset_attribute(GLOBAL_ATT_GRID_RESOLUTION,
+ szGridResolution);
}
CV_grid_labels = cmor_CV_rootsearch(CV, CV_KEY_GRID_LABELS);
- if(CV_grid_labels == NULL) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your \"grid_labels\" key could not be found in\n! "
- "your Control Vocabulary file.(%s)\n! ",
- CV_Filename);
+ if (CV_grid_labels == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your \"grid_labels\" key could not be found in\n! "
+ "your Control Vocabulary file.(%s)\n! ", CV_Filename);
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(-1);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
}
if (CV_grid_labels->anElements > 0) {
for (i = 0; i < CV_grid_labels->anElements; i++) {
@@ -1891,9 +1887,9 @@ int cmor_CV_checkGrids(cmor_CV_def_t *CV) {
}
if (i == CV_grid_labels->anElements) {
snprintf(msg, CMOR_MAX_STRING,
- "Your attribute grid_label is set to \"%s\" which is invalid."
- "\n! \n! Check your Control Vocabulary file \"%s\".\n! ",
- szGridLabel, CV_Filename);
+ "Your attribute grid_label is set to \"%s\" which is invalid."
+ "\n! \n! Check your Control Vocabulary file \"%s\".\n! ",
+ szGridLabel, CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
return (-1);
@@ -1901,14 +1897,14 @@ int cmor_CV_checkGrids(cmor_CV_def_t *CV) {
}
}
CV_grid_resolution = cmor_CV_rootsearch(CV, CV_KEY_GRID_RESOLUTION);
- if(CV_grid_resolution == NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your attribute grid_label is set to \"%s\" which is invalid."
- "\n! \n! Check your Control Vocabulary file \"%s\".\n! ",
- szGridLabel, CV_Filename);
- cmor_handle_error( msg, CMOR_NORMAL );
+ if (CV_grid_resolution == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your attribute grid_label is set to \"%s\" which is invalid."
+ "\n! \n! Check your Control Vocabulary file \"%s\".\n! ",
+ szGridLabel, CV_Filename);
+ cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
- return(-1);
+ return (-1);
}
@@ -1921,9 +1917,9 @@ int cmor_CV_checkGrids(cmor_CV_def_t *CV) {
}
if (i == CV_grid_resolution->anElements) {
snprintf(msg, CMOR_MAX_STRING,
- "Your attribute grid_resolution is set to \"%s\" which is invalid."
- "\n! \n! Check your Control Vocabulary file \"%s\".\n! ",
- szGridResolution, CV_Filename);
+ "Your attribute grid_resolution is set to \"%s\" which is invalid."
+ "\n! \n! Check your Control Vocabulary file \"%s\".\n! ",
+ szGridResolution, CV_Filename);
cmor_handle_error(msg, CMOR_NORMAL);
cmor_pop_traceback();
return (-1);
@@ -1931,58 +1927,58 @@ int cmor_CV_checkGrids(cmor_CV_def_t *CV) {
}
}
- cmor_pop_traceback( );
- return(0);
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_CV_CheckGblAttributes() */
/************************************************************************/
-int cmor_CV_checkGblAttributes( cmor_CV_def_t *CV ) {
+int cmor_CV_checkGblAttributes(cmor_CV_def_t * CV)
+{
cmor_CV_def_t *required_attrs;
int i;
int rc;
char msg[CMOR_MAX_STRING];
int bCriticalError = FALSE;
- int ierr =0;
- cmor_add_traceback( "_CV_checkGblAttributes" );
+ int ierr = 0;
+ cmor_add_traceback("_CV_checkGblAttributes");
required_attrs = cmor_CV_rootsearch(CV, CV_KEY_REQUIRED_GBL_ATTRS);
- if( required_attrs != NULL) {
- for(i=0; i< required_attrs->anElements; i++) {
- rc = cmor_has_cur_dataset_attribute( required_attrs->aszValue[i] );
- if( rc != 0) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your Control Vocabulary file specifies one or more\n! "
- "required attributes. The following\n! "
- "attribute was not properly set.\n! \n! "
- "Please set attribute: \"%s\" in your input file.",
- required_attrs->aszValue[i] );
- cmor_handle_error( msg, CMOR_NORMAL );
+ if (required_attrs != NULL) {
+ for (i = 0; i < required_attrs->anElements; i++) {
+ rc = cmor_has_cur_dataset_attribute(required_attrs->aszValue[i]);
+ if (rc != 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your Control Vocabulary file specifies one or more\n! "
+ "required attributes. The following\n! "
+ "attribute was not properly set.\n! \n! "
+ "Please set attribute: \"%s\" in your input file.",
+ required_attrs->aszValue[i]);
+ cmor_handle_error(msg, CMOR_NORMAL);
bCriticalError = TRUE;
- ierr +=-1;
+ ierr += -1;
}
rc = cmor_CV_ValidateAttribute(CV, required_attrs->aszValue[i]);
- if( rc != 0) {
+ if (rc != 0) {
bCriticalError = TRUE;
- ierr +=-1;
+ ierr += -1;
}
}
}
- if( bCriticalError ) {
- cmor_handle_error( "Please fix required attributes mentioned in\n! "
- "the warnings/error above and rerun. (aborting!)\n! "
- ,CMOR_NORMAL );
+ if (bCriticalError) {
+ cmor_handle_error("Please fix required attributes mentioned in\n! "
+ "the warnings/error above and rerun. (aborting!)\n! ",
+ CMOR_NORMAL);
}
- cmor_pop_traceback( );
- return(ierr);
+ cmor_pop_traceback();
+ return (ierr);
}
-
/************************************************************************/
/* cmor_CV_set_entry() */
/************************************************************************/
-int cmor_CV_set_entry(cmor_table_t* table,
- json_object *value) {
+int cmor_CV_set_entry(cmor_table_t * table, json_object * value)
+{
extern int cmor_ntables;
int nCVId;
int nbObjects = 0;
@@ -2001,9 +1997,9 @@ int cmor_CV_set_entry(cmor_table_t* table,
newCV = (cmor_CV_def_t *) realloc(cmor_table->CV, sizeof(cmor_CV_def_t));
cmor_table->CV = newCV;
- CV=newCV;
+ CV = newCV;
cmor_CV_init(CV, cmor_ntables);
- cmor_table->CV->nbObjects=nbObjects;
+ cmor_table->CV->nbObjects = nbObjects;
/* -------------------------------------------------------------------- */
/* Add all values and dictionaries to the M-tree */
@@ -2020,7 +2016,7 @@ int cmor_CV_set_entry(cmor_table_t* table,
json_object_object_foreach(value, CVName, CVValue) {
nbObjects++;
newCV = (cmor_CV_def_t *) realloc(cmor_table->CV,
- nbObjects * sizeof(cmor_CV_def_t));
+ nbObjects * sizeof(cmor_CV_def_t));
cmor_table->CV = newCV;
nCVId = cmor_table->CV->nbObjects;
@@ -2029,7 +2025,7 @@ int cmor_CV_set_entry(cmor_table_t* table,
cmor_CV_init(CV, cmor_ntables);
cmor_table->CV->nbObjects++;
- if( CVName[0] == '#') {
+ if (CVName[0] == '#') {
continue;
}
cmor_CV_set_att(CV, CVName, CVValue);
@@ -2040,19 +2036,19 @@ int cmor_CV_set_entry(cmor_table_t* table,
return (0);
}
-
/************************************************************************/
/* cmor_CV_checkTime() */
/************************************************************************/
-int cmor_CV_checkISOTime(char *szAttribute) {
+int cmor_CV_checkISOTime(char *szAttribute)
+{
struct tm tm;
int rc;
char *szReturn;
char szDate[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
- rc = cmor_has_cur_dataset_attribute(szAttribute );
- if( rc == 0 ) {
+ rc = cmor_has_cur_dataset_attribute(szAttribute);
+ if (rc == 0) {
/* -------------------------------------------------------------------- */
/* Retrieve Date */
/* -------------------------------------------------------------------- */
@@ -2062,44 +2058,42 @@ int cmor_CV_checkISOTime(char *szAttribute) {
/* Check data format */
/* -------------------------------------------------------------------- */
memset(&tm, 0, sizeof(struct tm));
- szReturn=strptime(szDate, "%FT%H:%M:%SZ", &tm);
- if(szReturn == NULL) {
- snprintf( msg, CMOR_MAX_STRING,
- "Your global attribute "
- "\"%s\" set to \"%s\" is not a valid date.\n! "
- "ISO 8601 date format \"YYYY-MM-DDTHH:MM:SSZ\" is required."
- "\n! ", szAttribute, szDate);
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(-1);
- }
- cmor_pop_traceback( );
- return(0);
+ szReturn = strptime(szDate, "%FT%H:%M:%SZ", &tm);
+ if (szReturn == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Your global attribute "
+ "\"%s\" set to \"%s\" is not a valid date.\n! "
+ "ISO 8601 date format \"YYYY-MM-DDTHH:MM:SSZ\" is required."
+ "\n! ", szAttribute, szDate);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (-1);
+ }
+ cmor_pop_traceback();
+ return (0);
}
-
-
/************************************************************************/
/* cmor_CV_variable() */
/************************************************************************/
-int cmor_CV_variable( int *var_id, char *name, char *units, float *missing,
- float startime, float endtime,
- float startimebnds, float endtimebnds) {
+int cmor_CV_variable(int *var_id, char *name, char *units, float *missing,
+ float startime, float endtime,
+ float startimebnds, float endtimebnds)
+{
- int vrid=-1;
+ int vrid = -1;
int i;
int iref;
char msg[CMOR_MAX_STRING];
char ctmp[CMOR_MAX_STRING];
cmor_var_def_t refvar;
- cmor_is_setup( );
+ cmor_is_setup();
- cmor_add_traceback( "cmor_CV_variable" );
+ cmor_add_traceback("cmor_CV_variable");
- if( CMOR_TABLE == -1 ) {
- cmor_handle_error( "You did not define a table yet!",
- CMOR_CRITICAL );
+ if (CMOR_TABLE == -1) {
+ cmor_handle_error("You did not define a table yet!", CMOR_CRITICAL);
}
/* -------------------------------------------------------------------- */
@@ -2107,9 +2101,9 @@ int cmor_CV_variable( int *var_id, char *name, char *units, float *missing,
/* found then error */
/* -------------------------------------------------------------------- */
iref = -1;
- cmor_trim_string( name, ctmp );
- for( i = 0; i < cmor_tables[CMOR_TABLE].nvars + 1; i++ ) {
- if( strcmp( cmor_tables[CMOR_TABLE].vars[i].id, ctmp ) == 0 ) {
+ cmor_trim_string(name, ctmp);
+ for (i = 0; i < cmor_tables[CMOR_TABLE].nvars + 1; i++) {
+ if (strcmp(cmor_tables[CMOR_TABLE].vars[i].id, ctmp) == 0) {
iref = i;
break;
}
@@ -2127,22 +2121,20 @@ int cmor_CV_variable( int *var_id, char *name, char *units, float *missing,
}
}
- if( iref == -1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Could not find a matching variable for name: '%s'",
- ctmp );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (iref == -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Could not find a matching variable for name: '%s'", ctmp);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
refvar = cmor_tables[CMOR_TABLE].vars[iref];
- for( i = 0; i < CMOR_MAX_VARIABLES; i++ ) {
- if( cmor_vars[i].self == -1 ) {
+ for (i = 0; i < CMOR_MAX_VARIABLES; i++) {
+ if (cmor_vars[i].self == -1) {
vrid = i;
break;
}
}
-
cmor_vars[vrid].ref_table_id = CMOR_TABLE;
cmor_vars[vrid].ref_var_id = iref;
@@ -2150,17 +2142,16 @@ int cmor_CV_variable( int *var_id, char *name, char *units, float *missing,
/* init some things */
/* -------------------------------------------------------------------- */
- strcpy( cmor_vars[vrid].suffix, "" );
- strcpy( cmor_vars[vrid].base_path, "" );
- strcpy( cmor_vars[vrid].current_path, "" );
+ strcpy(cmor_vars[vrid].suffix, "");
+ strcpy(cmor_vars[vrid].base_path, "");
+ strcpy(cmor_vars[vrid].current_path, "");
cmor_vars[vrid].suffix_has_date = 0;
/* -------------------------------------------------------------------- */
/* output missing value */
/* -------------------------------------------------------------------- */
- cmor_vars[vrid].omissing =
- ( double ) cmor_tables[CMOR_TABLE].missing_value;
+ cmor_vars[vrid].omissing = (double)cmor_tables[CMOR_TABLE].missing_value;
/* -------------------------------------------------------------------- */
/* copying over values from ref var */
@@ -2178,7 +2169,6 @@ int cmor_CV_variable( int *var_id, char *name, char *units, float *missing,
cmor_vars[vrid].first_time = startime;
cmor_vars[vrid].last_time = endtime;
-
if (refvar.out_name[0] == '\0') {
strncpy(cmor_vars[vrid].id, name, CMOR_MAX_STRING);
} else {
@@ -2186,25 +2176,25 @@ int cmor_CV_variable( int *var_id, char *name, char *units, float *missing,
}
cmor_set_variable_attribute_internal(vrid,
- VARIABLE_ATT_STANDARDNAME, 'c',
- refvar.standard_name);
+ VARIABLE_ATT_STANDARDNAME, 'c',
+ refvar.standard_name);
cmor_set_variable_attribute_internal(vrid,
- VARIABLE_ATT_LONGNAME, 'c',
- refvar.long_name);
+ VARIABLE_ATT_LONGNAME, 'c',
+ refvar.long_name);
if ((refvar.flag_values != NULL) && (refvar.flag_values[0] != '\0')) {
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_FLAGVALUES, 'c',
- refvar.flag_values);
+ refvar.flag_values);
}
if ((refvar.flag_meanings != NULL) && (refvar.flag_meanings[0] != '\0')) {
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_FLAGMEANINGS,
- 'c', refvar.flag_meanings);
+ 'c', refvar.flag_meanings);
}
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_COMMENT, 'c',
- refvar.comment);
+ refvar.comment);
if (strcmp(refvar.units, "?") == 0) {
strncpy(cmor_vars[vrid].ounits, units, CMOR_MAX_STRING);
@@ -2214,55 +2204,50 @@ int cmor_CV_variable( int *var_id, char *name, char *units, float *missing,
if (refvar.type != 'c') {
cmor_set_variable_attribute_internal(vrid,
- VARIABLE_ATT_UNITS,
- 'c',
- cmor_vars[vrid].ounits);
+ VARIABLE_ATT_UNITS,
+ 'c', cmor_vars[vrid].ounits);
}
strncpy(cmor_vars[vrid].iunits, units, CMOR_MAX_STRING);
- cmor_set_variable_attribute_internal( vrid, VARIABLE_ATT_CELLMETHODS,
- 'c',
- refvar.cell_methods );
+ cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_CELLMETHODS,
+ 'c', refvar.cell_methods);
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_CELLMEASURES, 'c',
- refvar.cell_measures);
+ refvar.cell_measures);
if (refvar.positive == 'u') {
if (cmor_is_required_variable_attribute(refvar, VARIABLE_ATT_POSITIVE)
- == 0) {
+ == 0) {
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_POSITIVE,
- 'c', "up");
+ 'c', "up");
}
} else if (refvar.positive == 'd') {
if (cmor_is_required_variable_attribute(refvar, VARIABLE_ATT_POSITIVE)
- == 0) {
+ == 0) {
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_POSITIVE,
- 'c', "down");
+ 'c', "down");
}
}
- if( refvar.type == '\0' ) {
+ if (refvar.type == '\0') {
cmor_vars[vrid].type = 'f';
- }
- else {
+ } else {
cmor_vars[vrid].type = refvar.type;
}
-
-
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_MISSINGVALUES,
- 'f', missing);
+ 'f', missing);
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_FILLVAL, 'f',
- missing);
+ missing);
cmor_vars[vrid].self = vrid;
*var_id = vrid;
- cmor_pop_traceback( );
- return( 0 );
+ cmor_pop_traceback();
+ return (0);
};
diff --git a/Src/cmor_axes.c b/Src/cmor_axes.c
index 678e59d..a85d6dd 100644
--- a/Src/cmor_axes.c
+++ b/Src/cmor_axes.c
@@ -11,41 +11,43 @@ int cuErrOpts = CU_VERBOSE;
/************************************************************************/
/* cmor_calendar_c2i() */
/************************************************************************/
-int cmor_calendar_c2i( char *calendar, cdCalenType * ical ) {
-
- cmor_add_traceback( "cmor_calendar_c2i" );
-
- cmor_is_setup( );
-
- if( strcmp( calendar, "gregorian" ) == 0 )
- *ical = cdMixed;
- else if( strcmp( calendar, "standard" ) == 0 )
- *ical = cdMixed;
- else if( strcmp( calendar, "proleptic_gregorian" ) == 0 )
- *ical = cdStandard;
- else if( strcmp( calendar, "noleap" ) == 0 )
- *ical = cdNoLeap;
- else if( strcmp( calendar, "365_day" ) == 0 )
- *ical = cdNoLeap;
- else if( strcmp( calendar, "360_day" ) == 0 )
- *ical = cd360;
- else if( strcmp( calendar, "julian" ) == 0 )
- *ical = cdJulian;
- else if( strcmp( calendar, "none" ) == 0 )
- *ical = cdClim;
+int cmor_calendar_c2i(char *calendar, cdCalenType * ical)
+{
+
+ cmor_add_traceback("cmor_calendar_c2i");
+
+ cmor_is_setup();
+
+ if (strcmp(calendar, "gregorian") == 0)
+ *ical = cdMixed;
+ else if (strcmp(calendar, "standard") == 0)
+ *ical = cdMixed;
+ else if (strcmp(calendar, "proleptic_gregorian") == 0)
+ *ical = cdStandard;
+ else if (strcmp(calendar, "noleap") == 0)
+ *ical = cdNoLeap;
+ else if (strcmp(calendar, "365_day") == 0)
+ *ical = cdNoLeap;
+ else if (strcmp(calendar, "360_day") == 0)
+ *ical = cd360;
+ else if (strcmp(calendar, "julian") == 0)
+ *ical = cdJulian;
+ else if (strcmp(calendar, "none") == 0)
+ *ical = cdClim;
else {
- cmor_pop_traceback( );
- return ( 1 );
+ cmor_pop_traceback();
+ return (1);
}
- cmor_pop_traceback( );
- return ( 0 );
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_convert_interval_to_seconds() */
/************************************************************************/
-double cmor_convert_interval_to_seconds( double interv, char *inunits ) {
-
+double cmor_convert_interval_to_seconds(double interv, char *inunits)
+{
+
/* -------------------------------------------------------------------- */
/* this converts times values from some units */
/* to some others */
@@ -59,98 +61,94 @@ double cmor_convert_interval_to_seconds( double interv, char *inunits ) {
cv_converter *ut_cmor_converter = NULL;
double tmp;
- cmor_add_traceback( "cmor_convert_interval_to_seconds" );
+ cmor_add_traceback("cmor_convert_interval_to_seconds");
- strcpy( msg, "seconds" );
+ strcpy(msg, "seconds");
- ut_trim( msg, UT_ASCII );
- cmor_units = ut_parse( ut_read, msg, UT_ASCII );
+ ut_trim(msg, UT_ASCII);
+ cmor_units = ut_parse(ut_read, msg, UT_ASCII);
sshort[5] = '\0';
-
+
/* -------------------------------------------------------------------- */
/* first we need to figure out the out units */
/* step 1 look for the since keyword */
/* -------------------------------------------------------------------- */
- n = strlen( inunits );
+ n = strlen(inunits);
oui = -1;
- for( i = 0; i < n; i++ ) {
- strncpy( sshort, &inunits[i], 5 );
- if( strcmp( sshort, "since" ) == 0 ) {
- oui = i;
- break;
- }
- }
- if( oui == -1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Time units conversion, output units must\n! "
- "contain the 'since' word, you defined: %s",
- inunits );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- strncpy( msg, inunits, oui - 1 );
+ for (i = 0; i < n; i++) {
+ strncpy(sshort, &inunits[i], 5);
+ if (strcmp(sshort, "since") == 0) {
+ oui = i;
+ break;
+ }
+ }
+ if (oui == -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Time units conversion, output units must\n! "
+ "contain the 'since' word, you defined: %s", inunits);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ strncpy(msg, inunits, oui - 1);
msg[oui - 1] = '\0';
/* -------------------------------------------------------------------- */
/* ok at this point we need to convert */
/* this in some base units: seconds */
/* -------------------------------------------------------------------- */
- ut_trim( msg, UT_ASCII );
-
- user_units = ut_parse( ut_read, msg, UT_ASCII );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "In udunits parsing user units: %s", msg );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- if( ut_are_convertible( cmor_units, user_units ) == 0 ) {
- snprintf( ctmp, CMOR_MAX_STRING,
- "axis interval units (%s) are incompatible with seconds",
- msg );
- ut_free( user_units );
- ut_free( cmor_units );
- cmor_handle_error( ctmp, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
- ut_cmor_converter = ut_get_converter( user_units, cmor_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING, "In udunits getting converter" );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- tmp = cv_convert_double( ut_cmor_converter, interv );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING, "In udunits converting" );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- cv_free( ut_cmor_converter );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing converter" );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- ut_free( user_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING, "Udunits: Error freeing units" );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- ut_free( cmor_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING, "Udunits: Error freeing units" );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- cmor_pop_traceback( );
- return ( tmp );
-}
+ ut_trim(msg, UT_ASCII);
+
+ user_units = ut_parse(ut_read, msg, UT_ASCII);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "In udunits parsing user units: %s", msg);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ if (ut_are_convertible(cmor_units, user_units) == 0) {
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "axis interval units (%s) are incompatible with seconds", msg);
+ ut_free(user_units);
+ ut_free(cmor_units);
+ cmor_handle_error(ctmp, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ ut_cmor_converter = ut_get_converter(user_units, cmor_units);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "In udunits getting converter");
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ tmp = cv_convert_double(ut_cmor_converter, interv);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "In udunits converting");
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ cv_free(ut_cmor_converter);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "Udunits: Error freeing converter");
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ ut_free(user_units);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "Udunits: Error freeing units");
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ ut_free(cmor_units);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "Udunits: Error freeing units");
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ cmor_pop_traceback();
+ return (tmp);
+}
/************************************************************************/
/* cmor_convert_time_units() */
/************************************************************************/
-int cmor_convert_time_units( char *inunits, char *outunits,
- char *loutunits ) {
+int cmor_convert_time_units(char *inunits, char *outunits, char *loutunits)
+{
/* -------------------------------------------------------------------- */
/* this converts times values from some units to some others */
/* -------------------------------------------------------------------- */
@@ -159,72 +157,72 @@ int cmor_convert_time_units( char *inunits, char *outunits,
char sshort[6];
int hasqm;
- cmor_add_traceback( "cmor_convert_time_units" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_convert_time_units");
+ cmor_is_setup();
sshort[5] = '\0';
/* first we need to figure out the out units */
/* step 1 look for the since keyword */
- n = strlen( outunits );
+ n = strlen(outunits);
oui = -1;
- for( i = 0; i < n; i++ ) {
- strncpy( sshort, &outunits[i], 5 );
- if( strcmp( sshort, "since" ) == 0 ) {
- oui = i;
- break;
- }
+ for (i = 0; i < n; i++) {
+ strncpy(sshort, &outunits[i], 5);
+ if (strcmp(sshort, "since") == 0) {
+ oui = i;
+ break;
+ }
}
- if( oui == -1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Time units conversion, output units must contain\n! "
- "the 'since' word" );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (oui == -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Time units conversion, output units must contain\n! "
+ "the 'since' word");
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
/* ok now check if output units have a "?" */
hasqm = -1;
- for( i = oui + 5; i < n; i++ )
- if( outunits[i] == '?' ) {
- hasqm = i;
- break;
- }
+ for (i = oui + 5; i < n; i++)
+ if (outunits[i] == '?') {
+ hasqm = i;
+ break;
+ }
/* here we check for the since in user units */
- n = strlen( inunits );
+ n = strlen(inunits);
iui = -1;
- for( i = 0; i < n; i++ ) {
- strncpy( sshort, &inunits[i], 5 );
- if( strcmp( sshort, "since" ) == 0 ) {
- iui = i;
- break;
- }
- }
- if( iui == -1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Time units conversion, input units must contain the\n! "
- "'since' word" );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ for (i = 0; i < n; i++) {
+ strncpy(sshort, &inunits[i], 5);
+ if (strcmp(sshort, "since") == 0) {
+ iui = i;
+ break;
+ }
+ }
+ if (iui == -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Time units conversion, input units must contain the\n! "
+ "'since' word");
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
/* now construct the output units in case of a ? */
- if( hasqm != -1 ) { /* there is a ? */
- strncpy( loutunits, outunits, oui );
- loutunits[oui] = '\0';
- strcpy( msg, &inunits[iui] );
- strncat( loutunits, msg, CMOR_MAX_STRING - strlen( loutunits ) );
- } else { /* fully defined output units */
- strncpy( loutunits, outunits, CMOR_MAX_STRING );
- }
- cmor_pop_traceback( );
- return ( 0 );
+ if (hasqm != -1) { /* there is a ? */
+ strncpy(loutunits, outunits, oui);
+ loutunits[oui] = '\0';
+ strcpy(msg, &inunits[iui]);
+ strncat(loutunits, msg, CMOR_MAX_STRING - strlen(loutunits));
+ } else { /* fully defined output units */
+ strncpy(loutunits, outunits, CMOR_MAX_STRING);
+ }
+ cmor_pop_traceback();
+ return (0);
}
-
/************************************************************************/
/* cmor_convert_time_values() */
/************************************************************************/
-int cmor_convert_time_values( void *values_in, char type, int nvalues,
- double *values_out, char *inunits,
- char *outunits, char *calin, char *calout ) {
+int cmor_convert_time_values(void *values_in, char type, int nvalues,
+ double *values_out, char *inunits,
+ char *outunits, char *calin, char *calout)
+{
/* -------------------------------------------------------------------- */
/* this converts times values from some units to some others */
/* -------------------------------------------------------------------- */
@@ -235,232 +233,228 @@ int cmor_convert_time_values( void *values_in, char type, int nvalues,
cdCalenType icali, icalo;
cdCompTime comptime;
- cmor_add_traceback( "cmor_convert_time_values" );
- cmor_is_setup( );
-
-
- if( cmor_calendar_c2i( calin, &icali ) != 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Cannot convert times for calendar: %s", calin );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
- if( cmor_calendar_c2i( calout, &icalo ) != 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Cannot convert times for calendar: %s", calout );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
-
- i = cmor_convert_time_units( inunits, outunits, &loutunits[0] );
- for( i = 0; i < nvalues; i++ ) {
- if( type == 'd' )
- dtmp = ( double ) ( ( double * ) values_in )[i];
- else if( type == 'f' )
- dtmp = ( double ) ( ( float * ) values_in )[i];
- else if( type == 'l' )
- dtmp = ( double ) ( ( long * ) values_in )[i];
- else if( type == 'i' )
- dtmp = ( double ) ( ( int * ) values_in )[i];
- else {
- snprintf( msg, CMOR_MAX_STRING,
- "cannot convert time value from '%c' type", type );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ cmor_add_traceback("cmor_convert_time_values");
+ cmor_is_setup();
+
+ if (cmor_calendar_c2i(calin, &icali) != 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Cannot convert times for calendar: %s", calin);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ if (cmor_calendar_c2i(calout, &icalo) != 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Cannot convert times for calendar: %s", calout);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+
+ i = cmor_convert_time_units(inunits, outunits, &loutunits[0]);
+ for (i = 0; i < nvalues; i++) {
+ if (type == 'd')
+ dtmp = (double)((double *)values_in)[i];
+ else if (type == 'f')
+ dtmp = (double)((float *)values_in)[i];
+ else if (type == 'l')
+ dtmp = (double)((long *)values_in)[i];
+ else if (type == 'i')
+ dtmp = (double)((int *)values_in)[i];
+ else {
+ snprintf(msg, CMOR_MAX_STRING,
+ "cannot convert time value from '%c' type", type);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
/* -------------------------------------------------------------------- */
/* ok makes a comptime out of input */
/* -------------------------------------------------------------------- */
- cdRel2Comp( icali, &inunits[0], dtmp, &comptime );
-
+ cdRel2Comp(icali, &inunits[0], dtmp, &comptime);
+
/* -------------------------------------------------------------------- */
/* ok now converts that back to a rel units with outunits */
/* -------------------------------------------------------------------- */
- cdComp2Rel( icalo, comptime, loutunits, &dtmp );
- values_out[i] = dtmp;
+ cdComp2Rel(icalo, comptime, loutunits, &dtmp);
+ values_out[i] = dtmp;
}
- cmor_pop_traceback( );
- return ( 0 );
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_set_axis_attribute() */
/************************************************************************/
-int cmor_set_axis_attribute( int id, char *attribute_name, char type,
- void *value ) {
+int cmor_set_axis_attribute(int id, char *attribute_name, char type,
+ void *value)
+{
extern cmor_axis_t cmor_axes[];
char msg[CMOR_MAX_STRING];
int i, index;
- cmor_add_traceback( "cmor_set_axis_attribute" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_set_axis_attribute");
+ cmor_is_setup();
index = -1;
- cmor_trim_string( attribute_name, msg );
+ cmor_trim_string(attribute_name, msg);
- for( i = 0; i < cmor_axes[id].nattributes; i++ ) {
- if( strcmp( cmor_axes[id].attributes[i], msg ) == 0 ) {
- index = i;
- break;
- } /* we found it */
+ for (i = 0; i < cmor_axes[id].nattributes; i++) {
+ if (strcmp(cmor_axes[id].attributes[i], msg) == 0) {
+ index = i;
+ break;
+ } /* we found it */
}
- if( index == -1 ) {
- index = cmor_axes[id].nattributes;
- cmor_axes[id].nattributes += 1;
+ if (index == -1) {
+ index = cmor_axes[id].nattributes;
+ cmor_axes[id].nattributes += 1;
}
/* --------------------------------------------------------------------- */
/* store the name */
/* --------------------------------------------------------------------- */
- strncpy( cmor_axes[id].attributes[index], msg, CMOR_MAX_STRING );
-
+ strncpy(cmor_axes[id].attributes[index], msg, CMOR_MAX_STRING);
+
cmor_axes[id].attributes_type[index] = type;
- if( type == 'c' ) {
- if( strlen( value ) > 0 )
- strncpytrim( cmor_axes[id].attributes_values_char[index],
- value, CMOR_MAX_STRING );
- } else if( type == 'f' )
- cmor_axes[id].attributes_values_num[index] =
- ( double ) *( float * ) value;
- else if( type == 'i' )
- cmor_axes[id].attributes_values_num[index] =
- ( double ) *( int * ) value;
- else if( type == 'd' )
- cmor_axes[id].attributes_values_num[index] =
- ( double ) *( double * ) value;
- else if( type == 'l' )
- cmor_axes[id].attributes_values_num[index] =
- ( double ) *( long * ) value;
+ if (type == 'c') {
+ if (strlen(value) > 0)
+ strncpytrim(cmor_axes[id].attributes_values_char[index],
+ value, CMOR_MAX_STRING);
+ } else if (type == 'f')
+ cmor_axes[id].attributes_values_num[index] = (double)*(float *)value;
+ else if (type == 'i')
+ cmor_axes[id].attributes_values_num[index] = (double)*(int *)value;
+ else if (type == 'd')
+ cmor_axes[id].attributes_values_num[index] = (double)*(double *)value;
+ else if (type == 'l')
+ cmor_axes[id].attributes_values_num[index] = (double)*(long *)value;
else {
- snprintf( msg, CMOR_MAX_STRING,
- "unknown type %c allowed types are c,i,l,f,d, for "
- "attribute %s of axis %s (table: %s)",
- type,
- attribute_name,
- cmor_axes[id].id,
- cmor_tables[cmor_axes[id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
- cmor_pop_traceback( );
- return ( 0 );
+ snprintf(msg, CMOR_MAX_STRING,
+ "unknown type %c allowed types are c,i,l,f,d, for "
+ "attribute %s of axis %s (table: %s)",
+ type,
+ attribute_name,
+ cmor_axes[id].id,
+ cmor_tables[cmor_axes[id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ cmor_pop_traceback();
+ return (0);
}
-
/************************************************************************/
/* cmor_get_axis_attribute() */
/************************************************************************/
-int cmor_get_axis_attribute( int id, char *attribute_name, char type,
- void *value ) {
+int cmor_get_axis_attribute(int id, char *attribute_name, char type,
+ void *value)
+{
extern cmor_axis_t cmor_axes[];
char msg[CMOR_MAX_STRING];
int i, index;
- cmor_add_traceback( "cmor_get_axis_attribute" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_get_axis_attribute");
+ cmor_is_setup();
index = -1;
- for( i = 0; i < cmor_axes[id].nattributes; i++ ) {
- if( strcmp( cmor_axes[id].attributes[i], attribute_name ) == 0 ) {
- index = i;
- break;
- } /* we found it */
- }
- if( index == -1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Attribute %s could not be found for axis %i (%s, table: %s)",
- attribute_name, id, cmor_axes[id].id,
- cmor_tables[cmor_axes[id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return ( 1 );
+ for (i = 0; i < cmor_axes[id].nattributes; i++) {
+ if (strcmp(cmor_axes[id].attributes[i], attribute_name) == 0) {
+ index = i;
+ break;
+ } /* we found it */
+ }
+ if (index == -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Attribute %s could not be found for axis %i (%s, table: %s)",
+ attribute_name, id, cmor_axes[id].id,
+ cmor_tables[cmor_axes[id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
}
type = cmor_axes[id].attributes_type[i];
- if( type == 'c' )
- strcpy( value, cmor_axes[id].attributes_values_char[index] );
- else if( type == 'f' )
- value = ( float * ) &cmor_axes[id].attributes_values_num[index];
- else if( type == 'i' )
- value = ( int * ) &cmor_axes[id].attributes_values_num[index];
- else if( type == 'd' )
- value = ( double * ) &cmor_axes[id].attributes_values_num[index];
- else if( type == 'l' )
- value = ( long * ) &cmor_axes[id].attributes_values_num[index];
- cmor_pop_traceback( );
- return ( 0 );
+ if (type == 'c')
+ strcpy(value, cmor_axes[id].attributes_values_char[index]);
+ else if (type == 'f')
+ value = (float *)&cmor_axes[id].attributes_values_num[index];
+ else if (type == 'i')
+ value = (int *)&cmor_axes[id].attributes_values_num[index];
+ else if (type == 'd')
+ value = (double *)&cmor_axes[id].attributes_values_num[index];
+ else if (type == 'l')
+ value = (long *)&cmor_axes[id].attributes_values_num[index];
+ cmor_pop_traceback();
+ return (0);
}
-
/************************************************************************/
/* cmor_has_axis_attribute() */
/************************************************************************/
-int cmor_has_axis_attribute( int id, char *attribute_name ) {
+int cmor_has_axis_attribute(int id, char *attribute_name)
+{
extern cmor_axis_t cmor_axes[];
int i, index;
- cmor_add_traceback( "cmor_has_axis_attribute" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_has_axis_attribute");
+ cmor_is_setup();
index = -1;
- for( i = 0; i < cmor_axes[id].nattributes; i++ ) {
- if( strcmp( cmor_axes[id].attributes[i], attribute_name ) == 0 ) {
- index = i;
- break; /* we found it */
- }
- }
- if( index == -1 ) {
- cmor_pop_traceback( );
- return ( 1 );
- }
- cmor_pop_traceback( );
- return ( 0 );
+ for (i = 0; i < cmor_axes[id].nattributes; i++) {
+ if (strcmp(cmor_axes[id].attributes[i], attribute_name) == 0) {
+ index = i;
+ break; /* we found it */
+ }
+ }
+ if (index == -1) {
+ cmor_pop_traceback();
+ return (1);
+ }
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_check_values_inside_bounds() */
/************************************************************************/
-int cmor_check_values_inside_bounds( double *values, double *bounds,
- int length, char *name ) {
+int cmor_check_values_inside_bounds(double *values, double *bounds, int length,
+ char *name)
+{
int i;
char msg[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_check_values_inside_bounds" );
- for( i = 0; i < length; i++ ) {
-
- if( ( ( bounds[2 * i] < values[i] )
- && ( bounds[2 * i + 1] < values[i] ) )
- || ( ( bounds[2 * i] > values[i] )
- && ( bounds[2 * i + 1] > values[i] ) ) ) {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %s has values not within bounds at indice:\n! "
- "%i: %lf not within: %lf, %lf",
- name, i, values[i], bounds[2 * i],
- bounds[2 * i + 1] );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- cmor_pop_traceback( );
- return ( 0 );
+ cmor_add_traceback("cmor_check_values_inside_bounds");
+ for (i = 0; i < length; i++) {
+
+ if (((bounds[2 * i] < values[i]) && (bounds[2 * i + 1] < values[i]))
+ || ((bounds[2 * i] > values[i])
+ && (bounds[2 * i + 1] > values[i]))) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %s has values not within bounds at indice:\n! "
+ "%i: %lf not within: %lf, %lf", name, i, values[i],
+ bounds[2 * i], bounds[2 * i + 1]);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_isLongitude() */
/************************************************************************/
-int cmor_isLongitude( cmor_axis_def_t * refaxis ) {
- if( ( refaxis->axis == 'X' )
- && ( strncmp( refaxis->units, "degree", 6 ) == 0 )
- && ( strcmp( refaxis->units, "degrees" ) != 0 ) )
- return ( 1 );
+int cmor_isLongitude(cmor_axis_def_t * refaxis)
+{
+ if ((refaxis->axis == 'X') && (strncmp(refaxis->units, "degree", 6) == 0)
+ && (strcmp(refaxis->units, "degrees") != 0))
+ return (1);
else
- return ( 0 );
+ return (0);
}
/************************************************************************/
/* cmor_check_monotonic() */
/************************************************************************/
-int cmor_check_monotonic( double *values, int length, char *name,
- int isbounds, int axis_id ) {
+int cmor_check_monotonic(double *values, int length, char *name, int isbounds,
+ int axis_id)
+{
int i, treatlon = 0, j = 0;
char msg[CMOR_MAX_STRING];
cmor_axis_def_t *refaxis;
@@ -468,234 +462,218 @@ int cmor_check_monotonic( double *values, int length, char *name,
int nloop;
double *values2, tmp;
- cmor_add_traceback( "cmor_check_monotonic" );
+ cmor_add_traceback("cmor_check_monotonic");
refaxis =
- &cmor_tables[cmor_axes[axis_id].ref_table_id].
- axes[cmor_axes[axis_id].ref_axis_id];
- treatlon = cmor_isLongitude( refaxis );
-/* -------------------------------------------------------------------- */
-/* ok ensure that values are monotonic */
-/* -------------------------------------------------------------------- */
-
- if( isbounds == 1 ) {
- for( i = 0; i < length / 2 - 2; i++ ) {
- if( ( ( values[2 * i] -
- values[2 * i + 2] ) / ( values[2 * i + 2] -
- values[2 * i + 4] ) ) < 0. ) {
- if( cmor_isLongitude( refaxis ) == 1 ) {
- treatlon = 1;
- } else {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %s (table: %s) has non monotonic\n! "
- "bounds values : %lf, %lf, %lf",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, values[2 * i], values[2 * i + 2],
- values[2 * i + 4] );
- if( refaxis->climatology == 0 ) {
- cmor_handle_error( msg, CMOR_CRITICAL );
- } else {
- cmor_handle_error( msg, CMOR_WARNING );
- }
- }
- }
- }
+ &cmor_tables[cmor_axes[axis_id].ref_table_id].axes[cmor_axes[axis_id].
+ ref_axis_id];
+ treatlon = cmor_isLongitude(refaxis);
+/* -------------------------------------------------------------------- */
+/* ensure that values are monotonic */
+/* -------------------------------------------------------------------- */
+ if (isbounds == 1) {
+ for (i = 0; i < length / 2 - 2; i++) {
+ if (((values[2 * i] - values[2 * i + 2])
+ * (values[2 * i + 2] - values[2 * i + 4])) < 0.) {
+ if (cmor_isLongitude(refaxis) == 1) {
+ treatlon = 1;
+ } else {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %s (table: %s) has non monotonic\n! "
+ "bounds values : %lf, %lf, %lf", name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id, values[2 * i], values[2 * i + 2],
+ values[2 * i + 4]);
+ if (refaxis->climatology == 0) {
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ } else {
+ cmor_handle_error(msg, CMOR_WARNING);
+ }
+ }
+ }
+ }
/* -------------------------------------------------------------------- */
/* ok we are dealing with a longitude */
/* need to figure out the offset.... */
/* -------------------------------------------------------------------- */
-
- if( ( refaxis->valid_max != 1.e20 ) && ( treatlon ) ) {
-
+ if ((refaxis->valid_max != 1.e20) && (treatlon)) {
/* -------------------------------------------------------------------- */
/* The VERY first thing is to make sure we are modulo 360 */
/* -------------------------------------------------------------------- */
- values2 = ( double * ) malloc( sizeof ( double ) * length );
- for( i = 0; i < length; i++ ) {
- values2[i] = fmod( values[i], 360. );
- }
-
+ values2 = (double *)malloc(sizeof(double) * length);
+ for (i = 0; i < length; i++) {
+ values2[i] = fmod(values[i], 360.);
+ }
/* -------------------------------------------------------------------- */
/* Now keep looping until we do not have up and downs */
/* -------------------------------------------------------------------- */
- mono = -1;
- nloop = 0;
- while( mono == -1 ) {
- mono = 1;
- tmp = 0;
- for( i = 0; i < length - 4; i++ ) {
- tmp =
- ( values2[i] -
- values2[i + 2] ) * ( values2[i + 2] - values2[i +
- 4] );
- if( tmp < 0 )
- break;
- }
- if( tmp < 0 ) { /* ok we flip floppped */
- tmp = values2[0];
- for( i = 0; i < length - 1; i++ ) {
- values2[i] = values2[i + 1];
- }
- values2[i] = tmp;
- mono = -1;
- nloop += 1;
- if( nloop == length ) {
- sprintf( msg,
- "longitude axis bounds are not monotonic,\n! "
- "axis %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].
- ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- }
-
- if( length > 2 ) {
- if( values2[0] < values2[2] ) {
+ mono = -1;
+ nloop = 0;
+ while (mono == -1) {
+ mono = 1;
+ tmp = 0;
+ for (i = 0; i < length - 4; i++) {
+ tmp = (values2[i] - values2[i + 2])
+ * (values2[i + 2] - values2[i + 4]);
+ if (tmp < 0)
+ break;
+ }
+ if (tmp < 0) { /* ok we flip floppped */
+ tmp = values2[0];
+ for (i = 0; i < length - 1; i++) {
+ values2[i] = values2[i + 1];
+ }
+ values2[i] = tmp;
+ mono = -1;
+ nloop += 1;
+ if (nloop == length) {
+ sprintf(msg,
+ "longitude axis bounds are not monotonic,\n! "
+ "axis %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
+ }
+ if (length > 2) {
+ if (values2[0] < values2[2]) {
+
/* -------------------------------------------------------------------- */
/* First keep adding 360 until each value is */
/* greater than the previous */
/* -------------------------------------------------------------------- */
- for( i = 0; i < length - 2; i++ ) {
- while( values[i + 2] < values[i] ) {
- values[i + 2] += 360.;
- }
- }
- } else {
-
+ for (i = 0; i < length - 2; i++) {
+ while (values[i + 2] < values[i]) {
+ values[i + 2] += 360.;
+ }
+ }
+ } else {
+
/* -------------------------------------------------------------------- */
/* first keep adding 360 until each value is */
/* greater than the previous */
/* -------------------------------------------------------------------- */
- for( i = 0; i < length - 2; i++ ) {
- while( values[i + 2] > values[i] ) {
- values[i + 2] -= 360.;
- }
- }
- }
- }
- free( values2 );
+ for (i = 0; i < length - 2; i++) {
+ while (values[i + 2] > values[i]) {
+ values[i + 2] -= 360.;
+ }
+ }
+ }
+ }
+ free(values2);
/* -------------------------------------------------------------------- */
/* stored_direction */
/* -------------------------------------------------------------------- */
- if( ( length > 1 ) && ( ( ( refaxis->stored_direction == 'i' ) &&
- ( values[length - 1] < values[0] ) ) ||
- ( ( refaxis->stored_direction == 'd' ) &&
- ( values[0] < values[length - 1] ) ) ) ) {
+ if ((length > 1)
+ && (((refaxis->stored_direction == 'i')
+ && (values[length - 1] < values[0]))
+ || ((refaxis->stored_direction == 'd')
+ && (values[0] < values[length - 1])))) {
/* -------------------------------------------------------------------- */
/* need to flip that axis */
/* -------------------------------------------------------------------- */
- if( cmor_axes[axis_id].revert == 1 ) {
- snprintf( msg,
- CMOR_MAX_STRING,
- "bounds of axis %s (table: %s) need to be\n! "
- "flipped but axis values did not need to.\n! "
- "This is inconsistent",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- for( i = 0; i < length / 2; i++ ) {
- tmp = values[i];
- values[i] = values[length - 1 - i];
- values[length - 1 - i] = tmp;
- }
- }
+ if (cmor_axes[axis_id].revert == 1) {
+ snprintf(msg,
+ CMOR_MAX_STRING,
+ "bounds of axis %s (table: %s) need to be\n! "
+ "flipped but axis values did not need to.\n! "
+ "This is inconsistent", name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ for (i = 0; i < length / 2; i++) {
+ tmp = values[i];
+ values[i] = values[length - 1 - i];
+ values[length - 1 - i] = tmp;
+ }
+ }
/* -------------------------------------------------------------------- */
/* ok make sure we have data spanning only 1 modulo */
/* -------------------------------------------------------------------- */
- if( fabs( values[length - 1] - values[0] ) > 360. ) {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %s has bounds values spanning\n! "
- "more 360 degrees %lf, %lf",
- name, values[0], values[length - 1] );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (fabs(values[length - 1] - values[0]) > 360.) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %s has bounds values spanning\n! "
+ "more 360 degrees %lf, %lf", name, values[0],
+ values[length - 1]);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
/* -------------------------------------------------------------------- */
/* ok now check the monotonic again */
/* -------------------------------------------------------------------- */
- for( i = 0; i < length / 2 - 2; i++ ) {
- if( ( ( values[2 * i] -
- values[2 * i + 2] ) / ( values[2 * i + 2] -
- values[2 * i + 4] ) ) <
- 0. ) {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %s (table: %s), has really non monotonic\n! "
- "bounds values : %lf, %lf, %lf",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, values[i], values[i + 2],
- values[i + 4] );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- /* First of all need to check if bounds needs to be flipped */
- j = 1;
- for( i = 0; i < length - 2; i += 2 ) {
- if( ( values[i] < values[i + 1] )
- && ( values[i] > values[i + 2] ) ) {
- sprintf( msg,
- "Axis: '%s' (table: %s), your bounds direction seems\n! "
- "to be decreasing, but within cell %i they are stored\n! "
- "increasingly: you have [%lf, %lf], but the next set\n! "
- "is: [%lf, %lf]",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, i, values[i], values[i + 1],
- values[i + 2], values[i + 3] );
- cmor_handle_error( msg, CMOR_WARNING );
- j++;
- }
- if( ( values[i] > values[i + 1] )
- && ( values[i] < values[i + 2] ) ) {
- sprintf( msg,
- "Axis: '%s' (table: %s), your bounds direction seems\n! "
- "to be increasing, but within cell %i they are stored\n! "
- "decreasingly: you have [%lf, %lf], but the next set\n! "
- "is: [%lf, %lf]",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, i, values[i], values[i + 1],
- values[i + 2], values[i + 3] );
- cmor_handle_error( msg, CMOR_WARNING );
- j++;
- }
- }
- if( j == length / 2 ) {
- for( i = 0; i < length; i += 2 ) {
- tmp = values[i];
- values[i] = values[i + 1];
- values[i + 1] = tmp;
- }
- } else if( j != 1 ) {
- sprintf( msg,
- "Some but not all of your longitude bounds need to be\n! "
- "flipped, see warnings ot see which ones, axis: %s \n! "
- "(table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
-
+ for (i = 0; i < length / 2 - 2; i++) {
+ if (((values[2 * i] - values[2 * i + 2])
+ * (values[2 * i + 2] - values[2 * i + 4])) < 0.) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %s (table: %s), has really non monotonic\n! "
+ "bounds values : %lf, %lf, %lf", name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id, values[i], values[i + 2],
+ values[i + 4]);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
+ /* First of all need to check if bounds needs to be flipped */
+ j = 1;
+ for (i = 0; i < length - 2; i += 2) {
+ if ((values[i] < values[i + 1])
+ && (values[i] > values[i + 2])) {
+ sprintf(msg,
+ "Axis: '%s' (table: %s), your bounds direction seems\n! "
+ "to be decreasing, but within cell %i they are stored\n! "
+ "increasingly: you have [%lf, %lf], but the next set\n! "
+ "is: [%lf, %lf]", name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id, i, values[i], values[i + 1],
+ values[i + 2], values[i + 3]);
+ cmor_handle_error(msg, CMOR_WARNING);
+ j++;
+ }
+ if ((values[i] > values[i + 1])
+ && (values[i] < values[i + 2])) {
+ sprintf(msg,
+ "Axis: '%s' (table: %s), your bounds direction seems\n! "
+ "to be increasing, but within cell %i they are stored\n! "
+ "decreasingly: you have [%lf, %lf], but the next set\n! "
+ "is: [%lf, %lf]", name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id, i, values[i], values[i + 1],
+ values[i + 2], values[i + 3]);
+ cmor_handle_error(msg, CMOR_WARNING);
+ j++;
+ }
+ }
+ if (j == length / 2) {
+ for (i = 0; i < length; i += 2) {
+ tmp = values[i];
+ values[i] = values[i + 1];
+ values[i + 1] = tmp;
+ }
+ } else if (j != 1) {
+ sprintf(msg,
+ "Some but not all of your longitude bounds need to be\n! "
+ "flipped, see warnings ot see which ones, axis: %s \n! "
+ "(table: %s)", cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
/* -------------------------------------------------------------------- */
/* do not do the following in case of climatological stuff.... */
/* -------------------------------------------------------------------- */
- if( refaxis->climatology == 0 ) {
- for( i = 0; i < length - 2; i++ ) {
- //printf("i=%d: value[i]%f, [i+1]%f [i+2]%f\n",i,
- // values[i],values[i+1],values[i+2]);
- //printf("bool:%d",( values[i] < values[i + 1] ) &&
+ if (refaxis->climatology == 0) {
+ for (i = 0; i < length - 2; i++) {
+ //printf("i=%d: value[i]%f, [i+1]%f [i+2]%f\n",i,
+ // values[i],values[i+1],values[i+2]);
+ //printf("bool:%d",( values[i] < values[i + 1] ) &&
// ( values[i + 2] < values[i + 1] ));
//printf("bool:%d",(( values[i] > values[i + 1] ) &&
// ( values[i + 2] > values[i + 1] )));
@@ -703,207 +681,194 @@ int cmor_check_monotonic( double *values, int length, char *name,
/* -------------------------------------------------------------------- */
/* also check that bounds do not overlap */
/* -------------------------------------------------------------------- */
- if( ( ( values[i] < values[i + 1] ) &&
- ( values[i + 2] < values[i + 1] ) ) ||
- ( ( values[i] > values[i + 1] ) &&
- ( values[i + 2] > values[i + 1] ) ) ) {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %s (table: %s) has overlapping bounds values:\n! "
- "%lf, %lf, %lf at index: %i",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, values[i], values[i + 1],
- values[i + 2], i );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- for( i = 0; i < length - 2; i = i + 2 ) {
+ if (((values[i] < values[i + 1])
+ && (values[i + 2] < values[i + 1]))
+ || ((values[i] > values[i + 1])
+ && (values[i + 2] > values[i + 1]))) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %s (table: %s) has overlapping bounds values:\n! "
+ "%lf, %lf, %lf at index: %i", name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id, values[i], values[i + 1],
+ values[i + 2], i);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
+ for (i = 0; i < length - 2; i = i + 2) {
//printf("i=%d: [i+1]%f [i+2]%f\n",i,values[i+1],values[i+2]);
-
- if( values[i + 1] != values[i + 2] ) {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %s (table: %s) has bounds values that leave gaps\n! "
- "(index %i): %lf, %lf, %lf",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, i, values[i], values[i + 1],
- values[i + 2] );
- cmor_handle_error( msg, CMOR_WARNING );
- }
- }
- }
+ if (values[i + 1] != values[i + 2]) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %s (table: %s) has bounds values that leave gaps\n! "
+ "(index %i): %lf, %lf, %lf", name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id, i, values[i], values[i + 1],
+ values[i + 2]);
+ cmor_handle_error(msg, CMOR_WARNING);
+ }
+ }
+ }
} else {
- for( i = 0; i < length - 2; i++ ) {
- if( ( ( values[i] - values[i + 1] ) / ( values[i + 1] -
- values[i + 2] ) ) <
- 0. ) {
- if( cmor_isLongitude( refaxis ) == 1 ) {
- treatlon = 1;
- break;
- } else {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %s (table: %s) has non monotonic values:\n! "
- "%lf, %lf and %lf",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, values[i], values[i + 1],
- values[i + 2] );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- }
+ for (i = 0; i < length - 2; i++) {
+ if (((values[i] - values[i + 1]) * (values[i + 1] - values[i + 2]))
+ < 0.) {
+ if (cmor_isLongitude(refaxis) == 1) {
+ treatlon = 1;
+ break;
+ } else {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %s (table: %s) has non monotonic values:\n! "
+ "%lf, %lf and %lf", name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id, values[i], values[i + 1],
+ values[i + 2]);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
+ }
/* -------------------------------------------------------------------- */
/* ok we are dealing with a longitude */
/* need to figure out the offset.... */
/* -------------------------------------------------------------------- */
- if( ( refaxis->valid_max != 1.e20 ) && ( treatlon ) ) {
+ if ((refaxis->valid_max != 1.e20) && (treatlon)) {
/* -------------------------------------------------------------------- */
/* The VERY first thing is to make sure we are modulo 360 */
/* -------------------------------------------------------------------- */
-
- values2 = ( double * ) malloc( sizeof ( double ) * length );
- for( i = 0; i < length; i++ ) {
- values2[i] = fmod( values[i], 360. );
- }
+ values2 = (double *)malloc(sizeof(double) * length);
+ for (i = 0; i < length; i++) {
+ values2[i] = fmod(values[i], 360.);
+ }
/* -------------------------------------------------------------------- */
/* Now keep looping until we do not have up and downs */
/* -------------------------------------------------------------------- */
- mono = -1;
- nloop = 0;
- while( mono == -1 ) {
- mono = 1;
- tmp = 0;
- for( i = 0; i < length - 2; i++ ) {
- tmp =
- ( values2[i] -
- values2[i + 1] ) * ( values2[i + 1] - values2[i +
- 2] );
- if( tmp < 0 )
- break;
- }
+ mono = -1;
+ nloop = 0;
+ while (mono == -1) {
+ mono = 1;
+ tmp = 0;
+ for (i = 0; i < length - 2; i++) {
+ tmp = (values2[i] - values2[i + 1])
+ * (values2[i + 1] - values2[i + 2]);
+ if (tmp < 0)
+ break;
+ }
/* -------------------------------------------------------------------- */
/* ok we flip floppped */
/* -------------------------------------------------------------------- */
- if( tmp < 0 ) {
- tmp = values2[0];
- for( i = 0; i < length - 1; i++ ) {
- values2[i] = values2[i + 1];
- }
- values2[i] = tmp;
- mono = -1;
- nloop += 1;
- if( nloop == length ) {
- sprintf( msg,
- "longitude axis is not monotonic (axis: %s, "
- "table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].
- ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- }
-
-
- if( length > 1 ) {
- if( values2[0] < values2[1] ) {
+ if (tmp < 0) {
+ tmp = values2[0];
+ for (i = 0; i < length - 1; i++) {
+ values2[i] = values2[i + 1];
+ }
+ values2[i] = tmp;
+ mono = -1;
+ nloop += 1;
+ if (nloop == length) {
+ sprintf(msg,
+ "longitude axis is not monotonic (axis: %s, "
+ "table: %s)", cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
+ }
+
+ if (length > 1) {
+ if (values2[0] < values2[1]) {
/* -------------------------------------------------------------------- */
/* first keep adding 360 until each value */
/* is greater than the previous */
/* -------------------------------------------------------------------- */
- for( i = 0; i < length - 1; i++ ) {
- while( values[i + 1] < values[i] ) {
- values[i + 1] += 360.;
- }
- }
- } else {
+ for (i = 0; i < length - 1; i++) {
+ while (values[i + 1] < values[i]) {
+ values[i + 1] += 360.;
+ }
+ }
+ } else {
/* -------------------------------------------------------------------- */
/* first keep removing 360 until each value */
/* is lower than the previous */
/* -------------------------------------------------------------------- */
- for( i = 0; i < length - 1; i++ ) {
- while( values[i + 1] > values[i] ) {
- values[i + 1] -= 360.;
- }
- }
- }
- }
- free( values2 );
+ for (i = 0; i < length - 1; i++) {
+ while (values[i + 1] > values[i]) {
+ values[i + 1] -= 360.;
+ }
+ }
+ }
+ }
+ free(values2);
/* -------------------------------------------------------------------- */
/* stored_direction */
/* -------------------------------------------------------------------- */
- if( ( length > 1 ) &&
- ( ( ( refaxis->stored_direction == 'i' ) &&
- ( values[length - 1] < values[0] ) ) ||
- ( ( refaxis->stored_direction == 'd' ) &&
- ( values[0] < values[length - 1] ) ) ) ) {
+ if ((length > 1)
+ && (((refaxis->stored_direction == 'i')
+ && (values[length - 1] < values[0]))
+ || ((refaxis->stored_direction == 'd')
+ && (values[0] < values[length - 1])))) {
/* -------------------------------------------------------------------- */
/* need to flip that axis */
/* -------------------------------------------------------------------- */
- if( ( isbounds == 1 )
- && ( cmor_axes[axis_id].revert == 1 ) ) {
- snprintf( msg, CMOR_MAX_STRING,
- "bounds of axis %s (table: %s), need to be\n! "
- "flipped but axis values did not need to.\n! "
- "This is inconsistent",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- cmor_axes[axis_id].revert = -1;
- for( i = 0; i < length / 2; i++ ) {
- tmp = values[i];
- values[i] = values[length - 1 - i];
- values[length - 1 - i] = tmp;
- }
- }
+ if ((isbounds == 1) && (cmor_axes[axis_id].revert == 1)) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "bounds of axis %s (table: %s), need to be\n! "
+ "flipped but axis values did not need to.\n! "
+ "This is inconsistent", name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ cmor_axes[axis_id].revert = -1;
+ for (i = 0; i < length / 2; i++) {
+ tmp = values[i];
+ values[i] = values[length - 1 - i];
+ values[length - 1 - i] = tmp;
+ }
+ }
/* -------------------------------------------------------------------- */
/* ok make sure we have data spanning only 1 modulo */
/* -------------------------------------------------------------------- */
- if( fabs( values[length - 1] - values[0] ) > 360. ) {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %s (table: %s) has values spanning more\n! "
- "360 degrees %lf, %lf",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, values[0], values[length - 1] );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (fabs(values[length - 1] - values[0]) > 360.) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %s (table: %s) has values spanning more\n! "
+ "360 degrees %lf, %lf", name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id, values[0], values[length - 1]);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
/* -------------------------------------------------------------------- */
/* ok now check the monotonic again */
/* -------------------------------------------------------------------- */
- for( i = 0; i < length - 2; i++ ) {
- if( ( ( values[i] - values[i + 1] ) / ( values[i + 1] -
- values[i + 2] ) ) <
- 0. ) {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %s (table: %s) has non monotonic values : %lf, %lf and %lf",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, values[i], values[i + 1],
- values[i + 2] );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- }
- }
- cmor_pop_traceback( );
- return ( treatlon );
+ for (i = 0; i < length - 2; i++) {
+ if (((values[i] - values[i + 1])
+ * (values[i + 1] - values[i + 2])) < 0.) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %s (table: %s) has non monotonic values : %lf, %lf and %lf",
+ name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id, values[i], values[i + 1],
+ values[i + 2]);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
+ }
+ }
+ cmor_pop_traceback();
+ return (treatlon);
}
/************************************************************************/
/* cmor_treat_axis_values() */
/************************************************************************/
-int cmor_treat_axis_values( int axis_id, double *values, int length,
- int n_requested, char *units, char *name,
- int isbounds ) {
+int cmor_treat_axis_values(int axis_id, double *values, int length,
+ int n_requested, char *units, char *name,
+ int isbounds)
+{
extern ut_system *ut_read;
ut_unit *user_units, *cmor_units;
cv_converter *ut_cmor_converter;
@@ -919,460 +884,440 @@ int cmor_treat_axis_values( int axis_id, double *values, int length,
int found = 0;
double eps, eps2;
- cmor_add_traceback( "cmor_treat_axis_values" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_treat_axis_values");
+ cmor_is_setup();
axis = &cmor_axes[axis_id];
refaxis = &cmor_tables[axis->ref_table_id].axes[axis->ref_axis_id];
-
- if( refaxis->axis == 'T' ) {
+ if ((refaxis->axis == 'T') || strstr(units, "since")) {
/* -------------------------------------------------------------------- */
/* ok this part will try to convert time values to the right units */
/* -------------------------------------------------------------------- */
- cmor_get_cur_dataset_attribute( "calendar", &msg[0] );
- if( cmor_calendar_c2i( msg, &acal ) != 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "non-standard calendar... hum we will try to accommodate\n! "
- "this later" );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
+ cmor_get_cur_dataset_attribute("calendar", &msg[0]);
+ if (cmor_calendar_c2i(msg, &acal) != 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "non-standard calendar... hum we will try to accommodate\n! "
+ "this later");
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
- cmor_convert_time_values( &values[0], 'd', length, &values[0],
- units, refaxis->units, msg, msg );
+ cmor_convert_time_values(&values[0], 'd', length, &values[0],
+ units, refaxis->units, msg, msg);
- } else {
+ } else {
/* -------------------------------------------------------------------- */
/* ok using udunits to convert */
/* -------------------------------------------------------------------- */
- strcpy( local_unit, units );
- ut_trim( local_unit, UT_ASCII );
- user_units = ut_parse( ut_read, local_unit, UT_ASCII );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "In udunits analyzing units from user (%s),\n! "
- "axis %s (table: %s)",
- local_unit, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
-
- if( strcmp( refaxis->units, "?" ) == 0 )
- strcpy( local_unit, units );
- else
- strcpy( local_unit, refaxis->units );
-
- ut_trim( local_unit, UT_ASCII );
- cmor_units = ut_parse( ut_read, local_unit, UT_ASCII );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "In udunits analyzing table defined units (%s)\n! "
- "for axis: %s (table: %s)",
- local_unit, refaxis->id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
-
- if( ut_are_convertible( cmor_units, user_units ) == 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %i (%s, table: %s): cmor and user units are\n! "
- "incompatible: %s and %s",
- axis_id, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, refaxis->units, units );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
-
- ut_cmor_converter = ut_get_converter( user_units, cmor_units );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "In udunits getting converter, for axis %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
-
- cv_convert_doubles( ut_cmor_converter, values, length, values );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "In udunits converting values, for axis %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
-
- cv_free( ut_cmor_converter );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing converter, for axis %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- ut_free( cmor_units );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units, for axis %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- ut_free( user_units );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units, for axis %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- }
+ strcpy(local_unit, units);
+ ut_trim(local_unit, UT_ASCII);
+ user_units = ut_parse(ut_read, local_unit, UT_ASCII);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "In udunits analyzing units from user (%s),\n! "
+ "axis %s (table: %s)",
+ local_unit, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+
+ if (strcmp(refaxis->units, "?") == 0)
+ strcpy(local_unit, units);
+ else
+ strcpy(local_unit, refaxis->units);
+
+ ut_trim(local_unit, UT_ASCII);
+ cmor_units = ut_parse(ut_read, local_unit, UT_ASCII);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "In udunits analyzing table defined units (%s)\n! "
+ "for axis: %s (table: %s)",
+ local_unit, refaxis->id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+
+ if (ut_are_convertible(cmor_units, user_units) == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %i (%s, table: %s): cmor and user units are\n! "
+ "incompatible: %s and %s",
+ axis_id, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id,
+ refaxis->units, units);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+
+ ut_cmor_converter = ut_get_converter(user_units, cmor_units);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "In udunits getting converter, for axis %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+
+ cv_convert_doubles(ut_cmor_converter, values, length, values);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "In udunits converting values, for axis %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+
+ cv_free(ut_cmor_converter);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing converter, for axis %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ ut_free(cmor_units);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units, for axis %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ ut_free(user_units);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units, for axis %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
/* -------------------------------------------------------------------- */
/* test for requested */
/* ok is there some requested values ? */
/* -------------------------------------------------------------------- */
- if( n_requested != 0 ) {
- for( j = 0; j < n_requested; j++ ) {
- found = 0;
+ if (n_requested != 0) {
+ for (j = 0; j < n_requested; j++) {
+ found = 0;
/* -------------------------------------------------------------------- */
/* First test is it within .001 of req_values */
/* -------------------------------------------------------------------- */
- eps = ( double ) fabs( 1.e-3 *
- refaxis->tolerance *
- refaxis->requested[j] );
-
- if( j > 0 ) {
- eps2 = ( double ) fabs( refaxis->requested[j] -
- refaxis->requested[j - 1] ) *
- refaxis->tolerance;
-
- if( eps2 < eps ) {
- eps = eps2;
- }
- }
-
- for( i = 0; i < length; i++ ) {
- if( ( double ) fabs( values[i] - refaxis->requested[j] ) <= eps ) {
- found = 1;
- break;
- }
- }
-
- if( found == 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "requested value %f for axis %s (table: %s) was not found",
- refaxis->requested[j], name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- }
+ eps = (double)fabs(1.e-3 *
+ refaxis->tolerance * refaxis->requested[j]);
+
+ if (j > 0) {
+ eps2 = (double)fabs(refaxis->requested[j] -
+ refaxis->requested[j - 1]) *
+ refaxis->tolerance;
+
+ if (eps2 < eps) {
+ eps = eps2;
+ }
+ }
+ for (i = 0; i < length; i++) {
+ if ((double)fabs(values[i] - refaxis->requested[j]) <= eps) {
+ found = 1;
+ break;
+ }
+ }
+
+ if (found == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "requested value %f for axis %s (table: %s) was not found",
+ refaxis->requested[j], name,
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
+ }
/* -------------------------------------------------------------------- */
/* stored_direction */
/* -------------------------------------------------------------------- */
- if( ( length > 1 ) &&
- ( ( ( refaxis->stored_direction == 'i' ) &&
- ( values[length - 1] < values[0] ) ) ||
- ( ( refaxis->stored_direction == 'd' ) &&
- ( values[0] < values[length - 1] ) ) ) ) { /* need to flip that axis */
-
- if( ( isbounds == 1 ) && ( axis->revert == 1 ) ) {
-
- if( length > 2 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "bounds of axis %s (table: %s) need to be\n! "
- "flipped but axis values did not need to.\n! "
- "This is inconsistent",
- name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- }
-
- axis->revert = -1;
-
- for( i = 0; i < length / 2; i++ ) {
- tmp = values[i];
- values[i] = values[length - 1 - i];
- values[length - 1 - i] = tmp;
- }
- }
-
- if( isbounds == 1 ) {
+ if ((length > 1) && (((refaxis->stored_direction == 'i') && (values[length - 1] < values[0])) || ((refaxis->stored_direction == 'd') && (values[0] < values[length - 1])))) { /* need to flip that axis */
+
+ if ((isbounds == 1) && (axis->revert == 1)) {
+
+ if (length > 2) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "bounds of axis %s (table: %s) need to be\n! "
+ "flipped but axis values did not need to.\n! "
+ "This is inconsistent",
+ name,
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ }
+
+ axis->revert = -1;
+
+ for (i = 0; i < length / 2; i++) {
+ tmp = values[i];
+ values[i] = values[length - 1 - i];
+ values[length - 1 - i] = tmp;
+ }
+ }
+
+ if (isbounds == 1) {
/* --------------------------------------------------------------------- */
/* we need to see if the bounds are stored in */
/* the correct first bound/second bounds order. */
/* --------------------------------------------------------------------- */
- if( refaxis->axis != 'X' ) {
+ if (refaxis->axis != 'X') {
/* -------------------------------------------------------------------- */
/* values are going incresingly */
/* -------------------------------------------------------------------- */
- if( refaxis->stored_direction == 'i' ) {
- for( i = 0; i < length; i = i + 2 ) {
+ if (refaxis->stored_direction == 'i') {
+ for (i = 0; i < length; i = i + 2) {
/* -------------------------------------------------------------------- */
/* ok bounds are not stored first */
/* bound lower that second one */
/* -------------------------------------------------------------------- */
- if( values[i] > values[i + 1] ) {
- tmp = values[i];
- values[i] = values[i + 1];
- values[i + 1] = tmp;
- }
- }
- } else {
- for( i = 0; i < length; i = i + 2 ) {
+ if (values[i] > values[i + 1]) {
+ tmp = values[i];
+ values[i] = values[i + 1];
+ values[i + 1] = tmp;
+ }
+ }
+ } else {
+ for (i = 0; i < length; i = i + 2) {
/* -------------------------------------------------------------------- */
/* bounds are not stored first bound greater that second one */
/* -------------------------------------------------------------------- */
- if( values[i] < values[i + 1] ) {
- tmp = values[i];
- values[i] = values[i + 1];
- values[i + 1] = tmp;
- }
- }
- }
- }
-
+ if (values[i] < values[i + 1]) {
+ tmp = values[i];
+ values[i] = values[i + 1];
+ values[i + 1] = tmp;
+ }
+ }
+ }
+ }
+
/* -------------------------------------------------------------------- */
/* need to check for requested bounds */
/* -------------------------------------------------------------------- */
- if( refaxis->n_requested_bounds != 0 ) {
+ if (refaxis->n_requested_bounds != 0) {
/* -------------------------------------------------------------------- */
/* let's loop thru it but basically */
/* we need to loop every over ones */
/* -------------------------------------------------------------------- */
- for( j = 0; j < refaxis->n_requested_bounds; j++ ) {
- found = 0;
+ for (j = 0; j < refaxis->n_requested_bounds; j++) {
+ found = 0;
/* -------------------------------------------------------------------- */
/* First test is it within .001 of req_values */
/* -------------------------------------------------------------------- */
- eps =
- ( double ) fabs( 1.e-3 * refaxis->tolerance *
- refaxis->requested_bounds[j] );
- if( ( j % 2 ) == 0 ) {
- eps2 =
- ( double ) fabs( refaxis->requested_bounds[j] -
- refaxis->requested_bounds[j + 1] ) *
- refaxis->tolerance;
- } else {
- eps2 =
- ( double ) fabs( refaxis->requested_bounds[j] -
- refaxis->requested_bounds[j - 1] ) *
- refaxis->tolerance;
- }
-
- if( eps2 < eps ) {
- eps = eps2;
- }
- if( ( j % 2 ) == 0 ) {
+ eps =
+ (double)fabs(1.e-3 * refaxis->tolerance *
+ refaxis->requested_bounds[j]);
+ if ((j % 2) == 0) {
+ eps2 =
+ (double)fabs(refaxis->requested_bounds[j] -
+ refaxis->requested_bounds[j + 1]) *
+ refaxis->tolerance;
+ } else {
+ eps2 =
+ (double)fabs(refaxis->requested_bounds[j] -
+ refaxis->requested_bounds[j - 1]) *
+ refaxis->tolerance;
+ }
+
+ if (eps2 < eps) {
+ eps = eps2;
+ }
+ if ((j % 2) == 0) {
/* -------------------------------------------------------------------- */
/* it is a req beg bounds need to test against beg ones only */
/* -------------------------------------------------------------------- */
- for( i = 0; i < length; i = i + 2 ) {
+ for (i = 0; i < length; i = i + 2) {
- if( ( double ) fabs( values[i] -
- refaxis->requested_bounds[j] ) <= eps ) {
- found = 1;
- break;
- }
- }
- } else {
+ if ((double)fabs(values[i] -
+ refaxis->requested_bounds[j]) <= eps) {
+ found = 1;
+ break;
+ }
+ }
+ } else {
/* -------------------------------------------------------------------- */
/* it is a second bounds, need to test against second nes only */
/* -------------------------------------------------------------------- */
- for( i = 1; i < length; i = i + 2 ) {
-
- if( ( double ) fabs( values[i] -
- refaxis->requested_bounds[j] ) <= eps ) {
- found = 1;
- break;
- }
- }
- }
- if( found == 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "requested value %f for axis %s (table: %s)\n! "
- "was not found",
- refaxis->requested_bounds[j], name,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- }
-
- }
-
-
- if( refaxis->valid_min != 1.e20 )
- for( i = 0; i < length; i++ )
- if( values[i] < refaxis->valid_min ) {
- if( cmor_isLongitude( refaxis ) == 1 ) {
- treatlon = 1;
- } else {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %s (table: %s), detected value at: %f when\n! "
- "valid_min is %f",
- name,
- cmor_tables[cmor_axes[axis_id].
- ref_table_id].szTable_id,
- values[i], refaxis->valid_min );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
- }
-
- if( treatlon == 1 ) {
+ for (i = 1; i < length; i = i + 2) {
+
+ if ((double)fabs(values[i] -
+ refaxis->requested_bounds[j]) <= eps) {
+ found = 1;
+ break;
+ }
+ }
+ }
+ if (found == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "requested value %f for axis %s (table: %s)\n! "
+ "was not found",
+ refaxis->requested_bounds[j], name,
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
+ }
+
+ }
+
+ if (refaxis->valid_min != 1.e20)
+ for (i = 0; i < length; i++)
+ if (values[i] < refaxis->valid_min) {
+ if (cmor_isLongitude(refaxis) == 1) {
+ treatlon = 1;
+ } else {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %s (table: %s), detected value at: %f when\n! "
+ "valid_min is %f",
+ name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id, values[i], refaxis->valid_min);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ }
+
+ if (treatlon == 1) {
/* -------------------------------------------------------------------- */
/* Dealing with coords */
/* -------------------------------------------------------------------- */
- if( isbounds == 0 ) {
+ if (isbounds == 0) {
/* -------------------------------------------------------------------- */
/* lets add 360. until it's all good */
/* -------------------------------------------------------------------- */
- for( i = 0; i < length; i++ )
- while( values[i] < refaxis->valid_min ) {
- values[i] += 360.;
- cmor_axes[axis_id].wrapping[i] += 1;
- }
+ for (i = 0; i < length; i++)
+ while (values[i] < refaxis->valid_min) {
+ values[i] += 360.;
+ cmor_axes[axis_id].wrapping[i] += 1;
+ }
/* -------------------------------------------------------------------- */
/* now need to determine the offset */
/* -------------------------------------------------------------------- */
- for( i = 0; i < length - 1; i++ ) {
- if( values[i] > values[i + 1] ) {
- axis->offset = i + 1;
- break;
- }
- }
- }
- }
- treatlon = 0;
- if( refaxis->valid_max != 1.e20 )
- for( i = 0; i < length; i++ )
- if( values[i] > refaxis->valid_max ) {
- if( cmor_isLongitude( refaxis ) == 1 ) {
- treatlon = 1;
- } else {
- snprintf( msg, CMOR_MAX_STRING,
- "axis %s (table: %s) , detected value at:\n! "
- "%f when valid_max is %f",
- name,
- cmor_tables[cmor_axes[axis_id].
- ref_table_id].szTable_id,
- values[i], refaxis->valid_max );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
- }
-
- if( ( treatlon == 1 ) && ( isbounds == 0 ) ) {
+ for (i = 0; i < length - 1; i++) {
+ if (values[i] > values[i + 1]) {
+ axis->offset = i + 1;
+ break;
+ }
+ }
+ }
+ }
+ treatlon = 0;
+ if (refaxis->valid_max != 1.e20)
+ for (i = 0; i < length; i++)
+ if (values[i] > refaxis->valid_max) {
+ if (cmor_isLongitude(refaxis) == 1) {
+ treatlon = 1;
+ } else {
+ snprintf(msg, CMOR_MAX_STRING,
+ "axis %s (table: %s) , detected value at:\n! "
+ "%f when valid_max is %f",
+ name,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].
+ szTable_id, values[i], refaxis->valid_max);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ }
+
+ if ((treatlon == 1) && (isbounds == 0)) {
/* -------------------------------------------------------------------- */
/* ok lets add 360. until it's all good */
/* -------------------------------------------------------------------- */
- for( i = 0; i < length; i++ ) {
- while( values[i] > refaxis->valid_max ) {
- values[i] -= 360.;
- cmor_axes[axis_id].wrapping[i] -= 1;
- }
- }
+ for (i = 0; i < length; i++) {
+ while (values[i] > refaxis->valid_max) {
+ values[i] -= 360.;
+ cmor_axes[axis_id].wrapping[i] -= 1;
+ }
+ }
/* -------------------------------------------------------------------- */
/* ok now need to determine the offset */
/* -------------------------------------------------------------------- */
- for( i = 0; i < length - 1; i++ ) {
- if( values[i] > values[i + 1] ) {
- axis->offset = i + 1;
- break;
- }
- }
- }
- if( ( isbounds == 1 ) && ( cmor_isLongitude( refaxis ) == 1 ) ) {
- for( i = 0; i < length / 2; i++ ) {
- values[2 * i] += 360. * cmor_axes[axis_id].wrapping[i];
- values[2 * i + 1] += 360. * cmor_axes[axis_id].wrapping[i];
- }
- }
+ for (i = 0; i < length - 1; i++) {
+ if (values[i] > values[i + 1]) {
+ axis->offset = i + 1;
+ break;
+ }
+ }
+ }
+ if ((isbounds == 1) && (cmor_isLongitude(refaxis) == 1)) {
+ for (i = 0; i < length / 2; i++) {
+ values[2 * i] += 360. * cmor_axes[axis_id].wrapping[i];
+ values[2 * i + 1] += 360. * cmor_axes[axis_id].wrapping[i];
+ }
+ }
/* -------------------------------------------------------------------- */
/* move the offset thing */
/* -------------------------------------------------------------------- */
- if( axis->offset != 0 ) {
- if( isbounds == 0 ) {
- tmplon = malloc( axis->offset * sizeof ( double ) );
- for( i = 0; i < axis->offset; i++ ) {
- tmplon[i] = values[i];
- }
- for( i = axis->offset; i < length; i++ ) {
- values[i - axis->offset] = values[i];
- }
- for( i = 0; i < axis->offset; i++ ) {
- values[i + length - axis->offset] = tmplon[i];
- }
- free( tmplon );
- } else {
- tmplon = malloc( 2 * axis->offset * sizeof ( double ) );
- for( i = 0; i < 2 * axis->offset; i++ ) {
- tmplon[i] = values[i];
- }
- for( i = 2 * axis->offset; i < length; i++ ) {
- values[i - 2 * axis->offset] = values[i];
- }
- for( i = 0; i < 2 * axis->offset; i++ ) {
- values[i + length - 2 * axis->offset] = tmplon[i];
- }
- free( tmplon );
- }
- }
- i = cmor_check_monotonic( &values[0], length, name, isbounds,
- axis_id );
- cmor_pop_traceback( );
- return ( 0 );
+ if (axis->offset != 0) {
+ if (isbounds == 0) {
+ tmplon = malloc(axis->offset * sizeof(double));
+ for (i = 0; i < axis->offset; i++) {
+ tmplon[i] = values[i];
+ }
+ for (i = axis->offset; i < length; i++) {
+ values[i - axis->offset] = values[i];
+ }
+ for (i = 0; i < axis->offset; i++) {
+ values[i + length - axis->offset] = tmplon[i];
+ }
+ free(tmplon);
+ } else {
+ tmplon = malloc(2 * axis->offset * sizeof(double));
+ for (i = 0; i < 2 * axis->offset; i++) {
+ tmplon[i] = values[i];
+ }
+ for (i = 2 * axis->offset; i < length; i++) {
+ values[i - 2 * axis->offset] = values[i];
+ }
+ for (i = 0; i < 2 * axis->offset; i++) {
+ values[i + length - 2 * axis->offset] = tmplon[i];
+ }
+ free(tmplon);
+ }
+ }
+ i = cmor_check_monotonic(&values[0], length, name, isbounds, axis_id);
+ cmor_pop_traceback();
+ return (0);
}
-
-
/************************************************************************/
/* cmor_check_interval() */
/************************************************************************/
-int cmor_check_interval( int axis_id, char *interval, double *values,
- int nvalues, int isbounds ) {
+int cmor_check_interval(int axis_id, char *interval, double *values,
+ int nvalues, int isbounds)
+{
char ctmp[CMOR_MAX_STRING];
char ctmp2[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
@@ -1387,292 +1332,291 @@ int cmor_check_interval( int axis_id, char *interval, double *values,
cdCalenType icali;
cdCompTime comptime;
- cmor_add_traceback( "cmor_check_interval" );
+ cmor_add_traceback("cmor_check_interval");
axis = &cmor_axes[axis_id];
refaxis = &cmor_tables[axis->ref_table_id].axes[axis->ref_axis_id];
-
- if( isbounds == 0 ) {
- nval = nvalues;
- tmp_values = values;
+ if (isbounds == 0) {
+ nval = nvalues;
+ tmp_values = values;
} else {
- nval = nvalues / 2 + 1;
- tmp_values = malloc( sizeof ( double ) * nval );
- if( tmp_values == NULL ) {
- snprintf( ctmp, CMOR_MAX_STRING,
- "Error allocating memory for %i values in "
- "check_interval (%s), axis: %s (table: %s)",
- nval, interval, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( ctmp, CMOR_CRITICAL );
- }
- for( i = 0; i < nval - 1; i++ )
- tmp_values[i] = values[i * 2];
- tmp_values[nval - 1] = values[nvalues - 1];
+ nval = nvalues / 2 + 1;
+ tmp_values = malloc(sizeof(double) * nval);
+ if (tmp_values == NULL) {
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "Error allocating memory for %i values in "
+ "check_interval (%s), axis: %s (table: %s)",
+ nval, interval, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(ctmp, CMOR_CRITICAL);
+ }
+ for (i = 0; i < nval - 1; i++)
+ tmp_values[i] = values[i * 2];
+ tmp_values[nval - 1] = values[nvalues - 1];
}
/* -------------------------------------------------------------------- */
/* first of all need to figure out the */
/* numeric and unit part of the interval */
/* -------------------------------------------------------------------- */
- cmor_trim_string( interval, ctmp );
- n = strlen( ctmp );
- for( i = 0; i < n; i++ ) {
- if( ctmp[i] == ' ' ) {
- ctmp2[i] = '\0';
- break;
- }
- ctmp2[i] = ctmp[i];
+ cmor_trim_string(interval, ctmp);
+ n = strlen(ctmp);
+ for (i = 0; i < n; i++) {
+ if (ctmp[i] == ' ') {
+ ctmp2[i] = '\0';
+ break;
+ }
+ ctmp2[i] = ctmp[i];
}
- interv = atof( ctmp2 );
- for( j = 0; j < n - i; j++ ) {
- ctmp2[j] = ctmp[j + i + 1];
+ interv = atof(ctmp2);
+ for (j = 0; j < n - i; j++) {
+ ctmp2[j] = ctmp[j + i + 1];
}
ctmp2[j] = '\0';
/* -------------------------------------------------------------------- */
/* convert this in some base units: seconds */
/* -------------------------------------------------------------------- */
- sprintf( msg, "seconds" );
- ut_trim( msg, UT_ASCII );
- cmor_units = ut_parse( ut_read, msg, UT_ASCII );
- user_units = ut_parse( ut_read, ctmp2, UT_ASCII );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "In udunuits parsing user units: %s, axis: %s (table: %s)",
- ctmp2, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- if( ut_are_convertible( cmor_units, user_units ) == 0 ) {
- snprintf( ctmp, CMOR_MAX_STRING,
- "axis interval units (%s) are incompatible with\n! "
- "seconds, axis: %s (table: %s)",
- ctmp2, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( ctmp, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
- ut_cmor_converter = ut_get_converter( user_units, cmor_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "In udunuits getting converter, axis: %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- tmp = cv_convert_double( ut_cmor_converter, interv );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "In udunuits converting, axis: %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ sprintf(msg, "seconds");
+ ut_trim(msg, UT_ASCII);
+ cmor_units = ut_parse(ut_read, msg, UT_ASCII);
+ user_units = ut_parse(ut_read, ctmp2, UT_ASCII);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "In udunuits parsing user units: %s, axis: %s (table: %s)",
+ ctmp2, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ if (ut_are_convertible(cmor_units, user_units) == 0) {
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "axis interval units (%s) are incompatible with\n! "
+ "seconds, axis: %s (table: %s)",
+ ctmp2, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(ctmp, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ ut_cmor_converter = ut_get_converter(user_units, cmor_units);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "In udunuits getting converter, axis: %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ tmp = cv_convert_double(ut_cmor_converter, interv);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "In udunuits converting, axis: %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
interv = tmp;
- cv_free( ut_cmor_converter );
+ cv_free(ut_cmor_converter);
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing converter, axis: %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing converter, axis: %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
- ut_free( user_units );
+ ut_free(user_units);
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units, axis: %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units, axis: %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
/* at this point we need to figure out the axis units interval */
- strcpy( ctmp, refaxis->units );
- n = strlen( ctmp );
- for( i = 0; i < n; i++ ) {
- if( ctmp[i] == ' ' ) {
- ctmp2[i] = '\0';
- break;
- }
- ctmp2[i] = ctmp[i];
+ strcpy(ctmp, refaxis->units);
+ n = strlen(ctmp);
+ for (i = 0; i < n; i++) {
+ if (ctmp[i] == ' ') {
+ ctmp2[i] = '\0';
+ break;
+ }
+ ctmp2[i] = ctmp[i];
}
- user_units = ut_parse( ut_read, ctmp2, UT_ASCII );
+ user_units = ut_parse(ut_read, ctmp2, UT_ASCII);
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "In udunits parsing user units: %s, axis: %s (table: %s)",
- ctmp2, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "In udunits parsing user units: %s, axis: %s (table: %s)",
+ ctmp2, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
- if( ut_are_convertible( cmor_units, user_units ) == 0 ) {
- snprintf( ctmp, CMOR_MAX_STRING,
- "axis interval units (%s) are incompatible with seconds, axis: %s (table: %s)",
- ctmp2, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( ctmp, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return ( 1 );
+ if (ut_are_convertible(cmor_units, user_units) == 0) {
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "axis interval units (%s) are incompatible with seconds, axis: %s (table: %s)",
+ ctmp2, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(ctmp, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
}
- ut_cmor_converter = ut_get_converter( user_units, cmor_units );
+ ut_cmor_converter = ut_get_converter(user_units, cmor_units);
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error getting converter from %s to %s, axis: %s (table: %s)",
- ctmp2, msg, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error getting converter from %s to %s, axis: %s (table: %s)",
+ ctmp2, msg, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
tmp = 0.;
- for( i = 0; i < nval - 1; i++ ) {
- diff = tmp_values[i + 1] - tmp_values[i]; /* still in user units */
+ for (i = 0; i < nval - 1; i++) {
+ diff = tmp_values[i + 1] - tmp_values[i]; /* still in user units */
/* -------------------------------------------------------------------- */
/* converts to seconds */
/* -------------------------------------------------------------------- */
- tmp = cv_convert_double( ut_cmor_converter, diff );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "In udunits converting, axis: %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ tmp = cv_convert_double(ut_cmor_converter, diff);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "In udunits converting, axis: %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
- diff2 = tmp;
- tmp = ( double ) fabs( diff2 - interv );
- tmp = tmp / interv;
+ diff2 = tmp;
+ tmp = (double)fabs(diff2 - interv);
+ tmp = tmp / interv;
/* -------------------------------------------------------------------- */
/* more than 20% diff issues an error */
/* -------------------------------------------------------------------- */
- if( tmp > cmor_tables[cmor_axes[axis_id].ref_table_id].interval_error ) {
- if( isbounds == 1 ) {
- snprintf( ctmp, CMOR_MAX_STRING,
- "approximate time axis interval is defined as %f "
- "seconds (%s), for value %i we got a difference "
- "(based on bounds) of %f seconds, (%f %s), which "
- "is %f %% , seems too big, check your values",
- interv, interval, i + 1, diff2, diff, ctmp2,
- tmp * 100. );
- } else {
- if( isbounds == 1 ) {
- snprintf( ctmp, CMOR_MAX_STRING,
- "approximate time axis interval is defined as "
- "%f seconds (%s), for value %i we got a difference "
- "(based on bounds) of %f seconds (%f %s), which is "
- "%f %% , seems too big, check your values",
- interv, interval, i + 1, diff2, diff, ctmp2,
- tmp * 100. );
- } else {
- snprintf( ctmp, CMOR_MAX_STRING,
- "approximate time axis interval is defined as %f "
- "seconds (%s), for value %i we got a difference of "
- "%f seconds (%f %s), which is %f %% , seems too big, "
- "check your values",
- interv, interval, i + 1, diff2, diff, ctmp2,
- tmp * 100. );
- }
- }
-
- cmor_handle_error( ctmp, CMOR_CRITICAL );
- } else if( tmp > cmor_tables[cmor_axes[axis_id].ref_table_id].
- interval_warning ) {
+ if (tmp > cmor_tables[cmor_axes[axis_id].ref_table_id].interval_error) {
+ if (isbounds == 1) {
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "approximate time axis interval is defined as %f "
+ "seconds (%s), for value %i we got a difference "
+ "(based on bounds) of %f seconds, (%f %s), which "
+ "is %f %% , seems too big, check your values",
+ interv, interval, i + 1, diff2, diff, ctmp2,
+ tmp * 100.);
+ } else {
+ if (isbounds == 1) {
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "approximate time axis interval is defined as "
+ "%f seconds (%s), for value %i we got a difference "
+ "(based on bounds) of %f seconds (%f %s), which is "
+ "%f %% , seems too big, check your values",
+ interv, interval, i + 1, diff2, diff, ctmp2,
+ tmp * 100.);
+ } else {
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "approximate time axis interval is defined as %f "
+ "seconds (%s), for value %i we got a difference of "
+ "%f seconds (%f %s), which is %f %% , seems too big, "
+ "check your values",
+ interv, interval, i + 1, diff2, diff, ctmp2,
+ tmp * 100.);
+ }
+ }
+
+ cmor_handle_error(ctmp, CMOR_CRITICAL);
+ } else if (tmp >
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].interval_warning) {
/* -------------------------------------------------------------------- */
/* more than 10% diff issues a warning */
/* -------------------------------------------------------------------- */
- snprintf( ctmp, CMOR_MAX_STRING,
- "approximate time axis interval is defined as %f "
- "seconds (%s), for value %i we got a difference of %f "
- "seconds (%f %s), which is %f %% , seems too big, check "
- "your values",
- interv, interval, i + 1, diff2, diff, ctmp2,
- tmp * 100. );
- cmor_handle_error( ctmp, CMOR_WARNING );
- }
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "approximate time axis interval is defined as %f "
+ "seconds (%s), for value %i we got a difference of %f "
+ "seconds (%f %s), which is %f %% , seems too big, check "
+ "your values",
+ interv, interval, i + 1, diff2, diff, ctmp2, tmp * 100.);
+ cmor_handle_error(ctmp, CMOR_WARNING);
+ }
}
/* -------------------------------------------------------------------- */
/* bounds being at begining and end of the month */
/* -------------------------------------------------------------------- */
- if( ( isbounds == 1 )
- && ( fabs( interv - 2592000. ) / 2592000. < .1 ) ) {
- cmor_get_cur_dataset_attribute( "calendar", ctmp );
- if( cmor_calendar_c2i( ctmp, &icali ) != 0 ) {
- snprintf( ctmp, CMOR_MAX_STRING,
- "Cannot convert times for calendar: %s", ctmp );
- cmor_handle_error( ctmp, CMOR_NORMAL );
- cmor_pop_traceback( );
- return ( 1 );
- }
-
- for( i = 0; i < nvalues; i++ ) {
- cmor_convert_time_units( axis->iunits,
- cmor_tables[axis->ref_table_id].
- axes[axis->ref_axis_id].units, ctmp );
- cdRel2Comp( icali, ctmp, values[i], &comptime );
- if( comptime.day != 1 ) {
- snprintf( ctmp, CMOR_MAX_STRING,
- "Bounds value %ld-%d-%d is not beg or end of month\n! "
- "and you seem to be writing monthly data, please check",
- comptime.year, comptime.month, comptime.day );
- cmor_handle_error( ctmp, CMOR_WARNING );
- }
- }
- }
-
- cv_free( ut_cmor_converter );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing converter, axis: %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- ut_free( cmor_units );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units, axis: %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- ut_free( user_units );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units, axis: %s (table: %s)",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- if( isbounds == 1 )
- free( tmp_values );
-
- cmor_pop_traceback( );
- return ( 0 );
+ if ((isbounds == 1)
+ && (fabs(interv - 2592000.) / 2592000. < .1)) {
+ cmor_get_cur_dataset_attribute("calendar", ctmp);
+ if (cmor_calendar_c2i(ctmp, &icali) != 0) {
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "Cannot convert times for calendar: %s", ctmp);
+ cmor_handle_error(ctmp, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+
+ for (i = 0; i < nvalues; i++) {
+ cmor_convert_time_units(axis->iunits,
+ cmor_tables[axis->ref_table_id].axes[axis->
+ ref_axis_id].
+ units, ctmp);
+ cdRel2Comp(icali, ctmp, values[i], &comptime);
+ if (comptime.day != 1) {
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "Bounds value %ld-%d-%d is not beg or end of month\n! "
+ "and you seem to be writing monthly data, please check",
+ comptime.year, comptime.month, comptime.day);
+ cmor_handle_error(ctmp, CMOR_WARNING);
+ }
+ }
+ }
+
+ cv_free(ut_cmor_converter);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing converter, axis: %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ ut_free(cmor_units);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units, axis: %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ ut_free(user_units);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units, axis: %s (table: %s)",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ if (isbounds == 1)
+ free(tmp_values);
+
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_axis() */
/************************************************************************/
int cmor_axis(int *axis_id, char *name, char *units, int length,
- void *coord_vals, char type, void *cell_bounds, int cell_bounds_ndim,
- char *interval) {
+ void *coord_vals, char type, void *cell_bounds,
+ int cell_bounds_ndim, char *interval)
+{
extern int cmor_naxes;
extern int CMOR_TABLE;
@@ -1713,9 +1657,9 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
if (iref == -1) {
snprintf(ctmp, CMOR_MAX_STRING,
- "Could not find all axes for this variable. \n! "
- "Check that all your axes name matches the ones found in \n! "
- "the table %s. \n!", cmor_tables[CMOR_TABLE].szTable_id);
+ "Could not find all axes for this variable. \n! "
+ "Check that all your axes name matches the ones found in \n! "
+ "the table %s. \n!", cmor_tables[CMOR_TABLE].szTable_id);
cmor_handle_error(ctmp, CMOR_CRITICAL);
}
@@ -1727,7 +1671,7 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
cmor_axes[cmor_naxes].type = type;
cmor_axes[cmor_naxes].store_in_netcdf = 1;
- if (refaxis.axis == 'T') {
+ if ((refaxis.axis == 'T') || strstr(units, "since")) {
cmor_get_cur_dataset_attribute("calendar", ctmp);
cmor_set_axis_attribute(cmor_naxes, "calendar", 'c', ctmp);
cmor_convert_time_units(units, refaxis.units, &ctmp[0]);
@@ -1755,24 +1699,23 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
}
if (refaxis.long_name[0] != '\0') {
- cmor_set_axis_attribute(cmor_naxes, "long_name", 'c',
- refaxis.long_name);
+ cmor_set_axis_attribute(cmor_naxes, "long_name", 'c',
+ refaxis.long_name);
}
if (refaxis.standard_name[0] != '\0') {
cmor_set_axis_attribute(cmor_naxes, "standard_name", 'c',
- refaxis.standard_name);
+ refaxis.standard_name);
}
if (refaxis.formula[0] != '\0') {
- cmor_set_axis_attribute(cmor_naxes, "formula", 'c',
- refaxis.formula);
+ cmor_set_axis_attribute(cmor_naxes, "formula", 'c', refaxis.formula);
}
if (refaxis.z_factors[0] != '\0') {
cmor_set_axis_attribute(cmor_naxes, "z_factors", 'c',
- refaxis.z_factors);
+ refaxis.z_factors);
}
if ((refaxis.z_bounds_factors[0] != '\0') && (cell_bounds != NULL)) {
cmor_set_axis_attribute(cmor_naxes, "z_bounds_factors", 'c',
- refaxis.z_bounds_factors);
+ refaxis.z_bounds_factors);
}
if (strcmp(cmor_axes[cmor_naxes].id, "standard_sigma") == 0) {
@@ -1793,29 +1736,30 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
/* remembers what the original type was */
i = cmor_axes[cmor_naxes].hybrid_in;
if ((strcmp(name, "standard_hybrid_sigma") != 0)
- && (strcmp(name, "alternate_hybrid_sigma") != 0)
- && (strcmp(name, "standard_sigma") != 0)) {
+ && (strcmp(name, "alternate_hybrid_sigma") != 0)
+ && (strcmp(name, "standard_sigma") != 0)) {
snprintf(msg, CMOR_MAX_STRING,
- "axis: %s (table: %s) converting to \"standard_hybrid_sigma\" from unknown type: %s",
- cmor_axes[cmor_naxes].id,
- cmor_tables[CMOR_TABLE].szTable_id, name);
+ "axis: %s (table: %s) converting to \"standard_hybrid_sigma\" from unknown type: %s",
+ cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id, name);
cmor_handle_error(msg, CMOR_CRITICAL);
}
cmor_axis(axis_id, refaxis.convert_to, units, length,
- coord_vals, type, cell_bounds, cell_bounds_ndim,
- interval);
+ coord_vals, type, cell_bounds, cell_bounds_ndim,
+ interval);
cmor_axes[cmor_naxes].hybrid_in = i;
cmor_axes[cmor_naxes].hybrid_out = 1;
*axis_id = cmor_naxes;
cmor_pop_traceback();
- return( 0 );
+ return (0);
} else {
snprintf(msg, CMOR_MAX_STRING,
- "axis: %s (table: %s) is declared to be converted "
- "to unknown type: %s",
- cmor_axes[cmor_naxes].id,
- cmor_tables[CMOR_TABLE].szTable_id, refaxis.convert_to);
+ "axis: %s (table: %s) is declared to be converted "
+ "to unknown type: %s",
+ cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id,
+ refaxis.convert_to);
cmor_handle_error(msg, CMOR_CRITICAL);
}
}
@@ -1838,9 +1782,10 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
if ((cell_bounds == NULL) && (refaxis.must_have_bounds == 1)) {
if (refaxis.axis != 'T') {
snprintf(msg, CMOR_MAX_STRING,
- "axis: %s (table: %s) must have bounds, you did not "
- "pass any when creating it via cmor_axis",
- cmor_axes[cmor_naxes].id, cmor_tables[CMOR_TABLE].szTable_id);
+ "axis: %s (table: %s) must have bounds, you did not "
+ "pass any when creating it via cmor_axis",
+ cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id);
cmor_handle_error(msg, CMOR_CRITICAL);
} else if (coord_vals != NULL) {
/* -------------------------------------------------------------------- */
@@ -1848,9 +1793,10 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
/* do not intend to pass them later */
/* -------------------------------------------------------------------- */
snprintf(msg, CMOR_MAX_STRING,
- "axis: %s (table: %s) must have bounds, you did not "
- "pass any when creating it via cmor_axis",
- cmor_axes[cmor_naxes].id, cmor_tables[CMOR_TABLE].szTable_id);
+ "axis: %s (table: %s) must have bounds, you did not "
+ "pass any when creating it via cmor_axis",
+ cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
}
@@ -1858,7 +1804,7 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
/* user passed coords need to convert this guys */
/* -------------------------------------------------------------------- */
- if (coord_vals != NULL) {
+ if (coord_vals != NULL) {
if (type != 'c') {
cmor_axes[cmor_naxes].values = malloc(length * sizeof(double));
@@ -1872,32 +1818,32 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
if (cmor_axes[cmor_naxes].values == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "cannot allocate memory for %i double elts for "
- "axis %s (table: %s)",
- length, cmor_axes[cmor_naxes].id,
- cmor_tables[CMOR_TABLE].szTable_id);
+ "cannot allocate memory for %i double elts for "
+ "axis %s (table: %s)",
+ length, cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
if (type == 'f') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].values[i] =
- (double) ((float *) coord_vals)[i];
+ (double)((float *)coord_vals)[i];
}
} else if (type == 'l') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].values[i] =
- (double) ((long *) coord_vals)[i];
+ (double)((long *)coord_vals)[i];
}
} else if (type == 'i') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].values[i] =
- (double) ((int *) coord_vals)[i];
+ (double)((int *)coord_vals)[i];
}
} else if (type == 'd') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].values[i] =
- (double) ((double *) coord_vals)[i];
+ (double)((double *)coord_vals)[i];
}
}
} else {
@@ -1907,10 +1853,10 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
/* -------------------------------------------------------------------- */
if (type != refaxis.type) {
snprintf(msg, CMOR_MAX_STRING,
- "You are trying to define axis %s (table: %s) as "
- "character when it should be of type: %c\n! ",
- cmor_axes[cmor_naxes].id,
- cmor_tables[CMOR_TABLE].szTable_id, refaxis.type);
+ "You are trying to define axis %s (table: %s) as "
+ "character when it should be of type: %c\n! ",
+ cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id, refaxis.type);
cmor_handle_error(msg, CMOR_CRITICAL);
}
@@ -1918,10 +1864,10 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
if (cmor_axes[cmor_naxes].cvalues == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "cannot allocate memory for %i char elts for axis "
- "%s (table: %s)",
- length, cmor_axes[cmor_naxes].id,
- cmor_tables[CMOR_TABLE].szTable_id);
+ "cannot allocate memory for %i char elts for axis "
+ "%s (table: %s)",
+ length, cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
@@ -1931,24 +1877,24 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
k = cell_bounds_ndim;
for (i = 0; i < length; i++) {
- j = strlen(&((char *) coord_vals)[i * k]);
+ j = strlen(&((char *)coord_vals)[i * k]);
if (j > k)
j = k;
cmor_axes[cmor_naxes].cvalues[i] =
- malloc((j + 1) * sizeof(char));
+ malloc((j + 1) * sizeof(char));
if (cmor_axes[cmor_naxes].cvalues[i] == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "cannot allocate memory for %i char elts for axis "
- "%s (table: %s)",
- j + 1, cmor_axes[cmor_naxes].id,
- cmor_tables[CMOR_TABLE].szTable_id);
+ "cannot allocate memory for %i char elts for axis "
+ "%s (table: %s)",
+ j + 1, cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
strncpy(cmor_axes[cmor_naxes].cvalues[i],
- &((char *) coord_vals)[i * k], j);
+ &((char *)coord_vals)[i * k], j);
cmor_axes[cmor_naxes].cvalues[i][j] = '\0';
}
@@ -1963,7 +1909,7 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
for (i = 0; i < j; i++) {
k = 0;
while ((refaxis.crequested[i] != ' ')
- && (refaxis.crequested[i] != '\0')) {
+ && (refaxis.crequested[i] != '\0')) {
ctmp[k] = refaxis.crequested[i];
i++;
k++;
@@ -1973,16 +1919,16 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
k = -1;
for (l = 0; l < length; l++) {
if (strncmp(ctmp, cmor_axes[cmor_naxes].cvalues[l],
- strlen(ctmp)) == 0)
+ strlen(ctmp)) == 0)
k = l;
}
if (k == -1) {
snprintf(msg, CMOR_MAX_STRING,
- "Requested region for axis '%s' (table: %s) "
- "is not passed: '%s'",
- cmor_axes[cmor_naxes].id,
- cmor_tables[CMOR_TABLE].szTable_id, ctmp);
+ "Requested region for axis '%s' (table: %s) "
+ "is not passed: '%s'",
+ cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id, ctmp);
cmor_handle_error(msg, CMOR_CRITICAL);
}
}
@@ -1993,16 +1939,12 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
}
*axis_id = cmor_naxes;
cmor_pop_traceback();
- return( 0 );
+ return (0);
}
cmor_treat_axis_values(cmor_naxes,
- &cmor_axes[cmor_naxes].values[0],
- length,
- refaxis.n_requested,
- units,
- name,
- 0);
+ &cmor_axes[cmor_naxes].values[0],
+ length, refaxis.n_requested, units, name, 0);
/* -------------------------------------------------------------------- */
/* puts bounds on 2d array */
@@ -2013,10 +1955,10 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
if (cmor_axes[cmor_naxes].bounds == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "cannot allocate memory for %i bounds elts for axis "
- "%s (table: %s)",
- 2 * length, cmor_axes[cmor_naxes].id,
- cmor_tables[CMOR_TABLE].szTable_id);
+ "cannot allocate memory for %i bounds elts for axis "
+ "%s (table: %s)",
+ 2 * length, cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id);
free(cmor_axes[cmor_naxes].bounds);
cmor_handle_error(msg, CMOR_CRITICAL);
}
@@ -2025,88 +1967,88 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
if (type == 'f') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].bounds[2 * i] =
- (double) ((float *) cell_bounds)[2 * i];
+ (double)((float *)cell_bounds)[2 * i];
cmor_axes[cmor_naxes].bounds[2 * i + 1] =
- (double) ((float *) cell_bounds)[2 * i + 1];
+ (double)((float *)cell_bounds)[2 * i + 1];
}
} else if (type == 'd') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].bounds[2 * i] =
- (double) ((double *) cell_bounds)[2 * i];
+ (double)((double *)cell_bounds)[2 * i];
cmor_axes[cmor_naxes].bounds[2 * i + 1] =
- (double) ((double *) cell_bounds)[2 * i + 1];
+ (double)((double *)cell_bounds)[2 * i + 1];
}
} else if (type == 'l') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].bounds[2 * i] =
- (double) ((long *) cell_bounds)[2 * i];
+ (double)((long *)cell_bounds)[2 * i];
cmor_axes[cmor_naxes].bounds[2 * i + 1] =
- (double) ((long *) cell_bounds)[2 * i + 1];
+ (double)((long *)cell_bounds)[2 * i + 1];
}
} else if (type == 'i') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].bounds[2 * i] =
- (double) ((int *) cell_bounds)[2 * i];
+ (double)((int *)cell_bounds)[2 * i];
cmor_axes[cmor_naxes].bounds[2 * i + 1] =
- (double) ((int *) cell_bounds)[2 * i + 1];
+ (double)((int *)cell_bounds)[2 * i + 1];
}
- } else { /* ??? charcter axis code here */
+ } else { /* ??? charcter axis code here */
snprintf(msg, CMOR_MAX_STRING,
- "CMOR cannot handle axes of type %c please "
- "change type, axis: %s (table: %s)",
- type, cmor_axes[cmor_naxes].id,
- cmor_tables[CMOR_TABLE].szTable_id);
+ "CMOR cannot handle axes of type %c please "
+ "change type, axis: %s (table: %s)",
+ type, cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
} else if (cell_bounds_ndim == 1) {
if (type == 'f') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].bounds[2 * i] =
- (double) ((float *) cell_bounds)[i];
+ (double)((float *)cell_bounds)[i];
cmor_axes[cmor_naxes].bounds[2 * i + 1] =
- (double) ((float *) cell_bounds)[i + 1];
+ (double)((float *)cell_bounds)[i + 1];
}
} else if (type == 'd') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].bounds[2 * i] =
- (double) ((double *) cell_bounds)[i];
+ (double)((double *)cell_bounds)[i];
cmor_axes[cmor_naxes].bounds[2 * i + 1] =
- (double) ((double *) cell_bounds)[i + 1];
+ (double)((double *)cell_bounds)[i + 1];
}
} else if (type == 'i') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].bounds[2 * i] =
- (double) ((int *) cell_bounds)[i];
+ (double)((int *)cell_bounds)[i];
cmor_axes[cmor_naxes].bounds[2 * i + 1] =
- (double) ((int *) cell_bounds)[i + 1];
+ (double)((int *)cell_bounds)[i + 1];
}
} else if (type == 'l') {
for (i = 0; i < length; i++) {
cmor_axes[cmor_naxes].bounds[2 * i] =
- (double) ((long *) cell_bounds)[i];
+ (double)((long *)cell_bounds)[i];
cmor_axes[cmor_naxes].bounds[2 * i + 1] =
- (double) ((long *) cell_bounds)[i + 1];
+ (double)((long *)cell_bounds)[i + 1];
}
- } else { /* ??? charcter axis code here */
+ } else { /* ??? charcter axis code here */
snprintf(msg, CMOR_MAX_STRING,
- "CMOR cannot handle axes of type %c please "
- "change type, axis: %s (table: %s)",
- type, cmor_axes[cmor_naxes].id,
- cmor_tables[CMOR_TABLE].szTable_id);
+ "CMOR cannot handle axes of type %c please "
+ "change type, axis: %s (table: %s)",
+ type, cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
}
cmor_treat_axis_values(cmor_naxes,
- &cmor_axes[cmor_naxes].bounds[0], 2 * length, 0, units,
- name, 1);
+ &cmor_axes[cmor_naxes].bounds[0], 2 * length,
+ 0, units, name, 1);
/* -------------------------------------------------------------------- */
/* At this point we are checking that */
/* the axis values are within bounds */
/* -------------------------------------------------------------------- */
- cmor_check_values_inside_bounds(
- &cmor_axes[cmor_naxes].values[0],
- &cmor_axes[cmor_naxes].bounds[0], length, name);
+ cmor_check_values_inside_bounds(&cmor_axes[cmor_naxes].values[0],
+ &cmor_axes[cmor_naxes].bounds[0],
+ length, name);
if ((refaxis.axis == 'T') && (refaxis.climatology == 0)) {
/* -------------------------------------------------------------------- */
@@ -2114,8 +2056,8 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
/* -------------------------------------------------------------------- */
for (i = 0; i < length; i++)
cmor_axes[cmor_naxes].values[i] =
- (cmor_axes[cmor_naxes].bounds[2 * i]
- + cmor_axes[cmor_naxes].bounds[2 * i + 1]) / 2.;
+ (cmor_axes[cmor_naxes].bounds[2 * i]
+ + cmor_axes[cmor_naxes].bounds[2 * i + 1]) / 2.;
/* -------------------------------------------------------------------- */
/* here we check if interval is about right */
/* just keep the begining of units out */
@@ -2125,29 +2067,29 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
while (refaxis.units[j] == ' ')
j++;
i = 0;
- while((refaxis.units[i + j] != ' ') &&
- (refaxis.units[i + j] != '\0')) {
+ while ((refaxis.units[i + j] != ' ') &&
+ (refaxis.units[i + j] != '\0')) {
ctmp[i] = refaxis.units[i + j];
i++;
}
ctmp[i] = '\0';
snprintf(msg, CMOR_MAX_STRING, "%lf %s",
- cmor_tables[cmor_axes[cmor_naxes].ref_table_id].interval,
- ctmp);
+ cmor_tables[cmor_axes[cmor_naxes].ref_table_id].
+ interval, ctmp);
/* -------------------------------------------------------------------- */
/* skip this for non standard cal */
/* -------------------------------------------------------------------- */
- i = cmor_check_interval( cmor_naxes, msg,
- &cmor_axes[cmor_naxes].values[0],
- length,
- 0 );
+ i = cmor_check_interval(cmor_naxes, msg,
+ &cmor_axes[cmor_naxes].values[0],
+ length, 0);
}
}
} else {
if ((refaxis.axis != 'T') && (refaxis.index_only == 'n')) {
snprintf(msg, CMOR_MAX_STRING,
- "function called for axis '%s' (table: %s) w/o any values",
- cmor_axes[cmor_naxes].id, cmor_tables[CMOR_TABLE].szTable_id);
+ "function called for axis '%s' (table: %s) w/o any values",
+ cmor_axes[cmor_naxes].id,
+ cmor_tables[CMOR_TABLE].szTable_id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
if (refaxis.index_only != 'n') {
@@ -2170,13 +2112,14 @@ int cmor_axis(int *axis_id, char *name, char *units, int length,
/* -------------------------------------------------------------------- */
cmor_axes[cmor_naxes].wrapping = NULL;
- return( 0 );
+ return (0);
}
/************************************************************************/
/* cmor_init_axis_def() */
/************************************************************************/
-void cmor_init_axis_def(cmor_axis_def_t *axis, int table_id) {
+void cmor_init_axis_def(cmor_axis_def_t * axis, int table_id)
+{
cmor_is_setup();
axis->table_id = table_id;
axis->climatology = 0;
@@ -2188,7 +2131,7 @@ void cmor_init_axis_def(cmor_axis_def_t *axis, int table_id) {
axis->out_name[0] = '\0';
axis->type = 'd';
axis->stored_direction = 'i';
- axis->valid_min = 1.e20; /* means no check */
+ axis->valid_min = 1.e20; /* means no check */
axis->valid_max = 1.e20;
if (axis->requested != NULL)
free(axis->requested);
@@ -2218,12 +2161,14 @@ void cmor_init_axis_def(cmor_axis_def_t *axis, int table_id) {
axis->must_have_bounds = 0;
axis->must_call_cmor_grid = 0;
}
+
/************************************************************************/
/* cmor_set_axis_def_att() */
/************************************************************************/
-int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
- char val[CMOR_MAX_STRING]) {
+int cmor_set_axis_def_att(cmor_axis_def_t * axis, char att[CMOR_MAX_STRING],
+ char val[CMOR_MAX_STRING])
+{
int i, n, j;
char dim[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
@@ -2235,9 +2180,9 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
/*----------------------------------------------------------------------*/
/* If val is an empty string keep default values set in init_axs_def */
/*----------------------------------------------------------------------*/
- if(strcmp(val, "") == 0 ) {
+ if (strcmp(val, "") == 0) {
cmor_pop_traceback();
- return(0);
+ return (0);
}
if (strcmp(att, AXIS_ATT_REQUIRED) == 0) {
@@ -2358,7 +2303,7 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
strncpytrim(axis->cname, val, CMOR_MAX_STRING);
} else if ((strcmp(att, AXIS_ATT_BOUNDSREQUESTED) == 0)
- || (strcmp(att, AXIS_ATT_REQUESTEDBOUNDS) == 0)) {
+ || (strcmp(att, AXIS_ATT_REQUESTEDBOUNDS) == 0)) {
/* -------------------------------------------------------------------- */
/* requested values for axis */
/* -------------------------------------------------------------------- */
@@ -2371,7 +2316,7 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
}
j = i;
while (((val[i] != ' ') && (val[i] != '\0')) && (val[i] != '"')
- && (i < strlen(val))) {
+ && (i < strlen(val))) {
dim[i - j] = val[i];
i++;
@@ -2380,7 +2325,7 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
sscanf(dim, "%lf", &vals[n]);
while (((val[i] == '[') || (val[i] == ']') ||
(val[i] == ' ') || (val[i] == ',') || (val[i] == '"')) &&
- (val[i] != '\0')) {
+ (val[i] != '\0')) {
i++;
}
i--;
@@ -2393,11 +2338,11 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
if (axis->requested_bounds == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "axis (%s, table: %s): looks like we already read "
- "%d requested bounds but they are not stored in the "
- "internal tables, maybe some bad cleanup",
- axis->id, cmor_tables[axis->table_id].szTable_id,
- axis->n_requested_bounds);
+ "axis (%s, table: %s): looks like we already read "
+ "%d requested bounds but they are not stored in the "
+ "internal tables, maybe some bad cleanup",
+ axis->id, cmor_tables[axis->table_id].szTable_id,
+ axis->n_requested_bounds);
cmor_handle_error(msg, CMOR_CRITICAL);
}
@@ -2406,10 +2351,10 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
if (tmp == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "axis (%s, table: %s): cannot allocate memory for "
- "%i requested bounds elts for axis %s",
- axis->id, cmor_tables[axis->table_id].szTable_id,
- axis->n_requested, axis->id);
+ "axis (%s, table: %s): cannot allocate memory for "
+ "%i requested bounds elts for axis %s",
+ axis->id, cmor_tables[axis->table_id].szTable_id,
+ axis->n_requested, axis->id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
@@ -2424,13 +2369,13 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
}
axis->requested_bounds =
- malloc(axis->n_requested_bounds * sizeof(double));
+ malloc(axis->n_requested_bounds * sizeof(double));
if (axis->requested_bounds == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "axis (%s, table: %s): cannot allocate memory for %i "
- "requested bounds elts for axis %s",
- axis->id, cmor_tables[axis->table_id].szTable_id,
- axis->n_requested, axis->id);
+ "axis (%s, table: %s): cannot allocate memory for %i "
+ "requested bounds elts for axis %s",
+ axis->id, cmor_tables[axis->table_id].szTable_id,
+ axis->n_requested, axis->id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
@@ -2440,7 +2385,7 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
/* -------------------------------------------------------------------- */
/* ok we had previously read in data need to add this */
/* -------------------------------------------------------------------- */
- if (tmp != NULL) {
+ if (tmp != NULL) {
for (i = 0; i < axis->n_requested_bounds - n; i++) {
axis->requested_bounds[i] = tmp[i];
}
@@ -2448,7 +2393,7 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
tmp = NULL;
}
- } else if (strcmp(att, AXIS_ATT_REQUESTED ) == 0) {
+ } else if (strcmp(att, AXIS_ATT_REQUESTED) == 0) {
if (axis->type != 'c') {
dim[0] = '\0';
n = 0;
@@ -2458,12 +2403,12 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
/* Skip double quote (") */
/* -------------------------------------------------------------------- */
while ((val[i] == '[') || (val[i] == ']') ||
- (val[i] == '"') || (val[i] == ' ') || val[i] == ',') {
+ (val[i] == '"') || (val[i] == ' ') || val[i] == ',') {
i++;
}
j = i;
- while (((val[i] != ' ') && (val[i] != '\0') && (val[i] != '"') )
- && (i < strlen(val))) {
+ while (((val[i] != ' ') && (val[i] != '\0') && (val[i] != '"'))
+ && (i < strlen(val))) {
dim[i - j] = val[i];
i++;
}
@@ -2471,8 +2416,8 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
sscanf(dim, "%lf", &vals[n]);
while (((val[i] == '[') || (val[i] == ']') ||
- (val[i] == ' ') || (val[i]== ',') || (val[i] == '"'))
- && (val[i] != '\0') ) {
+ (val[i] == ' ') || (val[i] == ',') || (val[i] == '"'))
+ && (val[i] != '\0')) {
i++;
}
i--;
@@ -2482,14 +2427,14 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
/* ok we already had some read in */
/* need to memorize it */
/* -------------------------------------------------------------------- */
- if (axis->n_requested != 0) {
+ if (axis->n_requested != 0) {
if (axis->requested == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "axis (%s, table: %s): looks like we already read "
- "%d requested values but they are not stored in "
- "the internal tables, maybe some bad cleanup",
- axis->id, cmor_tables[axis->table_id].szTable_id,
- axis->n_requested);
+ "axis (%s, table: %s): looks like we already read "
+ "%d requested values but they are not stored in "
+ "the internal tables, maybe some bad cleanup",
+ axis->id, cmor_tables[axis->table_id].szTable_id,
+ axis->n_requested);
cmor_handle_error(msg, CMOR_CRITICAL);
}
@@ -2497,10 +2442,10 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
if (tmp == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "axis (%s, table: %s): cannot allocate memory for "
- "%i requested elts for axis %s",
- axis->id, cmor_tables[axis->table_id].szTable_id,
- axis->n_requested, axis->id);
+ "axis (%s, table: %s): cannot allocate memory for "
+ "%i requested elts for axis %s",
+ axis->id, cmor_tables[axis->table_id].szTable_id,
+ axis->n_requested, axis->id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
for (i = 0; i < axis->n_requested; i++) {
@@ -2514,23 +2459,23 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
axis->requested = malloc(axis->n_requested * sizeof(double));
if (axis->requested == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "axis (%s, table: %s): cannot allocate memory for %i "
- "requested elts for axis %s",
- axis->id, cmor_tables[axis->table_id].szTable_id,
- axis->n_requested, axis->id);
+ "axis (%s, table: %s): cannot allocate memory for %i "
+ "requested elts for axis %s",
+ axis->id, cmor_tables[axis->table_id].szTable_id,
+ axis->n_requested, axis->id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
- for (i = 0; i < n; i++) {
+ for (i = 0; i < n; i++) {
axis->requested[i] = vals[i];
}
/* -------------------------------------------------------------------- */
/* ok we had previously read in data need to add this */
/* -------------------------------------------------------------------- */
- if (tmp != NULL) {
+ if (tmp != NULL) {
for (i = 0; i < axis->n_requested - n; i++) {
axis->requested[i + n] = tmp[i];
}
- free(tmp);
+ free(tmp);
tmp = NULL;
}
} else {
@@ -2539,10 +2484,10 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
if (axis->crequested == NULL) {
snprintf(msg, CMOR_MAX_STRING,
- "axis (%s, table: %s): cannot allocate memory "
- "for %ld requested char elts for axis %s",
- axis->id, cmor_tables[axis->table_id].szTable_id,
- (long int) strlen(val) + 1, axis->id);
+ "axis (%s, table: %s): cannot allocate memory "
+ "for %ld requested char elts for axis %s",
+ axis->id, cmor_tables[axis->table_id].szTable_id,
+ (long int)strlen(val) + 1, axis->id);
cmor_handle_error(msg, CMOR_CRITICAL);
}
strcpy(axis->crequested, val);
@@ -2550,11 +2495,11 @@ int cmor_set_axis_def_att(cmor_axis_def_t *axis, char att[CMOR_MAX_STRING],
} else {
snprintf(msg, CMOR_MAX_STRING,
- "Unknown attribute >>>%s<<< for axis section "
- "(%s, table: %s), value: %s",
- att, axis->id, cmor_tables[axis->table_id].szTable_id, val);
+ "Unknown attribute >>>%s<<< for axis section "
+ "(%s, table: %s), value: %s",
+ att, axis->id, cmor_tables[axis->table_id].szTable_id, val);
cmor_handle_error(msg, CMOR_WARNING);
}
cmor_pop_traceback();
- return( 0 );
+ return (0);
}
diff --git a/Src/cmor_cfortran_interface.c b/Src/cmor_cfortran_interface.c
index 32d9155..d5b2d6a 100644
--- a/Src/cmor_cfortran_interface.c
+++ b/Src/cmor_cfortran_interface.c
@@ -6,654 +6,700 @@
/* cmor_ftn_get_tlen_cff_() */
/************************************************************************/
-int cmor_ftn_get_tlen_cff_( int *var_id ) {
+int cmor_ftn_get_tlen_cff_(int *var_id)
+{
int length;
- cmor_get_variable_time_length( var_id, &length );
- return(length);
+ cmor_get_variable_time_length(var_id, &length);
+ return (length);
}
/************************************************************************/
/* cmor_get_original_shape_cff_() */
/************************************************************************/
-int cmor_get_original_shape_cff_( int *var_id, int *shape_array ) {
+int cmor_get_original_shape_cff_(int *var_id, int *shape_array)
+{
int tmp, i;
i = 7;
- tmp = cmor_get_original_shape( var_id, shape_array, &i, 1 );
+ tmp = cmor_get_original_shape(var_id, shape_array, &i, 1);
/* -------------------------------------------------------------------- */
/* reverse it for fortran order */
/* -------------------------------------------------------------------- */
- for( i = 0; i < 3; i++ ) {
- tmp = shape_array[i];
- shape_array[i] = shape_array[6 - i];
- shape_array[6 - i] = tmp;
+ for (i = 0; i < 3; i++) {
+ tmp = shape_array[i];
+ shape_array[i] = shape_array[6 - i];
+ shape_array[6 - i] = tmp;
}
/* -------------------------------------------------------------------- */
/* now need to put the -1 back at the end */
/* -------------------------------------------------------------------- */
tmp = 0;
- for( i = 0; i < 7; i++ )
- if( shape_array[i] == -1 )
- tmp += 1;
- for( i = 0; i < 7 - tmp; i++ )
- shape_array[i] = shape_array[i + tmp];
- for( i = 0; i < tmp; i++ )
- shape_array[i + 7 - tmp] = -1;
- return(0);
+ for (i = 0; i < 7; i++)
+ if (shape_array[i] == -1)
+ tmp += 1;
+ for (i = 0; i < 7 - tmp; i++)
+ shape_array[i] = shape_array[i + tmp];
+ for (i = 0; i < tmp; i++)
+ shape_array[i + 7 - tmp] = -1;
+ return (0);
}
/************************************************************************/
/* cmor_set_cur_dset_attribute_cff_() */
/************************************************************************/
-int cmor_set_cur_dset_attribute_cff_( char *name, char *value, int option ) {
- return(cmor_set_cur_dataset_attribute( name, value, option));
+int cmor_set_cur_dset_attribute_cff_(char *name, char *value, int option)
+{
+ return (cmor_set_cur_dataset_attribute(name, value, option));
}
+
/************************************************************************/
/* cmor_get_cur_dset_attribute_cff_() */
/************************************************************************/
-int cmor_get_cur_dset_attribute_cff_( char *name, char *value ) {
- return(cmor_get_cur_dataset_attribute( name, value ));
+int cmor_get_cur_dset_attribute_cff_(char *name, char *value)
+{
+ return (cmor_get_cur_dataset_attribute(name, value));
}
/************************************************************************/
/* cmor_has_cur_dset_attribute_cff_() */
/************************************************************************/
-int cmor_has_cur_dset_attribute_cff_( char *name ) {
- return(cmor_has_cur_dataset_attribute( name ));
+int cmor_has_cur_dset_attribute_cff_(char *name)
+{
+ return (cmor_has_cur_dataset_attribute(name));
}
/************************************************************************/
/* cmor_set_variable_attribute_cff_() */
/************************************************************************/
-int cmor_set_variable_attribute_cff_( int *varid, char *name, char *value ) {
- return(cmor_set_variable_attribute( *varid, name, 'c', value ));
+int cmor_set_variable_attribute_cff_(int *varid, char *name, char *value)
+{
+ return (cmor_set_variable_attribute(*varid, name, 'c', value));
}
/************************************************************************/
/* cmor_set_deflate_cff_() */
/************************************************************************/
-int cmor_set_deflate_cff_( int *var_id, int *shuffle,
- int *deflate, int *deflate_level ) {
-return( cmor_set_deflate( *var_id, *shuffle, *deflate, *deflate_level ) );
+int cmor_set_deflate_cff_(int *var_id, int *shuffle,
+ int *deflate, int *deflate_level)
+{
+ return (cmor_set_deflate(*var_id, *shuffle, *deflate, *deflate_level));
}
/************************************************************************/
/* cmor_get_variable_attribute_cff_() */
/************************************************************************/
-int cmor_get_variable_attribute_cff_( int *varid, char *name, char *value ) {
- return(cmor_get_variable_attribute( *varid, name, value ));
+int cmor_get_variable_attribute_cff_(int *varid, char *name, char *value)
+{
+ return (cmor_get_variable_attribute(*varid, name, value));
}
/************************************************************************/
/* cmor_has_variable_attribute_cff_() */
/************************************************************************/
-int cmor_has_variable_attribute_cff_( int *varid, char *name ) {
- return(cmor_has_variable_attribute( *varid, name ));
+int cmor_has_variable_attribute_cff_(int *varid, char *name)
+{
+ return (cmor_has_variable_attribute(*varid, name));
}
/************************************************************************/
/* cmor_close_cff_() */
/************************************************************************/
-int cmor_close_cff_( void ) {
- return(cmor_close( ));
+int cmor_close_cff_(void)
+{
+ return (cmor_close());
}
/************************************************************************/
/* cmor_close_var_nofnm_cff_() */
/************************************************************************/
-int cmor_close_var_nofnm_cff_( int *var_id ) {
- return(cmor_close_variable( *var_id, NULL, NULL ));
+int cmor_close_var_nofnm_cff_(int *var_id)
+{
+ return (cmor_close_variable(*var_id, NULL, NULL));
}
/************************************************************************/
/* cmor_close_var_fnm_cff_() */
/************************************************************************/
-int cmor_close_var_fnm_cff_( int *var_id, char *fnm ) {
- return(cmor_close_variable( *var_id, fnm, NULL ));
+int cmor_close_var_fnm_cff_(int *var_id, char *fnm)
+{
+ return (cmor_close_variable(*var_id, fnm, NULL));
}
/************************************************************************/
/* cmor_close_var_nofnm_preserve_cff_() */
/************************************************************************/
-int cmor_close_var_nofnm_preserve_cff_( int *var_id, int *preserve ) {
- return(cmor_close_variable( *var_id, NULL, preserve ));
+int cmor_close_var_nofnm_preserve_cff_(int *var_id, int *preserve)
+{
+ return (cmor_close_variable(*var_id, NULL, preserve));
}
/************************************************************************/
/* cmor_close_var_fnm_preserve_cff_() */
/************************************************************************/
-int cmor_close_var_fnm_preserve_cff_( int *var_id, char *fnm,
- int *preserve ) {
- return(cmor_close_variable( *var_id, fnm, preserve ));
+int cmor_close_var_fnm_preserve_cff_(int *var_id, char *fnm, int *preserve)
+{
+ return (cmor_close_variable(*var_id, fnm, preserve));
}
/************************************************************************/
/* cmor_set_grd_map_cff_() */
/************************************************************************/
-int cmor_set_grd_map_cff_( int *gid, char *name, int *nparam,
- char *attributes_names, int *lparam,
- double *values, char *units, int *lnunits ) {
- return(cmor_set_grid_mapping( *gid, name, *nparam, attributes_names,
- *lparam, values, units, *lnunits ));
+int cmor_set_grd_map_cff_(int *gid, char *name, int *nparam,
+ char *attributes_names, int *lparam,
+ double *values, char *units, int *lnunits)
+{
+ return (cmor_set_grid_mapping(*gid, name, *nparam, attributes_names,
+ *lparam, values, units, *lnunits));
}
/************************************************************************/
/* cmor_grid_cff_noarea_double_() */
/************************************************************************/
-int cmor_grid_cff_noarea_double_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices,
- void *blat, void *blon ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'd', lat, lon, *nvertices,
- blat, blon ));
+int cmor_grid_cff_noarea_double_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices,
+ void *blat, void *blon)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'd', lat, lon, *nvertices,
+ blat, blon));
}
/************************************************************************/
/* cmor_grid_cff_noblaar_double_() */
/************************************************************************/
-int cmor_grid_cff_noblaar_double_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices,
- void *blon ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'd', lat, lon, *nvertices,
- NULL, blon ));
+int cmor_grid_cff_noblaar_double_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices,
+ void *blon)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'd', lat, lon, *nvertices,
+ NULL, blon));
}
/************************************************************************/
/* cmor_grid_cff_nobloar_double_() */
/************************************************************************/
-int cmor_grid_cff_nobloar_double_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices,
- void *blat ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'd', lat, lon, *nvertices,
- blat, NULL ));
+int cmor_grid_cff_nobloar_double_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices,
+ void *blat)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'd', lat, lon, *nvertices,
+ blat, NULL));
}
/************************************************************************/
/* cmor_grid_cff_nothg_double_() */
/************************************************************************/
-int cmor_grid_cff_nothg_double_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'd', lat, lon, *nvertices,
- NULL, NULL ));
+int cmor_grid_cff_nothg_double_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'd', lat, lon, *nvertices,
+ NULL, NULL));
}
/************************************************************************/
/* cmor_grid_cff_noarea_real_() */
/************************************************************************/
-int cmor_grid_cff_noarea_real_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices,
- void *blat, void *blon ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'f', lat, lon, *nvertices,
- blat, blon ));
+int cmor_grid_cff_noarea_real_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices,
+ void *blat, void *blon)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'f', lat, lon, *nvertices,
+ blat, blon));
}
/************************************************************************/
/* cmor_grid_cff_noblaar_real_() */
/************************************************************************/
-int cmor_grid_cff_noblaar_real_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices,
- void *blon ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'f', lat, lon, *nvertices,
- NULL, blon ));
+int cmor_grid_cff_noblaar_real_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices,
+ void *blon)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'f', lat, lon, *nvertices,
+ NULL, blon));
}
/************************************************************************/
/* cmor_grid_cff_nobloar_real_() */
/************************************************************************/
-int cmor_grid_cff_nobloar_real_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices,
- void *blat ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'f', lat, lon, *nvertices,
- blat, NULL ));
+int cmor_grid_cff_nobloar_real_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices,
+ void *blat)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'f', lat, lon, *nvertices,
+ blat, NULL));
}
/************************************************************************/
/* cmor_grid_cff_nothg_real_() */
/************************************************************************/
-int cmor_grid_cff_nothg_real_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'f', lat, lon, *nvertices,
- NULL, NULL ));
+int cmor_grid_cff_nothg_real_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'f', lat, lon, *nvertices,
+ NULL, NULL));
}
/************************************************************************/
/* cmor_grid_cff_nocoords_() */
/************************************************************************/
-int cmor_grid_cff_nocoords_( int *grid_id, int *ndims, int *axes_ids,
- int *nvert ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'f', NULL, NULL, *nvert,
- NULL, NULL ));
+int cmor_grid_cff_nocoords_(int *grid_id, int *ndims, int *axes_ids, int *nvert)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'f', NULL, NULL, *nvert,
+ NULL, NULL));
}
/************************************************************************/
/* cmor_grid_cff_noarea_int_() */
/************************************************************************/
-int cmor_grid_cff_noarea_int_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices,
- void *blat, void *blon ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'i', lat, lon, *nvertices,
- blat, blon ));
+int cmor_grid_cff_noarea_int_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices,
+ void *blat, void *blon)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'i', lat, lon, *nvertices,
+ blat, blon));
}
/************************************************************************/
/* cmor_grid_cff_noblaar_int_() */
/************************************************************************/
-int cmor_grid_cff_noblaar_int_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices,
- void *blon ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'i', lat, lon, *nvertices,
- NULL, blon ));
+int cmor_grid_cff_noblaar_int_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices, void *blon)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'i', lat, lon, *nvertices,
+ NULL, blon));
}
/************************************************************************/
/* cmor_grid_cff_nobloar_int_( */
/************************************************************************/
-int cmor_grid_cff_nobloar_int_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices,
- void *blat ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'i', lat, lon, *nvertices,
- blat, NULL ));
+int cmor_grid_cff_nobloar_int_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices, void *blat)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'i', lat, lon, *nvertices,
+ blat, NULL));
}
/************************************************************************/
/* cmor_grid_cff_nothg_int_() */
/************************************************************************/
-int cmor_grid_cff_nothg_int_( int *grid_id, int *ndims, int *axes_ids,
- void *lat, void *lon, int *nvertices ) {
- return(cmor_grid( grid_id, *ndims, axes_ids, 'i', lat, lon, *nvertices,
- NULL, NULL ));
+int cmor_grid_cff_nothg_int_(int *grid_id, int *ndims, int *axes_ids,
+ void *lat, void *lon, int *nvertices)
+{
+ return (cmor_grid(grid_id, *ndims, axes_ids, 'i', lat, lon, *nvertices,
+ NULL, NULL));
}
/************************************************************************/
/* cmor_grid_cff_tvc_f_() */
/************************************************************************/
-int cmor_grid_cff_tvc_f_( int *coord_grid_id, int *grid_id, char *name,
- char *units, void *missing ) {
- return(cmor_time_varying_grid_coordinate( coord_grid_id, *grid_id,
- name, units, 'f', missing,
- NULL ));
+int cmor_grid_cff_tvc_f_(int *coord_grid_id, int *grid_id, char *name,
+ char *units, void *missing)
+{
+ return (cmor_time_varying_grid_coordinate(coord_grid_id, *grid_id,
+ name, units, 'f', missing, NULL));
}
/************************************************************************/
/* cmor_grid_cff_tvc_d_() */
/************************************************************************/
-int cmor_grid_cff_tvc_d_( int *coord_grid_id, int *grid_id, char *name,
- char *units, void *missing ) {
- return(cmor_time_varying_grid_coordinate( coord_grid_id, *grid_id,
- name, units, 'd', missing,
- NULL ));
+int cmor_grid_cff_tvc_d_(int *coord_grid_id, int *grid_id, char *name,
+ char *units, void *missing)
+{
+ return (cmor_time_varying_grid_coordinate(coord_grid_id, *grid_id,
+ name, units, 'd', missing, NULL));
}
/************************************************************************/
/* cmor_grid_cff_tvc_i_() */
/************************************************************************/
-int cmor_grid_cff_tvc_i_( int *coord_grid_id, int *grid_id, char *name,
- char *units, void *missing ) {
- return(cmor_time_varying_grid_coordinate( coord_grid_id, *grid_id,
- name, units, 'i', missing,
- NULL ));
+int cmor_grid_cff_tvc_i_(int *coord_grid_id, int *grid_id, char *name,
+ char *units, void *missing)
+{
+ return (cmor_time_varying_grid_coordinate(coord_grid_id, *grid_id,
+ name, units, 'i', missing, NULL));
}
/************************************************************************/
/* cmor_grid_cff_tvc_no_() */
/************************************************************************/
-int cmor_grid_cff_tvc_no_( int *coord_grid_id, int *grid_id, char *name,
- char *units ) {
- return(cmor_time_varying_grid_coordinate( coord_grid_id, *grid_id,
- name, units, 'f', NULL,
- NULL ));
+int cmor_grid_cff_tvc_no_(int *coord_grid_id, int *grid_id, char *name,
+ char *units)
+{
+ return (cmor_time_varying_grid_coordinate(coord_grid_id, *grid_id,
+ name, units, 'f', NULL, NULL));
}
-
/************************************************************************/
/* cmor_load_table_cff_() */
/************************************************************************/
-int cmor_load_table_cff_( char table[CMOR_MAX_STRING], int *table_id ) {
- return(cmor_load_table( table, table_id ));
+int cmor_load_table_cff_(char table[CMOR_MAX_STRING], int *table_id)
+{
+ return (cmor_load_table(table, table_id));
}
/************************************************************************/
/* cmor_set_table_cff_() */
/************************************************************************/
-void cmor_set_table_cff_( int *table ) {
+void cmor_set_table_cff_(int *table)
+{
- cmor_set_table( *table );
+ cmor_set_table(*table);
}
/************************************************************************/
/* cmor_handle_error_cff_() */
/************************************************************************/
-void cmor_handle_error_cff_( char error_msg[CMOR_MAX_STRING], int *level ) {
- cmor_handle_error( error_msg, *level );
+void cmor_handle_error_cff_(char error_msg[CMOR_MAX_STRING], int *level)
+{
+ cmor_handle_error(error_msg, *level);
}
-
/************************************************************************/
/* cmor_setup_cff_nolog_() */
/************************************************************************/
-int cmor_setup_cff_nolog_( char *path, int *netcdf, int *verbosity,
- int *mode, int *crsub ) {
- return(cmor_setup( path, netcdf, verbosity, mode, NULL, crsub ));
+int cmor_setup_cff_nolog_(char *path, int *netcdf, int *verbosity,
+ int *mode, int *crsub)
+{
+ return (cmor_setup(path, netcdf, verbosity, mode, NULL, crsub));
}
/************************************************************************/
/* cmor_setup_cff_() */
/************************************************************************/
-int cmor_setup_cff_( char *path, int *netcdf, int *verbosity, int *mode,
- char *logfile, int *crsub ) {
- return(cmor_setup( path, netcdf, verbosity, mode, logfile, crsub ));
+int cmor_setup_cff_(char *path, int *netcdf, int *verbosity, int *mode,
+ char *logfile, int *crsub)
+{
+ return (cmor_setup(path, netcdf, verbosity, mode, logfile, crsub));
}
/************************************************************************/
/* cmor_dataset_json_cff_() */
/************************************************************************/
-int cmor_dataset_json_cff_( char *json_file) {
- return(cmor_dataset_json( json_file ));
+int cmor_dataset_json_cff_(char *json_file)
+{
+ return (cmor_dataset_json(json_file));
}
-
/************************************************************************/
/* cmor_axis_cff_double_() */
/************************************************************************/
-int cmor_axis_cff_double_( int *axis_id, char *name, char *units,
- int *length, void *coord_vals,
- void *cell_bounds, int *cell_bounds_ndim,
- char *interval ) {
- return(cmor_axis( axis_id, name, units, *length, coord_vals, 'd',
- cell_bounds, *cell_bounds_ndim, interval ));
+int cmor_axis_cff_double_(int *axis_id, char *name, char *units,
+ int *length, void *coord_vals,
+ void *cell_bounds, int *cell_bounds_ndim,
+ char *interval)
+{
+ return (cmor_axis(axis_id, name, units, *length, coord_vals, 'd',
+ cell_bounds, *cell_bounds_ndim, interval));
}
-int cmor_axis_cff_real_( int *axis_id, char *name, char *units,
- int *length, void *coord_vals, void *cell_bounds,
- int *cell_bounds_ndim, char *interval ) {
- return(cmor_axis( axis_id, name, units, *length, coord_vals, 'f',
- cell_bounds, *cell_bounds_ndim, interval ));
+
+int cmor_axis_cff_real_(int *axis_id, char *name, char *units,
+ int *length, void *coord_vals, void *cell_bounds,
+ int *cell_bounds_ndim, char *interval)
+{
+ return (cmor_axis(axis_id, name, units, *length, coord_vals, 'f',
+ cell_bounds, *cell_bounds_ndim, interval));
/************************************************************************/
/* cmor_axis_cff_int_() */
/************************************************************************/
}
-int cmor_axis_cff_int_( int *axis_id, char *name, char *units, int *length,
- void *coord_vals, void *cell_bounds,
- int *cell_bounds_ndim, char *interval ) {
- return(cmor_axis( axis_id, name, units, *length, coord_vals, 'i',
- cell_bounds, *cell_bounds_ndim, interval ));
+
+int cmor_axis_cff_int_(int *axis_id, char *name, char *units, int *length,
+ void *coord_vals, void *cell_bounds,
+ int *cell_bounds_ndim, char *interval)
+{
+ return (cmor_axis(axis_id, name, units, *length, coord_vals, 'i',
+ cell_bounds, *cell_bounds_ndim, interval));
}
/************************************************************************/
/* cmor_axis_cff_long_() */
/************************************************************************/
-int cmor_axis_cff_long_( int *axis_id, char *name, char *units,
- int *length, void *coord_vals, void *cell_bounds,
- int *cell_bounds_ndim, char *interval ) {
- return(cmor_axis( axis_id, name, units, *length, coord_vals, 'l',
- cell_bounds, *cell_bounds_ndim, interval ));
+int cmor_axis_cff_long_(int *axis_id, char *name, char *units,
+ int *length, void *coord_vals, void *cell_bounds,
+ int *cell_bounds_ndim, char *interval)
+{
+ return (cmor_axis(axis_id, name, units, *length, coord_vals, 'l',
+ cell_bounds, *cell_bounds_ndim, interval));
}
/************************************************************************/
/* cmor_axis_cff_nobnds_double_() */
/************************************************************************/
-int cmor_axis_cff_nobnds_double_( int *axis_id, char *name, char *units,
- int *length, void *coord_vals,
- char *interval ) {
- return(cmor_axis( axis_id, name, units, *length, coord_vals, 'd', NULL,
- 0, interval ));
+int cmor_axis_cff_nobnds_double_(int *axis_id, char *name, char *units,
+ int *length, void *coord_vals, char *interval)
+{
+ return (cmor_axis(axis_id, name, units, *length, coord_vals, 'd', NULL,
+ 0, interval));
}
/************************************************************************/
/* cmor_axis_cff_nobnds_real_() */
/************************************************************************/
-int cmor_axis_cff_nobnds_real_( int *axis_id, char *name, char *units,
- int *length, void *coord_vals,
- char *interval ) {
- return(cmor_axis( axis_id, name, units, *length, coord_vals, 'f', NULL,
- 0, interval ));
+int cmor_axis_cff_nobnds_real_(int *axis_id, char *name, char *units,
+ int *length, void *coord_vals, char *interval)
+{
+ return (cmor_axis(axis_id, name, units, *length, coord_vals, 'f', NULL,
+ 0, interval));
}
/************************************************************************/
/* cmor_axis_cff_nobnds_int_() */
/************************************************************************/
-int cmor_axis_cff_nobnds_int_( int *axis_id, char *name, char *units,
- int *length, void *coord_vals,
- char *interval ) {
- return(cmor_axis( axis_id, name, units, *length, coord_vals, 'i', NULL,
- 0, interval ));
+int cmor_axis_cff_nobnds_int_(int *axis_id, char *name, char *units,
+ int *length, void *coord_vals, char *interval)
+{
+ return (cmor_axis(axis_id, name, units, *length, coord_vals, 'i', NULL,
+ 0, interval));
}
/************************************************************************/
/* cmor_axis_cff_nobnds_long_() */
/************************************************************************/
-int cmor_axis_cff_nobnds_long_( int *axis_id, char *name, char *units,
- int *length, void *coord_vals,
- char *interval ) {
- return(cmor_axis( axis_id, name, units, *length, coord_vals, 'l', NULL,
- 0, interval ));
+int cmor_axis_cff_nobnds_long_(int *axis_id, char *name, char *units,
+ int *length, void *coord_vals, char *interval)
+{
+ return (cmor_axis(axis_id, name, units, *length, coord_vals, 'l', NULL,
+ 0, interval));
}
/************************************************************************/
/* cmor_axis_cff_nobnds_char_() */
/************************************************************************/
-int cmor_axis_cff_nobnds_char_( int *axis_id, char *name, char *units,
- int *length, void *coord_vals,
- int *cell_bounds_ndim, char *interval ) {
- return(cmor_axis( axis_id, name, units, *length, coord_vals, 'c', NULL,
- *cell_bounds_ndim, interval ));
+int cmor_axis_cff_nobnds_char_(int *axis_id, char *name, char *units,
+ int *length, void *coord_vals,
+ int *cell_bounds_ndim, char *interval)
+{
+ return (cmor_axis(axis_id, name, units, *length, coord_vals, 'c', NULL,
+ *cell_bounds_ndim, interval));
}
/************************************************************************/
/* cmor_axis_cff_nocoords_() */
/************************************************************************/
-int cmor_axis_cff_nocoords_( int *axis_id, char *name, char *units,
- int *length, char *interval ) {
- return(cmor_axis( axis_id, name, units, *length, NULL, 'd', NULL, 0,
- interval ));
+int cmor_axis_cff_nocoords_(int *axis_id, char *name, char *units,
+ int *length, char *interval)
+{
+ return (cmor_axis(axis_id, name, units, *length, NULL, 'd', NULL, 0,
+ interval));
}
/************************************************************************/
/* cmor_zfactor_cff_double_() */
/************************************************************************/
-int cmor_zfactor_cff_double_( int *zvar_id, int *axis_id, char *name,
- char *units, int *ndims, int *axes_ids,
- void *values, void *bounds ) {
- return(cmor_zfactor( zvar_id, *axis_id, name, units, *ndims, axes_ids,
- 'd', values, bounds ));
+int cmor_zfactor_cff_double_(int *zvar_id, int *axis_id, char *name,
+ char *units, int *ndims, int *axes_ids,
+ void *values, void *bounds)
+{
+ return (cmor_zfactor(zvar_id, *axis_id, name, units, *ndims, axes_ids,
+ 'd', values, bounds));
}
/************************************************************************/
/* cmor_zfactor_cff_double_nobnds_() */
/************************************************************************/
-int cmor_zfactor_cff_double_nobnds_( int *zvar_id, int *axis_id,
- char *name, char *units, int *ndims,
- int *axes_ids, void *values ) {
- return(cmor_zfactor( zvar_id, *axis_id, name, units, *ndims, axes_ids,
- 'd', values, NULL ));
+int cmor_zfactor_cff_double_nobnds_(int *zvar_id, int *axis_id,
+ char *name, char *units, int *ndims,
+ int *axes_ids, void *values)
+{
+ return (cmor_zfactor(zvar_id, *axis_id, name, units, *ndims, axes_ids,
+ 'd', values, NULL));
}
/************************************************************************/
/* cmor_zfactor_cff_int_() */
/************************************************************************/
-int cmor_zfactor_cff_int_( int *zvar_id, int *axis_id, char *name,
- char *units, int *ndims, int *axes_ids,
- void *values, void *bounds ) {
- return(cmor_zfactor( zvar_id, *axis_id, name, units, *ndims, axes_ids,
- 'i', values, bounds ));
+int cmor_zfactor_cff_int_(int *zvar_id, int *axis_id, char *name,
+ char *units, int *ndims, int *axes_ids,
+ void *values, void *bounds)
+{
+ return (cmor_zfactor(zvar_id, *axis_id, name, units, *ndims, axes_ids,
+ 'i', values, bounds));
}
/************************************************************************/
/* cmor_zfactor_cff_int_nobnds_() */
/************************************************************************/
-int cmor_zfactor_cff_int_nobnds_( int *zvar_id, int *axis_id, char *name,
- char *units, int *ndims, int *axes_ids,
- void *values ) {
- return(cmor_zfactor( zvar_id, *axis_id, name, units, *ndims, axes_ids,
- 'i', values, NULL ));
+int cmor_zfactor_cff_int_nobnds_(int *zvar_id, int *axis_id, char *name,
+ char *units, int *ndims, int *axes_ids,
+ void *values)
+{
+ return (cmor_zfactor(zvar_id, *axis_id, name, units, *ndims, axes_ids,
+ 'i', values, NULL));
}
/************************************************************************/
/* cmor_zfactor_cff_long_() */
/************************************************************************/
-int cmor_zfactor_cff_long_( int *zvar_id, int *axis_id, char *name,
- char *units, int *ndims, int *axes_ids,
- void *values, void *bounds ) {
- return(cmor_zfactor( zvar_id, *axis_id, name, units, *ndims, axes_ids,
- 'l', values, bounds ));
+int cmor_zfactor_cff_long_(int *zvar_id, int *axis_id, char *name,
+ char *units, int *ndims, int *axes_ids,
+ void *values, void *bounds)
+{
+ return (cmor_zfactor(zvar_id, *axis_id, name, units, *ndims, axes_ids,
+ 'l', values, bounds));
}
/************************************************************************/
/* cmor_zfactor_cff_long_nobnds_() */
/************************************************************************/
-int cmor_zfactor_cff_long_nobnds_( int *zvar_id, int *axis_id, char *name,
- char *units, int *ndims, int *axes_ids,
- void *values ) {
- return(cmor_zfactor( zvar_id, *axis_id, name, units, *ndims, axes_ids,
- 'l', values, NULL ));
+int cmor_zfactor_cff_long_nobnds_(int *zvar_id, int *axis_id, char *name,
+ char *units, int *ndims, int *axes_ids,
+ void *values)
+{
+ return (cmor_zfactor(zvar_id, *axis_id, name, units, *ndims, axes_ids,
+ 'l', values, NULL));
}
/************************************************************************/
/* cmor_zfactor_cff_real_() */
/************************************************************************/
-int cmor_zfactor_cff_real_( int *zvar_id, int *axis_id, char *name,
- char *units, int *ndims, int *axes_ids,
- void *values, void *bounds ) {
- return(cmor_zfactor( zvar_id, *axis_id, name, units, *ndims, axes_ids,
- 'f', values, bounds ));
+int cmor_zfactor_cff_real_(int *zvar_id, int *axis_id, char *name,
+ char *units, int *ndims, int *axes_ids,
+ void *values, void *bounds)
+{
+ return (cmor_zfactor(zvar_id, *axis_id, name, units, *ndims, axes_ids,
+ 'f', values, bounds));
}
/************************************************************************/
/* cmor_zfactor_cff_real_nobnds_() */
/************************************************************************/
-int cmor_zfactor_cff_real_nobnds_( int *zvar_id, int *axis_id, char *name,
- char *units, int *ndims, int *axes_ids,
- void *values ) {
- return(cmor_zfactor( zvar_id, *axis_id, name, units, *ndims, axes_ids,
- 'f', values, NULL ));
+int cmor_zfactor_cff_real_nobnds_(int *zvar_id, int *axis_id, char *name,
+ char *units, int *ndims, int *axes_ids,
+ void *values)
+{
+ return (cmor_zfactor(zvar_id, *axis_id, name, units, *ndims, axes_ids,
+ 'f', values, NULL));
}
/************************************************************************/
/* cmor_zfactor_cff_novals_() */
/************************************************************************/
-int cmor_zfactor_cff_novals_( int *zvar_id, int *axis_id, char *name,
- char *units, int *ndims, int *axes_ids ) {
- return(cmor_zfactor( zvar_id, *axis_id, name, units, *ndims, axes_ids,
- 'd', NULL, NULL ));
+int cmor_zfactor_cff_novals_(int *zvar_id, int *axis_id, char *name,
+ char *units, int *ndims, int *axes_ids)
+{
+ return (cmor_zfactor(zvar_id, *axis_id, name, units, *ndims, axes_ids,
+ 'd', NULL, NULL));
}
/************************************************************************/
/* cmor_variable_cff_double_() */
/************************************************************************/
-int cmor_variable_cff_double_( int *var_id, char *name, char *units,
- int *ndims, int *axes_ids, double *missing,
- double *tolerance, char *positive,
- char *original_name, char *history,
- char *comment ) {
- return(cmor_variable( var_id, name, units, *ndims, axes_ids, 'd',
- missing, tolerance, positive, original_name,
- history, comment ));
+int cmor_variable_cff_double_(int *var_id, char *name, char *units,
+ int *ndims, int *axes_ids, double *missing,
+ double *tolerance, char *positive,
+ char *original_name, char *history, char *comment)
+{
+ return (cmor_variable(var_id, name, units, *ndims, axes_ids, 'd',
+ missing, tolerance, positive, original_name,
+ history, comment));
}
/************************************************************************/
/* cmor_variable_cff_real_() */
/************************************************************************/
-int cmor_variable_cff_real_( int *var_id, char *name, char *units,
- int *ndims, int *axes_ids, float *missing,
- double *tolerance, char *positive,
- char *original_name, char *history,
- char *comment ) {
- return(cmor_variable( var_id, name, units, *ndims, axes_ids, 'f',
- missing, tolerance, positive, original_name,
- history, comment ));
+int cmor_variable_cff_real_(int *var_id, char *name, char *units,
+ int *ndims, int *axes_ids, float *missing,
+ double *tolerance, char *positive,
+ char *original_name, char *history, char *comment)
+{
+ return (cmor_variable(var_id, name, units, *ndims, axes_ids, 'f',
+ missing, tolerance, positive, original_name,
+ history, comment));
}
/************************************************************************/
/* cmor_variable_cff_int_() */
/************************************************************************/
-int cmor_variable_cff_int_( int *var_id, char *name, char *units,
- int *ndims, int *axes_ids, int *missing,
- double *tolerance, char *positive,
- char *original_name, char *history,
- char *comment ) {
- return(cmor_variable( var_id, name, units, *ndims, axes_ids, 'i',
- missing, tolerance, positive, original_name,
- history, comment ));
+int cmor_variable_cff_int_(int *var_id, char *name, char *units,
+ int *ndims, int *axes_ids, int *missing,
+ double *tolerance, char *positive,
+ char *original_name, char *history, char *comment)
+{
+ return (cmor_variable(var_id, name, units, *ndims, axes_ids, 'i',
+ missing, tolerance, positive, original_name,
+ history, comment));
}
/************************************************************************/
/* cmor_variable_cff_long_() */
/************************************************************************/
-int cmor_variable_cff_long_( int *var_id, char *name, char *units,
- int *ndims, int *axes_ids, long *missing,
- double *tolerance, char *positive,
- char *original_name, char *history,
- char *comment ) {
- return(cmor_variable( var_id, name, units, *ndims, axes_ids, 'l',
- missing, tolerance, positive, original_name,
- history, comment ));
+int cmor_variable_cff_long_(int *var_id, char *name, char *units,
+ int *ndims, int *axes_ids, long *missing,
+ double *tolerance, char *positive,
+ char *original_name, char *history, char *comment)
+{
+ return (cmor_variable(var_id, name, units, *ndims, axes_ids, 'l',
+ missing, tolerance, positive, original_name,
+ history, comment));
}
/************************************************************************/
/* cmor_variable_cff_nomiss_() */
/************************************************************************/
-int cmor_variable_cff_nomiss_( int *var_id, char *name, char *units,
- int *ndims, int *axes_ids,
- double *tolerance, char *positive,
- char *original_name, char *history,
- char *comment ) {
- return(cmor_variable( var_id, name, units, *ndims, axes_ids, 'f', NULL,
- tolerance, positive, original_name, history,
- comment ));
+int cmor_variable_cff_nomiss_(int *var_id, char *name, char *units,
+ int *ndims, int *axes_ids,
+ double *tolerance, char *positive,
+ char *original_name, char *history, char *comment)
+{
+ return (cmor_variable(var_id, name, units, *ndims, axes_ids, 'f', NULL,
+ tolerance, positive, original_name, history,
+ comment));
}
/************************************************************************/
/* cmor_write_cff_double_() */
/************************************************************************/
-int cmor_write_cff_double_( int *var_id, void *data,
- int *ntimes_passed, double *time_vals,
- double *time_bounds, int *refvar ) {
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'd', *ntimes_passed,
- time_vals, time_bounds, NULL ));
+int cmor_write_cff_double_(int *var_id, void *data,
+ int *ntimes_passed, double *time_vals,
+ double *time_bounds, int *refvar)
+{
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'd', *ntimes_passed,
+ time_vals, time_bounds, NULL));
} else {
- return(cmor_write( *var_id, data, 'd', *ntimes_passed,
- time_vals, time_bounds, refvar ));
+ return (cmor_write(*var_id, data, 'd', *ntimes_passed,
+ time_vals, time_bounds, refvar));
}
}
@@ -661,15 +707,16 @@ int cmor_write_cff_double_( int *var_id, void *data,
/* cmor_write_cff_double_nobnds_() */
/************************************************************************/
-int cmor_write_cff_double_nobnds_( int *var_id, void *data,
- int *ntimes_passed, double *time_vals,
- int *refvar ) {
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'd', *ntimes_passed,
- time_vals, NULL, NULL ));
+int cmor_write_cff_double_nobnds_(int *var_id, void *data,
+ int *ntimes_passed, double *time_vals,
+ int *refvar)
+{
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'd', *ntimes_passed,
+ time_vals, NULL, NULL));
} else {
- return(cmor_write( *var_id, data, 'd', *ntimes_passed,
- time_vals, NULL, refvar ));
+ return (cmor_write(*var_id, data, 'd', *ntimes_passed,
+ time_vals, NULL, refvar));
}
}
@@ -677,44 +724,47 @@ int cmor_write_cff_double_nobnds_( int *var_id, void *data,
/* cmor_write_cff_double_notime_() */
/************************************************************************/
-int cmor_write_cff_double_notime_( int *var_id, void *data,
- int *ntimes_passed, int *refvar ) {
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'd', *ntimes_passed,
- NULL, NULL, NULL ));
+int cmor_write_cff_double_notime_(int *var_id, void *data,
+ int *ntimes_passed, int *refvar)
+{
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'd', *ntimes_passed,
+ NULL, NULL, NULL));
} else {
- return(cmor_write( *var_id, data, 'd', *ntimes_passed,
- NULL, NULL, refvar ));
+ return (cmor_write(*var_id, data, 'd', *ntimes_passed,
+ NULL, NULL, refvar));
}
}
/************************************************************************/
/* cmor_write_cff_real_() */
/************************************************************************/
-int cmor_write_cff_real_( int *var_id, void *data,
- int *ntimes_passed, double *time_vals,
- double *time_bounds, int *refvar ) {
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'f', *ntimes_passed,
- time_vals, time_bounds, NULL ));
+int cmor_write_cff_real_(int *var_id, void *data,
+ int *ntimes_passed, double *time_vals,
+ double *time_bounds, int *refvar)
+{
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'f', *ntimes_passed,
+ time_vals, time_bounds, NULL));
} else {
- return(cmor_write( *var_id, data, 'f', *ntimes_passed,
- time_vals, time_bounds, refvar ));
+ return (cmor_write(*var_id, data, 'f', *ntimes_passed,
+ time_vals, time_bounds, refvar));
}
}
/************************************************************************/
/* cmor_write_cff_real_nobnds_() */
/************************************************************************/
-int cmor_write_cff_real_nobnds_( int *var_id, void *data,
- int *ntimes_passed, double *time_vals,
- int *refvar ) {
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'f', *ntimes_passed,
- time_vals, NULL, NULL ));
+int cmor_write_cff_real_nobnds_(int *var_id, void *data,
+ int *ntimes_passed, double *time_vals,
+ int *refvar)
+{
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'f', *ntimes_passed,
+ time_vals, NULL, NULL));
} else {
- return(cmor_write( *var_id, data, 'f', *ntimes_passed,
- time_vals, NULL, refvar ));
+ return (cmor_write(*var_id, data, 'f', *ntimes_passed,
+ time_vals, NULL, refvar));
}
}
@@ -722,15 +772,16 @@ int cmor_write_cff_real_nobnds_( int *var_id, void *data,
/* cmor_write_cff_real_notime_() */
/************************************************************************/
-int cmor_write_cff_real_notime_( int *var_id, void *data,
- int *ntimes_passed, int *refvar ) {
+int cmor_write_cff_real_notime_(int *var_id, void *data,
+ int *ntimes_passed, int *refvar)
+{
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'f', *ntimes_passed,
- NULL, NULL, NULL ));
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'f', *ntimes_passed,
+ NULL, NULL, NULL));
} else {
- return(cmor_write( *var_id, data, 'f', *ntimes_passed,
- NULL, NULL, refvar ));
+ return (cmor_write(*var_id, data, 'f', *ntimes_passed,
+ NULL, NULL, refvar));
}
}
@@ -738,15 +789,16 @@ int cmor_write_cff_real_notime_( int *var_id, void *data,
/* cmor_write_cff_int_() */
/************************************************************************/
-int cmor_write_cff_int_( int *var_id, void *data,
- int *ntimes_passed, double *time_vals,
- double *time_bounds, int *refvar ) {
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'i', *ntimes_passed,
- time_vals, time_bounds, NULL ));
+int cmor_write_cff_int_(int *var_id, void *data,
+ int *ntimes_passed, double *time_vals,
+ double *time_bounds, int *refvar)
+{
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'i', *ntimes_passed,
+ time_vals, time_bounds, NULL));
} else {
- return(cmor_write( *var_id, data, 'i', *ntimes_passed,
- time_vals, time_bounds, refvar ));
+ return (cmor_write(*var_id, data, 'i', *ntimes_passed,
+ time_vals, time_bounds, refvar));
}
}
@@ -754,15 +806,16 @@ int cmor_write_cff_int_( int *var_id, void *data,
/* cmor_write_cff_int_nobnds_() */
/************************************************************************/
-int cmor_write_cff_int_nobnds_( int *var_id, void *data,
- int *ntimes_passed, double *time_vals,
- int *refvar ) {
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'i', *ntimes_passed,
- time_vals, NULL, NULL ));
+int cmor_write_cff_int_nobnds_(int *var_id, void *data,
+ int *ntimes_passed, double *time_vals,
+ int *refvar)
+{
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'i', *ntimes_passed,
+ time_vals, NULL, NULL));
} else {
- return(cmor_write( *var_id, data, 'i', *ntimes_passed,
- time_vals, NULL, refvar ));
+ return (cmor_write(*var_id, data, 'i', *ntimes_passed,
+ time_vals, NULL, refvar));
}
}
@@ -770,14 +823,15 @@ int cmor_write_cff_int_nobnds_( int *var_id, void *data,
/* cmor_write_cff_int_notime_() */
/************************************************************************/
-int cmor_write_cff_int_notime_( int *var_id, void *data,
- int *ntimes_passed, int *refvar ) {
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'i', *ntimes_passed,
- NULL, NULL, NULL ));
+int cmor_write_cff_int_notime_(int *var_id, void *data,
+ int *ntimes_passed, int *refvar)
+{
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'i', *ntimes_passed,
+ NULL, NULL, NULL));
} else {
- return(cmor_write( *var_id, data, 'i', *ntimes_passed,
- NULL, NULL, refvar ));
+ return (cmor_write(*var_id, data, 'i', *ntimes_passed,
+ NULL, NULL, refvar));
}
}
@@ -785,30 +839,32 @@ int cmor_write_cff_int_notime_( int *var_id, void *data,
/* cmor_write_cff_long_() */
/************************************************************************/
-int cmor_write_cff_long_( int *var_id, void *data,
- int *ntimes_passed, double *time_vals,
- double *time_bounds, int *refvar ) {
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'l', *ntimes_passed,
- time_vals, time_bounds, NULL ));
+int cmor_write_cff_long_(int *var_id, void *data,
+ int *ntimes_passed, double *time_vals,
+ double *time_bounds, int *refvar)
+{
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'l', *ntimes_passed,
+ time_vals, time_bounds, NULL));
} else {
- return(cmor_write( *var_id, data, 'l', *ntimes_passed,
- time_vals, time_bounds, refvar ));
+ return (cmor_write(*var_id, data, 'l', *ntimes_passed,
+ time_vals, time_bounds, refvar));
}
}
/************************************************************************/
/* cmor_write_cff_long_nobnds_() */
/************************************************************************/
-int cmor_write_cff_long_nobnds_( int *var_id, void *data,
- int *ntimes_passed, double *time_vals,
- int *refvar ) {
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'l', *ntimes_passed,
- time_vals, NULL, NULL ));
+int cmor_write_cff_long_nobnds_(int *var_id, void *data,
+ int *ntimes_passed, double *time_vals,
+ int *refvar)
+{
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'l', *ntimes_passed,
+ time_vals, NULL, NULL));
} else {
- return(cmor_write( *var_id, data, 'l', *ntimes_passed,
- time_vals, NULL, refvar ));
+ return (cmor_write(*var_id, data, 'l', *ntimes_passed,
+ time_vals, NULL, refvar));
}
}
@@ -816,13 +872,14 @@ int cmor_write_cff_long_nobnds_( int *var_id, void *data,
/* cmor_write_cff_long_notime_() */
/************************************************************************/
-int cmor_write_cff_long_notime_( int *var_id, void *data,
- int *ntimes_passed, int *refvar ) {
- if( *refvar < 0 ) {
- return(cmor_write( *var_id, data, 'l', *ntimes_passed,
- NULL, NULL, NULL ));
+int cmor_write_cff_long_notime_(int *var_id, void *data,
+ int *ntimes_passed, int *refvar)
+{
+ if (*refvar < 0) {
+ return (cmor_write(*var_id, data, 'l', *ntimes_passed,
+ NULL, NULL, NULL));
} else {
- return(cmor_write( *var_id, data, 'l', *ntimes_passed,
- NULL, NULL, refvar ));
+ return (cmor_write(*var_id, data, 'l', *ntimes_passed,
+ NULL, NULL, refvar));
}
}
diff --git a/Src/cmor_grids.c b/Src/cmor_grids.c
index 8e58e94..7f89278 100644
--- a/Src/cmor_grids.c
+++ b/Src/cmor_grids.c
@@ -9,27 +9,28 @@
/* ==================================================================== */
extern int CMOR_TABLE;
-extern int cmor_set_variable_attribute_internal( int id,
- char *attribute_name,
- char type, void *value );
+extern int cmor_set_variable_attribute_internal(int id,
+ char *attribute_name,
+ char type, void *value);
/************************************************************************/
/* cmor_init_grid_mapping() */
/************************************************************************/
-void cmor_init_grid_mapping( cmor_mappings_t * mapping, char *id ) {
+void cmor_init_grid_mapping(cmor_mappings_t * mapping, char *id)
+{
int n;
- cmor_add_traceback( "cmor_init_grid_mapping" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_init_grid_mapping");
+ cmor_is_setup();
mapping->nattributes = 0;
- for( n = 0; n < CMOR_MAX_GRID_ATTRIBUTES; n++ ) {
- mapping->attributes_names[n][0] = '\0';
+ for (n = 0; n < CMOR_MAX_GRID_ATTRIBUTES; n++) {
+ mapping->attributes_names[n][0] = '\0';
}
- strcpy( mapping->coordinates, "" );
- strncpy( mapping->id, id, CMOR_MAX_STRING );
- cmor_pop_traceback( );
+ strcpy(mapping->coordinates, "");
+ strncpy(mapping->id, id, CMOR_MAX_STRING);
+ cmor_pop_traceback();
return;
@@ -38,78 +39,85 @@ void cmor_init_grid_mapping( cmor_mappings_t * mapping, char *id ) {
/************************************************************************/
/* cmor_copy_data() */
/************************************************************************/
-int cmor_copy_data( double **dest1, void *data, char type, int nelts ) {
+int cmor_copy_data(double **dest1, void *data, char type, int nelts)
+{
int i;
char msg[CMOR_MAX_STRING];
double *dest;
- cmor_add_traceback( "cmor_copy_data" );
+ cmor_add_traceback("cmor_copy_data");
dest = *dest1;
/* -------------------------------------------------------------------- */
/* First free the dest if already allocated */
/* -------------------------------------------------------------------- */
- if( dest != NULL ) {
- free( dest );
+ if (dest != NULL) {
+ free(dest);
}
- dest = malloc( nelts * sizeof ( double ) );
- for( i = 0; i < nelts; i++ ) {
- if( type == 'f' )
- dest[i] = ( double ) ( ( float * ) data )[i];
- else if( type == 'i' )
- dest[i] = ( double ) ( ( int * ) data )[i];
- else if( type == 'l' )
- dest[i] = ( double ) ( ( long * ) data )[i];
- else if( type == 'd' )
- dest[i] = ( double ) ( ( double * ) data )[i];
- else {
- snprintf( msg, CMOR_MAX_STRING, "wrong data type: %c", type );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ dest = malloc(nelts * sizeof(double));
+ for (i = 0; i < nelts; i++) {
+ if (type == 'f')
+ dest[i] = (double)((float *)data)[i];
+ else if (type == 'i')
+ dest[i] = (double)((int *)data)[i];
+ else if (type == 'l')
+ dest[i] = (double)((long *)data)[i];
+ else if (type == 'd')
+ dest[i] = (double)((double *)data)[i];
+ else {
+ snprintf(msg, CMOR_MAX_STRING, "wrong data type: %c", type);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
}
*dest1 = dest;
- cmor_pop_traceback( );
- return(0);
+ cmor_pop_traceback();
+ return (0);
}
+
/************************************************************************/
/* cmor_has_grid_attribute() */
/************************************************************************/
-int cmor_has_grid_attribute( int gid, char *name ) {
+int cmor_has_grid_attribute(int gid, char *name)
+{
int i;
int grid_id;
grid_id = -gid - CMOR_MAX_GRIDS;
- for( i = 0; i < cmor_grids[grid_id].nattributes; i++ ) {
- if( strcmp( name, cmor_grids[grid_id].attributes_names[i] ) == 0 )
- return(0);
+ for (i = 0; i < cmor_grids[grid_id].nattributes; i++) {
+ if (strcmp(name, cmor_grids[grid_id].attributes_names[i]) == 0)
+ return (0);
}
- return(1);
+ return (1);
}
+
/************************************************************************/
/* cmor_get_grid_attribute() */
/************************************************************************/
-int cmor_get_grid_attribute( int gid, char *name, double *value ) {
+int cmor_get_grid_attribute(int gid, char *name, double *value)
+{
int i, j;
int grid_id;
grid_id = -gid - CMOR_MAX_GRIDS;
j = -1;
- for( i = 0; i < cmor_grids[grid_id].nattributes; i++ ) {
- if( strcmp( name, cmor_grids[grid_id].attributes_names[i] ) == 0 )
- j = i;
+ for (i = 0; i < cmor_grids[grid_id].nattributes; i++) {
+ if (strcmp(name, cmor_grids[grid_id].attributes_names[i]) == 0)
+ j = i;
}
- if( j != -1 ) {
- *value = cmor_grids[grid_id].attributes_values[j];
- return(0);
+ if (j != -1) {
+ *value = cmor_grids[grid_id].attributes_values[j];
+ return (0);
}
- return(1);
+ return (1);
}
+
/************************************************************************/
/* cmor_convert_value() */
/************************************************************************/
-void cmor_convert_value( char *units, char *ctmp, double *tmp ) {
+void cmor_convert_value(char *units, char *ctmp, double *tmp)
+{
/* -------------------------------------------------------------------- */
/* Local variables */
/* -------------------------------------------------------------------- */
@@ -118,57 +126,54 @@ void cmor_convert_value( char *units, char *ctmp, double *tmp ) {
double value;
char msg[CMOR_MAX_STRING];
-
- cmor_add_traceback( "cmor_convert_value" );
+ cmor_add_traceback("cmor_convert_value");
value = *tmp;
- if( units[0] != '\0' ) {
- cmor_prep_units( ctmp, units, &cmor_units, &user_units,
- &ut_cmor_converter );
- *tmp = cv_convert_double( ut_cmor_converter, value );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error converting units from %s to %s",
- units, ctmp );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- cv_free( ut_cmor_converter );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing converter" );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- ut_free( cmor_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units" );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- ut_free( user_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units" );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (units[0] != '\0') {
+ cmor_prep_units(ctmp, units, &cmor_units, &user_units,
+ &ut_cmor_converter);
+ *tmp = cv_convert_double(ut_cmor_converter, value);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error converting units from %s to %s",
+ units, ctmp);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ cv_free(ut_cmor_converter);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "Udunits: Error freeing converter");
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ ut_free(cmor_units);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "Udunits: Error freeing units");
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ ut_free(user_units);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "Udunits: Error freeing units");
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
} else
- *tmp = value;
- cmor_pop_traceback( );
+ *tmp = value;
+ cmor_pop_traceback();
return;
}
+
/************************************************************************/
/* cmor_set_grid_attribute() */
/************************************************************************/
-int cmor_set_grid_attribute( int gid, char *name, double *value,
- char *units ) {
+int cmor_set_grid_attribute(int gid, char *name, double *value, char *units)
+{
int i, j, iatt;
int grid_id;
char ctmp[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
double tmp;
- cmor_add_traceback( "cmor_set_grid_attribute" );
+ cmor_add_traceback("cmor_set_grid_attribute");
grid_id = -gid - CMOR_MAX_GRIDS;
iatt = cmor_grids[grid_id].nattributes;
tmp = *value;
@@ -177,342 +182,340 @@ int cmor_set_grid_attribute( int gid, char *name, double *value,
/* locate attribute index */
/* -------------------------------------------------------------------- */
- for( i = 0; i < cmor_grids[grid_id].nattributes; i++ ) {
- if( strcmp( name, cmor_grids[grid_id].attributes_names[i] ) == 0 )
- iatt = i;
+ for (i = 0; i < cmor_grids[grid_id].nattributes; i++) {
+ if (strcmp(name, cmor_grids[grid_id].attributes_names[i]) == 0)
+ iatt = i;
}
- if( iatt == cmor_grids[grid_id].nattributes )
- cmor_grids[grid_id].nattributes++;
+ if (iatt == cmor_grids[grid_id].nattributes)
+ cmor_grids[grid_id].nattributes++;
/* -------------------------------------------------------------------- */
/* loop thru attributes */
/* -------------------------------------------------------------------- */
- if( strcmp( name, "false_easting" ) == 0 ) {
- j = -1;
- for( i = 0; i < cmor_grids[grid_id].ndims; i++ ) {
- cmor_get_axis_attribute( cmor_grids[grid_id].axes_ids[i],
- "standard_name", 'c', &ctmp[0] );
- if( strcmp( ctmp, "projection_x_coordinate" ) == 0 )
- j = i;
- }
- if( j == -1 ) {
- snprintf( ctmp, CMOR_MAX_STRING,
- "grid mapping attribute: 'false easting' must be set in conjunction with ut_cmor_a 'projection_x_coordinate' axis, I could not find such an axis on your grid, we will not set this attribute" );
- cmor_handle_error( ctmp, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(1);
- }
- cmor_get_axis_attribute( cmor_grids[grid_id].axes_ids[j], "units",
- 'c', &ctmp[0] );
- cmor_convert_value( units, ctmp, &tmp );
- } else if( strcmp( name, "false_northing" ) == 0 ) {
- j = -1;
- for( i = 0; i < cmor_grids[grid_id].ndims; i++ ) {
- cmor_get_axis_attribute( cmor_grids[grid_id].axes_ids[i],
- "standard_name", 'c', &ctmp[0] );
- if( strcmp( ctmp, "projection_y_coordinate" ) == 0 )
- j = i;
- }
- if( j == -1 ) {
- snprintf( ctmp, CMOR_MAX_STRING,
- "grid mapping attribute: 'false easting' must be set in conjunction with a 'projection_x_coordinate' axis, I could not find such an axis on your grid, we will not set this attribute" );
- cmor_handle_error( ctmp, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(1);
- }
- cmor_get_axis_attribute( cmor_grids[grid_id].axes_ids[j], "units",
- 'c', &ctmp[0] );
- cmor_convert_value( units, ctmp, &tmp );
- } else if( strcmp( name, "grid_north_pole_latitude" ) == 0
- || strcmp( name, "latitude_of_projection_origin" ) == 0
- || strcmp( name, "standard_parallel" ) == 0
- || strcmp( name, "standard_parallel1" ) == 0
- || strcmp( name, "standard_parallel2" ) == 0 ) {
- strcpy( ctmp, "degrees_north" );
- cmor_convert_value( units, ctmp, &tmp );
- if( ( tmp < -90 ) || ( tmp > 90. ) ) {
- snprintf( msg, CMOR_MAX_STRING,
- "%s parameter must be between -90 and 90 %s, will not be set",
- name, ctmp );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(1);
- }
- } else if( strcmp( name, "grid_north_pole_longitude" ) == 0
- || strcmp( name, "longitude_of_prime_meridian" ) == 0
- || strcmp( name, "longitude_of_central_meridian" ) == 0
- || strcmp( name, "longitude_of_projection_origin" ) == 0
- || strcmp( name, "north_pole_grid_longitude" ) == 0
- || strcmp( name,
- "straight_vertical_longitude_from_pole" ) ==
- 0 ) {
- strcpy( ctmp, "degrees_east" );
- cmor_convert_value( units, ctmp, &tmp );
- if( ( tmp < -180 ) || ( tmp > 180. ) ) {
- snprintf( msg, CMOR_MAX_STRING,
- "%s parameter must be between -180 and 180 %s, will not be set",
- name, ctmp );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(1);
- }
- } else if( strcmp( name, "perspective_point_height" ) == 0
- || strcmp( name, "semi_major_axis" ) == 0
- || strcmp( name, "semi_minor_axis" ) == 0 ) {
- strcpy( ctmp, "m" );
- cmor_convert_value( units, ctmp, &tmp );
- } else if( strcmp( name, "scale_factor_at_central_meridian" ) == 0
- || strcmp( name,
- "scale_factor_at_projection_origin" ) == 0 ) {
- strcpy( ctmp, "m" );
- cmor_convert_value( units, ctmp, &tmp );
- if( tmp < 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "%s parameter must be between positive, will not be set",
- name );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return(1);
- }
+ if (strcmp(name, "false_easting") == 0) {
+ j = -1;
+ for (i = 0; i < cmor_grids[grid_id].ndims; i++) {
+ cmor_get_axis_attribute(cmor_grids[grid_id].axes_ids[i],
+ "standard_name", 'c', &ctmp[0]);
+ if (strcmp(ctmp, "projection_x_coordinate") == 0)
+ j = i;
+ }
+ if (j == -1) {
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "grid mapping attribute: 'false easting' must be set in conjunction with ut_cmor_a 'projection_x_coordinate' axis, I could not find such an axis on your grid, we will not set this attribute");
+ cmor_handle_error(ctmp, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ cmor_get_axis_attribute(cmor_grids[grid_id].axes_ids[j], "units",
+ 'c', &ctmp[0]);
+ cmor_convert_value(units, ctmp, &tmp);
+ } else if (strcmp(name, "false_northing") == 0) {
+ j = -1;
+ for (i = 0; i < cmor_grids[grid_id].ndims; i++) {
+ cmor_get_axis_attribute(cmor_grids[grid_id].axes_ids[i],
+ "standard_name", 'c', &ctmp[0]);
+ if (strcmp(ctmp, "projection_y_coordinate") == 0)
+ j = i;
+ }
+ if (j == -1) {
+ snprintf(ctmp, CMOR_MAX_STRING,
+ "grid mapping attribute: 'false easting' must be set in conjunction with a 'projection_x_coordinate' axis, I could not find such an axis on your grid, we will not set this attribute");
+ cmor_handle_error(ctmp, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ cmor_get_axis_attribute(cmor_grids[grid_id].axes_ids[j], "units",
+ 'c', &ctmp[0]);
+ cmor_convert_value(units, ctmp, &tmp);
+ } else if (strcmp(name, "grid_north_pole_latitude") == 0
+ || strcmp(name, "latitude_of_projection_origin") == 0
+ || strcmp(name, "standard_parallel") == 0
+ || strcmp(name, "standard_parallel1") == 0
+ || strcmp(name, "standard_parallel2") == 0) {
+ strcpy(ctmp, "degrees_north");
+ cmor_convert_value(units, ctmp, &tmp);
+ if ((tmp < -90) || (tmp > 90.)) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "%s parameter must be between -90 and 90 %s, will not be set",
+ name, ctmp);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ } else if (strcmp(name, "grid_north_pole_longitude") == 0
+ || strcmp(name, "longitude_of_prime_meridian") == 0
+ || strcmp(name, "longitude_of_central_meridian") == 0
+ || strcmp(name, "longitude_of_projection_origin") == 0
+ || strcmp(name, "north_pole_grid_longitude") == 0
+ || strcmp(name, "straight_vertical_longitude_from_pole") == 0) {
+ strcpy(ctmp, "degrees_east");
+ cmor_convert_value(units, ctmp, &tmp);
+ if ((tmp < -180) || (tmp > 180.)) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "%s parameter must be between -180 and 180 %s, will not be set",
+ name, ctmp);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ } else if (strcmp(name, "perspective_point_height") == 0
+ || strcmp(name, "semi_major_axis") == 0
+ || strcmp(name, "semi_minor_axis") == 0) {
+ strcpy(ctmp, "m");
+ cmor_convert_value(units, ctmp, &tmp);
+ } else if (strcmp(name, "scale_factor_at_central_meridian") == 0
+ || strcmp(name, "scale_factor_at_projection_origin") == 0) {
+ strcpy(ctmp, "m");
+ cmor_convert_value(units, ctmp, &tmp);
+ if (tmp < 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "%s parameter must be between positive, will not be set",
+ name);
+ cmor_handle_error(msg, CMOR_NORMAL);
+ cmor_pop_traceback();
+ return (1);
+ }
}
/*printf("setting: %s to %lf (orig: %lf)\n",name,tmp,value); */
- strncpy( cmor_grids[grid_id].attributes_names[iatt], name,
- CMOR_MAX_STRING );
+ strncpy(cmor_grids[grid_id].attributes_names[iatt], name, CMOR_MAX_STRING);
cmor_grids[grid_id].attributes_values[iatt] = tmp;
- cmor_pop_traceback( );
- return(0);
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_attribute_in_list() */
/************************************************************************/
-int cmor_attribute_in_list( char *name, int n,
- char ( *atts )[CMOR_MAX_STRING] ) {
+int cmor_attribute_in_list(char *name, int n, char (*atts)[CMOR_MAX_STRING])
+{
int i, found = 1;
- for( i = 0; i < n; i++ ) {
- if( strcmp( name, atts[i] ) == 0 )
- found = 0;
+ for (i = 0; i < n; i++) {
+ if (strcmp(name, atts[i]) == 0)
+ found = 0;
}
- return(found);
+ return (found);
}
+
/************************************************************************/
/* cmor_grid_valid_mapping_attribute_names() */
/************************************************************************/
-int cmor_grid_valid_mapping_attribute_names( char *name, int *natt,
- char ( *att )
- [CMOR_MAX_STRING], int *ndims,
- char ( *dims )
- [CMOR_MAX_STRING] ) {
+int cmor_grid_valid_mapping_attribute_names(char *name, int *natt, char (*att)
+ [CMOR_MAX_STRING], int *ndims,
+ char (*dims)
+ [CMOR_MAX_STRING])
+{
int i, j;
- *natt = -1; /* -1 means mapping name not found */
+ *natt = -1; /* -1 means mapping name not found */
*ndims = 0;
- if( strcmp( name, "albers_conical_equal_area" ) == 0 ) {
- *natt = 5;
- strcpy( att[0], "standard_parallel" );
- strcpy( att[1], "longitude_of_central_meridian" );
- strcpy( att[2], "latitude_of_projection_origin" );
- strcpy( att[3], "false_easting" );
- strcpy( att[4], "false_northing" );
- *ndims = 2;
- strcpy( dims[0], "projection_y_coordinate" );
- strcpy( dims[1], "projection_x_coordinate" );
- } else if( strcmp( name, "azimuthal_equidistant" ) == 0 ) {
- *natt = 4;
- strcpy( att[0], "longitude_of_projection_origin" );
- strcpy( att[1], "latitude_of_projection_origin" );
- strcpy( att[2], "false_easting" );
- strcpy( att[3], "false_northing" );
- *ndims = 2;
- strcpy( dims[0], "projection_y_coordinate" );
- strcpy( dims[1], "projection_x_coordinate" );
- } else if( strcmp( name, "lambert_azimuthal_equal_area" ) == 0 ) {
- *natt = 4;
- strcpy( att[0], "longitude_of_projection_origin" );
- strcpy( att[1], "latitude_of_projection_origin" );
- strcpy( att[2], "false_easting" );
- strcpy( att[3], "false_northing" );
- *ndims = 2;
- strcpy( dims[0], "projection_y_coordinate" );
- strcpy( dims[1], "projection_x_coordinate" );
- } else if( strcmp( name, "lambert_conformal_conic" ) == 0 ) {
- *natt = 5;
- strcpy( att[0], "standard_parallel" );
- strcpy( att[1], "longitude_of_central_meridian" );
- strcpy( att[2], "latitude_of_projection_origin" );
- strcpy( att[3], "false_easting" );
- strcpy( att[4], "false_northing" );
- *ndims = 2;
- strcpy( dims[0], "projection_y_coordinate" );
- strcpy( dims[1], "projection_x_coordinate" );
- } else if( strcmp( name, "lambert_cylindrical_equal_area" ) == 0 ) {
- *natt = 5;
- strcpy( att[0], "standard_parallel" );
- strcpy( att[1], "longitude_of_central_meridian" );
- strcpy( att[2], "scale_factor_at_projection_origin" );
- strcpy( att[3], "false_easting" );
- strcpy( att[4], "false_northing" );
- *ndims = 2;
- strcpy( dims[0], "projection_y_coordinate" );
- strcpy( dims[1], "projection_x_coordinate" );
- } else if( strcmp( name, "latitude_longitude" ) == 0 ) {
- *natt = 0;
- *ndims = 0;
- } else if( strcmp( name, "mercator" ) == 0 ) {
- *natt = 5;
- strcpy( att[0], "standard_parallel" );
- strcpy( att[1], "longitude_of_projection_origin" );
- strcpy( att[2], "scale_factor_at_projection_origin" );
- strcpy( att[3], "false_easting" );
- strcpy( att[4], "false_northing" );
- *ndims = 2;
- strcpy( dims[0], "projection_y_coordinate" );
- strcpy( dims[1], "projection_x_coordinate" );
- } else if( strcmp( name, "orthographic" ) == 0 ) {
- *natt = 4;
- strcpy( att[0], "longitude_of_projection_origin" );
- strcpy( att[1], "latitude_of_projection_origin" );
- strcpy( att[2], "scale_factor_at_projection_origin" );
- strcpy( att[3], "false_easting" );
- strcpy( att[4], "false_northing" );
- *ndims = 2;
- strcpy( dims[0], "projection_x_coordinate" );
- strcpy( dims[1], "projection_y_coordinate" );
- } else if( strcmp( name, "polar_stereographic" ) == 0 ) {
- *natt = 6;
- strcpy( att[0], "straight_vertical_longitude_from_pole" );
- strcpy( att[1], "latitude_of_projection_origin" );
- strcpy( att[2], "standard_parallel" );
- strcpy( att[3], "scale_factor_at_projection_origin" );
- strcpy( att[4], "false_easting" );
- strcpy( att[5], "false_northing" );
- *ndims = 2;
- strcpy( dims[0], "projection_y_coordinate" );
- strcpy( dims[1], "projection_x_coordinate" );
- } else if( strcmp( name, "rotated_latitude_longitude" ) == 0 ) {
- *natt = 3;
- strcpy( att[0], "grid_north_pole_latitude" );
- strcpy( att[1], "grid_north_pole_longitude" );
- strcpy( att[2], "north_pole_grid_longitude" );
- *ndims = 2;
- strcpy( dims[0], "grid_latitude" );
- strcpy( dims[1], "grid_longitude" );
- } else if( strcmp( name, "stereographic" ) == 0 ) {
- *natt = 5;
- strcpy( att[0], "longitude_of_projection_origin" );
- strcpy( att[1], "latitude_of_projection_origin" );
- strcpy( att[2], "scale_factor_at_projection_origin" );
- strcpy( att[3], "false_easting" );
- strcpy( att[4], "false_northing" );
- *ndims = 2;
- strcpy( dims[0], "projection_y_coordinate" );
- strcpy( dims[1], "projection_x_coordinate" );
- } else if( strcmp( name, "transverse_mercator" ) == 0 ) {
- *natt = 5;
- strcpy( att[0], "scale_factor_at_central_meridian" );
- strcpy( att[1], "longitude_of_central_meridian" );
- strcpy( att[2], "latitude_of_projection_origin" );
- strcpy( att[3], "false_easting" );
- strcpy( att[4], "false_northing" );
- *ndims = 2;
- strcpy( dims[0], "projection_y_coordinate" );
- strcpy( dims[1], "projection_x_coordinate" );
- } else if( strcmp( name, "vertical_perspective" ) == 0 ) {
- *natt = 5;
- strcpy( att[0], "longitude_of_projection_origin" );
- strcpy( att[1], "latitude_of_projection_origin" );
- strcpy( att[2], "perspective_height_point" );
- strcpy( att[3], "false_easting" );
- strcpy( att[4], "false_northing" );
- *ndims = 2;
- strcpy( dims[0], "projection_y_coordinate" );
- strcpy( dims[1], "projection_x_coordinate" );
+ if (strcmp(name, "albers_conical_equal_area") == 0) {
+ *natt = 5;
+ strcpy(att[0], "standard_parallel");
+ strcpy(att[1], "longitude_of_central_meridian");
+ strcpy(att[2], "latitude_of_projection_origin");
+ strcpy(att[3], "false_easting");
+ strcpy(att[4], "false_northing");
+ *ndims = 2;
+ strcpy(dims[0], "projection_y_coordinate");
+ strcpy(dims[1], "projection_x_coordinate");
+ } else if (strcmp(name, "azimuthal_equidistant") == 0) {
+ *natt = 4;
+ strcpy(att[0], "longitude_of_projection_origin");
+ strcpy(att[1], "latitude_of_projection_origin");
+ strcpy(att[2], "false_easting");
+ strcpy(att[3], "false_northing");
+ *ndims = 2;
+ strcpy(dims[0], "projection_y_coordinate");
+ strcpy(dims[1], "projection_x_coordinate");
+ } else if (strcmp(name, "lambert_azimuthal_equal_area") == 0) {
+ *natt = 4;
+ strcpy(att[0], "longitude_of_projection_origin");
+ strcpy(att[1], "latitude_of_projection_origin");
+ strcpy(att[2], "false_easting");
+ strcpy(att[3], "false_northing");
+ *ndims = 2;
+ strcpy(dims[0], "projection_y_coordinate");
+ strcpy(dims[1], "projection_x_coordinate");
+ } else if (strcmp(name, "lambert_conformal_conic") == 0) {
+ *natt = 5;
+ strcpy(att[0], "standard_parallel");
+ strcpy(att[1], "longitude_of_central_meridian");
+ strcpy(att[2], "latitude_of_projection_origin");
+ strcpy(att[3], "false_easting");
+ strcpy(att[4], "false_northing");
+ *ndims = 2;
+ strcpy(dims[0], "projection_y_coordinate");
+ strcpy(dims[1], "projection_x_coordinate");
+ } else if (strcmp(name, "lambert_cylindrical_equal_area") == 0) {
+ *natt = 5;
+ strcpy(att[0], "standard_parallel");
+ strcpy(att[1], "longitude_of_central_meridian");
+ strcpy(att[2], "scale_factor_at_projection_origin");
+ strcpy(att[3], "false_easting");
+ strcpy(att[4], "false_northing");
+ *ndims = 2;
+ strcpy(dims[0], "projection_y_coordinate");
+ strcpy(dims[1], "projection_x_coordinate");
+ } else if (strcmp(name, "latitude_longitude") == 0) {
+ *natt = 0;
+ *ndims = 0;
+ } else if (strcmp(name, "mercator") == 0) {
+ *natt = 5;
+ strcpy(att[0], "standard_parallel");
+ strcpy(att[1], "longitude_of_projection_origin");
+ strcpy(att[2], "scale_factor_at_projection_origin");
+ strcpy(att[3], "false_easting");
+ strcpy(att[4], "false_northing");
+ *ndims = 2;
+ strcpy(dims[0], "projection_y_coordinate");
+ strcpy(dims[1], "projection_x_coordinate");
+ } else if (strcmp(name, "orthographic") == 0) {
+ *natt = 4;
+ strcpy(att[0], "longitude_of_projection_origin");
+ strcpy(att[1], "latitude_of_projection_origin");
+ strcpy(att[2], "scale_factor_at_projection_origin");
+ strcpy(att[3], "false_easting");
+ strcpy(att[4], "false_northing");
+ *ndims = 2;
+ strcpy(dims[0], "projection_x_coordinate");
+ strcpy(dims[1], "projection_y_coordinate");
+ } else if (strcmp(name, "polar_stereographic") == 0) {
+ *natt = 6;
+ strcpy(att[0], "straight_vertical_longitude_from_pole");
+ strcpy(att[1], "latitude_of_projection_origin");
+ strcpy(att[2], "standard_parallel");
+ strcpy(att[3], "scale_factor_at_projection_origin");
+ strcpy(att[4], "false_easting");
+ strcpy(att[5], "false_northing");
+ *ndims = 2;
+ strcpy(dims[0], "projection_y_coordinate");
+ strcpy(dims[1], "projection_x_coordinate");
+ } else if (strcmp(name, "rotated_latitude_longitude") == 0) {
+ *natt = 3;
+ strcpy(att[0], "grid_north_pole_latitude");
+ strcpy(att[1], "grid_north_pole_longitude");
+ strcpy(att[2], "north_pole_grid_longitude");
+ *ndims = 2;
+ strcpy(dims[0], "grid_latitude");
+ strcpy(dims[1], "grid_longitude");
+ } else if (strcmp(name, "stereographic") == 0) {
+ *natt = 5;
+ strcpy(att[0], "longitude_of_projection_origin");
+ strcpy(att[1], "latitude_of_projection_origin");
+ strcpy(att[2], "scale_factor_at_projection_origin");
+ strcpy(att[3], "false_easting");
+ strcpy(att[4], "false_northing");
+ *ndims = 2;
+ strcpy(dims[0], "projection_y_coordinate");
+ strcpy(dims[1], "projection_x_coordinate");
+ } else if (strcmp(name, "transverse_mercator") == 0) {
+ *natt = 5;
+ strcpy(att[0], "scale_factor_at_central_meridian");
+ strcpy(att[1], "longitude_of_central_meridian");
+ strcpy(att[2], "latitude_of_projection_origin");
+ strcpy(att[3], "false_easting");
+ strcpy(att[4], "false_northing");
+ *ndims = 2;
+ strcpy(dims[0], "projection_y_coordinate");
+ strcpy(dims[1], "projection_x_coordinate");
+ } else if (strcmp(name, "vertical_perspective") == 0) {
+ *natt = 5;
+ strcpy(att[0], "longitude_of_projection_origin");
+ strcpy(att[1], "latitude_of_projection_origin");
+ strcpy(att[2], "perspective_height_point");
+ strcpy(att[3], "false_easting");
+ strcpy(att[4], "false_northing");
+ *ndims = 2;
+ strcpy(dims[0], "projection_y_coordinate");
+ strcpy(dims[1], "projection_x_coordinate");
}
/* Now looks up in table */
- for( i = 0; i < cmor_tables[CMOR_TABLE].nmappings; i++ ) {
-
- if( strcmp( name, cmor_tables[CMOR_TABLE].mappings[i].id ) == 0 ) {
- /* ok that is the mapping */
- *natt = cmor_tables[CMOR_TABLE].mappings[i].nattributes;
- for( j = 0;
- j < cmor_tables[CMOR_TABLE].mappings[i].nattributes;
- j++ ) {
- strcpy( att[j],
- cmor_tables[CMOR_TABLE].mappings[i].
- attributes_names[j] );
- }
- }
+ for (i = 0; i < cmor_tables[CMOR_TABLE].nmappings; i++) {
+
+ if (strcmp(name, cmor_tables[CMOR_TABLE].mappings[i].id) == 0) {
+ /* ok that is the mapping */
+ *natt = cmor_tables[CMOR_TABLE].mappings[i].nattributes;
+ for (j = 0;
+ j < cmor_tables[CMOR_TABLE].mappings[i].nattributes; j++) {
+ strcpy(att[j],
+ cmor_tables[CMOR_TABLE].mappings[i].attributes_names[j]);
+ }
+ }
}
- if( *natt != -1 ) {
- strcpy( att[*natt + 0], "earth_radius" );
- strcpy( att[*natt + 1], "inverse_flattening" );
- strcpy( att[*natt + 2], "longitude_of_prime_meridian" );
- strcpy( att[*natt + 3], "perspective_point_height" );
- strcpy( att[*natt + 4], "semi_major_axis" );
- strcpy( att[*natt + 5], "semi_minor_axis" );
- *natt = *natt + 6;
+ if (*natt != -1) {
+ strcpy(att[*natt + 0], "earth_radius");
+ strcpy(att[*natt + 1], "inverse_flattening");
+ strcpy(att[*natt + 2], "longitude_of_prime_meridian");
+ strcpy(att[*natt + 3], "perspective_point_height");
+ strcpy(att[*natt + 4], "semi_major_axis");
+ strcpy(att[*natt + 5], "semi_minor_axis");
+ *natt = *natt + 6;
}
- return(0);
+ return (0);
}
-void cmor_set_mapping_attribute( cmor_mappings_t * mapping,
- char att[CMOR_MAX_STRING],
- char val[CMOR_MAX_STRING] ) {
+void cmor_set_mapping_attribute(cmor_mappings_t * mapping,
+ char att[CMOR_MAX_STRING],
+ char val[CMOR_MAX_STRING])
+{
int i, n;
char msg[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_set_mapping_attribute" );
+ cmor_add_traceback("cmor_set_mapping_attribute");
- if( strcmp( att, "coordinates" ) == 0 ) {
+ if (strcmp(att, "coordinates") == 0) {
- strncpy( mapping->coordinates, val, CMOR_MAX_STRING );
+ strncpy(mapping->coordinates, val, CMOR_MAX_STRING);
- } else if( strncmp( att, "parameter", 9 ) == 0 ) {
+ } else if (strncmp(att, "parameter", 9) == 0) {
- n = -1;
+ n = -1;
- for( i = 0; i < mapping->nattributes; i++ ) {
+ for (i = 0; i < mapping->nattributes; i++) {
- if( strcmp( mapping->attributes_names[i], val ) == 0 ) {
- n = i;
- break;
- }
- }
+ if (strcmp(mapping->attributes_names[i], val) == 0) {
+ n = i;
+ break;
+ }
+ }
- if( n == -1 ) {
- n = mapping->nattributes;
- mapping->nattributes++;
- }
+ if (n == -1) {
+ n = mapping->nattributes;
+ mapping->nattributes++;
+ }
- strncpy( mapping->attributes_names[n], val, CMOR_MAX_STRING );
+ strncpy(mapping->attributes_names[n], val, CMOR_MAX_STRING);
} else {
- snprintf( msg, CMOR_MAX_STRING,
- "Unknown attribute: '%s' for mapping '%s' (value was: '%s')",
- att, mapping->id, val );
- cmor_handle_error( msg, CMOR_WARNING );
+ snprintf(msg, CMOR_MAX_STRING,
+ "Unknown attribute: '%s' for mapping '%s' (value was: '%s')",
+ att, mapping->id, val);
+ cmor_handle_error(msg, CMOR_WARNING);
}
- cmor_pop_traceback( );
+ cmor_pop_traceback();
}
+
/************************************************************************/
/* cmor_set_grid_mapping() */
/************************************************************************/
-int cmor_set_grid_mapping( int gid, char *name, int nparam,
- char *attributes_names, int lparams,
- double
- attributes_values[CMOR_MAX_GRID_ATTRIBUTES],
- char *units, int lnunits ) {
+int cmor_set_grid_mapping(int gid, char *name, int nparam,
+ char *attributes_names, int lparams,
+ double
+ attributes_values[CMOR_MAX_GRID_ATTRIBUTES],
+ char *units, int lnunits)
+{
int grid_id, nattributes, ndims;
int i, j, k, l;
char *achar, *bchar;
@@ -526,15 +529,15 @@ int cmor_set_grid_mapping( int gid, char *name, int nparam,
cmor_add_traceback("cmor_set_grid_mapping");
if (nparam >= CMOR_MAX_GRID_ATTRIBUTES) {
snprintf(msg, CMOR_MAX_STRING,
- "CMOR allows only %i grid parameters too be defined, "
- "you are trying to define %i parameters, if you really "
- "need that many recompile cmor changing the value of "
- "parameter: CMOR_MAX_GRID_ATTRIBUTES",
- CMOR_MAX_GRID_ATTRIBUTES, nparam);
+ "CMOR allows only %i grid parameters too be defined, "
+ "you are trying to define %i parameters, if you really "
+ "need that many recompile cmor changing the value of "
+ "parameter: CMOR_MAX_GRID_ATTRIBUTES",
+ CMOR_MAX_GRID_ATTRIBUTES, nparam);
cmor_handle_error(msg, CMOR_CRITICAL);
}
- achar = (char *) attributes_names;
- bchar = (char *) units;
+ achar = (char *)attributes_names;
+ bchar = (char *)units;
for (i = 0; i < nparam; i++) {
strncpy(lattributes_names[i], achar, CMOR_MAX_STRING);
strncpy(lunits[i], bchar, CMOR_MAX_STRING);
@@ -548,13 +551,13 @@ int cmor_set_grid_mapping( int gid, char *name, int nparam,
/* -------------------------------------------------------------------- */
cmor_grid_valid_mapping_attribute_names(name, &nattributes, grid_attributes,
- &ndims, grid_dimensions);
+ &ndims, grid_dimensions);
if (ndims != cmor_grids[grid_id].ndims) {
snprintf(msg, CMOR_MAX_STRING,
- "you defined your grid with %i axes but grid_mapping "
- "'%s' requires exactly %i axes",
- cmor_grids[grid_id].ndims, name, ndims);
+ "you defined your grid with %i axes but grid_mapping "
+ "'%s' requires exactly %i axes",
+ cmor_grids[grid_id].ndims, name, ndims);
cmor_handle_error(msg, CMOR_CRITICAL);
cmor_pop_traceback();
return (-1);
@@ -570,20 +573,22 @@ int cmor_set_grid_mapping( int gid, char *name, int nparam,
for (i = 0; i < ndims; i++) {
for (j = 0; j < cmor_grids[grid_id].ndims; j++) {
cmor_get_axis_attribute(cmor_grids[grid_id].original_axes_ids[j],
- "standard_name", 'c', &msg);
+ "standard_name", 'c', &msg);
if (strcmp(grid_dimensions[i], msg) == 0) {
cmor_grids[grid_id].axes_ids[i] =
- cmor_grids[grid_id].original_axes_ids[j];
+ cmor_grids[grid_id].original_axes_ids[j];
/* -------------------------------------------------------------------- */
/* Now we probably need to alter the lat/lon,etc.. associated */
/* variables as well ! */
/* -------------------------------------------------------------------- */
for (l = 0; l < 4; l++) {
- if (cmor_vars[cmor_grids[cmor_ngrids].associated_variables[l]].ndims
- != 0) {
- cmor_vars[cmor_grids[cmor_ngrids].associated_variables[l]].axes_ids[i] =
- cmor_grids[grid_id].original_axes_ids[j];
+ if (cmor_vars
+ [cmor_grids[cmor_ngrids].associated_variables[l]].
+ ndims != 0) {
+ cmor_vars[cmor_grids[cmor_ngrids].
+ associated_variables[l]].axes_ids[i] =
+ cmor_grids[grid_id].original_axes_ids[j];
}
}
k++;
@@ -593,8 +598,8 @@ int cmor_set_grid_mapping( int gid, char *name, int nparam,
if (k != ndims) {
snprintf(msg, CMOR_MAX_STRING,
- "setting grid mapping to '%s' we could not find all "
- "the required axes, required axes are:", name);
+ "setting grid mapping to '%s' we could not find all "
+ "the required axes, required axes are:", name);
for (i = 0; i < ndims; i++) {
snprintf(msg2, CMOR_MAX_STRING, " %s", grid_dimensions[i]);
strncat(msg, msg2, CMOR_MAX_STRING - strlen(msg));
@@ -607,10 +612,10 @@ int cmor_set_grid_mapping( int gid, char *name, int nparam,
for (i = 0; i < nparam; i++) {
if (cmor_attribute_in_list(lattributes_names[i], nattributes,
- &grid_attributes[0]) == 1) {
+ &grid_attributes[0]) == 1) {
if ((strcmp(lattributes_names[i], "standard_parallel1") == 0
- || strcmp(lattributes_names[i], "standard_parallel2") == 0)
- && (strcmp(name, "lambert_conformal_conic") == 0)) {
+ || strcmp(lattributes_names[i], "standard_parallel2") == 0)
+ && (strcmp(name, "lambert_conformal_conic") == 0)) {
/* -------------------------------------------------------------------- */
/* ok do nothing it is just that we need 2 values for this */
@@ -618,18 +623,18 @@ int cmor_set_grid_mapping( int gid, char *name, int nparam,
/* -------------------------------------------------------------------- */
cmor_set_grid_attribute(gid, lattributes_names[i],
- &attributes_values[i], lunits[i]);
+ &attributes_values[i], lunits[i]);
} else {
snprintf(msg, CMOR_MAX_STRING,
- "in grid_mapping, attribute '%s' (with value: %lf) is not a known attribute for grid mapping: '%s'",
- lattributes_names[i], attributes_values[i], name);
+ "in grid_mapping, attribute '%s' (with value: %lf) is not a known attribute for grid mapping: '%s'",
+ lattributes_names[i], attributes_values[i], name);
cmor_handle_error(msg, CMOR_WARNING);
cmor_pop_traceback();
return (-1);
}
} else {
cmor_set_grid_attribute(gid, lattributes_names[i],
- &attributes_values[i], lunits[i]);
+ &attributes_values[i], lunits[i]);
}
}
/* -------------------------------------------------------------------- */
@@ -640,8 +645,8 @@ int cmor_set_grid_mapping( int gid, char *name, int nparam,
for (i = 0; i < nattributes - 6; i++) {
if (cmor_has_grid_attribute(gid, grid_attributes[i]) == 1) {
snprintf(msg, CMOR_MAX_STRING,
- "Grid mapping attribute %s has not been set, you should consider setting it",
- grid_attributes[i]);
+ "Grid mapping attribute %s has not been set, you should consider setting it",
+ grid_attributes[i]);
cmor_handle_error(msg, CMOR_WARNING);
}
}
@@ -660,8 +665,9 @@ int cmor_set_grid_mapping( int gid, char *name, int nparam,
/************************************************************************/
int cmor_time_varying_grid_coordinate(int *coord_grid_id, int grid_id,
- char *table_entry, char *units, char type, void *missing,
- int *coordinate_type) {
+ char *table_entry, char *units, char type,
+ void *missing, int *coordinate_type)
+{
int ierr = 0, j;
int axes[2];
char msg[CMOR_MAX_STRING];
@@ -685,7 +691,7 @@ int cmor_time_varying_grid_coordinate(int *coord_grid_id, int grid_id,
for (j = 0; j < cmor_tables[table_id].nvars; j++) {
if (strcmp(cmor_tables[table_id].vars[j].id, table_entry) == 0) {
strncpy(msg, cmor_tables[table_id].vars[j].standard_name,
- CMOR_MAX_STRING);
+ CMOR_MAX_STRING);
break;
}
}
@@ -701,147 +707,154 @@ int cmor_time_varying_grid_coordinate(int *coord_grid_id, int grid_id,
ctype = *coordinate_type;
}
switch (ctype) {
- case (0):
- ierr = cmor_variable(coord_grid_id, table_entry, units, 1, axes, type,
- missing, NULL, NULL, NULL, NULL, NULL);
- cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[0] =
- *coord_grid_id;
- break;
- case (1):
- ierr = cmor_variable(coord_grid_id, table_entry, units, 1, axes, type,
- missing, NULL, NULL, NULL, NULL, NULL);
- cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[1] =
- *coord_grid_id;
-
- break;
- case (2):
- if (nvertices == 0) {
- sprintf(msg,
- "your defining a vertices dependent variable (%s) "
- "associated with grid %i, but you declared this grid "
- "as having 0 vertices",
- table_entry, grid_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
- }
- if (cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[3]
- == -1) {
- dummy_values = malloc(sizeof(double) * nvertices);
-
- for (j = 0; j < nvertices; j++) {
- dummy_values[j] = (double) j;
- }
-
- cmor_axis(&axes[1], "vertices", "1", nvertices, dummy_values, 'd',
- NULL, 0, NULL);
-
- free(dummy_values);
-
- cmor_grids[-grid_id - CMOR_MAX_GRIDS].nvertices = axes[1];
-
- } else {
-
- axes[1] = cmor_grids[-grid_id - CMOR_MAX_GRIDS].nvertices;
-
- }
- ierr = cmor_variable(coord_grid_id, table_entry, units, 2, axes, type,
- missing, NULL, NULL, NULL, NULL, NULL);
-
- cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[2] =
- *coord_grid_id;
+ case (0):
+ ierr = cmor_variable(coord_grid_id, table_entry, units, 1, axes, type,
+ missing, NULL, NULL, NULL, NULL, NULL);
+ cmor_grids[cmor_vars[*coord_grid_id].grid_id].
+ associated_variables[0] = *coord_grid_id;
+ break;
+ case (1):
+ ierr = cmor_variable(coord_grid_id, table_entry, units, 1, axes, type,
+ missing, NULL, NULL, NULL, NULL, NULL);
+ cmor_grids[cmor_vars[*coord_grid_id].grid_id].
+ associated_variables[1] = *coord_grid_id;
+
+ break;
+ case (2):
+ if (nvertices == 0) {
+ sprintf(msg,
+ "your defining a vertices dependent variable (%s) "
+ "associated with grid %i, but you declared this grid "
+ "as having 0 vertices", table_entry, grid_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ if (cmor_grids[cmor_vars[*coord_grid_id].grid_id].
+ associated_variables[3]
+ == -1) {
+ dummy_values = malloc(sizeof(double) * nvertices);
+
+ for (j = 0; j < nvertices; j++) {
+ dummy_values[j] = (double)j;
+ }
+
+ cmor_axis(&axes[1], "vertices", "1", nvertices, dummy_values, 'd',
+ NULL, 0, NULL);
+
+ free(dummy_values);
+
+ cmor_grids[-grid_id - CMOR_MAX_GRIDS].nvertices = axes[1];
+
+ } else {
+
+ axes[1] = cmor_grids[-grid_id - CMOR_MAX_GRIDS].nvertices;
+
+ }
+ ierr = cmor_variable(coord_grid_id, table_entry, units, 2, axes, type,
+ missing, NULL, NULL, NULL, NULL, NULL);
+
+ cmor_grids[cmor_vars[*coord_grid_id].grid_id].
+ associated_variables[2] = *coord_grid_id;
/* -------------------------------------------------------------------- */
/* adds the bounds attribute */
/* -------------------------------------------------------------------- */
- if (cmor_has_variable_attribute(
- cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[0],
- "bounds") == 0) {
+ if (cmor_has_variable_attribute
+ (cmor_grids[cmor_vars[*coord_grid_id].grid_id].
+ associated_variables[0], "bounds") == 0) {
- cmor_get_variable_attribute(
- cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[0],
- "bounds", &msg);
+ cmor_get_variable_attribute(cmor_grids
+ [cmor_vars[*coord_grid_id].grid_id].
+ associated_variables[0], "bounds",
+ &msg);
- strncat(msg, " ", CMOR_MAX_STRING - strlen(msg));
- strncat(msg, cmor_vars[*coord_grid_id].id,
- CMOR_MAX_STRING - strlen(msg));
+ strncat(msg, " ", CMOR_MAX_STRING - strlen(msg));
+ strncat(msg, cmor_vars[*coord_grid_id].id,
+ CMOR_MAX_STRING - strlen(msg));
- } else {
+ } else {
- strncpy(msg, cmor_vars[*coord_grid_id].id, CMOR_MAX_STRING);
+ strncpy(msg, cmor_vars[*coord_grid_id].id, CMOR_MAX_STRING);
- }
+ }
- cmor_set_variable_attribute_internal(
- cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[0],
- "bounds", 'c', msg);
+ cmor_set_variable_attribute_internal(cmor_grids
+ [cmor_vars[*coord_grid_id].
+ grid_id].
+ associated_variables[0],
+ "bounds", 'c', msg);
- break;
- case (3):
- if (nvertices == 0) {
+ break;
+ case (3):
+ if (nvertices == 0) {
- sprintf(msg, "your defining a vertices dependent "
- "variable (%s) associated with grid %i, "
- "but you declared this grid as having "
- "0 vertices", table_entry, grid_id);
+ sprintf(msg, "your defining a vertices dependent "
+ "variable (%s) associated with grid %i, "
+ "but you declared this grid as having "
+ "0 vertices", table_entry, grid_id);
- cmor_handle_error(msg, CMOR_CRITICAL);
- }
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
- if (cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[2]
- == -1) {
+ if (cmor_grids[cmor_vars[*coord_grid_id].grid_id].
+ associated_variables[2]
+ == -1) {
- dummy_values = malloc(sizeof(double) * nvertices);
+ dummy_values = malloc(sizeof(double) * nvertices);
- for (j = 0; j < nvertices; j++) {
- dummy_values[j] = (double) j;
- }
- cmor_axis(&axes[1], "vertices", "1", nvertices, dummy_values, 'd',
- NULL, 0, NULL);
+ for (j = 0; j < nvertices; j++) {
+ dummy_values[j] = (double)j;
+ }
+ cmor_axis(&axes[1], "vertices", "1", nvertices, dummy_values, 'd',
+ NULL, 0, NULL);
- free(dummy_values);
+ free(dummy_values);
- cmor_grids[-grid_id - CMOR_MAX_GRIDS].nvertices = axes[1];
+ cmor_grids[-grid_id - CMOR_MAX_GRIDS].nvertices = axes[1];
- } else {
+ } else {
- axes[1] = cmor_grids[-grid_id - CMOR_MAX_GRIDS].nvertices;
+ axes[1] = cmor_grids[-grid_id - CMOR_MAX_GRIDS].nvertices;
- }
- ierr = cmor_variable(coord_grid_id, table_entry, units, 2, axes, type,
- missing, NULL, NULL, NULL, NULL, NULL);
+ }
+ ierr = cmor_variable(coord_grid_id, table_entry, units, 2, axes, type,
+ missing, NULL, NULL, NULL, NULL, NULL);
- cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[3] =
- *coord_grid_id;
+ cmor_grids[cmor_vars[*coord_grid_id].grid_id].
+ associated_variables[3] = *coord_grid_id;
- /* adds the bounds attribute */
- if (cmor_has_variable_attribute(
- cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[1],
- "bounds") == 0) {
+ /* adds the bounds attribute */
+ if (cmor_has_variable_attribute
+ (cmor_grids[cmor_vars[*coord_grid_id].grid_id].
+ associated_variables[1], "bounds") == 0) {
- cmor_get_variable_attribute(
- cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[1],
- "bounds", &msg);
+ cmor_get_variable_attribute(cmor_grids
+ [cmor_vars[*coord_grid_id].grid_id].
+ associated_variables[1], "bounds",
+ &msg);
- strncat(msg, " ", CMOR_MAX_STRING - strlen(msg));
+ strncat(msg, " ", CMOR_MAX_STRING - strlen(msg));
- strncat(msg, cmor_vars[*coord_grid_id].id,
- CMOR_MAX_STRING - strlen(msg));
+ strncat(msg, cmor_vars[*coord_grid_id].id,
+ CMOR_MAX_STRING - strlen(msg));
- } else {
+ } else {
- strncpy(msg, cmor_vars[*coord_grid_id].id, CMOR_MAX_STRING);
+ strncpy(msg, cmor_vars[*coord_grid_id].id, CMOR_MAX_STRING);
- }
- cmor_set_variable_attribute_internal(
- cmor_grids[cmor_vars[*coord_grid_id].grid_id].associated_variables[1],
- "bounds", 'c', msg);
- break;
+ }
+ cmor_set_variable_attribute_internal(cmor_grids
+ [cmor_vars[*coord_grid_id].
+ grid_id].
+ associated_variables[1],
+ "bounds", 'c', msg);
+ break;
- default:
- sprintf(msg, "unknown coord type: %i", ctype);
- cmor_handle_error(msg, CMOR_CRITICAL);
- cmor_pop_traceback();
- return (-1);
+ default:
+ sprintf(msg, "unknown coord type: %i", ctype);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (-1);
}
cmor_vars[*coord_grid_id].needsinit = 0;
@@ -849,209 +862,204 @@ int cmor_time_varying_grid_coordinate(int *coord_grid_id, int grid_id,
cmor_pop_traceback();
return (ierr);
}
+
/************************************************************************/
/* cmor_grid() */
/************************************************************************/
-int cmor_grid( int *grid_id, int ndims, int *axes_ids, char type,
- void *lat, void *lon, int nvertices, void *blat, void *blon ) {
+int cmor_grid(int *grid_id, int ndims, int *axes_ids, char type,
+ void *lat, void *lon, int nvertices, void *blat, void *blon)
+{
int i, j, n, did_vertices = 0;
char msg[CMOR_MAX_STRING];
int axes[2];
double *dummy_values;
- cmor_add_traceback( "cmor_grid" );
- if( ( axes_ids == NULL ) || ( ndims == 0 ) ) {
- snprintf( msg, CMOR_MAX_STRING,
- "You need to define the grid axes first" );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ cmor_add_traceback("cmor_grid");
+ if ((axes_ids == NULL) || (ndims == 0)) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "You need to define the grid axes first");
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
cmor_ngrids += 1;
- if( cmor_ngrids >= CMOR_MAX_GRIDS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Too many grids defined, maximum possible "
- "grids is currently set to %i",
- CMOR_MAX_GRIDS );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (cmor_ngrids >= CMOR_MAX_GRIDS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Too many grids defined, maximum possible "
+ "grids is currently set to %i", CMOR_MAX_GRIDS);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
n = 1;
- for( i = 0; i < ndims; i++ ) {
+ for (i = 0; i < ndims; i++) {
- if( axes_ids[i] > cmor_naxes ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Defining grid, Axis %i not defined yet",
- axes_ids[i] );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (axes_ids[i] > cmor_naxes) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Defining grid, Axis %i not defined yet", axes_ids[i]);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
- if( cmor_tables[cmor_axes[axes_ids[i]].ref_table_id].
- axes[cmor_axes[axes_ids[i]].ref_axis_id].axis == 'T' ) {
- cmor_grids[cmor_ngrids].istimevarying = 1;
- }
+ if (cmor_tables[cmor_axes[axes_ids[i]].ref_table_id].axes
+ [cmor_axes[axes_ids[i]].ref_axis_id].axis == 'T') {
+ cmor_grids[cmor_ngrids].istimevarying = 1;
+ }
cmor_grids[cmor_ngrids].original_axes_ids[i] = axes_ids[i];
- cmor_grids[cmor_ngrids].axes_ids[i] = axes_ids[i];
- cmor_axes[axes_ids[i]].isgridaxis = 1;
- n *= cmor_axes[axes_ids[i]].length;
+ cmor_grids[cmor_ngrids].axes_ids[i] = axes_ids[i];
+ cmor_axes[axes_ids[i]].isgridaxis = 1;
+ n *= cmor_axes[axes_ids[i]].length;
}
cmor_grids[cmor_ngrids].ndims = ndims;
cmor_grids[cmor_ngrids].nvertices = nvertices;
- if( lat == NULL ) {
+ if (lat == NULL) {
- if( cmor_grids[cmor_ngrids].istimevarying != 1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "you need to pass the latitude values when defining a grid" );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (cmor_grids[cmor_ngrids].istimevarying != 1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "you need to pass the latitude values when defining a grid");
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
} else {
- axes[0] = -cmor_ngrids - CMOR_MAX_GRIDS;
- if( cmor_grids[cmor_ngrids].istimevarying != 1 ) {
- cmor_copy_data( &cmor_grids[cmor_ngrids].lats, lat, type, n );
- cmor_variable( &cmor_grids[cmor_ngrids].
- associated_variables[0], "latitude",
- "degrees_north", 1, &axes[0], 'd', NULL, NULL,
- NULL, NULL, NULL, NULL );
- cmor_vars[cmor_grids[cmor_ngrids].associated_variables[0]].
- needsinit = 0;
- }
+ axes[0] = -cmor_ngrids - CMOR_MAX_GRIDS;
+ if (cmor_grids[cmor_ngrids].istimevarying != 1) {
+ cmor_copy_data(&cmor_grids[cmor_ngrids].lats, lat, type, n);
+ cmor_variable(&cmor_grids[cmor_ngrids].associated_variables[0],
+ "latitude", "degrees_north", 1, &axes[0], 'd', NULL,
+ NULL, NULL, NULL, NULL, NULL);
+ cmor_vars[cmor_grids[cmor_ngrids].
+ associated_variables[0]].needsinit = 0;
+ }
}
- if( lon == NULL ) {
+ if (lon == NULL) {
- if( cmor_grids[cmor_ngrids].istimevarying != 1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "you need to pass the longitude values when "
- "defining a grid" );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (cmor_grids[cmor_ngrids].istimevarying != 1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "you need to pass the longitude values when "
+ "defining a grid");
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
} else {
- cmor_copy_data( &cmor_grids[cmor_ngrids].lons, lon, type, n );
- axes[0] = -cmor_ngrids - CMOR_MAX_GRIDS;
-
- cmor_variable( &cmor_grids[cmor_ngrids].associated_variables[1],
- "longitude", "degrees_east", 1, &axes[0], 'd', NULL,
- NULL, NULL, NULL, NULL, NULL );
- cmor_vars[cmor_grids[cmor_ngrids].associated_variables[1]].
- needsinit = 0;
+ cmor_copy_data(&cmor_grids[cmor_ngrids].lons, lon, type, n);
+ axes[0] = -cmor_ngrids - CMOR_MAX_GRIDS;
+
+ cmor_variable(&cmor_grids[cmor_ngrids].associated_variables[1],
+ "longitude", "degrees_east", 1, &axes[0], 'd', NULL,
+ NULL, NULL, NULL, NULL, NULL);
+ cmor_vars[cmor_grids[cmor_ngrids].associated_variables[1]].needsinit =
+ 0;
}
- if( blat == NULL ) {
- if( cmor_grids[cmor_ngrids].istimevarying != 1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "it is recommended you pass the latitude bounds "
- "values when defining a grid" );
- cmor_handle_error( msg, CMOR_WARNING );
- }
+ if (blat == NULL) {
+ if (cmor_grids[cmor_ngrids].istimevarying != 1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "it is recommended you pass the latitude bounds "
+ "values when defining a grid");
+ cmor_handle_error(msg, CMOR_WARNING);
+ }
} else {
- cmor_copy_data( &cmor_grids[cmor_ngrids].blats, blat, type,
- n * nvertices );
-
- dummy_values = malloc( sizeof ( double ) * nvertices );
-
- for( j = 0; j < nvertices; j++ )
- dummy_values[j] = ( double ) j;
-
- cmor_axis( &axes[1], "vertices", "1", nvertices, dummy_values, 'd',
- NULL, 0, NULL );
-
- free( dummy_values );
-
- did_vertices = 1;
-
- cmor_variable( &cmor_grids[cmor_ngrids].associated_variables[2],
- "vertices_latitude", "degrees_north", 2, &axes[0],
- 'd', NULL, NULL, NULL, NULL, NULL, NULL );
-
- cmor_vars[cmor_grids[cmor_ngrids].associated_variables[2]].
- needsinit = 0;
-
- if( cmor_has_variable_attribute
- ( cmor_grids[cmor_ngrids].associated_variables[0],
- "bounds" ) == 0 ) {
-
- cmor_get_variable_attribute( cmor_grids[cmor_ngrids].
- associated_variables[0], "bounds",
- &msg );
- strncat( msg, " ", CMOR_MAX_STRING - strlen( msg ) );
- strncat( msg,
- cmor_vars[cmor_grids[cmor_ngrids].
- associated_variables[2]].id,
- CMOR_MAX_STRING - strlen( msg ) );
-
- } else {
- strncpy( msg,
- cmor_vars[cmor_grids[cmor_ngrids].
- associated_variables[2]].id,
- CMOR_MAX_STRING );
- }
- cmor_set_variable_attribute_internal( cmor_grids[cmor_ngrids].
- associated_variables[0],
- "bounds", 'c', msg );
+ cmor_copy_data(&cmor_grids[cmor_ngrids].blats, blat, type,
+ n * nvertices);
+
+ dummy_values = malloc(sizeof(double) * nvertices);
+
+ for (j = 0; j < nvertices; j++)
+ dummy_values[j] = (double)j;
+
+ cmor_axis(&axes[1], "vertices", "1", nvertices, dummy_values, 'd',
+ NULL, 0, NULL);
+
+ free(dummy_values);
+
+ did_vertices = 1;
+
+ cmor_variable(&cmor_grids[cmor_ngrids].associated_variables[2],
+ "vertices_latitude", "degrees_north", 2, &axes[0],
+ 'd', NULL, NULL, NULL, NULL, NULL, NULL);
+
+ cmor_vars[cmor_grids[cmor_ngrids].associated_variables[2]].needsinit =
+ 0;
+
+ if (cmor_has_variable_attribute
+ (cmor_grids[cmor_ngrids].associated_variables[0], "bounds") == 0) {
+
+ cmor_get_variable_attribute(cmor_grids
+ [cmor_ngrids].associated_variables[0],
+ "bounds", &msg);
+ strncat(msg, " ", CMOR_MAX_STRING - strlen(msg));
+ strncat(msg,
+ cmor_vars[cmor_grids[cmor_ngrids].associated_variables[2]].
+ id, CMOR_MAX_STRING - strlen(msg));
+
+ } else {
+ strncpy(msg,
+ cmor_vars[cmor_grids[cmor_ngrids].associated_variables[2]].
+ id, CMOR_MAX_STRING);
+ }
+ cmor_set_variable_attribute_internal(cmor_grids
+ [cmor_ngrids].associated_variables
+ [0], "bounds", 'c', msg);
}
- if( blon == NULL ) {
+ if (blon == NULL) {
- if( cmor_grids[cmor_ngrids].istimevarying != 1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "it is recommended you pass the longitude bounds values when defining a grid" );
- cmor_handle_error( msg, CMOR_WARNING );
- }
+ if (cmor_grids[cmor_ngrids].istimevarying != 1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "it is recommended you pass the longitude bounds values when defining a grid");
+ cmor_handle_error(msg, CMOR_WARNING);
+ }
} else {
- cmor_copy_data( &cmor_grids[cmor_ngrids].blons, blon, type,
- n * nvertices );
-
- if( did_vertices == 0 ) {
-
- dummy_values = malloc( sizeof ( double ) * nvertices );
-
- for( j = 0; j < nvertices; j++ ) {
- dummy_values[j] = ( double ) j;
- }
- cmor_axis( &axes[1], "vertices", "1", nvertices, dummy_values,
- 'd', NULL, 0, NULL );
- free( dummy_values );
- }
-
- cmor_variable( &cmor_grids[cmor_ngrids].associated_variables[3],
- "vertices_longitude", "degrees_east", 2, &axes[0],
- 'd', NULL, NULL, NULL, NULL, NULL, NULL );
-
- cmor_vars[cmor_grids[cmor_ngrids].associated_variables[3]].
- needsinit = 0;
-
- if( cmor_has_variable_attribute
- ( cmor_grids[cmor_ngrids].associated_variables[1],
- "bounds" ) == 0 ) {
-
- cmor_get_variable_attribute( cmor_grids[cmor_ngrids].
- associated_variables[1], "bounds",
- &msg );
-
- strncat( msg, " ", CMOR_MAX_STRING - strlen( msg ) );
- strncat( msg, cmor_vars[cmor_grids[cmor_ngrids].
- associated_variables[3]].id,
- CMOR_MAX_STRING - strlen( msg ) );
-
- } else {
- strncpy( msg, cmor_vars[cmor_grids[cmor_ngrids].
- associated_variables[3]].id,
- CMOR_MAX_STRING );
- }
- cmor_set_variable_attribute_internal( cmor_grids[cmor_ngrids].
- associated_variables[1],
- "bounds", 'c', msg );
+ cmor_copy_data(&cmor_grids[cmor_ngrids].blons, blon, type,
+ n * nvertices);
+
+ if (did_vertices == 0) {
+
+ dummy_values = malloc(sizeof(double) * nvertices);
+
+ for (j = 0; j < nvertices; j++) {
+ dummy_values[j] = (double)j;
+ }
+ cmor_axis(&axes[1], "vertices", "1", nvertices, dummy_values,
+ 'd', NULL, 0, NULL);
+ free(dummy_values);
+ }
+
+ cmor_variable(&cmor_grids[cmor_ngrids].associated_variables[3],
+ "vertices_longitude", "degrees_east", 2, &axes[0],
+ 'd', NULL, NULL, NULL, NULL, NULL, NULL);
+
+ cmor_vars[cmor_grids[cmor_ngrids].associated_variables[3]].needsinit =
+ 0;
+
+ if (cmor_has_variable_attribute
+ (cmor_grids[cmor_ngrids].associated_variables[1], "bounds") == 0) {
+
+ cmor_get_variable_attribute(cmor_grids
+ [cmor_ngrids].associated_variables[1],
+ "bounds", &msg);
+
+ strncat(msg, " ", CMOR_MAX_STRING - strlen(msg));
+ strncat(msg,
+ cmor_vars[cmor_grids[cmor_ngrids].associated_variables[3]].
+ id, CMOR_MAX_STRING - strlen(msg));
+
+ } else {
+ strncpy(msg,
+ cmor_vars[cmor_grids[cmor_ngrids].associated_variables[3]].
+ id, CMOR_MAX_STRING);
+ }
+ cmor_set_variable_attribute_internal(cmor_grids
+ [cmor_ngrids].associated_variables
+ [1], "bounds", 'c', msg);
}
*grid_id = -cmor_ngrids - CMOR_MAX_GRIDS;
- cmor_pop_traceback( );
- return(0);
+ cmor_pop_traceback();
+ return (0);
}
diff --git a/Src/cmor_md5.c b/Src/cmor_md5.c
index 8a1131e..9f86081 100644
--- a/Src/cmor_md5.c
+++ b/Src/cmor_md5.c
@@ -32,7 +32,7 @@
#include "config.h"
#endif
-#include <string.h> /* for memcpy() and memset() */
+#include <string.h> /* for memcpy() and memset() */
/* Add prototype support. */
#ifndef PROTO
@@ -51,36 +51,33 @@
is possible they should be macros for speed, but I would be
surprised if they were a performance bottleneck for MD5. */
-static cvs_uint32
-getu32 (const unsigned char * addr)
+static cvs_uint32 getu32(const unsigned char *addr)
{
- return( (((((unsigned long)addr[3] << 8) | addr[2]) << 8)
- | addr[1]) << 8 | addr[0] );
+ return ((((((unsigned long)addr[3] << 8) | addr[2]) << 8)
+ | addr[1]) << 8 | addr[0]);
}
-static void
-putu32 (cvs_uint32 data, unsigned char *addr)
+static void putu32(cvs_uint32 data, unsigned char *addr)
{
- addr[0] = (unsigned char)data;
- addr[1] = (unsigned char)(data >> 8);
- addr[2] = (unsigned char)(data >> 16);
- addr[3] = (unsigned char)(data >> 24);
+ addr[0] = (unsigned char)data;
+ addr[1] = (unsigned char)(data >> 8);
+ addr[2] = (unsigned char)(data >> 16);
+ addr[3] = (unsigned char)(data >> 24);
}
/*
* Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
* initialization constants.
*/
-void
-cvs_MD5Init (struct cvs_MD5Context *ctx)
+void cvs_MD5Init(struct cvs_MD5Context *ctx)
{
- ctx->buf[0] = 0x67452301;
- ctx->buf[1] = 0xefcdab89;
- ctx->buf[2] = 0x98badcfe;
- ctx->buf[3] = 0x10325476;
+ ctx->buf[0] = 0x67452301;
+ ctx->buf[1] = 0xefcdab89;
+ ctx->buf[2] = 0x98badcfe;
+ ctx->buf[3] = 0x10325476;
- ctx->bits[0] = 0;
- ctx->bits[1] = 0;
+ ctx->bits[0] = 0;
+ ctx->bits[1] = 0;
}
/*
@@ -88,93 +85,93 @@ cvs_MD5Init (struct cvs_MD5Context *ctx)
* of bytes.
*/
void
-cvs_MD5Update (struct cvs_MD5Context *ctx, unsigned char const *buf, unsigned len)
+cvs_MD5Update(struct cvs_MD5Context *ctx, unsigned char const *buf,
+ unsigned len)
{
- cvs_uint32 t;
+ cvs_uint32 t;
- /* Update bitcount */
+ /* Update bitcount */
- t = ctx->bits[0];
- if ((ctx->bits[0] = (t + ((cvs_uint32)len << 3)) & 0xffffffff) < t)
- ctx->bits[1]++; /* Carry from low to high */
- ctx->bits[1] += len >> 29;
+ t = ctx->bits[0];
+ if ((ctx->bits[0] = (t + ((cvs_uint32) len << 3)) & 0xffffffff) < t)
+ ctx->bits[1]++; /* Carry from low to high */
+ ctx->bits[1] += len >> 29;
- t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */
+ t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */
- /* Handle any leading odd-sized chunks */
+ /* Handle any leading odd-sized chunks */
- if ( t ) {
- unsigned char *p = ctx->in + t;
+ if (t) {
+ unsigned char *p = ctx->in + t;
- t = 64-t;
- if (len < t) {
- memcpy(p, buf, len);
- return;
- }
- memcpy(p, buf, t);
- cvs_MD5Transform (ctx->buf, ctx->in);
- buf += t;
- len -= t;
- }
+ t = 64 - t;
+ if (len < t) {
+ memcpy(p, buf, len);
+ return;
+ }
+ memcpy(p, buf, t);
+ cvs_MD5Transform(ctx->buf, ctx->in);
+ buf += t;
+ len -= t;
+ }
- /* Process data in 64-byte chunks */
+ /* Process data in 64-byte chunks */
- while (len >= 64) {
- memcpy(ctx->in, buf, 64);
- cvs_MD5Transform (ctx->buf, ctx->in);
- buf += 64;
- len -= 64;
- }
+ while (len >= 64) {
+ memcpy(ctx->in, buf, 64);
+ cvs_MD5Transform(ctx->buf, ctx->in);
+ buf += 64;
+ len -= 64;
+ }
- /* Handle any remaining bytes of data. */
+ /* Handle any remaining bytes of data. */
- memcpy(ctx->in, buf, len);
+ memcpy(ctx->in, buf, len);
}
/*
* Final wrapup - pad to 64-byte boundary with the bit pattern
* 1 0* (64-bit count of bits processed, MSB-first)
*/
-void
-cvs_MD5Final (unsigned char digest[16], struct cvs_MD5Context *ctx)
+void cvs_MD5Final(unsigned char digest[16], struct cvs_MD5Context *ctx)
{
- unsigned count;
- unsigned char *p;
-
- /* Compute number of bytes mod 64 */
- count = (ctx->bits[0] >> 3) & 0x3F;
-
- /* Set the first char of padding to 0x80. This is safe since there is
- always at least one byte free */
- p = ctx->in + count;
- *p++ = 0x80;
-
- /* Bytes of padding needed to make 64 bytes */
- count = 64 - 1 - count;
-
- /* Pad out to 56 mod 64 */
- if (count < 8) {
- /* Two lots of padding: Pad the first block to 64 bytes */
- memset(p, 0, count);
- cvs_MD5Transform (ctx->buf, ctx->in);
-
- /* Now fill the next block with 56 bytes */
- memset(ctx->in, 0, 56);
- } else {
- /* Pad block to 56 bytes */
- memset(p, 0, count-8);
- }
-
- /* Append length in bits and transform */
- putu32(ctx->bits[0], ctx->in + 56);
- putu32(ctx->bits[1], ctx->in + 60);
-
- cvs_MD5Transform (ctx->buf, ctx->in);
- putu32(ctx->buf[0], digest);
- putu32(ctx->buf[1], digest + 4);
- putu32(ctx->buf[2], digest + 8);
- putu32(ctx->buf[3], digest + 12);
- memset(ctx, 0, sizeof(&ctx)); /* In case it's sensitive */
+ unsigned count;
+ unsigned char *p;
+
+ /* Compute number of bytes mod 64 */
+ count = (ctx->bits[0] >> 3) & 0x3F;
+
+ /* Set the first char of padding to 0x80. This is safe since there is
+ always at least one byte free */
+ p = ctx->in + count;
+ *p++ = 0x80;
+
+ /* Bytes of padding needed to make 64 bytes */
+ count = 64 - 1 - count;
+
+ /* Pad out to 56 mod 64 */
+ if (count < 8) {
+ /* Two lots of padding: Pad the first block to 64 bytes */
+ memset(p, 0, count);
+ cvs_MD5Transform(ctx->buf, ctx->in);
+
+ /* Now fill the next block with 56 bytes */
+ memset(ctx->in, 0, 56);
+ } else {
+ /* Pad block to 56 bytes */
+ memset(p, 0, count - 8);
+ }
+
+ /* Append length in bits and transform */
+ putu32(ctx->bits[0], ctx->in + 56);
+ putu32(ctx->bits[1], ctx->in + 60);
+
+ cvs_MD5Transform(ctx->buf, ctx->in);
+ putu32(ctx->buf[0], digest);
+ putu32(ctx->buf[1], digest + 4);
+ putu32(ctx->buf[2], digest + 8);
+ putu32(ctx->buf[3], digest + 12);
+ memset(ctx, 0, sizeof(&ctx)); /* In case it's sensitive */
}
#ifndef ASM_MD5
@@ -196,93 +193,92 @@ cvs_MD5Final (unsigned char digest[16], struct cvs_MD5Context *ctx)
* reflect the addition of 16 longwords of new data. MD5Update blocks
* the data and converts bytes into longwords for this routine.
*/
-void
-cvs_MD5Transform (cvs_uint32 buf[4], const unsigned char inraw[64])
+void cvs_MD5Transform(cvs_uint32 buf[4], const unsigned char inraw[64])
{
- register cvs_uint32 a, b, c, d;
- cvs_uint32 in[16];
- int i;
-
- for (i = 0; i < 16; ++i)
- in[i] = getu32 (inraw + 4 * i);
-
- a = buf[0];
- b = buf[1];
- c = buf[2];
- d = buf[3];
-
- MD5STEP(F1, a, b, c, d, in[ 0]+0xd76aa478, 7);
- MD5STEP(F1, d, a, b, c, in[ 1]+0xe8c7b756, 12);
- MD5STEP(F1, c, d, a, b, in[ 2]+0x242070db, 17);
- MD5STEP(F1, b, c, d, a, in[ 3]+0xc1bdceee, 22);
- MD5STEP(F1, a, b, c, d, in[ 4]+0xf57c0faf, 7);
- MD5STEP(F1, d, a, b, c, in[ 5]+0x4787c62a, 12);
- MD5STEP(F1, c, d, a, b, in[ 6]+0xa8304613, 17);
- MD5STEP(F1, b, c, d, a, in[ 7]+0xfd469501, 22);
- MD5STEP(F1, a, b, c, d, in[ 8]+0x698098d8, 7);
- MD5STEP(F1, d, a, b, c, in[ 9]+0x8b44f7af, 12);
- MD5STEP(F1, c, d, a, b, in[10]+0xffff5bb1, 17);
- MD5STEP(F1, b, c, d, a, in[11]+0x895cd7be, 22);
- MD5STEP(F1, a, b, c, d, in[12]+0x6b901122, 7);
- MD5STEP(F1, d, a, b, c, in[13]+0xfd987193, 12);
- MD5STEP(F1, c, d, a, b, in[14]+0xa679438e, 17);
- MD5STEP(F1, b, c, d, a, in[15]+0x49b40821, 22);
-
- MD5STEP(F2, a, b, c, d, in[ 1]+0xf61e2562, 5);
- MD5STEP(F2, d, a, b, c, in[ 6]+0xc040b340, 9);
- MD5STEP(F2, c, d, a, b, in[11]+0x265e5a51, 14);
- MD5STEP(F2, b, c, d, a, in[ 0]+0xe9b6c7aa, 20);
- MD5STEP(F2, a, b, c, d, in[ 5]+0xd62f105d, 5);
- MD5STEP(F2, d, a, b, c, in[10]+0x02441453, 9);
- MD5STEP(F2, c, d, a, b, in[15]+0xd8a1e681, 14);
- MD5STEP(F2, b, c, d, a, in[ 4]+0xe7d3fbc8, 20);
- MD5STEP(F2, a, b, c, d, in[ 9]+0x21e1cde6, 5);
- MD5STEP(F2, d, a, b, c, in[14]+0xc33707d6, 9);
- MD5STEP(F2, c, d, a, b, in[ 3]+0xf4d50d87, 14);
- MD5STEP(F2, b, c, d, a, in[ 8]+0x455a14ed, 20);
- MD5STEP(F2, a, b, c, d, in[13]+0xa9e3e905, 5);
- MD5STEP(F2, d, a, b, c, in[ 2]+0xfcefa3f8, 9);
- MD5STEP(F2, c, d, a, b, in[ 7]+0x676f02d9, 14);
- MD5STEP(F2, b, c, d, a, in[12]+0x8d2a4c8a, 20);
-
- MD5STEP(F3, a, b, c, d, in[ 5]+0xfffa3942, 4);
- MD5STEP(F3, d, a, b, c, in[ 8]+0x8771f681, 11);
- MD5STEP(F3, c, d, a, b, in[11]+0x6d9d6122, 16);
- MD5STEP(F3, b, c, d, a, in[14]+0xfde5380c, 23);
- MD5STEP(F3, a, b, c, d, in[ 1]+0xa4beea44, 4);
- MD5STEP(F3, d, a, b, c, in[ 4]+0x4bdecfa9, 11);
- MD5STEP(F3, c, d, a, b, in[ 7]+0xf6bb4b60, 16);
- MD5STEP(F3, b, c, d, a, in[10]+0xbebfbc70, 23);
- MD5STEP(F3, a, b, c, d, in[13]+0x289b7ec6, 4);
- MD5STEP(F3, d, a, b, c, in[ 0]+0xeaa127fa, 11);
- MD5STEP(F3, c, d, a, b, in[ 3]+0xd4ef3085, 16);
- MD5STEP(F3, b, c, d, a, in[ 6]+0x04881d05, 23);
- MD5STEP(F3, a, b, c, d, in[ 9]+0xd9d4d039, 4);
- MD5STEP(F3, d, a, b, c, in[12]+0xe6db99e5, 11);
- MD5STEP(F3, c, d, a, b, in[15]+0x1fa27cf8, 16);
- MD5STEP(F3, b, c, d, a, in[ 2]+0xc4ac5665, 23);
-
- MD5STEP(F4, a, b, c, d, in[ 0]+0xf4292244, 6);
- MD5STEP(F4, d, a, b, c, in[ 7]+0x432aff97, 10);
- MD5STEP(F4, c, d, a, b, in[14]+0xab9423a7, 15);
- MD5STEP(F4, b, c, d, a, in[ 5]+0xfc93a039, 21);
- MD5STEP(F4, a, b, c, d, in[12]+0x655b59c3, 6);
- MD5STEP(F4, d, a, b, c, in[ 3]+0x8f0ccc92, 10);
- MD5STEP(F4, c, d, a, b, in[10]+0xffeff47d, 15);
- MD5STEP(F4, b, c, d, a, in[ 1]+0x85845dd1, 21);
- MD5STEP(F4, a, b, c, d, in[ 8]+0x6fa87e4f, 6);
- MD5STEP(F4, d, a, b, c, in[15]+0xfe2ce6e0, 10);
- MD5STEP(F4, c, d, a, b, in[ 6]+0xa3014314, 15);
- MD5STEP(F4, b, c, d, a, in[13]+0x4e0811a1, 21);
- MD5STEP(F4, a, b, c, d, in[ 4]+0xf7537e82, 6);
- MD5STEP(F4, d, a, b, c, in[11]+0xbd3af235, 10);
- MD5STEP(F4, c, d, a, b, in[ 2]+0x2ad7d2bb, 15);
- MD5STEP(F4, b, c, d, a, in[ 9]+0xeb86d391, 21);
-
- buf[0] += a;
- buf[1] += b;
- buf[2] += c;
- buf[3] += d;
+ register cvs_uint32 a, b, c, d;
+ cvs_uint32 in[16];
+ int i;
+
+ for (i = 0; i < 16; ++i)
+ in[i] = getu32(inraw + 4 * i);
+
+ a = buf[0];
+ b = buf[1];
+ c = buf[2];
+ d = buf[3];
+
+ MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
+ MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
+ MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
+ MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
+ MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
+ MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
+ MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
+ MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
+ MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
+ MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
+ MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
+ MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
+ MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
+ MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
+ MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
+ MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
+
+ MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
+ MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
+ MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
+ MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
+ MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
+ MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
+ MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
+ MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
+ MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
+ MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
+ MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
+ MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
+ MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
+ MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
+ MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
+ MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
+
+ MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
+ MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
+ MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
+ MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
+ MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
+ MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
+ MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
+ MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
+ MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
+ MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
+ MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
+ MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
+ MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
+ MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
+ MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
+ MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
+
+ MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
+ MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
+ MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
+ MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
+ MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
+ MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
+ MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
+ MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
+ MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
+ MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
+ MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
+ MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
+ MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
+ MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
+ MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
+ MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
+
+ buf[0] += a;
+ buf[1] += b;
+ buf[2] += c;
+ buf[3] += d;
}
#endif
@@ -290,20 +286,20 @@ cvs_MD5Transform (cvs_uint32 buf[4], const unsigned char inraw[64])
RFC1321 for example. */
#include <stdio.h>
-void cmor_md5 (FILE *inputfile,unsigned char checksum[16])
+void cmor_md5(FILE * inputfile, unsigned char checksum[16])
{
- struct cvs_MD5Context context;
- char c,d;
-
- cvs_MD5Init (&context);
- c= fgetc(inputfile);
- d=EOF;
- while (c!=d) {
- cvs_MD5Update (&context, (unsigned char *)&c, 1);
- c= fgetc(inputfile);
- }
- rewind(inputfile);
- cvs_MD5Final (checksum, &context);
-
- return;
+ struct cvs_MD5Context context;
+ char c, d;
+
+ cvs_MD5Init(&context);
+ c = fgetc(inputfile);
+ d = EOF;
+ while (c != d) {
+ cvs_MD5Update(&context, (unsigned char *)&c, 1);
+ c = fgetc(inputfile);
+ }
+ rewind(inputfile);
+ cvs_MD5Final(checksum, &context);
+
+ return;
}
diff --git a/Src/cmor_tables.c b/Src/cmor_tables.c
index ce7616b..a617131 100644
--- a/Src/cmor_tables.c
+++ b/Src/cmor_tables.c
@@ -14,60 +14,63 @@
/************************************************************************/
/* wfgetc() */
/************************************************************************/
-int wfgetc( FILE * afile ) {
- int i = fgetc( afile );
+int wfgetc(FILE * afile)
+{
+ int i = fgetc(afile);
- while( i == '\r' ) {
- i = fgetc( afile );
+ while (i == '\r') {
+ i = fgetc(afile);
}
- return(i);
+ return (i);
}
+
/************************************************************************/
/* cmor_get_table_attr */
/* */
/* tags for template used in input config file (.json) */
/* */
/************************************************************************/
-int cmor_get_table_attr( char *szToken, cmor_table_t * table, char *out) {
+int cmor_get_table_attr(char *szToken, cmor_table_t * table, char *out)
+{
int i;
- t_symstruct lookuptable[]= {
- {"mip_era", table->mip_era },
- {"table", table->szTable_id },
- {"realm", table->realm },
- {"date", table->date },
- {"product", table->product },
- {"path", table->path },
- {"frequency", table->frequency },
- {"", ""},
- {"", ""},
- {"", ""}
+ t_symstruct lookuptable[] = {
+ {"mip_era", table->mip_era},
+ {"table", table->szTable_id},
+ {"realm", table->realm},
+ {"date", table->date},
+ {"product", table->product},
+ {"path", table->path},
+ // {"frequency", table->frequency },
+ {"", ""},
+ {"", ""},
+ {"", ""}
};
- int nKeys=(sizeof(lookuptable)/sizeof(t_symstruct));
+ int nKeys = (sizeof(lookuptable) / sizeof(t_symstruct));
- for (i=0; i < nKeys; i++) {
+ for (i = 0; i < nKeys; i++) {
t_symstruct *sym = &lookuptable[i];
- if(strcmp(szToken, sym->key) == 0) {
+ if (strcmp(szToken, sym->key) == 0) {
strcpy(out, sym->value);
- cmor_pop_traceback( );
- return(0);
+ cmor_pop_traceback();
+ return (0);
}
}
- cmor_pop_traceback( );
- return(1);
+ cmor_pop_traceback();
+ return (1);
}
-
/************************************************************************/
/* cmor_init_table() */
/************************************************************************/
-void cmor_init_table( cmor_table_t * table, int id ) {
+void cmor_init_table(cmor_table_t * table, int id)
+{
int i;
- cmor_add_traceback( "cmor_init_table" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_init_table");
+ cmor_is_setup();
/* init the table */
table->id = id;
table->nvars = -1;
@@ -78,37 +81,34 @@ void cmor_init_table( cmor_table_t * table, int id ) {
table->cmor_version = 3.0;
table->mip_era[0] = '\0';
table->szTable_id[0] = '\0';
- strcpy( table->realm, "REALM" );
+ strcpy(table->realm, "REALM");
table->date[0] = '\0';
table->missing_value = 1.e20;
table->interval = 0.;
table->interval_warning = .1;
table->interval_error = .2;
table->URL[0] = '\0';
- strcpy( table->product, "output" );
+ strcpy(table->product, "output");
table->path[0] = '\0';
- table->frequency[0] = '\0';
+// table->frequency[0] = '\0';
table->nforcings = 0;
- for (i = 0; i < CMOR_MAX_ELEMENTS; i++) {
- table->expt_ids[i][0] = '\0';
- table->sht_expt_ids[i][0] = '\0';
- table->generic_levels[i][0] = '\0';
- }
+ for (i = 0; i < CMOR_MAX_ELEMENTS; i++) {
+ table->expt_ids[i][0] = '\0';
+ table->sht_expt_ids[i][0] = '\0';
+ table->generic_levels[i][0] = '\0';
+ }
table->CV = NULL;
- cmor_pop_traceback( );
-
-
+ cmor_pop_traceback();
}
-
/************************************************************************/
/* cmor_set_variable_entry() */
/************************************************************************/
-int cmor_set_variable_entry(cmor_table_t* table,
- char *variable_entry,
- json_object *json) {
+int cmor_set_variable_entry(cmor_table_t * table,
+ char *variable_entry, json_object * json)
+{
extern int cmor_ntables;
char szValue[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
@@ -132,7 +132,7 @@ int cmor_set_variable_entry(cmor_table_t* table,
if (nVarId >= CMOR_MAX_ELEMENTS) {
snprintf(msg, CMOR_MAX_STRING,
- "Too many variables defined for table: %s", szTableId);
+ "Too many variables defined for table: %s", szTableId);
cmor_handle_error(msg, CMOR_CRITICAL);
cmor_ntables--;
cmor_pop_traceback();
@@ -148,7 +148,7 @@ int cmor_set_variable_entry(cmor_table_t* table,
/* and they are skipped! */
/* -------------------------------------------------------------------- */
- if( attr[0] == '#')
+ if (attr[0] == '#')
continue;
strcpy(szValue, json_object_get_string(value));
@@ -161,11 +161,11 @@ int cmor_set_variable_entry(cmor_table_t* table,
/************************************************************************/
/* cmor_set_axis_entry() */
/************************************************************************/
-int cmor_set_axis_entry( cmor_table_t* table,
- char *axis_entry,
- json_object *json ){
+int cmor_set_axis_entry(cmor_table_t * table,
+ char *axis_entry, json_object * json)
+{
extern int cmor_ntables;
- char szValue[CMOR_MAX_STRING*20];
+ char szValue[CMOR_MAX_STRING * 20];
char msg[CMOR_MAX_STRING];
int nAxisId;
char *szTableId;
@@ -185,14 +185,13 @@ int cmor_set_axis_entry( cmor_table_t* table,
nAxisId = cmor_table->naxes;
axis = &cmor_table->axes[nAxisId];
-
if (nAxisId >= CMOR_MAX_ELEMENTS) {
- snprintf(msg, CMOR_MAX_STRING, "Too many axes defined for table: %s",
- szTableId);
- cmor_handle_error(msg,CMOR_CRITICAL);
- cmor_ntables--;
- cmor_pop_traceback();
- return(1);
+ snprintf(msg, CMOR_MAX_STRING, "Too many axes defined for table: %s",
+ szTableId);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_ntables--;
+ cmor_pop_traceback();
+ return (1);
}
axis = &cmor_table->axes[nAxisId];
@@ -206,7 +205,7 @@ int cmor_set_axis_entry( cmor_table_t* table,
/* Add axis value */
/* -------------------------------------------------------------------- */
json_object_object_foreach(json, attr, value) {
- if( attr[0] == '#') {
+ if (attr[0] == '#') {
continue;
}
strcpy(szValue, json_object_get_string(value));
@@ -215,11 +214,13 @@ int cmor_set_axis_entry( cmor_table_t* table,
cmor_pop_traceback();
return (0);
}
+
/************************************************************************/
/* cmor_set_experiments() */
/************************************************************************/
int cmor_set_experiments(cmor_table_t * table, char att[CMOR_MAX_STRING],
- char val[CMOR_MAX_STRING]) {
+ char val[CMOR_MAX_STRING])
+{
extern int cmor_ntables;
char szError[CMOR_MAX_STRING];
@@ -229,231 +230,227 @@ int cmor_set_experiments(cmor_table_t * table, char att[CMOR_MAX_STRING],
/* -------------------------------------------------------------------- */
/* Check number of experiments */
/* -------------------------------------------------------------------- */
- if( table->nexps > CMOR_MAX_ELEMENTS ) {
- snprintf( szError, CMOR_MAX_STRING,
- "Table %s: Too many experiments defined",
- table->szTable_id );
- cmor_handle_error( szError, CMOR_CRITICAL );
+ if (table->nexps > CMOR_MAX_ELEMENTS) {
+ snprintf(szError, CMOR_MAX_STRING,
+ "Table %s: Too many experiments defined", table->szTable_id);
+ cmor_handle_error(szError, CMOR_CRITICAL);
cmor_ntables--;
- cmor_pop_traceback( );
- return(1);
+ cmor_pop_traceback();
+ return (1);
}
/* -------------------------------------------------------------------- */
/* Insert experiment to table */
/* -------------------------------------------------------------------- */
- strncpy( table->sht_expt_ids[table->nexps], att,
- CMOR_MAX_STRING );
- strncpy( table->expt_ids[table->nexps], val,
- CMOR_MAX_STRING );
+ strncpy(table->sht_expt_ids[table->nexps], att, CMOR_MAX_STRING);
+ strncpy(table->expt_ids[table->nexps], val, CMOR_MAX_STRING);
cmor_pop_traceback();
- return(0);
+ return (0);
}
/************************************************************************/
/* cmor_set_dataset_att() */
/************************************************************************/
int cmor_set_dataset_att(cmor_table_t * table, char att[CMOR_MAX_STRING],
- char val[CMOR_MAX_STRING]) {
- int n, i, j;
- float d, d2;
- char value[CMOR_MAX_STRING];
- char value2[CMOR_MAX_STRING];
- extern int cmor_ntables;
+ char val[CMOR_MAX_STRING])
+{
+ int n, i, j;
+ float d, d2;
+ char value[CMOR_MAX_STRING];
+ char value2[CMOR_MAX_STRING];
+ extern int cmor_ntables;
- cmor_add_traceback("cmor_set_dataset_att");
- cmor_is_setup();
+ cmor_add_traceback("cmor_set_dataset_att");
+ cmor_is_setup();
- strncpy(value, val, CMOR_MAX_STRING);
+ strncpy(value, val, CMOR_MAX_STRING);
/* -------------------------------------------------------------------- */
/* Read non-block metadata. */
/* -------------------------------------------------------------------- */
- if (strcmp(att, TABLE_HEADER_VERSION) == 0) {
- d2 = CMOR_VERSION_MAJOR;
- d = CMOR_VERSION_MINOR;
- while (d > 1.)
- d /= 10.;
- d2 += d;
- sscanf(value, "%f", &d);
- if (d > d2) {
- snprintf(value2, CMOR_MAX_STRING,
- "Table %s is defined for cmor_version %f, "
- "this library version is: %i.%i.%i, %f",
- table->szTable_id, d,
- CMOR_VERSION_MAJOR, CMOR_VERSION_MINOR,
- CMOR_VERSION_PATCH, d2);
- cmor_handle_error(value2, CMOR_CRITICAL);
- cmor_ntables--;
- cmor_pop_traceback();
- return(1);
- }
- table->cmor_version = d;
-
- } else if (strcmp(att, TABLE_HEADER_GENERIC_LEVS) == 0) {
- n = 0;
- i = 0;
- while (i < (strlen(value)) ) {
- while (value[i] == ' ')
- i++;
- j = 0;
- while (i < (strlen(value)) && value[i] != ' ') {
- table->generic_levels[n][j] = value[i];
- j++;
- i++;
- }
- table->generic_levels[n][j] = '\0';
- n += 1;
- }
-
- } else if (strcmp(att, TABLE_HEADER_CONVENTIONS) == 0) {
- strncpy(table->Conventions, val, CMOR_MAX_STRING);
-
- } else if (strcmp(att, TABLE_HEADER_DATASPECSVERSION) == 0) {
- strncpy(table->data_specs_version, val, CMOR_MAX_STRING);
-
- } else if (strcmp(att, TABLE_HEADER_MIP_ERA) == 0) {
- strncpy(table->mip_era, value, CMOR_MAX_STRING);
-
- } else if (strcmp(att, TABLE_HEADER_REALM) == 0) {
- strncpy(table->realm, value, CMOR_MAX_STRING);
-
- } else if (strcmp(att, TABLE_HEADER_TABLE_DATE) == 0) {
- strncpy(table->date, value, CMOR_MAX_STRING);
-
- } else if (strcmp(att, TABLE_HEADER_BASEURL) == 0) {
- strncpy(table->URL, value, CMOR_MAX_STRING);
-
- } else if (strcmp(att, TABLE_HEADER_FORCINGS) == 0) {
- cmor_convert_string_to_list(value,
- 'c',
- (void **) &table->forcings,
- &table->nforcings);
-
- } else if (strcmp(att, TABLE_HEADER_PRODUCT) == 0) {
- strncpy(table->product, value, CMOR_MAX_STRING);
-
- } else if (strcmp(att, TABLE_HEADER_FREQUENCY) == 0) {
- strncpy(table->frequency, value, CMOR_MAX_STRING);
-
- } else if (strcmp(att, TABLE_HEADER_TABLE_ID) == 0) {
- for (n = 0; n == cmor_ntables; n++) {
- if (strcmp(cmor_tables[n].szTable_id, value) == 0) {
- snprintf(value2, CMOR_MAX_STRING,
- "Table %s is already defined",
- table->szTable_id);
- cmor_handle_error(value2, CMOR_CRITICAL);
- cmor_ntables--;
- cmor_pop_traceback();
- return(1);
- }
- }
- n = strlen( value );
- for( i = n - 1; i > 0; i-- ) {
- if( value[i] == ' ' )
- break;
- }
- if( value[i] == ' ' )
- i++;
-
- for( j = i; j < n; j++ )
- value2[j - i] = value[j];
- value2[n - i] = '\0';
- strcpy( table->szTable_id, value2 );
+ if (strcmp(att, TABLE_HEADER_VERSION) == 0) {
+ d2 = CMOR_VERSION_MAJOR;
+ d = CMOR_VERSION_MINOR;
+ while (d > 1.)
+ d /= 10.;
+ d2 += d;
+ sscanf(value, "%f", &d);
+ if (d > d2) {
+ snprintf(value2, CMOR_MAX_STRING,
+ "Table %s is defined for cmor_version %f, "
+ "this library version is: %i.%i.%i, %f",
+ table->szTable_id, d,
+ CMOR_VERSION_MAJOR, CMOR_VERSION_MINOR,
+ CMOR_VERSION_PATCH, d2);
+ cmor_handle_error(value2, CMOR_CRITICAL);
+ cmor_ntables--;
+ cmor_pop_traceback();
+ return (1);
+ }
+ table->cmor_version = d;
+
+ } else if (strcmp(att, TABLE_HEADER_GENERIC_LEVS) == 0) {
+ n = 0;
+ i = 0;
+ while (i < (strlen(value))) {
+ while (value[i] == ' ')
+ i++;
+ j = 0;
+ while (i < (strlen(value)) && value[i] != ' ') {
+ table->generic_levels[n][j] = value[i];
+ j++;
+ i++;
+ }
+ table->generic_levels[n][j] = '\0';
+ n += 1;
+ }
+
+ } else if (strcmp(att, TABLE_HEADER_CONVENTIONS) == 0) {
+ strncpy(table->Conventions, val, CMOR_MAX_STRING);
+
+ } else if (strcmp(att, TABLE_HEADER_DATASPECSVERSION) == 0) {
+ strncpy(table->data_specs_version, val, CMOR_MAX_STRING);
+
+ } else if (strcmp(att, TABLE_HEADER_MIP_ERA) == 0) {
+ strncpy(table->mip_era, value, CMOR_MAX_STRING);
+
+ } else if (strcmp(att, TABLE_HEADER_REALM) == 0) {
+ strncpy(table->realm, value, CMOR_MAX_STRING);
+
+ } else if (strcmp(att, TABLE_HEADER_TABLE_DATE) == 0) {
+ strncpy(table->date, value, CMOR_MAX_STRING);
+
+ } else if (strcmp(att, TABLE_HEADER_BASEURL) == 0) {
+ strncpy(table->URL, value, CMOR_MAX_STRING);
+
+ } else if (strcmp(att, TABLE_HEADER_FORCINGS) == 0) {
+ cmor_convert_string_to_list(value,
+ 'c',
+ (void **)&table->forcings,
+ &table->nforcings);
+
+ } else if (strcmp(att, TABLE_HEADER_PRODUCT) == 0) {
+ strncpy(table->product, value, CMOR_MAX_STRING);
+
+// } else if (strcmp(att, TABLE_HEADER_FREQUENCY) == 0) {
+// strncpy(table->frequency, value, CMOR_MAX_STRING);
+
+ } else if (strcmp(att, TABLE_HEADER_TABLE_ID) == 0) {
+ for (n = 0; n == cmor_ntables; n++) {
+ if (strcmp(cmor_tables[n].szTable_id, value) == 0) {
+ snprintf(value2, CMOR_MAX_STRING,
+ "Table %s is already defined", table->szTable_id);
+ cmor_handle_error(value2, CMOR_CRITICAL);
+ cmor_ntables--;
+ cmor_pop_traceback();
+ return (1);
+ }
+ }
+ n = strlen(value);
+ for (i = n - 1; i > 0; i--) {
+ if (value[i] == ' ')
+ break;
+ }
+ if (value[i] == ' ')
+ i++;
+
+ for (j = i; j < n; j++)
+ value2[j - i] = value[j];
+ value2[n - i] = '\0';
+ strcpy(table->szTable_id, value2);
/* -------------------------------------------------------------------- */
/* Save all experiment id */
/* -------------------------------------------------------------------- */
- } else if( strcmp( att, TABLE_EXPIDS ) == 0 ) {
- table->nexps++;
- if( table->nexps > CMOR_MAX_ELEMENTS ) {
- snprintf( value2, CMOR_MAX_STRING,
- "Table %s: Too many experiments defined",
- table->szTable_id );
- cmor_handle_error( value2, CMOR_CRITICAL );
- cmor_ntables--;
- cmor_pop_traceback( );
- return(1);
- }
-
- if( value[0] == '\'' )
- for( n = 0; n < strlen( value ) - 1; n++ )
- value[n] = value[n + 1]; /* removes leading "'" */
- n = strlen( value );
-
- if( value[n - 2] == '\'' )
- value[n - 2] = '\0'; /*removes trailing "'" */
+ } else if (strcmp(att, TABLE_EXPIDS) == 0) {
+ table->nexps++;
+ if (table->nexps > CMOR_MAX_ELEMENTS) {
+ snprintf(value2, CMOR_MAX_STRING,
+ "Table %s: Too many experiments defined",
+ table->szTable_id);
+ cmor_handle_error(value2, CMOR_CRITICAL);
+ cmor_ntables--;
+ cmor_pop_traceback();
+ return (1);
+ }
+
+ if (value[0] == '\'')
+ for (n = 0; n < strlen(value) - 1; n++)
+ value[n] = value[n + 1]; /* removes leading "'" */
+ n = strlen(value);
+
+ if (value[n - 2] == '\'')
+ value[n - 2] = '\0'; /*removes trailing "'" */
/* -------------------------------------------------------------------- */
/* ok here we look for a ' which means there is */
/* a short name associated with it */
/* -------------------------------------------------------------------- */
- n = -1;
- for( j = 0; j < strlen( value ); j++ ) {
- if( value[j] == '\'' ) {
- n = j;
- break;
- }
- }
- if( n == -1 ) {
- strncpy( table->expt_ids[table->nexps], value, CMOR_MAX_STRING );
- strcpy( table->sht_expt_ids[table->nexps], "" );
- } else {
+ n = -1;
+ for (j = 0; j < strlen(value); j++) {
+ if (value[j] == '\'') {
+ n = j;
+ break;
+ }
+ }
+ if (n == -1) {
+ strncpy(table->expt_ids[table->nexps], value, CMOR_MAX_STRING);
+ strcpy(table->sht_expt_ids[table->nexps], "");
+ } else {
/* -------------------------------------------------------------------- */
/* ok looks like we have a short name let clook for the next ' */
/* -------------------------------------------------------------------- */
- i = -1;
- for( j = n + 1; j < strlen( value ); j++ ) {
- if( value[j] == '\'' )
- i = j;
- }
+ i = -1;
+ for (j = n + 1; j < strlen(value); j++) {
+ if (value[j] == '\'')
+ i = j;
+ }
/* -------------------------------------------------------------------- */
/* ok we must have a ' in our exp_id_ok */
/* -------------------------------------------------------------------- */
- if( i == -1 ) {
- strncpy( table->expt_ids[table->nexps], value,
- CMOR_MAX_STRING );
- strcpy( table->sht_expt_ids[table->nexps], "" );
- } else {
- for( j = i + 1; j < strlen( value ); j++ ) {
- value2[j - i - 1] = value[j];
- value2[j - i] = '\0';
- }
- strncpy( table->sht_expt_ids[table->nexps], value2,
- CMOR_MAX_STRING );
- value[n] = '\0';
- strncpy( table->expt_ids[table->nexps], value,
- CMOR_MAX_STRING );
- }
- }
- } else if( strcmp( att, TABLE_HEADER_APRX_INTRVL ) == 0 ) {
- sscanf( value, "%lf", &table->interval );
- } else if( strcmp( att, TABLE_HEADER_APRX_INTRVL_ERR ) == 0 ) {
- sscanf( value, "%f", &table->interval_error );
- } else if( strcmp( att, TABLE_HEADER_APRX_INTRVL_WRN ) == 0 ) {
- sscanf( value, "%f", &table->interval_warning );
- } else if( strcmp( att, TABLE_HEADER_MISSING_VALUE ) == 0 ) {
- sscanf( value, "%f", &table->missing_value );
- } else if( strcmp( att, TABLE_HEADER_MAGIC_NUMBER) == 0 ) {
-
+ if (i == -1) {
+ strncpy(table->expt_ids[table->nexps], value, CMOR_MAX_STRING);
+ strcpy(table->sht_expt_ids[table->nexps], "");
+ } else {
+ for (j = i + 1; j < strlen(value); j++) {
+ value2[j - i - 1] = value[j];
+ value2[j - i] = '\0';
+ }
+ strncpy(table->sht_expt_ids[table->nexps], value2,
+ CMOR_MAX_STRING);
+ value[n] = '\0';
+ strncpy(table->expt_ids[table->nexps], value, CMOR_MAX_STRING);
+ }
+ }
+ } else if (strcmp(att, TABLE_HEADER_APRX_INTRVL) == 0) {
+ sscanf(value, "%lf", &table->interval);
+ } else if (strcmp(att, TABLE_HEADER_APRX_INTRVL_ERR) == 0) {
+ sscanf(value, "%f", &table->interval_error);
+ } else if (strcmp(att, TABLE_HEADER_APRX_INTRVL_WRN) == 0) {
+ sscanf(value, "%f", &table->interval_warning);
+ } else if (strcmp(att, TABLE_HEADER_MISSING_VALUE) == 0) {
+ sscanf(value, "%f", &table->missing_value);
+ } else if (strcmp(att, TABLE_HEADER_MAGIC_NUMBER) == 0) {
+
} else {
- snprintf( value, CMOR_MAX_STRING,
- "table: %s, This keyword: %s value (%s) "
- "is not a valid table header entry.!\n "
- "Use the user input JSON file to add custom attributes.",
- table->szTable_id, att, value );
- cmor_handle_error( value, CMOR_WARNING );
+ snprintf(value, CMOR_MAX_STRING,
+ "table: %s, This keyword: %s value (%s) "
+ "is not a valid table header entry.!\n "
+ "Use the user input JSON file to add custom attributes.",
+ table->szTable_id, att, value);
+ cmor_handle_error(value, CMOR_WARNING);
}
- cmor_pop_traceback( );
- return(0);
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_set_table() */
/************************************************************************/
-int cmor_set_table(int table) {
+int cmor_set_table(int table)
+{
extern int CMOR_TABLE;
char msg[CMOR_MAX_STRING];
@@ -465,7 +462,7 @@ int cmor_set_table(int table) {
}
if (cmor_tables[table].szTable_id == '\0') {
snprintf(msg, CMOR_MAX_STRING, "Invalid table: %i , not loaded yet!",
- table);
+ table);
cmor_handle_error(msg, CMOR_CRITICAL);
}
CMOR_TABLE = table;
@@ -476,7 +473,8 @@ int cmor_set_table(int table) {
/************************************************************************/
/* cmor_load_table() */
/************************************************************************/
-int cmor_load_table( char szTable[CMOR_MAX_STRING], int *table_id ) {
+int cmor_load_table(char szTable[CMOR_MAX_STRING], int *table_id)
+{
int rc;
char *szPath;
char *szTableName;
@@ -488,21 +486,20 @@ int cmor_load_table( char szTable[CMOR_MAX_STRING], int *table_id ) {
char szFormulaVarFN[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
struct stat st;
- cmor_add_traceback( "cmor_load_table" );
+ cmor_add_traceback("cmor_load_table");
- if (cmor_ntables == (CMOR_MAX_TABLES-1)) {
- snprintf(msg, CMOR_MAX_STRING, "You cannot load more than %d tables",
- CMOR_MAX_TABLES);
- cmor_pop_traceback( );
- cmor_handle_error(msg, CMOR_CRITICAL);
- return (-1);
- }
+ if (cmor_ntables == (CMOR_MAX_TABLES - 1)) {
+ snprintf(msg, CMOR_MAX_STRING, "You cannot load more than %d tables",
+ CMOR_MAX_TABLES);
+ cmor_pop_traceback();
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ return (-1);
+ }
rc = cmor_get_cur_dataset_attribute(GLOBAL_CV_FILENAME, szCV);
rc = cmor_get_cur_dataset_attribute(CMOR_AXIS_ENTRY_FILE, szAxisEntryFN);
rc = cmor_get_cur_dataset_attribute(CMOR_FORMULA_VAR_FILE, szFormulaVarFN);
-
/* -------------------------------------------------------------------- */
/* build string "path/<CV>.json" */
/* -------------------------------------------------------------------- */
@@ -521,13 +518,12 @@ int cmor_load_table( char szTable[CMOR_MAX_STRING], int *table_id ) {
strcat(szFormulaVarFilenameJSON, "/");
strcat(szFormulaVarFilenameJSON, szFormulaVarFN);
-
/* -------------------------------------------------------------------- */
/* try to load table from directory where table is found or from the */
/* cmor_input_path */
/* -------------------------------------------------------------------- */
rc = stat(szControlFilenameJSON, &st);
- if(rc != 0 ) {
+ if (rc != 0) {
strcpy(szControlFilenameJSON, cmor_input_path);
strcat(szControlFilenameJSON, "/");
strcat(szControlFilenameJSON, szCV);
@@ -538,45 +534,47 @@ int cmor_load_table( char szTable[CMOR_MAX_STRING], int *table_id ) {
strcat(szFormulaVarFilenameJSON, "/");
strcat(szFormulaVarFilenameJSON, szFormulaVarFN);
-
}
/* -------------------------------------------------------------------- */
/* Is the table already in memory? */
/* -------------------------------------------------------------------- */
rc = cmor_search_table(szTable, table_id);
- if( rc == TABLE_FOUND) {
- return(TABLE_SUCCESS);
+ if (rc == TABLE_FOUND) {
+ return (TABLE_SUCCESS);
}
+ if (rc == TABLE_NOTFOUND) {
+ cmor_ntables += 1;
+ cmor_init_table(&cmor_tables[cmor_ntables], cmor_ntables);
+ *table_id = cmor_ntables;
- if(rc == TABLE_NOTFOUND) {
- cmor_ntables += 1;
- cmor_init_table(&cmor_tables[cmor_ntables], cmor_ntables);
- *table_id = cmor_ntables;
-
- strcpy( cmor_tables[cmor_ntables].path, szTable );
+ strcpy(cmor_tables[cmor_ntables].path, szTable);
cmor_set_cur_dataset_attribute_internal(CV_INPUTFILENAME,
szControlFilenameJSON, 1);
- rc= cmor_load_table_internal( szAxisEntryFilenameJSON, table_id);
- if(rc != TABLE_SUCCESS){
- snprintf( msg, CMOR_MAX_STRING, "Can't open/read JSON table %s", szAxisEntryFilenameJSON);
- cmor_handle_error( msg, CMOR_WARNING );
+ rc = cmor_load_table_internal(szAxisEntryFilenameJSON, table_id);
+ if (rc != TABLE_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "Can't open/read JSON table %s",
+ szAxisEntryFilenameJSON);
+ cmor_handle_error(msg, CMOR_WARNING);
}
- rc= cmor_load_table_internal( szTable, table_id);
- if(rc != TABLE_SUCCESS ){
- snprintf( msg, CMOR_MAX_STRING, "Can't open/read JSON table %s", szTable);
- cmor_handle_error( msg, CMOR_WARNING );
+ rc = cmor_load_table_internal(szTable, table_id);
+ if (rc != TABLE_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "Can't open/read JSON table %s",
+ szTable);
+ cmor_handle_error(msg, CMOR_WARNING);
}
- rc= cmor_load_table_internal( szFormulaVarFilenameJSON, table_id);
- if(rc != TABLE_SUCCESS ){
- snprintf( msg, CMOR_MAX_STRING, "Can't open/read JSON table %s", szFormulaVarFilenameJSON);
- cmor_handle_error( msg, CMOR_WARNING );
+ rc = cmor_load_table_internal(szFormulaVarFilenameJSON, table_id);
+ if (rc != TABLE_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "Can't open/read JSON table %s",
+ szFormulaVarFilenameJSON);
+ cmor_handle_error(msg, CMOR_WARNING);
}
- rc= cmor_load_table_internal( szControlFilenameJSON, table_id);
- if(rc != TABLE_SUCCESS){
- snprintf( msg, CMOR_MAX_STRING, "Can't open/read JSON table %s", szControlFilenameJSON);
- cmor_handle_error( msg, CMOR_WARNING );
+ rc = cmor_load_table_internal(szControlFilenameJSON, table_id);
+ if (rc != TABLE_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING, "Can't open/read JSON table %s",
+ szControlFilenameJSON);
+ cmor_handle_error(msg, CMOR_WARNING);
}
} else if (rc == TABLE_FOUND) {
@@ -585,230 +583,224 @@ int cmor_load_table( char szTable[CMOR_MAX_STRING], int *table_id ) {
free(szTableName);
- return(rc);
+ return (rc);
}
+
/************************************************************************/
/* cmor_search_table() */
/************************************************************************/
-int cmor_search_table( char szTable[CMOR_MAX_STRING],
- int *table_id) {
- int i;
- for (i = 0; i < cmor_ntables + 1; i++) {
-
- if (strcmp(cmor_tables[i].path, szTable) == 0) {
- CMOR_TABLE = i;
- *table_id = i;
- cmor_pop_traceback();
- return (TABLE_FOUND);
- }
- }
- cmor_pop_traceback( );
- return (TABLE_NOTFOUND);
+int cmor_search_table(char szTable[CMOR_MAX_STRING], int *table_id)
+{
+ int i;
+ for (i = 0; i < cmor_ntables + 1; i++) {
+
+ if (strcmp(cmor_tables[i].path, szTable) == 0) {
+ CMOR_TABLE = i;
+ *table_id = i;
+ cmor_pop_traceback();
+ return (TABLE_FOUND);
+ }
+ }
+ cmor_pop_traceback();
+ return (TABLE_NOTFOUND);
}
/************************************************************************/
/* cmor_load_table_internal() */
/************************************************************************/
-int cmor_load_table_internal( char szTable[CMOR_MAX_STRING], int *table_id) {
+int cmor_load_table_internal(char szTable[CMOR_MAX_STRING], int *table_id)
+{
FILE *table_file;
char word[CMOR_MAX_STRING];
int n;
- int done=0;
+ int done = 0;
extern int CMOR_TABLE, cmor_ntables;
extern char cmor_input_path[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
char szVal[1024000];
- char *buffer= NULL;
+ char *buffer = NULL;
int nTableSize, read_size;
json_object *json_obj;
+ cmor_add_traceback("cmor_load_table_internal");
+ cmor_is_setup();
- cmor_add_traceback( "cmor_load_table_internal" );
- cmor_is_setup( );
-
- table_file = fopen(szTable, "r");
- if (table_file == NULL) {
- if (szTable[0] != '/') {
- snprintf(word, CMOR_MAX_STRING, "%s/%s", cmor_input_path, szTable);
- table_file = fopen(word, "r");
- }
- if (table_file == NULL) {
- snprintf(word, CMOR_MAX_STRING, "%s/share/%s", CMOR_PREFIX, szTable);
- table_file = fopen(word, "r");
- }
- if (table_file == NULL) {
- snprintf(word, CMOR_MAX_STRING, "Could not find file: %s", szTable);
- cmor_handle_error(word, CMOR_NORMAL);
- cmor_ntables -= 1;
- cmor_pop_traceback();
- return (TABLE_ERROR);
- }
- }
+ table_file = fopen(szTable, "r");
+ if (table_file == NULL) {
+ if (szTable[0] != '/') {
+ snprintf(word, CMOR_MAX_STRING, "%s/%s", cmor_input_path, szTable);
+ table_file = fopen(word, "r");
+ }
+ if (table_file == NULL) {
+ snprintf(word, CMOR_MAX_STRING, "%s/share/%s", CMOR_PREFIX,
+ szTable);
+ table_file = fopen(word, "r");
+ }
+ if (table_file == NULL) {
+ snprintf(word, CMOR_MAX_STRING, "Could not find file: %s", szTable);
+ cmor_handle_error(word, CMOR_NORMAL);
+ cmor_ntables -= 1;
+ cmor_pop_traceback();
+ return (TABLE_ERROR);
+ }
+ }
/* -------------------------------------------------------------------- */
/* ok now we need to store the md5 */
/* -------------------------------------------------------------------- */
- cmor_md5( table_file, cmor_tables[cmor_ntables].md5 );
-
+ cmor_md5(table_file, cmor_tables[cmor_ntables].md5);
+
/* -------------------------------------------------------------------- */
/* Read the entire table in memory */
/* -------------------------------------------------------------------- */
- fseek(table_file,0,SEEK_END);
- nTableSize = ftell( table_file );
- rewind( table_file );
- buffer = (char *) malloc( sizeof(char) * (nTableSize + 1) );
- read_size = fread( buffer, sizeof(char), nTableSize, table_file );
+ fseek(table_file, 0, SEEK_END);
+ nTableSize = ftell(table_file);
+ rewind(table_file);
+ buffer = (char *)malloc(sizeof(char) * (nTableSize + 1));
+ read_size = fread(buffer, sizeof(char), nTableSize, table_file);
buffer[nTableSize] = '\0';
/* -------------------------------------------------------------------- */
/* print errror and exist if not a JSON file */
/* -------------------------------------------------------------------- */
- if(buffer[0]!= '{') {
+ if (buffer[0] != '{') {
free(buffer);
- buffer=NULL;
- snprintf( msg, CMOR_MAX_STRING,
- "Could not understand file \"%s\" Is this a JSON CMOR table?",
- szTable );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_ntables--;
- cmor_pop_traceback( );
- return(TABLE_ERROR);
+ buffer = NULL;
+ snprintf(msg, CMOR_MAX_STRING,
+ "Could not understand file \"%s\" Is this a JSON CMOR table?",
+ szTable);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_ntables--;
+ cmor_pop_traceback();
+ return (TABLE_ERROR);
}
/* -------------------------------------------------------------------- */
/* print error and exit if file was not completely read */
/* -------------------------------------------------------------------- */
- if( nTableSize != read_size ) {
+ if (nTableSize != read_size) {
free(buffer);
- buffer=NULL;
- snprintf( msg, CMOR_MAX_STRING,
- "Could not read file %s check file permission",
- word );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_ntables--;
- cmor_pop_traceback( );
- return(TABLE_ERROR);
+ buffer = NULL;
+ snprintf(msg, CMOR_MAX_STRING,
+ "Could not read file %s check file permission", word);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_ntables--;
+ cmor_pop_traceback();
+ return (TABLE_ERROR);
}
/* -------------------------------------------------------------------- */
-/* parse buffer into json object */
+/* parse buffer into json object */
/* -------------------------------------------------------------------- */
json_obj = json_tokener_parse(buffer);
- if( json_obj == NULL ){
- snprintf( msg, CMOR_MAX_STRING,
- "Please validate JSON File!\n"
- "USE: http://jsonlint.com/\n"
- "Syntax Error in table: %s\n "
- "%s",szTable, buffer );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (json_obj == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Please validate JSON File!\n"
+ "USE: http://jsonlint.com/\n"
+ "Syntax Error in table: %s\n " "%s", szTable, buffer);
+ cmor_handle_error(msg, CMOR_CRITICAL);
cmor_pop_traceback();
- return(TABLE_ERROR);
+ return (TABLE_ERROR);
}
json_object_object_foreach(json_obj, key, value) {
-
- if( key[0] == '#') {
+ if (key[0] == '#') {
continue;
}
- if( value == NULL) {
- return(TABLE_ERROR);
+ if (value == 0) {
+ return (TABLE_ERROR);
}
strcpy(szVal, json_object_get_string(value));
/* -------------------------------------------------------------------- */
/* Now let's see what we found */
/* -------------------------------------------------------------------- */
- if( strcmp( key, JSON_KEY_HEADER ) == 0 ) {
+ if (strcmp(key, JSON_KEY_HEADER) == 0) {
/* -------------------------------------------------------------------- */
/* Fill up all global attributer found in header section */
/* -------------------------------------------------------------------- */
json_object_object_foreach(value, key, globalAttr) {
- if( key[0] == '#') {
+ if (key[0] == '#') {
continue;
}
- if( globalAttr == NULL) {
- return(TABLE_ERROR);
+ if (globalAttr == NULL) {
+ return (TABLE_ERROR);
}
strcpy(szVal, json_object_get_string(globalAttr));
- if( cmor_set_dataset_att( &cmor_tables[cmor_ntables], key,
- szVal ) == 1 ) {
+ if (cmor_set_dataset_att(&cmor_tables[cmor_ntables], key,
+ szVal) == 1) {
cmor_pop_traceback();
- return(TABLE_ERROR);
+ return (TABLE_ERROR);
}
}
- done=1;
+ done = 1;
- } else if( strcmp( key, JSON_KEY_EXPERIMENT ) == 0 ){
+ } else if (strcmp(key, JSON_KEY_EXPERIMENT) == 0) {
json_object_object_foreach(value, shortname, experiment) {
- if( shortname[0] == '#') {
+ if (shortname[0] == '#') {
continue;
}
- if( experiment == NULL) {
- return(TABLE_ERROR);
+ if (experiment == NULL) {
+ return (TABLE_ERROR);
}
strcpy(szVal, json_object_get_string(experiment));
- if( cmor_set_experiments( &cmor_tables[cmor_ntables],
- shortname,
- szVal ) == 1 ) {
- cmor_pop_traceback( );
- return(TABLE_ERROR);
+ if (cmor_set_experiments(&cmor_tables[cmor_ntables],
+ shortname, szVal) == 1) {
+ cmor_pop_traceback();
+ return (TABLE_ERROR);
}
}
- done=1;
+ done = 1;
} else if (strcmp(key, JSON_KEY_AXIS_ENTRY) == 0) {
json_object_object_foreach(value, axisname, attributes) {
-
- if( axisname[0] == '#') {
+ if (axisname[0] == '#') {
continue;
}
- if( attributes == NULL) {
- return(TABLE_ERROR);
- }
- if( cmor_set_axis_entry(&cmor_tables[cmor_ntables],
- axisname,
- attributes) == 1) {
+ if (attributes == NULL) {
+ return (TABLE_ERROR);
+ }
+ if (cmor_set_axis_entry(&cmor_tables[cmor_ntables],
+ axisname, attributes) == 1) {
cmor_pop_traceback();
return (TABLE_ERROR);
}
}
- done=1;
- } else if( strcmp( key, JSON_KEY_VARIABLE_ENTRY ) == 0 ) {
+ done = 1;
+ } else if (strcmp(key, JSON_KEY_VARIABLE_ENTRY) == 0) {
json_object_object_foreach(value, varname, attributes) {
-
- if( varname[0] == '#') {
+ if (varname[0] == '#') {
continue;
}
- if( attributes == NULL) {
- return(TABLE_ERROR);
+ if (attributes == NULL) {
+ return (TABLE_ERROR);
}
- if( cmor_set_variable_entry(&cmor_tables[cmor_ntables],
- varname,
- attributes) == 1) {
+ if (cmor_set_variable_entry(&cmor_tables[cmor_ntables],
+ varname, attributes) == 1) {
cmor_pop_traceback();
return (TABLE_ERROR);
}
}
- done=1;
- } else if( strncmp( key, JSON_KEY_CV_ENTRY,2) == 0 ) {
+ done = 1;
+ } else if (strncmp(key, JSON_KEY_CV_ENTRY, 2) == 0) {
- if( cmor_CV_set_entry(&cmor_tables[cmor_ntables], value) == 1 ) {
+ if (cmor_CV_set_entry(&cmor_tables[cmor_ntables], value) == 1) {
cmor_pop_traceback();
return (TABLE_ERROR);
- }
- done=1;
+ }
+ done = 1;
- } else if( strcmp( key, JSON_KEY_MAPPING_ENTRY ) == 0 ) {
+ } else if (strcmp(key, JSON_KEY_MAPPING_ENTRY) == 0) {
/* -------------------------------------------------------------------- */
/* Work on mapping entries */
/* -------------------------------------------------------------------- */
- cmor_tables[cmor_ntables].nmappings++;
+ cmor_tables[cmor_ntables].nmappings++;
if (cmor_tables[cmor_ntables].nmappings >= CMOR_MAX_ELEMENTS) {
snprintf(msg, CMOR_MAX_STRING,
- "Too many mappings defined for table: %s",
- cmor_tables[cmor_ntables].szTable_id);
+ "Too many mappings defined for table: %s",
+ cmor_tables[cmor_ntables].szTable_id);
cmor_handle_error(msg, CMOR_CRITICAL);
cmor_ntables--;
cmor_pop_traceback();
@@ -816,11 +808,11 @@ int cmor_load_table_internal( char szTable[CMOR_MAX_STRING], int *table_id) {
}
json_object_object_foreach(value, mapname, jsonValue) {
- if( mapname[0] == '#') {
+ if (mapname[0] == '#') {
continue;
}
- if( mapname == NULL) {
- return(TABLE_ERROR);
+ if (mapname == NULL) {
+ return (TABLE_ERROR);
}
char szLastMapID[CMOR_MAX_STRING];
@@ -839,72 +831,72 @@ int cmor_load_table_internal( char szTable[CMOR_MAX_STRING], int *table_id) {
if (strcmp(szLastMapID, szCurrMapID) == 0) {
snprintf(msg, CMOR_MAX_STRING,
- "mapping: %s already defined within this table (%s)",
- cmor_tables[cmor_ntables].mappings[n].id,
- cmor_tables[cmor_ntables].szTable_id);
+ "mapping: %s already defined within this table (%s)",
+ cmor_tables[cmor_ntables].mappings[n].id,
+ cmor_tables[cmor_ntables].szTable_id);
cmor_handle_error(msg, CMOR_CRITICAL);
};
}
/* -------------------------------------------------------------------- */
/* init the variable def */
/* -------------------------------------------------------------------- */
- cmor_init_grid_mapping(&psCurrCmorTable->mappings[nMap], mapname);
- json_object_object_foreach(jsonValue, key, mappar)
- {
+ cmor_init_grid_mapping(&psCurrCmorTable->mappings[nMap],
+ mapname);
+ json_object_object_foreach(jsonValue, key, mappar) {
- if( key[0] == '#') {
+ if (key[0] == '#') {
continue;
}
- if( mapname == NULL) {
- return(TABLE_ERROR);
+ if (mapname == NULL) {
+ return (TABLE_ERROR);
}
char param[CMOR_MAX_STRING];
strcpy(param, json_object_get_string(mappar));
- cmor_set_mapping_attribute(
- &psCurrCmorTable->mappings[psCurrCmorTable->nmappings],
- key, param);
+ cmor_set_mapping_attribute(&psCurrCmorTable->
+ mappings[psCurrCmorTable->
+ nmappings], key, param);
}
}
done = 1;
- } else {
+ } else {
/* -------------------------------------------------------------------- */
/* nothing known we will not be setting any attributes! */
/* -------------------------------------------------------------------- */
-
- snprintf( msg, CMOR_MAX_STRING,
- "unknown section: %s, for table: %s", key,
- cmor_tables[cmor_ntables].szTable_id );
- cmor_handle_error( msg, CMOR_WARNING );
- }
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "unknown section: %s, for table: %s", key,
+ cmor_tables[cmor_ntables].szTable_id);
+ cmor_handle_error(msg, CMOR_WARNING);
+ }
/* -------------------------------------------------------------------- */
/* First check for table/dataset mode values */
/* -------------------------------------------------------------------- */
- if ( done == 1 ){
+ if (done == 1) {
done = 0;
} else {
- snprintf( msg, CMOR_MAX_STRING,
- "attribute for unknown section: %s,%s (table: %s)",
- key, szVal, cmor_tables[cmor_ntables].szTable_id );
- cmor_handle_error( msg, CMOR_WARNING );
+ snprintf(msg, CMOR_MAX_STRING,
+ "attribute for unknown section: %s,%s (table: %s)",
+ key, szVal, cmor_tables[cmor_ntables].szTable_id);
+ cmor_handle_error(msg, CMOR_WARNING);
/*printf("attribute for unknown section\n"); */
}
}
*table_id = cmor_ntables;
CMOR_TABLE = cmor_ntables;
- if(table_file != NULL) {
+ if (table_file != NULL) {
fclose(table_file);
- table_file=NULL;
+ table_file = NULL;
}
- cmor_pop_traceback( );
+ cmor_pop_traceback();
free(buffer);
json_object_put(json_obj);
- return(TABLE_SUCCESS);
+ return (TABLE_SUCCESS);
}
diff --git a/Src/cmor_variables.c b/Src/cmor_variables.c
index 62219bf..e882306 100644
--- a/Src/cmor_variables.c
+++ b/Src/cmor_variables.c
@@ -12,362 +12,370 @@ float fvalue;
/************************************************************************/
/* cmor_is_required_variable_attribute() */
/************************************************************************/
-int cmor_is_required_variable_attribute( cmor_var_def_t var,
- char *attribute_name ) {
+int cmor_is_required_variable_attribute(cmor_var_def_t var,
+ char *attribute_name)
+{
char astr[CMOR_MAX_STRING];
int i, j;
- if( var.required[0] == '\0' ) {
- return( 1 );
+ if (var.required[0] == '\0') {
+ return (1);
}
i = 0;
astr[0] = '\0';
j = 0;
- while( var.required[i] != '\0' ) {
+ while (var.required[i] != '\0') {
- while( ( var.required[i] != ' ' ) && ( var.required[i] != '\0' ) ) {
- astr[j] = var.required[i];
- i += 1;
- j += 1;
- }
+ while ((var.required[i] != ' ') && (var.required[i] != '\0')) {
+ astr[j] = var.required[i];
+ i += 1;
+ j += 1;
+ }
- astr[j] = '\0';
+ astr[j] = '\0';
- if( strncmp( astr, attribute_name, CMOR_MAX_STRING ) == 0 ) {
- return( 0 );
- }
+ if (strncmp(astr, attribute_name, CMOR_MAX_STRING) == 0) {
+ return (0);
+ }
- j = 0;
- astr[0] = '\0';
- while( var.required[i] == ' ' ) {
- i += 1;
- }
+ j = 0;
+ astr[0] = '\0';
+ while (var.required[i] == ' ') {
+ i += 1;
+ }
}
- return( 1 );
+ return (1);
}
+
/************************************************************************/
/* cmor_has_required_variable_attributes() */
/************************************************************************/
-int cmor_has_required_variable_attributes( int var_id ) {
+int cmor_has_required_variable_attributes(int var_id)
+{
extern cmor_var_t cmor_vars[];
char astr[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
int i, j;
cmor_var_def_t var;
- cmor_table_t *pTable;
+ cmor_table_t *pTable;
- cmor_add_traceback( "cmor_has_required_variable_attributes" );
+ cmor_add_traceback("cmor_has_required_variable_attributes");
pTable = &cmor_tables[cmor_vars[var_id].ref_table_id];
var = pTable->vars[cmor_vars[var_id].ref_var_id];
- if( var.required[0] == '\0' ) {
- cmor_pop_traceback( );
- return( 0 );
+ if (var.required[0] == '\0') {
+ cmor_pop_traceback();
+ return (0);
}
i = 0;
astr[0] = '\0';
j = 0;
- while( var.required[i] != '\0' ) {
- while( ( var.required[i] != ' ' ) && ( var.required[i] != '\0' ) ) {
- astr[j] = var.required[i];
- i += 1;
- j += 1;
- }
+ while (var.required[i] != '\0') {
+ while ((var.required[i] != ' ') && (var.required[i] != '\0')) {
+ astr[j] = var.required[i];
+ i += 1;
+ j += 1;
+ }
- astr[j] = '\0';
+ astr[j] = '\0';
- if( cmor_has_variable_attribute( var_id, astr ) != 0 ) {
+ if (cmor_has_variable_attribute(var_id, astr) != 0) {
- snprintf( msg, CMOR_MAX_STRING,
- "variable %s (table %s) does not have required "
- "attribute: %s",
- cmor_vars[var_id].id,
- pTable->szTable_id,
- astr );
+ snprintf(msg, CMOR_MAX_STRING,
+ "variable %s (table %s) does not have required "
+ "attribute: %s",
+ cmor_vars[var_id].id, pTable->szTable_id, astr);
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return( -1 );
- }
+ cmor_handle_error_var(msg, CMOR_NORMAL, var_id);
+ cmor_pop_traceback();
+ return (-1);
+ }
- j = 0;
- astr[0] = '\0';
+ j = 0;
+ astr[0] = '\0';
- while( var.required[i] == ' ' )
- i += 1;
+ while (var.required[i] == ' ')
+ i += 1;
}
- cmor_pop_traceback( );
- return( 0 );
-
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_set_variable_attribute_internal() */
/************************************************************************/
-int cmor_set_variable_attribute_internal( int id, char *attribute_name,
- char type, void *value ) {
+int cmor_set_variable_attribute_internal(int id, char *attribute_name,
+ char type, void *value)
+{
extern cmor_var_t cmor_vars[];
int i, index;
char msg[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_set_variable_attribute_internal" );
+ cmor_add_traceback("cmor_set_variable_attribute_internal");
- cmor_is_setup( );
+ cmor_is_setup();
index = -1;
- cmor_trim_string( attribute_name, msg );
-
- for (i = 0; i < cmor_vars[id].nattributes; i++) {
- if (strcmp(cmor_vars[id].attributes[i], msg) == 0) {
- index = i;
- break;
- }
- }
- if (index == -1) {
- index = cmor_vars[id].nattributes;
- cmor_vars[id].nattributes += 1;
- }
+ cmor_trim_string(attribute_name, msg);
+
+ for (i = 0; i < cmor_vars[id].nattributes; i++) {
+ if (strcmp(cmor_vars[id].attributes[i], msg) == 0) {
+ index = i;
+ break;
+ }
+ }
+ if (index == -1) {
+ index = cmor_vars[id].nattributes;
+ cmor_vars[id].nattributes += 1;
+ }
/*stores the name */
- strncpy( cmor_vars[id].attributes[index], msg, CMOR_MAX_STRING );
+ strncpy(cmor_vars[id].attributes[index], msg, CMOR_MAX_STRING);
cmor_vars[id].attributes_type[index] = type;
- if (type == 'c') {
-
- if (strlen(value) > 0) {
- strncpytrim(cmor_vars[id].attributes_values_char[index], value,
- CMOR_MAX_STRING);
- } else {
- strcpy(cmor_vars[id].attributes[index], "");
- }
-
- } else if (type == 'f') {
-
- cmor_vars[id].attributes_values_num[index] = (double) *(float *) value;
- } else if (type == 'i') {
-
- cmor_vars[id].attributes_values_num[index] = (double) *(int *) value;
- } else if (type == 'd') {
-
- cmor_vars[id].attributes_values_num[index] = (double) *(double *) value;
- } else if (type == 'l') {
-
- cmor_vars[id].attributes_values_num[index] = (double) *(long *) value;
- } else {
- snprintf(msg, CMOR_MAX_STRING,
- "unknown type %c for attribute %s of variable %s "
- "(table %s),allowed types are c,i,l,f,d", type,
- attribute_name, cmor_vars[id].id,
- cmor_tables[cmor_vars[id].ref_table_id].szTable_id);
- cmor_handle_error(msg, CMOR_NORMAL);
- cmor_pop_traceback();
- return (1);
- }
- cmor_pop_traceback();
- return (0);
+ if (type == 'c') {
+
+ if (strlen(value) > 0) {
+ strncpytrim(cmor_vars[id].attributes_values_char[index], value,
+ CMOR_MAX_STRING);
+ } else {
+ strcpy(cmor_vars[id].attributes[index], "");
+ }
+
+ } else if (type == 'f') {
+
+ cmor_vars[id].attributes_values_num[index] = (double)*(float *)value;
+ } else if (type == 'i') {
+
+ cmor_vars[id].attributes_values_num[index] = (double)*(int *)value;
+ } else if (type == 'd') {
+
+ cmor_vars[id].attributes_values_num[index] = (double)*(double *)value;
+ } else if (type == 'l') {
+
+ cmor_vars[id].attributes_values_num[index] = (double)*(long *)value;
+ } else {
+ snprintf(msg, CMOR_MAX_STRING,
+ "unknown type %c for attribute %s of variable %s "
+ "(table %s),allowed types are c,i,l,f,d", type,
+ attribute_name, cmor_vars[id].id,
+ cmor_tables[cmor_vars[id].ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_NORMAL, id);
+ cmor_pop_traceback();
+ return (1);
+ }
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_set_variable_attribute() */
/************************************************************************/
-int cmor_set_variable_attribute( int id, char *attribute_name, char type,
- void *value ) {
+int cmor_set_variable_attribute(int id, char *attribute_name, char type,
+ void *value)
+{
char msg[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_set_variable_attribute" );
+ cmor_add_traceback("cmor_set_variable_attribute");
/* -------------------------------------------------------------------- */
/* First of all we need to see if it is not one of the args */
/* you can set by calling cmor_variable */
/* -------------------------------------------------------------------- */
- if( ( strcmp( attribute_name, VARIABLE_ATT_UNITS ) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_MISSINGVALUES ) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_FILLVAL) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_STANDARDNAME) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_LONGNAME) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_FLAGVALUES ) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_FLAGMEANING ) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_COMMENT ) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_HISTORY ) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_ORIGINALNAME ) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_ORIGINALUNITS ) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_POSITIVE) == 0 ) ||
- ( strcmp( attribute_name, VARIABLE_ATT_CELLMETHODS ) == 0 ) ) {
- snprintf( msg, CMOR_MAX_STRING,
- "variable attribute %s (vor variable %s, table %s) must be set via a call to cmor_variable or it is automatically set via the tables",
- attribute_name, cmor_vars[id].id,
- cmor_tables[cmor_vars[id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return( 1 );
+ if ((strcmp(attribute_name, VARIABLE_ATT_UNITS) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_MISSINGVALUES) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_FILLVAL) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_STANDARDNAME) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_LONGNAME) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_FLAGVALUES) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_FLAGMEANING) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_COMMENT) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_HISTORY) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_ORIGINALNAME) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_ORIGINALUNITS) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_POSITIVE) == 0) ||
+ (strcmp(attribute_name, VARIABLE_ATT_CELLMETHODS) == 0)) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "variable attribute %s (vor variable %s, table %s) must be set via a call to cmor_variable or it is automatically set via the tables",
+ attribute_name, cmor_vars[id].id,
+ cmor_tables[cmor_vars[id].ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_NORMAL, id);
+ cmor_pop_traceback();
+ return (1);
}
/* -------------------------------------------------------------------- */
/* Before setting the attribute we need to see if the variable */
/* has been initialized */
/* -------------------------------------------------------------------- */
- if( cmor_vars[id].initialized != -1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "attribute %s on variable %s (table %s) will probably not be set as the variable has already been created into the output NetCDF file, please place this call BEFORE any cal to cmor_write",
- attribute_name, cmor_vars[id].id,
- cmor_tables[cmor_vars[id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return( 1 );
- }
- cmor_pop_traceback( );
- return( cmor_set_variable_attribute_internal( id, attribute_name, type,
- value ));
+ if (cmor_vars[id].initialized != -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "attribute %s on variable %s (table %s) will probably not be set as the variable has already been created into the output NetCDF file, please place this call BEFORE any cal to cmor_write",
+ attribute_name, cmor_vars[id].id,
+ cmor_tables[cmor_vars[id].ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_NORMAL, id);
+ cmor_pop_traceback();
+ return (1);
+ }
+ cmor_pop_traceback();
+ return (cmor_set_variable_attribute_internal(id, attribute_name, type,
+ value));
}
+
/************************************************************************/
/* cmor_get_variable_attribute() */
/************************************************************************/
-int cmor_get_variable_attribute( int id, char *attribute_name,
- void *value ) {
+int cmor_get_variable_attribute(int id, char *attribute_name, void *value)
+{
extern cmor_var_t cmor_vars[];
int i, index;
char msg[CMOR_MAX_STRING];
char type;
- cmor_add_traceback( "cmor_get_variable_attribute" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_get_variable_attribute");
+ cmor_is_setup();
index = -1;
- for( i = 0; i < cmor_vars[id].nattributes; i++ ) {
- if( strcmp( cmor_vars[id].attributes[i], attribute_name ) == 0 ) {
- index = i;
- break;
- } /* we found it */
- }
- if( index == -1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Attribute %s could not be found for variable %i (%s, table: %s)",
- attribute_name, id, cmor_vars[id].id,
- cmor_tables[cmor_vars[id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return( 1 );
+ for (i = 0; i < cmor_vars[id].nattributes; i++) {
+ if (strcmp(cmor_vars[id].attributes[i], attribute_name) == 0) {
+ index = i;
+ break;
+ } /* we found it */
+ }
+ if (index == -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Attribute %s could not be found for variable %i (%s, table: %s)",
+ attribute_name, id, cmor_vars[id].id,
+ cmor_tables[cmor_vars[id].ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_NORMAL, id);
+ cmor_pop_traceback();
+ return (1);
}
type = cmor_vars[id].attributes_type[i];
- if( type == 'c' )
- strncpy( value, cmor_vars[id].attributes_values_char[index],
- CMOR_MAX_STRING );
- else if( type == 'f' )
- *(float *)value = (float) cmor_vars[id].attributes_values_num[index];
- else if( type == 'i' )
- *(int *) value = (int) cmor_vars[id].attributes_values_num[index];
- else if( type == 'l' )
- *(long*) value = (long) cmor_vars[id].attributes_values_num[index];
+ if (type == 'c')
+ strncpy(value, cmor_vars[id].attributes_values_char[index],
+ CMOR_MAX_STRING);
+ else if (type == 'f')
+ *(float *)value = (float)cmor_vars[id].attributes_values_num[index];
+ else if (type == 'i')
+ *(int *)value = (int)cmor_vars[id].attributes_values_num[index];
+ else if (type == 'l')
+ *(long *)value = (long)cmor_vars[id].attributes_values_num[index];
else
- *(double *)value = (double) cmor_vars[id].attributes_values_num[index];
- cmor_pop_traceback( );
- return( 0 );
+ *(double *)value = (double)cmor_vars[id].attributes_values_num[index];
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_has_variable_attribute() */
/************************************************************************/
-int cmor_has_variable_attribute( int id, char *attribute_name ) {
+int cmor_has_variable_attribute(int id, char *attribute_name)
+{
extern cmor_var_t cmor_vars[];
int i, index;
char type;
char msg[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_has_variable_attribute" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_has_variable_attribute");
+ cmor_is_setup();
index = -1;
- for( i = 0; i < cmor_vars[id].nattributes; i++ ) {
- if( strcmp( cmor_vars[id].attributes[i], attribute_name ) == 0 ) {
- index = i;
- break;
- }
+ for (i = 0; i < cmor_vars[id].nattributes; i++) {
+ if (strcmp(cmor_vars[id].attributes[i], attribute_name) == 0) {
+ index = i;
+ break;
+ }
}
- if( ( index == -1 ) || strlen( attribute_name ) == 0 ) {
- cmor_pop_traceback( );
- return( 1 );
+ if ((index == -1) || strlen(attribute_name) == 0) {
+ cmor_pop_traceback();
+ return (1);
}
i = 0;
/* if it is empty we assume not defined */
- cmor_get_variable_attribute_type( id, attribute_name, &type );
- if( type == 'c' ) {
- cmor_get_variable_attribute( id, attribute_name, msg );
- if( strlen( msg ) == 0 ) {
- /* empty string attribute has been deleted */
- i = 1;
- }
- }
- cmor_pop_traceback( );
- return( i );
+ cmor_get_variable_attribute_type(id, attribute_name, &type);
+ if (type == 'c') {
+ cmor_get_variable_attribute(id, attribute_name, msg);
+ if (strlen(msg) == 0) {
+ /* empty string attribute has been deleted */
+ i = 1;
+ }
+ }
+ cmor_pop_traceback();
+ return (i);
}
+
/************************************************************************/
/* cmor_get_variable_attribute_names() */
/************************************************************************/
-int cmor_get_variable_attribute_names( int id, int *nattributes,
- char
- attributes_names[]
- [CMOR_MAX_STRING] ) {
+int cmor_get_variable_attribute_names(int id, int *nattributes,
+ char attributes_names[]
+ [CMOR_MAX_STRING])
+{
extern cmor_var_t cmor_vars[];
int i;
- cmor_add_traceback( "cmor_get_variable_attribute_names" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_get_variable_attribute_names");
+ cmor_is_setup();
*nattributes = cmor_vars[id].nattributes;
- for( i = 0; i < cmor_vars[id].nattributes; i++ ) {
- strncpy( attributes_names[i], cmor_vars[id].attributes[i],
- CMOR_MAX_STRING );
+ for (i = 0; i < cmor_vars[id].nattributes; i++) {
+ strncpy(attributes_names[i], cmor_vars[id].attributes[i],
+ CMOR_MAX_STRING);
}
- cmor_pop_traceback( );
- return( 0 );
+ cmor_pop_traceback();
+ return (0);
}
+
/************************************************************************/
/* cmor_get_variable_attribute_type() */
/************************************************************************/
-int cmor_get_variable_attribute_type( int id,
- char *attribute_name, char *type ) {
+int cmor_get_variable_attribute_type(int id, char *attribute_name, char *type)
+{
extern cmor_var_t cmor_vars[];
int i, index;
char msg[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_get_variable_attribute_type" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_get_variable_attribute_type");
+ cmor_is_setup();
index = -1;
- for( i = 0; i < cmor_vars[id].nattributes; i++ ) {
- if( strcmp( cmor_vars[id].attributes[i], attribute_name ) == 0 ) {
- index = i;
- break;
- }
+ for (i = 0; i < cmor_vars[id].nattributes; i++) {
+ if (strcmp(cmor_vars[id].attributes[i], attribute_name) == 0) {
+ index = i;
+ break;
+ }
}
- if( index == -1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Attribute %s could not be found for variable %i (%s, table: %s)",
- attribute_name, id, cmor_vars[id].id,
- cmor_tables[cmor_vars[id].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_NORMAL );
- cmor_pop_traceback( );
- return( 1 );
+ if (index == -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Attribute %s could not be found for variable %i (%s, table: %s)",
+ attribute_name, id, cmor_vars[id].id,
+ cmor_tables[cmor_vars[id].ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_NORMAL, id);
+ cmor_pop_traceback();
+ return (1);
}
*type = cmor_vars[id].attributes_type[i];
- cmor_pop_traceback( );
- return( 0 );
+ cmor_pop_traceback();
+ return (0);
}
+
/************************************************************************/
/* cmor_zfactor() */
/************************************************************************/
-int cmor_zfactor( int *zvar_id, int axis_id, char *name, char *units,
- int ndims, int axes_ids[], char type, void *values,
- void *bounds ) {
+int cmor_zfactor(int *zvar_id, int axis_id, char *name, char *units,
+ int ndims, int axes_ids[], char type, void *values,
+ void *bounds)
+{
extern int cmor_nvars;
extern cmor_var_t cmor_vars[];
@@ -383,588 +391,574 @@ int cmor_zfactor( int *zvar_id, int axis_id, char *name, char *units,
char local_unit[CMOR_MAX_STRING];
double tmp;
- cmor_add_traceback( "cmor_zfactor" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_zfactor");
+ cmor_is_setup();
/* -------------------------------------------------------------------- */
/* first check if we need to convert values */
/* -------------------------------------------------------------------- */
- if( cmor_axes[axis_id].hybrid_out == cmor_axes[axis_id].hybrid_in ) {
+ if (cmor_axes[axis_id].hybrid_out == cmor_axes[axis_id].hybrid_in) {
/* -------------------------------------------------------------------- */
/* no it's a normal hybrid, no conv */
/* -------------------------------------------------------------------- */
- i = cmor_variable( &var_id, name, units, ndims, axes_ids, type,
- NULL, NULL, NULL, NULL, NULL, NULL );
- cmor_vars[var_id].needsinit = 0;
- cmor_vars[var_id].zaxis = axis_id;
- if( values != NULL ) {
- n = 1;
- for( i = 0; i < ndims; i++ ) {
- if( axes_ids[i] > -1 ) {
- n *= cmor_axes[axes_ids[i]].length;
- } else {
+ i = cmor_variable(&var_id, name, units, ndims, axes_ids, type,
+ NULL, NULL, NULL, NULL, NULL, NULL);
+ cmor_vars[var_id].needsinit = 0;
+ cmor_vars[var_id].zaxis = axis_id;
+ if (values != NULL) {
+ n = 1;
+ for (i = 0; i < ndims; i++) {
+ if (axes_ids[i] > -1) {
+ n *= cmor_axes[axes_ids[i]].length;
+ } else {
/* -------------------------------------------------------------------- */
/* ok irregular grid */
/* -------------------------------------------------------------------- */
- gid = -axes_ids[i] - CMOR_MAX_GRIDS;
- for( j = 0; j < cmor_grids[gid].ndims; j++ ) {
- n *= cmor_axes[cmor_grids[gid].axes_ids[j]].length;
- }
- }
- }
- cmor_vars[var_id].values = malloc( n * sizeof ( double ) );
- if( cmor_vars[var_id].values == NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "cmor_zfactor: zaxis %s, cannot allocate "
- "memory for %i double elts %s var '%s' (table: %s)",
- cmor_axes[axis_id].id, n, cmor_vars[var_id].id,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- for( i = 0; i < n; i++ ) {
- if( type == 'd' ) {
- cmor_vars[var_id].values[i] =
- ( double ) ( ( double * ) values )[i];
- }
- else if( type == 'f' ) {
- cmor_vars[var_id].values[i] =
- ( double ) ( ( float * ) values )[i];
- }
- else if( type == 'l' ) {
- cmor_vars[var_id].values[i] =
- ( double ) ( ( long * ) values )[i];
- }
- else if( type == 'i' ) {
- cmor_vars[var_id].values[i] =
- ( double ) ( ( int * ) values )[i];
- }
- }
+ gid = -axes_ids[i] - CMOR_MAX_GRIDS;
+ for (j = 0; j < cmor_grids[gid].ndims; j++) {
+ n *= cmor_axes[cmor_grids[gid].axes_ids[j]].length;
+ }
+ }
+ }
+ cmor_vars[var_id].values = malloc(n * sizeof(double));
+ if (cmor_vars[var_id].values == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "cmor_zfactor: zaxis %s, cannot allocate "
+ "memory for %i double elts %s var '%s' (table: %s)",
+ cmor_axes[axis_id].id, n, cmor_vars[var_id].id,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+
+ for (i = 0; i < n; i++) {
+ if (type == 'd') {
+ cmor_vars[var_id].values[i] = (double)((double *)values)[i];
+ } else if (type == 'f') {
+ cmor_vars[var_id].values[i] = (double)((float *)values)[i];
+ } else if (type == 'l') {
+ cmor_vars[var_id].values[i] = (double)((long *)values)[i];
+ } else if (type == 'i') {
+ cmor_vars[var_id].values[i] = (double)((int *)values)[i];
+ }
+ }
/* -------------------------------------------------------------------- */
/* ok we may need to convert to some decent untis */
/* -------------------------------------------------------------------- */
- strncpy( local_unit, cmor_vars[var_id].ounits,
- CMOR_MAX_STRING );
- cmor_units = ut_parse( ut_read, local_unit, UT_ASCII );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error parsing units: %s, zaxis: "
- "%s, variable %s (table: %s)",
- local_unit, cmor_axes[axis_id].id,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- strncpy( local_unit, units, CMOR_MAX_STRING );
- ut_trim( local_unit, UT_ASCII );
- user_units = ut_parse( ut_read, local_unit, UT_ASCII );
- if( ut_get_status( ) != UT_SUCCESS ) {
-
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error parsing units: %s, zaxis %s, "
- "variable %s (table: %s)",
- local_unit, cmor_axes[axis_id].id,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
-
- }
-
- ut_cmor_converter = ut_get_converter( user_units, cmor_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error getting converter from %s to %s, "
- "zaxis: %s, variable %s (table: %s)",
- units, cmor_vars[var_id].ounits,
- cmor_axes[axis_id].id, cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- cv_convert_doubles( ut_cmor_converter,
- &cmor_vars[var_id].values[0], n,
- &cmor_vars[var_id].values[0] );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error with converter (from %s to %s), zaxis: %s, variable %s (table: %s)",
- units, cmor_vars[var_id].ounits,
- cmor_axes[axis_id].id, cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- cv_free( ut_cmor_converter );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing converter, zaxis %s, variable %s (table: %s)",
- cmor_axes[axis_id].id, cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- ut_free( cmor_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units %s, zaxis %s, variable %s (table: %s)",
- cmor_vars[var_id].ounits, cmor_axes[axis_id].id,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- ut_free( user_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units %s, zaxis %s,variable %s (table: %s)",
- units, cmor_axes[axis_id].id,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- cmor_vars[var_id].itype = 'd';
- *zvar_id = var_id;
- } else {
- /* Ok let's check to make sure it has a time axis! */
- int k = 0;
- for( i = 0; i < ndims; i++ ) {
- if( axes_ids[i] > -1 ) {
- if( cmor_axes[axes_ids[i]].axis == 'T' ) {
- k = 1;
- break;
- }
- } else {
- /* ok irregular grid */
- gid = -axes_ids[i] - CMOR_MAX_GRIDS;
- for( j = 0; j < cmor_grids[gid].ndims; j++ ) {
- if( cmor_axes[cmor_grids[gid].axes_ids[j]].axis ==
- 'T' ) {
- k = 1;
- break;
- }
- }
- }
- }
-
- if( k == 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "zfactor: axis %s, variable %s (table %s), is "
- "not time dependent and you did not provide "
- "any values",
- cmor_axes[axis_id].id, name,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- *zvar_id = var_id;
- }
- if( bounds != NULL ) {
- if( ndims != 1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "zfactor axis %s, variable %s (table: %s): you "
- "passed bounds values but you also declared %i "
- "dimensions, we will ignore you bounds",
- cmor_axes[axis_id].id, name,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id, ndims );
- cmor_handle_error( msg, CMOR_WARNING );
- } else {
- strncpy( msg, name, CMOR_MAX_STRING );
- strncat( msg, "_bnds", CMOR_MAX_STRING - strlen( msg ) );
- i = cmor_variable( &var_id, msg, units, ndims, axes_ids,
- 'd', NULL, NULL, NULL, NULL, NULL,
- NULL );
- cmor_vars[var_id].zaxis = axis_id;
- cmor_vars[var_id].needsinit = 0;
- n = cmor_axes[axes_ids[0]].length;
- cmor_vars[var_id].values = malloc( 2 * n * sizeof ( double ) );
- if( cmor_vars[var_id].values == NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "cmor_zfactor: zaxis %s, cannot allocate "
- "memory for %i double bounds elts %s var '%s' "
- "(table: %s)",
- cmor_axes[axis_id].id, 2 * n,
- cmor_vars[var_id].id, cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- cmor_vars[var_id].isbounds = 1;
- for( i = 0; i < n; i++ ) {
-
- if( type == 'd' ) {
- cmor_vars[var_id].values[2 * i] =
- ( double ) ( ( double * ) bounds )[i];
- cmor_vars[var_id].values[2 * i + 1] =
- ( double ) ( ( double * ) bounds )[i + 1];
-
- } else if( type == 'f' ) {
-
- cmor_vars[var_id].values[2 * i] =
- ( double ) ( ( float * ) bounds )[i];
- cmor_vars[var_id].values[2 * i + 1] =
- ( double ) ( ( float * ) bounds )[i + 1]
- ;
- } else if( type == 'l' ) {
-
- cmor_vars[var_id].values[2 * i] =
- ( double ) ( ( long * ) bounds )[i];
- cmor_vars[var_id].values[2 * i + 1] =
- ( double ) ( ( long * ) bounds )[i + 1];
-
- } else if( type == 'i' ) {
-
- cmor_vars[var_id].values[2 * i] =
- ( double ) ( ( int * ) bounds )[i];
- cmor_vars[var_id].values[2 * i + 1] =
- ( double ) ( ( int * ) bounds )[i + 1];
-
- }
- }
- /* ok we may need to convert to some decent untis */
- strncpy( local_unit, cmor_vars[var_id].ounits,
- CMOR_MAX_STRING );
-
- cmor_units = ut_parse( ut_read, local_unit, UT_ASCII );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error parsing units: %s, for zaxis %s, variable %s (table: %s)",
- local_unit, cmor_axes[axis_id].id,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
-
- cmor_handle_error( msg, CMOR_CRITICAL );
-
- }
-
- strncpy( local_unit, units, CMOR_MAX_STRING );
- ut_trim( local_unit, UT_ASCII );
-
- user_units = ut_parse( ut_read, local_unit, UT_ASCII );
- if( ut_get_status( ) != UT_SUCCESS ) {
-
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error parsing units: %s, zaxis %s, variable %s (table: %s)",
- local_unit, cmor_axes[axis_id].id,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
-
- }
- ut_cmor_converter = ut_get_converter( user_units, cmor_units );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
-
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error getting converter from %s to %s, zaxis %s, variable %s (table: %s)",
- units, cmor_vars[var_id].ounits,
- cmor_axes[axis_id].id, cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
-
- }
- cv_convert_doubles( ut_cmor_converter,
- &cmor_vars[var_id].values[0], 2 * n,
- &cmor_vars[var_id].values[0] );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
-
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error converting units from %s to %s, zaxis %s, variable %s (table: %s)",
- units, cmor_vars[var_id].ounits,
- cmor_axes[axis_id].id, cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
-
- }
-
- cv_free( ut_cmor_converter );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
+ strncpy(local_unit, cmor_vars[var_id].ounits, CMOR_MAX_STRING);
+ cmor_units = ut_parse(ut_read, local_unit, UT_ASCII);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error parsing units: %s, zaxis: "
+ "%s, variable %s (table: %s)",
+ local_unit, cmor_axes[axis_id].id,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+
+ strncpy(local_unit, units, CMOR_MAX_STRING);
+ ut_trim(local_unit, UT_ASCII);
+ user_units = ut_parse(ut_read, local_unit, UT_ASCII);
+ if (ut_get_status() != UT_SUCCESS) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error parsing units: %s, zaxis %s, "
+ "variable %s (table: %s)",
+ local_unit, cmor_axes[axis_id].id,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+
+ }
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing converter, zaxis %s, "
- "variable %s (table: %s)",
- cmor_axes[axis_id].id, cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ ut_cmor_converter = ut_get_converter(user_units, cmor_units);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error getting converter from %s to %s, "
+ "zaxis: %s, variable %s (table: %s)",
+ units, cmor_vars[var_id].ounits,
+ cmor_axes[axis_id].id, cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
- }
+ cv_convert_doubles(ut_cmor_converter,
+ &cmor_vars[var_id].values[0], n,
+ &cmor_vars[var_id].values[0]);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error with converter (from %s to %s), zaxis: %s, variable %s (table: %s)",
+ units, cmor_vars[var_id].ounits,
+ cmor_axes[axis_id].id, cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
- ut_free( cmor_units );
+ cv_free(ut_cmor_converter);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing converter, zaxis %s, variable %s (table: %s)",
+ cmor_axes[axis_id].id, cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
- if( ut_get_status( ) != UT_SUCCESS ) {
-
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing cmor units %s, zaxis "
- "%s, variable %s (table: %s)",
- cmor_vars[var_id].ounits,
- cmor_axes[axis_id].id, cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ ut_free(cmor_units);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units %s, zaxis %s, variable %s (table: %s)",
+ cmor_vars[var_id].ounits, cmor_axes[axis_id].id,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
- }
+ ut_free(user_units);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units %s, zaxis %s,variable %s (table: %s)",
+ units, cmor_axes[axis_id].id,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
- ut_free( user_units );
+ cmor_vars[var_id].itype = 'd';
+ *zvar_id = var_id;
+ } else {
+ /* Ok let's check to make sure it has a time axis! */
+ int k = 0;
+ for (i = 0; i < ndims; i++) {
+ if (axes_ids[i] > -1) {
+ if (cmor_axes[axes_ids[i]].axis == 'T') {
+ k = 1;
+ break;
+ }
+ } else {
+ /* ok irregular grid */
+ gid = -axes_ids[i] - CMOR_MAX_GRIDS;
+ for (j = 0; j < cmor_grids[gid].ndims; j++) {
+ if (cmor_axes[cmor_grids[gid].axes_ids[j]].axis == 'T') {
+ k = 1;
+ break;
+ }
+ }
+ }
+ }
+
+ if (k == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "zfactor: axis %s, variable %s (table %s), is "
+ "not time dependent and you did not provide "
+ "any values",
+ cmor_axes[axis_id].id, name,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+ *zvar_id = var_id;
+ }
+ if (bounds != NULL) {
+ if (ndims != 1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "zfactor axis %s, variable %s (table: %s): you "
+ "passed bounds values but you also declared %i "
+ "dimensions, we will ignore you bounds",
+ cmor_axes[axis_id].id, name,
+ cmor_tables[cmor_vars[var_id].ref_table_id].szTable_id,
+ ndims);
+ cmor_handle_error(msg, CMOR_WARNING);
+ } else {
+ strncpy(msg, name, CMOR_MAX_STRING);
+ strncat(msg, "_bnds", CMOR_MAX_STRING - strlen(msg));
+ i = cmor_variable(&var_id, msg, units, ndims, axes_ids,
+ 'd', NULL, NULL, NULL, NULL, NULL, NULL);
+ cmor_vars[var_id].zaxis = axis_id;
+ cmor_vars[var_id].needsinit = 0;
+ n = cmor_axes[axes_ids[0]].length;
+ cmor_vars[var_id].values = malloc(2 * n * sizeof(double));
+ if (cmor_vars[var_id].values == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "cmor_zfactor: zaxis %s, cannot allocate "
+ "memory for %i double bounds elts %s var '%s' "
+ "(table: %s)",
+ cmor_axes[axis_id].id, 2 * n,
+ cmor_vars[var_id].id, cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+ }
+
+ cmor_vars[var_id].isbounds = 1;
+ for (i = 0; i < n; i++) {
+
+ if (type == 'd') {
+ cmor_vars[var_id].values[2 * i] =
+ (double)((double *)bounds)[i];
+ cmor_vars[var_id].values[2 * i + 1] =
+ (double)((double *)bounds)[i + 1];
+
+ } else if (type == 'f') {
+
+ cmor_vars[var_id].values[2 * i] =
+ (double)((float *)bounds)[i];
+ cmor_vars[var_id].values[2 * i + 1] =
+ (double)((float *)bounds)[i + 1];
+ } else if (type == 'l') {
+
+ cmor_vars[var_id].values[2 * i] =
+ (double)((long *)bounds)[i];
+ cmor_vars[var_id].values[2 * i + 1] =
+ (double)((long *)bounds)[i + 1];
+
+ } else if (type == 'i') {
+
+ cmor_vars[var_id].values[2 * i] =
+ (double)((int *)bounds)[i];
+ cmor_vars[var_id].values[2 * i + 1] =
+ (double)((int *)bounds)[i + 1];
+
+ }
+ }
+ /* ok we may need to convert to some decent untis */
+ strncpy(local_unit, cmor_vars[var_id].ounits, CMOR_MAX_STRING);
+
+ cmor_units = ut_parse(ut_read, local_unit, UT_ASCII);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error parsing units: %s, for zaxis %s, variable %s (table: %s)",
+ local_unit, cmor_axes[axis_id].id,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+
+ }
+
+ strncpy(local_unit, units, CMOR_MAX_STRING);
+ ut_trim(local_unit, UT_ASCII);
+
+ user_units = ut_parse(ut_read, local_unit, UT_ASCII);
+ if (ut_get_status() != UT_SUCCESS) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error parsing units: %s, zaxis %s, variable %s (table: %s)",
+ local_unit, cmor_axes[axis_id].id,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+
+ }
+ ut_cmor_converter = ut_get_converter(user_units, cmor_units);
+
+ if (ut_get_status() != UT_SUCCESS) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error getting converter from %s to %s, zaxis %s, variable %s (table: %s)",
+ units, cmor_vars[var_id].ounits,
+ cmor_axes[axis_id].id, cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+
+ }
+ cv_convert_doubles(ut_cmor_converter,
+ &cmor_vars[var_id].values[0], 2 * n,
+ &cmor_vars[var_id].values[0]);
+
+ if (ut_get_status() != UT_SUCCESS) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error converting units from %s to %s, zaxis %s, variable %s (table: %s)",
+ units, cmor_vars[var_id].ounits,
+ cmor_axes[axis_id].id, cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+
+ }
+
+ cv_free(ut_cmor_converter);
- if( ut_get_status( ) != UT_SUCCESS ) {
+ if (ut_get_status() != UT_SUCCESS) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units %s, zaxis %s, "
- "variable %s (table: %s)",
- units, cmor_axes[axis_id].id,
- cmor_vars[var_id].id,
- cmor_tables[cmor_vars[var_id].ref_table_id].
- szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing converter, zaxis %s, "
+ "variable %s (table: %s)",
+ cmor_axes[axis_id].id, cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
- }
+ }
- }
- }
+ ut_free(cmor_units);
+
+ if (ut_get_status() != UT_SUCCESS) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing cmor units %s, zaxis "
+ "%s, variable %s (table: %s)",
+ cmor_vars[var_id].ounits,
+ cmor_axes[axis_id].id, cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+
+ }
+
+ ut_free(user_units);
+
+ if (ut_get_status() != UT_SUCCESS) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units %s, zaxis %s, "
+ "variable %s (table: %s)",
+ units, cmor_axes[axis_id].id,
+ cmor_vars[var_id].id,
+ cmor_tables[cmor_vars[var_id].
+ ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
+
+ }
+
+ }
+ }
} else {
- /* first prepare the conversion thing */
-
- /* stores the original hybrid_in to put back later */
- i = cmor_axes[axis_id].hybrid_in;
- cmor_axes[axis_id].hybrid_in = cmor_axes[axis_id].hybrid_out;
- /* ok we now have 3 possible case */
- if( i == 1 ) {
- n = cmor_zfactor( zvar_id, axis_id, name, units, ndims,
- axes_ids, type, values, bounds );
- /* case alternate hybrid sigma */
- } else if( i == 2 ) {
-
- if( strcmp( name, "ap" ) == 0 ) {
- /* creates the p0 */
- tmp = ( double ) 1.e5;
- j = cmor_zfactor( zvar_id, axis_id, "p0", "Pa", 0, NULL,
- 'd', &tmp, NULL );
- /* creates the "a" */
-
- n = cmor_zfactor( zvar_id, axis_id, "a", "", ndims, axes_ids,
- type, values, bounds ); /* ok redefined it as a "a" factor */
-
- /* ok we need to change the values now */
- /* first convert p0 to user units */
- cmor_units = ut_parse( ut_read, "Pa", UT_ASCII );
- strncpy( local_unit, units, CMOR_MAX_STRING );
- ut_trim( local_unit, UT_ASCII );
- user_units = ut_parse( ut_read, local_unit, UT_ASCII );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error parsing user units: %s, "
- "zaxis %s (table: %s), when creating "
- "zfactor: %s",
- local_unit, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, name );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- if( ut_are_convertible( cmor_units, user_units ) == 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunuits: Pa and user units (%s) are "
- "incompatible, zaxis %s (table: %s), when "
- "creating zfactor: %s",
- units, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, name );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
- }
- ut_cmor_converter =
- ut_get_converter( cmor_units, user_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error getting converter from Pa "
- "to %s,variable %s (table %s), when creating "
- "zfactor: %s",
- units, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, name );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- tmp = ( double ) 1.e5;
- tmp = cv_convert_double( ut_cmor_converter, tmp );
- /* free units thing */
- if( ut_get_status( ) != UT_SUCCESS ) {
-
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error converting units from Pa "
- "to %s, zaxis %s (table: %s), when creating "
- "zfactor: %s",
- local_unit, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, name );
- cmor_handle_error( msg, CMOR_CRITICAL );
-
- }
- cv_free( ut_cmor_converter );
- if( ut_get_status( ) != UT_SUCCESS ) {
-
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing converter, zaxis %s "
- "(table: %s), when creating zfactor: %s",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, name );
- cmor_handle_error( msg, CMOR_CRITICAL );
-
- }
-
- ut_free( cmor_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
-
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units Pa, zaxis: %s "
- "(table: %s), when creating zfactor: %s",
- cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, name );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- ut_free( user_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
-
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units %s, zaxis %s "
- "(table: %s), when creating zfactor: %s",
- local_unit, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, name );
- cmor_handle_error( msg, CMOR_CRITICAL );
-
- }
-
- if( values != NULL ) {
- n = cmor_axes[axes_ids[0]].length;
- for( j = 0; j < n; j++ )
- cmor_vars[*zvar_id].values[j] /= tmp;
- }
- if( bounds != NULL ) {
-
- k = -1;
- for( n = 0; n <= cmor_nvars; n++ )
- if( ( strcmp( cmor_vars[n].id, "a_bnds" ) == 0 )
- && ( cmor_vars[n].zaxis == axis_id ) ) {
- k = n;
- break;
- }
-
- n = cmor_axes[axes_ids[0]].length;
- for( j = 0; j < 2 * n; j++ )
- cmor_vars[k].values[j] /= tmp;
- }
- } else {
- n = cmor_zfactor( zvar_id, axis_id, name, units, ndims,
- axes_ids, type, values, bounds );
- }
+ /* first prepare the conversion thing */
+
+ /* stores the original hybrid_in to put back later */
+ i = cmor_axes[axis_id].hybrid_in;
+ cmor_axes[axis_id].hybrid_in = cmor_axes[axis_id].hybrid_out;
+ /* ok we now have 3 possible case */
+ if (i == 1) {
+ n = cmor_zfactor(zvar_id, axis_id, name, units, ndims,
+ axes_ids, type, values, bounds);
+ /* case alternate hybrid sigma */
+ } else if (i == 2) {
+
+ if (strcmp(name, "ap") == 0) {
+ /* creates the p0 */
+ tmp = (double)1.e5;
+ j = cmor_zfactor(zvar_id, axis_id, "p0", "Pa", 0, NULL,
+ 'd', &tmp, NULL);
+ /* creates the "a" */
+
+ n = cmor_zfactor(zvar_id, axis_id, "a", "", ndims, axes_ids, type, values, bounds); /* ok redefined it as a "a" factor */
+
+ /* ok we need to change the values now */
+ /* first convert p0 to user units */
+ cmor_units = ut_parse(ut_read, "Pa", UT_ASCII);
+ strncpy(local_unit, units, CMOR_MAX_STRING);
+ ut_trim(local_unit, UT_ASCII);
+ user_units = ut_parse(ut_read, local_unit, UT_ASCII);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error parsing user units: %s, "
+ "zaxis %s (table: %s), when creating "
+ "zfactor: %s",
+ local_unit, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].szTable_id, name);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ if (ut_are_convertible(cmor_units, user_units) == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunuits: Pa and user units (%s) are "
+ "incompatible, zaxis %s (table: %s), when "
+ "creating zfactor: %s",
+ units, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].szTable_id, name);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ ut_cmor_converter = ut_get_converter(cmor_units, user_units);
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error getting converter from Pa "
+ "to %s,variable %s (table %s), when creating "
+ "zfactor: %s",
+ units, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].szTable_id, name);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ tmp = (double)1.e5;
+ tmp = cv_convert_double(ut_cmor_converter, tmp);
+ /* free units thing */
+ if (ut_get_status() != UT_SUCCESS) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error converting units from Pa "
+ "to %s, zaxis %s (table: %s), when creating "
+ "zfactor: %s",
+ local_unit, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].szTable_id, name);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+
+ }
+ cv_free(ut_cmor_converter);
+ if (ut_get_status() != UT_SUCCESS) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing converter, zaxis %s "
+ "(table: %s), when creating zfactor: %s",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].szTable_id, name);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+
+ }
+
+ ut_free(cmor_units);
+ if (ut_get_status() != UT_SUCCESS) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units Pa, zaxis: %s "
+ "(table: %s), when creating zfactor: %s",
+ cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].szTable_id, name);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ ut_free(user_units);
+ if (ut_get_status() != UT_SUCCESS) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units %s, zaxis %s "
+ "(table: %s), when creating zfactor: %s",
+ local_unit, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].szTable_id, name);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+
+ }
+
+ if (values != NULL) {
+ n = cmor_axes[axes_ids[0]].length;
+ for (j = 0; j < n; j++)
+ cmor_vars[*zvar_id].values[j] /= tmp;
+ }
+ if (bounds != NULL) {
+
+ k = -1;
+ for (n = 0; n <= cmor_nvars; n++)
+ if ((strcmp(cmor_vars[n].id, "a_bnds") == 0)
+ && (cmor_vars[n].zaxis == axis_id)) {
+ k = n;
+ break;
+ }
+
+ n = cmor_axes[axes_ids[0]].length;
+ for (j = 0; j < 2 * n; j++)
+ cmor_vars[k].values[j] /= tmp;
+ }
+ } else {
+ n = cmor_zfactor(zvar_id, axis_id, name, units, ndims,
+ axes_ids, type, values, bounds);
+ }
/* atmosphere_sigma_coordinates case */
- } else if( i == 3 ) {
- if( strcmp( name, "sigma" ) == 0 ) {
-
- /*ok first we need to make sure we created the ptop */
- j = -1;
- for( n = 0; n <= cmor_nvars; n++ ) {
- if( ( strcmp( cmor_vars[n].id, "ptop" ) == 0 )
- && ( cmor_vars[n].zaxis == axis_id ) ) {
- j = n;
- break;
- }
- }
-
- if( j == -1 ) { /* we did not find the ztop! */
- snprintf( msg, CMOR_MAX_STRING,
- "zfactor variable \"ptop\" for zfactor axis: "
- "%i (%s, table: %s), is not defined when "
- "creating zfactor %s, please define ptop first",
- axis_id, cmor_axes[axis_id].id,
- cmor_tables[cmor_axes[axis_id].ref_table_id].
- szTable_id, name );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- tmp = ( double ) 1.e5;
-
- /* creates the p0 */
-
- n = cmor_zfactor( zvar_id, axis_id, "p0", "Pa", 0, NULL,
- 'd', &tmp, NULL );
-
- tmp = cmor_vars[j].values[0]; /* stores ptop (in Pa) */
-
- /* creates the "a" */
+ } else if (i == 3) {
+ if (strcmp(name, "sigma") == 0) {
+
+ /*ok first we need to make sure we created the ptop */
+ j = -1;
+ for (n = 0; n <= cmor_nvars; n++) {
+ if ((strcmp(cmor_vars[n].id, "ptop") == 0)
+ && (cmor_vars[n].zaxis == axis_id)) {
+ j = n;
+ break;
+ }
+ }
+
+ if (j == -1) { /* we did not find the ztop! */
+ snprintf(msg, CMOR_MAX_STRING,
+ "zfactor variable \"ptop\" for zfactor axis: "
+ "%i (%s, table: %s), is not defined when "
+ "creating zfactor %s, please define ptop first",
+ axis_id, cmor_axes[axis_id].id,
+ cmor_tables[cmor_axes[axis_id].
+ ref_table_id].szTable_id, name);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ tmp = (double)1.e5;
+
+ /* creates the p0 */
+
+ n = cmor_zfactor(zvar_id, axis_id, "p0", "Pa", 0, NULL,
+ 'd', &tmp, NULL);
+
+ tmp = cmor_vars[j].values[0]; /* stores ptop (in Pa) */
+
+ /* creates the "a" */
/* ok redefined it as a "a" factor */
- n = cmor_zfactor( zvar_id, axis_id, "a", "", ndims,
- axes_ids, type, values, bounds );
-
- if( values != NULL ) {
- n = cmor_axes[axes_ids[0]].length;
- for( j = 0; j < n; j++ )
- cmor_vars[*zvar_id].values[j] =
- ( 1. -
- cmor_vars[*zvar_id].values[j] ) * tmp / 1.e5;
- }
-
- if( bounds != NULL ) {
- k = -1;
- for( n = 0; n <= cmor_nvars; n++ )
- if( ( strcmp( cmor_vars[n].id, "a_bnds" ) == 0 )
- && ( cmor_vars[n].zaxis == axis_id ) ) {
- k = n;
- break;
- }
-
- n = cmor_axes[axes_ids[0]].length;
- for( j = 0; j < 2 * n; j++ )
- cmor_vars[k].values[j] /= tmp;
- }
-
- /* creates the "b" */
- n = cmor_zfactor( zvar_id, axis_id, "b", "", ndims, axes_ids, type, values, bounds ); /* ok redefined it as a "a" factor */
- } else
- n = cmor_zfactor( zvar_id, axis_id, name, units, ndims,
- axes_ids, type, values, bounds );
- }
-
- /* put back input type */
- cmor_axes[axis_id].hybrid_in = i;
-
- }
- cmor_pop_traceback( );
- return( 0 );
+ n = cmor_zfactor(zvar_id, axis_id, "a", "", ndims,
+ axes_ids, type, values, bounds);
+
+ if (values != NULL) {
+ n = cmor_axes[axes_ids[0]].length;
+ for (j = 0; j < n; j++)
+ cmor_vars[*zvar_id].values[j] =
+ (1. - cmor_vars[*zvar_id].values[j]) * tmp / 1.e5;
+ }
+
+ if (bounds != NULL) {
+ k = -1;
+ for (n = 0; n <= cmor_nvars; n++)
+ if ((strcmp(cmor_vars[n].id, "a_bnds") == 0)
+ && (cmor_vars[n].zaxis == axis_id)) {
+ k = n;
+ break;
+ }
+
+ n = cmor_axes[axes_ids[0]].length;
+ for (j = 0; j < 2 * n; j++)
+ cmor_vars[k].values[j] /= tmp;
+ }
+
+ /* creates the "b" */
+ n = cmor_zfactor(zvar_id, axis_id, "b", "", ndims, axes_ids, type, values, bounds); /* ok redefined it as a "a" factor */
+ } else
+ n = cmor_zfactor(zvar_id, axis_id, name, units, ndims,
+ axes_ids, type, values, bounds);
+ }
+
+ /* put back input type */
+ cmor_axes[axis_id].hybrid_in = i;
+
+ }
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_update_history() */
/************************************************************************/
-int cmor_update_history(int var_id, char *add) {
+int cmor_update_history(int var_id, char *add)
+{
struct tm *ptr;
time_t lt;
char date[CMOR_MAX_STRING];
@@ -975,8 +969,8 @@ int cmor_update_history(int var_id, char *add) {
lt = time(NULL);
ptr = gmtime(<);
snprintf(date, CMOR_MAX_STRING, "%.4i-%.2i-%.2iT%.2i:%.2i:%.2iZ",
- ptr->tm_year + 1900, ptr->tm_mon + 1, ptr->tm_mday, ptr->tm_hour,
- ptr->tm_min, ptr->tm_sec);
+ ptr->tm_year + 1900, ptr->tm_mon + 1, ptr->tm_mday, ptr->tm_hour,
+ ptr->tm_min, ptr->tm_sec);
if (cmor_has_variable_attribute(var_id, "history") == 0) {
@@ -987,35 +981,39 @@ int cmor_update_history(int var_id, char *add) {
tmp[0] = '\0';
}
- snprintf( tmp2, CMOR_MAX_STRING, "%s %s altered by CMOR: %s.",
- tmp, date, add );
+ snprintf(tmp2, CMOR_MAX_STRING, "%s %s altered by CMOR: %s.",
+ tmp, date, add);
cmor_set_variable_attribute_internal(var_id, "history", 'c', tmp2);
cmor_pop_traceback();
return (0);
}
+
/************************************************************************/
/* cmor_history_contains() */
/************************************************************************/
-int cmor_history_contains( int var_id, char *add ) {
+int cmor_history_contains(int var_id, char *add)
+{
char tmp[CMOR_MAX_STRING];
- if( cmor_has_variable_attribute( var_id, "history" ) == 0 ) {
- cmor_get_variable_attribute( var_id, "history", &tmp[0] );
- if( cmor_stringinstring( tmp, add ) ) {
- return( 1 );
- }
+ if (cmor_has_variable_attribute(var_id, "history") == 0) {
+ cmor_get_variable_attribute(var_id, "history", &tmp[0]);
+ if (cmor_stringinstring(tmp, add)) {
+ return (1);
+ }
}
- return( 0 );
+ return (0);
}
+
/************************************************************************/
/* cmor_variable() */
/************************************************************************/
-int cmor_variable( int *var_id, char *name, char *units, int ndims,
- int axes_ids[], char type, void *missing,
- double *tolerance, char *positive, char *original_name,
- char *history, char *comment ) {
+int cmor_variable(int *var_id, char *name, char *units, int ndims,
+ int axes_ids[], char type, void *missing,
+ double *tolerance, char *positive, char *original_name,
+ char *history, char *comment)
+{
extern int cmor_nvars, cmor_naxes;
extern int CMOR_TABLE;
@@ -1031,20 +1029,19 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
int aint;
long along;
int did_grid_reorder = 0;
- int vrid=-1;
+ int vrid = -1;
- cmor_add_traceback( "cmor_variable" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_variable");
+ cmor_is_setup();
- if( CMOR_TABLE == -1 ) {
- cmor_handle_error( "You did not define a table yet!",
- CMOR_CRITICAL );
+ if (CMOR_TABLE == -1) {
+ cmor_handle_error("You did not define a table yet!", CMOR_CRITICAL);
}
- if( cmor_nvars == CMOR_MAX_VARIABLES - 1 ) {
- cmor_handle_error( "Too many variables defined", CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
+ if (cmor_nvars == CMOR_MAX_VARIABLES - 1) {
+ cmor_handle_error("Too many variables defined", CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
}
/* -------------------------------------------------------------------- */
@@ -1052,30 +1049,29 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
/* found then error */
/* -------------------------------------------------------------------- */
iref = -1;
- cmor_trim_string( name, ctmp );
- for( i = 0; i < cmor_tables[CMOR_TABLE].nvars + 1; i++ ) {
- if( strcmp( cmor_tables[CMOR_TABLE].vars[i].id, ctmp ) == 0 ) {
- iref = i;
- break;
- }
+ cmor_trim_string(name, ctmp);
+ for (i = 0; i < cmor_tables[CMOR_TABLE].nvars + 1; i++) {
+ if (strcmp(cmor_tables[CMOR_TABLE].vars[i].id, ctmp) == 0) {
+ iref = i;
+ break;
+ }
}
- if( iref == -1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Could not find a matching variable for name: '%s'",
- ctmp );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (iref == -1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Could not find a matching variable for name: '%s'", ctmp);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
refvar = cmor_tables[CMOR_TABLE].vars[iref];
- for( i = 0; i < CMOR_MAX_VARIABLES; i++ ) {
- if( cmor_vars[i].self == -1 ) {
- vrid = i;
- break;
- }
+ for (i = 0; i < CMOR_MAX_VARIABLES; i++) {
+ if (cmor_vars[i].self == -1) {
+ vrid = i;
+ break;
+ }
}
- if( vrid > cmor_nvars )
- cmor_nvars = vrid;
+ if (vrid > cmor_nvars)
+ cmor_nvars = vrid;
cmor_vars[vrid].ref_table_id = CMOR_TABLE;
cmor_vars[vrid].ref_var_id = iref;
@@ -1084,17 +1080,17 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
/* init some things */
/* -------------------------------------------------------------------- */
- strcpy( cmor_vars[vrid].suffix, "" );
- strcpy( cmor_vars[vrid].base_path, "" );
- strcpy( cmor_vars[vrid].current_path, "" );
+ strcpy(cmor_vars[vrid].suffix, "");
+ strcpy(cmor_vars[vrid].base_path, "");
+ strcpy(cmor_vars[vrid].current_path, "");
+ strcpy(cmor_vars[vrid].frequency, refvar.frequency);
cmor_vars[vrid].suffix_has_date = 0;
/* -------------------------------------------------------------------- */
/* output missing value */
/* -------------------------------------------------------------------- */
- cmor_vars[vrid].omissing =
- ( double ) cmor_tables[CMOR_TABLE].missing_value;
+ cmor_vars[vrid].omissing = (double)cmor_tables[CMOR_TABLE].missing_value;
/* -------------------------------------------------------------------- */
/* copying over values from ref var */
@@ -1116,22 +1112,22 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
}
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_STANDARDNAME, 'c',
- refvar.standard_name);
+ refvar.standard_name);
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_LONGNAME, 'c',
- refvar.long_name);
+ refvar.long_name);
if ((refvar.flag_values != NULL) && (refvar.flag_values[0] != '\0')) {
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_FLAGVALUES, 'c',
- refvar.flag_values);
+ refvar.flag_values);
}
if ((refvar.flag_meanings != NULL) && (refvar.flag_meanings[0] != '\0')) {
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_FLAGMEANINGS,
- 'c', refvar.flag_meanings);
+ 'c', refvar.flag_meanings);
}
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_COMMENT, 'c',
- refvar.comment);
+ refvar.comment);
if (strcmp(refvar.units, "?") == 0) {
strncpy(cmor_vars[vrid].ounits, units, CMOR_MAX_STRING);
@@ -1141,25 +1137,22 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
if (refvar.type != 'c') {
cmor_set_variable_attribute_internal(vrid,
- VARIABLE_ATT_UNITS,
- 'c',
- cmor_vars[vrid].ounits);
+ VARIABLE_ATT_UNITS,
+ 'c', cmor_vars[vrid].ounits);
}
strncpy(cmor_vars[vrid].iunits, units, CMOR_MAX_STRING);
if ((original_name != NULL) && (original_name[0] != '\0')) {
cmor_set_variable_attribute_internal(vrid,
- VARIABLE_ATT_ORIGINALNAME,
- 'c',
- original_name);
+ VARIABLE_ATT_ORIGINALNAME,
+ 'c', original_name);
}
if ((history != NULL) && (history[0] != '\0')) {
cmor_set_variable_attribute_internal(vrid,
- VARIABLE_ATT_HISTORY,
- 'c',
- history);
+ VARIABLE_ATT_HISTORY,
+ 'c', history);
}
if ((comment != NULL) && (comment[0] != '\0')) {
@@ -1170,8 +1163,7 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
strncpy(msg, comment, CMOR_MAX_STRING);
strncat(msg, ", ", CMOR_MAX_STRING - strlen(msg));
- strncat(msg, szActivity,
- CMOR_MAX_STRING - strlen(msg));
+ strncat(msg, szActivity, CMOR_MAX_STRING - strlen(msg));
strncat(msg, "_table_comment: ", CMOR_MAX_STRING - strlen(msg));
strncat(msg, refvar.comment, CMOR_MAX_STRING - strlen(msg));
@@ -1179,128 +1171,128 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
strncpy(msg, comment, CMOR_MAX_STRING);
}
cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_COMMENT, 'c',
- msg);
+ msg);
}
if (strcmp(units, refvar.units) != 0) {
cmor_set_variable_attribute_internal(vrid,
- VARIABLE_ATT_ORIGINALUNITS,
- 'c',
- units);
+ VARIABLE_ATT_ORIGINALUNITS,
+ 'c', units);
snprintf(msg,
- CMOR_MAX_STRING,
- "Converted units from '%s' to '%s'",
- units,
- refvar.units);
+ CMOR_MAX_STRING,
+ "Converted units from '%s' to '%s'", units, refvar.units);
cmor_update_history(vrid, msg);
}
- cmor_set_variable_attribute_internal( vrid, VARIABLE_ATT_CELLMETHODS,
- 'c',
- refvar.cell_methods );
-
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_CELLMEASURES,
- 'c',
- refvar.cell_measures );
-
- if( ( positive != NULL ) && ( positive[0] != '\0' ) ) {
- if( ( positive[0] != 'd' ) && positive[0] != 'u' ) {
- snprintf( msg, CMOR_MAX_STRING,
- "variable '%s' (table %s): unknown value for "
- "positive : %s (only first character is considered, "
- "which was: %c)",
- cmor_vars[vrid].id,
- cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id,
- positive, positive[0] );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- if( refvar.positive == 'u' ) {
- if( cmor_is_required_variable_attribute( refvar,
- VARIABLE_ATT_POSITIVE )== 0 ) {
-
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_POSITIVE, 'c', "up" );
-
- }
-
- if( positive[0] != 'u' ) {
- cmor_vars[vrid].sign = -1;
- cmor_update_history( vrid, "Changed sign" );
- }
-
- } else if( refvar.positive == 'd' ) {
- if( cmor_is_required_variable_attribute( refvar,
- VARIABLE_ATT_POSITIVE ) == 0 ) {
-
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_POSITIVE, 'c', "down" );
-
- }
- if( positive[0] != 'd' ) {
- cmor_vars[vrid].sign = -1;
- cmor_update_history( vrid, "Changed sign" );
- }
- } else {
- snprintf( msg, CMOR_MAX_STRING,
- "variable '%s' (table %s) you passed positive "
- "value:%s, but table does not mention it, will "
- "be ignored, if you really want this in your "
- "variable output use "
- "cmor_set_variable_attribute_internal function",
- cmor_vars[vrid].id,
- cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id,
- positive );
- cmor_handle_error( msg, CMOR_WARNING );
- }
+ cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_CELLMETHODS,
+ 'c', refvar.cell_methods);
+
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_CELLMEASURES,
+ 'c', refvar.cell_measures);
+
+ if ((positive != NULL) && (positive[0] != '\0')) {
+ if ((positive[0] != 'd') && positive[0] != 'u') {
+ snprintf(msg, CMOR_MAX_STRING,
+ "variable '%s' (table %s): unknown value for "
+ "positive : %s (only first character is considered, "
+ "which was: %c)",
+ cmor_vars[vrid].id,
+ cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id,
+ positive, positive[0]);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, vrid);
+ }
+
+ if (refvar.positive == 'u') {
+ if (cmor_is_required_variable_attribute(refvar,
+ VARIABLE_ATT_POSITIVE) ==
+ 0) {
+
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_POSITIVE, 'c',
+ "up");
+
+ }
+
+ if (positive[0] != 'u') {
+ cmor_vars[vrid].sign = -1;
+ cmor_update_history(vrid, "Changed sign");
+ }
+
+ } else if (refvar.positive == 'd') {
+ if (cmor_is_required_variable_attribute(refvar,
+ VARIABLE_ATT_POSITIVE) ==
+ 0) {
+
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_POSITIVE, 'c',
+ "down");
+
+ }
+ if (positive[0] != 'd') {
+ cmor_vars[vrid].sign = -1;
+ cmor_update_history(vrid, "Changed sign");
+ }
+ } else {
+ snprintf(msg, CMOR_MAX_STRING,
+ "variable '%s' (table %s) you passed positive "
+ "value:%s, but table does not mention it, will "
+ "be ignored, if you really want this in your "
+ "variable output use "
+ "cmor_set_variable_attribute_internal function",
+ cmor_vars[vrid].id,
+ cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id,
+ positive);
+ cmor_handle_error(msg, CMOR_WARNING);
+ }
} else {
- if( cmor_is_required_variable_attribute( refvar, VARIABLE_ATT_POSITIVE ) ==
- 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "you need to provide the 'positive' argument for "
- "variable: %s (table %s)",
- cmor_vars[vrid].id,
- cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- if( refvar.positive != '\0' ) {
- if( refvar.positive == 'u' ) {
- if( cmor_is_required_variable_attribute( refvar,
- VARIABLE_ATT_POSITIVE ) == 0 ) {
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_POSITIVE, 'c', "up" );
- }
-
- snprintf( msg, CMOR_MAX_STRING,
- "you did not provide the 'positive' argument "
- "for variable: %s (table %s)",
- cmor_vars[vrid].id,
- cmor_tables[cmor_vars[vrid].ref_table_id].
- szTable_id );
-
- } else if( refvar.positive == 'd' ) {
-
- if( cmor_is_required_variable_attribute( refvar,
- VARIABLE_ATT_POSITIVE ) == 0 ) {
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_POSITIVE, 'c', "down" );
- }
- snprintf( msg, CMOR_MAX_STRING,
- "you did not provide the 'positive' argument for variable: %s (table %s)",
- cmor_vars[vrid].id,
- cmor_tables[cmor_vars[vrid].ref_table_id].
- szTable_id );
- }
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (cmor_is_required_variable_attribute(refvar, VARIABLE_ATT_POSITIVE)
+ == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "you need to provide the 'positive' argument for "
+ "variable: %s (table %s)", cmor_vars[vrid].id,
+ cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, vrid);
+ }
+ if (refvar.positive != '\0') {
+ if (refvar.positive == 'u') {
+ if (cmor_is_required_variable_attribute(refvar,
+ VARIABLE_ATT_POSITIVE)
+ == 0) {
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_POSITIVE,
+ 'c', "up");
+ }
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "you did not provide the 'positive' argument "
+ "for variable: %s (table %s)",
+ cmor_vars[vrid].id,
+ cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id);
+
+ } else if (refvar.positive == 'd') {
+
+ if (cmor_is_required_variable_attribute(refvar,
+ VARIABLE_ATT_POSITIVE)
+ == 0) {
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_POSITIVE,
+ 'c', "down");
+ }
+ snprintf(msg, CMOR_MAX_STRING,
+ "you did not provide the 'positive' argument for variable: %s (table %s)",
+ cmor_vars[vrid].id,
+ cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id);
+ }
+ cmor_handle_error_var(msg, CMOR_CRITICAL, vrid);
+ }
}
/* -------------------------------------------------------------------- */
/* before anything we copy axes_ids into laxes_ids */
/* -------------------------------------------------------------------- */
- for( i = 0; i < ndims; i++ ) {
- laxes_ids[i] = axes_ids[i];
+ for (i = 0; i < ndims; i++) {
+ laxes_ids[i] = axes_ids[i];
}
/* -------------------------------------------------------------------- */
/* Now figure out if the variable ask for an axis that is */
@@ -1308,47 +1300,45 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
/* -------------------------------------------------------------------- */
k = 0;
- for( i = 0; i < refvar.ndims; i++ ) {
+ for (i = 0; i < refvar.ndims; i++) {
- for( j = 0; j < cmor_tables[cmor_vars[vrid].ref_table_id].naxes;
- j++ ) {
+ for (j = 0; j < cmor_tables[cmor_vars[vrid].ref_table_id].naxes; j++) {
- if( strcmp
- ( cmor_tables[cmor_vars[vrid].ref_table_id].
- axes[refvar.dimensions[i]].id,
- cmor_tables[cmor_vars[vrid].ref_table_id].axes[j].id ) ==
- 0 ) {
+ if (strcmp
+ (cmor_tables[cmor_vars[vrid].ref_table_id].axes
+ [refvar.dimensions[i]].id,
+ cmor_tables[cmor_vars[vrid].ref_table_id].axes[j].id) == 0) {
- if( cmor_tables[cmor_vars[vrid].ref_table_id].
- axes[refvar.dimensions[i]].must_call_cmor_grid == 1 )
- k = 1;
- break;
- }
- }
+ if (cmor_tables[cmor_vars[vrid].ref_table_id].axes
+ [refvar.dimensions[i]].must_call_cmor_grid == 1)
+ k = 1;
+ break;
+ }
+ }
}
/* -------------------------------------------------------------------- */
/* ok we MUST HAVE called cmor_grid to generate this variable */
/* let's make sure */
/* -------------------------------------------------------------------- */
- if( k == 1 ) {
- j = 0;
- for( i = 0; i < ndims; i++ ) {
- if( laxes_ids[i] < -CMOR_MAX_GRIDS + 1 ) {
- grid_id = -laxes_ids[i] - CMOR_MAX_GRIDS;
- if( grid_id > cmor_ngrids )
- continue;
- j = 1;
- }
- }
- if( j == 0 ) {
- sprintf( msg,
- "Variable %s (table %s) must be defined using a "
- "grid (a call to cmor_grid)",
- cmor_vars[vrid].id,
- cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (k == 1) {
+ j = 0;
+ for (i = 0; i < ndims; i++) {
+ if (laxes_ids[i] < -CMOR_MAX_GRIDS + 1) {
+ grid_id = -laxes_ids[i] - CMOR_MAX_GRIDS;
+ if (grid_id > cmor_ngrids)
+ continue;
+ j = 1;
+ }
+ }
+ if (j == 0) {
+ sprintf(msg,
+ "Variable %s (table %s) must be defined using a "
+ "grid (a call to cmor_grid)",
+ cmor_vars[vrid].id,
+ cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, vrid);
+ }
}
lndims = ndims;
@@ -1361,181 +1351,172 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
/* -------------------------------------------------------------------- */
/* ok we need to replace grids definitions with the grid axes */
/* -------------------------------------------------------------------- */
- for( i = 0; i < ndims; i++ ) {
- if( laxes_ids[i] > cmor_naxes ) {
- sprintf( msg,
- "For variable %s (table %s) you requested axis_id "
- "(%i) that has not been defined yet",
- cmor_vars[vrid].id,
- cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id,
- laxes_ids[i] );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- if( laxes_ids[i] < -CMOR_MAX_GRIDS + 1 ) {
- grid_id = -laxes_ids[i] - CMOR_MAX_GRIDS;
- if( grid_id > cmor_ngrids ) {
- sprintf( msg,
- "For variable %s (table: %s) you requested "
- "grid_id (%i) that has not been defined yet",
- cmor_vars[vrid].id,
- cmor_tables[cmor_vars[vrid].ref_table_id].
- szTable_id, laxes_ids[i] );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ for (i = 0; i < ndims; i++) {
+ if (laxes_ids[i] > cmor_naxes) {
+ sprintf(msg,
+ "For variable %s (table %s) you requested axis_id "
+ "(%i) that has not been defined yet",
+ cmor_vars[vrid].id,
+ cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id,
+ laxes_ids[i]);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, vrid);
+ }
+ if (laxes_ids[i] < -CMOR_MAX_GRIDS + 1) {
+ grid_id = -laxes_ids[i] - CMOR_MAX_GRIDS;
+ if (grid_id > cmor_ngrids) {
+ sprintf(msg,
+ "For variable %s (table: %s) you requested "
+ "grid_id (%i) that has not been defined yet",
+ cmor_vars[vrid].id,
+ cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id,
+ laxes_ids[i]);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, vrid);
+ }
/* -------------------------------------------------------------------- */
/* here we need to know if the refvar has been defined with */
/* lat/lon or in the grid space */
/* -------------------------------------------------------------------- */
- k = 0;
- for( j = 0; j < refvar.ndims; j++ ) {
- if( strcmp
- ( cmor_tables[refvar.table_id].
- axes[refvar.dimensions[j]].id, DIMENSION_LONGITUDE) == 0 )
- k++;
- if( strcmp
- ( cmor_tables[refvar.table_id].
- axes[refvar.dimensions[j]].id, DIMENSION_LATITUDE ) == 0 )
- k++;
- if( refvar.dimensions[j] == -CMOR_MAX_GRIDS )
- k++;
- }
+ k = 0;
+ for (j = 0; j < refvar.ndims; j++) {
+ if (strcmp
+ (cmor_tables[refvar.table_id].axes[refvar.dimensions[j]].id,
+ DIMENSION_LONGITUDE) == 0)
+ k++;
+ if (strcmp
+ (cmor_tables[refvar.table_id].axes[refvar.dimensions[j]].id,
+ DIMENSION_LATITUDE) == 0)
+ k++;
+ if (refvar.dimensions[j] == -CMOR_MAX_GRIDS)
+ k++;
+ }
/* -------------------------------------------------------------------- */
/* basically replaces the lat/lon with the number of dims in */
/* our grid */
/* -------------------------------------------------------------------- */
-
- if( k == 2 ) {
- aint = cmor_grids[grid_id].ndims - 2;
- }
- cmor_vars[vrid].grid_id = grid_id;
- k = cmor_grids[grid_id].ndims - 1;
+
+ if (k == 2) {
+ aint = cmor_grids[grid_id].ndims - 2;
+ }
+ cmor_vars[vrid].grid_id = grid_id;
+ k = cmor_grids[grid_id].ndims - 1;
/* -------------------------------------------------------------------- */
/* first move everything to the right */
/* -------------------------------------------------------------------- */
- for( j = lndims - 1; j >= i; j-- )
- laxes_ids[j + k] = laxes_ids[j];
+ for (j = lndims - 1; j >= i; j--)
+ laxes_ids[j + k] = laxes_ids[j];
/* -------------------------------------------------------------------- */
/* ok now we need to insert the grid dimensions */
/* -------------------------------------------------------------------- */
- lndims += k;
- for( j = 0; j < cmor_grids[grid_id].ndims; j++ ) {
- laxes_ids[i + j] =
- cmor_grids[grid_id].original_axes_ids[j];
- }
- }
+ lndims += k;
+ for (j = 0; j < cmor_grids[grid_id].ndims; j++) {
+ laxes_ids[i + j] = cmor_grids[grid_id].original_axes_ids[j];
+ }
+ }
}
olndims = lndims;
- if( refvar.ndims + aint != lndims ) {
- lndims = 0;
+ if (refvar.ndims + aint != lndims) {
+ lndims = 0;
/* -------------------------------------------------------------------- */
/* ok before we panic we check if there is a "dummy" dim */
/* -------------------------------------------------------------------- */
- j = refvar.ndims - olndims + aint;
- for( i = 0; i < refvar.ndims; i++ ) {
- if( cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].value !=
- 1.e20 ) {
+ j = refvar.ndims - olndims + aint;
+ for (i = 0; i < refvar.ndims; i++) {
+ if (cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].value
+ != 1.e20) {
/* -------------------------------------------------------------------- */
/* ok it could be a dummy but we need to check if the user */
/* already defined this dummy dimension or notd */
/* -------------------------------------------------------------------- */
- l = -1;
- for( k = 0; k < olndims; k++ ) {
- if( cmor_has_axis_attribute( laxes_ids[k],
- VARIABLE_ATT_STANDARDNAME ) == 0 ) {
- cmor_get_axis_attribute( laxes_ids[k],
- VARIABLE_ATT_STANDARDNAME,
- 'c',
- &msg );
- } else {
- strcpy( msg, "nope" );
- }
-
- if( strcmp
- ( msg,
- cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].
- standard_name ) == 0 ) {
+ l = -1;
+ for (k = 0; k < olndims; k++) {
+ if (cmor_has_axis_attribute(laxes_ids[k],
+ VARIABLE_ATT_STANDARDNAME) ==
+ 0) {
+ cmor_get_axis_attribute(laxes_ids[k],
+ VARIABLE_ATT_STANDARDNAME, 'c',
+ &msg);
+ } else {
+ strcpy(msg, "nope");
+ }
+
+ if (strcmp(msg,
+ cmor_tables[CMOR_TABLE].axes[refvar.
+ dimensions[i]].
+ standard_name)
+ == 0) {
/* -------------------------------------------------------------------- */
/* ok user did define this one on its own */
/* -------------------------------------------------------------------- */
- l = k;
- break;
- }
+ l = k;
+ break;
+ }
- }
+ }
/* -------------------------------------------------------------------- */
/* ok it is a singleton dimension */
/* -------------------------------------------------------------------- */
-
- if( l == -1 ) {
- j -= 1;
+
+ if (l == -1) {
+ j -= 1;
/* -------------------------------------------------------------------- */
/* ok then we create a dummy axis that we will add at the end */
/* of the axes */
/* -------------------------------------------------------------------- */
cmor_axis_def_t *pAxis;
- pAxis = &cmor_tables[CMOR_TABLE].
- axes[refvar.dimensions[i]];
-
- if( pAxis->bounds_value[0] != 1.e20 ) {
-
- cmor_axis( &k,
- pAxis->id,
- pAxis->units,
- 1,
- &pAxis->value,
- 'd',
- &pAxis->bounds_value[0],
- 2,
- "" );
-
- } else {
-
- cmor_axis(&k,
- pAxis->id,
- pAxis->units,
- 1,
- &pAxis->value,
- 'd',
- NULL,
- 0,
- "");
- }
-
- laxes_ids[olndims] = k;
- lndims += 1;
- }
-
- }
- }
-
- if( j != 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "You are defining variable '%s' (table %s) with %i "
- "dimensions, when it should have %i",
- name,
- cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id,
- ndims, refvar.ndims );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
- } else {
- lndims += ndims;
- for( j = 0; j < ndims; j++ ) {
+ pAxis = &cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]];
+
+ if (pAxis->bounds_value[0] != 1.e20) {
+
+ cmor_axis(&k,
+ pAxis->id,
+ pAxis->units,
+ 1,
+ &pAxis->value,
+ 'd', &pAxis->bounds_value[0], 2, "");
+
+ } else {
+
+ cmor_axis(&k,
+ pAxis->id,
+ pAxis->units,
+ 1, &pAxis->value, 'd', NULL, 0, "");
+ }
+
+ laxes_ids[olndims] = k;
+ lndims += 1;
+ }
+
+ }
+ }
+
+ if ((j != 0) && (j != -1)) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "You are defining variable '%s' (table %s) with %i "
+ "dimensions, when it should have %i",
+ name,
+ cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id,
+ ndims, refvar.ndims);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, vrid);
+ cmor_pop_traceback();
+ return (1);
+ } else {
+ lndims += ndims;
+ for (j = 0; j < ndims; j++) {
/* -------------------------------------------------------------------- */
/* grid definition */
/* -------------------------------------------------------------------- */
- if( axes_ids[j] < -CMOR_MAX_GRIDS + 1 ) {
- lndims += cmor_grids[grid_id].ndims - 1;
- }
- }
- }
+ if (axes_ids[j] < -CMOR_MAX_GRIDS + 1) {
+ lndims += cmor_grids[grid_id].ndims - 1;
+ }
+ }
+ }
}
/* -------------------------------------------------------------------- */
/* At that point we need to check that the dims we passed match */
@@ -1543,123 +1524,124 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
/* -------------------------------------------------------------------- */
k = -1;
- for( i = 0; i < lndims; i++ ) {
- for( j = 0; j < refvar.ndims; j++ ) {
- if( ( strcmp
- ( cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].
- axes[cmor_axes[laxes_ids[i]].ref_axis_id].id,
- cmor_tables[CMOR_TABLE].axes[refvar.dimensions[j]].
- id ) == 0 )
- ||
- ( ( cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].
- axes[cmor_axes[laxes_ids[i]].ref_axis_id].axis == 'Z' )
- && ( refvar.dimensions[j] == -2 ) ) ) {
-
- k++;
- }
- }
- if( k != i ) {
+ for (i = 0; i < lndims; i++) {
+ if (strcmp
+ (cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].axes
+ [cmor_axes[laxes_ids[i]].ref_axis_id].id,
+ AXIS_FORECAST_TIME) == 0) {
+ refvar.dimensions[lndims - 1] = cmor_axes[laxes_ids[i]].ref_axis_id;
+ refvar.ndims++;
+ k++;
+ continue;
+ }
+ for (j = 0; j < refvar.ndims; j++) {
+ if ((strcmp
+ (cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].axes
+ [cmor_axes[laxes_ids[i]].ref_axis_id].id,
+ cmor_tables[CMOR_TABLE].axes[refvar.dimensions[j]].id) == 0)
+ ||
+ ((cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].axes
+ [cmor_axes[laxes_ids[i]].ref_axis_id].axis == 'Z')
+ && (refvar.dimensions[j] == -2))) {
+
+ k++;
+ }
+ }
+ if (k != i) {
/* -------------------------------------------------------------------- */
/* ok we didn't find it, but there is still a slight chance it */
/* is a grid axis! */
/* -------------------------------------------------------------------- */
- for( j = 0; j < cmor_grids[grid_id].ndims; j++ ) {
- if( laxes_ids[i] ==
- cmor_grids[grid_id].original_axes_ids[j] )
- k++;
- }
- }
- if( k != i ) {
- snprintf( msg, CMOR_MAX_STRING,
- "You defined variable '%s' (table %s) with axis "
- "id '%s' which is not part of this variable "
- "according to your table, it says: ( ",
- refvar.id,
- cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id,
- cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].
- axes[cmor_axes[laxes_ids[i]].ref_axis_id].id );
- for( i = 0; i < refvar.ndims; i++ ) {
- strcat( msg,
- cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].
- id );
- strcat( msg, " " );
- }
- strcat( msg, ")" );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ for (j = 0; j < cmor_grids[grid_id].ndims; j++) {
+ if (laxes_ids[i] == cmor_grids[grid_id].original_axes_ids[j])
+ k++;
+ }
+ }
+ if (k != i) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "You defined variable '%s' (table %s) with axis "
+ "id '%s' which is not part of this variable "
+ "according to your table, it says: ( ",
+ refvar.id,
+ cmor_tables[cmor_vars[vrid].ref_table_id].szTable_id,
+ cmor_tables[cmor_axes[laxes_ids[i]].
+ ref_table_id].axes[cmor_axes[laxes_ids[i]].
+ ref_axis_id].id);
+ for (i = 0; i < refvar.ndims; i++) {
+ strcat(msg,
+ cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].id);
+ strcat(msg, " ");
+ }
+ strcat(msg, ")");
+ cmor_handle_error_var(msg, CMOR_CRITICAL, vrid);
+ }
}
k = 0;
/* -------------------------------------------------------------------- */
/* ok now loop thru axes */
/* -------------------------------------------------------------------- */
+ for (i = 0; i < lndims; i++) {
- for( i = 0; i < lndims; i++ ) {
-
- if( laxes_ids[i] > cmor_naxes ) {
- snprintf( msg, CMOR_MAX_STRING, "Axis %i not defined",
- axes_ids[i] );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
- }
- if( cmor_axes[laxes_ids[i]].ref_table_id != CMOR_TABLE
- && cmor_axes[laxes_ids[i]].isgridaxis != 1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "While creating variable %s, you are "
- "passing axis %i (named %s) which has been "
- "defined using table %i (%s) but the current "
- "table is %i (%s) (and isgridaxis says: %i)",
- cmor_vars[vrid].id, laxes_ids[i],
- cmor_axes[laxes_ids[i]].id,
- cmor_axes[laxes_ids[i]].ref_table_id,
- cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].
- szTable_id, CMOR_TABLE,
- cmor_tables[CMOR_TABLE].szTable_id,
- cmor_axes[laxes_ids[i]].isgridaxis );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- if( cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].
- axes[cmor_axes[laxes_ids[i]].ref_axis_id].value != 1.e20 ) {
+ if (laxes_ids[i] > cmor_naxes) {
+ snprintf(msg, CMOR_MAX_STRING, "Axis %i not defined", axes_ids[i]);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, vrid);
+ cmor_pop_traceback();
+ return (1);
+ }
+ if (cmor_axes[laxes_ids[i]].ref_table_id != CMOR_TABLE
+ && cmor_axes[laxes_ids[i]].isgridaxis != 1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "While creating variable %s, you are "
+ "passing axis %i (named %s) which has been "
+ "defined using table %i (%s) but the current "
+ "table is %i (%s) (and isgridaxis says: %i)",
+ cmor_vars[vrid].id, laxes_ids[i],
+ cmor_axes[laxes_ids[i]].id,
+ cmor_axes[laxes_ids[i]].ref_table_id,
+ cmor_tables[cmor_axes[laxes_ids[i]].
+ ref_table_id].szTable_id, CMOR_TABLE,
+ cmor_tables[CMOR_TABLE].szTable_id,
+ cmor_axes[laxes_ids[i]].isgridaxis);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, vrid);
+ }
+ if (cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].axes
+ [cmor_axes[laxes_ids[i]].ref_axis_id].value != 1.e20) {
/* -------------------------------------------------------------------- */
/* singleton dim */
/* -------------------------------------------------------------------- */
- snprintf( msg, CMOR_MAX_STRING,
- "Treated scalar dimension: '%s'",
- cmor_axes[laxes_ids[i]].id );
- cmor_update_history( vrid, msg );
- cmor_vars[vrid].singleton_ids[i - k] = laxes_ids[i];
- if( cmor_has_variable_attribute( vrid, "coordinates" ) == 0 ) {
- cmor_get_variable_attribute( vrid, "coordinates",
- &msg[0] );
- } else {
- strncpy( msg, "", CMOR_MAX_STRING );
- }
- if( cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].
- axes[cmor_axes[laxes_ids[i]].ref_axis_id].out_name[0] ==
- '\0' ) {
- snprintf( ctmp, CMOR_MAX_STRING, "%s %s", msg,
- cmor_tables[cmor_axes[laxes_ids[i]].
- ref_table_id].
- axes[cmor_axes[laxes_ids[i]].ref_axis_id].id );
- } else {
- snprintf( ctmp, CMOR_MAX_STRING, "%s %s", msg,
- cmor_tables[cmor_axes[laxes_ids[i]].
- ref_table_id].
- axes[cmor_axes[laxes_ids[i]].ref_axis_id].
- out_name );
- }
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_COORDINATES, 'c', &ctmp[0] );
-
- } else {
-
- cmor_vars[vrid].original_order[k] = laxes_ids[i];
- k++;
- }
+ snprintf(msg, CMOR_MAX_STRING,
+ "Treated scalar dimension: '%s'",
+ cmor_axes[laxes_ids[i]].id);
+ cmor_update_history(vrid, msg);
+ cmor_vars[vrid].singleton_ids[i - k] = laxes_ids[i];
+ if (cmor_has_variable_attribute(vrid, "coordinates") == 0) {
+ cmor_get_variable_attribute(vrid, "coordinates", &msg[0]);
+ } else {
+ strncpy(msg, "", CMOR_MAX_STRING);
+ }
+ if (cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].axes
+ [cmor_axes[laxes_ids[i]].ref_axis_id].out_name[0] == '\0') {
+ snprintf(ctmp, CMOR_MAX_STRING, "%s %s", msg,
+ cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].axes
+ [cmor_axes[laxes_ids[i]].ref_axis_id].id);
+ } else {
+ snprintf(ctmp, CMOR_MAX_STRING, "%s %s", msg,
+ cmor_tables[cmor_axes[laxes_ids[i]].ref_table_id].axes
+ [cmor_axes[laxes_ids[i]].ref_axis_id].out_name);
+ }
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_COORDINATES, 'c',
+ &ctmp[0]);
+
+ } else {
+
+ cmor_vars[vrid].original_order[k] = laxes_ids[i];
+ k++;
+ }
}
/* -------------------------------------------------------------------- */
/* Now figures out the real order... */
@@ -1667,69 +1649,66 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
k = 0;
- for( i = 0; i < lndims; i++ ) {
+ for (i = 0; i < lndims; i++) {
- if( ( ( strcmp
- ( cmor_tables[refvar.table_id].axes[refvar.dimensions[i]].
- id, "latitude" ) == 0 )
- ||
- ( strcmp
- ( cmor_tables[refvar.table_id].axes[refvar.dimensions[i]].
- id, "longitude" ) == 0 ) ) && ( grid_id != 1000 ) ) {
+ if (((strcmp(cmor_tables[refvar.table_id].axes[refvar.dimensions[i]].id,
+ "latitude") == 0)
+ ||
+ (strcmp
+ (cmor_tables[refvar.table_id].axes[refvar.dimensions[i]].id,
+ "longitude") == 0)) && (grid_id != 1000)) {
/* -------------------------------------------------------------------- */
/* ok we are dealing with a "grid" type of data */
/* -------------------------------------------------------------------- */
- if( did_grid_reorder != 0 )
- continue;
- for( j = 0; j < cmor_grids[grid_id].ndims; j++ ) {
- cmor_vars[vrid].axes_ids[k] =
- cmor_grids[grid_id].axes_ids[j];
- k++;
- }
- did_grid_reorder = 1;
- } else if( ( refvar.dimensions[i] == -2 ) ||
- ( cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].value == 1.e20 ) ) {
+ if (did_grid_reorder != 0)
+ continue;
+ for (j = 0; j < cmor_grids[grid_id].ndims; j++) {
+ cmor_vars[vrid].axes_ids[k] = cmor_grids[grid_id].axes_ids[j];
+ k++;
+ }
+ did_grid_reorder = 1;
+ } else if ((refvar.dimensions[i] == -2)
+ || (cmor_tables[CMOR_TABLE].axes[refvar.dimensions[i]].value
+ == 1.e20)) {
/* -------------------------------------------------------------------- */
/* not a singleton dim */
/* -------------------------------------------------------------------- */
-
- iref = -1;
- for( j = 0; j < lndims; j++ ) {
- if( ( refvar.table_id ==
- cmor_axes[laxes_ids[j]].ref_table_id )
- && ( refvar.dimensions[i] ==
- cmor_axes[laxes_ids[j]].ref_axis_id ) ) {
- cmor_vars[vrid].axes_ids[k] = laxes_ids[j];
- }
+
+ iref = -1;
+ for (j = 0; j < lndims; j++) {
+ if ((refvar.table_id == cmor_axes[laxes_ids[j]].ref_table_id)
+ && (refvar.dimensions[i]
+ == cmor_axes[laxes_ids[j]].ref_axis_id)) {
+ cmor_vars[vrid].axes_ids[k] = laxes_ids[j];
+ }
/* -------------------------------------------------------------------- */
/* -2 means it is a zaxis */
/* -------------------------------------------------------------------- */
- if( refvar.dimensions[i] == -2 ) {
- if( cmor_axes[laxes_ids[j]].axis == 'Z' )
- cmor_vars[vrid].axes_ids[i] = laxes_ids[j];
- }
- }
- k++;
- } else if( refvar.dimensions[i] == -CMOR_MAX_GRIDS ) {
+ if (refvar.dimensions[i] == -2) {
+ if (cmor_axes[laxes_ids[j]].axis == 'Z')
+ cmor_vars[vrid].axes_ids[i] = laxes_ids[j];
+ }
+ }
+ k++;
+ } else if (refvar.dimensions[i] == -CMOR_MAX_GRIDS) {
/* -------------------------------------------------------------------- */
/* ok this is either a lat/lon */
/* -------------------------------------------------------------------- */
- for( j = 0; j < ndims; j++ )
- if( axes_ids[j] < -CMOR_MAX_GRIDS + 1 )
- break;
- l = j;
- for( j = 0; j < cmor_grids[grid_id].ndims; j++ ) {
- cmor_vars[vrid].axes_ids[k] =
- cmor_grids[grid_id].axes_ids[j];
- k++;
- i++;
- }
- i--; /* one too many i adds */
- }
+ for (j = 0; j < ndims; j++)
+ if (axes_ids[j] < -CMOR_MAX_GRIDS + 1)
+ break;
+ l = j;
+ for (j = 0; j < cmor_grids[grid_id].ndims; j++) {
+ cmor_vars[vrid].axes_ids[k] = cmor_grids[grid_id].axes_ids[j];
+ k++;
+ i++;
+ }
+ i--; /* one too many i adds */
+ }
}
/* -------------------------------------------------------------------- */
@@ -1740,115 +1719,100 @@ int cmor_variable( int *var_id, char *name, char *units, int ndims,
cmor_vars[vrid].itype = type;
k = 0;
- for( i = 0; i < cmor_vars[vrid].ndims; i++ )
- if( cmor_vars[vrid].original_order[i] !=
- cmor_vars[vrid].axes_ids[i] )
- k = -1;
- if( k == -1 ) {
-
- strncpy( msg, "Reordered dimensions, original order:",
- CMOR_MAX_STRING );
- for( i = 0; i < cmor_vars[vrid].ndims; i++ ) {
- snprintf( ctmp, CMOR_MAX_STRING, " %s",
- cmor_axes[cmor_vars[vrid].original_order[i]].id );
-
- strncat( msg, ctmp, CMOR_MAX_STRING - strlen( ctmp ) );
- }
-
- cmor_update_history( vrid, msg );
- }
-
- if( refvar.type == '\0' ) {
- cmor_vars[vrid].type = 'f';
- }
- else {
- cmor_vars[vrid].type = refvar.type;
- }
-
- if( missing != NULL ) {
- cmor_vars[vrid].nomissing = 0;
- if( type == 'i' )
- cmor_vars[vrid].missing = ( double ) *( int * ) missing;
- if( type == 'l' )
- cmor_vars[vrid].missing = ( double ) *( long * ) missing;
- if( type == 'f' )
- cmor_vars[vrid].missing = ( double ) *( float * ) missing;
- if( type == 'd' )
- cmor_vars[vrid].missing = ( double ) *( double * ) missing;
- if( cmor_vars[vrid].missing != cmor_vars[vrid].omissing ) {
- snprintf( msg, CMOR_MAX_STRING,
- "replaced missing value flag (%g) with standard missing value (%g)",
- cmor_vars[vrid].missing, cmor_vars[vrid].omissing );
- cmor_update_history( vrid, msg );
- }
- }
- if( refvar.type == 'd' ) {
-
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_MISSINGVALUES,
- 'd',
- &cmor_vars[vrid].
- omissing );
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_FILLVAL,
- 'd',
- &cmor_vars[vrid].
- omissing );
-
- } else if( refvar.type == 'f' ) {
-
- afloat = ( float ) cmor_vars[vrid].omissing;
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_MISSINGVALUES,
- 'f',
- &afloat );
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_FILLVAL,
- 'f',
- &afloat );
- } else if( refvar.type == 'l' ) {
-
- along = ( long ) cmor_vars[vrid].omissing;
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_MISSINGVALUES,
- 'l',
- &along );
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_FILLVAL,
- 'l',
- &along );
-
- } else if( refvar.type == 'i' ) {
-
- aint = ( int ) cmor_vars[vrid].omissing;
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_MISSINGVALUES,
- 'i',
- &aint );
- cmor_set_variable_attribute_internal( vrid,
- VARIABLE_ATT_FILLVAL,
- 'i',
- &aint );
- }
+ for (i = 0; i < cmor_vars[vrid].ndims; i++)
+ if (cmor_vars[vrid].original_order[i] != cmor_vars[vrid].axes_ids[i])
+ k = -1;
+ if (k == -1) {
+
+ strncpy(msg, "Reordered dimensions, original order:", CMOR_MAX_STRING);
+ for (i = 0; i < cmor_vars[vrid].ndims; i++) {
+ snprintf(ctmp, CMOR_MAX_STRING, " %s",
+ cmor_axes[cmor_vars[vrid].original_order[i]].id);
+
+ strncat(msg, ctmp, CMOR_MAX_STRING - strlen(ctmp));
+ }
+
+ cmor_update_history(vrid, msg);
+ }
+
+ if (refvar.type == '\0') {
+ cmor_vars[vrid].type = 'f';
+ } else {
+ cmor_vars[vrid].type = refvar.type;
+ }
+
+ if (missing != NULL) {
+ cmor_vars[vrid].nomissing = 0;
+ if (type == 'i')
+ cmor_vars[vrid].missing = (double)*(int *)missing;
+ if (type == 'l')
+ cmor_vars[vrid].missing = (double)*(long *)missing;
+ if (type == 'f')
+ cmor_vars[vrid].missing = (double)*(float *)missing;
+ if (type == 'd')
+ cmor_vars[vrid].missing = (double)*(double *)missing;
+ if (cmor_vars[vrid].missing != cmor_vars[vrid].omissing) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "replaced missing value flag (%g) with standard missing value (%g)",
+ cmor_vars[vrid].missing, cmor_vars[vrid].omissing);
+ cmor_update_history(vrid, msg);
+ }
+ }
+ if (refvar.type == 'd') {
+
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_MISSINGVALUES,
+ 'd', &cmor_vars[vrid].omissing);
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_FILLVAL,
+ 'd', &cmor_vars[vrid].omissing);
+ } else if (refvar.type == 'f') {
+ afloat = (float)cmor_vars[vrid].omissing;
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_MISSINGVALUES,
+ 'f', &afloat);
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_FILLVAL,
+ 'f', &afloat);
+ } else if (refvar.type == 'l') {
+
+ along = (long)cmor_vars[vrid].omissing;
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_MISSINGVALUES,
+ 'l', &along);
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_FILLVAL, 'l', &along);
+
+ } else if (refvar.type == 'i') {
+
+ aint = (int)cmor_vars[vrid].omissing;
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_MISSINGVALUES,
+ 'i', &aint);
+ cmor_set_variable_attribute_internal(vrid,
+ VARIABLE_ATT_FILLVAL, 'i', &aint);
+ }
cmor_vars[vrid].tolerance = 1.e-4;
cmor_vars[vrid].self = vrid;
- if( tolerance != NULL )
- cmor_vars[vrid].tolerance = ( double ) *( double * ) tolerance;
+ if (tolerance != NULL)
+ cmor_vars[vrid].tolerance = (double)*(double *)tolerance;
*var_id = vrid;
- cmor_pop_traceback( );
- return( 0 );
+ cmor_pop_traceback();
+ return (0);
};
+
/************************************************************************/
/* cmor_init_var_def() */
/************************************************************************/
-void cmor_init_var_def( cmor_var_def_t * var, int table_id ) {
+void cmor_init_var_def(cmor_var_def_t * var, int table_id)
+{
int n;
- cmor_is_setup( );
+ cmor_is_setup();
var->table_id = table_id;
var->standard_name[0] = '\0';
var->units[0] = '\0';
@@ -1864,10 +1828,10 @@ void cmor_init_var_def( cmor_var_def_t * var, int table_id ) {
var->flag_values[0] = '\0';
var->flag_meanings[0] = '\0';
var->chunking_dimensions[0] = '\0';
- for( n = 0; n < CMOR_MAX_DIMENSIONS; n++ )
- var->dimensions[n] = -1;
+ for (n = 0; n < CMOR_MAX_DIMENSIONS; n++)
+ var->dimensions[n] = -1;
var->type = 'f';
- var->valid_min = 1.e20; /* means no check */
+ var->valid_min = 1.e20; /* means no check */
var->valid_max = 1.e20;
var->ok_min_mean_abs = 1.e20;
var->ok_max_mean_abs = 1.e20;
@@ -1875,433 +1839,434 @@ void cmor_init_var_def( cmor_var_def_t * var, int table_id ) {
var->deflate = 1;
var->deflate_level = 1;
}
+
/************************************************************************/
/* cmor_set_var_def_att() */
/************************************************************************/
-int cmor_set_var_def_att( cmor_var_def_t * var, char att[CMOR_MAX_STRING],
- char val[CMOR_MAX_STRING] ) {
+int cmor_set_var_def_att(cmor_var_def_t * var, char att[CMOR_MAX_STRING],
+ char val[CMOR_MAX_STRING])
+{
int i, n, j, n0, k;
char dim[CMOR_MAX_STRING];
char msg[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_set_var_def_att" );
- cmor_is_setup( );
- if(strcmp(val, "") == 0 ) {
+ cmor_add_traceback("cmor_set_var_def_att");
+ cmor_is_setup();
+ if (strcmp(val, "") == 0) {
cmor_pop_traceback();
- return(0);
+ return (0);
}
- if( strcmp( att, VARIABLE_ATT_REQUIRED ) == 0 ) {
+ if (strcmp(att, VARIABLE_ATT_REQUIRED) == 0) {
- strncpy( var->required, val, CMOR_MAX_STRING );
+ strncpy(var->required, val, CMOR_MAX_STRING);
- } else if( strcmp( att, VARIABLE_ATT_ID) == 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_ID) == 0) {
- strncpy( var->id, val, CMOR_MAX_STRING );
+ strncpy(var->id, val, CMOR_MAX_STRING);
- } else if( strcmp( att, VARIABLE_ATT_STANDARDNAME ) == 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_STANDARDNAME) == 0) {
- strncpy( var->standard_name, val, CMOR_MAX_STRING );
+ strncpy(var->standard_name, val, CMOR_MAX_STRING);
- } else if( strcmp( att, VARIABLE_ATT_LONGNAME ) == 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_LONGNAME) == 0) {
- strncpy( var->long_name, val, CMOR_MAX_STRING );
+ strncpy(var->long_name, val, CMOR_MAX_STRING);
- } else if( strcmp( att, VARIABLE_ATT_COMMENT) == 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_COMMENT) == 0) {
- strncpy( var->comment, val, CMOR_MAX_STRING );
+ strncpy(var->comment, val, CMOR_MAX_STRING);
- } else if( strcmp( att, VARIABLE_ATT_DIMENSIONS ) == 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_DIMENSIONS) == 0) {
- n0 = strlen( val );
- for( i = 0; i < n0; i++ ) {
+ n0 = strlen(val);
+ for (i = 0; i < n0; i++) {
- j = 0;
- while( ( i < n0 ) && ( ( val[i] != ' ' ) && val[i] != '\0' ) ) {
- dim[j] = val[i];
- j++;
- i++;
- }
+ j = 0;
+ while ((i < n0) && ((val[i] != ' ') && val[i] != '\0')) {
+ dim[j] = val[i];
+ j++;
+ i++;
+ }
- dim[j] = '\0';
+ dim[j] = '\0';
- if( var->ndims > CMOR_MAX_DIMENSIONS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Too many dimensions (%i) defined for variable "
- "(%s), max is: %i",
- var->ndims, var->id, CMOR_MAX_DIMENSIONS );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (var->ndims > CMOR_MAX_DIMENSIONS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Too many dimensions (%i) defined for variable "
+ "(%s), max is: %i", var->ndims, var->id,
+ CMOR_MAX_DIMENSIONS);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
/* -------------------------------------------------------------------- */
/* check that the dimension as been defined in the table */
/* -------------------------------------------------------------------- */
- n = -1; /* not found yet */
- for (j = 0; j <= cmor_tables[var->table_id].naxes; j++) {
- if (strcmp(dim, cmor_tables[var->table_id].axes[j].id) == 0) {
- n = j;
- break;
- }
- }
-
- if( n == -1 ) {
- j = strcmp( DIMENSION_ZLEVEL, dim );
- j *= strcmp( DIMENSION_ALEVEL, dim );
- j *= strcmp( DIMENSION_OLEVEL, dim );
- for( k = 0; k < CMOR_MAX_ELEMENTS; k++ ) {
- if( cmor_tables[var->table_id].generic_levels[k][0] ==
- '\0' )
- break;
- j *= strcmp( dim,
- cmor_tables[var->table_id].
- generic_levels[k] );
- }
-
- if( j == 0 ) {
-
- var->dimensions[var->ndims] = -2;
- } else {
- if( ( strcmp( dim, DIMENSION_LONGITUDE ) != 0 ) &&
- strcmp( dim, DIMENSION_LATITUDE ) != 0 ) {
+ n = -1; /* not found yet */
+ for (j = 0; j <= cmor_tables[var->table_id].naxes; j++) {
+ if (strcmp(dim, cmor_tables[var->table_id].axes[j].id) == 0) {
+ n = j;
+ break;
+ }
+ }
+
+ if (n == -1) {
+ j = strcmp(DIMENSION_ZLEVEL, dim);
+ j *= strcmp(DIMENSION_ALEVEL, dim);
+ j *= strcmp(DIMENSION_OLEVEL, dim);
+ for (k = 0; k < CMOR_MAX_ELEMENTS; k++) {
+ if (cmor_tables[var->table_id].generic_levels[k][0] == '\0')
+ break;
+ j *= strcmp(dim,
+ cmor_tables[var->table_id].generic_levels[k]);
+ }
+
+ if (j == 0) {
+
+ var->dimensions[var->ndims] = -2;
+ } else {
+ if ((strcmp(dim, DIMENSION_LONGITUDE) != 0)
+ && strcmp(dim, DIMENSION_LATITUDE) != 0) {
/* -------------------------------------------------------------------- */
/* do not raise a warning if the axis is "longitude" / */
/* "latitude" it is probably a grid variable */
/* -------------------------------------------------------------------- */
- snprintf( msg, CMOR_MAX_STRING,
- "Reading table %s: axis name: '%s' for "
- "variable: '%s' is not defined in table. "
- "Table defines dimensions: '%s' for this "
- "variable",
- cmor_tables[var->table_id].szTable_id, dim,
- var->id, val );
- cmor_handle_error( msg, CMOR_CRITICAL );
- } else {
- var->dimensions[var->ndims] = -CMOR_MAX_GRIDS;
- }
- }
- } else {
- var->dimensions[var->ndims] = n;
- }
- var->ndims++;
- }
+ snprintf(msg, CMOR_MAX_STRING,
+ "Reading table %s: axis name: '%s' for "
+ "variable: '%s' is not defined in table. "
+ "Table defines dimensions: '%s' for this "
+ "variable",
+ cmor_tables[var->table_id].szTable_id, dim,
+ var->id, val);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ } else {
+ var->dimensions[var->ndims] = -CMOR_MAX_GRIDS;
+ }
+ }
+ } else {
+ var->dimensions[var->ndims] = n;
+ }
+ var->ndims++;
+ }
/* -------------------------------------------------------------------- */
/* revert to put in C order */
/* -------------------------------------------------------------------- */
- for( i = 0; i < var->ndims / 2; i++ ) {
- n = var->dimensions[i];
- var->dimensions[i] = var->dimensions[var->ndims - 1 - i];
- var->dimensions[var->ndims - 1 - i] = n;
- }
-
- } else if( strcmp( att, VARIABLE_ATT_UNITS ) == 0 ) {
-
- strncpy( var->units, val, CMOR_MAX_STRING );
-
- } else if( strcmp( att, VARIABLE_ATT_CELLMETHODS ) == 0 ) {
+ for (i = 0; i < var->ndims / 2; i++) {
+ n = var->dimensions[i];
+ var->dimensions[i] = var->dimensions[var->ndims - 1 - i];
+ var->dimensions[var->ndims - 1 - i] = n;
+ }
- strncpy( var->cell_methods, val, CMOR_MAX_STRING );
+ } else if (strcmp(att, VARIABLE_ATT_UNITS) == 0) {
- } else if( strcmp( att, VARIABLE_ATT_EXTCELLMEASURES ) == 0 ) {
+ strncpy(var->units, val, CMOR_MAX_STRING);
- strncpy( var->cell_measures, val, CMOR_MAX_STRING );
+ } else if (strcmp(att, VARIABLE_ATT_CELLMETHODS) == 0) {
- } else if( strcmp( att, VARIABLE_ATT_CELLMEASURES ) == 0 ) {
+ strncpy(var->cell_methods, val, CMOR_MAX_STRING);
- strncpy( var->cell_measures, val, CMOR_MAX_STRING );
+ } else if (strcmp(att, VARIABLE_ATT_EXTCELLMEASURES) == 0) {
- } else if( strcmp( att, VARIABLE_ATT_POSITIVE ) == 0 ) {
+ strncpy(var->cell_measures, val, CMOR_MAX_STRING);
- var->positive = val[0];
+ } else if (strcmp(att, VARIABLE_ATT_CELLMEASURES) == 0) {
- } else if( strcmp( att, VARIABLE_ATT_TYPE ) == 0 ) {
+ strncpy(var->cell_measures, val, CMOR_MAX_STRING);
- if( strcmp( val, "real" ) == 0 )
- var->type = 'f';
+ } else if (strcmp(att, VARIABLE_ATT_POSITIVE) == 0) {
- else if( strcmp( val, "double" ) == 0 )
- var->type = 'd';
+ var->positive = val[0];
- else if( strcmp( val, "integer" ) == 0 )
- var->type = 'i';
+ } else if (strcmp(att, VARIABLE_ATT_TYPE) == 0) {
- else if( strcmp( val, "long" ) == 0 )
- var->type = 'l';
+ if (strcmp(val, "real") == 0)
+ var->type = 'f';
- } else if( strcmp( att, VARIABLE_ATT_VALIDMIN ) == 0 ) {
+ else if (strcmp(val, "double") == 0)
+ var->type = 'd';
- var->valid_min = atof( val );
+ else if (strcmp(val, "integer") == 0)
+ var->type = 'i';
- } else if( strcmp( att, VARIABLE_ATT_VALIDMAX ) == 0 ) {
+ else if (strcmp(val, "long") == 0)
+ var->type = 'l';
- var->valid_max = atof( val );
+ } else if (strcmp(att, VARIABLE_ATT_VALIDMIN) == 0) {
- } else if( strcmp( att, VARIABLE_ATT_MINMEANABS ) == 0 ) {
+ var->valid_min = atof(val);
- var->ok_min_mean_abs = atof( val );
+ } else if (strcmp(att, VARIABLE_ATT_VALIDMAX) == 0) {
+ var->valid_max = atof(val);
- } else if( strcmp( att, VARIABLE_ATT_MAXMEANABS ) == 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_MINMEANABS) == 0) {
- var->ok_max_mean_abs = atof( val );
- } else if( strcmp( att, VARIABLE_ATT_CHUNKING ) == 0 ) {
- strncpy( var->chunking_dimensions, val, CMOR_MAX_STRING );
+ var->ok_min_mean_abs = atof(val);
- } else if( strcmp( att, VARIABLE_ATT_SHUFFLE ) == 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_MAXMEANABS) == 0) {
- var->shuffle = atoi( val );
+ var->ok_max_mean_abs = atof(val);
+ } else if (strcmp(att, VARIABLE_ATT_CHUNKING) == 0) {
+ strncpy(var->chunking_dimensions, val, CMOR_MAX_STRING);
- if( atoi( val ) != 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_SHUFFLE) == 0) {
- if( USE_NETCDF_4 == 0 ) {
- sprintf( msg,
- "Reading a table (%s) that calls for NetCDF4 "
- "features, you are using NetCDF3 library",
- cmor_tables[var->table_id].szTable_id );
- cmor_handle_error( msg, CMOR_WARNING );
+ var->shuffle = atoi(val);
- } else if( ( CMOR_NETCDF_MODE == CMOR_APPEND_3 ) ||
- ( CMOR_NETCDF_MODE == CMOR_REPLACE_3 ) ||
- ( CMOR_NETCDF_MODE == CMOR_PRESERVE_3 ) ) {
+ if (atoi(val) != 0) {
- sprintf( msg,
- "Reading a table (%s) that calls for NetCDF4 "
- "features, you asked for NetCDF3 features",
- cmor_tables[var->table_id].szTable_id );
+ if (USE_NETCDF_4 == 0) {
+ sprintf(msg,
+ "Reading a table (%s) that calls for NetCDF4 "
+ "features, you are using NetCDF3 library",
+ cmor_tables[var->table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_WARNING);
- cmor_handle_error( msg, CMOR_WARNING );
- }
- }
- } else if( strcmp( att, VARIABLE_ATT_DEFLATE ) == 0 ) {
+ } else if ((CMOR_NETCDF_MODE == CMOR_APPEND_3) ||
+ (CMOR_NETCDF_MODE == CMOR_REPLACE_3) ||
+ (CMOR_NETCDF_MODE == CMOR_PRESERVE_3)) {
- var->deflate = atoi( val );
+ sprintf(msg,
+ "Reading a table (%s) that calls for NetCDF4 "
+ "features, you asked for NetCDF3 features",
+ cmor_tables[var->table_id].szTable_id);
- if( atoi( val ) != 0 ) {
- if( USE_NETCDF_4 == 0 ) {
- sprintf( msg,
- "Reading a table (%s) that calls for NetCDF4 features, you are using NetCDF3 library",
- cmor_tables[var->table_id].szTable_id );
- cmor_handle_error( msg, CMOR_WARNING );
- } else if( ( CMOR_NETCDF_MODE == CMOR_APPEND_3 ) ||
- ( CMOR_NETCDF_MODE == CMOR_REPLACE_3 ) ||
- ( CMOR_NETCDF_MODE == CMOR_PRESERVE_3 ) ) {
- sprintf( msg,
- "Reading a table (%s) that calls for NetCDF4 features, you asked for NetCDF3 features",
- cmor_tables[var->table_id].szTable_id );
- cmor_handle_error( msg, CMOR_WARNING );
- }
- }
- } else if( strcmp( att, VARIABLE_ATT_DEFLATELEVEL ) == 0 ) {
+ cmor_handle_error(msg, CMOR_WARNING);
+ }
+ }
+ } else if (strcmp(att, VARIABLE_ATT_DEFLATE) == 0) {
+
+ var->deflate = atoi(val);
+
+ if (atoi(val) != 0) {
+ if (USE_NETCDF_4 == 0) {
+ sprintf(msg,
+ "Reading a table (%s) that calls for NetCDF4 features, you are using NetCDF3 library",
+ cmor_tables[var->table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_WARNING);
+ } else if ((CMOR_NETCDF_MODE == CMOR_APPEND_3) ||
+ (CMOR_NETCDF_MODE == CMOR_REPLACE_3) ||
+ (CMOR_NETCDF_MODE == CMOR_PRESERVE_3)) {
+ sprintf(msg,
+ "Reading a table (%s) that calls for NetCDF4 features, you asked for NetCDF3 features",
+ cmor_tables[var->table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_WARNING);
+ }
+ }
+ } else if (strcmp(att, VARIABLE_ATT_DEFLATELEVEL) == 0) {
- var->deflate_level = atoi( val );
+ var->deflate_level = atoi(val);
- } else if( strcmp( att, VARIABLE_ATT_MODELINGREALM ) == 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_MODELINGREALM) == 0) {
- strncpy( var->realm, val, CMOR_MAX_STRING );
+ strncpy(var->realm, val, CMOR_MAX_STRING);
- } else if( strcmp( att, VARIALBE_ATT_FREQUENCY ) == 0 ) {
+ } else if (strcmp(att, VARIALBE_ATT_FREQUENCY) == 0) {
- strncpy( var->frequency, val, CMOR_MAX_STRING );
+ strncpy(var->frequency, val, CMOR_MAX_STRING);
- } else if( strcmp( att, VARIABLE_ATT_FLAGVALUES ) == 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_FLAGVALUES) == 0) {
- strncpy( var->flag_values, val, CMOR_MAX_STRING );
+ strncpy(var->flag_values, val, CMOR_MAX_STRING);
- } else if( strcmp( att, VARIABLE_ATT_FLAGMEANINGS ) == 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_FLAGMEANINGS) == 0) {
- strncpy( var->flag_meanings, val, CMOR_MAX_STRING );
+ strncpy(var->flag_meanings, val, CMOR_MAX_STRING);
- } else if( strcmp( att, VARIABLE_ATT_OUTNAME ) == 0 ) {
+ } else if (strcmp(att, VARIABLE_ATT_OUTNAME) == 0) {
- strncpy( var->out_name, val, CMOR_MAX_STRING );
+ strncpy(var->out_name, val, CMOR_MAX_STRING);
} else {
- snprintf( msg, CMOR_MAX_STRING,
- "Table %s, unknown variable attribute: >>>>%s<<<< value: (%s)",
- cmor_tables[var->table_id].szTable_id, att, val );
- cmor_handle_error( msg, CMOR_WARNING );
+ snprintf(msg, CMOR_MAX_STRING,
+ "Table %s, unknown variable attribute: >>>>%s<<<< value: (%s)",
+ cmor_tables[var->table_id].szTable_id, att, val);
+ cmor_handle_error(msg, CMOR_WARNING);
}
- cmor_pop_traceback( );
- return( 0 );
+ cmor_pop_traceback();
+ return (0);
}
+
/************************************************************************/
/* cmor_set_var_chunking() */
/************************************************************************/
-int cmor_set_chunking( int var_id, int nTableID, size_t nc_dim_chunking[]) {
-
- char chunk_dimensions[CMOR_MAX_STRING];
- char *token;
- int n;
- int ndims = cmor_vars[var_id].ndims;
- int nChunks[CMOR_MAX_DIMENSIONS]; // T, Z, Y,X
- int nAxisID;
-
- cmor_add_traceback( "cmor_set_chunking" );
- cmor_is_setup( );
-
- strcpy(chunk_dimensions, cmor_vars[var_id].chunking_dimensions);
- if( chunk_dimensions[0] == '\0') {
- cmor_pop_traceback( );
- return(-1);
- }
-
- token = strtok(chunk_dimensions, " ");
- n=0;
- // Read in all chunks
- while( token != NULL){
- nChunks[n] = atoi(token);
- n++;
- token = strtok(NULL, " ");
- }
- // We need 4 dimensions corresponding to T, Z, Y,X
- if(n != 4) {
- return(-1);
- }
- // Validate Chunks size.
- for (n = 0; n < ndims; n++) {
- nAxisID = cmor_vars[var_id].axes_ids[n];
- if (cmor_axes[nAxisID].axis == 'X') {
- if (nChunks[3] > cmor_axes[nAxisID].length) {
- nChunks[3] = cmor_axes[nAxisID].length;
- } else if (nChunks[3] <= 0) {
- nChunks[3] = 1;
- }
- }
- if (cmor_axes[nAxisID].axis == 'Y') {
- if (nChunks[2] > cmor_axes[nAxisID].length) {
- nChunks[2] = cmor_axes[nAxisID].length;
- } else if (nChunks[2] <= 0) {
- nChunks[2] = 1;
- }
- }
- if (cmor_axes[nAxisID].axis == 'Z') {
- if (nChunks[1] > cmor_axes[nAxisID].length) {
- nChunks[1] = cmor_axes[nAxisID].length;
- } else if (nChunks[1] <= 0) {
- nChunks[1] = 1;
- }
- }
- if (cmor_axes[nAxisID].axis == 'T') {
- if (nChunks[0] > cmor_axes[nAxisID].length) {
- nChunks[0] = cmor_axes[nAxisID].length;
- } else if (nChunks[0] <= 0) {
- nChunks[0] = 1;
- }
- }
- }
- // Assign chunks;
- n=0;
- while( n < ndims){
- nAxisID = cmor_vars[var_id].axes_ids[n];
- if(cmor_axes[nAxisID].axis == 'X') {
- nc_dim_chunking[n] = nChunks[3];
- }
- else if (cmor_axes[nAxisID].axis == 'Y') {
- nc_dim_chunking[n] = nChunks[2];
- }
- else if (cmor_axes[nAxisID].axis == 'Z') {
- nc_dim_chunking[n] = nChunks[1];
- }
- else if (cmor_axes[nAxisID].axis == 'T') {
- nc_dim_chunking[n] = nChunks[0];
- }
- else {
- nc_dim_chunking[n] = 1;
- }
- n++;
- token = strtok(NULL, " ");
- }
- cmor_pop_traceback( );
- return( 0 );
+int cmor_set_chunking(int var_id, int nTableID, size_t nc_dim_chunking[])
+{
+
+ char chunk_dimensions[CMOR_MAX_STRING];
+ char *token;
+ int n;
+ int ndims = cmor_vars[var_id].ndims;
+ int nChunks[CMOR_MAX_DIMENSIONS]; // T, Z, Y,X
+ int nAxisID;
+
+ cmor_add_traceback("cmor_set_chunking");
+ cmor_is_setup();
+
+ strcpy(chunk_dimensions, cmor_vars[var_id].chunking_dimensions);
+ if (chunk_dimensions[0] == '\0') {
+ cmor_pop_traceback();
+ return (-1);
+ }
+
+ token = strtok(chunk_dimensions, " ");
+ n = 0;
+ // Read in all chunks
+ while (token != NULL) {
+ nChunks[n] = atoi(token);
+ n++;
+ token = strtok(NULL, " ");
+ }
+ // We need 4 dimensions corresponding to T, Z, Y,X
+ if (n != 4) {
+ return (-1);
+ }
+ // Validate Chunks size.
+ for (n = 0; n < ndims; n++) {
+ nAxisID = cmor_vars[var_id].axes_ids[n];
+ if (cmor_axes[nAxisID].axis == 'X') {
+ if (nChunks[3] > cmor_axes[nAxisID].length) {
+ nChunks[3] = cmor_axes[nAxisID].length;
+ } else if (nChunks[3] <= 0) {
+ nChunks[3] = 1;
+ }
+ }
+ if (cmor_axes[nAxisID].axis == 'Y') {
+ if (nChunks[2] > cmor_axes[nAxisID].length) {
+ nChunks[2] = cmor_axes[nAxisID].length;
+ } else if (nChunks[2] <= 0) {
+ nChunks[2] = 1;
+ }
+ }
+ if (cmor_axes[nAxisID].axis == 'Z') {
+ if (nChunks[1] > cmor_axes[nAxisID].length) {
+ nChunks[1] = cmor_axes[nAxisID].length;
+ } else if (nChunks[1] <= 0) {
+ nChunks[1] = 1;
+ }
+ }
+ if (cmor_axes[nAxisID].axis == 'T') {
+ if (nChunks[0] > cmor_axes[nAxisID].length) {
+ nChunks[0] = cmor_axes[nAxisID].length;
+ } else if (nChunks[0] <= 0) {
+ nChunks[0] = 1;
+ }
+ }
+ }
+ // Assign chunks;
+ n = 0;
+ while (n < ndims) {
+ nAxisID = cmor_vars[var_id].axes_ids[n];
+ if (cmor_axes[nAxisID].axis == 'X') {
+ nc_dim_chunking[n] = nChunks[3];
+ } else if (cmor_axes[nAxisID].axis == 'Y') {
+ nc_dim_chunking[n] = nChunks[2];
+ } else if (cmor_axes[nAxisID].axis == 'Z') {
+ nc_dim_chunking[n] = nChunks[1];
+ } else if (cmor_axes[nAxisID].axis == 'T') {
+ nc_dim_chunking[n] = nChunks[0];
+ } else {
+ nc_dim_chunking[n] = 1;
+ }
+ n++;
+ token = strtok(NULL, " ");
+ }
+ cmor_pop_traceback();
+ return (0);
}
/************************************************************************/
/* cmor_set_var_deflate() */
/************************************************************************/
-int cmor_set_deflate( int var_id, int shuffle,
- int deflate, int deflate_level ) {
+int cmor_set_deflate(int var_id, int shuffle, int deflate, int deflate_level)
+{
char msg[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_get_original_shape" );
+ cmor_add_traceback("cmor_get_original_shape");
cmor_is_setup();
- if(cmor_vars[var_id].self != var_id) {
- snprintf( msg, CMOR_MAX_STRING,
- "You attempt to deflate variable id(%d) which was "
- "not initialized",
- var_id);
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (cmor_vars[var_id].self != var_id) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "You attempt to deflate variable id(%d) which was "
+ "not initialized", var_id);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, var_id);
cmor_pop_traceback();
- return(-1);
+ return (-1);
}
cmor_vars[var_id].shuffle = shuffle;
cmor_vars[var_id].deflate = deflate;
cmor_vars[var_id].deflate_level = deflate_level;
cmor_pop_traceback();
- return( 0 );
+ return (0);
}
/************************************************************************/
/* cmor_get_variable_time_length() */
/************************************************************************/
-int cmor_get_variable_time_length( int *var_id, int *length ) {
+int cmor_get_variable_time_length(int *var_id, int *length)
+{
cmor_var_t avar;
int i;
*length = 0;
avar = cmor_vars[*var_id];
- for( i = 0; i < avar.ndims; i++ ) {
- if( cmor_axes[avar.original_order[i]].axis == 'T' )
- *length = cmor_axes[avar.original_order[i]].length;
+ for (i = 0; i < avar.ndims; i++) {
+ if (cmor_axes[avar.original_order[i]].axis == 'T')
+ *length = cmor_axes[avar.original_order[i]].length;
}
- return( 0 );
+ return (0);
}
/************************************************************************/
/* cmor_get_original_shape() */
/************************************************************************/
-int cmor_get_original_shape( int *var_id, int *shape_array, int *rank,
- int blank_time ) {
+int cmor_get_original_shape(int *var_id, int *shape_array, int *rank,
+ int blank_time)
+{
int i;
cmor_var_t avar;
char msg[CMOR_MAX_STRING];
- cmor_add_traceback( "cmor_get_original_shape" );
+ cmor_add_traceback("cmor_get_original_shape");
avar = cmor_vars[*var_id];
- for( i = 0; i < *rank; i++ )
- shape_array[i] = -1; /* init array */
-
- if( *rank < avar.ndims ) {
- snprintf( msg, CMOR_MAX_STRING,
- "trying to retrieve shape of variable %s (table: %s) into a %id array but this variable is %id",
- avar.id, cmor_tables[avar.ref_table_id].szTable_id, *rank,
- avar.ndims );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- for( i = 0; i < avar.ndims; i++ ) {
- if( ( blank_time == 1 )
- && ( cmor_axes[avar.original_order[i]].axis == 'T' ) ) {
- shape_array[i] = 0;
- } else {
- shape_array[i] = cmor_axes[avar.original_order[i]].length;
- }
- }
-
- cmor_pop_traceback( );
- return( 0 );
+ for (i = 0; i < *rank; i++)
+ shape_array[i] = -1; /* init array */
+
+ if (*rank < avar.ndims) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "trying to retrieve shape of variable %s (table: %s) into a %id "
+ "array but this variable is %id",
+ avar.id, cmor_tables[avar.ref_table_id].szTable_id, *rank,
+ avar.ndims);
+ cmor_handle_error_var(msg, CMOR_CRITICAL, *var_id);
+ }
+ for (i = 0; i < avar.ndims; i++) {
+ if ((blank_time == 1)
+ && (cmor_axes[avar.original_order[i]].axis == 'T')) {
+ shape_array[i] = 0;
+ } else {
+ shape_array[i] = cmor_axes[avar.original_order[i]].length;
+ }
+ }
+
+ cmor_pop_traceback();
+ return (0);
}
+
/************************************************************************/
/* cmor_write_var_to_file() */
/************************************************************************/
-int cmor_write_var_to_file( int ncid, cmor_var_t * avar, void *data,
- char itype, int ntimes_passed,
- double *time_vals, double *time_bounds ) {
+int cmor_write_var_to_file(int ncid, cmor_var_t * avar, void *data,
+ char itype, int ntimes_passed,
+ double *time_vals, double *time_bounds)
+{
size_t counts[CMOR_MAX_DIMENSIONS];
size_t counts2[CMOR_MAX_DIMENSIONS];
@@ -2331,14 +2296,14 @@ int cmor_write_var_to_file( int ncid, cmor_var_t * avar, void *data,
int tmpindex = 0;
int index;
- cmor_add_traceback( "cmor_write_var_to_file" );
- cmor_is_setup( );
+ cmor_add_traceback("cmor_write_var_to_file");
+ cmor_is_setup();
emax = 0.;
emin = 0.;
- if( strcmp( avar->ounits, avar->iunits ) == 0 )
- dounits = 0;
+ if (strcmp(avar->ounits, avar->iunits) == 0)
+ dounits = 0;
mtype = avar->type;
/* -------------------------------------------------------------------- */
/* This counts how many elements there is in each dimension and */
@@ -2347,69 +2312,67 @@ int cmor_write_var_to_file( int ncid, cmor_var_t * avar, void *data,
/* */
/* do we have times ? */
/* -------------------------------------------------------------------- */
- if( ntimes_passed != 0 ) {
- counts[0] = ntimes_passed;
- if( cmor_axes[avar->axes_ids[0]].axis != 'T' ) {
- snprintf( msg, CMOR_MAX_STRING,
- "you are passing %i time steps for a static "
- "(no time dimension) variable (%s, table: %s), "
- "please pass 0 (zero) as the number of times",
- ntimes_passed, avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (ntimes_passed != 0) {
+ counts[0] = ntimes_passed;
+ if (cmor_axes[avar->axes_ids[0]].axis != 'T') {
+ snprintf(msg, CMOR_MAX_STRING,
+ "you are passing %i time steps for a static "
+ "(no time dimension) variable (%s, table: %s), "
+ "please pass 0 (zero) as the number of times",
+ ntimes_passed, avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
} else {
/* -------------------------------------------------------------------- */
/* need to determine if it is a static variable */
/* -------------------------------------------------------------------- */
- if( avar->ndims > 0 )
- counts[0] = cmor_axes[avar->axes_ids[0]].length;
- else
- counts[0] = 1;
+ if (avar->ndims > 0)
+ counts[0] = cmor_axes[avar->axes_ids[0]].length;
+ else
+ counts[0] = 1;
}
nelements = counts[0];
- for( i = 1; i < avar->ndims; i++ ) {
- counts[i] = cmor_axes[avar->axes_ids[i]].length;
- nelements = nelements * counts[i];
+ for (i = 1; i < avar->ndims; i++) {
+ counts[i] = cmor_axes[avar->axes_ids[i]].length;
+ nelements = nelements * counts[i];
}
- if( avar->isbounds == 1 )
- nelements *= 2;
+ if (avar->isbounds == 1)
+ nelements *= 2;
/* -------------------------------------------------------------------- */
/* This section counts how many elements are needed before you */
/* increase the index in each dimension */
/* -------------------------------------------------------------------- */
- counter[avar->ndims] = 1; /* dummy */
- counter_orig[avar->ndims] = 1; /*dummy */
+ counter[avar->ndims] = 1; /* dummy */
+ counter_orig[avar->ndims] = 1; /*dummy */
- for( i = avar->ndims - 1; i >= 0; i-- ) {
+ for (i = avar->ndims - 1; i >= 0; i--) {
/* -------------------------------------------------------------------- */
/* we need to do this for the order in which we will write and */
/* the order the user defined its variable */
/* -------------------------------------------------------------------- */
- if( cmor_axes[avar->axes_ids[i]].axis != 'T' )
- counter[i] =
- cmor_axes[avar->axes_ids[i]].length * counter[i + 1];
- else
- counter[i] = counts[0] * counter[i + 1];
- if( cmor_axes[avar->original_order[i]].axis != 'T' )
- counter_orig[i] =
- cmor_axes[avar->original_order[i]].length *
- counter_orig[i + 1];
- else
- counter_orig[i] = counts[0] * counter_orig[i + 1];
+ if (cmor_axes[avar->axes_ids[i]].axis != 'T')
+ counter[i] = cmor_axes[avar->axes_ids[i]].length * counter[i + 1];
+ else
+ counter[i] = counts[0] * counter[i + 1];
+ if (cmor_axes[avar->original_order[i]].axis != 'T')
+ counter_orig[i] = cmor_axes[avar->original_order[i]].length
+ * counter_orig[i + 1];
+ else
+ counter_orig[i] = counts[0] * counter_orig[i + 1];
}
/* -------------------------------------------------------------------- */
/* Now we need to map, i.e going ahead by 2 elements of final */
/* array eq going ahead of n elements originally */
/* -------------------------------------------------------------------- */
- for( i = 0; i < avar->ndims; i++ ) {
- for( j = 0; j < avar->ndims; j++ ) {
- if( avar->axes_ids[i] == avar->original_order[j] ) {
- index = j+1;
+ for (i = 0; i < avar->ndims; i++) {
+ for (j = 0; j < avar->ndims; j++) {
+ if (avar->axes_ids[i] == avar->original_order[j]) {
+ index = j + 1;
counter_orig2[i] = counter_orig[index];
}
}
@@ -2420,841 +2383,837 @@ int cmor_write_var_to_file( int ncid, cmor_var_t * avar, void *data,
/* reordering and scaling/off-setting needs to figure out if we */
/* need to touch the variable... */
/* -------------------------------------------------------------------- */
- if( mtype == 'i' ) {
- idata_tmp = malloc( sizeof ( int ) * nelements );
- if( idata_tmp == NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "cannot allocate memory for %i int tmp elts var '%s' (table: %s)",
- nelements, avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- } else if( mtype == 'l' ) {
-
- ldata_tmp = malloc( sizeof ( long ) * nelements );
- if( ldata_tmp == NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "cannot allocate memory for %i long tmp elts var '%s' (table: %s)",
- nelements, avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- } else if( mtype == 'd' ) {
-
- data_tmp = malloc( sizeof ( double ) * nelements );
- if( data_tmp == NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "cannot allocate memory for %i double tmp elts var '%s' (table: %s)",
- nelements, avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (mtype == 'i') {
+ idata_tmp = malloc(sizeof(int) * nelements);
+ if (idata_tmp == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "cannot allocate memory for %i int tmp elts var '%s' "
+ "(table: %s)",
+ nelements, avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ } else if (mtype == 'l') {
+
+ ldata_tmp = malloc(sizeof(long) * nelements);
+ if (ldata_tmp == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "cannot allocate memory for %i long tmp elts var '%s' "
+ "(table: %s)",
+ nelements, avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ } else if (mtype == 'd') {
+
+ data_tmp = malloc(sizeof(double) * nelements);
+ if (data_tmp == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "cannot allocate memory for %i double tmp elts var '%s' "
+ "(table: %s)",
+ nelements, avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
} else {
- fdata_tmp = malloc( sizeof ( float ) * nelements );
- if( fdata_tmp == NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "cannot allocate memory for %i float tmp elts var '%s' (table: %s)",
- nelements, avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ fdata_tmp = malloc(sizeof(float) * nelements);
+ if (fdata_tmp == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "cannot allocate memory for %i float tmp elts var '%s' "
+ "(table: %s)",
+ nelements, avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
}
/* -------------------------------------------------------------------- */
/* Reorder data, applies scaling, etc... */
/* -------------------------------------------------------------------- */
- if( dounits == 1 ) {
-
- strncpy( local_unit, avar->ounits, CMOR_MAX_STRING );
- ut_trim( local_unit, UT_ASCII );
- cmor_units = ut_parse( ut_read, local_unit, UT_ASCII );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "in udunits analyzing units from cmor table "
- "(%s) for variable %s (table: %s)",
- local_unit, avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
- }
-
- strncpy( local_unit, avar->iunits, CMOR_MAX_STRING );
- ut_trim( local_unit, UT_ASCII );
- user_units = ut_parse( ut_read, local_unit, UT_ASCII );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "in udunits analyzing units from user (%s) "
- "for variable %s (table: %s)",
- local_unit, avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
- }
-
- if( ut_are_convertible( cmor_units, user_units ) == 0 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "variable: %s, cmor and user units are incompatible: "
- "%s and %s for variable %s (table: %s)",
- avar->id, avar->ounits, avar->iunits, avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
- }
-
- ut_cmor_converter = ut_get_converter( user_units, cmor_units );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- " in udunits, getting converter for variable %s "
- "(table: %s)",
- avar->id, cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
- }
+ if (dounits == 1) {
+
+ strncpy(local_unit, avar->ounits, CMOR_MAX_STRING);
+ ut_trim(local_unit, UT_ASCII);
+ cmor_units = ut_parse(ut_read, local_unit, UT_ASCII);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "in udunits analyzing units from cmor table "
+ "(%s) for variable %s (table: %s)",
+ local_unit, avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+
+ strncpy(local_unit, avar->iunits, CMOR_MAX_STRING);
+ ut_trim(local_unit, UT_ASCII);
+ user_units = ut_parse(ut_read, local_unit, UT_ASCII);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "in udunits analyzing units from user (%s) "
+ "for variable %s (table: %s)",
+ local_unit, avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+
+ if (ut_are_convertible(cmor_units, user_units) == 0) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "variable: %s, cmor and user units are incompatible: "
+ "%s and %s for variable %s (table: %s)",
+ avar->id, avar->ounits, avar->iunits, avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+
+ ut_cmor_converter = ut_get_converter(user_units, cmor_units);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ " in udunits, getting converter for variable %s "
+ "(table: %s)",
+ avar->id, cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
}
amean = 0.;
nelts = 0;
- for( i = 0; i < nelements; i++ ) {
- loc = i;
+ for (i = 0; i < nelements; i++) {
+ loc = i;
/* -------------------------------------------------------------------- */
/* first figures out the coeff in final order */
/* puts the result in counter2 */
/* -------------------------------------------------------------------- */
- for( j = 0; j < avar->ndims; j++ ) {
- counter2[j] = ( int ) loc / ( int ) counter[j + 1];
+ for (j = 0; j < avar->ndims; j++) {
+ counter2[j] = (int)loc / (int)counter[j + 1];
/* -------------------------------------------------------------------- */
/* this is the reverse part doing it this way to avoid if test */
/* -------------------------------------------------------------------- */
- loc = loc - counter2[j] * counter[j + 1];
- }
+ loc = loc - counter2[j] * counter[j + 1];
+ }
/* -------------------------------------------------------------------- */
/* now figures out what these indices meant in the original order */
/* -------------------------------------------------------------------- */
- loc = 0;
- for( j = 0; j < avar->ndims; j++ ) {
- cmor_axis_t *pAxis;
+ loc = 0;
+ for (j = 0; j < avar->ndims; j++) {
+ cmor_axis_t *pAxis;
pAxis = &cmor_axes[avar->axes_ids[j]];
if (pAxis->axis != 'T') {
add = counter2[j] * pAxis->revert + (pAxis->length - 1) *
- (1 - pAxis->revert) / 2;
+ (1 - pAxis->revert) / 2;
- loc = loc + (int) fmod(add + pAxis->offset, pAxis->length)
- * counter_orig2[j];
+ loc = loc + (int)fmod(add + pAxis->offset, pAxis->length)
+ * counter_orig2[j];
- } else {
+ } else {
add = counter2[j] * pAxis->revert + (counts[0] - 1) *
- (1 - pAxis->revert) / 2;
- loc = loc + (int) fmod(add + pAxis->offset, counts[0])
- * counter_orig2[j];
- }
+ (1 - pAxis->revert) / 2;
+ loc = loc + (int)fmod(add + pAxis->offset, counts[0])
+ * counter_orig2[j];
+ }
- }
+ }
/* -------------------------------------------------------------------- */
/* Copy from user's data into our data */
/* -------------------------------------------------------------------- */
- if( itype == 'd' )
- tmp = ( double ) ( ( double * ) data )[loc];
- else if( itype == 'f' )
- tmp = ( double ) ( ( float * ) data )[loc];
- else if( itype == 'i' )
- tmp = ( double ) ( ( int * ) data )[loc];
- else if( itype == 'l' )
- tmp = ( double ) ( ( long * ) data )[loc];
- if( avar->isbounds ) {
+ if (itype == 'd')
+ tmp = (double)((double *)data)[loc];
+ else if (itype == 'f')
+ tmp = (double)((float *)data)[loc];
+ else if (itype == 'i')
+ tmp = (double)((int *)data)[loc];
+ else if (itype == 'l')
+ tmp = (double)((long *)data)[loc];
+ if (avar->isbounds) {
/* -------------------------------------------------------------------- */
/* ok here's the code to flip the code if necessary */
/* -------------------------------------------------------------------- */
- if( cmor_axes[avar->axes_ids[0]].revert == -1 ) {
- loc = nelements - i - 1;
- } else {
- loc = i;
- }
- tmp = ( double ) ( ( double * ) data )[loc];
- }
-
- tmp2 = ( double ) fabs( tmp - avar->missing );
-
- if( ( avar->nomissing == 0 )
- && ( tmp2 <= avar->tolerance * ( double ) fabs( tmp ) ) ) {
- tmp = avar->omissing;
-
- } else {
- if( dounits == 1 ) {
-
- tmp = cv_convert_double( ut_cmor_converter, tmp );
-
- if( ut_get_status( ) != UT_SUCCESS ) {
- snprintf( msg, CMOR_MAX_STRING,
- "in udunits, converting values from %s to %s for variable %s (table: %s)",
- avar->iunits, avar->ounits, avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- cmor_pop_traceback( );
- return( 1 );
- }
- }
-
- tmp = tmp * avar->sign; /* do we need to change the sign ? */
- amean += fabs( tmp );
- nelts += 1;
-
- if( ( avar->valid_min != ( float ) 1.e20 ) &&
- ( tmp < avar->valid_min ) ) {
-
- n_lower_min += 1;
- if( ( n_lower_min == 1 ) || ( tmp < emin ) ) { /*minimum val */
- emin = tmp;
- snprintf( msg_min, CMOR_MAX_STRING,
- "Invalid value(s) detected for variable '%s' "
- "(table: %s): %%i values were lower than minimum "
- "valid value (%.4g). Minimum encountered bad "
- "value (%.5g) was at (axis: index/value):",
- avar->id,
- cmor_tables[avar->ref_table_id].szTable_id,
- avar->valid_min, tmp );
-
- for( j = 0; j < avar->ndims; j++ ) {
- cmor_axis_t *pAxis;
+ if (cmor_axes[avar->axes_ids[0]].revert == -1) {
+ loc = nelements - i - 1;
+ } else {
+ loc = i;
+ }
+ tmp = (double)((double *)data)[loc];
+ }
+
+ tmp2 = (double)fabs(tmp - avar->missing);
+
+ if ((avar->nomissing == 0)
+ && (tmp2 <= avar->tolerance * (double)fabs(tmp))) {
+ tmp = avar->omissing;
+
+ } else {
+ if (dounits == 1) {
+
+ tmp = cv_convert_double(ut_cmor_converter, tmp);
+
+ if (ut_get_status() != UT_SUCCESS) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "in udunits, converting values from %s to %s "
+ "for variable %s (table: %s)",
+ avar->iunits, avar->ounits, avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ cmor_pop_traceback();
+ return (1);
+ }
+ }
+
+ tmp = tmp * avar->sign; /* do we need to change the sign ? */
+ amean += fabs(tmp);
+ nelts += 1;
+
+ if ((avar->valid_min != (float)1.e20) && (tmp < avar->valid_min)) {
+
+ n_lower_min += 1;
+ if ((n_lower_min == 1) || (tmp < emin)) { /*minimum val */
+ emin = tmp;
+ snprintf(msg_min, CMOR_MAX_STRING,
+ "Invalid value(s) detected for variable '%s' "
+ "(table: %s): %%i values were lower than minimum "
+ "valid value (%.4g). Minimum encountered bad "
+ "value (%.5g) was at (axis: index/value):",
+ avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id,
+ avar->valid_min, tmp);
+
+ for (j = 0; j < avar->ndims; j++) {
+ cmor_axis_t *pAxis;
pAxis = &cmor_axes[avar->axes_ids[j]];
if (pAxis->values != NULL) {
snprintf(msg2, CMOR_MAX_STRING, " %s: %i/%.5g",
- pAxis->id, counter2[j],
- pAxis->values[counter2[j]]);
+ pAxis->id, counter2[j],
+ pAxis->values[counter2[j]]);
} else {
snprintf(msg2, CMOR_MAX_STRING, " %s: %i/%.5g",
- pAxis->id, counter2[j],
- time_vals[counter2[j]]);
+ pAxis->id, counter2[j],
+ time_vals[counter2[j]]);
}
strncat(msg_min, msg2, CMOR_MAX_STRING - strlen(msg));
- }
- }
- }
- if( ( avar->valid_max != ( float ) 1.e20 ) &&
- ( tmp > avar->valid_max ) ) {
-
- n_greater_max += 1;
-
- if( ( n_greater_max == 1 ) || ( tmp > emax ) ) {
-
- emax = tmp;
- snprintf( msg_max, CMOR_MAX_STRING,
- "Invalid value(s) detected for variable '%s' "
- "(table: %s): %%i values were greater than "
- "maximum valid value (%.4g).Maximum encountered "
- "bad value (%.5g) was at (axis: index/value):",
- avar->id,
- cmor_tables[avar->ref_table_id].szTable_id,
- avar->valid_max, tmp );
-
- for( j = 0; j < avar->ndims; j++ ) {
+ }
+ }
+ }
+ if ((avar->valid_max != (float)1.e20) && (tmp > avar->valid_max)) {
+
+ n_greater_max += 1;
+
+ if ((n_greater_max == 1) || (tmp > emax)) {
+
+ emax = tmp;
+ snprintf(msg_max, CMOR_MAX_STRING,
+ "Invalid value(s) detected for variable '%s' "
+ "(table: %s): %%i values were greater than "
+ "maximum valid value (%.4g).Maximum encountered "
+ "bad value (%.5g) was at (axis: index/value):",
+ avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id,
+ avar->valid_max, tmp);
+
+ for (j = 0; j < avar->ndims; j++) {
cmor_axis_t *pAxis;
pAxis = &cmor_axes[avar->axes_ids[j]];
if (pAxis->values != NULL) {
snprintf(msg2, CMOR_MAX_STRING, " %s: %i/%.5g",
- pAxis->id, counter2[j],
- pAxis->values[counter2[j]]);
+ pAxis->id, counter2[j],
+ pAxis->values[counter2[j]]);
} else {
snprintf(msg2, CMOR_MAX_STRING, " %s: %i/%.5g",
- pAxis->id, counter2[j],
- time_vals[counter2[j]]);
+ pAxis->id, counter2[j],
+ time_vals[counter2[j]]);
}
- strncat( msg_max, msg2,
- CMOR_MAX_STRING - strlen( msg ) );
- }
- }
- }
- }
+ strncat(msg_max, msg2, CMOR_MAX_STRING - strlen(msg));
+ }
+ }
+ }
+ }
- if( mtype == 'i' )
- idata_tmp[i] = ( int ) tmp;
- else if( mtype == 'l' )
- ldata_tmp[i] = ( long ) tmp;
- else if( mtype == 'f' )
- fdata_tmp[i] = ( float ) tmp;
- else if( mtype == 'd' )
- data_tmp[i] = ( double ) tmp;
+ if (mtype == 'i')
+ idata_tmp[i] = (int)tmp;
+ else if (mtype == 'l')
+ ldata_tmp[i] = (long)tmp;
+ else if (mtype == 'f')
+ fdata_tmp[i] = (float)tmp;
+ else if (mtype == 'd')
+ data_tmp[i] = (double)tmp;
}
- if( n_lower_min != 0 ) {
+ if (n_lower_min != 0) {
- snprintf( msg, CMOR_MAX_STRING, msg_min, n_lower_min );
- cmor_handle_error( msg, CMOR_WARNING );
+ snprintf(msg, CMOR_MAX_STRING, msg_min, n_lower_min);
+ cmor_handle_error(msg, CMOR_WARNING);
}
- if( n_greater_max != 0 ) {
+ if (n_greater_max != 0) {
- snprintf( msg, CMOR_MAX_STRING, msg_max, n_greater_max );
- cmor_handle_error( msg, CMOR_WARNING );
+ snprintf(msg, CMOR_MAX_STRING, msg_max, n_greater_max);
+ cmor_handle_error(msg, CMOR_WARNING);
}
- if( avar->ok_min_mean_abs != ( float ) 1.e20 ) {
+ if (avar->ok_min_mean_abs != (float)1.e20) {
- if( amean / nelts < .1 * avar->ok_min_mean_abs ) {
+ if (amean / nelts < .1 * avar->ok_min_mean_abs) {
- snprintf( msg, CMOR_MAX_STRING,
- "Invalid Absolute Mean for variable '%s' (table: %s) "
- "(%.5g) is lower by more than an order of magnitude "
- "than minimum allowed: %.4g",
- avar->id, cmor_tables[avar->ref_table_id].szTable_id,
- amean / nelts, avar->ok_min_mean_abs );
+ snprintf(msg, CMOR_MAX_STRING,
+ "Invalid Absolute Mean for variable '%s' (table: %s) "
+ "(%.5g) is lower by more than an order of magnitude "
+ "than minimum allowed: %.4g", avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id, amean / nelts,
+ avar->ok_min_mean_abs);
- cmor_handle_error( msg, CMOR_CRITICAL );
+ cmor_handle_error(msg, CMOR_CRITICAL);
- }
- if( amean / nelts < avar->ok_min_mean_abs ) {
-
- snprintf( msg, CMOR_MAX_STRING,
- "Invalid Absolute Mean for variable '%s' "
- "(table: %s) (%.5g) is lower than minimum allowed: %.4g",
- avar->id, cmor_tables[avar->ref_table_id].szTable_id,
- amean / nelts, avar->ok_min_mean_abs );
- cmor_handle_error( msg, CMOR_WARNING );
- }
+ }
+ if (amean / nelts < avar->ok_min_mean_abs) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "Invalid Absolute Mean for variable '%s' "
+ "(table: %s) (%.5g) is lower than minimum allowed: %.4g",
+ avar->id, cmor_tables[avar->ref_table_id].szTable_id,
+ amean / nelts, avar->ok_min_mean_abs);
+ cmor_handle_error(msg, CMOR_WARNING);
+ }
}
- if( avar->ok_max_mean_abs != ( float ) 1.e20 ) {
- if( amean / nelts > 10. * avar->ok_max_mean_abs ) {
- snprintf( msg, CMOR_MAX_STRING,
- "Invalid Absolute Mean for variable '%s' "
- "(table: %s) (%.5g) is greater by more than "
- "an order of magnitude than maximum allowed: %.4g",
- avar->id, cmor_tables[avar->ref_table_id].szTable_id,
- amean / nelts, avar->ok_max_mean_abs );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- if( amean / nelts > avar->ok_max_mean_abs ) {
+ if (avar->ok_max_mean_abs != (float)1.e20) {
+ if (amean / nelts > 10. * avar->ok_max_mean_abs) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "Invalid Absolute Mean for variable '%s' "
+ "(table: %s) (%.5g) is greater by more than "
+ "an order of magnitude than maximum allowed: %.4g",
+ avar->id, cmor_tables[avar->ref_table_id].szTable_id,
+ amean / nelts, avar->ok_max_mean_abs);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ if (amean / nelts > avar->ok_max_mean_abs) {
- snprintf( msg, CMOR_MAX_STRING,
- "Invalid Absolute Mean for variable '%s' "
- "(table: %s) (%.5g) is greater than maximum "
- "allowed: %.4g",
- avar->id, cmor_tables[avar->ref_table_id].szTable_id,
- amean / nelts, avar->ok_max_mean_abs );
- cmor_handle_error( msg, CMOR_WARNING );
+ snprintf(msg, CMOR_MAX_STRING,
+ "Invalid Absolute Mean for variable '%s' "
+ "(table: %s) (%.5g) is greater than maximum "
+ "allowed: %.4g", avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id, amean / nelts,
+ avar->ok_max_mean_abs);
+ cmor_handle_error(msg, CMOR_WARNING);
- }
+ }
}
- if( dounits == 1 ) {
+ if (dounits == 1) {
- cv_free( ut_cmor_converter );
+ cv_free(ut_cmor_converter);
- if( ut_get_status( ) != UT_SUCCESS ) {
+ if (ut_get_status() != UT_SUCCESS) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing converter, variable %s "
- "(table: %s)",
- avar->id, cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing converter, variable %s "
+ "(table: %s)", avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
- }
+ }
- ut_free( cmor_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
+ ut_free(cmor_units);
+ if (ut_get_status() != UT_SUCCESS) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units, variable %s (table: %s)",
- avar->id, cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units, variable %s (table: %s)",
+ avar->id, cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
- }
+ }
- ut_free( user_units );
- if( ut_get_status( ) != UT_SUCCESS ) {
+ ut_free(user_units);
+ if (ut_get_status() != UT_SUCCESS) {
- snprintf( msg, CMOR_MAX_STRING,
- "Udunits: Error freeing units, variable %s (table: %s)",
- avar->id, cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ snprintf(msg, CMOR_MAX_STRING,
+ "Udunits: Error freeing units, variable %s (table: %s)",
+ avar->id, cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
- }
+ }
}
/* -------------------------------------------------------------------- */
/* Initialize the start index in each dimensions */
/* -------------------------------------------------------------------- */
- for( i = 0; i < avar->ndims; i++ )
- starts[i] = 0;
+ for (i = 0; i < avar->ndims; i++)
+ starts[i] = 0;
starts[0] = avar->ntimes_written;
/* -------------------------------------------------------------------- */
/* Write the times passed by user */
/* -------------------------------------------------------------------- */
- if( ntimes_passed != 0 ) {
- if( time_vals != NULL ) {
- if( cmor_axes[avar->axes_ids[0]].values != NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "variable '%s' (table %s) you are passing "
- "time values but you already defined them "
- "via cmor_axis, this is not allowed",
- avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- if( time_bounds != NULL ) {
- counts2[0] = counts[0];
- counts2[1] = 2;
- starts[1] = 0;
- cmor_get_axis_attribute( avar->axes_ids[0], "units", 'c',
- &msg );
- cmor_get_cur_dataset_attribute( "calendar", msg2 );
-
- tmp_vals =
- malloc( ( ntimes_passed +
- 1 ) * 2 * sizeof ( double ) );
- if( tmp_vals == NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "cannot malloc %i tmp bounds time vals "
- "for variable '%s' (table: %s)",
- ntimes_passed * 2, avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- if( avar->ntimes_written > 0 ) {
- if( ( avar->last_time != -999. )
- && ( avar->last_bound != 1.e20 ) ) {
- tmpindex = 1;
- tmp_vals[0] = avar->last_time;
- } else {
- tmpindex = 0;
- }
- } else {
- tmpindex = 0;
- }
+ if (ntimes_passed != 0) {
+ if (time_vals != NULL) {
+ if (cmor_axes[avar->axes_ids[0]].values != NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "variable '%s' (table %s) you are passing "
+ "time values but you already defined them "
+ "via cmor_axis, this is not allowed", avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ if (time_bounds != NULL) {
+ counts2[0] = counts[0];
+ counts2[1] = 2;
+ starts[1] = 0;
+ cmor_get_axis_attribute(avar->axes_ids[0], "units", 'c', &msg);
+ cmor_get_cur_dataset_attribute("calendar", msg2);
+
+ tmp_vals = malloc((ntimes_passed + 1) * 2 * sizeof(double));
+ if (tmp_vals == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "cannot malloc %i tmp bounds time vals "
+ "for variable '%s' (table: %s)",
+ ntimes_passed * 2, avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ if (avar->ntimes_written > 0) {
+ if ((avar->last_time != -999.)
+ && (avar->last_bound != 1.e20)) {
+ tmpindex = 1;
+ tmp_vals[0] = avar->last_time;
+ } else {
+ tmpindex = 0;
+ }
+ } else {
+ tmpindex = 0;
+ }
ierr = cmor_convert_time_values(time_vals, 'd', ntimes_passed,
- &tmp_vals[tmpindex],
- cmor_axes[avar->axes_ids[0]].iunits,
- msg, msg2, msg2);
+ &tmp_vals[tmpindex],
+ cmor_axes[avar->axes_ids[0]].
+ iunits, msg, msg2, msg2);
ierr = cmor_check_monotonic(&tmp_vals[0],
- ntimes_passed + tmpindex,
- "time", 0, avar->axes_ids[0]);
+ ntimes_passed + tmpindex, "time", 0,
+ avar->axes_ids[0]);
- if( avar->ntimes_written > 0 ) {
+ if (avar->ntimes_written > 0) {
- if( ( avar->last_time != -999. ) &&
- ( avar->last_bound != 1.e20 ) ) {
+ if ((avar->last_time != -999.)
+ && (avar->last_bound != 1.e20)) {
- tmp_vals[0] = 2 * avar->last_time - avar->last_bound;
- tmp_vals[1] = avar->last_bound;
- }
- }
+ tmp_vals[0] = 2 * avar->last_time - avar->last_bound;
+ tmp_vals[1] = avar->last_bound;
+ }
+ }
ierr = cmor_convert_time_values(time_bounds, 'd',
- ntimes_passed * 2, &tmp_vals[2 * tmpindex],
- cmor_axes[avar->axes_ids[0]].iunits, msg, msg2, msg2);
+ ntimes_passed * 2,
+ &tmp_vals[2 * tmpindex],
+ cmor_axes[avar->axes_ids[0]].
+ iunits, msg, msg2, msg2);
ierr = cmor_check_monotonic(&tmp_vals[0],
- (ntimes_passed + tmpindex) * 2, "time", 1,
- avar->axes_ids[0]);
+ (ntimes_passed + tmpindex) * 2,
+ "time", 1, avar->axes_ids[0]);
ierr = cmor_check_values_inside_bounds(&time_vals[0],
- &time_bounds[0], ntimes_passed, "time");
+ &time_bounds[0],
+ ntimes_passed, "time");
ierr = nc_put_vara_double(ncid, avar->time_bnds_nc_id, starts,
- counts2, &tmp_vals[2 * tmpindex]);
+ counts2, &tmp_vals[2 * tmpindex]);
- if( ierr != NC_NOERR ) {
- snprintf( msg, CMOR_MAX_STRING,
- "NetCDF error (%i) writing time bounds for variable '%s', already written in file: %i",
- ierr, avar->id, avar->ntimes_written );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NetCDF error (%i) writing time bounds for variable '%s', already written in file: %i",
+ ierr, avar->id, avar->ntimes_written);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
/* -------------------------------------------------------------------- */
/* ok first time around the we need to store bounds */
/* -------------------------------------------------------------------- */
- if( avar->ntimes_written == 0 ) {
+ if (avar->ntimes_written == 0) {
/* -------------------------------------------------------------------- */
/* Ok first time we're putting data in */
/* -------------------------------------------------------------------- */
- avar->first_bound = tmp_vals[0];
- } else {
+ avar->first_bound = tmp_vals[0];
+ } else {
/* -------------------------------------------------------------------- */
/* ok let's put the bounds back on "normal" (start at 0) indices */
/* -------------------------------------------------------------------- */
- for( i = 0; i < 2 * ntimes_passed; i++ ) {
- tmp_vals[i] = tmp_vals[i + 2];
- }
- }
- avar->last_bound = tmp_vals[ntimes_passed * 2 - 1];
+ for (i = 0; i < 2 * ntimes_passed; i++) {
+ tmp_vals[i] = tmp_vals[i + 2];
+ }
+ }
+ avar->last_bound = tmp_vals[ntimes_passed * 2 - 1];
/* -------------------------------------------------------------------- */
/* ok since we have bounds we need to set time in the middle */
/* but only do this in case of none climato */
/* -------------------------------------------------------------------- */
- if( cmor_tables[cmor_axes[avar->axes_ids[0]].ref_table_id].
- axes[cmor_axes[avar->axes_ids[0]].ref_axis_id].
- climatology == 0 ) {
- for( i = 0; i < ntimes_passed; i++ ) {
- tmp_vals[i] =
- ( tmp_vals[2 * i] + tmp_vals[2 * i + 1] ) / 2.;
- }
+ if (cmor_tables[cmor_axes[avar->axes_ids[0]].ref_table_id].axes
+ [cmor_axes[avar->axes_ids[0]].ref_axis_id].climatology ==
+ 0) {
+ for (i = 0; i < ntimes_passed; i++) {
+ tmp_vals[i] =
+ (tmp_vals[2 * i] + tmp_vals[2 * i + 1]) / 2.;
+ }
/* -------------------------------------------------------------------- */
/* store for later */
/* -------------------------------------------------------------------- */
- first_time = tmp_vals[0];
- } else {
+ first_time = tmp_vals[0];
+ } else {
/* -------------------------------------------------------------------- */
/* we need to put into tmp_vals the right things */
/* -------------------------------------------------------------------- */
ierr = cmor_convert_time_values(time_vals, 'd',
- ntimes_passed, &tmp_vals[0],
- cmor_axes[avar->axes_ids[0]].iunits, msg, msg2,
- msg2);
-
- first_time = tmp_vals[0]; /*store for later */
- }
-
-
- ierr =
- nc_put_vara_double( ncid, avar->time_nc_id, starts,
- counts, &tmp_vals[0] );
- if( ierr != NC_NOERR ) {
- snprintf( msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) writing time values for variable '%s' (%s)",
- ierr, nc_strerror( ierr ), avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
-
- if( cmor_tables[cmor_axes[avar->axes_ids[0]].ref_table_id].
- axes[cmor_axes[avar->axes_ids[0]].ref_axis_id].
- climatology == 0 ) {
+ ntimes_passed, &tmp_vals[0],
+ cmor_axes[avar->
+ axes_ids[0]].
+ iunits, msg, msg2, msg2);
+
+ first_time = tmp_vals[0]; /*store for later */
+ }
+
+ ierr = nc_put_vara_double(ncid, avar->time_nc_id, starts,
+ counts, &tmp_vals[0]);
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NetCDF error (%i: %s) writing time values for variable '%s' (%s)",
+ ierr, nc_strerror(ierr), avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+
+ if (cmor_tables[cmor_axes[avar->axes_ids[0]].ref_table_id].axes
+ [cmor_axes[avar->axes_ids[0]].ref_axis_id].climatology ==
+ 0) {
/* -------------------------------------------------------------------- */
/* all good in that case */
/* -------------------------------------------------------------------- */
- } else {
+ } else {
- tmp_vals[ntimes_passed - 1] =
- tmp_vals[ntimes_passed * 2 - 1];
+ tmp_vals[ntimes_passed - 1] =
+ tmp_vals[ntimes_passed * 2 - 1];
- }
+ }
/* -------------------------------------------------------------------- */
/* ok now we need to store first and last stuff */
/* -------------------------------------------------------------------- */
-
- if( avar->ntimes_written == 0 ) {
+
+ if (avar->ntimes_written == 0) {
/* -------------------------------------------------------------------- */
/* ok first time we're putting data in */
/* -------------------------------------------------------------------- */
-
- avar->first_time = first_time;
- } else {
+ avar->first_time = first_time;
+
+ } else {
- if( tmp_vals[0] < avar->last_time ) {
+ if (tmp_vals[0] < avar->last_time) {
snprintf(msg, CMOR_MAX_STRING,
- "Time point: %lf ( %lf in output units) "
- "is not monotonic last time was: %lf "
- "(in output units), variable %s (table: %s)",
- time_vals[0], tmp_vals[0], avar->last_time,
- avar->id,
- cmor_tables[avar->ref_table_id].szTable_id);
+ "Time point: %lf ( %lf in output units) "
+ "is not monotonic last time was: %lf "
+ "(in output units), variable %s (table: %s)",
+ time_vals[0], tmp_vals[0], avar->last_time,
+ avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
cmor_handle_error(msg, CMOR_CRITICAL);
- }
- }
+ }
+ }
- avar->last_time = tmp_vals[ntimes_passed - 1];
+ avar->last_time = tmp_vals[ntimes_passed - 1];
- free( tmp_vals );
- } else {
+ free(tmp_vals);
+ } else {
/* -------------------------------------------------------------------- */
/* checks wether you need bounds or not */
/* -------------------------------------------------------------------- */
-
- if( cmor_tables[cmor_axes[avar->axes_ids[0]].ref_table_id].
- axes[cmor_axes[avar->axes_ids[0]].ref_axis_id].
- must_have_bounds == 1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "time axis must have bounds, please pass them to cmor_write along with time values, variable %s, table %s",
- avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
-
- }
-
- avar->first_bound = 1.e20;
- avar->last_bound = 1.e20;
-
- cmor_get_axis_attribute( avar->axes_ids[0], "units", 'c', &msg );
- cmor_get_cur_dataset_attribute( "calendar", msg2 );
-
- tmp_vals = malloc( ntimes_passed * sizeof ( double ) );
-
- if( tmp_vals == NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "cannot malloc %i time vals for variable "
- "'%s' (table: %s)",
- ntimes_passed, avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- ierr =
- cmor_convert_time_values( time_vals, 'd',
- ntimes_passed, &tmp_vals[0],
- cmor_axes[avar->axes_ids[0]].
- iunits, msg, msg2, msg2 );
- ierr =
- nc_put_vara_double( ncid, avar->time_nc_id, starts,
- counts, tmp_vals );
-
- if( avar->ntimes_written == 0 ) {
+
+ if (cmor_tables[cmor_axes[avar->axes_ids[0]].ref_table_id].axes
+ [cmor_axes[avar->axes_ids[0]].
+ ref_axis_id].must_have_bounds == 1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "time axis must have bounds, please pass them to "
+ "cmor_write along with time values, variable %s, table %s",
+ avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+
+ }
+
+ avar->first_bound = 1.e20;
+ avar->last_bound = 1.e20;
+
+ cmor_get_axis_attribute(avar->axes_ids[0], "units", 'c', &msg);
+ cmor_get_cur_dataset_attribute("calendar", msg2);
+
+ tmp_vals = malloc(ntimes_passed * sizeof(double));
+
+ if (tmp_vals == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "cannot malloc %i time vals for variable "
+ "'%s' (table: %s)", ntimes_passed, avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ ierr = cmor_convert_time_values(time_vals, 'd', ntimes_passed,
+ &tmp_vals[0],
+ cmor_axes[avar->axes_ids[0]].
+ iunits, msg, msg2, msg2);
+
+ ierr = nc_put_vara_double(ncid, avar->time_nc_id, starts,
+ counts, tmp_vals);
+
+ if (avar->ntimes_written == 0) {
/* -------------------------------------------------------------------- */
/* ok first time we're putting data in */
/* -------------------------------------------------------------------- */
-
- avar->first_time = tmp_vals[0];
- }
- avar->last_time = tmp_vals[ntimes_passed - 1];
-
- free( tmp_vals );
- if( ierr != NC_NOERR ) {
- snprintf( msg, CMOR_MAX_STRING,
- "NetCDF error (%i: %s) writing times for variable '%s' (table: %s), already written in file: %i",
- ierr, nc_strerror( ierr ), avar->id,
- cmor_tables[avar->ref_table_id].szTable_id,
- avar->ntimes_written );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- }
- } else {
+
+ avar->first_time = tmp_vals[0];
+ }
+ avar->last_time = tmp_vals[ntimes_passed - 1];
+
+ free(tmp_vals);
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NetCDF error (%i: %s) writing times for variable '%s' "
+ "(table: %s), already written in file: %i",
+ ierr, nc_strerror(ierr), avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id,
+ avar->ntimes_written);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ }
+ } else {
/* -------------------------------------------------------------------- */
/* Ok we did not pass time values therefore it means they were */
/* defined via the axis */
/* -------------------------------------------------------------------- */
-
- if( cmor_axes[avar->axes_ids[0]].values == NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "variable '%s' (table: %s) you are passing %i "
- "times but no values and you did not define "
- "them via cmor_axis",
- avar->id,
- cmor_tables[avar->ref_table_id].szTable_id,
- ntimes_passed );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- if( cmor_axes[avar->axes_ids[0]].bounds != NULL ) {
+
+ if (cmor_axes[avar->axes_ids[0]].values == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "variable '%s' (table: %s) you are passing %i "
+ "times but no values and you did not define "
+ "them via cmor_axis", avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id,
+ ntimes_passed);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ if (cmor_axes[avar->axes_ids[0]].bounds != NULL) {
/* -------------------------------------------------------------------- */
/* ok at that stage the recentering must already be done so we */
/* just need to write the bounds */
/* -------------------------------------------------------------------- */
- counts2[0] = counts[0];
- counts2[1] = 2;
- starts[1] = 0;
- ierr =
- nc_put_vara_double( ncid, avar->time_bnds_nc_id,
- starts, counts2,
- &cmor_axes[avar->axes_ids[0]].
- bounds[starts[0] * 2] );
- if( ierr != NC_NOERR ) {
- snprintf( msg, CMOR_MAX_STRING,
- "NCError (%i: %s) writing time bounds values for variable '%s' (table: %s)",
- ierr, nc_strerror( ierr ), avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ counts2[0] = counts[0];
+ counts2[1] = 2;
+ starts[1] = 0;
+ ierr = nc_put_vara_double(ncid, avar->time_bnds_nc_id, starts,
+ counts2,
+ &cmor_axes[avar->axes_ids[0]].
+ bounds[starts[0] * 2]);
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NCError (%i: %s) writing time bounds values for "
+ "variable '%s' (table: %s)",
+ ierr, nc_strerror(ierr), avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
/* -------------------------------------------------------------------- */
/* ok we need to store first and last bounds */
/* -------------------------------------------------------------------- */
- if( avar->ntimes_written == 0 ) {
- avar->first_bound =
- cmor_axes[avar->axes_ids[0]].bounds[starts[0] * 2];
- }
- avar->last_bound =
- cmor_axes[avar->axes_ids[0]].
- bounds[( starts[0] + counts[0] ) * 2 - 1];
- } else {
+ if (avar->ntimes_written == 0) {
+ avar->first_bound =
+ cmor_axes[avar->axes_ids[0]].bounds[starts[0] * 2];
+ }
+ avar->last_bound =
+ cmor_axes[avar->axes_ids[0]].bounds[(starts[0]
+ + counts[0]) * 2 - 1];
+ } else {
/* -------------------------------------------------------------------- */
/* Checks wether you need bounds or not */
/* -------------------------------------------------------------------- */
- if( cmor_tables[cmor_axes[avar->axes_ids[0]].ref_table_id].
- axes[cmor_axes[avar->axes_ids[0]].ref_axis_id].
- must_have_bounds == 1 ) {
- snprintf( msg, CMOR_MAX_STRING,
- "time axis must have bounds, you defined it w/o any for variable %s (table: %s)",
- avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- avar->first_bound = 1.e20;
- avar->last_bound = 1.e20;
- }
- ierr =
- nc_put_vara_double( ncid, avar->time_nc_id, starts, counts,
- &cmor_axes[avar->axes_ids[0]].
- values[starts[0]] );
- if( ierr != NC_NOERR ) {
- snprintf( msg, CMOR_MAX_STRING,
- "NCError (%i: %s) writing time values for variable '%s' (table: %s)",
- ierr, nc_strerror( ierr ), avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
+ if (cmor_tables[cmor_axes[avar->axes_ids[0]].ref_table_id].axes
+ [cmor_axes[avar->axes_ids[0]].
+ ref_axis_id].must_have_bounds == 1) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "time axis must have bounds, you defined it w/o "
+ "any for variable %s (table: %s)", avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ avar->first_bound = 1.e20;
+ avar->last_bound = 1.e20;
+ }
+ ierr = nc_put_vara_double(ncid, avar->time_nc_id, starts, counts,
+ &cmor_axes[avar->axes_ids[0]].
+ values[starts[0]]);
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NCError (%i: %s) writing time values for variable '%s' (table: %s)",
+ ierr, nc_strerror(ierr), avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
/* -------------------------------------------------------------------- */
/* ok now we need to store first and last stuff */
/* -------------------------------------------------------------------- */
- if( avar->ntimes_written == 0 ) {
- avar->first_time =
- cmor_axes[avar->axes_ids[0]].values[starts[0]];
- }
+ if (avar->ntimes_written == 0) {
+ avar->first_time =
+ cmor_axes[avar->axes_ids[0]].values[starts[0]];
+ }
- avar->last_time =
- cmor_axes[avar->axes_ids[0]].values[starts[0] + counts[0] -
- 1];
- }
+ avar->last_time = cmor_axes[avar->axes_ids[0]].values[starts[0]
+ + counts[0] -
+ 1];
+ }
} else {
/* -------------------------------------------------------------------- */
/* ok we did not pass time values therefore it means they were */
/* defined via the axis */
/* -------------------------------------------------------------------- */
- ierr = -1;
+ ierr = -1;
/* -------------------------------------------------------------------- */
/* look for time dimension */
/* -------------------------------------------------------------------- */
- for( i = 0; i < avar->ndims; i++ ) {
- if( cmor_axes[avar->axes_ids[0]].axis == 'T' ) {
- ierr = i;
- break;
- }
- }
+ for (i = 0; i < avar->ndims; i++) {
+ if (cmor_axes[avar->axes_ids[0]].axis == 'T') {
+ ierr = i;
+ break;
+ }
+ }
- if( ierr != -1 ) {
+ if (ierr != -1) {
- if( cmor_axes[avar->axes_ids[ierr]].values == NULL ) {
- snprintf( msg, CMOR_MAX_STRING,
- "variable '%s' (table: %s) you are passing %i "
- "times but no values and you did not define "
- "them via cmor_axis",
- avar->id,
- cmor_tables[avar->ref_table_id].szTable_id,
- ntimes_passed );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (cmor_axes[avar->axes_ids[ierr]].values == NULL) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "variable '%s' (table: %s) you are passing %i "
+ "times but no values and you did not define "
+ "them via cmor_axis", avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id,
+ ntimes_passed);
+ cmor_handle_error(msg, CMOR_CRITICAL);
- }
+ }
- avar->first_bound = 1.e20;
- avar->last_bound = 1.e20;
+ avar->first_bound = 1.e20;
+ avar->last_bound = 1.e20;
- if( cmor_axes[avar->axes_ids[ierr]].bounds != NULL ) {
+ if (cmor_axes[avar->axes_ids[ierr]].bounds != NULL) {
/* -------------------------------------------------------------------- */
/* ok at that stage the recentering must already be done so we */
/* just need to write the bounds */
/* -------------------------------------------------------------------- */
- counts2[0] = counts[0];
- counts2[1] = 2;
- starts[0] = 0;
- starts[1] = 0;
- ierr = nc_put_vara_double( ncid, avar->time_bnds_nc_id,
- starts,
- counts2,
- &cmor_axes[avar->axes_ids[0]].bounds[starts[0] * 2] );
-
- if( ierr != NC_NOERR ) {
- snprintf( msg, CMOR_MAX_STRING,
- "NCError (%i: %s) writing time bounds values for variable '%s' (table: %s)",
- ierr, nc_strerror( ierr ), avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
- }
- avar->first_bound = cmor_axes[avar->axes_ids[0]].bounds[0];
- avar->last_bound =
- cmor_axes[avar->axes_ids[0]].bounds[counts[0] * 2 - 1];
- }
-
- ierr = nc_put_vara_double( ncid, avar->time_nc_id,
- starts,
- counts,
- &cmor_axes[avar->axes_ids[0]].values[starts[0]] );
-
- if( ierr != NC_NOERR ) {
-
- snprintf( msg, CMOR_MAX_STRING,
- "NCError (%i: %s) writing time values for variable '%s' (table: %s)",
- ierr, nc_strerror( ierr ), avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
-
- }
+ counts2[0] = counts[0];
+ counts2[1] = 2;
+ starts[0] = 0;
+ starts[1] = 0;
+ ierr = nc_put_vara_double(ncid, avar->time_bnds_nc_id, starts,
+ counts2,
+ &cmor_axes[avar->axes_ids[0]].
+ bounds[starts[0] * 2]);
+
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NCError (%i: %s) writing time bounds values for "
+ "variable '%s' (table: %s)",
+ ierr, nc_strerror(ierr), avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+ }
+ avar->first_bound = cmor_axes[avar->axes_ids[0]].bounds[0];
+ avar->last_bound = cmor_axes[avar->axes_ids[0]].bounds[counts[0]
+ * 2 - 1];
+ }
+
+ ierr = nc_put_vara_double(ncid, avar->time_nc_id, starts, counts,
+ &cmor_axes[avar->axes_ids[0]].
+ values[starts[0]]);
+
+ if (ierr != NC_NOERR) {
+
+ snprintf(msg, CMOR_MAX_STRING,
+ "NCError (%i: %s) writing time values for "
+ "variable '%s' (table: %s)",
+ ierr, nc_strerror(ierr), avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
+
+ }
/* -------------------------------------------------------------------- */
/* ok now we need to store first and last stuff */
/* -------------------------------------------------------------------- */
- avar->first_time = cmor_axes[avar->axes_ids[0]].values[0];
- avar->last_time = cmor_axes[avar->axes_ids[0]].
- values[starts[0] + counts[0] - 1];
- }
+ avar->first_time = cmor_axes[avar->axes_ids[0]].values[0];
+ avar->last_time = cmor_axes[avar->axes_ids[0]].values[starts[0]
+ + counts[0] -
+ 1];
+ }
}
- if( avar->isbounds ) {
- counts[avar->ndims] = 2;
- starts[avar->ndims] = 0;
+ if (avar->isbounds) {
+ counts[avar->ndims] = 2;
+ starts[avar->ndims] = 0;
}
- if( mtype == 'd' ) {
- ierr = nc_put_vara_double( ncid, avar->nc_var_id, starts, counts,
- data_tmp );
- }
- else if( mtype == 'f' ) {
- ierr = nc_put_vara_float( ncid, avar->nc_var_id, starts, counts,
- fdata_tmp );
- }
- else if( mtype == 'l' ) {
- ierr = nc_put_vara_long( ncid, avar->nc_var_id, starts, counts,
- ldata_tmp );
- }
- else if( mtype == 'i' ) {
- ierr = nc_put_vara_int( ncid, avar->nc_var_id, starts, counts,
- idata_tmp );
+ if (mtype == 'd') {
+ ierr = nc_put_vara_double(ncid, avar->nc_var_id, starts, counts,
+ data_tmp);
+ } else if (mtype == 'f') {
+ ierr = nc_put_vara_float(ncid, avar->nc_var_id, starts, counts,
+ fdata_tmp);
+ } else if (mtype == 'l') {
+ ierr = nc_put_vara_long(ncid, avar->nc_var_id, starts, counts,
+ ldata_tmp);
+ } else if (mtype == 'i') {
+ ierr = nc_put_vara_int(ncid, avar->nc_var_id, starts, counts,
+ idata_tmp);
}
- if( ierr != NC_NOERR ) {
- snprintf( msg, CMOR_MAX_STRING,
- "NetCDF Error (%i: %s), writing variable '%s' (table %s) to file",
- ierr, nc_strerror( ierr ), avar->id,
- cmor_tables[avar->ref_table_id].szTable_id );
- cmor_handle_error( msg, CMOR_CRITICAL );
+ if (ierr != NC_NOERR) {
+ snprintf(msg, CMOR_MAX_STRING,
+ "NetCDF Error (%i: %s), writing variable '%s' (table %s) to file",
+ ierr, nc_strerror(ierr), avar->id,
+ cmor_tables[avar->ref_table_id].szTable_id);
+ cmor_handle_error(msg, CMOR_CRITICAL);
}
avar->ntimes_written += ntimes_passed;
- if( mtype == 'd' )
- free( data_tmp );
- else if( mtype == 'f' )
- free( fdata_tmp );
- else if( mtype == 'l' )
- free( ldata_tmp );
- else if( mtype == 'i' )
- free( idata_tmp );
-
- cmor_pop_traceback( );
- return( 0 );
+ if (mtype == 'd')
+ free(data_tmp);
+ else if (mtype == 'f')
+ free(fdata_tmp);
+ else if (mtype == 'l')
+ free(ldata_tmp);
+ else if (mtype == 'i')
+ free(idata_tmp);
+
+ cmor_pop_traceback();
+ return (0);
}
diff --git a/Test/check_results.py b/Test/check_results.py
index 65fe8ba..7de1b5c 100644
--- a/Test/check_results.py
+++ b/Test/check_results.py
@@ -44,7 +44,7 @@ for f in outfiles:
print 'Checking output file:', f
cmor.checkCMOR(sys.stdout, fnm, tbl, other_tables=tables)
print '----------------------- Success ------------------------------'
- os.remove(fnm)
+ # os.remove(fnm)
else:
missing.append(fnm)
if nfiles == 0 and outfiles != []:
diff --git a/Test/cmor_speed_and_compression.py b/Test/cmor_speed_and_compression.py
index a674f15..86bb717 100644
--- a/Test/cmor_speed_and_compression.py
+++ b/Test/cmor_speed_and_compression.py
@@ -135,7 +135,7 @@ import os
ltime = cdtime.reltime(ntimes - 1, 'month since 1980').tocomp()
#lcmor = os.stat("CMIP6/CMIP/CSIRO-BOM/NICAM/piControl/r1i1p1f1/Amon/tas/gn/v%s/tas_Amon_piControl_NICAM_r1i1p1f1_gn_198001-%i%.2i.nc" % (today,ltime.year,ltime.month))[6]
lcmor = os.stat(
- "CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r11i1p1f1/Amon/tas/gr/v%s/tas_Amon_piControl-withism_PCMDI-test-1-0_r11i1p1f1_gr_198001-%i%.2i.nc" %
+ "CMIP6/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r11i1p1f1/Amon/tas/gr/v%s/tas_Amon_PCMDI-test-1-0_piControl-withism_r11i1p1f1_gr_198001-%i%.2i.nc" %
(today, ltime.year, ltime.month))[6]
print 'level:', level, "shuffle:", shuffle
print 'total cmor:', totcmor, mincmor, totcmor / ntimes, maxcmor, lcmor
diff --git a/Test/cmor_speed_and_compression_01.py b/Test/cmor_speed_and_compression_01.py
index f57e53e..2044127 100644
--- a/Test/cmor_speed_and_compression_01.py
+++ b/Test/cmor_speed_and_compression_01.py
@@ -121,8 +121,7 @@ import os
ltime = cdtime.reltime(ntimes - 1, 'month since 1980').tocomp()
#lcmor = os.stat("CMIP6/CMIP/CSIRO-BOM/NICAM/piControl/r1i1p1f1/Amon/tas/gn/v%s/tas_Amon_piControl_NICAM_r1i1p1f1_gn_197901-197912.nc"%(today))[6]
lcmor = os.stat(
- "CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r11i1p1f1/Amon/tas/gr/v%s/tas_Amon_piControl-withism_PCMDI-test-1-0_r11i1p1f1_gr_197901-197912.nc" %
- (today))[6]
+ "CMIP6/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r11i1p1f1/Amon/tas/gr/v%s/tas_Amon_PCMDI-test-1-0_piControl-withism_r11i1p1f1_gr_197901-197912.nc" % (today))[6]
print 'level:', level, "shuffle:", shuffle
print 'total cmor:', totcmor, mincmor, totcmor / ntimes, maxcmor, lcmor
lcdms = os.stat("Test/crap.nc")[6]
diff --git a/Test/cmor_speed_and_compression_02.py b/Test/cmor_speed_and_compression_02.py
index 2bed494..824116c 100644
--- a/Test/cmor_speed_and_compression_02.py
+++ b/Test/cmor_speed_and_compression_02.py
@@ -7,7 +7,8 @@ today = strftime("%Y%m%d", localtime())
try:
import cdms2
-except BaseException: print "This test code needs cdms2 interface for i/0"
+except BaseException:
+ print "This test code needs cdms2 interface for i/0"
sys.exit()
cdms2.setNetcdfShuffleFlag(0)
@@ -43,7 +44,7 @@ cmor.setup(
inpath="Test",
set_verbosity=cmor.CMOR_NORMAL,
netcdf_file_action=cmor.CMOR_REPLACE,
- exit_control=cmor.CMOR_EXIT_ON_MAJOR)
+ exit_control=cmor.CMOR_EXIT_ON_MAJOR)
cmor.dataset(
outpath="Test",
experiment_id="2xCO2 equilibrium experiment",
@@ -79,114 +80,118 @@ myaxes = numpy.arange(10)
myvars = numpy.arange(10)
try:
missing_value = s.missing_value[0]
-except BaseException: try:
+except BaseException:
+ try:
missing_value = s.missing_value
- except BaseException: missing_value =None
+ except BaseException:
+ missing_value = None
print 'Missing:', type(missing_value), missing_value
#missing_value = -999.
-myaxes[0] = cmor.axis(table_entry = 'latitude',
- units = 'degrees_north',
- coord_vals= s.getLatitude()[:])
-myaxes[1] = cmor.axis(table_entry = 'longitude',
- units = 'degrees_north',
- coord_vals= s.getLongitude()[:])
+myaxes[0] = cmor.axis(table_entry='latitude',
+ units='degrees_north',
+ coord_vals=s.getLatitude()[:])
+myaxes[1] = cmor.axis(table_entry='longitude',
+ units='degrees_north',
+ coord_vals=s.getLongitude()[:])
-myaxes[2] = cmor.axis(table_entry= 'time',
- units= Tim.units,
- coord_vals= Tim[:ntimes])
+myaxes[2] = cmor.axis(table_entry='time',
+ units=Tim.units,
+ coord_vals=Tim[:ntimes])
pass_axes = [myaxes[2], myaxes[0], myaxes[1]]
-myvars[0] = cmor.variable(table_entry = var,
- units= s.units,
- axis_ids= pass_axes,
- original_name= var,
- history= 'no history',
- comment= 'testing speed',
- missing_value=missing_value,
- tolerance= 1.e-2
- )
+myvars[0] = cmor.variable(table_entry=var,
+ units=s.units,
+ axis_ids=pass_axes,
+ original_name=var,
+ history='no history',
+ comment='testing speed',
+ missing_value=missing_value,
+ tolerance=1.e-2
+ )
import time
import MV2
st = time.time()
-totcmor =0
-totcdms =0
-maxcmor =0
-mincmor =1000
-maxcdms =0
-mincdms =1000
-c0 =st
-f =cdms2.open("Test/crap.nc", "w")
-step =10
+totcmor = 0
+totcdms = 0
+maxcmor = 0
+mincmor = 1000
+maxcdms = 0
+mincdms = 1000
+c0 = st
+f = cdms2.open("Test/crap.nc", "w")
+step = 10
for i in range(0, ntimes, step):
print 'Time:', i
- j1 =i
- j2 =i+step
+ j1 = i
+ j2 = i + step
cmor.write(myvars[0], s[j1:j2].filled(), step, file_suffix="speed-comp-02")
- c =time.time()
+ c = time.time()
# print 'cmor write time:',c-c0
- totcmor +=c-c0
- if maxcmor <c-c0:
- maxcmor =c-c0
- if mincmor >c-c0:
- mincmor =c-c0
- c0 =c
- s2 =s[j1:j2]
- sh =list(s2.shape)
- if len(sh) ==2:
+ totcmor += c - c0
+ if maxcmor < c - c0:
+ maxcmor = c - c0
+ if mincmor > c - c0:
+ mincmor = c - c0
+ c0 = c
+ s2 = s[j1:j2]
+ sh = list(s2.shape)
+ if len(sh) == 2:
sh.insert(0, 1)
- s2 =MV2.reshape(s2, sh)
+ s2 = MV2.reshape(s2, sh)
s2.setAxis(-1, s.getLongitude())
s2.setAxis(-2, s.getLatitude())
- t =cdms2.createAxis([Tim[i],])
- t.id ='time'
- t.units =Tim.units
+ t = cdms2.createAxis([Tim[i], ])
+ t.id = 'time'
+ t.units = Tim.units
t.designateTime()
s2.setAxis(0, t)
f.write(s2, id=var)
- c =time.time()
+ c = time.time()
# print 'cdms time:',c-c0
- totcdms +=c-c0
- if maxcdms <c-c0:
- maxcdms =c-c0
- if mincdms >c-c0:
- mincdms =c-c0
- c0 =c
+ totcdms += c - c0
+ if maxcdms < c - c0:
+ maxcdms = c - c0
+ if mincdms > c - c0:
+ mincdms = c - c0
+ c0 = c
f.close()
cmor.close()
import cdtime
import os
-ltime = cdtime.reltime(Tim[ntimes -1], Tim.units).tocomp()
+ltime = cdtime.reltime(Tim[ntimes - 1], Tim.units).tocomp()
ftime = cdtime.reltime(Tim[0], Tim.units).tocomp()
print ftime, ltime
print (var, var, ftime.year, ftime.month, ltime.year, ltime.month)
-lcmor = os.stat("Test/IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-09a/mon/REALM/%s/r1/%s_A1_pcmdi-09a_r1_%i%.2i-%i%.2i_speed-comp-02.nc" % (var, var, ftime.year, ftime.month, ltime.year, ltime.month))[6]
+lcmor = os.stat(
+ "Test/IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-09a/mon/REALM/%s/r1/%s_A1_pcmdi-09a_r1_%i%.2i-%i%.2i_speed-comp-02.nc" %
+ (var, var, ftime.year, ftime.month, ltime.year, ltime.month))[6]
print 'level:', level, "shuffle:", shuffle
-print 'total cmor:', totcmor, mincmor, totcmor /ntimes, maxcmor, lcmor
+print 'total cmor:', totcmor, mincmor, totcmor / ntimes, maxcmor, lcmor
lcdms = os.stat("Test/crap.nc")[6]
-print 'total cdms:', totcdms, mincdms, totcdms /ntimes, maxcdms, lcdms
-print 'Size diff:', float(lcmor) /float(lcdms)
-print 'speed diff:', totcmor /totcdms
+print 'total cdms:', totcdms, mincdms, totcdms / ntimes, maxcdms, lcdms
+print 'Size diff:', float(lcmor) / float(lcdms)
+print 'speed diff:', totcmor / totcdms
if os.path.exists("summary.txt"):
f = open("summary.txt")
- s =f.read()
+ s = f.read()
f.close()
dic = eval(s)
else:
dic = {}
-dic[(level, shuffle)] =(float(lcmor)/float(lcdms), totcmor/totcdms)
+dic[(level, shuffle)] = (float(lcmor) / float(lcdms), totcmor / totcdms)
for i in range(10):
a = dic.get((i, 0), "N/A")
b = dic.get((i, 1), "N/A")
print 'Level: ', i, "no suffle:", a, "shuffle", b
-f =open("summary.txt", "w")
+f = open("summary.txt", "w")
f.write(repr(dic))
f.close()
diff --git a/Test/common_user_input.json b/Test/common_user_input.json
index 4b63eba..5d5737e 100644
--- a/Test/common_user_input.json
+++ b/Test/common_user_input.json
@@ -33,7 +33,7 @@
"history": "Output from archivcl_A1.nce/giccm_03_std_2xCO2_2256.",
"#comment": "Not required",
- "comment": "Equilibrium reached after 30-year spin-up after which data were output starting with nominal date of January 2030",
+ "comment": "",
"#references": "Not required",
"references": "Model described by Koder and Tolkien (J. Geophys. Res., 2001, 576-591). Also see http://www.GICC.su/giccm/doc/index.html 2XCO2 simulation described in Dorkey et al. '(Clim. Dyn., 2003, 323-357.)'",
diff --git a/Test/speed_test_table_A b/Test/speed_test_table_A
index dfe9013..fdd3dfa 100644
--- a/Test/speed_test_table_A
+++ b/Test/speed_test_table_A
@@ -4,7 +4,6 @@
"approx_interval": "30.00000",
"cmor_version": "3.0",
"forcings": "N/A Nat Ant GHG SD SI SA TO SO Oz LU Sl Vl SS Ds BC MD OC AA",
- "frequency": "mon",
"table_id": "Table Amon",
"table_date": "24 February 2016",
"realm": "atmos",
@@ -535,6 +534,7 @@
},
"variable_entry": {
"sci": {
+ "frequency": "mon",
"comment": "Fraction of time that shallow convection occurs in the grid cell.",
"dimensions": "longitude latitude time",
"positive": "",
@@ -552,12 +552,14 @@
"ok_max_mean_abs": ""
},
"depth_c": {
+ "frequency": "mon",
"units": "",
"long_name": "vertical coordinate formula term: depth_c",
"type": "double",
"dimensions": ""
},
"tro3": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time",
"positive": "",
@@ -575,6 +577,7 @@
"ok_max_mean_abs": "7558"
},
"rsutcs": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -592,6 +595,7 @@
"ok_max_mean_abs": "73.36"
},
"rldscs": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "down",
@@ -609,6 +613,7 @@
"ok_max_mean_abs": "293.8"
},
"n2oglobal": {
+ "frequency": "mon",
"comment": "",
"dimensions": "time",
"positive": "",
@@ -626,6 +631,7 @@
"ok_max_mean_abs": ""
},
"cli": {
+ "frequency": "mon",
"comment": "Includes both large-scale and convective cloud. This is the mass of cloud ice in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
"dimensions": "longitude latitude alevel time",
"positive": "",
@@ -643,6 +649,7 @@
"ok_max_mean_abs": ""
},
"ts": {
+ "frequency": "mon",
"comment": "''skin'' temperature (i.e., SST for open ocean)",
"dimensions": "longitude latitude time",
"positive": "",
@@ -660,6 +667,7 @@
"ok_max_mean_abs": "293.3"
},
"clt": {
+ "frequency": "mon",
"comment": "For the whole atmospheric column, as seen from the surface or the top of the atmosphere. Include both large-scale and convective cloud.",
"dimensions": "longitude latitude time",
"positive": "",
@@ -677,6 +685,7 @@
"ok_max_mean_abs": "84.98"
},
"clw": {
+ "frequency": "mon",
"comment": "Includes both large-scale and convective cloud. This is the mass of cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
"dimensions": "longitude latitude alevel time",
"positive": "",
@@ -694,6 +703,7 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time",
"positive": "",
@@ -711,6 +721,7 @@
"ok_max_mean_abs": "299.8"
},
"psl": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "",
@@ -728,12 +739,14 @@
"ok_max_mean_abs": "1.063e+05"
},
"nsigma": {
+ "frequency": "mon",
"units": "",
"long_name": "vertical coordinate formula term: nsigma",
"type": "integer",
"dimensions": ""
},
"co2Clim": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time2",
"positive": "",
@@ -751,6 +764,7 @@
"ok_max_mean_abs": ""
},
"sfcWind": {
+ "frequency": "mon",
"comment": "near-surface (usually, 10 meters) wind speed.",
"dimensions": "longitude latitude time",
"positive": "",
@@ -768,6 +782,7 @@
"ok_max_mean_abs": ""
},
"ch4Clim": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time2",
"positive": "",
@@ -785,6 +800,7 @@
"ok_max_mean_abs": ""
},
"clwvi": {
+ "frequency": "mon",
"comment": "Mass of condensed (liquid + ice) water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
"dimensions": "longitude latitude time",
"positive": "",
@@ -802,6 +818,7 @@
"ok_max_mean_abs": "0.2846"
},
"rsdscs": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "down",
@@ -819,6 +836,7 @@
"ok_max_mean_abs": "239"
},
"huss": {
+ "frequency": "mon",
"comment": "near-surface (usually, 2 meter) specific humidity.",
"dimensions": "longitude latitude time",
"positive": "",
@@ -836,6 +854,7 @@
"ok_max_mean_abs": "0.008749"
},
"rtmt": {
+ "frequency": "mon",
"comment": "i.e., at the top of that portion of the atmosphere where dynamics are explicitly treated by the model. This is reported only if it differs from the net downward radiative flux at the top of the atmosphere.",
"dimensions": "longitude latitude time",
"positive": "down",
@@ -853,6 +872,7 @@
"ok_max_mean_abs": "89.25"
},
"evspsbl": {
+ "frequency": "mon",
"comment": "at surface; flux of water into the atmosphere due to conversion of both liquid and solid phases to vapor (from underlying surface and vegetation)",
"dimensions": "longitude latitude time",
"positive": "",
@@ -870,12 +890,14 @@
"ok_max_mean_abs": ""
},
"a_bnds": {
+ "frequency": "mon",
"units": "",
"long_name": "vertical coordinate formula term: a(k+1/2)",
"type": "double",
"dimensions": "alevel"
},
"co2": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time",
"positive": "",
@@ -893,6 +915,7 @@
"ok_max_mean_abs": ""
},
"cfc11global": {
+ "frequency": "mon",
"comment": "",
"dimensions": "time",
"positive": "",
@@ -910,6 +933,7 @@
"ok_max_mean_abs": ""
},
"rlds": {
+ "frequency": "mon",
"comment": "This is the 3-hour mean flux.",
"dimensions": "longitude latitude time",
"positive": "down",
@@ -927,12 +951,14 @@
"ok_max_mean_abs": "323.6"
},
"sigma_bnds": {
+ "frequency": "mon",
"units": "",
"long_name": "vertical coordinate formula term: sigma(k+1/2)",
"type": "double",
"dimensions": "olevel"
},
"ch4globalClim": {
+ "frequency": "mon",
"comment": "",
"dimensions": "time2",
"positive": "",
@@ -950,6 +976,7 @@
"ok_max_mean_abs": ""
},
"tauv": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "down",
@@ -967,6 +994,7 @@
"ok_max_mean_abs": "0.08134"
},
"rlut": {
+ "frequency": "mon",
"comment": "at the top of the atmosphere.",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -984,6 +1012,7 @@
"ok_max_mean_abs": "234.4"
},
"rsdt": {
+ "frequency": "mon",
"comment": "at the top of the atmosphere",
"dimensions": "longitude latitude time",
"positive": "down",
@@ -1001,6 +1030,7 @@
"ok_max_mean_abs": "315.8"
},
"rsds": {
+ "frequency": "mon",
"comment": "This is the 3-hour mean flux.",
"dimensions": "longitude latitude time",
"positive": "down",
@@ -1018,12 +1048,14 @@
"ok_max_mean_abs": "181.6"
},
"z1": {
+ "frequency": "mon",
"units": "",
"long_name": "vertical coordinate formula term: z1",
"type": "double",
"dimensions": ""
},
"sbl": {
+ "frequency": "mon",
"comment": "The snow and ice sublimation flux is the loss of snow and ice mass from the surface resulting from their conversion to water vapor that enters the atmosphere.",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1041,6 +1073,7 @@
"ok_max_mean_abs": "9.61e-05"
},
"cfc113global": {
+ "frequency": "mon",
"comment": "",
"dimensions": "time",
"positive": "",
@@ -1058,6 +1091,7 @@
"ok_max_mean_abs": ""
},
"rsus": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1075,6 +1109,7 @@
"ok_max_mean_abs": "43.77"
},
"cfc12global": {
+ "frequency": "mon",
"comment": "",
"dimensions": "time",
"positive": "",
@@ -1092,6 +1127,7 @@
"ok_max_mean_abs": ""
},
"rsut": {
+ "frequency": "mon",
"comment": "at the top of the atmosphere",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1109,6 +1145,7 @@
"ok_max_mean_abs": "114.1"
},
"ci": {
+ "frequency": "mon",
"comment": "Fraction of time that convection occurs in the grid cell .",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1126,6 +1163,7 @@
"ok_max_mean_abs": ""
},
"n2oClim": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time2",
"positive": "",
@@ -1143,6 +1181,7 @@
"ok_max_mean_abs": ""
},
"co2massClim": {
+ "frequency": "mon",
"comment": "",
"dimensions": "time2",
"positive": "",
@@ -1160,6 +1199,7 @@
"ok_max_mean_abs": ""
},
"cl": {
+ "frequency": "mon",
"comment": "Includes both large-scale and convective cloud.",
"dimensions": "longitude latitude alevel time",
"positive": "",
@@ -1177,6 +1217,7 @@
"ok_max_mean_abs": "26.07"
},
"n2oglobalClim": {
+ "frequency": "mon",
"comment": "",
"dimensions": "time2",
"positive": "",
@@ -1194,6 +1235,7 @@
"ok_max_mean_abs": ""
},
"rlutcs": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1211,12 +1253,14 @@
"ok_max_mean_abs": "260.4"
},
"href": {
+ "frequency": "mon",
"units": "",
"long_name": "vertical coordinate formula term: href",
"type": "double",
"dimensions": ""
},
"hfls": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1234,6 +1278,7 @@
"ok_max_mean_abs": "73.2"
},
"co2mass": {
+ "frequency": "mon",
"comment": "",
"dimensions": "time",
"positive": "",
@@ -1251,6 +1296,7 @@
"ok_max_mean_abs": ""
},
"pr": {
+ "frequency": "mon",
"comment": "at surface; includes both liquid and solid phases from all types of clouds (both large-scale and convective)",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1268,6 +1314,7 @@
"ok_max_mean_abs": "3.215e-05"
},
"ps": {
+ "frequency": "mon",
"comment": "surface pressure, not mean sea level pressure",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1285,6 +1332,7 @@
"ok_max_mean_abs": "1.019e+05"
},
"rlus": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1302,12 +1350,14 @@
"ok_max_mean_abs": "376.3"
},
"z2": {
+ "frequency": "mon",
"units": "",
"long_name": "vertical coordinate formula term: z2",
"type": "double",
"dimensions": ""
},
"vas": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1325,6 +1375,7 @@
"ok_max_mean_abs": "2.678"
},
"wap": {
+ "frequency": "mon",
"comment": "commonly referred to as ''omega'', this represents the vertical component of velocity in pressure coordinates (positive down)",
"dimensions": "longitude latitude plevs time",
"positive": "",
@@ -1342,12 +1393,14 @@
"ok_max_mean_abs": "0.04256"
},
"a": {
+ "frequency": "mon",
"units": "",
"long_name": "vertical coordinate formula term: a(k)",
"type": "double",
"dimensions": "alevel"
},
"zg": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time",
"positive": "",
@@ -1365,6 +1418,7 @@
"ok_max_mean_abs": "3.299e+04"
},
"hurs": {
+ "frequency": "mon",
"comment": "This is the relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C.",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1382,6 +1436,7 @@
"ok_max_mean_abs": ""
},
"tsAdjust": {
+ "frequency": "mon",
"comment": "''skin'' temperature (i.e., SST for open ocean)",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1399,6 +1454,7 @@
"ok_max_mean_abs": ""
},
"pfull": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude alevel time2",
"positive": "",
@@ -1416,6 +1472,7 @@
"ok_max_mean_abs": ""
},
"ch4global": {
+ "frequency": "mon",
"comment": "",
"dimensions": "time",
"positive": "",
@@ -1433,6 +1490,7 @@
"ok_max_mean_abs": ""
},
"hur": {
+ "frequency": "mon",
"comment": "This is the relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C.",
"dimensions": "longitude latitude plevs time",
"positive": "",
@@ -1450,6 +1508,7 @@
"ok_max_mean_abs": "97"
},
"hus": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time",
"positive": "",
@@ -1479,6 +1538,7 @@
"dimensions": "alevel"
},
"mc": {
+ "frequency": "mon",
"comment": "The net mass flux should represent the difference between the updraft and downdraft components. The flux is computed as the mass divided by the area of the grid cell.",
"dimensions": "longitude latitude alevhalf time",
"positive": "up",
@@ -1496,6 +1556,7 @@
"ok_max_mean_abs": ""
},
"fco2antt": {
+ "frequency": "mon",
"comment": "This is requested only for the emission-driven coupled carbon climate model runs. Does not include natural fire sources but, includes all anthropogenic sources, including fossil fuel use, cement production, agricultural burning, and sources associated with anthropogenic land use change excluding forest regrowth.",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1513,6 +1574,7 @@
"ok_max_mean_abs": ""
},
"ch4": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time",
"positive": "",
@@ -1530,6 +1592,7 @@
"ok_max_mean_abs": ""
},
"tasmin": {
+ "frequency": "mon",
"comment": "minimum near-surface (usually, 2 meter) air temperature (add cell_method attribute time: min)",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1547,6 +1610,7 @@
"ok_max_mean_abs": "290.6"
},
"tauu": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "down",
@@ -1564,6 +1628,7 @@
"ok_max_mean_abs": "0.1065"
},
"tasmax": {
+ "frequency": "mon",
"comment": "maximum near-surface (usually, 2 meter) air temperature (add cell_method attribute time: max)",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1581,6 +1646,7 @@
"ok_max_mean_abs": "294"
},
"pslAdjust": {
+ "frequency": "mon",
"comment": "not, in general, the same as surface pressure",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1598,12 +1664,14 @@
"ok_max_mean_abs": ""
},
"k_c": {
+ "frequency": "mon",
"units": "",
"long_name": "vertical coordinate formula term: k_c",
"type": "integer",
"dimensions": ""
},
"ua": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time",
"positive": "",
@@ -1621,6 +1689,7 @@
"ok_max_mean_abs": "22.42"
},
"orog": {
+ "frequency": "mon",
"comment": "height above the geoid; as defined here, ''the geoid'' is a surface of constant geopotential that, if the ocean were at rest, would coincide with mean sea level. Under this definition, the geoid changes as the mean volume of the ocean changes (e.g., due to glacial melt, or global warming of the ocean). Report here the height above the present-day geoid. Over ocean, report as 0.0",
"dimensions": "longitude latitude",
"positive": "",
@@ -1638,6 +1707,7 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time",
"positive": "",
@@ -1655,6 +1725,7 @@
"ok_max_mean_abs": "4.679"
},
"n2o": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time",
"positive": "",
@@ -1672,6 +1743,7 @@
"ok_max_mean_abs": ""
},
"prc": {
+ "frequency": "mon",
"comment": "at surface; includes both liquid and solid phases.",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1689,6 +1761,7 @@
"ok_max_mean_abs": "3.209e-05"
},
"tas": {
+ "frequency": "mon",
"deflate": "${DEFLATE_LEVEL}",
"shuffle": "${SHUFFLE}",
"deflate_level": "${DEFLATE_LEVEL}",
@@ -1709,6 +1782,7 @@
"ok_max_mean_abs": "293"
},
"rsuscs": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1726,6 +1800,7 @@
"ok_max_mean_abs": "61.59"
},
"uas": {
+ "frequency": "mon",
"comment": "near-surface (usually, 10 meters) eastward component of wind.",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1743,6 +1818,7 @@
"ok_max_mean_abs": "4.106"
},
"hfss": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1772,6 +1848,7 @@
"dimensions": "alevel"
},
"prw": {
+ "frequency": "mon",
"comment": "vertically integrated through the atmospheric column",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1789,6 +1866,7 @@
"ok_max_mean_abs": "23.09"
},
"prsn": {
+ "frequency": "mon",
"comment": "at surface; includes precipitation of all forms of water in the solid phase",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1806,12 +1884,14 @@
"ok_max_mean_abs": "6.11e-06"
},
"zlev": {
+ "frequency": "mon",
"units": "",
"long_name": "vertical coordinate formula term: zlev(k)",
"type": "double",
"dimensions": "olevel"
},
"fco2nat": {
+ "frequency": "mon",
"comment": "This is what the atmosphere sees (on its own grid). This field should be equivalent to the combined natural fluxes of carbon (requested in the L_mon and O_mon tables) that account for natural exchanges between the atmosphere and land or ocean reservoirs (i.e., ''net ecosystem biospheric productivity'', for land, and ''air to sea CO2 flux'', for ocean.)",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1829,12 +1909,14 @@
"ok_max_mean_abs": ""
},
"b_bnds": {
+ "frequency": "mon",
"units": "",
"long_name": "vertical coordinate formula term: b(k+1/2)",
"type": "double",
"dimensions": "alevel"
},
"phalf": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude alevhalf time2",
"positive": "",
@@ -1852,6 +1934,7 @@
"ok_max_mean_abs": ""
},
"tasAdjust": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1869,6 +1952,7 @@
"ok_max_mean_abs": ""
},
"fco2fos": {
+ "frequency": "mon",
"comment": "This is the prescribed anthropogenic CO2 flux from fossil fuel use, including cement production, and flaring (but not from land-use changes, agricultural burning, forest regrowth, etc.)",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1886,6 +1970,7 @@
"ok_max_mean_abs": ""
},
"hcfc22global": {
+ "frequency": "mon",
"comment": "",
"dimensions": "time",
"positive": "",
@@ -1903,6 +1988,7 @@
"ok_max_mean_abs": ""
},
"tro3Clim": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude plevs time2",
"positive": "",
@@ -1926,6 +2012,7 @@
"dimensions": "olevel"
},
"clivi": {
+ "frequency": "mon",
"comment": "Mass of ice water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeor affects the calculation of radiative transfer in model.",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1943,6 +2030,7 @@
"ok_max_mean_abs": "0.1187"
},
"prAdjust": {
+ "frequency": "mon",
"comment": "at surface; includes both liquid and solid phases from all types of clouds (both large-scale and convective)",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1960,6 +2048,7 @@
"ok_max_mean_abs": ""
},
"cct": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "",
@@ -1983,6 +2072,7 @@
"dimensions": "olevel"
},
"ccb": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude time",
"positive": "",
diff --git a/Test/test_python_CMIP6_CV_forcenoparent.py b/Test/test_python_CMIP6_CV_forcenoparent.py
index 5c442e3..77c3ec6 100644
--- a/Test/test_python_CMIP6_CV_forcenoparent.py
+++ b/Test/test_python_CMIP6_CV_forcenoparent.py
@@ -72,13 +72,13 @@ class TestCase(unittest.TestCase):
for line in lines:
if line.find('replaced') != -1:
count = count + 1
- self.assertEqual(count, 9)
+# self.assertEqual(count, 9)
f.close()
os.unlink(tmpfile[1])
def tearDown(self):
import shutil
- shutil.rmtree("./CMIP6")
+ # shutil.rmtree("./CMIP6")
if __name__ == '__main__':
diff --git a/Test/test_python_filename_time_range.py b/Test/test_python_filename_time_range.py
new file mode 100644
index 0000000..fe9f4c7
--- /dev/null
+++ b/Test/test_python_filename_time_range.py
@@ -0,0 +1,543 @@
+# pylint: disable = missing-docstring, invalid-name
+"""
+Tests that the time range string in the filename is generated correctly.
+"""
+import numpy as np
+import os
+import unittest
+
+import cmor
+
+
+class TestHasCurDatasetAttribute(unittest.TestCase):
+ """
+ Tests for ``cmor.has_cur_dataset_attribute``.
+ """
+
+ def setUp(self):
+ cmor.setup(inpath='Test',
+ netcdf_file_action=cmor.CMOR_REPLACE_4)
+
+ cmor.dataset_json("Test/common_user_input.json")
+
+ self.path = None
+
+ def test_decadal(self):
+ table = 'Tables/CMIP6_Odec.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time',
+ 'units': 'days since 2000-01-01 00:00:00',
+ # we're using the 360 day calendar
+ 'coord_vals': [5 * 360, 15 * 360],
+ 'cell_bounds': [[0, 10 * 360], [10 * 360, 20 * 360]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('hfds', 'W m-2', axis_ids, positive='up')
+ cmor.write(varid, [5., 10.])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'hfds_Odec_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_2005-2015.nc')
+
+ def test_yr(self):
+ table = 'Tables/CMIP6_Eyr.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time',
+ 'units': 'days since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([182.5, 547.5]),
+ 'cell_bounds': [[0, 365], [365, 730]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('baresoilFrac', '%', axis_ids)
+ cmor.write(varid, [40, 60])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'baresoilFrac_Eyr_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_2000-2001.nc')
+
+ def test_mon(self):
+ table = 'Tables/CMIP6_Amon.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time',
+ 'units': 'days since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([15, 45]),
+ 'cell_bounds': [[0, 30], [30, 60]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('ts', 'K', axis_ids)
+ cmor.write(varid, [273, 274])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'ts_Amon_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_200001-200002.nc')
+
+ def test_monclim(self):
+ table = 'Tables/CMIP6_Oclim.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time2',
+ 'units': 'days since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([15, 45]),
+ 'cell_bounds': [[0, 30], [30, 60]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('difmxybo2d', 'm4 s-1', axis_ids)
+ cmor.write(varid, [273, 274])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'difmxybo_Oclim_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_200001-200002-clim.nc')
+
+ def test_day(self):
+ table = 'Tables/CMIP6_Eday.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time',
+ 'units': 'hours since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([12, 36]),
+ 'cell_bounds': [[0, 24], [24, 48]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('ts', 'K', axis_ids)
+ cmor.write(varid, [303, 305])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'ts_Eday_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_20000101-20000102.nc')
+
+ def test_6hr(self):
+ table = 'Tables/CMIP6_6hrLev.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time1',
+ 'units': 'hours since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([3, 9]),
+ 'cell_bounds': [[0, 6], [6, 12]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('ps', 'Pa', axis_ids)
+ cmor.write(varid, [99300, 100000])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'ps_6hrLev_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_200001010300-200001010900.nc')
+
+ def test_3hr(self):
+ table = 'Tables/CMIP6_3hr.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time1',
+ 'units': 'hours since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([1.5, 4.5]),
+ 'cell_bounds': [[0, 3], [3, 6]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('ps', 'Pa', axis_ids)
+ cmor.write(varid, [99300, 100000])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'ps_3hr_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_200001010130-200001010430.nc')
+
+ def test_1hr(self):
+ table = 'Tables/CMIP6_E1hr.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time1',
+ 'units': 'minutes since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([12.5, 37.5]),
+ 'cell_bounds': [[0, 25], [25, 50]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('psl', 'Pa', axis_ids)
+ cmor.write(varid, [99300, 100000])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'psl_E1hr_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_200001010013-200001010038.nc')
+
+ def test_1hrclimmon(self):
+ table = 'Tables/CMIP6_E1hrClimMon.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time3',
+ 'units': 'minutes since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([12.5, 37.5]),
+ 'cell_bounds': [[0., 25.], [25., 50.]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('rlut', 'W m-2', axis_ids, positive='up')
+ cmor.write(varid, [186, 190])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'rlut_E1hrClimMon_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_200001010000-200001010050-clim.nc')
+
+ def test_subhr(self):
+ table = 'Tables/CMIP6_Esubhr.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time1',
+ 'units': 'seconds since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([750, 2250]),
+ 'cell_bounds': [[0, 1500], [1500, 3000]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('pr', 'kg m-2 s-1', axis_ids)
+ cmor.write(varid, [0.000005, 0.000006])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'pr_Esubhr_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_20000101001230-20000101003730.nc')
+
+ def test_day_rounds(self):
+ table = 'Tables/CMIP6_Eday.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time',
+ 'units': 'days since 1960-01-01 00:00:00',
+ 'coord_vals': np.array([0.9999999, 1.9999999]),
+ 'cell_bounds': [[0.9999999 - 0.5, 0.9999999 + 0.5],
+ [0.9999999 + 0.5, 0.9999999 + 1.5]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('ts', 'K', axis_ids)
+ cmor.write(varid, [303, 305])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'ts_Eday_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_19600102-19600103.nc')
+
+ def test_hour_rounds_midnight(self):
+ table = 'Tables/CMIP6_6hrLev.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time1',
+ 'units': 'hours since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([23.99999, 30]),
+ 'cell_bounds': [[20.99999, 27], [27, 33]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('ps', 'Pa', axis_ids)
+ cmor.write(varid, [99300, 100000])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'ps_6hrLev_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_200001020000-200001020600.nc')
+
+ def test_hour_rounds_minutes(self):
+ table = 'Tables/CMIP6_E1hr.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time1',
+ 'units': 'minutes since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([12.6, 37.4])},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('psl', 'Pa', axis_ids)
+ cmor.write(varid, [99300, 100000])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'psl_E1hr_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_200001010013-200001010037.nc')
+
+ def test_subhr_rounds_seconds(self):
+ table = 'Tables/CMIP6_Esubhr.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time1',
+ 'units': 'seconds since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([750.4, 2250.6])},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('pr', 'kg m-2 s-1', axis_ids)
+ cmor.write(varid, [0.000005, 0.000006])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'pr_Esubhr_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_20000101001230-20000101003731.nc')
+
+ def test_monclim_rounding_start_time(self):
+ table = 'Tables/CMIP6_Oclim.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time2',
+ 'units': 'days since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([15, 45]),
+ 'cell_bounds': [[-0.00001, 31], [31, 59]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('difmxybo2d', 'm4 s-1', axis_ids)
+ cmor.write(varid, [273, 274])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'difmxybo_Oclim_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_200001-200002-clim.nc')
+
+ def test_monclim_rounding_end_time(self):
+ """
+ 60 days since 2000-01-01 is 2000-03-01 00:00:00 and so this test makes
+ sure that an end date at the start of the month is displayed as the
+ previous month.
+ """
+ table = 'Tables/CMIP6_Oclim.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'time2',
+ 'units': 'days since 2000-01-01 00:00:00',
+ 'coord_vals': np.array([15, 45]),
+ 'cell_bounds': [[0, 31], [31, 60]]},
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('difmxybo2d', 'm4 s-1', axis_ids)
+ cmor.write(varid, [273, 274])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'difmxybo_Oclim_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr_200001-200002-clim.nc')
+
+ def test_fx(self):
+ table = 'Tables/CMIP6_fx.json'
+ cmor.load_table(table)
+ axes = [
+ {'table_entry': 'latitude',
+ 'units': 'degrees_north',
+ 'coord_vals': [0],
+ 'cell_bounds': [-1, 1]},
+ {'table_entry': 'longitude',
+ 'units': 'degrees_east',
+ 'coord_vals': [90],
+ 'cell_bounds': [89, 91]}
+ ]
+
+ axis_ids = list()
+ for axis in axes:
+ axis_id = cmor.axis(**axis)
+ axis_ids.append(axis_id)
+ varid = cmor.variable('orog', 'm', axis_ids)
+ cmor.write(varid, [273, 274])
+ self.path = cmor.close(varid, file_name=True)
+
+ self.assertEqual(os.path.basename(self.path),
+ 'orog_fx_PCMDI-test-1-0_piControl-withism_'
+ 'r11i1p1f1_gr.nc')
+
+ def tearDown(self):
+ if self.path:
+ if os.path.exists(self.path):
+ os.remove(self.path)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Test/test_python_forecast_time.py b/Test/test_python_forecast_time.py
new file mode 100644
index 0000000..6ac9b0e
--- /dev/null
+++ b/Test/test_python_forecast_time.py
@@ -0,0 +1,102 @@
+
+import cmor._cmor
+import os
+import unittest
+import numpy
+import cdms2
+
+
+class TestForecastTime(unittest.TestCase):
+
+ def setup(self):
+ self.path = None
+
+ def test_ReferenceTime(self):
+ from test_python_common import Time, bnds_time, read_2d_input_files
+ from test_python_common import alats, alons, bnds_lat, bnds_lon
+ from test_python_common import entry2d, units2d, positive2d
+ from test_python_common import varin2d, ntimes, lat, lon
+ dtmp2 = 1.e-4
+
+ myaxes = numpy.zeros(9, dtype='i')
+ myvars = numpy.zeros(9, dtype='i')
+
+ cmor.setup(
+ inpath="Tables",
+ set_verbosity=cmor.CMOR_NORMAL,
+ netcdf_file_action=cmor.CMOR_REPLACE,
+ exit_control=cmor.CMOR_EXIT_ON_MAJOR)
+
+ cmor.dataset_json("Test/common_user_input.json")
+
+ cmor.load_table(os.path.join("CMIP6_Amon.json"))
+
+ # ok we need to make the bounds 2D because the cmor module "undoes
+ # this"
+ bnds_time = numpy.reshape(bnds_time, (bnds_time.shape[0] / 2, 2))
+ bnds_lat = numpy.reshape(bnds_lat, (bnds_lat.shape[0] / 2, 2))
+ bnds_lon = numpy.reshape(bnds_lon, (bnds_lon.shape[0] / 2, 2))
+
+ id = 'time'
+ units = 'months since 1980'
+ myaxes[0] = cmor.axis(
+ id,
+ coord_vals=Time,
+ units=units,
+ cell_bounds=bnds_time,
+ interval="1 month")
+
+ id = 'latitude'
+ units = "degrees_north"
+ myaxes[1] = cmor.axis(
+ id,
+ coord_vals=alats,
+ units=units,
+ cell_bounds=bnds_lat)
+
+ id = "longitude"
+ units = "degrees_east"
+ myaxes[2] = cmor.axis(
+ id,
+ coord_vals=alons,
+ units=units,
+ cell_bounds=bnds_lon)
+
+ id = 'reftime'
+ units = 'months since 1980'
+ myaxes[3] = cmor.axis(
+ id,
+ coord_vals=[20],
+ units=units)
+
+ myvars[0] = cmor.variable(entry2d[0],
+ units2d[0],
+ myaxes[:4],
+ 'd',
+ missing_value=None,
+ tolerance=dtmp2,
+ positive=positive2d[0],
+ original_name=varin2d[0],
+ history="no history",
+ comment="no future")
+
+ # /* ok here we decalre a variable for region axis testing */
+ for i in range(ntimes):
+ data2d = read_2d_input_files(i, varin2d[0], lat, lon)
+ cmor.write(myvars[0], data2d, ntimes_passed=1)
+
+ self.path = cmor.close(var_id=0, file_name=True)
+
+ f = cdms2.open(self.path)
+ self.assertIn('reftime', f.listdimension())
+ data = f['reftime']
+ self.assertEqual(data[0], 600)
+
+ def tearDown(self):
+ if self.path:
+ if os.path.exists(self.path):
+ os.remove(self.path)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Test/test_python_joerg_4.py b/Test/test_python_joerg_4.py
index 3a75cad..b1fd302 100644
--- a/Test/test_python_joerg_4.py
+++ b/Test/test_python_joerg_4.py
@@ -29,8 +29,8 @@ ilon = cmor.axis(
ntimes = 12
plevs = sorted(numpy.array([0, 17.0, 27.0, 37.0, 47.0, 57.0, 68.0, 82.0]))
-plevs_bnds = numpy.array([0, 11, 22.0, 32.0, 42.0, 52.0, 62.5, 75.0, 91.0])
-plevs_bnds.sort()
+plevs_bnds = sorted(numpy.array(
+ [0, 11, 22.0, 32.0, 42.0, 52.0, 62.5, 75.0, 91.0]))
itim = cmor.axis(
table_entry='time',
diff --git a/Test/test_python_user_interface_03.py b/Test/test_python_user_interface_03.py
index 650eacd..e642085 100644
--- a/Test/test_python_user_interface_03.py
+++ b/Test/test_python_user_interface_03.py
@@ -93,7 +93,7 @@ for var in ['tas', ]:
cmor.write(var_id, df)
cmor.close()
# fn = "CMIP6/CMIP/CSIRO-BOM/NICAM/piControl/r1i1p1f1/Amon/%s/gn/v%s/%s_Amon_piControl_NICAM_r1i1p1f1_gn_197901-199605.nc" %(var,today,var)
- fn = "CMIP6/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r11i1p1f1/Amon/%s/gr/v%s/%s_Amon_piControl-withism_PCMDI-test-1-0_r11i1p1f1_gr_197901-199605.nc" % (
+ fn = "/software/cmor3/cmor/CMIP6/CMIP6/ISMIP6/PCMDI/PCMDI-test-1-0/piControl-withism/r11i1p1f1/Amon/%s/gr/v%s/%s_Amon_PCMDI-test-1-0_piControl-withism_r11i1p1f1_gr_197901-199605.nc" % (
var, today, var)
f = cdms2.open(fn)
s = f(var)
diff --git a/Test/test_sophie.f90 b/Test/test_sophie.f90
index eb2a1a4..a655c51 100644
--- a/Test/test_sophie.f90
+++ b/Test/test_sophie.f90
@@ -127,7 +127,7 @@ program testing
DOUBLE PRECISION :: p0array(1)
real, DIMENSION(lev+1) :: a_coeff_bnds
DOUBLE PRECISION, DIMENSION(lev+1) :: b_coeff_bnds
- INTEGER :: ilon, ilat, ipres, ilev, itim,i,ilon2,ilat2
+ INTEGER :: ilon, ilat, ipres, ilev, itim,i,ilon2,ilat2, itype
real :: missing
double precision bt
@@ -179,6 +179,13 @@ program testing
coord_vals=alats, &
cell_bounds=bnds_lat)
+ itype = cmor_axis( &
+ table='Tables/CMIP6_Ofx.json', &
+ table_entry='typesea', &
+ units='', &
+ length=1, &
+ coord_vals=(/"sea"/))
+
print*, 'Test code: ok calling axis stuff lon',ilat
ilon2 = cmor_axis( &
table='Tables/CMIP6_Ofx.json', &
@@ -302,7 +309,7 @@ program testing
table_entry=entry2d(m), &
units=units2d(m), &
! axis_ids=(/ ilon, ilat, itim /), &
- axis_ids=(/ ilon2, ilat2 /), &
+ axis_ids=(/ ilon2, ilat2, itype /), &
missing_value=missing, &
positive=positive2d(m), &
original_name=varin2d(m))
diff --git a/TestTables/CMIP6_3hr.json b/TestTables/CMIP6_3hr.json
index 94bb791..b0479a1 100644
--- a/TestTables/CMIP6_3hr.json
+++ b/TestTables/CMIP6_3hr.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table 3hr",
"realm": "atmos",
- "frequency": "3hr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.125000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"clt": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Cloud Fraction",
"comment": "Total cloud area fraction for the whole atmospheric column, as seen from the surface or the top of the atmosphere. Includes both large-scale and convective cloud.",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"hfls": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_upward_latent_heat_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upward Latent Heat Flux",
"comment": "",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"hfss": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_upward_sensible_heat_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upward Sensible Heat Flux",
"comment": "",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"huss": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Specific Humidity",
"comment": "Near-surface (usually, 2 meter) specific humidity.",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"mrro": {
+ "frequency": "3hr",
"modeling_realm": "land",
"standard_name": "runoff_flux",
"units": "kg m-2 s-1",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"mrsos": {
+ "frequency": "3hr",
"modeling_realm": "land",
"standard_name": "moisture_content_of_soil_layer",
"units": "kg m-2",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"pr": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Precipitation",
"comment": "includes both liquid and solid phases",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"prc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "convective_precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Precipitation",
"comment": "Convective precipitation at surface; includes both liquid and solid phases.",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"prsn": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "snowfall_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Snowfall Flux",
"comment": "at surface; includes precipitation of all forms of water in the solid phase",
@@ -168,10 +176,11 @@
"ok_max_mean_abs": ""
},
"ps": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_air_pressure",
"units": "Pa",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Surface Air Pressure",
"comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
@@ -185,10 +194,11 @@
"ok_max_mean_abs": ""
},
"rlds": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Longwave Radiation",
"comment": "",
@@ -202,10 +212,11 @@
"ok_max_mean_abs": ""
},
"rldscs": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_longwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Clear-Sky Longwave Radiation",
"comment": "Surface downwelling clear-sky longwave radiation",
@@ -219,10 +230,11 @@
"ok_max_mean_abs": ""
},
"rlus": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upwelling Longwave Radiation",
"comment": "",
@@ -236,10 +248,11 @@
"ok_max_mean_abs": ""
},
"rsds": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Shortwave Radiation",
"comment": "surface solar irradiance for UV calculations",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"rsdscs": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Clear-Sky Shortwave Radiation",
"comment": "surface solar irradiance clear sky for UV calculations",
@@ -270,10 +284,11 @@
"ok_max_mean_abs": ""
},
"rsdsdiff": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_diffuse_downwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Diffuse Downwelling Shortwave Radiation",
"comment": "",
@@ -287,10 +302,11 @@
"ok_max_mean_abs": ""
},
"rsus": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upwelling Shortwave Radiation",
"comment": "",
@@ -304,13 +320,14 @@
"ok_max_mean_abs": ""
},
"rsuscs": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upwelling Clear-Sky Shortwave Radiation",
- "comment": "Surface upwelling clear-sky shortwave radiation",
+ "comment": "Surface Upwelling Clear-sky Shortwave Radiation",
"dimensions": "longitude latitude time",
"out_name": "rsuscs",
"type": "real",
@@ -321,10 +338,11 @@
"ok_max_mean_abs": ""
},
"tas": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Air Temperature",
"comment": "near-surface (usually, 2 meter) air temperature",
@@ -338,10 +356,11 @@
"ok_max_mean_abs": ""
},
"tslsi": {
+ "frequency": "3hr",
"modeling_realm": "land",
"standard_name": "surface_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean (comment: over land and sea ice) time: point",
"cell_measures": "area: areacella",
"long_name": "Surface Temperature Where Land or Sea Ice",
"comment": "'skin' temperature of all surfaces except open ocean.",
@@ -355,6 +374,7 @@
"ok_max_mean_abs": ""
},
"tso": {
+ "frequency": "3hr",
"modeling_realm": "ocean",
"standard_name": "sea_surface_temperature",
"units": "K",
@@ -372,10 +392,11 @@
"ok_max_mean_abs": ""
},
"uas": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Eastward Near-Surface Wind Speed",
"comment": "Eastward component of the near-surface (usually, 10 meters) wind",
@@ -389,10 +410,11 @@
"ok_max_mean_abs": ""
},
"vas": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Northward Near-Surface Wind Speed",
"comment": "Northward component of the near surface wind",
diff --git a/TestTables/CMIP6_6hrLev.json b/TestTables/CMIP6_6hrLev.json
index 1f81bba..94e95f6 100644
--- a/TestTables/CMIP6_6hrLev.json
+++ b/TestTables/CMIP6_6hrLev.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table 6hrLev",
"realm": "atmos",
- "frequency": "6hr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.250000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"bs550aer": {
+ "frequency": "6hr",
"modeling_realm": "aerosol",
"standard_name": "volume_lidar_backwards_scattering_coefficient_in_air_due_to_ambient_aerosol_particles",
"units": "m-1 sr-1",
- "cell_methods": "area: mean",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Aerosol backscatter coefficient",
"comment": "Aerosol Backscatter @550nm @ 180 degrees, computed from extinction and lidar ratio",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"ec550aer": {
+ "frequency": "6hr",
"modeling_realm": "aerosol",
"standard_name": "volume_extinction_coefficient_in_air_due_to_ambient_aerosol_particles",
"units": "m-1",
- "cell_methods": "area: mean",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Aerosol extinction coefficient",
"comment": "Aerosol Extinction @550nm",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"hus": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Specific Humidity",
"comment": "",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"pmlev": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "air_pressure",
"units": "Pa",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Air Pressure",
"comment": "The atmospheric pressure at the model layer midpoints for all times and levels in the associated output variables",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"ps": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "surface_air_pressure",
"units": "Pa",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Surface Air Pressure",
"comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -134,6 +140,7 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
diff --git a/TestTables/CMIP6_6hrPlev.json b/TestTables/CMIP6_6hrPlev.json
index c964d35..d5d731b 100644
--- a/TestTables/CMIP6_6hrPlev.json
+++ b/TestTables/CMIP6_6hrPlev.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table 6hrPlev",
"realm": "atmos",
- "frequency": "6hr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.250000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"bldep": {
+ "frequency": "6hr",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_boundary_layer_thickness",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Boundary Layer Depth",
"comment": "Boundary layer depth",
@@ -32,14 +32,15 @@
"ok_max_mean_abs": ""
},
"hurs": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Relative Humidity",
"comment": "The relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C.",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time height2m",
"out_name": "hurs",
"type": "real",
"positive": "",
@@ -49,15 +50,16 @@
"ok_max_mean_abs": ""
},
"hus4": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "area: mean time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Specific Humidity",
"comment": "",
"dimensions": "longitude latitude plev4 time",
- "out_name": "hus4",
+ "out_name": "hus",
"type": "",
"positive": "",
"valid_min": "",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"pr": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Precipitation",
"comment": "includes both liquid and solid phases",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"prhmax": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"psl": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_sea_level",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Sea Level Pressure",
"comment": "Sea Level Pressure",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"rv850": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_relative_vorticity",
"units": "s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Relative Vorticity at 850 hPa",
"comment": "",
@@ -134,14 +140,15 @@
"ok_max_mean_abs": ""
},
"sfcWind": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "wind_speed",
"units": "m s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Wind Speed",
"comment": "near-surface (usually, 10 meters) wind speed.",
- "dimensions": "longitude latitude height10m time",
+ "dimensions": "longitude latitude time height10m",
"out_name": "sfcWind",
"type": "real",
"positive": "",
@@ -151,14 +158,15 @@
"ok_max_mean_abs": ""
},
"tas": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
- "long_name": "Surface Temperature",
+ "long_name": "Surface Air Temperature",
"comment": "near-surface (usually, 2 meter) air temperature",
- "dimensions": "longitude latitude height2m time",
+ "dimensions": "longitude latitude time height2m",
"out_name": "tas",
"type": "float",
"positive": "",
@@ -168,14 +176,15 @@
"ok_max_mean_abs": ""
},
"ua100m": {
- "modeling_realm": "atmos",
+ "frequency": "6hr",
+ "modeling_realm": "",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Eastward Wind at 100m",
"comment": "Zonal wind at 100m height",
- "dimensions": "longitude latitude height100m time",
+ "dimensions": "longitude latitude time height100m",
"out_name": "ua100m",
"type": "",
"positive": "",
@@ -185,6 +194,7 @@
"ok_max_mean_abs": ""
},
"ua200": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -202,6 +212,7 @@
"ok_max_mean_abs": ""
},
"ua850": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -219,16 +230,17 @@
"ok_max_mean_abs": ""
},
"uas": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Eastward Near-Surface Wind",
"comment": "Eastward component of the near-surface (usually, 10 meters) wind",
- "dimensions": "longitude latitude height10m time",
+ "dimensions": "longitude latitude time height10m",
"out_name": "uas",
- "type": "real",
+ "type": "float",
"positive": "",
"valid_min": "",
"valid_max": "",
@@ -236,14 +248,15 @@
"ok_max_mean_abs": ""
},
"va100m": {
- "modeling_realm": "atmos",
+ "frequency": "6hr",
+ "modeling_realm": "",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Northward Wind at 100m",
"comment": "Meridional wind at 100m above the surface.",
- "dimensions": "longitude latitude height100m time",
+ "dimensions": "longitude latitude time height100m",
"out_name": "va100m",
"type": "",
"positive": "",
@@ -253,6 +266,7 @@
"ok_max_mean_abs": ""
},
"va200": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -270,6 +284,7 @@
"ok_max_mean_abs": ""
},
"va850": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -286,16 +301,35 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "vas": {
+ "frequency": "6hr",
+ "modeling_realm": "atmos",
+ "standard_name": "northward_wind",
+ "units": "m s-1",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Northward Near-Surface Wind",
+ "comment": "Northward component of the near surface wind",
+ "dimensions": "longitude latitude time height10m",
+ "out_name": "vas",
+ "type": "float",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"wap4": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
- "cell_methods": "area: mean time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "omega (=dp/dt)",
"comment": "Omega (vertical velocity in pressure coordinates, positive downwards)",
"dimensions": "longitude latitude plev4 time",
- "out_name": "wap4",
+ "out_name": "wap",
"type": "real",
"positive": "",
"valid_min": "",
@@ -304,14 +338,15 @@
"ok_max_mean_abs": ""
},
"wsgmax100m": {
- "modeling_realm": "atmos",
+ "frequency": "6hr",
+ "modeling_realm": "",
"standard_name": "wind_speed_of_gust",
"units": "m s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean time: maximum",
"cell_measures": "area: areacella",
"long_name": "Maximum Wind Speed of Gust at 100m",
"comment": "Wind speed gust maximum at 100m above surface",
- "dimensions": "longitude latitude height100m time",
+ "dimensions": "longitude latitude time height100m",
"out_name": "wsgmax100m",
"type": "",
"positive": "",
@@ -320,11 +355,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "wsgmax10m": {
+ "frequency": "6hr",
+ "modeling_realm": "",
+ "standard_name": "wind_speed_of_gust",
+ "units": "m s-1",
+ "cell_methods": "area: mean time: maximum",
+ "cell_measures": "area: areacella",
+ "long_name": "Maximum Wind Speed of Gust at 10m",
+ "comment": "Wind speed gust maximum at 10m above surface",
+ "dimensions": "longitude latitude time height10m",
+ "out_name": "wsgmax10m",
+ "type": "",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"zg1000": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Geopotential Height at 1000 hPa",
"comment": "Geopotential height on the 1000 hPa surface",
diff --git a/TestTables/CMIP6_6hrPlevPt.json b/TestTables/CMIP6_6hrPlevPt.json
index ea2aa16..6f1a99c 100644
--- a/TestTables/CMIP6_6hrPlevPt.json
+++ b/TestTables/CMIP6_6hrPlevPt.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table 6hrPlevPt",
"realm": "atmos",
- "frequency": "6hr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"albsrfc": {
+ "frequency": "6hr",
"modeling_realm": "aerosol",
"standard_name": "surface_albedo",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "surface albedo",
"comment": "",
@@ -32,15 +32,16 @@
"ok_max_mean_abs": ""
},
"cldicemxrat27": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "cloud_ice_mixing_ratio",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Cloud Ice Mixing Ratio",
"comment": "Cloud ice mixing ratio",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "cldicemxrat27",
+ "out_name": "cldicemxrat",
"type": "",
"positive": "",
"valid_min": "",
@@ -49,15 +50,16 @@
"ok_max_mean_abs": ""
},
"cldwatmxrat27": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "cloud_liquid_water_mixing_ratio",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Cloud Water Mixing Ratio",
"comment": "Cloud water mixing ratio",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "cldwatmxrat27",
+ "out_name": "cldwatmxrat",
"type": "",
"positive": "",
"valid_min": "",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"dtauc": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_optical_thickness_due_to_convective_cloud",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Convective Cloud Optical Depth",
"comment": "This is the in-cloud optical depth obtained by considering only the cloudy portion of the grid cell",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"dtaus": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_optical_thickness_due_to_stratiform_cloud",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Stratiform Cloud Optical Depth",
"comment": "This is the in-cloud optical depth obtained by considering only the cloudy portion of the grid cell.",
@@ -100,32 +104,16 @@
"ok_max_mean_abs": ""
},
"grplmxrat27": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_graupel_in_air",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Graupel Mixing Ratio",
"comment": "Graupel mixing ratio",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "grplmxrat27",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "hus": {
- "modeling_realm": "atmos",
- "standard_name": "specific_humidity",
- "units": "1.0",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
- "long_name": "Specific Humidity",
- "comment": "",
- "dimensions": "longitude latitude plev3 time1",
- "out_name": "hus",
+ "out_name": "grplmxrat",
"type": "",
"positive": "",
"valid_min": "",
@@ -134,15 +122,16 @@
"ok_max_mean_abs": ""
},
"hus27": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Specific Humidity",
"comment": "",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "hus27",
+ "out_name": "hus",
"type": "",
"positive": "",
"valid_min": "",
@@ -151,15 +140,16 @@
"ok_max_mean_abs": ""
},
"hus7h": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Specific Humidity",
"comment": "",
"dimensions": "longitude latitude plev7h time1",
- "out_name": "hus7h",
+ "out_name": "hus",
"type": "",
"positive": "",
"valid_min": "",
@@ -168,14 +158,15 @@
"ok_max_mean_abs": ""
},
"huss": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Specific Humidity",
"comment": "Near-surface (usually, 2 meter) specific humidity.",
- "dimensions": "longitude latitude time1",
+ "dimensions": "longitude latitude time1 height2m",
"out_name": "huss",
"type": "real",
"positive": "",
@@ -185,10 +176,11 @@
"ok_max_mean_abs": ""
},
"lwsffluxaero": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "longwave__flux__due_to_volcanic_aerosols_at_the_surface",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Longwave flux due to volcanic aerosols at the surface",
"comment": "downwelling longwave flux due to volcanic aerosols at the surface to be diagnosed through double radiation call",
@@ -202,10 +194,11 @@
"ok_max_mean_abs": ""
},
"lwtoafluxaerocs": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "longwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Longwave flux due to volcanic aerosols at TOA under clear sky",
"comment": "downwelling longwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call",
@@ -219,6 +212,7 @@
"ok_max_mean_abs": ""
},
"mrlsl": {
+ "frequency": "6hr",
"modeling_realm": "land",
"standard_name": "moisture_content_of_soil_layer",
"units": "kg m-2",
@@ -236,6 +230,7 @@
"ok_max_mean_abs": ""
},
"mrsos": {
+ "frequency": "6hr",
"modeling_realm": "land",
"standard_name": "moisture_content_of_soil_layer",
"units": "kg m-2",
@@ -252,28 +247,12 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "pfull27": {
- "modeling_realm": "atmos",
- "standard_name": "air_pressure",
- "units": "Pa",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
- "long_name": "Pressure on Model Levels",
- "comment": "Air pressure on model levels",
- "dimensions": "longitude latitude plev27 time1",
- "out_name": "pfull27",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"psl": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_sea_level",
"units": "Pa",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Sea Level Pressure",
"comment": "Sea Level Pressure",
@@ -287,15 +266,16 @@
"ok_max_mean_abs": ""
},
"rainmxrat27": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_rain_in_air",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "rain_mixing_ratio",
"comment": "Rain mixing ratio",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "rainmxrat27",
+ "out_name": "rainmxrat",
"type": "",
"positive": "",
"valid_min": "",
@@ -304,10 +284,11 @@
"ok_max_mean_abs": ""
},
"rv850": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_relative_vorticity",
"units": "s-1",
- "cell_methods": "area: mean",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Relative Vorticity at 850 hPa",
"comment": "",
@@ -321,14 +302,15 @@
"ok_max_mean_abs": ""
},
"sfcWind": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "wind_speed",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Wind Speed",
"comment": "near-surface (usually, 10 meters) wind speed.",
- "dimensions": "longitude latitude time1",
+ "dimensions": "longitude latitude time1 height10m",
"out_name": "sfcWind",
"type": "real",
"positive": "",
@@ -338,15 +320,16 @@
"ok_max_mean_abs": ""
},
"snowmxrat27": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_snow_in_air",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "snow_mixing_ratio",
"comment": "Snow mixing ratio",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "snowmxrat27",
+ "out_name": "snowmxrat",
"type": "",
"positive": "",
"valid_min": "",
@@ -355,10 +338,11 @@
"ok_max_mean_abs": ""
},
"snw": {
+ "frequency": "6hr",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_amount",
"units": "kg m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Surface Snow Amount",
"comment": "The mass of surface snow on the land portion of the grid cell divided by the land area in the grid cell; reported as missing where the land fraction is 0; excludes snow on vegetation canopy or on sea ice.",
@@ -372,10 +356,11 @@
"ok_max_mean_abs": ""
},
"swsffluxaero": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "shortwave__flux_due_to_volcanic_aerosols_at__the_surface",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Shortwave heating rate due to volcanic aerosols",
"comment": "shortwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required",
@@ -389,10 +374,11 @@
"ok_max_mean_abs": ""
},
"swtoafluxaerocs": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "shortwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Shortwave flux due to volcanic aerosols at TOA under clear sky",
"comment": "downwelling shortwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call",
@@ -406,16 +392,17 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
"dimensions": "longitude latitude plev3 time1",
"out_name": "ta",
- "type": "",
+ "type": "real",
"positive": "",
"valid_min": "",
"valid_max": "",
@@ -423,15 +410,16 @@
"ok_max_mean_abs": ""
},
"ta27": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "ta27",
+ "out_name": "ta",
"type": "",
"positive": "",
"valid_min": "",
@@ -440,15 +428,16 @@
"ok_max_mean_abs": ""
},
"ta7h": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
"dimensions": "longitude latitude plev7h time1",
- "out_name": "ta7h",
+ "out_name": "ta",
"type": "",
"positive": "",
"valid_min": "",
@@ -457,14 +446,15 @@
"ok_max_mean_abs": ""
},
"tas": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "Surface Temperature",
+ "long_name": "Surface Air Temperature",
"comment": "near-surface (usually, 2 meter) air temperature",
- "dimensions": "longitude latitude time1",
+ "dimensions": "longitude latitude time1 height2m",
"out_name": "tas",
"type": "float",
"positive": "",
@@ -474,10 +464,11 @@
"ok_max_mean_abs": ""
},
"ts": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "surface_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Surface Temperature",
"comment": "Temperature of the lower boundary of the atmosphere",
@@ -491,6 +482,7 @@
"ok_max_mean_abs": ""
},
"tsl": {
+ "frequency": "6hr",
"modeling_realm": "land",
"standard_name": "soil_temperature",
"units": "K",
@@ -508,10 +500,11 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Eastward Wind",
"comment": "",
@@ -525,15 +518,16 @@
"ok_max_mean_abs": ""
},
"ua7h": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Eastward Wind",
"comment": "",
"dimensions": "longitude latitude plev7h time1",
- "out_name": "ua7h",
+ "out_name": "ua",
"type": "",
"positive": "",
"valid_min": "",
@@ -542,16 +536,17 @@
"ok_max_mean_abs": ""
},
"uas": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Eastward Near-Surface Wind",
"comment": "Eastward component of the near-surface (usually, 10 meters) wind",
- "dimensions": "longitude latitude height10m time1",
+ "dimensions": "longitude latitude time1 height10m",
"out_name": "uas",
- "type": "real",
+ "type": "float",
"positive": "",
"valid_min": "",
"valid_max": "",
@@ -559,10 +554,11 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Northward Wind",
"comment": "",
@@ -576,15 +572,16 @@
"ok_max_mean_abs": ""
},
"va7h": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Northward Wind",
"comment": "",
"dimensions": "longitude latitude plev7h time1",
- "out_name": "va7h",
+ "out_name": "va",
"type": "",
"positive": "",
"valid_min": "",
@@ -593,14 +590,15 @@
"ok_max_mean_abs": ""
},
"vas": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Northward Near-Surface Wind",
"comment": "Northward component of the near surface wind",
- "dimensions": "longitude latitude height10m time1",
+ "dimensions": "longitude latitude time1 height10m",
"out_name": "vas",
"type": "real",
"positive": "",
@@ -610,6 +608,7 @@
"ok_max_mean_abs": ""
},
"vortmean": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_relative_vorticity",
"units": "s-1",
@@ -617,7 +616,7 @@
"cell_measures": "area: areacella",
"long_name": "atmosphere_relative_vorticity",
"comment": "Mean vorticity over 850,700,600 hPa",
- "dimensions": "longitude latitude pl700 time1",
+ "dimensions": "longitude latitude time1 pl700",
"out_name": "vortmean",
"type": "",
"positive": "",
@@ -627,15 +626,16 @@
"ok_max_mean_abs": ""
},
"wbptemp7h": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "wet_bulb_potential_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "wet_bulb_potential_temperature",
"comment": "Wet bulb potential temperature",
"dimensions": "longitude latitude plev7h time1",
- "out_name": "wbptemp7h",
+ "out_name": "wbptemp",
"type": "",
"positive": "",
"valid_min": "",
@@ -643,33 +643,17 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "zg": {
- "modeling_realm": "atmos",
- "standard_name": "geopotential_height",
- "units": "m",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
- "long_name": "Geopotential Height",
- "comment": "",
- "dimensions": "longitude latitude plev3 time1",
- "out_name": "zg",
- "type": "float",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"zg27": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Geopotential Height",
"comment": "",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "zg27",
+ "out_name": "zg",
"type": "float",
"positive": "",
"valid_min": "",
@@ -678,10 +662,11 @@
"ok_max_mean_abs": ""
},
"zg500": {
+ "frequency": "6hr",
"modeling_realm": "aerosol",
"standard_name": "geopotential_height",
"units": "m",
- "cell_methods": "area: mean",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Geopotential Height at 500 hPa",
"comment": "geopotential height on the 500 hPa surface",
@@ -695,15 +680,16 @@
"ok_max_mean_abs": ""
},
"zg7h": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Geopotential Height",
"comment": "",
"dimensions": "longitude latitude plev7h time1",
- "out_name": "zg7h",
+ "out_name": "zg",
"type": "float",
"positive": "",
"valid_min": "",
diff --git a/TestTables/CMIP6_AERday.json b/TestTables/CMIP6_AERday.json
index 61f202a..a243f3d 100644
--- a/TestTables/CMIP6_AERday.json
+++ b/TestTables/CMIP6_AERday.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table AERday",
"realm": "aerosol",
- "frequency": "day",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"cod": {
+ "frequency": "day",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_cloud",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "cloud optical depth",
"comment": "",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"maxpblz": {
+ "frequency": "day",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_boundary_layer_thickness",
"units": "m",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"minpblz": {
+ "frequency": "day",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_boundary_layer_thickness",
"units": "m",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"od550aer": {
+ "frequency": "day",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_ambient_aerosol_particles",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "ambient aerosol optical thickness at 550 nm",
"comment": "AOD from the ambient aerosls (i.e., includes aerosol water). Does not include AOD from stratospheric aerosols if these are prescribed but includes other possible background aerosol types. Needs a comment attribute 'wavelength: 550 nm'",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"sfo3max": {
+ "frequency": "day",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_ozone_in_air",
"units": "mol mol-1",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"toz": {
+ "frequency": "day",
"modeling_realm": "aerosol",
"standard_name": "equivalent_thickness_at_stp_of_atmosphere_ozone_content",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Column Ozone",
"comment": "total ozone column in DU",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"ua10": {
+ "frequency": "day",
"modeling_realm": "aerosol",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -134,6 +140,7 @@
"ok_max_mean_abs": ""
},
"zg10": {
+ "frequency": "day",
"modeling_realm": "aerosol",
"standard_name": "geopotential_height",
"units": "m",
@@ -151,6 +158,7 @@
"ok_max_mean_abs": ""
},
"zg100": {
+ "frequency": "day",
"modeling_realm": "aerosol",
"standard_name": "geopotential_height",
"units": "m",
@@ -168,6 +176,7 @@
"ok_max_mean_abs": ""
},
"zg1000": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
@@ -185,6 +194,7 @@
"ok_max_mean_abs": ""
},
"zg500": {
+ "frequency": "day",
"modeling_realm": "aerosol",
"standard_name": "geopotential_height",
"units": "m",
diff --git a/TestTables/CMIP6_AERfx.json b/TestTables/CMIP6_AERfx.json
index fcc5c8a..26122cc 100644
--- a/TestTables/CMIP6_AERfx.json
+++ b/TestTables/CMIP6_AERfx.json
@@ -3,7 +3,6 @@
"data_specs_version": "01.00.03",
"table_id": "Table AERfx",
"realm": "aerosol",
- "frequency": "fx",
"cmor_version": "3.2",
"table_date": "24 February 2017",
"missing_value": "1e20",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"areacella": {
+ "frequency": "fx",
"modeling_realm": "aerosol",
"standard_name": "cell_area",
"units": "m2",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"sftlf": {
+ "frequency": "fx",
"modeling_realm": "aerosol",
"standard_name": "land_area_fraction",
"units": "1",
diff --git a/TestTables/CMIP6_AERhr.json b/TestTables/CMIP6_AERhr.json
index aa953a3..f1da671 100644
--- a/TestTables/CMIP6_AERhr.json
+++ b/TestTables/CMIP6_AERhr.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table AERhr",
"realm": "aerosol",
- "frequency": "hr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"ps": {
- "modeling_realm": "aerosol",
+ "frequency": "1hr",
+ "modeling_realm": "atmos",
"standard_name": "surface_air_pressure",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface pressure",
"comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"sfno2": {
+ "frequency": "1hr",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_nitrogen_dioxide_in_air",
"units": "mol mol-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "NO2 volume mixing ratio in lowest model layer",
"comment": "",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"sfo3": {
+ "frequency": "1hr",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_ozone_in_air",
"units": "mol mol-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "O3 volume mixing ratio in lowest model layer",
"comment": "",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"sfpm25": {
+ "frequency": "1hr",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_pm2p5_ambient_aerosol_particles_in_air",
"units": "kg kg-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "PM2.5 mass mixing ratio in lowest model layer",
"comment": "",
@@ -83,14 +86,15 @@
"ok_max_mean_abs": ""
},
"tas": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Temperature",
"comment": "near-surface (usually, 2 meter) air temperature",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time height2m",
"out_name": "tas",
"type": "float",
"positive": "",
diff --git a/TestTables/CMIP6_AERmon.json b/TestTables/CMIP6_AERmon.json
index ef06a8e..afe611d 100644
--- a/TestTables/CMIP6_AERmon.json
+++ b/TestTables/CMIP6_AERmon.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table AERmon",
"realm": "aerosol",
- "frequency": "mon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"abs550aer": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_absorption_optical_thickness_due_to_ambient_aerosol",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "ambient aerosol absorption optical thickness at 550 nm",
"comment": "",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"airmass": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_mass_of_air_per_unit_area",
"units": "kg m-2",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"albs": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "surface_albedo",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "planetary albedo",
"comment": "Grid cell average albedo for all wavelengths.",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"albsrfc": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "surface_albedo",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "surface albedo",
"comment": "",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"aoanh": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tracer_lifetime",
"units": "yr",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"bldep": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_boundary_layer_thickness",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Boundary Layer Depth",
"comment": "Boundary layer depth",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"c2h2": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_ethyne_in_air",
"units": "mol mol-1",
@@ -134,6 +140,7 @@
"ok_max_mean_abs": ""
},
"c2h6": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_ethane_in_air",
"units": "mol mol-1",
@@ -151,6 +158,7 @@
"ok_max_mean_abs": ""
},
"c3h6": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_propene_in_air",
"units": "mol mol-1",
@@ -168,6 +176,7 @@
"ok_max_mean_abs": ""
},
"c3h8": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_propane_in_air",
"units": "mol mol-1",
@@ -185,10 +194,11 @@
"ok_max_mean_abs": ""
},
"ccn": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "number_concentration_of_cloud_condensation_nuclei_at_stp_in_air",
"units": "m-3",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "cloud condensation nuclei concentration at liquid cloud top",
"comment": "proposed name: number_concentration_of_ambient_aerosol_in_air_at_liquid_water_cloud_top",
@@ -202,12 +212,13 @@
"ok_max_mean_abs": ""
},
"cdnc": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "number_concentration_of_cloud_liquid_water_particles_in_air",
"units": "m-3",
"cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
- "long_name": "cloud droplet number concentration",
+ "long_name": "Cloud Liquid Droplet Number Concentration",
"comment": "Cloud Droplet Number Concentration in liquid water clouds.",
"dimensions": "longitude latitude alevel time",
"out_name": "cdnc",
@@ -219,6 +230,7 @@
"ok_max_mean_abs": ""
},
"ch3coch3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_acetone_in_air",
"units": "mol mol-1",
@@ -236,6 +248,7 @@
"ok_max_mean_abs": ""
},
"ch4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_methane_in_air",
"units": "mol mol-1",
@@ -253,6 +266,7 @@
"ok_max_mean_abs": ""
},
"cheaqpso4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_sulfate_dry_aerosol_particles_due_to_aqueous_phase_net_chemical_production",
"units": "kg m-2 s-1",
@@ -270,6 +284,7 @@
"ok_max_mean_abs": ""
},
"chegpso4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_sulfate_dry_aerosol_particles_due_to_gaseous_phase_net_chemical_production",
"units": "kg m-2 s-1",
@@ -287,10 +302,11 @@
"ok_max_mean_abs": ""
},
"chepasoa": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_secondary_particulate_organic_matter_dry_aerosol_particles_due_to_net_chemical_production",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total net production of anthropogenic secondary organic aerosol",
"comment": "anthropogenic part of chepsoa",
@@ -304,10 +320,11 @@
"ok_max_mean_abs": ""
},
"chepsoa": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_secondary_particulate_organic_matter_dry_aerosol_particles_due_to_net_chemical_production",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "chemical production of dry aerosol secondary organic matter",
"comment": "If model lumps SOA emissions with POA, then the sum of POA and SOA emissions is reported as OA emissions. ''mass'' refers to the mass of primary organic matter, not mass of organic carbon alone.",
@@ -321,10 +338,11 @@
"ok_max_mean_abs": ""
},
"cltc": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "convective_cloud_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Cloud Area Fraction",
"comment": "Convective cloud area fraction for the whole atmospheric column, as seen from the surface or the top of the atmosphere. Includes only convective cloud.",
@@ -337,24 +355,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "cnpz": {
- "modeling_realm": "aerosol",
- "standard_name": "canopy_height",
- "units": "m",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "canopy height",
- "comment": "",
- "dimensions": "longitude latitude time",
- "out_name": "cnpz",
- "type": "float",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"co": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_carbon_monoxide_in_air",
"units": "mol mol-1",
@@ -372,6 +374,7 @@
"ok_max_mean_abs": ""
},
"co2": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_carbon_dioxide_in_air",
"units": "mol mol-1",
@@ -389,10 +392,11 @@
"ok_max_mean_abs": ""
},
"cod": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_cloud",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "cloud optical depth",
"comment": "",
@@ -406,6 +410,7 @@
"ok_max_mean_abs": ""
},
"dms": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_dimethyl_sulfide_in_air",
"units": "mol mol-1",
@@ -423,10 +428,11 @@
"ok_max_mean_abs": ""
},
"drybc": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_elemental_carbon_dry_aerosol_particles_due_to_dry_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "dry deposition rate of black carbon aerosol mass",
"comment": "Dry deposition includes gravitational settling, impact scavenging, and turbulent deposition.",
@@ -440,10 +446,11 @@
"ok_max_mean_abs": ""
},
"drydust": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_dust_dry_aerosol_particles_due_to_dry_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "dry deposition rate of dust",
"comment": "Dry deposition includes gravitational settling, impact scavenging, and turbulent deposition.",
@@ -457,10 +464,11 @@
"ok_max_mean_abs": ""
},
"drynh3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_ammonia_due_to_dry_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "dry deposition rate of nh3",
"comment": "dry deposition includes gravitational settling, impact scavenging, and turbulent deposition",
@@ -474,10 +482,11 @@
"ok_max_mean_abs": ""
},
"drynh4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_ammonium_dry_aerosol_particles_due_to_dry_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "dry deposition rate of nh4",
"comment": "dry deposition includes gravitational settling, impact scavenging, and turbulent deposition",
@@ -491,10 +500,11 @@
"ok_max_mean_abs": ""
},
"drynoy": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_noy_expressed_as_nitrogen_due_to_dry_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "dry deposition rate of noy",
"comment": "NOy is the sum of all simulated oxidized nitrogen species out of NO, NO2, HNO3, HNO4, NO3aerosol, NO3(radical), N2O5, PAN, other organic nitrates. Dry deposition includes gravitational settling, impact scavenging, and turbulent deposition.",
@@ -508,10 +518,11 @@
"ok_max_mean_abs": ""
},
"dryo3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_ozone_due_to_dry_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "dry deposition rate of o3",
"comment": "dry deposition includes gravitational settling, impact scavenging, and turbulent deposition.",
@@ -525,10 +536,11 @@
"ok_max_mean_abs": ""
},
"dryoa": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_particulate_organic_matter_dry_aerosol_particles_due_to_dry_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "dry deposition rate of dry aerosol total organic matter",
"comment": "Tendency of atmosphere mass content of organic dry aerosol due to dry deposition: This is the sum of dry deposition of POA and dry deposition of SOA (see next two entries). 'Mass' refers to the mass of organic matter, not mass of organic carbon alone. We recommend a scale factor of POM=1.4*OC, unless your model has more detailed info available. Was called dry_pom in old ACCMIP Excel table. Dry deposition includes gravitational settling, impact scavenging, and tur [...]
@@ -542,10 +554,11 @@
"ok_max_mean_abs": ""
},
"dryso2": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_sulfur_dioxide_due_to_dry_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "dry deposition rate of so2",
"comment": "dry deposition includes gravitational settling, impact scavenging, and turbulent deposition",
@@ -559,10 +572,11 @@
"ok_max_mean_abs": ""
},
"dryso4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_sulfate_dry_aerosol_particles_due_to_dry_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "dry deposition rate of so4",
"comment": "dry deposition includes gravitational settling, impact scavenging, and turbulent deposition",
@@ -576,10 +590,11 @@
"ok_max_mean_abs": ""
},
"dryss": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_seasalt_dry_aerosol_particles_due_to_dry_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "dry deposition rate of seasalt",
"comment": "Dry deposition includes gravitational settling, impact scavenging, and turbulent deposition.",
@@ -593,10 +608,11 @@
"ok_max_mean_abs": ""
},
"emiaco": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_carbon_monoxide_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission rate of anthropogenic co",
"comment": "anthrophogenic emission of CO",
@@ -610,10 +626,11 @@
"ok_max_mean_abs": ""
},
"emianox": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_nox_expressed_as_nitrogen_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "anthropogenic emission rate of nox",
"comment": "Store flux as Nitrogen. Anthropogenic fraction. NOx=NO+NO2, Includes agricultural waste burning but no other biomass burning. Integrate 3D emission field vertically to 2d field.",
@@ -627,10 +644,11 @@
"ok_max_mean_abs": ""
},
"emiaoa": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_particulate_organic_matter_dry_aerosol_particles_due_to_net_chemical_production_and_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission of anthropogenic organic aerosol",
"comment": "anthropogenic part of emioa",
@@ -644,10 +662,11 @@
"ok_max_mean_abs": ""
},
"emibc": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_elemental_carbon_dry_aerosol_particles_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "emission rate of black carbon aerosol mass",
"comment": "Integrate 3D emission field vertically to 2d field.",
@@ -661,10 +680,11 @@
"ok_max_mean_abs": ""
},
"emibvoc": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_biogenic_nmvoc_expressed_as_carbon_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission rate of biogenic nmvoc",
"comment": "Integrate 3D emission field vertically to 2d field._If_ fixed molecular weight of NMVOC is not available in model, please provide in units of kilomole m-2 s-1 (i.e. kg m-2 s-1 as if model NMVOC had molecular weight of 1) and add a comment to your file.",
@@ -678,10 +698,11 @@
"ok_max_mean_abs": ""
},
"emico": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_carbon_monoxide_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission rate of co",
"comment": "Integrate 3D emission field vertically to 2d field.",
@@ -695,10 +716,11 @@
"ok_max_mean_abs": ""
},
"emidms": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_dimethyl_sulfide_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission rate of dms",
"comment": "Integrate 3D emission field vertically to 2d field.",
@@ -712,10 +734,11 @@
"ok_max_mean_abs": ""
},
"emidust": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_dust_dry_aerosol_particles_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission rate of dust",
"comment": "Integrate 3D emission field vertically to 2d field.",
@@ -729,10 +752,11 @@
"ok_max_mean_abs": ""
},
"emiisop": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_isoprene_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission rate of isoprene",
"comment": "Integrate 3D emission field vertically to 2d field",
@@ -746,6 +770,7 @@
"ok_max_mean_abs": ""
},
"emilnox": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_moles_of_nox_expressed_as_nitrogen",
"units": "mol s-1",
@@ -763,10 +788,11 @@
"ok_max_mean_abs": ""
},
"eminh3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_ammonia_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission rate of nh3",
"comment": "Integrate 3D emission field vertically to 2d field.",
@@ -780,10 +806,11 @@
"ok_max_mean_abs": ""
},
"eminox": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_nox_expressed_as_nitrogen_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission rate of nox",
"comment": "NOx=NO+NO2. Integrate 3D emission field vertically to 2d field.",
@@ -797,10 +824,11 @@
"ok_max_mean_abs": ""
},
"emioa": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_particulate_organic_matter_dry_aerosol_particles_due_to_net_chemical_production_and_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "primary emission and chemical production of dry aerosol organic matter",
"comment": "This is the sum of total emission of POA and total production of SOA (emipoa+chepsoa). ''Mass'' refers to the mass of organic matter, not mass of organic carbon alone. We recommend a scale factor of POM=1.4*OC, unless your model has more detailed info available. Integrate 3D chemical production and emission field vertically to 2d field.",
@@ -814,10 +842,11 @@
"ok_max_mean_abs": ""
},
"emiso2": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_sulfur_dioxide_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission rate of so2",
"comment": "Integrate 3D emission field vertically to 2d field.",
@@ -831,10 +860,11 @@
"ok_max_mean_abs": ""
},
"emiso4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_sulfate_dry_aerosol_particles_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total direct emission rate of so4",
"comment": "Direct primary emission does not include secondary sulfate production. Integrate 3D emission field vertically to 2d field.",
@@ -848,10 +878,11 @@
"ok_max_mean_abs": ""
},
"emiss": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_seasalt_dry_aerosol_particles_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission rate of seasalt",
"comment": "Integrate 3D emission field vertically to 2d field.",
@@ -865,10 +896,11 @@
"ok_max_mean_abs": ""
},
"emivoc": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_nmvoc_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total emission rate of nmvoc",
"comment": "Integrate 3D emission field vertically to 2d field. _If_ fixed molecular weight of NMVOC is not available in model, please provide in units of kilomole m-2 s-1 (i.e. kg m-2 s-1 as if model NMVOC had molecular weight of 1) and add a comment to your file.",
@@ -882,12 +914,13 @@
"ok_max_mean_abs": ""
},
"h2o": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_water_in_air",
"units": "1.0",
"cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
- "long_name": "Water vapour volume mixing ratio",
+ "long_name": "Mass Fraction of Water",
"comment": "includes all phases of water",
"dimensions": "longitude latitude alevel time",
"out_name": "h2o",
@@ -899,6 +932,7 @@
"ok_max_mean_abs": ""
},
"hcho": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_formaldehyde_in_air",
"units": "mol mol-1",
@@ -916,6 +950,7 @@
"ok_max_mean_abs": ""
},
"hcl": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_hydrogen_chloride_in_air",
"units": "mol mol-1",
@@ -933,6 +968,7 @@
"ok_max_mean_abs": ""
},
"hno3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_nitric_acid_in_air",
"units": "mol mol-1",
@@ -950,6 +986,7 @@
"ok_max_mean_abs": ""
},
"isop": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_isoprene_in_air",
"units": "mol mol-1",
@@ -967,6 +1004,7 @@
"ok_max_mean_abs": ""
},
"jno2": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "photolysis_rate_of_nitrogen_dioxide",
"units": "s-1",
@@ -984,6 +1022,7 @@
"ok_max_mean_abs": ""
},
"lossch4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mole_concentration_of_methane_due_to_chemical_destruction",
"units": "mol m-3 s-1",
@@ -1001,6 +1040,7 @@
"ok_max_mean_abs": ""
},
"lossco": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_of_mole_concentration_of_carbon_monoxide_due_to_chemical_destruction",
"units": "mol m-3 s-1",
@@ -1018,6 +1058,7 @@
"ok_max_mean_abs": ""
},
"lossn2o": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_of_mole_concentration_of_nitrous_oxide_due_to_chemical_destruction",
"units": "mol m-3 s-1",
@@ -1035,10 +1076,11 @@
"ok_max_mean_abs": ""
},
"lwp": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_mass_content_of_cloud_liquid_water",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "liquid water path",
"comment": "",
@@ -1052,6 +1094,7 @@
"ok_max_mean_abs": ""
},
"mmraerh2o": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_water_in_ambient_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1069,6 +1112,7 @@
"ok_max_mean_abs": ""
},
"mmrbc": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_elemental_carbon_dry_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1086,6 +1130,7 @@
"ok_max_mean_abs": ""
},
"mmrdust": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_dust_dry_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1103,6 +1148,7 @@
"ok_max_mean_abs": ""
},
"mmrnh4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_ammonium_dry_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1120,6 +1166,7 @@
"ok_max_mean_abs": ""
},
"mmrno3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_nitrate_dry_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1137,6 +1184,7 @@
"ok_max_mean_abs": ""
},
"mmroa": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_particulate_organic_matter_dry_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1154,6 +1202,7 @@
"ok_max_mean_abs": ""
},
"mmrpm1": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_pm1_dry_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1171,6 +1220,7 @@
"ok_max_mean_abs": ""
},
"mmrpm10": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_pm10_ambient_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1188,6 +1238,7 @@
"ok_max_mean_abs": ""
},
"mmrpm2p5": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_pm2p5_dry_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1205,6 +1256,7 @@
"ok_max_mean_abs": ""
},
"mmrso4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_sulfate_dry_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1222,6 +1274,7 @@
"ok_max_mean_abs": ""
},
"mmrsoa": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_secondary_particulate_organic_matter_dry_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1239,6 +1292,7 @@
"ok_max_mean_abs": ""
},
"mmrss": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_seasalt_dry_aerosol_particles_in_air",
"units": "kg kg-1",
@@ -1256,6 +1310,7 @@
"ok_max_mean_abs": ""
},
"n2o": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_nitrous_oxide_in_air",
"units": "mol mol-1",
@@ -1273,6 +1328,7 @@
"ok_max_mean_abs": ""
},
"nh50": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_artificial_tracer_with_fixed_lifetime_in_air",
"units": "mol mol-1",
@@ -1290,6 +1346,7 @@
"ok_max_mean_abs": ""
},
"no": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_nitrogen_monoxide_in_air",
"units": "mol mol-1",
@@ -1307,6 +1364,7 @@
"ok_max_mean_abs": ""
},
"no2": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_nitrogen_dioxide_in_air",
"units": "mol mol-1",
@@ -1324,6 +1382,7 @@
"ok_max_mean_abs": ""
},
"o3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_ozone_in_air",
"units": "mol mol-1",
@@ -1341,6 +1400,7 @@
"ok_max_mean_abs": ""
},
"o3loss": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mole_concentration_of_ozone_due_to_chemical_destruction",
"units": "mol m-3 s-1",
@@ -1358,6 +1418,7 @@
"ok_max_mean_abs": ""
},
"o3prod": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mole_concentration_of_ozone_due_to_chemical_production",
"units": "mol m-3 s-1",
@@ -1375,6 +1436,7 @@
"ok_max_mean_abs": ""
},
"o3ste": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_ozone_in_air",
"units": "mol mol-1",
@@ -1392,10 +1454,11 @@
"ok_max_mean_abs": ""
},
"od440aer": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_ambient_aerosol_particles",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "ambient aerosol optical thickness at 440 nm",
"comment": "AOD from the ambient aerosls (i.e., includes aerosol water). Does not include AOD from stratospheric aerosols if these are prescribed but includes other possible background aerosol types. Needs a comment attribute 'wavelength: 440 nm'",
@@ -1409,10 +1472,11 @@
"ok_max_mean_abs": ""
},
"od550aer": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_ambient_aerosol_particles",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "ambient aerosol optical thickness at 550 nm",
"comment": "AOD from the ambient aerosls (i.e., includes aerosol water). Does not include AOD from stratospheric aerosols if these are prescribed but includes other possible background aerosol types. Needs a comment attribute 'wavelength: 550 nm'",
@@ -1426,10 +1490,11 @@
"ok_max_mean_abs": ""
},
"od550aerh2o": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_water_in_ambient_aerosol",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "aerosol water aod at 550nm",
"comment": "proposed name: atmosphere_optical_thickness_due_to_water_ambient_aerosol",
@@ -1443,10 +1508,11 @@
"ok_max_mean_abs": ""
},
"od550bb": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_particulate_organic_matter_ambient_aerosol",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "bb aod at 550nm",
"comment": "total organic aerosol AOD due to biomass burning (excluding so4, nitrate BB components)",
@@ -1460,10 +1526,11 @@
"ok_max_mean_abs": ""
},
"od550bc": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_black_carbon_ambient_aerosol",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "black carbon aod at 550nm",
"comment": "",
@@ -1477,10 +1544,11 @@
"ok_max_mean_abs": ""
},
"od550csaer": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_ambient_aerosol_particles",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "ambient aerosol optical thickness at 550 nm",
"comment": "AOD from the ambient aerosols in clear skies if od550aer is for all-sky (i.e., includes aerosol water). Does not include AOD from stratospheric aerosols if these are prescribed but includes other possible background aerosol types. Needs a comment attribute 'wavelength: 550 nm'",
@@ -1494,10 +1562,11 @@
"ok_max_mean_abs": ""
},
"od550dust": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_dust_ambient_aerosol",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "dust aod at 550nm",
"comment": "",
@@ -1511,10 +1580,11 @@
"ok_max_mean_abs": ""
},
"od550lt1aer": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_pm1_ambient_aerosol",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "ambient fine mode aerosol optical thickness at 550 nm",
"comment": "od550 due to particles with wet diameter less than 1 um (ambient here means wetted). When models do not include explicit size information, it can be assumed that all anthropogenic aerosols and natural secondary aerosols have diameter less than 1 um.",
@@ -1528,10 +1598,11 @@
"ok_max_mean_abs": ""
},
"od550no3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_nitrate_ambient_aerosol",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "nitrate aod at 550nm",
"comment": "proposed name: atmosphere_optical_thickness_due_to_nitrate_ambient_aerosol",
@@ -1545,10 +1616,11 @@
"ok_max_mean_abs": ""
},
"od550oa": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_particulate_organic_matter_ambient_aerosol",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "total organic aerosol aod at 550nm",
"comment": "",
@@ -1562,10 +1634,11 @@
"ok_max_mean_abs": ""
},
"od550so4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_sulfate_ambient_aerosol",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sulfate aod at 550nm",
"comment": "proposed name: atmosphere_optical_thickness_due_to_sulfate_ambient_aerosol",
@@ -1579,10 +1652,11 @@
"ok_max_mean_abs": ""
},
"od550soa": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_particulate_organic_matter_ambient_aerosol",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "soa aod at 550nm",
"comment": "total organic aerosol AOD due to secondary aerosol formation",
@@ -1596,10 +1670,11 @@
"ok_max_mean_abs": ""
},
"od550ss": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_seasalt_ambient_aerosol",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sea salt aod at 550nm",
"comment": "",
@@ -1613,10 +1688,11 @@
"ok_max_mean_abs": ""
},
"od870aer": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_optical_thickness_due_to_ambient_aerosol_particles",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "ambient aerosol optical thickness at 870 nm",
"comment": "AOD from the ambient aerosls (i.e., includes aerosol water). Does not include AOD from stratospheric aerosols if these are prescribed but includes other possible background aerosol types. Needs a comment attribute 'wavelength: 870 nm'",
@@ -1630,6 +1706,7 @@
"ok_max_mean_abs": ""
},
"oh": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_hydroxyl_radical_in_air",
"units": "mol mol-1",
@@ -1647,6 +1724,7 @@
"ok_max_mean_abs": ""
},
"pan": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_peroxyacetyl_nitrate_in_air",
"units": "mol mol-1",
@@ -1664,6 +1742,7 @@
"ok_max_mean_abs": ""
},
"pfull": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "air_pressure",
"units": "Pa",
@@ -1681,6 +1760,7 @@
"ok_max_mean_abs": ""
},
"phalf": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "air_pressure",
"units": "Pa",
@@ -1698,6 +1778,7 @@
"ok_max_mean_abs": ""
},
"photo1d": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "photolysis_rate_of_ozone_to_1D_oxygen_atom",
"units": "s-1",
@@ -1715,10 +1796,11 @@
"ok_max_mean_abs": ""
},
"pod0": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "pending_CF_name",
"units": "mol m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Phytotoxic ozone dose",
"comment": "Accumulated stomatal ozone flux over the threshold of 0 mol m-2 s-1; Computation: Time Integral of (hourly above canopy ozone concentration * stomatal conductance * Rc/(Rb+Rc) )",
@@ -1731,11 +1813,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "ps": {
+ "frequency": "mon",
+ "modeling_realm": "atmos",
+ "standard_name": "surface_air_pressure",
+ "units": "Pa",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Surface Pressure",
+ "comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
+ "dimensions": "longitude latitude time",
+ "out_name": "ps",
+ "type": "float",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"ptp": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tropopause_air_pressure",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tropopause Air Pressure",
"comment": "2D monthly mean thermal tropopause calculated using WMO tropopause definition on 3d temperature",
@@ -1749,10 +1850,11 @@
"ok_max_mean_abs": ""
},
"reffclwtop": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "effective_radius_of_cloud_liquid_water_particle_at_liquid_water_cloud_top",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "cloud-top effective droplet radius",
"comment": "Droplets are liquid only. This is the effective radius as seen from space over liquid cloudy portion of grid cell. This is the value from uppermost model layer with liquid cloud or, if available, or for some models it is the sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere.TOA) each time sample when computing monthly mean. Reported values are weighted by total liquid cloud top fraction of (as see [...]
@@ -1765,16 +1867,17 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rlutca": {
+ "rlutaf": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "toa_outgoing_longwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "toa outgoing longwave radiation",
- "comment": "Flux corresponding to rlut resulting fom aerosol-free call to radiation",
+ "comment": "Flux corresponding to rlut resulting fom aerosol-free call to radiation, follwing Ghan (ACP, 2013)",
"dimensions": "longitude latitude time",
- "out_name": "rlutca",
+ "out_name": "rlutaf",
"type": "float",
"positive": "",
"valid_min": "",
@@ -1782,16 +1885,17 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rlutcsca": {
+ "rlutcsaf": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "toa outgoing clear-sky longwave radiation",
- "comment": "Flux corresponding to rlutcs resulting fom aerosol-free call to radiation",
+ "comment": "Flux corresponding to rlutcs resulting fom aerosol-free call to radiation, follwing Ghan (ACP, 2013)",
"dimensions": "longitude latitude time",
- "out_name": "rlutcsca",
+ "out_name": "rlutcsaf",
"type": "float",
"positive": "",
"valid_min": "",
@@ -1799,16 +1903,17 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsutca": {
+ "rsutaf": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "toa_outgoing_shortwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "toa outgoing shortwave radiation",
- "comment": "Flux corresponding to rsut resulting fom aerosol-free call to radiation",
+ "comment": "Flux corresponding to rsut resulting fom aerosol-free call to radiation, following Ghan (ACP, 2013)",
"dimensions": "longitude latitude time",
- "out_name": "rsutca",
+ "out_name": "rsutaf",
"type": "float",
"positive": "",
"valid_min": "",
@@ -1816,16 +1921,17 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsutcsca": {
+ "rsutcsaf": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "toa outgoing clear-sky shortwave radiation",
- "comment": "Flux corresponding to rsutcs resulting fom aerosol-free call to radiation",
+ "comment": "Flux corresponding to rsutcs resulting fom aerosol-free call to radiation, following Ghan (ACP, 2013)",
"dimensions": "longitude latitude time",
- "out_name": "rsutcsca",
+ "out_name": "rsutcsaf",
"type": "float",
"positive": "",
"valid_min": "",
@@ -1834,6 +1940,7 @@
"ok_max_mean_abs": ""
},
"so2": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_sulfur_dioxide_in_air",
"units": "mol mol-1",
@@ -1851,10 +1958,11 @@
"ok_max_mean_abs": ""
},
"tatp": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tropopause_air_temperature",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tropopause Air Temperature",
"comment": "2D monthly mean thermal tropopause calculated using WMO tropopause definition on 3d temperature",
@@ -1868,6 +1976,7 @@
"ok_max_mean_abs": ""
},
"tntrl": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_air_temperature_due_to_longwave_heating",
"units": "K s-1",
@@ -1885,6 +1994,7 @@
"ok_max_mean_abs": ""
},
"tntrs": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_air_temperature_due_to_shortwave_heating",
"units": "K s-1",
@@ -1902,10 +2012,11 @@
"ok_max_mean_abs": ""
},
"toz": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "equivalent_thickness_at_stp_of_atmosphere_ozone_content",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Ozone Column",
"comment": "total ozone column in DU",
@@ -1919,10 +2030,11 @@
"ok_max_mean_abs": ""
},
"tropoz": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "equivalent_thickness_at_stp_of_atmosphere_ozone_content",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "tropospheric ozone column",
"comment": "tropospheric ozone column in DU, should be consistent with ptp definition of tropopause",
@@ -1936,10 +2048,11 @@
"ok_max_mean_abs": ""
},
"ttop": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "air_temperature_at_cloud_top",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "air temperature at cloud top",
"comment": "",
@@ -1953,6 +2066,7 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -1970,6 +2084,7 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -1987,6 +2102,7 @@
"ok_max_mean_abs": ""
},
"wa": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "upward_air_velocity",
"units": "m s-1",
@@ -2004,10 +2120,11 @@
"ok_max_mean_abs": ""
},
"wetbc": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_elemental_carbon_dry_aerosol_particles_due_to_wet_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "wet deposition rate of black carbon aerosol mass",
"comment": "",
@@ -2021,10 +2138,11 @@
"ok_max_mean_abs": ""
},
"wetdust": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_dust_dry_aerosol_particles_due_to_wet_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "wet deposition rate of dust",
"comment": "",
@@ -2038,10 +2156,11 @@
"ok_max_mean_abs": ""
},
"wetnh3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_ammonia_due_to_wet_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "wet deposition rate of nh3",
"comment": "",
@@ -2055,10 +2174,11 @@
"ok_max_mean_abs": ""
},
"wetnh4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_ammonium_dry_aerosol_particles_due_to_wet_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "wet deposition rate of nh4",
"comment": "",
@@ -2072,10 +2192,11 @@
"ok_max_mean_abs": ""
},
"wetnoy": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_noy_expressed_as_nitrogen_due_to_wet_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "wet deposition of noy incl aerosol nitrate",
"comment": "NOy is the sum of all simulated oxidized nitrogen species, out of NO, NO2, HNO3, HNO4, NO3aerosol, NO3(radical), N2O5, PAN, other organic nitrates.",
@@ -2089,10 +2210,11 @@
"ok_max_mean_abs": ""
},
"wetoa": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_particulate_organic_matter_dry_aerosol_particles_due_to_wet_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "wet deposition rate of dry aerosol total organic matter",
"comment": "tendency of atmosphere mass content of organic matter dry aerosols due to wet deposition: This is the sum of wet deposition of POA and wet deposition of SOA (see next two entries). Mass here refers to the mass of organic matter, not mass of organic carbon alone. We recommend a scale factor of POM=1.4*OC, unless your model has more detailed info available. Was called wet_pom in old ACCMIP Excel spreadsheet.",
@@ -2106,10 +2228,11 @@
"ok_max_mean_abs": ""
},
"wetso2": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_sulfur_dioxide_due_to_wet_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "wet deposition rate of so2",
"comment": "",
@@ -2123,10 +2246,11 @@
"ok_max_mean_abs": ""
},
"wetso4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_sulfate_dry_aerosol_particles_due_to_wet_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "wet deposition rate of so4",
"comment": "proposed name: tendency_of_atmosphere_mass_content_of_sulfate_dry_aerosol_due_to_wet_deposition",
@@ -2140,10 +2264,11 @@
"ok_max_mean_abs": ""
},
"wetss": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_atmosphere_mass_content_of_seasalt_dry_aerosol_particles_due_to_wet_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "wet deposition rate of seasalt",
"comment": "",
@@ -2157,6 +2282,7 @@
"ok_max_mean_abs": ""
},
"zg": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
@@ -2174,10 +2300,11 @@
"ok_max_mean_abs": ""
},
"ztp": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tropopause_altitude",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tropopause Altitude",
"comment": "2D monthly mean thermal tropopause calculated using WMO tropopause definition on 3d temperature",
diff --git a/TestTables/CMIP6_AERmonZ.json b/TestTables/CMIP6_AERmonZ.json
index 7aa0b9c..c225462 100644
--- a/TestTables/CMIP6_AERmonZ.json
+++ b/TestTables/CMIP6_AERmonZ.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table AERmonZ",
"realm": "aerosol",
- "frequency": "mon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"bry": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_inorganic_bromine_in_air",
"units": "mol mol-1",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"ch4": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_methane_in_air",
"units": "mol mol-1",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"cly": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_inorganic_chlorine_in_air",
"units": "mol mol-1",
@@ -66,12 +68,13 @@
"ok_max_mean_abs": ""
},
"h2o": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_water_in_air",
"units": "1.0",
"cell_methods": "longitude: mean time: mean",
"cell_measures": "area: areacella",
- "long_name": "H2O volume mixing ratio",
+ "long_name": "Mass Fraction of Water",
"comment": "includes all phases of water",
"dimensions": "latitude plev39 time",
"out_name": "h2o",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"hcl": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_hydrogen_chloride_in_air",
"units": "mol mol-1",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"hno3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_nitric_acid_in_air",
"units": "mol mol-1",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"ho2": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_hydroperoxyl_radical_in_air",
"units": "mol mol-1",
@@ -134,6 +140,7 @@
"ok_max_mean_abs": ""
},
"meanage": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "age_of_stratospheric_air",
"units": "yr",
@@ -151,6 +158,7 @@
"ok_max_mean_abs": ""
},
"n2o": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_nitrous_oxide_in_air",
"units": "mol mol-1",
@@ -168,6 +176,7 @@
"ok_max_mean_abs": ""
},
"noy": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_noy_expressed_as_nitrogen_in_air",
"units": "mol mol-1",
@@ -185,6 +194,7 @@
"ok_max_mean_abs": ""
},
"o3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_ozone_in_air",
"units": "mol mol-1",
@@ -202,6 +212,7 @@
"ok_max_mean_abs": ""
},
"oh": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mole_fraction_of_hydroxyl_radical_in_air",
"units": "mol mol-1",
@@ -219,6 +230,7 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "air_temperature",
"units": "K",
@@ -236,6 +248,7 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -253,6 +266,7 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -270,6 +284,7 @@
"ok_max_mean_abs": ""
},
"vt100": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "northward_heat_flux_in_air_due_to_eddy_advection",
"units": "W m-2",
@@ -287,6 +302,7 @@
"ok_max_mean_abs": ""
},
"zg": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
diff --git a/TestTables/CMIP6_Amon.json b/TestTables/CMIP6_Amon.json
index e6756a6..2407f19 100644
--- a/TestTables/CMIP6_Amon.json
+++ b/TestTables/CMIP6_Amon.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Amon",
"realm": "atmos atmosChem",
- "frequency": "mon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"ccb": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_convective_cloud_base",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Air Pressure at Convective Cloud Base",
"comment": "Where convective cloud is present in the grid cell, the instantaneous cloud base altitude should be that of the bottom of the lowest level containing convective cloud. Missing data should be reported in the absence of convective cloud. The time mean should be calculated from these quantities averaging over occasions when convective cloud is present only, and should contain missing data for occasions when no convective cloud is present during the meaning period.",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"cct": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_convective_cloud_top",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Air Pressure at Convective Cloud Top",
"comment": "Where convective cloud is present in the grid cell, the instantaneous cloud top altitude should be that of the top of the highest level containing convective cloud. Missing data should be reported in the absence of convective cloud. The time mean should be calculated from these quantities averaging over occasions when convective cloud is present only, and should contain missing data for occasions when no convective cloud is present during the meaning period.",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"cfc113global": {
+ "frequency": "mon",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_cfc113_in_air",
"units": "1e-12",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "",
"long_name": "Global Mean Mole Fraction of CFC113",
"comment": "",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"cfc11global": {
+ "frequency": "mon",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_cfc11_in_air",
"units": "1e-12",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "",
"long_name": "Global Mean Mole Fraction of CFC11",
"comment": "",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"cfc12global": {
+ "frequency": "mon",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_cfc12_in_air",
"units": "1e-12",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "",
"long_name": "Global Mean Mole Fraction of CFC12",
"comment": "",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"ch4": {
+ "frequency": "mon",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_methane_in_air",
"units": "mol mol-1",
@@ -117,15 +122,16 @@
"ok_max_mean_abs": ""
},
"ch4Clim": {
+ "frequency": "monClim",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_methane_in_air",
"units": "mol mol-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacella",
"long_name": "Mole Fraction of CH4",
"comment": "",
"dimensions": "longitude latitude plev19 time2",
- "out_name": "ch4Clim",
+ "out_name": "ch4",
"type": "real",
"positive": "",
"valid_min": "",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"ch4global": {
+ "frequency": "mon",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_methane_in_air",
"units": "1e-09",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "",
"long_name": "Global Mean Mole Fraction of CH4",
"comment": "Global Mean Mole Fraction of CH4",
@@ -151,15 +158,16 @@
"ok_max_mean_abs": ""
},
"ch4globalClim": {
+ "frequency": "monClim",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_methane_in_air",
"units": "1e-09",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "",
"long_name": "Global Mean Mole Fraction of CH4",
"comment": "Global Mean Mole Fraction of CH4",
"dimensions": "time2",
- "out_name": "ch4globalClim",
+ "out_name": "ch4global",
"type": "real",
"positive": "",
"valid_min": "",
@@ -168,10 +176,11 @@
"ok_max_mean_abs": ""
},
"ci": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "convection_time_fraction",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Fraction of Time Convection Occurs",
"comment": "Fraction of time that convection occurs in the grid cell.",
@@ -185,10 +194,11 @@
"ok_max_mean_abs": ""
},
"cl": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Cloud Area Fraction",
"comment": "Percentage cloud cover, including both large-scale and convective cloud.",
@@ -202,10 +212,11 @@
"ok_max_mean_abs": ""
},
"cli": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_cloud_ice_in_air",
"units": "kg kg-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Cloud Ice",
"comment": "Includes both large-scale and convective cloud. This is calculated as the mass of cloud ice in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. It includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -219,10 +230,11 @@
"ok_max_mean_abs": ""
},
"clivi": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_cloud_ice_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Ice Water Path",
"comment": "mass of ice water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeor affects the calculation of radiative transfer in model.",
@@ -236,10 +248,11 @@
"ok_max_mean_abs": ""
},
"clt": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Cloud Fraction",
"comment": "Total cloud area fraction for the whole atmospheric column, as seen from the surface or the top of the atmosphere. Includes both large-scale and convective cloud.",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"clw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_cloud_liquid_water_in_air",
"units": "kg kg-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Cloud Liquid Water",
"comment": "Includes both large-scale and convective cloud. Calculate as the mass of cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cells. Precipitating hydrometeors are included ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -270,10 +284,11 @@
"ok_max_mean_abs": ""
},
"clwvi": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_cloud_condensed_water_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Condensed Water Path",
"comment": "Mass of condensed (liquid + ice) water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -287,6 +302,7 @@
"ok_max_mean_abs": ""
},
"co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mole_fraction_of_carbon_dioxide_in_air",
"units": "mol mol-1",
@@ -304,15 +320,16 @@
"ok_max_mean_abs": ""
},
"co2Clim": {
+ "frequency": "monClim",
"modeling_realm": "atmos",
"standard_name": "mole_fraction_of_carbon_dioxide_in_air",
"units": "mol mol-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacella",
"long_name": "Mole Fraction of CO2",
"comment": "",
"dimensions": "longitude latitude plev19 time2",
- "out_name": "co2Clim",
+ "out_name": "co2",
"type": "real",
"positive": "",
"valid_min": "",
@@ -321,10 +338,11 @@
"ok_max_mean_abs": ""
},
"co2mass": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_of_carbon_dioxide",
"units": "kg",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "",
"long_name": "Total Atmospheric Mass of CO2",
"comment": "Total atmospheric mass of Carbon Dioxide",
@@ -338,15 +356,16 @@
"ok_max_mean_abs": ""
},
"co2massClim": {
+ "frequency": "monClim",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_of_carbon_dioxide",
"units": "kg",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "",
"long_name": "Total Atmospheric Mass of CO2",
"comment": "Total atmospheric mass of Carbon Dioxide",
"dimensions": "time2",
- "out_name": "co2massClim",
+ "out_name": "co2mass",
"type": "real",
"positive": "",
"valid_min": "",
@@ -355,10 +374,11 @@
"ok_max_mean_abs": ""
},
"evspsbl": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "water_evaporation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Evaporation",
"comment": "Evaporation at surface: flux of water into the atmosphere due to conversion of both liquid and solid phases to vapor (from underlying surface and vegetation)",
@@ -372,10 +392,11 @@
"ok_max_mean_abs": ""
},
"fco2antt": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_atmosphere_mass_content_of_carbon_dioxide_expressed_as_carbon_due_to_anthropogenic_emission",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Carbon Mass Flux into Atmosphere Due to All Anthropogenic Emissions of CO2",
"comment": "This is requested only for the emission-driven coupled carbon climate model runs. Does not include natural fire sources but, includes all anthropogenic sources, including fossil fuel use, cement production, agricultural burning, and sources associated with anthropogenic land use change excluding forest regrowth.",
@@ -389,10 +410,11 @@
"ok_max_mean_abs": ""
},
"fco2fos": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_atmosphere_mass_content_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_fossil_fuel_combustion",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Carbon Mass Flux into Atmosphere Due to Fossil Fuel Emissions of CO2",
"comment": "This is the prescribed anthropogenic CO2 flux from fossil fuel use, including cement production, and flaring (but not from land-use changes, agricultural burning, forest regrowth, etc.)",
@@ -406,10 +428,11 @@
"ok_max_mean_abs": ""
},
"fco2nat": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_natural_sources",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Carbon Mass Flux into the Atmosphere Due to Natural Sources",
"comment": "This is what the atmosphere sees (on its own grid). This field should be equivalent to the combined natural fluxes of carbon that account for natural exchanges between the atmosphere and land (nep) or ocean (fgco2) reservoirs.",
@@ -423,10 +446,11 @@
"ok_max_mean_abs": ""
},
"hcfc22global": {
+ "frequency": "mon",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_hcfc22_in_air",
"units": "1e-12",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "",
"long_name": "Global Mean Mole Fraction of HCFC22",
"comment": "",
@@ -440,10 +464,11 @@
"ok_max_mean_abs": ""
},
"hfls": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upward_latent_heat_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upward Latent Heat Flux",
"comment": "",
@@ -457,10 +482,11 @@
"ok_max_mean_abs": ""
},
"hfss": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upward_sensible_heat_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upward Sensible Heat Flux",
"comment": "",
@@ -474,6 +500,7 @@
"ok_max_mean_abs": ""
},
"hur": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
@@ -491,10 +518,11 @@
"ok_max_mean_abs": ""
},
"hurs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Relative Humidity",
"comment": "The relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C.",
@@ -508,6 +536,7 @@
"ok_max_mean_abs": ""
},
"hus": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
@@ -525,10 +554,11 @@
"ok_max_mean_abs": ""
},
"huss": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Specific Humidity",
"comment": "Near-surface (usually, 2 meter) specific humidity.",
@@ -542,10 +572,11 @@
"ok_max_mean_abs": ""
},
"mc": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_net_upward_convective_mass_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Mass Flux",
"comment": "The net mass flux should represent the difference between the updraft and downdraft components. The flux is computed as the mass divided by the area of the grid cell.",
@@ -559,6 +590,7 @@
"ok_max_mean_abs": ""
},
"n2o": {
+ "frequency": "mon",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_nitrous_oxide_in_air",
"units": "mol mol-1",
@@ -576,15 +608,16 @@
"ok_max_mean_abs": ""
},
"n2oClim": {
+ "frequency": "monClim",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_nitrous_oxide_in_air",
"units": "mol mol-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacella",
"long_name": "Mole Fraction of N2O",
"comment": "",
"dimensions": "longitude latitude plev19 time2",
- "out_name": "n2oClim",
+ "out_name": "n2o",
"type": "real",
"positive": "",
"valid_min": "",
@@ -593,10 +626,11 @@
"ok_max_mean_abs": ""
},
"n2oglobal": {
+ "frequency": "mon",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_nitrous_oxide_in_air",
"units": "1e-09",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "",
"long_name": "Global Mean Mole Fraction of N2O",
"comment": "Global mean Nitrous Oxide (N2O)",
@@ -610,15 +644,16 @@
"ok_max_mean_abs": ""
},
"n2oglobalClim": {
+ "frequency": "monClim",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_nitrous_oxide_in_air",
"units": "1e-09",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "",
"long_name": "Global Mean Mole Fraction of N2O",
"comment": "Global mean Nitrous Oxide (N2O)",
"dimensions": "time2",
- "out_name": "n2oglobalClim",
+ "out_name": "n2oglobal",
"type": "real",
"positive": "",
"valid_min": "",
@@ -627,6 +662,7 @@
"ok_max_mean_abs": ""
},
"o3": {
+ "frequency": "mon",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_ozone_in_air",
"units": "mol mol-1",
@@ -644,15 +680,16 @@
"ok_max_mean_abs": ""
},
"o3Clim": {
+ "frequency": "monClim",
"modeling_realm": "atmos atmosChem",
"standard_name": "mole_fraction_of_ozone_in_air",
"units": "mol mol-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacella",
"long_name": "Mole Fraction of O3",
"comment": "",
"dimensions": "longitude latitude plev19 time2",
- "out_name": "o3Clim",
+ "out_name": "o3",
"type": "real",
"positive": "",
"valid_min": "",
@@ -661,10 +698,11 @@
"ok_max_mean_abs": ""
},
"pfull": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_pressure",
"units": "Pa",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacella",
"long_name": "Pressure on Model Levels",
"comment": "Air pressure on model levels",
@@ -678,10 +716,11 @@
"ok_max_mean_abs": ""
},
"phalf": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_pressure",
"units": "Pa",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacella",
"long_name": "Pressure on Model Half-Levels",
"comment": "Air pressure on model half-levels",
@@ -695,10 +734,11 @@
"ok_max_mean_abs": ""
},
"pr": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Precipitation",
"comment": "includes both liquid and solid phases",
@@ -712,10 +752,11 @@
"ok_max_mean_abs": ""
},
"prc": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "convective_precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Precipitation",
"comment": "Convective precipitation at surface; includes both liquid and solid phases.",
@@ -729,10 +770,11 @@
"ok_max_mean_abs": ""
},
"prsn": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "snowfall_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Snowfall Flux",
"comment": "at surface; includes precipitation of all forms of water in the solid phase",
@@ -746,10 +788,11 @@
"ok_max_mean_abs": ""
},
"prw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_water_vapor_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Water Vapor Path",
"comment": "vertically integrated through the atmospheric column",
@@ -763,10 +806,11 @@
"ok_max_mean_abs": ""
},
"ps": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_air_pressure",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Air Pressure",
"comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
@@ -780,10 +824,11 @@
"ok_max_mean_abs": ""
},
"psl": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_sea_level",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Sea Level Pressure",
"comment": "Sea Level Pressure",
@@ -797,10 +842,11 @@
"ok_max_mean_abs": ""
},
"rlds": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Longwave Radiation",
"comment": "",
@@ -814,10 +860,11 @@
"ok_max_mean_abs": ""
},
"rldscs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_longwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Clear-Sky Longwave Radiation",
"comment": "Surface downwelling clear-sky longwave radiation",
@@ -831,10 +878,11 @@
"ok_max_mean_abs": ""
},
"rlus": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upwelling Longwave Radiation",
"comment": "",
@@ -848,10 +896,11 @@
"ok_max_mean_abs": ""
},
"rlut": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Longwave Radiation",
"comment": "at the top of the atmosphere (to be compared with satellite measurements)",
@@ -865,10 +914,11 @@
"ok_max_mean_abs": ""
},
"rlutcs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Clear-Sky Longwave Radiation",
"comment": "",
@@ -882,10 +932,11 @@
"ok_max_mean_abs": ""
},
"rsds": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Shortwave Radiation",
"comment": "surface solar irradiance for UV calculations",
@@ -899,10 +950,11 @@
"ok_max_mean_abs": ""
},
"rsdscs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Clear-Sky Shortwave Radiation",
"comment": "surface solar irradiance clear sky for UV calculations",
@@ -916,10 +968,11 @@
"ok_max_mean_abs": ""
},
"rsdt": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_incoming_shortwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Incident Shortwave Radiation",
"comment": "Shortwave radiation incident at the top of the atmosphere",
@@ -933,10 +986,11 @@
"ok_max_mean_abs": ""
},
"rsus": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upwelling Shortwave Radiation",
"comment": "",
@@ -950,13 +1004,14 @@
"ok_max_mean_abs": ""
},
"rsuscs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upwelling Clear-Sky Shortwave Radiation",
- "comment": "Surface upwelling clear-sky shortwave radiation",
+ "comment": "Surface Upwelling Clear-sky Shortwave Radiation",
"dimensions": "longitude latitude time",
"out_name": "rsuscs",
"type": "real",
@@ -967,10 +1022,11 @@
"ok_max_mean_abs": ""
},
"rsut": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Shortwave Radiation",
"comment": "at the top of the atmosphere",
@@ -984,10 +1040,11 @@
"ok_max_mean_abs": ""
},
"rsutcs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Clear-Sky Shortwave Radiation",
"comment": "Calculated in the absence of clouds.",
@@ -1001,10 +1058,11 @@
"ok_max_mean_abs": ""
},
"rtmt": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "net_downward_radiative_flux_at_top_of_atmosphere_model",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Net Downward Flux at Top of Model",
"comment": "Net Downward Radiative Flux at Top of Model : I.e., at the top of that portion of the atmosphere where dynamics are explicitly treated by the model. This is reported only if it differs from the net downward radiative flux at the top of the atmosphere.",
@@ -1018,10 +1076,11 @@
"ok_max_mean_abs": ""
},
"sbl": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_sublimation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Snow and Ice Sublimation Flux",
"comment": "The snow and ice sublimation flux is the loss of snow and ice mass per unit area from the surface resulting from their direct conversion to water vapor that enters the atmosphere.",
@@ -1035,10 +1094,11 @@
"ok_max_mean_abs": ""
},
"sci": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "shallow_convection_time_fraction",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Fraction of Time Shallow Convection Occurs",
"comment": "Fraction of time that shallow convection occurs in the grid cell.",
@@ -1052,11 +1112,12 @@
"ok_max_mean_abs": ""
},
"sfcWind": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "wind_speed",
"units": "m s-1",
- "cell_methods": "time: mean",
- "cell_measures": "",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Near-Surface Wind Speed",
"comment": "near-surface (usually, 10 meters) wind speed.",
"dimensions": "longitude latitude time height10m",
@@ -1069,6 +1130,7 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
@@ -1086,10 +1148,11 @@
"ok_max_mean_abs": ""
},
"tas": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Air Temperature",
"comment": "near-surface (usually, 2 meter) air temperature",
@@ -1103,10 +1166,11 @@
"ok_max_mean_abs": ""
},
"tasmax": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: maximum within days time: mean over days",
+ "cell_methods": "area: mean time: maximum within days time: mean over days",
"cell_measures": "area: areacella",
"long_name": "Daily Maximum Near-Surface Air Temperature",
"comment": "maximum near-surface (usually, 2 meter) air temperature (add cell_method attribute 'time: max')",
@@ -1120,10 +1184,11 @@
"ok_max_mean_abs": ""
},
"tasmin": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: minimum within days time: mean over days",
+ "cell_methods": "area: mean time: minimum within days time: mean over days",
"cell_measures": "area: areacella",
"long_name": "Daily Minimum Near-Surface Air Temperature",
"comment": "minimum near-surface (usually, 2 meter) air temperature (add cell_method attribute 'time: min')",
@@ -1137,10 +1202,11 @@
"ok_max_mean_abs": ""
},
"tauu": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_downward_eastward_stress",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downward Eastward Wind Stress",
"comment": "Downward eastward wind stress at the surface",
@@ -1154,10 +1220,11 @@
"ok_max_mean_abs": ""
},
"tauv": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_downward_northward_stress",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downward Northward Wind Stress",
"comment": "Downward northward wind stress at the surface",
@@ -1171,10 +1238,11 @@
"ok_max_mean_abs": ""
},
"ts": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_temperature",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Temperature",
"comment": "Temperature of the lower boundary of the atmosphere",
@@ -1188,6 +1256,7 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -1205,11 +1274,12 @@
"ok_max_mean_abs": ""
},
"uas": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: mean",
- "cell_measures": "",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Eastward Near-Surface Wind",
"comment": "Eastward component of the near-surface (usually, 10 meters) wind",
"dimensions": "longitude latitude time height10m",
@@ -1222,6 +1292,7 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -1239,11 +1310,12 @@
"ok_max_mean_abs": ""
},
"vas": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: mean",
- "cell_measures": "",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Northward Near-Surface Wind",
"comment": "Northward component of the near surface wind",
"dimensions": "longitude latitude time height10m",
@@ -1256,6 +1328,7 @@
"ok_max_mean_abs": ""
},
"wap": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
@@ -1273,6 +1346,7 @@
"ok_max_mean_abs": ""
},
"zg": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
diff --git a/TestTables/CMIP6_Amon_json_hfls b/TestTables/CMIP6_Amon_json_hfls
index 5f5dc06..da660fd 100644
--- a/TestTables/CMIP6_Amon_json_hfls
+++ b/TestTables/CMIP6_Amon_json_hfls
@@ -586,6 +586,7 @@
"hfls0": {
"comment": "includes both evaporation and sublimation",
+ "frequency": "mon",
"dimensions": "longitude latitude time",
"positive": "up",
"long_name": "Surface Upward Latent Heat Flux",
@@ -599,6 +600,7 @@
},
"hfls1": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -613,6 +615,7 @@
},
"hfls2": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -627,6 +630,7 @@
},
"hfls3": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -641,6 +645,7 @@
},
"hfls4": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -655,6 +660,7 @@
},
"hfls5": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -669,6 +675,7 @@
},
"hfls6": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -683,6 +690,7 @@
},
"hfls7": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -697,6 +705,7 @@
},
"hfls8": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -711,6 +720,7 @@
},
"hfls9": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -725,6 +735,7 @@
},
"hfls10": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -739,6 +750,7 @@
},
"hfls11": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -753,6 +765,7 @@
},
"hfls12": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -767,6 +780,7 @@
},
"hfls13": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -781,6 +795,7 @@
},
"hfls14": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -795,6 +810,7 @@
},
"hfls15": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -809,6 +825,7 @@
},
"hfls16": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -823,6 +840,7 @@
},
"hfls17": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -837,6 +855,7 @@
},
"hfls18": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -851,6 +870,7 @@
},
"hfls19": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -865,6 +885,7 @@
},
"hfls20": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -879,6 +900,7 @@
},
"hfls21": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -893,6 +915,7 @@
},
"hfls22": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -907,6 +930,7 @@
},
"hfls23": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -921,6 +945,7 @@
},
"hfls24": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -935,6 +960,7 @@
},
"hfls25": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -949,6 +975,7 @@
},
"hfls26": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -963,6 +990,7 @@
},
"hfls27": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -977,6 +1005,7 @@
},
"hfls28": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -991,6 +1020,7 @@
},
"hfls29": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1005,6 +1035,7 @@
},
"hfls30": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1019,6 +1050,7 @@
},
"hfls31": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1033,6 +1065,7 @@
},
"hfls32": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1047,6 +1080,7 @@
},
"hfls33": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1061,6 +1095,7 @@
},
"hfls34": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1075,6 +1110,7 @@
},
"hfls35": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1089,6 +1125,7 @@
},
"hfls36": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1103,6 +1140,7 @@
},
"hfls37": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1117,6 +1155,7 @@
},
"hfls38": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1131,6 +1170,7 @@
},
"hfls39": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1145,6 +1185,7 @@
},
"hfls40": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1159,6 +1200,7 @@
},
"hfls41": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1173,6 +1215,7 @@
},
"hfls42": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1187,6 +1230,7 @@
},
"hfls43": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1201,6 +1245,7 @@
},
"hfls44": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1215,6 +1260,7 @@
},
"hfls45": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1229,6 +1275,7 @@
},
"hfls46": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1243,6 +1290,7 @@
},
"hfls47": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1257,6 +1305,7 @@
},
"hfls48": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1271,6 +1320,7 @@
},
"hfls49": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1285,6 +1335,7 @@
},
"hfls50": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1299,6 +1350,7 @@
},
"hfls51": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1313,6 +1365,7 @@
},
"hfls52": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1327,6 +1380,7 @@
},
"hfls53": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1341,6 +1395,7 @@
},
"hfls54": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1355,6 +1410,7 @@
},
"hfls55": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1369,6 +1425,7 @@
},
"hfls56": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1383,6 +1440,7 @@
},
"hfls57": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1397,6 +1455,7 @@
},
"hfls58": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1411,6 +1470,7 @@
},
"hfls59": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1425,6 +1485,7 @@
},
"hfls60": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1439,6 +1500,7 @@
},
"hfls61": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1453,6 +1515,7 @@
},
"hfls62": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1467,6 +1530,7 @@
},
"hfls63": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1481,6 +1545,7 @@
},
"hfls64": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1495,6 +1560,7 @@
},
"hfls65": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1509,6 +1575,7 @@
},
"hfls66": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1523,6 +1590,7 @@
},
"hfls67": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1537,6 +1605,7 @@
},
"hfls68": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1551,6 +1620,7 @@
},
"hfls69": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1565,6 +1635,7 @@
},
"hfls70": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1579,6 +1650,7 @@
},
"hfls71": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1593,6 +1665,7 @@
},
"hfls72": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1607,6 +1680,7 @@
},
"hfls73": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1621,6 +1695,7 @@
},
"hfls74": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1635,6 +1710,7 @@
},
"hfls75": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1649,6 +1725,7 @@
},
"hfls76": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1663,6 +1740,7 @@
},
"hfls77": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1677,6 +1755,7 @@
},
"hfls78": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1691,6 +1770,7 @@
},
"hfls79": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1705,6 +1785,7 @@
},
"hfls80": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1719,6 +1800,7 @@
},
"hfls81": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1733,6 +1815,7 @@
},
"hfls82": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1747,6 +1830,7 @@
},
"hfls83": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1761,6 +1845,7 @@
},
"hfls84": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1775,6 +1860,7 @@
},
"hfls85": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1789,6 +1875,7 @@
},
"hfls86": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1803,6 +1890,7 @@
},
"hfls87": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1817,6 +1905,7 @@
},
"hfls88": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1831,6 +1920,7 @@
},
"hfls89": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1845,6 +1935,7 @@
},
"hfls90": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1859,6 +1950,7 @@
},
"hfls91": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1873,6 +1965,7 @@
},
"hfls92": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1887,6 +1980,7 @@
},
"hfls93": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1901,6 +1995,7 @@
},
"hfls94": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1915,6 +2010,7 @@
},
"hfls95": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1929,6 +2025,7 @@
},
"hfls96": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1943,6 +2040,7 @@
},
"hfls97": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1957,6 +2055,7 @@
},
"hfls98": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1971,6 +2070,7 @@
},
"hfls99": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1985,6 +2085,7 @@
},
"hfls100": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -1999,6 +2100,7 @@
},
"hfls101": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2013,6 +2115,7 @@
},
"hfls102": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2027,6 +2130,7 @@
},
"hfls103": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2041,6 +2145,7 @@
},
"hfls104": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2055,6 +2160,7 @@
},
"hfls105": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2069,6 +2175,7 @@
},
"hfls106": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2083,6 +2190,7 @@
},
"hfls107": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2097,6 +2205,7 @@
},
"hfls108": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2111,6 +2220,7 @@
},
"hfls109": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2125,6 +2235,7 @@
},
"hfls110": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2139,6 +2250,7 @@
},
"hfls111": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2153,6 +2265,7 @@
},
"hfls112": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2167,6 +2280,7 @@
},
"hfls113": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2181,6 +2295,7 @@
},
"hfls114": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2195,6 +2310,7 @@
},
"hfls115": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2209,6 +2325,7 @@
},
"hfls116": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2223,6 +2340,7 @@
},
"hfls117": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2237,6 +2355,7 @@
},
"hfls118": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2251,6 +2370,7 @@
},
"hfls119": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2265,6 +2385,7 @@
},
"hfls120": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2279,6 +2400,7 @@
},
"hfls121": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2293,6 +2415,7 @@
},
"hfls122": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2307,6 +2430,7 @@
},
"hfls123": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2321,6 +2445,7 @@
},
"hfls124": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2335,6 +2460,7 @@
},
"hfls125": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2349,6 +2475,7 @@
},
"hfls126": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2363,6 +2490,7 @@
},
"hfls127": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2377,6 +2505,7 @@
},
"hfls128": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2391,6 +2520,7 @@
},
"hfls129": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2405,6 +2535,7 @@
},
"hfls130": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2419,6 +2550,7 @@
},
"hfls131": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2433,6 +2565,7 @@
},
"hfls132": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2447,6 +2580,7 @@
},
"hfls133": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2461,6 +2595,7 @@
},
"hfls134": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2475,6 +2610,7 @@
},
"hfls135": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2489,6 +2625,7 @@
},
"hfls136": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2503,6 +2640,7 @@
},
"hfls137": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2517,6 +2655,7 @@
},
"hfls138": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2531,6 +2670,7 @@
},
"hfls139": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2545,6 +2685,7 @@
},
"hfls140": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2559,6 +2700,7 @@
},
"hfls141": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2573,6 +2715,7 @@
},
"hfls142": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2587,6 +2730,7 @@
},
"hfls143": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2601,6 +2745,7 @@
},
"hfls144": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2615,6 +2760,7 @@
},
"hfls145": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2629,6 +2775,7 @@
},
"hfls146": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2643,6 +2790,7 @@
},
"hfls147": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2657,6 +2805,7 @@
},
"hfls148": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2671,6 +2820,7 @@
},
"hfls149": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2685,6 +2835,7 @@
},
"hfls150": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2699,6 +2850,7 @@
},
"hfls151": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2713,6 +2865,7 @@
},
"hfls152": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2727,6 +2880,7 @@
},
"hfls153": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2741,6 +2895,7 @@
},
"hfls154": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2755,6 +2910,7 @@
},
"hfls155": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2769,6 +2925,7 @@
},
"hfls156": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2783,6 +2940,7 @@
},
"hfls157": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2797,6 +2955,7 @@
},
"hfls158": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2811,6 +2970,7 @@
},
"hfls159": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2825,6 +2985,7 @@
},
"hfls160": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2839,6 +3000,7 @@
},
"hfls161": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2853,6 +3015,7 @@
},
"hfls162": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2867,6 +3030,7 @@
},
"hfls163": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2881,6 +3045,7 @@
},
"hfls164": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2895,6 +3060,7 @@
},
"hfls165": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2909,6 +3075,7 @@
},
"hfls166": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2923,6 +3090,7 @@
},
"hfls167": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2937,6 +3105,7 @@
},
"hfls168": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2951,6 +3120,7 @@
},
"hfls169": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2965,6 +3135,7 @@
},
"hfls170": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2979,6 +3150,7 @@
},
"hfls171": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -2993,6 +3165,7 @@
},
"hfls172": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3007,6 +3180,7 @@
},
"hfls173": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3021,6 +3195,7 @@
},
"hfls174": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3035,6 +3210,7 @@
},
"hfls175": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3049,6 +3225,7 @@
},
"hfls176": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3063,6 +3240,7 @@
},
"hfls177": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3077,6 +3255,7 @@
},
"hfls178": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3091,6 +3270,7 @@
},
"hfls179": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3105,6 +3285,7 @@
},
"hfls180": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3119,6 +3300,7 @@
},
"hfls181": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3133,6 +3315,7 @@
},
"hfls182": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3147,6 +3330,7 @@
},
"hfls183": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3161,6 +3345,7 @@
},
"hfls184": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3175,6 +3360,7 @@
},
"hfls185": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3189,6 +3375,7 @@
},
"hfls186": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3203,6 +3390,7 @@
},
"hfls187": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3217,6 +3405,7 @@
},
"hfls188": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3231,6 +3420,7 @@
},
"hfls189": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3245,6 +3435,7 @@
},
"hfls190": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3259,6 +3450,7 @@
},
"hfls191": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3273,6 +3465,7 @@
},
"hfls192": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3287,6 +3480,7 @@
},
"hfls193": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3301,6 +3495,7 @@
},
"hfls194": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3315,6 +3510,7 @@
},
"hfls195": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3329,6 +3525,7 @@
},
"hfls196": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3343,6 +3540,7 @@
},
"hfls197": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3357,6 +3555,7 @@
},
"hfls198": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3371,6 +3570,7 @@
},
"hfls199": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3385,6 +3585,7 @@
},
"hfls200": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3399,6 +3600,7 @@
},
"hfls201": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3413,6 +3615,7 @@
},
"hfls202": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3427,6 +3630,7 @@
},
"hfls203": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3441,6 +3645,7 @@
},
"hfls204": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3455,6 +3660,7 @@
},
"hfls205": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3469,6 +3675,7 @@
},
"hfls206": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3483,6 +3690,7 @@
},
"hfls207": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3497,6 +3705,7 @@
},
"hfls208": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3511,6 +3720,7 @@
},
"hfls209": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3525,6 +3735,7 @@
},
"hfls210": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3539,6 +3750,7 @@
},
"hfls211": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3553,6 +3765,7 @@
},
"hfls212": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3567,6 +3780,7 @@
},
"hfls213": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3581,6 +3795,7 @@
},
"hfls214": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3595,6 +3810,7 @@
},
"hfls215": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3609,6 +3825,7 @@
},
"hfls216": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3623,6 +3840,7 @@
},
"hfls217": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3637,6 +3855,7 @@
},
"hfls218": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3651,6 +3870,7 @@
},
"hfls219": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3665,6 +3885,7 @@
},
"hfls220": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3679,6 +3900,7 @@
},
"hfls221": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3693,6 +3915,7 @@
},
"hfls222": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3707,6 +3930,7 @@
},
"hfls223": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3721,6 +3945,7 @@
},
"hfls224": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3735,6 +3960,7 @@
},
"hfls225": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3749,6 +3975,7 @@
},
"hfls226": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3763,6 +3990,7 @@
},
"hfls227": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3777,6 +4005,7 @@
},
"hfls228": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3791,6 +4020,7 @@
},
"hfls229": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3805,6 +4035,7 @@
},
"hfls230": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3819,6 +4050,7 @@
},
"hfls231": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3833,6 +4065,7 @@
},
"hfls232": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3847,6 +4080,7 @@
},
"hfls233": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3861,6 +4095,7 @@
},
"hfls234": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3875,6 +4110,7 @@
},
"hfls235": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3889,6 +4125,7 @@
},
"hfls236": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3903,6 +4140,7 @@
},
"hfls237": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3917,6 +4155,7 @@
},
"hfls238": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3931,6 +4170,7 @@
},
"hfls239": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3945,6 +4185,7 @@
},
"hfls240": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3959,6 +4200,7 @@
},
"hfls241": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3973,6 +4215,7 @@
},
"hfls242": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -3987,6 +4230,7 @@
},
"hfls243": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4001,6 +4245,7 @@
},
"hfls244": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4015,6 +4260,7 @@
},
"hfls245": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4029,6 +4275,7 @@
},
"hfls246": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4043,6 +4290,7 @@
},
"hfls247": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4057,6 +4305,7 @@
},
"hfls248": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4071,6 +4320,7 @@
},
"hfls249": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4085,6 +4335,7 @@
},
"hfls250": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4099,6 +4350,7 @@
},
"hfls251": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4113,6 +4365,7 @@
},
"hfls252": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4127,6 +4380,7 @@
},
"hfls253": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4141,6 +4395,7 @@
},
"hfls254": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4155,6 +4410,7 @@
},
"hfls255": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4169,6 +4425,7 @@
},
"hfls256": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4183,6 +4440,7 @@
},
"hfls257": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4197,6 +4455,7 @@
},
"hfls258": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4211,6 +4470,7 @@
},
"hfls259": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4225,6 +4485,7 @@
},
"hfls260": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4239,6 +4500,7 @@
},
"hfls261": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4253,6 +4515,7 @@
},
"hfls262": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4267,6 +4530,7 @@
},
"hfls263": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4281,6 +4545,7 @@
},
"hfls264": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4295,6 +4560,7 @@
},
"hfls265": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4309,6 +4575,7 @@
},
"hfls266": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4323,6 +4590,7 @@
},
"hfls267": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4337,6 +4605,7 @@
},
"hfls268": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4351,6 +4620,7 @@
},
"hfls269": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4365,6 +4635,7 @@
},
"hfls270": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4379,6 +4650,7 @@
},
"hfls271": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4393,6 +4665,7 @@
},
"hfls272": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4407,6 +4680,7 @@
},
"hfls273": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4421,6 +4695,7 @@
},
"hfls274": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4435,6 +4710,7 @@
},
"hfls275": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4449,6 +4725,7 @@
},
"hfls276": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4463,6 +4740,7 @@
},
"hfls277": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4477,6 +4755,7 @@
},
"hfls278": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4491,6 +4770,7 @@
},
"hfls279": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4505,6 +4785,7 @@
},
"hfls280": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4519,6 +4800,7 @@
},
"hfls281": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4533,6 +4815,7 @@
},
"hfls282": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4547,6 +4830,7 @@
},
"hfls283": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4561,6 +4845,7 @@
},
"hfls284": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4575,6 +4860,7 @@
},
"hfls285": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4589,6 +4875,7 @@
},
"hfls286": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4603,6 +4890,7 @@
},
"hfls287": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4617,6 +4905,7 @@
},
"hfls288": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4631,6 +4920,7 @@
},
"hfls289": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4645,6 +4935,7 @@
},
"hfls290": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4659,6 +4950,7 @@
},
"hfls291": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4673,6 +4965,7 @@
},
"hfls292": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4687,6 +4980,7 @@
},
"hfls293": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4701,6 +4995,7 @@
},
"hfls294": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4715,6 +5010,7 @@
},
"hfls295": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4729,6 +5025,7 @@
},
"hfls296": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4743,6 +5040,7 @@
},
"hfls297": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4757,6 +5055,7 @@
},
"hfls298": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4771,6 +5070,7 @@
},
"hfls299": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4785,6 +5085,7 @@
},
"hfls300": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4799,6 +5100,7 @@
},
"hfls301": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4813,6 +5115,7 @@
},
"hfls302": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4827,6 +5130,7 @@
},
"hfls303": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4841,6 +5145,7 @@
},
"hfls304": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4855,6 +5160,7 @@
},
"hfls305": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4869,6 +5175,7 @@
},
"hfls306": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4883,6 +5190,7 @@
},
"hfls307": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4897,6 +5205,7 @@
},
"hfls308": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4911,6 +5220,7 @@
},
"hfls309": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4925,6 +5235,7 @@
},
"hfls310": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4939,6 +5250,7 @@
},
"hfls311": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4953,6 +5265,7 @@
},
"hfls312": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4967,6 +5280,7 @@
},
"hfls313": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4981,6 +5295,7 @@
},
"hfls314": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -4995,6 +5310,7 @@
},
"hfls315": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5009,6 +5325,7 @@
},
"hfls316": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5023,6 +5340,7 @@
},
"hfls317": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5037,6 +5355,7 @@
},
"hfls318": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5051,6 +5370,7 @@
},
"hfls319": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5065,6 +5385,7 @@
},
"hfls320": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5079,6 +5400,7 @@
},
"hfls321": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5093,6 +5415,7 @@
},
"hfls322": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5107,6 +5430,7 @@
},
"hfls323": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5121,6 +5445,7 @@
},
"hfls324": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5135,6 +5460,7 @@
},
"hfls325": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5149,6 +5475,7 @@
},
"hfls326": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5163,6 +5490,7 @@
},
"hfls327": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5177,6 +5505,7 @@
},
"hfls328": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5191,6 +5520,7 @@
},
"hfls329": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5205,6 +5535,7 @@
},
"hfls330": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5219,6 +5550,7 @@
},
"hfls331": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5233,6 +5565,7 @@
},
"hfls332": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5247,6 +5580,7 @@
},
"hfls333": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5261,6 +5595,7 @@
},
"hfls334": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5275,6 +5610,7 @@
},
"hfls335": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5289,6 +5625,7 @@
},
"hfls336": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5303,6 +5640,7 @@
},
"hfls337": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5317,6 +5655,7 @@
},
"hfls338": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5331,6 +5670,7 @@
},
"hfls339": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5345,6 +5685,7 @@
},
"hfls340": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5359,6 +5700,7 @@
},
"hfls341": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5373,6 +5715,7 @@
},
"hfls342": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5387,6 +5730,7 @@
},
"hfls343": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5401,6 +5745,7 @@
},
"hfls344": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5415,6 +5760,7 @@
},
"hfls345": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5429,6 +5775,7 @@
},
"hfls346": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5443,6 +5790,7 @@
},
"hfls347": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5457,6 +5805,7 @@
},
"hfls348": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5471,6 +5820,7 @@
},
"hfls349": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5485,6 +5835,7 @@
},
"hfls350": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5499,6 +5850,7 @@
},
"hfls351": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5513,6 +5865,7 @@
},
"hfls352": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5527,6 +5880,7 @@
},
"hfls353": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5541,6 +5895,7 @@
},
"hfls354": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5555,6 +5910,7 @@
},
"hfls355": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5569,6 +5925,7 @@
},
"hfls356": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5583,6 +5940,7 @@
},
"hfls357": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5597,6 +5955,7 @@
},
"hfls358": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5611,6 +5970,7 @@
},
"hfls359": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5625,6 +5985,7 @@
},
"hfls360": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5639,6 +6000,7 @@
},
"hfls361": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5653,6 +6015,7 @@
},
"hfls362": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5667,6 +6030,7 @@
},
"hfls363": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5681,6 +6045,7 @@
},
"hfls364": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5695,6 +6060,7 @@
},
"hfls365": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5709,6 +6075,7 @@
},
"hfls366": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5723,6 +6090,7 @@
},
"hfls367": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5737,6 +6105,7 @@
},
"hfls368": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5751,6 +6120,7 @@
},
"hfls369": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5765,6 +6135,7 @@
},
"hfls370": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5779,6 +6150,7 @@
},
"hfls371": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5793,6 +6165,7 @@
},
"hfls372": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5807,6 +6180,7 @@
},
"hfls373": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5821,6 +6195,7 @@
},
"hfls374": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5835,6 +6210,7 @@
},
"hfls375": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5849,6 +6225,7 @@
},
"hfls376": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5863,6 +6240,7 @@
},
"hfls377": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5877,6 +6255,7 @@
},
"hfls378": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5891,6 +6270,7 @@
},
"hfls379": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5905,6 +6285,7 @@
},
"hfls380": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5919,6 +6300,7 @@
},
"hfls381": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5933,6 +6315,7 @@
},
"hfls382": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5947,6 +6330,7 @@
},
"hfls383": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5961,6 +6345,7 @@
},
"hfls384": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5975,6 +6360,7 @@
},
"hfls385": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -5989,6 +6375,7 @@
},
"hfls386": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6003,6 +6390,7 @@
},
"hfls387": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6017,6 +6405,7 @@
},
"hfls388": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6031,6 +6420,7 @@
},
"hfls389": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6045,6 +6435,7 @@
},
"hfls390": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6059,6 +6450,7 @@
},
"hfls391": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6073,6 +6465,7 @@
},
"hfls392": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6087,6 +6480,7 @@
},
"hfls393": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6101,6 +6495,7 @@
},
"hfls394": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6115,6 +6510,7 @@
},
"hfls395": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6129,6 +6525,7 @@
},
"hfls396": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6143,6 +6540,7 @@
},
"hfls397": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6157,6 +6555,7 @@
},
"hfls398": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
@@ -6171,6 +6570,7 @@
},
"hfls399": {
+ "frequency": "mon",
"comment": "includes both evaporation and sublimation",
"dimensions": "longitude latitude time",
"positive": "up",
diff --git a/TestTables/CMIP6_CF3hr.json b/TestTables/CMIP6_CF3hr.json
index adb73a5..428b610 100644
--- a/TestTables/CMIP6_CF3hr.json
+++ b/TestTables/CMIP6_CF3hr.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table CF3hr",
"realm": "atmos",
- "frequency": "3hr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.125000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"clc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "convective_cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Convective Cloud Area Fraction",
"comment": "Include only convective cloud.",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"clic": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_convective_cloud_ice_in_air",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Convective Cloud Ice",
"comment": "Calculated as the mass of convective cloud ice in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"clis": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_stratiform_cloud_ice_in_air",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Stratiform Cloud Ice",
"comment": "Calculated as the mass of stratiform cloud ice in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"cls": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "stratiform_cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Stratiform Cloud Area Fraction",
"comment": "",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"cltc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "convective_cloud_area_fraction",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Convective Cloud Fraction",
"comment": "Convective cloud area fraction for the whole atmospheric column, as seen from the surface or the top of the atmosphere. Includes only convective cloud.",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"clwc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_convective_cloud_liquid_water_in_air",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Convective Cloud Liquid Water",
"comment": "Calculated as the mass of convective cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"clws": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_stratiform_cloud_liquid_water_in_air",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Stratiform Cloud Liquid Water",
"comment": "Calculated as the mass of stratiform cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"demc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "convective_cloud_longwave_emissivity",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Convective Cloud Emissivity",
"comment": "This is the in-cloud emissivity obtained by considering only the cloudy portion of the grid cell.",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"dems": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "stratiform_cloud_longwave_emissivity",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Stratiform Cloud Emissivity",
"comment": "This is the in-cloud emissivity obtained by considering only the cloudy portion of the grid cell.",
@@ -168,10 +176,11 @@
"ok_max_mean_abs": ""
},
"dtauc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_optical_thickness_due_to_convective_cloud",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Convective Cloud Optical Depth",
"comment": "This is the in-cloud optical depth obtained by considering only the cloudy portion of the grid cell",
@@ -185,10 +194,11 @@
"ok_max_mean_abs": ""
},
"dtaus": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_optical_thickness_due_to_stratiform_cloud",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Stratiform Cloud Optical Depth",
"comment": "This is the in-cloud optical depth obtained by considering only the cloudy portion of the grid cell.",
@@ -202,10 +212,11 @@
"ok_max_mean_abs": ""
},
"grpllsprof": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "large_scale_graupel_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Stratiform Graupel Flux",
"comment": "",
@@ -219,10 +230,11 @@
"ok_max_mean_abs": ""
},
"h2o": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_water_in_air",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Water",
"comment": "includes all phases of water",
@@ -236,10 +248,11 @@
"ok_max_mean_abs": ""
},
"pfull": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "air_pressure",
"units": "Pa",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Pressure at Model Full-Levels",
"comment": "Air pressure on model levels",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"phalf": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "air_pressure",
"units": "Pa",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Pressure at Model Half-Levels",
"comment": "Air pressure on model half-levels",
@@ -270,10 +284,11 @@
"ok_max_mean_abs": ""
},
"prcprof": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "convective_rainfall_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Convective Rainfall Flux",
"comment": "",
@@ -287,10 +302,11 @@
"ok_max_mean_abs": ""
},
"prlsns": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "large_scale_snowfall_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Stratiform Snowfall Flux",
"comment": "large-scale precipitation of all forms of water in the solid phase.",
@@ -304,10 +320,11 @@
"ok_max_mean_abs": ""
},
"prlsprof": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "large_scale_rainfall_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Stratiform Rainfall Flux",
"comment": "",
@@ -321,10 +338,11 @@
"ok_max_mean_abs": ""
},
"prsnc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "convective_snowfall_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Convective Snowfall Flux",
"comment": "convective precipitation of all forms of water in the solid phase.",
@@ -337,11 +355,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "ps": {
+ "frequency": "3hr",
+ "modeling_realm": "atmos",
+ "standard_name": "surface_air_pressure",
+ "units": "Pa",
+ "cell_methods": "area: mean time: point",
+ "cell_measures": "area: areacella",
+ "long_name": "Surface Pressure",
+ "comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
+ "dimensions": "longitude latitude time1",
+ "out_name": "ps",
+ "type": "float",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"reffclic": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_convective_cloud_ice_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Convective Cloud Ice",
"comment": "This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell).",
@@ -355,10 +392,11 @@
"ok_max_mean_abs": ""
},
"reffclis": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_stratiform_cloud_ice_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Stratiform Cloud Ice",
"comment": "This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell).",
@@ -372,10 +410,11 @@
"ok_max_mean_abs": ""
},
"reffclwc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_convective_cloud_liquid_water_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Convective Cloud Liquid Water",
"comment": "Droplets are liquid. The effective radius is defined as the ratio of the third moment over the second moment of the particle size distribution and the time-mean should be calculated, weighting the individual samples by the cloudy fraction of the grid cell.",
@@ -389,10 +428,11 @@
"ok_max_mean_abs": ""
},
"reffclws": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_stratiform_cloud_liquid_water_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Stratiform Cloud Liquid Water",
"comment": "Droplets are liquid. The effective radius is defined as the ratio of the third moment over the second moment of the particle size distribution and the time-mean should be calculated, weighting the individual samples by the cloudy fraction of the grid cell.",
@@ -406,10 +446,11 @@
"ok_max_mean_abs": ""
},
"reffgrpls": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_stratiform_cloud_graupel_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Stratiform Graupel",
"comment": "This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell).",
@@ -423,10 +464,11 @@
"ok_max_mean_abs": ""
},
"reffrainc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_convective_cloud_rain_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Convective Rainfall",
"comment": "This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell).",
@@ -440,10 +482,11 @@
"ok_max_mean_abs": ""
},
"reffrains": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_stratiform_cloud_rain_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Stratiform Rainfall",
"comment": "This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell).",
@@ -457,10 +500,11 @@
"ok_max_mean_abs": ""
},
"reffsnowc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_convective_cloud_snow_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Convective Snowfall",
"comment": "This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell).",
@@ -474,10 +518,11 @@
"ok_max_mean_abs": ""
},
"reffsnows": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_stratiform_cloud_snow_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Stratiform Snowfall",
"comment": "This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell).",
@@ -491,10 +536,11 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
@@ -508,10 +554,11 @@
"ok_max_mean_abs": ""
},
"zfull": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "height_above_reference_ellipsoid",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Altitude of Model Full-Levels",
"comment": "",
@@ -525,10 +572,11 @@
"ok_max_mean_abs": ""
},
"zhalf": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "height_above_reference_ellipsoid",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Altitude of Model Half-Levels",
"comment": "",
diff --git a/TestTables/CMIP6_CFday.json b/TestTables/CMIP6_CFday.json
index 0a463c8..2bd5da2 100644
--- a/TestTables/CMIP6_CFday.json
+++ b/TestTables/CMIP6_CFday.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table CFday",
"realm": "atmos",
- "frequency": "day",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "1.00000",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"albisccp": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_albedo",
"units": "1.0",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"ccb": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_convective_cloud_base",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Air Pressure at Convective Cloud Base",
"comment": "Where convective cloud is present in the grid cell, the instantaneous cloud base altitude should be that of the bottom of the lowest level containing convective cloud. Missing data should be reported in the absence of convective cloud. The time mean should be calculated from these quantities averaging over occasions when convective cloud is present only, and should contain missing data for occasions when no convective cloud is present during the meaning period.",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"cct": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_convective_cloud_top",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Air Pressure at Convective Cloud Top",
"comment": "Where convective cloud is present in the grid cell, the instantaneous cloud top altitude should be that of the top of the highest level containing convective cloud. Missing data should be reported in the absence of convective cloud. The time mean should be calculated from these quantities averaging over occasions when convective cloud is present only, and should contain missing data for occasions when no convective cloud is present during the meaning period.",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"cl": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Cloud Area Fraction in Atmosphere Layer",
"comment": "Percentage cloud cover, including both large-scale and convective cloud.",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"clcalipso": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
@@ -100,14 +104,15 @@
"ok_max_mean_abs": ""
},
"clhcalipso": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "CALIPSO High Level Cloud Fraction",
"comment": "Percentage cloud cover in layer centred on 220hPa",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time p220",
"out_name": "clhcalipso",
"type": "real",
"positive": "",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"cli": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_cloud_ice_in_air",
"units": "kg kg-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Cloud Ice",
"comment": "Includes both large-scale and convective cloud. This is calculated as the mass of cloud ice in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. It includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"clisccp": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "ISCCP Cloud Area Fraction",
"comment": "Percentage cloud cover in optical depth categories.",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"clivi": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_cloud_ice_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Ice Water Path",
"comment": "mass of ice water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeor affects the calculation of radiative transfer in model.",
@@ -168,14 +176,15 @@
"ok_max_mean_abs": ""
},
"cllcalipso": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Low Level Cloud Fraction",
"comment": "Percentage cloud cover in layer centred on 840hPa",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time p840",
"out_name": "cllcalipso",
"type": "real",
"positive": "",
@@ -185,14 +194,15 @@
"ok_max_mean_abs": ""
},
"clmcalipso": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Mid Level Cloud Fraction",
"comment": "Percentage cloud cover in layer centred on 560hPa",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time p560",
"out_name": "clmcalipso",
"type": "real",
"positive": "",
@@ -202,10 +212,11 @@
"ok_max_mean_abs": ""
},
"cltcalipso": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Total Cloud Fraction",
"comment": "",
@@ -219,10 +230,11 @@
"ok_max_mean_abs": ""
},
"cltisccp": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "ISCCP Total Total Cloud Fraction",
"comment": "Percentage total cloud cover, simulating ISCCP observations.",
@@ -236,10 +248,11 @@
"ok_max_mean_abs": ""
},
"clw": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_cloud_liquid_water_in_air",
"units": "kg kg-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Cloud Liquid Water",
"comment": "Includes both large-scale and convective cloud. Calculate as the mass of cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cells. Precipitating hydrometeors are included ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"clwvi": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_cloud_condensed_water_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Condensed Water Path",
"comment": "Mass of condensed (liquid + ice) water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -270,10 +284,11 @@
"ok_max_mean_abs": ""
},
"hur": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Relative Humidity",
"comment": "The relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C.",
@@ -287,10 +302,11 @@
"ok_max_mean_abs": ""
},
"hus": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Specific Humidity",
"comment": "",
@@ -304,10 +320,11 @@
"ok_max_mean_abs": ""
},
"mc": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_net_upward_convective_mass_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Mass Flux",
"comment": "The net mass flux should represent the difference between the updraft and downdraft components. The flux is computed as the mass divided by the area of the grid cell.",
@@ -321,6 +338,7 @@
"ok_max_mean_abs": ""
},
"pctisccp": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_cloud_top",
"units": "Pa",
@@ -338,10 +356,11 @@
"ok_max_mean_abs": ""
},
"pfull": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_pressure",
"units": "Pa",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Pressure on Model Levels",
"comment": "Air pressure on model levels",
@@ -355,10 +374,11 @@
"ok_max_mean_abs": ""
},
"phalf": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_pressure",
"units": "Pa",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Pressure on Model Half-Levels",
"comment": "Air pressure on model half-levels",
@@ -372,10 +392,11 @@
"ok_max_mean_abs": ""
},
"ps": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_air_pressure",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Air Pressure",
"comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
@@ -389,10 +410,11 @@
"ok_max_mean_abs": ""
},
"rldscs": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_longwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Clear-Sky Longwave Radiation",
"comment": "Surface downwelling clear-sky longwave radiation",
@@ -406,10 +428,11 @@
"ok_max_mean_abs": ""
},
"rlutcs": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Clear-Sky Longwave Radiation",
"comment": "",
@@ -423,10 +446,11 @@
"ok_max_mean_abs": ""
},
"rsdscs": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Clear-Sky Shortwave Radiation",
"comment": "surface solar irradiance clear sky for UV calculations",
@@ -440,10 +464,11 @@
"ok_max_mean_abs": ""
},
"rsdt": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "toa_incoming_shortwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Incident Shortwave Radiation",
"comment": "Shortwave radiation incident at the top of the atmosphere",
@@ -457,13 +482,14 @@
"ok_max_mean_abs": ""
},
"rsuscs": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upwelling Clear-Sky Shortwave Radiation",
- "comment": "Surface upwelling clear-sky shortwave radiation",
+ "comment": "Surface Upwelling Clear-sky Shortwave Radiation",
"dimensions": "longitude latitude time",
"out_name": "rsuscs",
"type": "real",
@@ -474,10 +500,11 @@
"ok_max_mean_abs": ""
},
"rsut": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Shortwave Radiation",
"comment": "at the top of the atmosphere",
@@ -491,10 +518,11 @@
"ok_max_mean_abs": ""
},
"rsutcs": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Clear-Sky Shortwave Radiation",
"comment": "Calculated in the absence of clouds.",
@@ -508,10 +536,11 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
@@ -525,10 +554,11 @@
"ok_max_mean_abs": ""
},
"ta700": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air temperature at 700hPa",
@@ -542,10 +572,11 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Eastward Wind",
"comment": "",
@@ -559,10 +590,11 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Northward Wind",
"comment": "",
@@ -576,10 +608,11 @@
"ok_max_mean_abs": ""
},
"wap": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "omega (=dp/dt)",
"comment": "Omega (vertical velocity in pressure coordinates, positive downwards)",
@@ -593,10 +626,11 @@
"ok_max_mean_abs": ""
},
"wap500": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "omega (=dp/dt)",
"comment": "Omega (vertical velocity in pressure coordinates, positive downwards) at 500 hPa level;",
@@ -610,10 +644,11 @@
"ok_max_mean_abs": ""
},
"zg": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Geopotential Height",
"comment": "",
diff --git a/TestTables/CMIP6_CFmon.json b/TestTables/CMIP6_CFmon.json
index 275c66d..d6cf8bb 100644
--- a/TestTables/CMIP6_CFmon.json
+++ b/TestTables/CMIP6_CFmon.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table CFmon",
"realm": "atmos",
- "frequency": "mon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00000",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"albisccp": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_albedo",
"units": "1.0",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"clc": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "convective_cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Cloud Area Fraction",
"comment": "Include only convective cloud.",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"clcalipso": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"clhcalipso": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Percentage High Level Cloud",
"comment": "Percentage cloud cover in layer centred on 220hPa",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"clic": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_convective_cloud_ice_in_air",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Convective Cloud Ice",
"comment": "Calculated as the mass of convective cloud ice in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"clis": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_stratiform_cloud_ice_in_air",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Stratiform Cloud Ice",
"comment": "Calculated as the mass of stratiform cloud ice in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"clisccp": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "ISCCP Percentage Cloud Area",
"comment": "Percentage cloud cover in optical depth categories.",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"cllcalipso": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Percentage Low Level Cloud",
"comment": "Percentage cloud cover in layer centred on 840hPa",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"clmcalipso": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Percentage Mid Level Cloud",
"comment": "Percentage cloud cover in layer centred on 560hPa",
@@ -168,10 +176,11 @@
"ok_max_mean_abs": ""
},
"cls": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "stratiform_cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Stratiform Cloud Area Fraction",
"comment": "",
@@ -185,10 +194,11 @@
"ok_max_mean_abs": ""
},
"cltcalipso": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Percentage Total Cloud",
"comment": "",
@@ -202,10 +212,11 @@
"ok_max_mean_abs": ""
},
"cltisccp": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "ISCCP Total Cloud Fraction",
"comment": "Percentage total cloud cover, simulating ISCCP observations.",
@@ -219,10 +230,11 @@
"ok_max_mean_abs": ""
},
"clwc": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_convective_cloud_liquid_water_in_air",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Convective Cloud Liquid Water",
"comment": "Calculated as the mass of convective cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -236,10 +248,11 @@
"ok_max_mean_abs": ""
},
"clws": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_stratiform_cloud_liquid_water_in_air",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Fraction of Stratiform Cloud Liquid Water",
"comment": "Calculated as the mass of stratiform cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"dmc": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_net_upward_deep_convective_mass_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Deep Convective Mass Flux",
"comment": "The net mass flux represents the difference between the updraft and downdraft components. This is calculated as the convective mass flux divided by the area of the whole grid cell (not just the area of the cloud).",
@@ -270,10 +284,11 @@
"ok_max_mean_abs": ""
},
"edt": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_heat_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Eddy Diffusivity Coefficients for Temperature",
"comment": "Vertical diffusion coefficient for temperature due to parametrised eddies",
@@ -287,10 +302,11 @@
"ok_max_mean_abs": ""
},
"evu": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_momentum_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Eddy Viscosity Coefficients for Momentum",
"comment": "Vertical diffusion coefficient for momentum due to parametrised eddies",
@@ -304,10 +320,11 @@
"ok_max_mean_abs": ""
},
"hur": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Relative Humidity",
"comment": "The relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C.",
@@ -321,10 +338,11 @@
"ok_max_mean_abs": ""
},
"hus": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Specific Humidity",
"comment": "",
@@ -338,10 +356,11 @@
"ok_max_mean_abs": ""
},
"mcd": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_downdraft_convective_mass_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Downdraft Convective Mass Flux",
"comment": "Calculated as the convective mass flux divided by the area of the whole grid cell (not just the area of the cloud).",
@@ -355,10 +374,11 @@
"ok_max_mean_abs": ""
},
"mcu": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_updraft_convective_mass_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Updraft Convective Mass Flux",
"comment": "In accordance with common usage in geophysical disciplines, 'flux' implies per unit area, called 'flux density' in physics. The atmosphere convective mass flux is the vertical transport of mass for a field of cumulus clouds or thermals, given by the product of air density and vertical velocity. For an area-average, cell_methods should specify whether the average is over all the area or the area of updrafts only.",
@@ -372,6 +392,7 @@
"ok_max_mean_abs": ""
},
"pctisccp": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_cloud_top",
"units": "Pa",
@@ -388,11 +409,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "ps": {
+ "frequency": "3hr",
+ "modeling_realm": "atmos",
+ "standard_name": "surface_air_pressure",
+ "units": "Pa",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Surface Pressure",
+ "comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
+ "dimensions": "longitude latitude time",
+ "out_name": "ps",
+ "type": "float",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"rld": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "downwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Downwelling Longwave Radiation",
"comment": "Downwelling Longwave Radiation (includes the fluxes at the surface and TOA)",
@@ -406,10 +446,11 @@
"ok_max_mean_abs": ""
},
"rld4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "downwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Downwelling Longwave Radiation 4XCO2 Atmosphere",
"comment": "Downwelling longwave radiation calculated using carbon dioxide concentrations increased fourfold (includes the fluxes at the surface and TOA)",
@@ -423,10 +464,11 @@
"ok_max_mean_abs": ""
},
"rldcs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "downwelling_longwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Downwelling Clear-Sky Longwave Radiation",
"comment": "Downwelling clear-sky longwave radiation (includes the fluxes at the surface and TOA)",
@@ -440,10 +482,11 @@
"ok_max_mean_abs": ""
},
"rldcs4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "downwelling_longwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Downwelling Clear-Sky Longwave Radiation 4XCO2 Atmosphere",
"comment": "Downwelling clear-sky longwave radiation calculated using carbon dioxide concentrations increased fourfold (includes the fluxes at the surface and TOA)",
@@ -457,10 +500,11 @@
"ok_max_mean_abs": ""
},
"rlu": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "upwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Upwelling Longwave Radiation",
"comment": "Upwelling longwave radiation (includes the fluxes at the surface and TOA)",
@@ -474,10 +518,11 @@
"ok_max_mean_abs": ""
},
"rlu4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "upwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Upwelling Longwave Radiation 4XCO2 Atmosphere",
"comment": "Upwelling longwave radiation calculated using carbon dioxide concentrations increased fourfold (includes the fluxes at the surface and TOA)",
@@ -491,10 +536,11 @@
"ok_max_mean_abs": ""
},
"rlucs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "upwelling_longwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Upwelling Clear-Sky Longwave Radiation",
"comment": "Upwelling clear-sky longwave radiation (includes the fluxes at the surface and TOA)",
@@ -508,10 +554,11 @@
"ok_max_mean_abs": ""
},
"rlucs4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "upwelling_longwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Upwelling Clear-Sky Longwave Radiation 4XCO2 Atmosphere",
"comment": "Upwelling clear-sky longwave radiation calculated using carbon dioxide concentrations increased fourfold (includes the fluxes at the surface and TOA)",
@@ -525,10 +572,11 @@
"ok_max_mean_abs": ""
},
"rlut4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Longwave Radiation 4XCO2 Atmosphere",
"comment": "Top-of-atmosphere outgoing longwave radiation calculated using carbon dioxide concentrations increased fourfold",
@@ -542,10 +590,11 @@
"ok_max_mean_abs": ""
},
"rlutcs4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Clear-Sky Longwave Radiation 4XCO2 Atmosphere",
"comment": "Top-of-atmosphere outgoing clear-sky longwave radiation calculated using carbon dioxide concentrations increased fourfold",
@@ -559,10 +608,11 @@
"ok_max_mean_abs": ""
},
"rsd": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "downwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Downwelling Shortwave Radiation",
"comment": "Downwelling shortwave radiation (includes the fluxes at the surface and top-of-atmosphere)",
@@ -576,10 +626,11 @@
"ok_max_mean_abs": ""
},
"rsd4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "downwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Downwelling Shortwave Radiation 4XCO2 Atmosphere",
"comment": "Downwelling shortwave radiation calculated using carbon dioxide concentrations increased fourfold",
@@ -593,10 +644,11 @@
"ok_max_mean_abs": ""
},
"rsdcs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "downwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Downwelling Clear-Sky Shortwave Radiation",
"comment": "Downwelling clear-sky shortwave radiation (includes the fluxes at the surface and top-of-atmosphere)",
@@ -610,10 +662,11 @@
"ok_max_mean_abs": ""
},
"rsdcs4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "downwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Downwelling Clear-Sky Shortwave Radiation 4XCO2 Atmosphere",
"comment": "Downwelling clear-sky shortwave radiation calculated using carbon dioxide concentrations increased fourfold",
@@ -627,10 +680,11 @@
"ok_max_mean_abs": ""
},
"rsu": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "upwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Upwelling Shortwave Radiation",
"comment": "Upwelling shortwave radiation (includes also the fluxes at the surface and top of atmosphere)",
@@ -644,10 +698,11 @@
"ok_max_mean_abs": ""
},
"rsu4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "upwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Upwelling Shortwave Radiation 4XCO2 Atmosphere",
"comment": "Upwelling Shortwave Radiation calculated using carbon dioxide concentrations increased fourfold",
@@ -661,10 +716,11 @@
"ok_max_mean_abs": ""
},
"rsucs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "upwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Upwelling Clear-Sky Shortwave Radiation",
"comment": "Upwelling clear-sky shortwave radiation (includes the fluxes at the surface and TOA)",
@@ -678,10 +734,11 @@
"ok_max_mean_abs": ""
},
"rsucs4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "upwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Upwelling Clear-Sky Shortwave Radiation 4XCO2 Atmosphere",
"comment": "Upwelling clear-sky shortwave radiation calculated using carbon dioxide concentrations increased fourfold",
@@ -695,10 +752,11 @@
"ok_max_mean_abs": ""
},
"rsut4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Shortwave Radiation in 4XCO2 Atmosphere",
"comment": "TOA Outgoing Shortwave Radiation calculated using carbon dioxide concentrations increased fourfold",
@@ -712,10 +770,11 @@
"ok_max_mean_abs": ""
},
"rsutcs4co2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Clear-Sky Shortwave Radiation 4XCO2 Atmosphere",
"comment": "TOA Outgoing Clear-Sky Shortwave Radiation calculated using carbon dioxide concentrations increased fourfold",
@@ -729,10 +788,11 @@
"ok_max_mean_abs": ""
},
"smc": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_net_upward_shallow_convective_mass_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Shallow Convective Mass Flux",
"comment": "The net mass flux represents the difference between the updraft and downdraft components. For models with a distinct shallow convection scheme, this is calculated as convective mass flux divided by the area of the whole grid cell (not just the area of the cloud).",
@@ -746,10 +806,11 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
@@ -763,10 +824,11 @@
"ok_max_mean_abs": ""
},
"tnhus": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity",
"units": "s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Specific Humidity",
"comment": "Tendency of Specific Humidity",
@@ -780,10 +842,11 @@
"ok_max_mean_abs": ""
},
"tnhusa": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_advection",
"units": "s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Specific Humidity due to Advection",
"comment": "Tendency of Specific Humidity due to Advection",
@@ -797,10 +860,11 @@
"ok_max_mean_abs": ""
},
"tnhusc": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_convection",
"units": "s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Specific Humidity due to Convection",
"comment": "Tendencies from cumulus convection scheme.",
@@ -814,10 +878,11 @@
"ok_max_mean_abs": ""
},
"tnhusd": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_diffusion",
"units": "s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Specific Humidity due to Numerical Diffusion",
"comment": "Tendency of specific humidity due to numerical diffusion.This includes any horizontal or vertical numerical moisture diffusion not associated with the parametrized moist physics or the resolved dynamics. For example, any vertical diffusion which is part of the boundary layer mixing scheme should be excluded, as should any diffusion which is included in the terms from the resolved dynamics. This term is required to check the closure of the moisture budget.",
@@ -831,10 +896,11 @@
"ok_max_mean_abs": ""
},
"tnhusmp": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_model_physics",
"units": "s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Specific Humidity due to Model Physics",
"comment": "Tendency of specific humidity due to model physics. This includes sources and sinks from parametrized moist physics (e.g. convection, boundary layer, stratiform condensation/evaporation, etc.) and excludes sources and sinks from resolved dynamics or from horizontal or vertical numerical diffusion not associated with model physicsl. For example any diffusive mixing by the boundary layer scheme would be included.",
@@ -848,10 +914,11 @@
"ok_max_mean_abs": ""
},
"tnhusscpbl": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_stratiform_cloud_and_precipitation_and_boundary_layer_mixing",
"units": "s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Specific Humidity Due to Stratiform Cloud and Precipitation and Boundary Layer Mixing",
"comment": "Tendency of Specific Humidity Due to Stratiform Cloud and Precipitation and Boundary Layer Mixing (to be specified only in models which do not separate budget terms for stratiform cloud, precipitation and boundary layer schemes. Includes all bounday layer terms including and diffusive terms.)",
@@ -865,10 +932,11 @@
"ok_max_mean_abs": ""
},
"tnt": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature",
"units": "K s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature",
"comment": "Tendency of Air Temperature",
@@ -882,10 +950,11 @@
"ok_max_mean_abs": ""
},
"tnta": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_advection",
"units": "K s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature due to Advection",
"comment": "Tendency of Air Temperature due to Advection",
@@ -899,10 +968,11 @@
"ok_max_mean_abs": ""
},
"tntc": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_convection",
"units": "K s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature due to Convection",
"comment": "Tendencies from cumulus convection scheme.",
@@ -916,10 +986,11 @@
"ok_max_mean_abs": ""
},
"tntmp": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_model_physics",
"units": "K s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature due to Model Physics",
"comment": "Tendency of air temperature due to model physics. This includes sources and sinks from parametrized physics (e.g. radiation, convection, boundary layer, stratiform condensation/evaporation, etc.). It excludes sources and sinks from resolved dynamics and numerical diffusion not associated with parametrized physics. For example, any vertical diffusion which is part of the boundary layer mixing scheme should be included, while numerical diffusion applied in addition [...]
@@ -933,10 +1004,11 @@
"ok_max_mean_abs": ""
},
"tntr": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_radiative_heating",
"units": "K s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature due to Radiative Heating",
"comment": "Tendency of Air Temperature due to Radiative Heating",
@@ -950,10 +1022,11 @@
"ok_max_mean_abs": ""
},
"tntscpbl": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_stratiform_cloud_and_precipitation_and_boundary_layer_mixing",
"units": "K s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature Due to Stratiform Cloud and Precipitation and Boundary Layer Mixing",
"comment": "Tendency of Air Temperature Due to Stratiform Cloud and Precipitation and Boundary Layer Mixing (to be specified only in models which do not separate cloud, precipitation and boundary layer terms. Includes all boundary layer terms including diffusive ones.)",
diff --git a/TestTables/CMIP6_CFsubhr.json b/TestTables/CMIP6_CFsubhr.json
index 95e7f6d..599ed71 100644
--- a/TestTables/CMIP6_CFsubhr.json
+++ b/TestTables/CMIP6_CFsubhr.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table CFsubhr",
"realm": "atmos",
- "frequency": "subhr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.017361",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"ccb": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_convective_cloud_base",
"units": "Pa",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"cct": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_convective_cloud_top",
"units": "Pa",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"ci": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "convection_time_fraction",
"units": "1.0",
@@ -66,11 +68,12 @@
"ok_max_mean_abs": ""
},
"cl": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Cloud Area Fraction",
"comment": "Percentage cloud cover, including both large-scale and convective cloud.",
"dimensions": "alevel site time1",
@@ -83,11 +86,12 @@
"ok_max_mean_abs": ""
},
"cli": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_cloud_ice_in_air",
"units": "kg kg-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Mass Fraction of Cloud Ice",
"comment": "Includes both large-scale and convective cloud. This is calculated as the mass of cloud ice in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. It includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
"dimensions": "alevel site time1",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"clivi": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_cloud_ice_content",
"units": "kg m-2",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"clt": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction",
"units": "%",
@@ -134,11 +140,12 @@
"ok_max_mean_abs": ""
},
"clw": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_cloud_liquid_water_in_air",
"units": "kg kg-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Mass Fraction of Cloud Liquid Water",
"comment": "Includes both large-scale and convective cloud. Calculate as the mass of cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cells. Precipitating hydrometeors are included ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
"dimensions": "alevel site time1",
@@ -151,6 +158,7 @@
"ok_max_mean_abs": ""
},
"clwvi": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_cloud_condensed_water_content",
"units": "kg m-2",
@@ -168,11 +176,12 @@
"ok_max_mean_abs": ""
},
"edt": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_heat_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Eddy Diffusivity Coefficient for Temperature Variable",
"comment": "Vertical diffusion coefficient for temperature due to parametrised eddies",
"dimensions": "alevel site time1",
@@ -185,6 +194,7 @@
"ok_max_mean_abs": ""
},
"evspsbl": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "water_evaporation_flux",
"units": "kg m-2 s-1",
@@ -202,11 +212,12 @@
"ok_max_mean_abs": ""
},
"evu": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_momentum_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Eddy Viscosity Coefficient for Momentum Variables",
"comment": "Vertical diffusion coefficient for momentum due to parametrised eddies",
"dimensions": "alevel site time1",
@@ -219,6 +230,7 @@
"ok_max_mean_abs": ""
},
"fco2antt": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_atmosphere_mass_content_of_carbon_dioxide_expressed_as_carbon_due_to_anthropogenic_emission",
"units": "kg m-2 s-1",
@@ -236,6 +248,7 @@
"ok_max_mean_abs": ""
},
"fco2fos": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_atmosphere_mass_content_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_fossil_fuel_combustion",
"units": "kg m-2 s-1",
@@ -253,6 +266,7 @@
"ok_max_mean_abs": ""
},
"fco2nat": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_natural_sources",
"units": "kg m-2 s-1",
@@ -270,6 +284,7 @@
"ok_max_mean_abs": ""
},
"hfls": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_upward_latent_heat_flux",
"units": "W m-2",
@@ -287,6 +302,7 @@
"ok_max_mean_abs": ""
},
"hfss": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_upward_sensible_heat_flux",
"units": "W m-2",
@@ -304,11 +320,12 @@
"ok_max_mean_abs": ""
},
"hur": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Relative Humidity",
"comment": "The relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C.",
"dimensions": "alevel site time1",
@@ -321,6 +338,7 @@
"ok_max_mean_abs": ""
},
"hurs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
@@ -338,11 +356,12 @@
"ok_max_mean_abs": ""
},
"hus": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Specific Humidity",
"comment": "",
"dimensions": "alevel site time1",
@@ -355,6 +374,7 @@
"ok_max_mean_abs": ""
},
"huss": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
@@ -372,15 +392,16 @@
"ok_max_mean_abs": ""
},
"latitude": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "latitude",
"units": "degrees_north",
- "cell_methods": "area: point time: mean",
+ "cell_methods": "area: point",
"cell_measures": "",
"long_name": "Latitude",
"comment": "",
"dimensions": "site",
- "out_name": "latitude",
+ "out_name": "lat",
"type": "real",
"positive": "",
"valid_min": "",
@@ -389,15 +410,16 @@
"ok_max_mean_abs": ""
},
"longitude": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "longitude",
"units": "degrees_east",
- "cell_methods": "area: point time: mean",
+ "cell_methods": "area: point",
"cell_measures": "",
"long_name": "Longitude",
"comment": "",
"dimensions": "site",
- "out_name": "longitude",
+ "out_name": "lon",
"type": "real",
"positive": "",
"valid_min": "",
@@ -406,10 +428,11 @@
"ok_max_mean_abs": ""
},
"mc": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_net_upward_convective_mass_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Convective Mass Flux",
"comment": "The net mass flux should represent the difference between the updraft and downdraft components. The flux is computed as the mass divided by the area of the grid cell.",
@@ -423,11 +446,12 @@
"ok_max_mean_abs": ""
},
"pfull": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "air_pressure",
"units": "Pa",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Pressure on Model Levels",
"comment": "Air pressure on model levels",
"dimensions": "alevel site time1",
@@ -440,10 +464,11 @@
"ok_max_mean_abs": ""
},
"phalf": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "air_pressure",
"units": "Pa",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Pressure on Model Half-Levels",
"comment": "Air pressure on model half-levels",
@@ -457,6 +482,7 @@
"ok_max_mean_abs": ""
},
"pr": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
@@ -474,6 +500,7 @@
"ok_max_mean_abs": ""
},
"prc": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "convective_precipitation_flux",
"units": "kg m-2 s-1",
@@ -491,6 +518,7 @@
"ok_max_mean_abs": ""
},
"prsn": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "snowfall_flux",
"units": "kg m-2 s-1",
@@ -508,6 +536,7 @@
"ok_max_mean_abs": ""
},
"prw": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_water_vapor_content",
"units": "kg m-2",
@@ -525,6 +554,7 @@
"ok_max_mean_abs": ""
},
"ps": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_air_pressure",
"units": "Pa",
@@ -542,6 +572,7 @@
"ok_max_mean_abs": ""
},
"psl": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_sea_level",
"units": "Pa",
@@ -559,10 +590,11 @@
"ok_max_mean_abs": ""
},
"rld": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "downwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Downwelling Longwave Radiation",
"comment": "Downwelling Longwave Radiation (includes the fluxes at the surface and TOA)",
@@ -576,10 +608,11 @@
"ok_max_mean_abs": ""
},
"rldcs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "downwelling_longwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Downwelling Clear-Sky Longwave Radiation",
"comment": "Downwelling clear-sky longwave radiation (includes the fluxes at the surface and TOA)",
@@ -593,6 +626,7 @@
"ok_max_mean_abs": ""
},
"rlds": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -610,6 +644,7 @@
"ok_max_mean_abs": ""
},
"rldscs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_longwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
@@ -627,10 +662,11 @@
"ok_max_mean_abs": ""
},
"rlu": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "upwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Upwelling Longwave Radiation",
"comment": "Upwelling longwave radiation (includes the fluxes at the surface and TOA)",
@@ -644,10 +680,11 @@
"ok_max_mean_abs": ""
},
"rlucs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "upwelling_longwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Upwelling Clear-Sky Longwave Radiation",
"comment": "Upwelling clear-sky longwave radiation (includes the fluxes at the surface and TOA)",
@@ -661,6 +698,7 @@
"ok_max_mean_abs": ""
},
"rlus": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -678,6 +716,7 @@
"ok_max_mean_abs": ""
},
"rlut": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux",
"units": "W m-2",
@@ -695,6 +734,7 @@
"ok_max_mean_abs": ""
},
"rlutcs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky",
"units": "W m-2",
@@ -712,10 +752,11 @@
"ok_max_mean_abs": ""
},
"rsd": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "downwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Downwelling Shortwave Radiation",
"comment": "Downwelling shortwave radiation (includes the fluxes at the surface and top-of-atmosphere)",
@@ -729,10 +770,11 @@
"ok_max_mean_abs": ""
},
"rsdcs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "downwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Downwelling Clear-Sky Shortwave Radiation",
"comment": "Downwelling clear-sky shortwave radiation (includes the fluxes at the surface and top-of-atmosphere)",
@@ -746,6 +788,7 @@
"ok_max_mean_abs": ""
},
"rsds": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_shortwave_flux_in_air",
"units": "W m-2",
@@ -763,6 +806,7 @@
"ok_max_mean_abs": ""
},
"rsdscs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
@@ -780,6 +824,7 @@
"ok_max_mean_abs": ""
},
"rsdt": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "toa_incoming_shortwave_flux",
"units": "W m-2",
@@ -797,10 +842,11 @@
"ok_max_mean_abs": ""
},
"rsu": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "upwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Upwelling Shortwave Radiation",
"comment": "Upwelling shortwave radiation (includes also the fluxes at the surface and top of atmosphere)",
@@ -814,10 +860,11 @@
"ok_max_mean_abs": ""
},
"rsucs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "upwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Upwelling Clear-Sky Shortwave Radiation",
"comment": "Upwelling clear-sky shortwave radiation (includes the fluxes at the surface and TOA)",
@@ -831,6 +878,7 @@
"ok_max_mean_abs": ""
},
"rsus": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_shortwave_flux_in_air",
"units": "W m-2",
@@ -848,13 +896,14 @@
"ok_max_mean_abs": ""
},
"rsuscs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
"cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Surface Upwelling Clear-Sky Shortwave Radiation",
- "comment": "Surface upwelling clear-sky shortwave radiation",
+ "comment": "Surface Upwelling Clear-sky Shortwave Radiation",
"dimensions": "site time1",
"out_name": "rsuscs",
"type": "real",
@@ -865,6 +914,7 @@
"ok_max_mean_abs": ""
},
"rsut": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux",
"units": "W m-2",
@@ -882,6 +932,7 @@
"ok_max_mean_abs": ""
},
"rsutcs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky",
"units": "W m-2",
@@ -899,6 +950,7 @@
"ok_max_mean_abs": ""
},
"rtmt": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "net_downward_radiative_flux_at_top_of_atmosphere_model",
"units": "W m-2",
@@ -916,6 +968,7 @@
"ok_max_mean_abs": ""
},
"sbl": {
+ "frequency": "subhr",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_sublimation_flux",
"units": "kg m-2 s-1",
@@ -933,6 +986,7 @@
"ok_max_mean_abs": ""
},
"sci": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "shallow_convection_time_fraction",
"units": "1.0",
@@ -950,6 +1004,7 @@
"ok_max_mean_abs": ""
},
"sfcWind": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "wind_speed",
"units": "m s-1",
@@ -967,11 +1022,12 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Air Temperature",
"comment": "Air Temperature",
"dimensions": "alevel site time1",
@@ -984,6 +1040,7 @@
"ok_max_mean_abs": ""
},
"tas": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
@@ -1001,6 +1058,7 @@
"ok_max_mean_abs": ""
},
"tauu": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_downward_eastward_stress",
"units": "Pa",
@@ -1018,6 +1076,7 @@
"ok_max_mean_abs": ""
},
"tauv": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_downward_northward_stress",
"units": "Pa",
@@ -1035,11 +1094,12 @@
"ok_max_mean_abs": ""
},
"tnhus": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity",
"units": "s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Specific Humidity",
"comment": "Tendency of Specific Humidity",
"dimensions": "alevel site time1",
@@ -1052,11 +1112,12 @@
"ok_max_mean_abs": ""
},
"tnhusa": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_advection",
"units": "s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Specific Humidity due to Advection",
"comment": "Tendency of Specific Humidity due to Advection",
"dimensions": "alevel site time1",
@@ -1069,11 +1130,12 @@
"ok_max_mean_abs": ""
},
"tnhusc": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_convection",
"units": "s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Specific Humidity due to Convection",
"comment": "Tendencies from cumulus convection scheme.",
"dimensions": "alevel site time1",
@@ -1086,11 +1148,12 @@
"ok_max_mean_abs": ""
},
"tnhusd": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_diffusion",
"units": "s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Specific Humidity due to Numerical Diffusion",
"comment": "Tendency of specific humidity due to numerical diffusion.This includes any horizontal or vertical numerical moisture diffusion not associated with the parametrized moist physics or the resolved dynamics. For example, any vertical diffusion which is part of the boundary layer mixing scheme should be excluded, as should any diffusion which is included in the terms from the resolved dynamics. This term is required to check the closure of the moisture budget.",
"dimensions": "alevel site time1",
@@ -1103,11 +1166,12 @@
"ok_max_mean_abs": ""
},
"tnhusmp": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_model_physics",
"units": "s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Specific Humidity due to Model Physics",
"comment": "Tendency of specific humidity due to model physics. This includes sources and sinks from parametrized moist physics (e.g. convection, boundary layer, stratiform condensation/evaporation, etc.) and excludes sources and sinks from resolved dynamics or from horizontal or vertical numerical diffusion not associated with model physicsl. For example any diffusive mixing by the boundary layer scheme would be included.",
"dimensions": "alevel site time1",
@@ -1120,11 +1184,12 @@
"ok_max_mean_abs": ""
},
"tnhusscpbl": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_stratiform_cloud_and_precipitation_and_boundary_layer_mixing",
"units": "s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Specific Humidity Due to Stratiform Cloud and Precipitation and Boundary Layer Mixing",
"comment": "Tendency of Specific Humidity Due to Stratiform Cloud and Precipitation and Boundary Layer Mixing (to be specified only in models which do not separate budget terms for stratiform cloud, precipitation and boundary layer schemes. Includes all bounday layer terms including and diffusive terms.)",
"dimensions": "alevel site time1",
@@ -1137,11 +1202,12 @@
"ok_max_mean_abs": ""
},
"tnt": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature",
"units": "K s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Air Temperature",
"comment": "Tendency of Air Temperature",
"dimensions": "alevel site time1",
@@ -1154,11 +1220,12 @@
"ok_max_mean_abs": ""
},
"tnta": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_advection",
"units": "K s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Air Temperature due to Advection",
"comment": "Tendency of Air Temperature due to Advection",
"dimensions": "alevel site time1",
@@ -1171,11 +1238,12 @@
"ok_max_mean_abs": ""
},
"tntc": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_convection",
"units": "K s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Air Temperature due to Convection",
"comment": "Tendencies from cumulus convection scheme.",
"dimensions": "alevel site time1",
@@ -1188,11 +1256,12 @@
"ok_max_mean_abs": ""
},
"tntmp": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_model_physics",
"units": "K s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Air Temperature due to Model Physics",
"comment": "Tendency of air temperature due to model physics. This includes sources and sinks from parametrized physics (e.g. radiation, convection, boundary layer, stratiform condensation/evaporation, etc.). It excludes sources and sinks from resolved dynamics and numerical diffusion not associated with parametrized physics. For example, any vertical diffusion which is part of the boundary layer mixing scheme should be included, while numerical diffusion applied in addition [...]
"dimensions": "alevel site time1",
@@ -1205,11 +1274,12 @@
"ok_max_mean_abs": ""
},
"tntr": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_radiative_heating",
"units": "K s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Air Temperature due to Radiative Heating",
"comment": "Tendency of Air Temperature due to Radiative Heating",
"dimensions": "alevel site time1",
@@ -1222,11 +1292,12 @@
"ok_max_mean_abs": ""
},
"tntscpbl": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_stratiform_cloud_and_precipitation_and_boundary_layer_mixing",
"units": "K s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Tendency of Air Temperature Due to Stratiform Cloud and Precipitation and Boundary Layer Mixing",
"comment": "Tendency of Air Temperature Due to Stratiform Cloud and Precipitation and Boundary Layer Mixing (to be specified only in models which do not separate cloud, precipitation and boundary layer terms. Includes all boundary layer terms including diffusive ones.)",
"dimensions": "alevel site time1",
@@ -1239,6 +1310,7 @@
"ok_max_mean_abs": ""
},
"ts": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_temperature",
"units": "K",
@@ -1256,11 +1328,12 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Eastward Wind",
"comment": "",
"dimensions": "alevel site time1",
@@ -1273,6 +1346,7 @@
"ok_max_mean_abs": ""
},
"uas": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -1290,11 +1364,12 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Northward Wind",
"comment": "",
"dimensions": "alevel site time1",
@@ -1307,6 +1382,7 @@
"ok_max_mean_abs": ""
},
"vas": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -1324,11 +1400,12 @@
"ok_max_mean_abs": ""
},
"wap": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "omega (=dp/dt)",
"comment": "Omega (vertical velocity in pressure coordinates, positive downwards)",
"dimensions": "alevel site time1",
@@ -1341,11 +1418,12 @@
"ok_max_mean_abs": ""
},
"zg": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
- "cell_methods": "time: point",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: point time: point",
+ "cell_measures": "",
"long_name": "Geopotential Height",
"comment": "",
"dimensions": "alevel site time1",
diff --git a/TestTables/CMIP6_CFsubhrOff.json b/TestTables/CMIP6_CFsubhrOff.json
index 39df1b4..f3148a7 100644
--- a/TestTables/CMIP6_CFsubhrOff.json
+++ b/TestTables/CMIP6_CFsubhrOff.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.10",
"table_id": "Table CFsubhrOff",
"realm": "atmos",
- "frequency": "subhr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "01 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"cfadDbze94": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "histogram_of_equivalent_reflectivity_factor_over_height_above_reference_ellipsoid",
"units": "1.0",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"cfadLidarsr532": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "histogram_of_backscattering_ratio_over_height_above_reference_ellipsoid",
"units": "1.0",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"clcalipso": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"clcalipso2": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"clhcalipso": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"cllcalipso": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"clmcalipso": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
@@ -134,6 +140,7 @@
"ok_max_mean_abs": ""
},
"cltcalipso": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction",
"units": "%",
@@ -151,6 +158,7 @@
"ok_max_mean_abs": ""
},
"parasolRefl": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "toa_bidirectional_reflectance",
"units": "1.0",
diff --git a/TestTables/CMIP6_CV.json b/TestTables/CMIP6_CV.json
index 0b0950f..7bec920 100644
--- a/TestTables/CMIP6_CV.json
+++ b/TestTables/CMIP6_CV.json
@@ -34,11 +34,11 @@
],
"version_metadata":{
"author":"Paul J. Durack <durack1 at llnl.gov>",
- "creation_date":"Tue Apr 18 13:42:27 2017 -0700",
+ "creation_date":"Thu Jun 15 11:54:01 2017 -0700",
"institution_id":"PCMDI",
- "latest_tag_point":"3.2.2 (228; g6c2998d)",
- "note":"Reconfigure source_id format to reflect all model components",
- "previous_commit":"800edcbe09f0a9bb907a7c3d63248ca5b2928608"
+ "latest_tag_point":"3.2.3 (48; gcb1dfab)",
+ "note":"Revise multiple NASA-GISS source_id values",
+ "previous_commit":"5da856972c1bb1ff7c7d6c295860b76a659bdf46"
},
"activity_id":[
"AerChemMIP",
@@ -71,7 +71,7 @@
"CCCR-IITM":"Centre for Climate Change Research, Indian Institute of Tropical Meteorology Pune, Maharashtra 411 008, India",
"CCCma":"Canadian Centre for Climate Modelling and Analysis, Victoria, BC V8P 5C2, Canada",
"CMCC":"Fondazione Centro Euro-Mediterraneo sui Cambiamenti Climatici, Lecce 73100, Italy",
- "CNRM-CERFACS":"CNRM (Centre National de Recherches Meteorologiques, Toulouse 31057, France), CERFACS (Centre Europeen de Recherche et de Formation Avancee en Calcul Scientifique, Toulouse 31100, France)",
+ "CNRM-CERFACS":"CNRM (Centre National de Recherches Meteorologiques, Toulouse 31057, France), CERFACS (Centre Europeen de Recherche et de Formation Avancee en Calcul Scientifique, Toulouse 31057, France)",
"COLA-CFS":"Center for Ocean-Land-Atmosphere Studies, Fairfax, VA 22030, USA",
"CSIR-CSIRO":"CSIR (Council for Scientific and Industrial Research - Natural Resources and the Environment, Pretoria, 0001, South Africa), CSIRO (Commonwealth Scientific and Industrial Research Organisation and Bureau of Meteorology, Melbourne, Victoria 3208, Australia)",
"CSIRO-BOM":"Commonwealth Scientific and Industrial Research Organisation and Bureau of Meteorology, Melbourne, Victoria 3208, Australia",
@@ -87,7 +87,7 @@
"MPI-M":"Max Planck Institute for Meteorology, Hamburg 20146, Germany",
"MRI":"Meteorological Research Institute, Tsukuba, Ibaraki 305-0052, Japan",
"NASA-GISS":"Goddard Institute for Space Studies, New York, NY 10025, USA",
- "NCAR":"National Center for Atmospheric Research, Boulder, CO 80307, USA",
+ "NCAR":"National Center for Atmospheric Research, Boulder, CO 80301, USA",
"NCC":"NorESM Climate modeling Consortium consisting of CICERO (Center for International Climate and Environmental Research, Oslo 0349), MET-Norway (Norwegian Meteorological Institute, Oslo 0313), NERSC (Nansen Environmental and Remote Sensing Center, Bergen 5006), NILU (Norwegian Institute for Air Research, Kjeller 2027), UiB (University of Bergen, Bergen 5007), UiO (University of Oslo, Oslo 0313) and UNI (Uni Research, Bergen 5008), Norway",
"NERC":"Natural Environment Research Council, STFC-RAL, Harwell, Oxford, OX11 0QX, UK",
"NIMS-KMA":"National Institute of Meteorological Sciences/Korea Meteorological Administration, Climate Research Division, Seoho-bukro 33, Seogwipo-si, Jejudo 63568, Republic of Korea",
@@ -109,11 +109,53 @@
"CSIRO-BOM"
],
"source_id":"ACCESS-1-0",
- "source":"ACCESS 1.0 (2011): \naerosol: CLASSIC (v1.0)\natmos: HadGAM2 (r1.1; N96, 192 x 145 longitude/latitude; 38 levels; top level 39255 m)\nland: MOSES2.2\nocean: ACCESS-OM (MOM4p1; tripolar primarily 1deg, 360 x 300 longitude/latitude; 50 levels; top grid cell 0-10 m)\nseaIce: CICE4.1"
+ "source":"ACCESS 1.0 (2011): \naerosol: CLASSIC (v1.0)\natmos: HadGAM2 (r1.1; N96, 192 x 145 longitude/latitude; 38 levels; top level 39255 m)\natmosChem: none\nland: MOSES2.2\nlandIce: none\nocean: ACCESS-OM (MOM4p1; tripolar primarily 1deg, 360 x 300 longitude/latitude; 50 levels; top grid cell 0-10 m)\nocnBgchem: none\nseaIce: CICE4.1"
},
- "AWI-CM-1-0":{
+ "AWI-CM-1-0-HR":{
"activity_participation":[
- ""
+ "CORDEX",
+ "HighResMIP",
+ "OMIP",
+ "SIMIP",
+ "VIACSAB"
+ ],
+ "cohort":[
+ "Registered"
+ ],
+ "institution_id":[
+ "AWI"
+ ],
+ "source_id":"AWI-CM-1-0-HR",
+ "source":"AWI-CM 1.0 HR (2017): \naerosol: none\natmos: ECHAM6.3.02p4 (T127L95 native atmosphere T127 gaussian grid; 384 x 192 longitude/latitude; 95 levels; top level 80 km)\natmosChem: none\nland: JSBACH 3.10\nlandIce: none\nocean: FESOM 1.4 (unstructured grid in the horizontal with 1306775 wet nodes; 46 levels; top grid cell 0-5 m)\nocnBgchem: none\nseaIce: FESOM 1.4"
+ },
+ "AWI-CM-1-0-LR":{
+ "activity_participation":[
+ "CMIP",
+ "CORDEX",
+ "HighResMIP",
+ "OMIP",
+ "PMIP",
+ "SIMIP",
+ "ScenarioMIP",
+ "VIACSAB"
+ ],
+ "cohort":[
+ "Registered"
+ ],
+ "institution_id":[
+ "AWI"
+ ],
+ "source_id":"AWI-CM-1-0-LR",
+ "source":"AWI-CM 1.0 LR (2017): \naerosol: none\natmos: ECHAM6.3.02p4 (T63L47 native atmosphere T63 gaussian grid; 192 x 96 longitude/latitude; 47 levels; top level 80 km)\natmosChem: none\nland: JSBACH 3.10\nlandIce: none\nocean: FESOM 1.4 (unstructured grid in the horizontal with 126859 wet nodes; 46 levels; top grid cell 0-5 m)\nocnBgchem: none\nseaIce: FESOM 1.4"
+ },
+ "AWI-CM-1-0-MR":{
+ "activity_participation":[
+ "CMIP",
+ "CORDEX",
+ "OMIP",
+ "SIMIP",
+ "ScenarioMIP",
+ "VIACSAB"
],
"cohort":[
"Registered"
@@ -121,12 +163,33 @@
"institution_id":[
"AWI"
],
- "source_id":"AWI-CM-1-0",
- "source":"AWI-CM 1.0 (2017): \natmos: ECHAM6.3.02p4 (384 x 192 T127L95; 95 levels; top level 80000 m)\nland: JSBACH 3.10\nocean: FESOM 1.4 (unstructured grid in the horizontal with 830305 wet nodes; 46 levels; top grid cell 0-5 m)\nseaIce: FESOM 1.4"
+ "source_id":"AWI-CM-1-0-MR",
+ "source":"AWI-CM 1.0 MR (2017): \naerosol: none\natmos: ECHAM6.3.02p4 (T127L95 native atmosphere T127 gaussian grid; 384 x 192 longitude/latitude; 95 levels; top level 80 km)\natmosChem: none\nland: JSBACH 3.10\nlandIce: none\nocean: FESOM 1.4 (unstructured grid in the horizontal with 830305 wet nodes; 46 levels; top grid cell 0-5 m)\nocnBgchem: none\nseaIce: FESOM 1.4"
+ },
+ "BESM-2-7":{
+ "activity_participation":[
+ "CMIP",
+ "DCPP",
+ "HighResMIP",
+ "ScenarioMIP"
+ ],
+ "cohort":[
+ "Registered"
+ ],
+ "institution_id":[
+ "INPE"
+ ],
+ "source_id":"BESM-2-7",
+ "source":"BESM 2.7 (2017): \naerosol: none\natmos: BAM (v1.0, T062L28; 192 x 96 longitude/latitude; 28 levels; top level 3 hPa)\natmosChem: none\nland: SSiB 2.0\nlandIce: none\nocean: MOM-5 (MOM5, tripolar primarily 1 deg, 1/4 deg between 10S-10N; 360 x 300 longitude/latitude; 50 levels; top grid cell 0-10 m)\nocnBgchem: TOPAZ 2.0\nseaIce: SIS 1.0"
},
"BNU-ESM-1-1":{
"activity_participation":[
- ""
+ "C4MIP",
+ "CMIP",
+ "GMMIP",
+ "GeoMIP",
+ "OMIP",
+ "ScenarioMIP"
],
"cohort":[
"Registered"
@@ -135,7 +198,7 @@
"BNU"
],
"source_id":"BNU-ESM-1-1",
- "source":"BNU-ESM 1.1 (2016): \naerosol: CAM-chem; semi-interactive\natmos: CAM4 (FV, 144 x 96; 26 levels; top level 2.194 mb)\nland: CoLM version 2014 with carbon-nitrogen interactions\nocean: MOM4p1 (tripolar, 360x200, primarily 1deg latitude/longitude, down to 1/3deg within 30deg of the equatorial tropics; 50 levels; top grid cell 0-10m)\nocnBgchem: Dynamic ecosystem-carbon model version 1\nseaIce: CICE4.1"
+ "source":"BNU-ESM 1.1 (2016): \naerosol: CAM-chem; semi-interactive\natmos: CAM4 (2deg; 144 x 96 longitude/latitude; 26 levels; top level 2.194 mb)\natmosChem: none\nland: CoLM version 2014 with carbon-nitrogen interactions\nlandIce: none\nocean: MOM4p1 (tripolar, primarily 1deg latitude/longitude, down to 1/3deg within 30deg of the equatorial tropics; 360 x 200 longitude/latitude; 50 levels; top grid cell 0-10 m)\nocnBgchem: Dynamic ecosystem-carbon model version 1\nseaI [...]
},
"CAMS_CSM1-0":{
"activity_participation":[
@@ -152,7 +215,13 @@
},
"CIESM":{
"activity_participation":[
- ""
+ "CFMIP",
+ "CMIP",
+ "CORDEX",
+ "GMMIP",
+ "OMIP",
+ "SIMIP",
+ "ScenarioMIP"
],
"cohort":[
"Registered"
@@ -161,11 +230,109 @@
"THU"
],
"source_id":"CIESM",
- "source":"CIESM (2017): \naerosol: MAM4\natmos: CIESM-AM (FV/FD, 288 x 192; 30 levels; top level 2.255 hPa)\natmosChem: trop_mam4\nland: CIESM-LM (modified CLM4.5)\nocean: CIESM-OM (FD, SCCGrid Displaced Pole, 720x560; 46 levels; top grid cell 0-6 m)\nseaIce: CICE4"
+ "source":"CIESM (2017): \naerosol: MAM4\natmos: CIESM-AM (FV/FD; 288 x 192 longitude/latitude; 30 levels; top level 2.255 hPa)\natmosChem: trop_mam4\nland: CIESM-LM (modified CLM4.5)\nlandIce: none\nocean: CIESM-OM (FD, SCCGrid Displaced Pole; 720 x 560 longitude/latitude; 46 levels; top grid cell 0-6 m)\nocnBgchem: none\nseaIce: CICE4"
+ },
+ "CMCC-CM2-HR4":{
+ "activity_participation":[
+ "CMIP",
+ "HighResMIP"
+ ],
+ "cohort":[
+ "Registered"
+ ],
+ "institution_id":[
+ "CMCC"
+ ],
+ "source_id":"CMCC-CM2-HR4",
+ "source":"CMCC-CM2-HR4 (2016): \naerosol: prescribed MACv2-SP\natmos: CAM4 (1deg; 288 x 192 longitude/latitude; 26 levels; top at ~2 hPa)\natmosChem: none\nland: CLM4.5 (SP mode)\nlandIce: none\nocean: NEMO3.6 (ORCA0.25 1/4 deg from the Equator degrading at the poles; 1442 x 1051 longitude/latitude; 50 vertical levels; top grid cell 0-1 m)\nocnBgchem: none\nseaIce: CICE4.0"
+ },
+ "CMCC-CM2-HR5":{
+ "activity_participation":[
+ "CMIP",
+ "OMIP"
+ ],
+ "cohort":[
+ "Registered"
+ ],
+ "institution_id":[
+ "CMCC"
+ ],
+ "source_id":"CMCC-CM2-HR5",
+ "source":"CMCC-CM2-HR5 (2017): \naerosol: MAM3\natmos: CAM5.3 (1deg; 288 x 192 longitude/latitude; 30 levels; top at ~2 hPa)\natmosChem: none\nland: CLM4.5 (BGC mode)\nlandIce: none\nocean: NEMO3.6 (ORCA0.25 1/4 deg from the Equator degrading at the poles; 1442 x 1051 longitude/latitude; 50 vertical levels; top grid cell 0-1 m)\nocnBgchem: none\nseaIce: CICE4.0"
+ },
+ "CMCC-CM2-SR5":{
+ "activity_participation":[
+ "CMIP",
+ "DCPP",
+ "GMMIP",
+ "ScenarioMIP"
+ ],
+ "cohort":[
+ "Registered"
+ ],
+ "institution_id":[
+ "CMCC"
+ ],
+ "source_id":"CMCC-CM2-SR5",
+ "source":"CMCC-CM2-SR5 (2016): \naerosol: MAM3\natmos: CAM5.3 (1deg; 288 x 192 longitude/latitude; 30 levels; top at ~2 hPa)\natmosChem: none\nland: CLM4.5 (BGC mode)\nlandIce: none\nocean: NEMO3.6 (ORCA1 tripolar primarly 1 deg lat/lon with meridional refinement down to 1/3 degree in the tropics; 362 x 292 longitude/latitude; 50 vertical levels; top grid cell 0-1 m)\nocnBgchem: none\nseaIce: CICE4.0"
+ },
+ "CMCC-CM2-VHR4":{
+ "activity_participation":[
+ "CMIP",
+ "HighResMIP"
+ ],
+ "cohort":[
+ "Registered"
+ ],
+ "institution_id":[
+ "CMCC"
+ ],
+ "source_id":"CMCC-CM2-VHR4",
+ "source":"CMCC-CM2-VHR4 (2017): \naerosol: prescribed MACv2-SP\natmos: CAM4 (1/4deg; 1152 x 768 longitude/latitude; 26 levels; top at ~2 hPa)\natmosChem: none\nland: CLM4.5 (SP mode)\nlandIce: none\nocean: NEMO3.6 (ORCA0.25 1/4 deg from the Equator degrading at the poles; 1442 x 1051 longitude/latitude; 50 vertical levels; top grid cell 0-1 m)\nocnBgchem: none\nseaIce: CICE4.0"
+ },
+ "CMCC-ESM2-HR5":{
+ "activity_participation":[
+ "CMIP",
+ "OMIP"
+ ],
+ "cohort":[
+ "Registered"
+ ],
+ "institution_id":[
+ "CMCC"
+ ],
+ "source_id":"CMCC-ESM2-HR5",
+ "source":"CMCC-ESM2-HR5 (2017): \naerosol: MAM3\natmos: CAM5.3 (1deg; 288 x 192 longitude/latitude; 30 levels; top at ~2 hPa)\natmosChem: none\nland: CLM4.5 (BGC mode)\nlandIce: none\nocean: NEMO3.6 (ORCA0.25 1/4 deg from the Equator degrading at the poles; 1442 x 1051 longitude/latitude; 50 vertical levels; top grid cell 0-1 m)\nocnBgchem: BFM5.1\nseaIce: CICE4.0"
+ },
+ "CMCC-ESM2-SR5":{
+ "activity_participation":[
+ "C4MIP",
+ "CMIP",
+ "LS3MIP",
+ "LUMIP"
+ ],
+ "cohort":[
+ "Registered"
+ ],
+ "institution_id":[
+ "CMCC"
+ ],
+ "source_id":"CMCC-ESM2-SR5",
+ "source":"CMCC-ESM2-SR5 (2017): \naerosol: MAM3\natmos: CAM5.3 (1deg; 288 x 192 longitude/latitude; 30 levels; top at ~2 hPa)\natmosChem: none\nland: CLM4.5 (BGC mode)\nlandIce: none\nocean: NEMO3.6 (ORCA1 tripolar primarly 1 deg lat/lon with meridional refinement down to 1/3 degree in the tropics; 362 x 292 longitude/latitude; 50 vertical levels; top grid cell 0-1 m)\nocnBgchem: BFM5.1\nseaIce: CICE4.0"
},
"CNRM-CM6-1":{
"activity_participation":[
- ""
+ "CFMIP",
+ "CMIP",
+ "DAMIP",
+ "DCPP",
+ "FAFMIP",
+ "GMMIP",
+ "ISMIP6",
+ "LS3MIP",
+ "PMIP",
+ "RFMIP",
+ "ScenarioMIP"
],
"cohort":[
"Registered"
@@ -174,11 +341,14 @@
"CNRM-CERFACS"
],
"source_id":"CNRM-CM6-1",
- "source":"CNRM-CM6-1 (2016): \naerosol: climatological fields computed by TACTIC (v2.0)\natmos: Arpege 6.2 (Tl127; 91 levels; top level 78.4 km)\natmosChem: OZL_v2\nland: Surfex 8.0c\nocean: Nemo 3.6 (eORCA1; tripolar primarily 1deg latitude/longitude; 75 levels; top grid cell 0-1 m)\nseaIce: Gelato 6.1"
+ "source":"CNRM-CM6-1 (2017): \naerosol: prescribed monthly fields computed by TACTIC_v2 scheme\natmos: Arpege 6.3 (T127; Gaussian Reduced with 24572 grid points in total distributed over 128 latitude circles (with 256 grid points per latitude circle between 30degN and 30degS reducing to 20 grid points per latitude circle at 88.9degN and 88.9degS); 91 levels; top level 78.4 km)\natmosChem: OZL_v2\nland: Surfex 8.0c\nlandIce: GRISILI: Collaborating with l'Institut des Geosc [...]
},
"CNRM-CM6-1-HR":{
"activity_participation":[
- ""
+ "CMIP",
+ "DCPP",
+ "HighResMIP",
+ "ScenarioMIP"
],
"cohort":[
"Registered"
@@ -187,11 +357,17 @@
"CNRM-CERFACS"
],
"source_id":"CNRM-CM6-1-HR",
- "source":"CNRM-CM6-1-HR (2016): \naerosol: climatological fields computed by TACTIC (v2.0)\natmos: Arpege 6.2 (Tl359; 91 levels; top level 78.4 km)\natmosChem: OZL_v2\nland: Surfex 8.0c\nocean: Nemo 3.6 (eORCA025; tripolar primarily 1/4deg latitude/longitude; 75 levels; top grid cell 0-1 m)\nseaIce: Gelato 6.1"
+ "source":"CNRM-CM6-1-HR (2017): \naerosol: prescribed monthly fields computed by TACTIC_v2 scheme\natmos: Arpege 6.3 (T359; Gaussian Reduced with 181724 grid points in total distributed over 360 latitude circles (with 720 grid points per latitude circle between 33.2degN and 32.2degS reducing to 18 grid points per latitude circle at 89.6degN and 89.6degS); 91 levels; top level 78.4 km)\natmosChem: OZL_v2\nland: Surfex 8.0c\nlandIce: none\nocean: Nemo 3.6 (eORCA025, tripola [...]
},
"CNRM-ESM2-1":{
"activity_participation":[
- ""
+ "AerChemMIP",
+ "C4MIP",
+ "CMIP",
+ "GeoMIP",
+ "LUMIP",
+ "OMIP",
+ "ScenarioMIP"
],
"cohort":[
"Registered"
@@ -200,11 +376,13 @@
"CNRM-CERFACS"
],
"source_id":"CNRM-ESM2-1",
- "source":"CNRM-ESM2-1 (2016): \naerosol: TACTIC (v2.0)\natmos: Arpege 6.2 (Tl127; 91 levels; top level 78.4 km)\natmosChem: REPROBUS-C (v2.0)\nland: Surfex 8.0c\nocean: Nemo 3.6 (eORCA1; tripolar primarily 1deg latitude/longitude; 75 levels; top grid cell 0-1 m)\nocnBgchem: Pisces 2.s\nseaIce: Gelato 6.1"
+ "source":"CNRM-ESM2-1 (2017): \naerosol: TACTIC_v2\natmos: Arpege 6.3 (T127; Gaussian Reduced with 24572 grid points in total distributed over 128 latitude circles (with 256 grid points per latitude circle between 30degN and 30degS reducing to 20 grid points per latitude circle at 88.9degN and 88.9degS); 91 levels; top level 78.4 km)\natmosChem: REPROBUS-C_v2\nland: Surfex 8.0c\nlandIce: none\nocean: Nemo 3.6 (eORCA1, tripolar primarily 1deg; 362 x 294 longitude/latitude; [...]
},
"CNRM-ESM2-1-HR":{
"activity_participation":[
- ""
+ "CMIP",
+ "OMIP",
+ "ScenarioMIP"
],
"cohort":[
"Registered"
@@ -213,11 +391,50 @@
"CNRM-CERFACS"
],
"source_id":"CNRM-ESM2-1-HR",
- "source":"CNRM-ESM2-1-HR (2016): \naerosol: TACTIC (v2.0)\natmos: Arpege 6.2 (Tl359; 91 levels; top level 78.4 km)\natmosChem: OZL_v2\nland: Surfex 8.0c\nocean: Nemo 3.6 (eORCA025; tripolar primarily 1/4deg latitude/longitude; 75 levels; top grid cell 0-1 m)\nocnBgchem: Pisces 2.s\nseaIce: Gelato 6.1"
+ "source":"CNRM-ESM2-1-HR (2017): \naerosol: TACTIC_v2\natmos: Arpege 6.3 (T359; Gaussian Reduced with 181724 grid points in total distributed over 360 latitude circles (with 720 grid points per latitude circle between 33.2degN and 32.2degS reducing to 18 grid points per latitude circle at 89.6degN and 89.6degS); 91 levels; top level 78.4 km)\natmosChem: REPROBUS-C_v2\nland: Surfex 8.0c\nlandIce: none\nocean: Nemo 3.6 (eORCA025, tripolar primarily 1/4deg; 1442 x 1050 longi [...]
+ },
+ "CanESM5":{
+ "activity_participation":[
+ "C4MIP",
+ "CFMIP",
+ "CMIP",
+ "CORDEX",
+ "DAMIP",
+ "DCPP",
+ "DynVarMIP",
+ "FAFMIP",
+ "GMMIP",
+ "GeoMIP",
+ "ISMIP6",
+ "LS3MIP",
+ "LUMIP",
+ "OMIP",
+ "RFMIP",
+ "SIMIP",
+ "ScenarioMIP",
+ "VIACSAB"
+ ],
+ "cohort":[
+ "Registered"
+ ],
+ "institution_id":[
+ "CCCma"
+ ],
+ "source_id":"CanESM5",
+ "source":"CanESM5 (2017): \naerosol: interactive\natmos: CanAM5 (T63L49 native atmosphere, T63 Linear Gaussian Grid; 128 x 64 longitude/latitude; 49 levels; top level 1 hPa)\natmosChem: fast chemistry, aerosol only\nland: CLASS3.6/CTEM1.2\nlandIce: none\nocean: NEMO3.4.1 (ORCA1, tripolar grid, 1 deg with refinement to 1/3 deg within 20 degrees of the equator; 362 x 292 longitude/latitude; 41 vertical levels; top grid cell 0-10 m)\nocnBgchem: CanOE\nseaIce: LIM2"
},
"EC-Earth3":{
"activity_participation":[
- ""
+ "CMIP",
+ "CORDEX",
+ "DCPP",
+ "DynVarMIP",
+ "LS3MIP",
+ "RFMIP",
+ "SIMIP",
+ "ScenarioMIP",
+ "VIACSAB",
+ "VolMIP"
],
"cohort":[
"Registered"
@@ -226,11 +443,13 @@
"EC-Earth-Consortium"
],
"source_id":"EC-Earth3",
- "source":"EC-Earth3 (2017): \natmos: IFS cy36r4 (TL255, linearly reduced Gaussian grid equivalent to 512 x 256, 91 levels, top level: 0,01 hPa)\nland: HTESSEL (land surface scheme built in IFS)\nocean: NEMO3.6 (ORCA1 tripolar primarily 1 deg latitude/longitude with meridional refinement down to 1/3 degree in the tropics; 75 levels; top grid cell 5 m)\nseaIce: LIM3"
+ "source":"EC-Earth3 (2017): \naerosol: none\natmos: IFS cy36r4 (TL255; linearly reduced Gaussian grid; 512 x 256 longitude/latitude; 91 levels; top level 0.01 hPa)\natmosChem: none\nland: HTESSEL (land surface scheme built in IFS)\nlandIce: none\nocean: NEMO3.6 (ORCA1; tripolar primarily 1 deg with meridional refinement down to 1/3 degree in the tropics; 362 x 292 longitude/latitude; 75 levels; top grid cell 0-1 m)\nocnBgchem: none\nseaIce: LIM3"
},
"EC-Earth3-AerChem":{
"activity_participation":[
- ""
+ "AerChemMIP",
+ "CMIP",
+ "ScenarioMIP"
],
"cohort":[
"Registered"
@@ -239,11 +458,13 @@
"EC-Earth-Consortium"
],
"source_id":"EC-Earth3-AerChem",
- "source":"EC-Earth3-AerChem (2017): \naerosol: TM5\natmos: IFS cy36r4 (TL255, linearly reduced Gaussian grid equivalent to 512 x 256, 91 levels, top level: 0.01 hPa)\natmosChem: TM5 (3 deg. (long.) x 2 deg. (lat.), 34 levels, top level: 0.1 hPa\nland: HTESSEL (land surface scheme built in IFS)\nocean: NEMO3.6 (ORCA1 tripolar primarily 1 deg latitude/longitude with meridional refinement down to 1/3 degree in the tropics; 75 levels; top grid cell 5 m)\nseaIce: LIM3"
+ "source":"EC-Earth3-AerChem (2017): \naerosol: TM5 (3 x 2 degrees; 120 x 90 longitude/latitude; 34 levels; top level 0.1 hPa)\natmos: IFS cy36r4 (TL255; linearly reduced Gaussian grid; 512 x 256 longitude/latitude; 91 levels; top level 0.01 hPa)\natmosChem: TM5 (3 x 2 degrees; 120 x 90 longitude/latitude; 34 levels; top level 0.1 hPa)\nland: HTESSEL (land surface scheme built in IFS)\nlandIce: none\nocean: NEMO3.6 (ORCA1; tripolar primarily 1 deg with meridional refinemen [...]
},
"EC-Earth3-CC":{
"activity_participation":[
- ""
+ "C4MIP",
+ "CMIP",
+ "LUMIP"
],
"cohort":[
"Registered"
@@ -252,11 +473,13 @@
"EC-Earth-Consortium"
],
"source_id":"EC-Earth3-CC",
- "source":"EC-Earth3-CC (2017): \natmos: IFS cy36r4 (TL255, linearly reduced Gaussian grid equivalent to 512 x 256, 91 levels, top level: 0.01 hPa)\natmosChem: TM5 (3 deg. (long.) x 2 deg. (lat.), 34 levels, top level: 0.1 hPa\nland: LPJ-GUESS v4\nocean: NEMO3.6 (ORCA1 tripolar primarily 1 deg latitude/longitude with meridional refinement down to 1/3 degree in the tropics; 75 levels; top grid cell 5 m)\nocnBgchem: PISCES v2\nseaIce: LIM3"
+ "source":"EC-Earth3-CC (2017): \naerosol: none\natmos: IFS cy36r4 (TL255; linearly reduced Gaussian grid; 512 x 256 longitude/latitude; 91 levels; top level 0.01 hPa)\natmosChem: TM5 (3 x 2 degrees; 120 x 90 longitude/latitude; 34 levels; top level 0.1 hPa)\nland: HTESSEL (land surface scheme built in IFS) and LPJ-GUESS v4\nlandIce: none\nocean: NEMO3.6 (ORCA1; tripolar primarily 1 deg with meridional refinement down to 1/3 degree in the tropics; 362 x 292 longitude/latit [...]
},
"EC-Earth3-GrIS":{
"activity_participation":[
- ""
+ "CMIP",
+ "ISMIP6",
+ "PMIP"
],
"cohort":[
"Registered"
@@ -265,11 +488,12 @@
"EC-Earth-Consortium"
],
"source_id":"EC-Earth3-GrIS",
- "source":"EC-Earth3-GrIS (2017): \natmos: IFS cy36r4 (TL255, linearly reduced Gaussian grid equivalent to 512 x 256, 91 levels, top level: 0.01 hPa)\nland: HTESSEL (land surface scheme built in IFS)\nlandIce: PISM 0.7 (5 km x 5 km, L442)\nocean: NEMO3.6 (ORCA1 tripolar primarily 1 deg latitude/longitude with meridional refinement down to 1/3 degree in the tropics; 75 levels; top grid cell 5 m)\nseaIce: LIM3"
+ "source":"EC-Earth3-GrIS (2017): \naerosol: none\natmos: IFS cy36r4 (TL255; linearly reduced Gaussian grid; 512 x 256 longitude/latitude; 91 levels; top level 0.01 hPa)\natmosChem: none\nland: HTESSEL (land surface scheme built in IFS)\nlandIce: PISM 0.7 (5 x 5 km; 442 levels)\nocean: NEMO3.6 (ORCA1; tripolar primarily 1 deg with meridional refinement down to 1/3 degree in the tropics; 362 x 292 longitude/latitude; 75 levels; top grid cell 0-1 m)\nocnBgchem: none\nseaIce: LIM3"
},
"EC-Earth3-HR":{
"activity_participation":[
- ""
+ "DCPP",
+ "HighResMIP"
],
"cohort":[
"Registered"
@@ -278,11 +502,12 @@
"EC-Earth-Consortium"
],
"source_id":"EC-Earth3-HR",
- "source":"EC-Earth3-HR (2017): \natmos: IFS cy36r4 (TL511, linearly reduced Gaussian grid equivalent to 1024 x 512; 91 levels; top level 0.01 hPa)\nland: HTESSEL (land surface scheme built in IFS)\nocean: NEMO3.6 (tripolar, 1442x1921; 75 levels; top grid cell 5m)\nseaIce: LIM3"
+ "source":"EC-Earth3-HR (2017): \naerosol: none\natmos: IFS cy36r4 (TL511; linearly reduced Gaussian grid; 1024 x 512 longitude/latitude; 91 levels; top level 0.01 hPa)\natmosChem: none\nland: HTESSEL (land surface scheme built in IFS)\nlandIce: none\nocean: NEMO3.6 (ORCA1; tripolar primarily 0.25 degrees; 1442 x 1921 longitude/latitude; 75 levels; top grid cell 0-1 m)\nocnBgchem: none\nseaIce: LIM3"
},
"EC-Earth3-LR":{
"activity_participation":[
- ""
+ "CMIP",
+ "PMIP"
],
"cohort":[
"Registered"
@@ -291,11 +516,14 @@
"EC-Earth-Consortium"
],
"source_id":"EC-Earth3-LR",
- "source":"EC-Earth3-LR (2017): \natmos: IFS cy36r4 (TL159, linearly reduced Gaussian grid equivalent to 320 x 160; 62 levels; top level 5 hPa)\nland: HTESSEL (land surface scheme built in IFS)\nocean: NEMO3.6 (ORCA1 tripolar primarily 1 deg latitude/longitude with meridional refinement down to 1/3 degree in the tropics; 75 levels; top grid cell 5 m)\nseaIce: LIM3"
+ "source":"EC-Earth3-LR (2017): \naerosol: none\natmos: IFS cy36r4 (TL159; linearly reduced Gaussian grid; 320 x 160 longitude/latitude; 62 levels; top level 5 hPa)\natmosChem: none\nland: HTESSEL (land surface scheme built in IFS)\nlandIce: none\nocean: NEMO3.6 (ORCA1; tripolar primarily 1 deg with meridional refinement down to 1/3 degree in the tropics; 362 x 292 longitude/latitude; 75 levels; top grid cell 0-1 m)\nocnBgchem: none\nseaIce: LIM3"
},
"EC-Earth3-Veg":{
"activity_participation":[
- ""
+ "CMIP",
+ "LS3MIP",
+ "LUMIP",
+ "ScenarioMIP"
],
"cohort":[
"Registered"
@@ -304,11 +532,13 @@
"EC-Earth-Consortium"
],
"source_id":"EC-Earth3-Veg",
- "source":"EC-Earth3-Veg (2017): \natmos: IFS cy36r4 (TL255, linearly reduced Gaussian grid equivalent to 512 x 256, 91 levels, top level: 0.01 hPa)\nland: LPJ-GUESS v4\nocean: NEMO3.6 (ORCA1 tripolar primarily 1 deg latitude/longitude with meridional refinement down to 1/3 degree in the tropics; 75 levels; top grid cell 5 m)\nseaIce: LIM3"
+ "source":"EC-Earth3-Veg (2017): \naerosol: none\natmos: IFS cy36r4 (TL255; linearly reduced Gaussian grid; 512 x 256 longitude/latitude; 91 levels; top level 0.01 hPa)\natmosChem: none\nland: HTESSEL (land surface scheme built in IFS)\nlandIce: none\nocean: NEMO3.6 (ORCA1; tripolar primarily 1 deg with meridional refinement down to 1/3 degree in the tropics; 362 x 292 longitude/latitude; 75 levels; top grid cell 0-1 m)\nocnBgchem: none\nseaIce: LIM3"
},
"EC-Earth3-Veg-LR":{
"activity_participation":[
- ""
+ "CMIP",
+ "PMIP",
+ "ScenarioMIP"
],
"cohort":[
"Registered"
@@ -317,11 +547,12 @@
"EC-Earth-Consortium"
],
"source_id":"EC-Earth3-Veg-LR",
- "source":"EC-Earth3-Veg-LR (2017): \natmos: IFS cy36r4 (TL159, linearly reduced Gaussian grid equivalent to 320 x 160; 62 levels; top level 5 hPa)\nland: LPJ-GUESS v4\nocean: NEMO3.6 (ORCA1 tripolar primarily 1 deg latitude/longitude with meridional refinement down to 1/3 degree in the tropics; 75 levels; top grid cell 5 m)\nseaIce: LIM3"
+ "source":"EC-Earth3-Veg-LR (2017): \naerosol: none\natmos: IFS cy36r4 (TL159; linearly reduced Gaussian grid; 320 x 160 longitude/latitude; 62 levels; top level 5 hPa)\natmosChem: none\nland: HTESSEL (land surface scheme built in IFS) and LPJ-GUESS v4\nlandIce: none\nocean: NEMO3.6 (ORCA1; tripolar primarily 1 deg with meridional refinement down to 1/3 degree in the tropics; 362 x 292 longitude/latitude; 75 levels; top grid cell 0-1 m)\nocnBgchem: none\nseaIce: LIM3"
},
"EMAC-2-53-AerChem":{
"activity_participation":[
- ""
+ "AerChemMIP",
+ "CMIP"
],
"cohort":[
"Registered"
@@ -330,11 +561,12 @@
"MESSy-Consortium"
],
"source_id":"EMAC-2-53-AerChem",
- "source":"EMAC-2-53-AerChem (2017): \naerosol: gmxe 2.2.x\natmos: ECHAM5.3.02 (modified; spectral T42; 128 x 64 longitude/latitude; 90 levels; top level 0.001 hPa)\natmosChem: MECCA 3.8.x\nland: same as Atmosphere\nocean: MPIOM 1.3.0-beta (bipolar GR1.5; approximately 1.5deg latitude/longitude; 40 levels; top grid cell 0-12 m)\nseaIce: thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model"
+ "source":"EMAC-2-53-AerChem (2017): \naerosol: gmxe 2.2.x\natmos: ECHAM5.3.02 (modified, spectral T42; 128 x 64 longitude/latitude; 47 levels; top level 0.01 hPa)\natmosChem: MECCA 3.8.x\nland: same as Atmosphere\nlandIce: none\nocean: MPIOM 1.3.0-beta (bipolar GR1.5, approximately 1.5deg; 256 x 220 longitude/latitude; 40 levels; top grid cell 0-12 m)\nocnBgchem: none\nseaIce: thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model"
},
"EMAC-2-53-Vol":{
"activity_participation":[
- ""
+ "CMIP",
+ "VolMIP"
],
"cohort":[
"Registered"
@@ -343,7 +575,7 @@
"MESSy-Consortium"
],
"source_id":"EMAC-2-53-Vol",
- "source":"EMAC-2-53-Vol (2017): \naerosol: gmxe 2.2.x\natmos: ECHAM5.3.2 (modified; spectral T42; 128 x 64 longitude/latitude; 90 levels; top level 0.001 hPa)\natmosChem: MECCA 3.8.x\nland: same as Atmosphere\nocean: MPIOM 1.3.0-beta (bipolar GR1.5; approximately 1.5deg reducing toward the poles, 256 x 220 longitude/latitude; 40 levels; top grid cell 0-12 m)\nseaIce: thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model"
+ "source":"EMAC-2-53-Vol (2017): \naerosol: gmxe 2.2.x\natmos: ECHAM5.3.02 (modified; spectral T42; 128 x 64 longitude/latitude; 47 levels; top level 0.01 hPa)\natmosChem: MECCA 3.8.x\nland: same as Atmosphere\nlandIce: none\nocean: MPIOM 1.3.0-beta (bipolar GR1.5, approximately 1.5deg reducing toward the poles; 256 x 220 longitude/latitude; 40 levels; top grid cell 0-12 m)\nocnBgchem: none\nseaIce: thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model"
},
"GFDL-AM4":{
"activity_participation":[
@@ -356,7 +588,7 @@
"NOAA-GFDL"
],
"source_id":"GFDL-AM4",
- "source":"GFDL-AM4 (2017): \naerosol: interactive\natmos: GFDL-AM4.0 (Cubed-sphere (c96) - 1 degree nominal horizontal resolution; 360x180 longitude/latitude; 32 levels; model top: 1 hPa)\natmosChem: fast chemistry, aerosol only\nland: GFDL-LM4.0\nlandIce: GFDL-LM4.0\nocean: none\nocnBgchem: none\nseaIce: none"
+ "source":"GFDL-AM4 (2017): \naerosol: interactive\natmos: GFDL-AM4.0 (Cubed-sphere (c96) - 1 degree nominal horizontal resolution; 360 x 180 longitude/latitude; 33 levels; top level 1 hPa)\natmosChem: fast chemistry, aerosol only\nland: GFDL-LM4.0\nlandIce: GFDL-LM4.0\nocean: none\nocnBgchem: none\nseaIce: none"
},
"GFDL-CM4":{
"activity_participation":[
@@ -370,7 +602,7 @@
"NOAA-GFDL"
],
"source_id":"GFDL-CM4",
- "source":"GFDL-CM4 (2017): \naerosol: interactive\natmos: GFDL-AM4.1 (Cubed-sphere (c96) - 1 degree nominal horizontal resolution; 360x180 longitude/latitude; 32 levels; model top: 1 hPa)\natmosChem: unnamed (fast chemistry, aerosol only)\nland: GFDL-LM4.0\nlandIce: GFDL-LM4.0\nocean: GFDL-MOM6 (tripolar - nominal 0.25 deg latitude/longitude; 1440x720 longitude/latitude; 75 levels; top grid cell 0-2 m)\nocnBgchem: none\nseaIce: SIS2"
+ "source":"GFDL-CM4 (2017): \naerosol: interactive\natmos: GFDL-AM4.1 (Cubed-sphere (c96) - 1 degree nominal horizontal resolution; 360 x 180 longitude/latitude; 33 levels; top level 1 hPa)\natmosChem: unnamed (fast chemistry, aerosol only)\nland: GFDL-LM4.0\nlandIce: GFDL-LM4.0\nocean: GFDL-MOM6 (tripolar - nominal 0.25 deg; 1440 x 720 longitude/latitude; 75 levels; top grid cell 0-2 m)\nocnBgchem: none\nseaIce: SIS2"
},
"GFDL-ESM4":{
"activity_participation":[
@@ -393,11 +625,11 @@
"NOAA-GFDL"
],
"source_id":"GFDL-ESM4",
- "source":"GFDL-ESM4 (2017): \naerosol: interactive\natmos: GFDL-AM4.1 (Cubed-sphere (c96) - 1 degree nominal horizontal resolution; 360x180 longitude/latitude; 48 levels, model top: 1 Pa)\natmosChem: GFDL-ATMCHEM4.1 (full atmospheric chemistry)\nland: GFDL-LM4.1\nlandIce: GFDL-LM4.1\nocean: GFDL-MOM6 (tripolar - nominal 0.5 deg; 720x360 longitude/latitude; 75 levels; top grid cell 0-2 m)\nocnBgchem: COBALT 2.0\nseaIce: SIS2"
+ "source":"GFDL-ESM4 (2017): \naerosol: interactive\natmos: GFDL-AM4.1 (Cubed-sphere (c96) - 1 degree nominal horizontal resolution; 360 x 180 longitude/latitude; 49 levels; top level 1 Pa)\natmosChem: GFDL-ATMCHEM4.1 (full atmospheric chemistry)\nland: GFDL-LM4.1\nlandIce: GFDL-LM4.1\nocean: GFDL-MOM6 (tripolar - nominal 0.5 deg; 720 x 360 longitude/latitude; 75 levels; top grid cell 0-2 m)\nocnBgchem: COBALT 2.0\nseaIce: SIS2"
},
"GISS-E2-1G":{
"activity_participation":[
- ""
+ "CMIP"
],
"cohort":[
"Registered"
@@ -406,11 +638,11 @@
"NASA-GISS"
],
"source_id":"GISS-E2-1G",
- "source":"GISS-E2.1G (2016): \natmos: GISS-E2.1 (90 x 144 2x2.5; 40 levels; top level 0.1hPa)\natmosChem: varies with physics-version (p==1 Non-interactive, p>1 GPUCCINI)\nland: GISS LSM\nlandIce: Fixed\nocean: GISS Ocean (1 deg latitude/longitude; 32 levels; top grid cell 0-10m)\nseaIce: GISS SI"
+ "source":"GISS-E2.1G (2016): \naerosol: Varies with physics-version (p==1 none, p==3 OMA, p==4 TOMAS, p==5 MATRIX)\natmos: GISS-E2.1 (2x2.5 degree; 90 x 144 longitude/latitude; 40 levels; top level 0.1 hPa)\natmosChem: Varies with physics-version (p==1 Non-interactive, p>1 GPUCCINI)\nland: GISS LSM\nlandIce: none\nocean: GISS Ocean (1 degree; 360 x 180 latitude/longitude; 32 levels; top grid cell 0-10 m)\nocnBgchem: none\nseaIce: GISS SI"
},
"GISS-E2-1H":{
"activity_participation":[
- ""
+ "CMIP"
],
"cohort":[
"Registered"
@@ -419,7 +651,7 @@
"NASA-GISS"
],
"source_id":"GISS-E2-1H",
- "source":"GISS-E2.1H (2016): \natmos: GISS-E2.1 (90 x 144 2x2.5; 40 levels; top level 0.1hPa)\natmosChem: varies with physics-version (p==1 Non-interactive, p>1 GPUCCINI)\nland: GISS LSM\nlandIce: Fixed\nocean: HYCOM Ocean (tripolar grid; ~1 deg latitude/longitude; 26 levels; top grid cell 0-10m)\nseaIce: GISS SI"
+ "source":"GISS-E2.1H (2016): \naerosol: Varies with physics-version (p==1 none, p==3 OMA, p==4 TOMAS, p==5 MATRIX)\natmos: GISS-E2.1 (2x2.5 degree; 90 x 144 longitude/latitude; 40 levels; top level 0.1 hPa)\natmosChem: Varies with physics-version (p==1 Non-interactive, p>1 GPUCCINI)\nland: GISS LSM\nlandIce: none\nocean: HYCOM Ocean (~1 degree tripolar grid; 360 x 180 latitude/longitude; 26 levels; top grid cell 0-10 m)\nocnBgchem: none\nseaIce: GISS SI"
},
"HadGEM3-GC31-HH":{
"activity_participation":[
@@ -432,7 +664,7 @@
"MOHC"
],
"source_id":"HadGEM3-GC31-HH",
- "source":"HadGEM3-GC31-HH (2016): \naerosol: UKCA-GLOMAP-mode\natmos: MetUM-HadGEM3-GA7.1 (1024 x 768 N512; 85 levels; top level 85km)\nland: JULES-HadGEM3-GL7.1\nocean: NEMO-HadGEM3-GO6.0 (ORCA12 tripolar primarily 1/12 deg latitude/longitude; 75 levels; top grid cell 0-1m)\nseaIce: CICE-HadGEM3-GSI8 (ORCA12 tripolar primarily 1/12 deg latitude/longitude)"
+ "source":"HadGEM3-GC31-HH (2016): \naerosol: UKCA-GLOMAP-mode\natmos: MetUM-HadGEM3-GA7.1 (1024 x 768 N512; 85 levels; top level 85km)\natmosChem: none\nland: JULES-HadGEM3-GL7.1\nlandIce: none\nocean: NEMO-HadGEM3-GO6.0 (ORCA12 tripolar primarily 1/12 deg latitude/longitude; 75 levels; top grid cell 0-1m)\nocnBgchem: none\nseaIce: CICE-HadGEM3-GSI8 (ORCA12 tripolar primarily 1/12 deg latitude/longitude)"
},
"HadGEM3-GC31-HM":{
"activity_participation":[
@@ -445,7 +677,7 @@
"MOHC"
],
"source_id":"HadGEM3-GC31-HM",
- "source":"HadGEM3-GC31-HM (2016): \naerosol: UKCA-GLOMAP-mode\natmos: MetUM-HadGEM3-GA7.1 (1024 x 768 N512; 85 levels; top level 85km)\nland: JULES-HadGEM3-GL7.1\nocean: NEMO-HadGEM3-GO6.0 (ORCA025 tripolar primarily 0.25 deg latitude/longitude; 75 levels; top grid cell 0-1m)\nseaIce: CICE-HadGEM3-GSI8 (ORCA025 tripolar primarily 0.25 deg latitude/longitude)"
+ "source":"HadGEM3-GC31-HM (2016): \naerosol: UKCA-GLOMAP-mode\natmos: MetUM-HadGEM3-GA7.1 (1024 x 768 N512; 85 levels; top level 85km)\natmosChem: none\nland: JULES-HadGEM3-GL7.1\nlandIce: none\nocean: NEMO-HadGEM3-GO6.0 (ORCA025 tripolar primarily 0.25 deg latitude/longitude; 75 levels; top grid cell 0-1m)\nocnBgchem: none\nseaIce: CICE-HadGEM3-GSI8 (ORCA025 tripolar primarily 0.25 deg latitude/longitude)"
},
"HadGEM3-GC31-LL":{
"activity_participation":[
@@ -458,7 +690,7 @@
"MOHC"
],
"source_id":"HadGEM3-GC31-LL",
- "source":"HadGEM3-GC31-LL (2016): \naerosol: UKCA-GLOMAP-mode\natmos: MetUM-HadGEM3-GA7.1 (192 x 144 N96; 85 levels; top level 85km)\nland: JULES-HadGEM3-GL7.1\nocean: NEMO-HadGEM3-GO6.0 (ORCA1 tripolar primarily 1 deg latitude/longitude with meridional refinement down to 1/3 degree in the tropics; 75 levels; top grid cell 0-1m)\nseaIce: CICE-HadGEM3-GSI8 (ORCA1 tripolar primarily 1 deg latitude/longitude)"
+ "source":"HadGEM3-GC31-LL (2016): \naerosol: UKCA-GLOMAP-mode\natmos: MetUM-HadGEM3-GA7.1 (192 x 144 N96; 85 levels; top level 85km)\natmosChem: none\nland: JULES-HadGEM3-GL7.1\nlandIce: none\nocean: NEMO-HadGEM3-GO6.0 (ORCA1 tripolar primarily 1 deg latitude/longitude with meridional refinement down to 1/3 degree in the tropics; 75 levels; top grid cell 0-1m)\nocnBgchem: none\nseaIce: CICE-HadGEM3-GSI8 (ORCA1 tripolar primarily 1 deg latitude/longitude)"
},
"HadGEM3-GC31-MM":{
"activity_participation":[
@@ -471,7 +703,7 @@
"MOHC"
],
"source_id":"HadGEM3-GC31-MM",
- "source":"HadGEM3-GC31-MM (2016): \naerosol: UKCA-GLOMAP-mode\natmos: MetUM-HadGEM3-GA7.1 (432 x 324 N216; 85 levels; top level 85km)\nland: JULES-HadGEM3-GL7.1\nocean: NEMO-HadGEM3-GO6.0 (ORCA025 tripolar primarily 0.25 deg latitude/longitude; 75 levels; top grid cell 0-1m)\nseaIce: CICE-HadGEM3-GSI8 (ORCA025 tripolar primarily 0.25 deg latitude/longitude)"
+ "source":"HadGEM3-GC31-MM (2016): \naerosol: UKCA-GLOMAP-mode\natmos: MetUM-HadGEM3-GA7.1 (432 x 324 N216; 85 levels; top level 85km)\natmosChem: none\nland: JULES-HadGEM3-GL7.1\nlandIce: none\nocean: NEMO-HadGEM3-GO6.0 (ORCA025 tripolar primarily 0.25 deg latitude/longitude; 75 levels; top grid cell 0-1m)\nocnBgchem: none\nseaIce: CICE-HadGEM3-GSI8 (ORCA025 tripolar primarily 0.25 deg latitude/longitude)"
},
"IITM-ESM":{
"activity_participation":[
@@ -484,7 +716,7 @@
"CCCR-IITM"
],
"source_id":"IITM-ESM",
- "source":"IITM-ESM (2015): \naerosol: unnamed (prescribed MAC-v2)\natmos: GFS (192 x 94 T62; 64 levels; top level 0.2 mb)\nland: NOAH LSM\nocean: MOM4p1 (tripolar, 360x200; 50 levels; top grid cell 5m)\nocnBgchem: TOPAZ\nseaIce: SIS"
+ "source":"IITM-ESM (2015): \naerosol: unnamed (prescribed MAC-v2)\natmos: GFS (192 x 94 T62; 64 levels; top level 0.2 mb)\natmosChem: none\nland: NOAH LSM\nlandIce: none\nocean: MOM4p1 (tripolar, 360x200; 50 levels; top grid cell 5m)\nocnBgchem: TOPAZ\nseaIce: SIS"
},
"MIROC-ES2H":{
"activity_participation":[
@@ -497,7 +729,7 @@
"MIROC"
],
"source_id":"MIROC-ES2H",
- "source":"MIROC-ES2H (2017): \naerosol: SPRINTARS6.0\natmos: CCSR AGCM (T85; 256 x 128 longitude/latitude; 81 levels; top level 0.004 hPa)\natmosChem: CHASER4.0\nland: MATSIRO6.0+VISIT-e ver.1.0\nocean: COCO4.9 (tripolar primarily 1deg; 360 x 256 longitude/latitude; 63 levels; top grid cell 0-2 m)\nocnBgchem: OECO ver.2.0; NPZD-type with C/N/P/Fe/O cycles\nseaIce: COCO4.9"
+ "source":"MIROC-ES2H (2017): \naerosol: SPRINTARS6.0\natmos: CCSR AGCM (T85; 256 x 128 longitude/latitude; 81 levels; top level 0.004 hPa)\natmosChem: CHASER4.0\nland: MATSIRO6.0+VISIT-e ver.1.0\nlandIce: none\nocean: COCO4.9 (tripolar primarily 1deg; 360 x 256 longitude/latitude; 63 levels; top grid cell 0-2 m)\nocnBgchem: OECO ver.2.0; NPZD-type with C/N/P/Fe/O cycles\nseaIce: COCO4.9"
},
"MIROC-ES2L":{
"activity_participation":[
@@ -510,7 +742,7 @@
"MIROC"
],
"source_id":"MIROC-ES2L",
- "source":"MIROC-ES2L (2017): \naerosol: SPRINTARS6.0\natmos: CCSR AGCM (T42; 128 x 64 longitude/latitude; 40 levels; top level 3 hPa)\nland: MATSIRO6.0+VISIT-e ver.1.0\nocean: COCO4.9 (tripolar primarily 1deg; 360 x 256 longitude/latitude; 63 levels; top grid cell 0-2 m)\nocnBgchem: OECO ver.2.0; NPZD-type with C/N/P/Fe/O cycles\nseaIce: COCO4.9"
+ "source":"MIROC-ES2L (2017): \naerosol: SPRINTARS6.0\natmos: CCSR AGCM (T42; 128 x 64 longitude/latitude; 40 levels; top level 3 hPa)\natmosChem: none\nland: MATSIRO6.0+VISIT-e ver.1.0\nlandIce: none\nocean: COCO4.9 (tripolar primarily 1deg; 360 x 256 longitude/latitude; 63 levels; top grid cell 0-2 m)\nocnBgchem: OECO ver.2.0; NPZD-type with C/N/P/Fe/O cycles\nseaIce: COCO4.9"
},
"MIROC6":{
"activity_participation":[
@@ -523,7 +755,7 @@
"MIROC"
],
"source_id":"MIROC6",
- "source":"MIROC6 (2017): \naerosol: SPRINTARS6.0\natmos: CCSR AGCM (T85; 256x128; 81 levels; top level 0.004 hPa)\nland: MATSIRO6.0\nocean: COCO4.9 (360x256x63; tripolar primarily 1deg; 63 levels; top grid cell 0-2 m)\nseaIce: COCO4.9"
+ "source":"MIROC6 (2017): \naerosol: SPRINTARS6.0\natmos: CCSR AGCM (T85; 256x128; 81 levels; top level 0.004 hPa)\natmosChem: none\nland: MATSIRO6.0\nlandIce: none\nocean: COCO4.9 (360x256x63; tripolar primarily 1deg; 63 levels; top grid cell 0-2 m)\nocnBgchem: none\nseaIce: COCO4.9"
},
"MPIESM-1-2-HR":{
"activity_participation":[
@@ -536,7 +768,7 @@
"MPI-M"
],
"source_id":"MPIESM-1-2-HR",
- "source":"MPIESM1.2-HR (2017): \natmos: ECHAM6.3 (spectral T127; 384 x 192 longitude/latitude; 95 levels; top level 0.01 hPa)\nland: JSBACH3.2\nocean: MPIOM1.63 (tripolar TP04; approximately 0.4deg latitude/longitude; 40 levels; top grid cell 0-12 m)\nocnBgchem: HAMOCC\nseaIce: thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model"
+ "source":"MPIESM1.2-HR (2017): \naerosol: none, prescribed MACv2-SP\natmos: ECHAM6.3 (spectral T127; 384 x 192 longitude/latitude; 95 levels; top level 0.01 hPa)\natmosChem: none\nland: JSBACH3.2\nlandIce: none/prescribed\nocean: MPIOM1.63 (tripolar TP04; approximately 0.4deg latitude/longitude; 40 levels; top grid cell 0-12 m)\nocnBgchem: HAMOCC\nseaIce: thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model"
},
"MPIESM-1-2-LR":{
"activity_participation":[
@@ -549,7 +781,7 @@
"MPI-M"
],
"source_id":"MPIESM-1-2-LR",
- "source":"MPIESM1.2-LR (2017): \natmos: ECHAM6.3 (spectral T63; 192 x 96 longitude/latitude; 47 levels; top level 0.01 hPa)\nland: JSBACH3.2\nocean: MPIOM1.63 (bipolar GR1.5; approximately 1.5deg latitude/longitude; 40 levels; top grid cell 0-12 m)\nocnBgchem: HAMOCC\nseaIce: thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model"
+ "source":"MPIESM1.2-LR (2017): \naerosol: none, prescribed MACv2-SP\natmos: ECHAM6.3 (spectral T63; 192 x 96 longitude/latitude; 47 levels; top level 0.01 hPa)\natmosChem: none\nland: JSBACH3.2\nlandIce: none/prescribed\nocean: MPIOM1.63 (bipolar GR1.5; approximately 1.5deg latitude/longitude; 40 levels; top grid cell 0-12 m)\nocnBgchem: HAMOCC\nseaIce: thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model"
},
"MPIESM-2-LR":{
"activity_participation":[
@@ -562,11 +794,28 @@
"MPI-M"
],
"source_id":"MPIESM-2-LR",
- "source":"MPIESM2 (2017): \natmos: ICON-AES (icosahedral/triangles; 160 km; 47 levels; top level 80 km)\nland: JSBACH4.2\nocean: ICON-OES (icosahedral/triangles; 40 km; 40 levels; top grid cell 0-12 m)\nocnBgchem: HAMOCC\nseaIce: thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model"
+ "source":"MPIESM2 (2017): \naerosol: none, prescribed MACv2-SP\natmos: ICON-AES (icosahedral/triangles; 160 km; 47 levels; top level 80 km)\natmosChem: none\nland: JSBACH4.2\nlandIce: none/prescribed\nocean: ICON-OES (icosahedral/triangles; 40 km; 40 levels; top grid cell 0-12 m)\nocnBgchem: HAMOCC\nseaIce: thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model"
},
"MRI-ESM2-0":{
"activity_participation":[
- ""
+ "AerChemMIP",
+ "C4MIP",
+ "CFMIP",
+ "CMIP",
+ "CORDEX",
+ "DAMIP",
+ "DCPP",
+ "DynVarMIP",
+ "FAFMIP",
+ "GMMIP",
+ "GeoMIP",
+ "LS3MIP",
+ "OMIP",
+ "PMIP",
+ "RFMIP",
+ "SIMIP",
+ "ScenarioMIP",
+ "VolMIP"
],
"cohort":[
"Registered"
@@ -575,7 +824,7 @@
"MRI"
],
"source_id":"MRI-ESM2-0",
- "source":"MRI-ESM2.0 (2017): \naerosol: MASINGAR mk2r4\natmos: MRI-AGCM3.5 (320 x 160 TL159; 80 levels; top level 0.01 hPa)\natmosChem: MRI-CCM2.1\nland: HAL 1.0\nocean: MRI.COM4.4 (tripolar primarily 0.5 deg latitude/1 deg longitude with meridional refinement down to 0.3 deg within 10 degrees north and south of the equator; 360 x 364 longitude/latitude; 61 levels; top grid cell 0-2 m)\nocnBgchem: MRI.COM4.4\nseaIce: MRI.COM4.4"
+ "source":"MRI-ESM2.0 (2017): \naerosol: MASINGAR mk2r4 (TL95; 192 x 96 longitude/latitude; 80 levels; top level 0.01 hPa)\natmos: MRI-AGCM3.5 (TL159; 320 x 160 longitude/latitude; 80 levels; top level 0.01 hPa)\natmosChem: MRI-CCM2.1 (T42; 128 x 64 longitude/latitude; 80 levels; top level 0.01 hPa)\nland: HAL 1.0\nlandIce: none\nocean: MRI.COM4.4 (tripolar primarily 0.5 deg latitude/1 deg longitude with meridional refinement down to 0.3 deg within 10 degrees north and sou [...]
},
"NICAM16-7S":{
"activity_participation":[
@@ -588,7 +837,7 @@
"MIROC"
],
"source_id":"NICAM16-7S",
- "source":"NICAM16-7S (2017): \naerosol: Prescribed MACv2-SP\natmos: NICAM.16 (56km icosahedral grid; 163,842 grid cells (=10*4^7+2); 38 levels; top level 40 km)\nland: MATSIRO6 (w/o MOSAIC)\nseaIce: Fixed"
+ "source":"NICAM16-7S (2017): \naerosol: Prescribed MACv2-SP\natmos: NICAM.16 (56km icosahedral grid; 163,842 grid cells (=10*4^7+2); 38 levels; top level 40 km)\natmosChem: none\nland: MATSIRO6 (w/o MOSAIC)\nlandIce: none\nocean: none\nocnBgchem: none\nseaIce: Fixed"
},
"NICAM16-8S":{
"activity_participation":[
@@ -601,7 +850,7 @@
"MIROC"
],
"source_id":"NICAM16-8S",
- "source":"NICAM16-8S (2017): \naerosol: Prescribed MACv2-SP\natmos: NICAM.16 (28km icosahedral grid; 655,362 grid cells (=10*4^8+2); 38 levels; top level 40 km)\nland: MATSIRO6 (w/o MOSAIC)\nseaIce: Fixed"
+ "source":"NICAM16-8S (2017): \naerosol: Prescribed MACv2-SP\natmos: NICAM.16 (28km icosahedral grid; 655,362 grid cells (=10*4^8+2); 38 levels; top level 40 km)\natmosChem: none\nland: MATSIRO6 (w/o MOSAIC)\nlandIce: none\nocean: none\nocnBgchem: none\nseaIce: Fixed"
},
"NICAM16-9D-L78":{
"activity_participation":[
@@ -614,7 +863,7 @@
"MIROC"
],
"source_id":"NICAM16-9D-L78",
- "source":"NICAM16-9D-L78 (2017): \naerosol: Prescribed MACv2-SP\natmos: NICAM.16 (14km icosahedral grid; 2,621,442 grid cells (=10*4^9+2); 78 levels; top level 40 km)\nland: MATSIRO6 (w/o MOSAIC)\nseaIce: Fixed"
+ "source":"NICAM16-9D-L78 (2017): \naerosol: Prescribed MACv2-SP\natmos: NICAM.16 (14km icosahedral grid; 2,621,442 grid cells (=10*4^9+2); 78 levels; top level 40 km)\natmosChem: none\nland: MATSIRO6 (w/o MOSAIC)\nlandIce: none\nocean: none\nocnBgchem: none\nseaIce: Fixed"
},
"NICAM16-9S":{
"activity_participation":[
@@ -627,7 +876,7 @@
"MIROC"
],
"source_id":"NICAM16-9S",
- "source":"NICAM16-9S (2017): \naerosol: Prescribed MACv2-SP\natmos: NICAM.16 (14km icosahedral grid; 2,621,442 grid cells (=10*4^9+2); 38 levels; top level 40 km)\nland: MATSIRO6 (w/o MOSAIC)\nseaIce: Fixed"
+ "source":"NICAM16-9S (2017): \naerosol: Prescribed MACv2-SP\natmos: NICAM.16 (14km icosahedral grid; 2,621,442 grid cells (=10*4^9+2); 38 levels; top level 40 km)\natmosChem: none\nland: MATSIRO6 (w/o MOSAIC)\nlandIce: none\nocean: none\nocnBgchem: none\nseaIce: Fixed"
},
"NorESM2-HH":{
"activity_participation":[
@@ -744,7 +993,7 @@
"PCMDI"
],
"source_id":"PCMDI-test-1-0",
- "source":"PCMDI-test 1.0 (1989): \natmos: Earth1.0-gettingHotter (360x180; 50 levels; top level 0.1 mb)\nland: Earth1.0\nocean: BlueMarble1.0-warming (360x180; 50 levels; top grid cell 0-10m)\nseaIce: Declining1.0-warming"
+ "source":"PCMDI-test 1.0 (1989): \naerosol: none\natmos: Earth1.0-gettingHotter (360x180; 50 levels; top level 0.1 mb)\natmosChem: none\nland: Earth1.0\nlandIce: none\nocean: BlueMarble1.0-warming (360x180; 50 levels; top grid cell 0-10m)\nocnBgchem: none\nseaIce: Declining1.0-warming"
},
"UKESM1-0-LL":{
"activity_participation":[
@@ -785,7 +1034,7 @@
"CSIR-CSIRO"
],
"source_id":"VRESM-1-0",
- "source":"VRESM 1.0 (2016): \naerosol: Rotstayn-1.0\natmos: VCAM-1.0 (192 x 192 x 6 C192; 35 levels; top level 35km)\nland: CABLE v2.2.3\nocean: VCOM-1.0 (192 x 192 x 6 C192; 35 levels; top grid cell 0-10m)\nocnBgchem: PISCES v3.4socco\nseaIce: CSIR-ICE (visco-plastic)"
+ "source":"VRESM 1.0 (2016): \naerosol: Rotstayn-1.0\natmos: VCAM-1.0 (192 x 192 x 6 C192; 35 levels; top level 35km)\natmosChem: none\nland: CABLE v2.2.3\nlandIce: none\nocean: VCOM-1.0 (192 x 192 x 6 C192; 35 levels; top grid cell 0-10m)\nocnBgchem: PISCES v3.4socco\nseaIce: CSIR-ICE (visco-plastic)"
}
},
"source_type":[
@@ -801,16 +1050,19 @@
"RAD",
"SLAB"
],
- "frequency":[
- "3hr",
- "6hr",
- "day",
- "fx",
- "mon",
- "monClim",
- "subhr",
- "yr"
- ],
+ "frequency":{
+ "1hr":"sampled hourly",
+ "1hrClimMon":"monthly climatology of diurnal cycle computed from hourly samples",
+ "3hr":"sampled every 3 hours",
+ "6hr":"sampled every 6 hours",
+ "day":"daily mean samples",
+ "dec":"decadal mean samples",
+ "fx":"fixed (time invariant) field",
+ "mon":"monthly mean samples",
+ "monClim":"monthly climatology computed from monthly mean samples",
+ "subhr":"sampled sub-hourly",
+ "yr":"annual mean samples"
+ },
"grid_label":[
"gm",
"gn",
@@ -3714,7 +3966,7 @@
],
"tier":"2"
},
- "highresSST-4co2":{
+ "highresSST-4xCO2":{
"activity_id":[
"HighResMIP"
],
@@ -3724,7 +3976,7 @@
"description":"Similar to CFMIP amip-4xCO2, SSTs are held at highresSST-present values and the CO2 seen by the radiation scheme is quadrupled",
"end_year":"2014",
"experiment":"highresSST-present SST with 4xCO2 concentrations",
- "experiment_id":"highresSST-4co2",
+ "experiment_id":"highresSST-4xCO2",
"min_number_yrs_per_sim":"36",
"parent_activity_id":[
"HighResMIP"
@@ -5529,7 +5781,7 @@
],
"tier":"2"
},
- "lfmip-pdL-princeton":{
+ "lfmip-pdLC":{
"activity_id":[
"LS3MIP"
],
@@ -5538,10 +5790,10 @@
"CHEM",
"BGC"
],
- "description":"Prescribed land conditions 1980-2014 climate with Land-Hist-princeton",
+ "description":"Prescribed land conditions 1980-2014 climate",
"end_year":"2100",
- "experiment":"as LFMIP-pdLC with Land-Hist-princeton",
- "experiment_id":"lfmip-pdL-princeton",
+ "experiment":"prescribed land conditions (from current climate climatology) and initialized from \"historical\" run year 1980",
+ "experiment_id":"lfmip-pdLC",
"min_number_yrs_per_sim":"121",
"parent_activity_id":[
"CMIP"
@@ -5556,9 +5808,9 @@
"sub_experiment_id":[
"none"
],
- "tier":"2"
+ "tier":"1"
},
- "lfmip-pdLC":{
+ "lfmip-pdLC-cruNcep":{
"activity_id":[
"LS3MIP"
],
@@ -5567,10 +5819,10 @@
"CHEM",
"BGC"
],
- "description":"Prescribed land conditions 1980-2014 climate",
+ "description":"Prescribed land conditions 1980-2014 climate with Land-Hist-cruNcep",
"end_year":"2100",
- "experiment":"prescribed land conditions (from current climate climatology) and initialized from \"historical\" run year 1980",
- "experiment_id":"lfmip-pdLC",
+ "experiment":"as LFMIP-pdLC with Land-Hist-cruNcep",
+ "experiment_id":"lfmip-pdLC-cruNcep",
"min_number_yrs_per_sim":"121",
"parent_activity_id":[
"CMIP"
@@ -5585,9 +5837,9 @@
"sub_experiment_id":[
"none"
],
- "tier":"1"
+ "tier":"2"
},
- "lfmip-pdLC-cruNcep":{
+ "lfmip-pdLC-princeton":{
"activity_id":[
"LS3MIP"
],
@@ -5596,10 +5848,10 @@
"CHEM",
"BGC"
],
- "description":"Prescribed land conditions 1980-2014 climate with Land-Hist-cruNcep",
+ "description":"Prescribed land conditions 1980-2014 climate with Land-Hist-princeton",
"end_year":"2100",
- "experiment":"as LFMIP-pdLC with Land-Hist-cruNcep",
- "experiment_id":"lfmip-pdLC-cruNcep",
+ "experiment":"as LFMIP-pdLC with Land-Hist-princeton",
+ "experiment_id":"lfmip-pdLC-princeton",
"min_number_yrs_per_sim":"121",
"parent_activity_id":[
"CMIP"
@@ -7137,6 +7389,35 @@
],
"tier":"2"
},
+ "ssp119":{
+ "activity_id":[
+ "ScenarioMIP"
+ ],
+ "additional_allowed_model_components":[
+ "AER",
+ "CHEM",
+ "BGC"
+ ],
+ "description":"Future scenario with low radiative forcing throughout reaching about 1.9 W/m2 in 2100 based on SSP1. Concentration-driven",
+ "end_year":"2100",
+ "experiment":"low-end scenario reaching 1.9 W m-2, based on SSP1",
+ "experiment_id":"ssp119",
+ "min_number_yrs_per_sim":"86",
+ "parent_activity_id":[
+ "CMIP"
+ ],
+ "parent_experiment_id":[
+ "historical"
+ ],
+ "required_model_components":[
+ "AOGCM"
+ ],
+ "start_year":"2015",
+ "sub_experiment_id":[
+ "none"
+ ],
+ "tier":"2"
+ },
"ssp126":{
"activity_id":[
"ScenarioMIP"
@@ -7826,35 +8107,6 @@
],
"tier":"2"
},
- "sspxy":{
- "activity_id":[
- "ScenarioMIP"
- ],
- "additional_allowed_model_components":[
- "AER",
- "CHEM",
- "BGC"
- ],
- "description":"Future scenario with low radiative forcing by the end of century. Following a forcing pathway below RCP2.6. Specific SSP and 2100 forcing level to be finalized with IAM groups within next few months. Concentration-driven",
- "end_year":"2100",
- "experiment":"low-end scenario informing 1.5C goal",
- "experiment_id":"sspxy",
- "min_number_yrs_per_sim":"86",
- "parent_activity_id":[
- "CMIP"
- ],
- "parent_experiment_id":[
- "historical"
- ],
- "required_model_components":[
- "AOGCM"
- ],
- "start_year":"2015",
- "sub_experiment_id":[
- "none"
- ],
- "tier":"2"
- },
"volc-cluster-21C":{
"activity_id":[
"VolMIP"
diff --git a/TestTables/CMIP6_E1hr.json b/TestTables/CMIP6_E1hr.json
index e5baa94..df5bf4c 100644
--- a/TestTables/CMIP6_E1hr.json
+++ b/TestTables/CMIP6_E1hr.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table E1hr",
"realm": "atmos",
- "frequency": "1hr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.017361",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"pr": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Precipitation",
"comment": "includes both liquid and solid phases",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"prc": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "convective_precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Precipitation",
"comment": "Convective precipitation at surface; includes both liquid and solid phases.",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"psl": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_sea_level",
"units": "Pa",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Sea Level Pressure",
"comment": "Sea Level Pressure",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"rlut": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Longwave Radiatio",
"comment": "at the top of the atmosphere (to be compared with satellite measurements)",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
@@ -100,15 +104,16 @@
"ok_max_mean_abs": ""
},
"ta27": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "ta27",
+ "out_name": "ta",
"type": "",
"positive": "",
"valid_min": "",
@@ -117,15 +122,16 @@
"ok_max_mean_abs": ""
},
"tntr27": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_radiative_heating",
"units": "K s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature due to Radiative Heating",
"comment": "Tendency of Air Temperature due to Radiative Heating",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "tntr27",
+ "out_name": "tntr",
"type": "real",
"positive": "",
"valid_min": "",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Eastward Wind",
"comment": "",
@@ -151,15 +158,16 @@
"ok_max_mean_abs": ""
},
"ua27": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Eastward Wind",
"comment": "",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "ua27",
+ "out_name": "ua",
"type": "",
"positive": "",
"valid_min": "",
@@ -168,15 +176,16 @@
"ok_max_mean_abs": ""
},
"utendnogw27": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_eastward_wind_due_to_nonorographic_gravity_wave_drag",
"units": "m s-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "u-tendency nonorographic gravity wave drag",
"comment": "Tendency of the eastward wind by parameterized nonorographic gravity waves.",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "utendnogw27",
+ "out_name": "utendnogw",
"type": "",
"positive": "",
"valid_min": "",
@@ -185,10 +194,11 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Northward Wind",
"comment": "",
@@ -202,15 +212,16 @@
"ok_max_mean_abs": ""
},
"va27": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Northward Wind",
"comment": "",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "va27",
+ "out_name": "va",
"type": "",
"positive": "",
"valid_min": "",
@@ -219,15 +230,16 @@
"ok_max_mean_abs": ""
},
"vtendnogw27": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_northward_wind_due_to_nonorographic_gravity_wave_drag",
"units": "m s-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "v-tendency nonorographic gravity wave drag",
"comment": "Tendency of the northward wind by parameterized nonorographic gravity waves. (Note that CF name tables only have a general northward tendency for all gravity waves, and we need it separated by type.)",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "vtendnogw27",
+ "out_name": "vtendnogw",
"type": "",
"positive": "",
"valid_min": "",
@@ -236,10 +248,11 @@
"ok_max_mean_abs": ""
},
"wap": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "omega (=dp/dt)",
"comment": "Omega (vertical velocity in pressure coordinates, positive downwards)",
@@ -253,15 +266,16 @@
"ok_max_mean_abs": ""
},
"wap27": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "omega (=dp/dt)",
"comment": "Omega (vertical velocity in pressure coordinates, positive downwards)",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "wap27",
+ "out_name": "wap",
"type": "real",
"positive": "",
"valid_min": "",
@@ -270,15 +284,16 @@
"ok_max_mean_abs": ""
},
"zg27": {
+ "frequency": "1hr",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Geopotential Height",
"comment": "",
"dimensions": "longitude latitude plev27 time1",
- "out_name": "zg27",
+ "out_name": "zg",
"type": "float",
"positive": "",
"valid_min": "",
diff --git a/TestTables/CMIP6_E1hrClimMon.json b/TestTables/CMIP6_E1hrClimMon.json
index a1b1df5..f5c3b6d 100644
--- a/TestTables/CMIP6_E1hrClimMon.json
+++ b/TestTables/CMIP6_E1hrClimMon.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table E1hrClimMon",
"realm": "atmos",
- "frequency": "1hrClimMon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.017361",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"rlut": {
+ "frequency": "1hrClimMon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux",
"units": "W m-2",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"rlutcs": {
+ "frequency": "1hrClimMon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky",
"units": "W m-2",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"rsdt": {
+ "frequency": "1hrClimMon",
"modeling_realm": "atmos",
"standard_name": "toa_incoming_shortwave_flux",
"units": "W m-2",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"rsut": {
+ "frequency": "1hrClimMon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux",
"units": "W m-2",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"rsutcs": {
+ "frequency": "1hrClimMon",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky",
"units": "W m-2",
diff --git a/TestTables/CMIP6_E3hr.json b/TestTables/CMIP6_E3hr.json
index f6eade4..a30c496 100644
--- a/TestTables/CMIP6_E3hr.json
+++ b/TestTables/CMIP6_E3hr.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table E3hr",
"realm": "land",
- "frequency": "3hr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.125000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"clivi": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_cloud_ice_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Ice Water Path",
"comment": "mass of ice water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeor affects the calculation of radiative transfer in model.",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"clwvi": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_cloud_condensed_water_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Condensed Water Path",
"comment": "Mass of condensed (liquid + ice) water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -49,8 +50,9 @@
"ok_max_mean_abs": ""
},
"gpp": {
+ "frequency": "3hr",
"modeling_realm": "land",
- "standard_name": "gross_primary_productivity_of_carbon",
+ "standard_name": "gross_primary_productivity_of_biomass_expressed_as_carbon",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
@@ -66,12 +68,13 @@
"ok_max_mean_abs": ""
},
"prcsh": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "hallow_convective_precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
- "long_name": "shallow_conv_precipitation_flux",
+ "long_name": "Precipitation Flux from Shallow Convection",
"comment": "Convection precipitation from shallow convection",
"dimensions": "longitude latitude time",
"out_name": "prcsh",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"prra": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "rainfall_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Rainfall Flux where Ice Free Ocean over Sea",
"comment": "",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"prrc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "convective_rainfall_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Rainfall rate",
"comment": "",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"prsnc": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "convective_snowfall_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Snowfall Flux",
"comment": "convective precipitation of all forms of water in the solid phase.",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"prw": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_water_vapor_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Water Vapor Path",
"comment": "vertically integrated through the atmospheric column",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"psl": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_sea_level",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Sea Level Pressure",
"comment": "Sea Level Pressure",
@@ -168,6 +176,7 @@
"ok_max_mean_abs": ""
},
"ra": {
+ "frequency": "3hr",
"modeling_realm": "land",
"standard_name": "plant_respiration_carbon_flux",
"units": "kg m-2 s-1",
@@ -185,6 +194,7 @@
"ok_max_mean_abs": ""
},
"rh": {
+ "frequency": "3hr",
"modeling_realm": "land",
"standard_name": "heterotrophic_respiration_carbon_flux",
"units": "kg m-2 s-1",
@@ -202,10 +212,11 @@
"ok_max_mean_abs": ""
},
"rlut": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Longwave Radiatio",
"comment": "at the top of the atmosphere (to be compared with satellite measurements)",
@@ -219,10 +230,11 @@
"ok_max_mean_abs": ""
},
"rlutcs": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Clear-sky Longwave Radiation",
"comment": "",
@@ -236,10 +248,11 @@
"ok_max_mean_abs": ""
},
"rsdt": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "toa_incoming_shortwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Incident Shortwave Radiation",
"comment": "Shortwave radiation incident at the top of the atmosphere",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"rsut": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Top-of-Atmosphere Outgoing Shortwave Radiation",
"comment": "at the top of the atmosphere",
@@ -270,10 +284,11 @@
"ok_max_mean_abs": ""
},
"rsutcs": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Clear-Sky Shortwave Radiation",
"comment": "Calculated in the absence of clouds.",
@@ -287,14 +302,15 @@
"ok_max_mean_abs": ""
},
"sfcWind": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "wind_speed",
"units": "m s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Wind Speed",
"comment": "near-surface (usually, 10 meters) wind speed.",
- "dimensions": "longitude latitude height10m time",
+ "dimensions": "longitude latitude time height10m",
"out_name": "sfcWind",
"type": "real",
"positive": "",
@@ -304,16 +320,17 @@
"ok_max_mean_abs": ""
},
"uas": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Eastward Near-Surface Wind",
"comment": "Eastward component of the near-surface (usually, 10 meters) wind",
- "dimensions": "longitude latitude height10m time",
+ "dimensions": "longitude latitude time height10m",
"out_name": "uas",
- "type": "real",
+ "type": "float",
"positive": "",
"valid_min": "",
"valid_max": "",
@@ -321,14 +338,15 @@
"ok_max_mean_abs": ""
},
"vas": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Northward Near-Surface Wind",
"comment": "Northward component of the near surface wind",
- "dimensions": "longitude latitude height10m time",
+ "dimensions": "longitude latitude time height10m",
"out_name": "vas",
"type": "real",
"positive": "",
diff --git a/TestTables/CMIP6_E3hrPt.json b/TestTables/CMIP6_E3hrPt.json
index d25daf1..b354675 100644
--- a/TestTables/CMIP6_E3hrPt.json
+++ b/TestTables/CMIP6_E3hrPt.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table E3hrPt",
"realm": "atmos",
- "frequency": "3hr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.125000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"aerasymbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "band_aerosol_asymmetry_parameter",
"units": "1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Aerosol level asymmetry parameter for each band",
"comment": "",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"aeroptbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "band_aerosol_optical_depth",
+ "standard_name": "atmosphere_absorption_optical_thickness_due_to_ambient_aerosol_particles",
"units": "1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Aerosol level extinction optical depth for each band",
"comment": "",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"aerssabnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "band_aerosol_single_scattering_albedo",
+ "standard_name": "single_scattering_albedo_in_air_due_to_ambient_aerosol_particles",
"units": "1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Aerosol level single-scattering albedo for each band",
"comment": "",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"albdiffbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "band_diffuse_albedo",
"units": "1.0",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"albdirbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "band_direct_albedo",
"units": "1.0",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"cfadDbze94": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "histogram_of_equivalent_reflectivity_factor_over_height_above_reference_ellipsoid",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "CloudSat Radar Reflectivity",
"comment": "CFAD (Cloud Frequency Altitude Diagrams) are frequency distributions of radar reflectivity (or lidar scattering ratio) as a function of altitude. The variable cfadDbze94 is defined as the simulated relative frequency of occurrence of radar reflectivity in sampling volumes defined by altitude bins. The radar is observing at a frequency of 94GHz.",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"cfadLidarsr532": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "histogram_of_backscattering_ratio_over_height_above_reference_ellipsoid",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Scattering Ratio",
"comment": "CFAD (Cloud Frequency Altitude Diagrams) are frequency distributions of radar reflectivity (or lidar scattering ratio) as a function of altitude. The variable cfadLidarsr532 is defined as the simulated relative frequency of lidar scattering ratio in sampling volumes defined by altitude bins. The lidar is observing at a wavelength of 532nm.",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"ch4": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "mole_fraction_of_methane_in_air",
"units": "mol mol-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "CH4 volume mixing ratio",
"comment": "",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"clcalipso": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Cloud Fraction",
"comment": "Percentage cloud cover at CALIPSO standard heights.",
@@ -168,10 +176,11 @@
"ok_max_mean_abs": ""
},
"clcalipso2": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Cloud Fraction Undetected by CloudSat",
"comment": "Clouds detected by CALIPSO but below the detectability threshold of CloudSat",
@@ -185,14 +194,15 @@
"ok_max_mean_abs": ""
},
"clhcalipso": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "CALIPSO Percentage High Level Cloud",
+ "long_name": "CALIPSO High Level Cloud Fraction",
"comment": "Percentage cloud cover in layer centred on 220hPa",
- "dimensions": "longitude latitude time1",
+ "dimensions": "longitude latitude time1 p220",
"out_name": "clhcalipso",
"type": "real",
"positive": "",
@@ -202,12 +212,13 @@
"ok_max_mean_abs": ""
},
"clisccp": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "ISCCP Cloud Area Fraction",
+ "long_name": "ISCCP Percentage Cloud Area",
"comment": "Percentage cloud cover in optical depth categories.",
"dimensions": "longitude latitude plev7c tau time1",
"out_name": "clisccp",
@@ -219,14 +230,15 @@
"ok_max_mean_abs": ""
},
"cllcalipso": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "CALIPSO Low Level Cloud Fraction",
+ "long_name": "CALIPSO Percentage Low Level Cloud",
"comment": "Percentage cloud cover in layer centred on 840hPa",
- "dimensions": "longitude latitude time1",
+ "dimensions": "longitude latitude time1 p840",
"out_name": "cllcalipso",
"type": "real",
"positive": "",
@@ -236,14 +248,15 @@
"ok_max_mean_abs": ""
},
"clmcalipso": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Mid Level Cloud Fraction",
"comment": "Percentage cloud cover in layer centred on 560hPa",
- "dimensions": "longitude latitude time1",
+ "dimensions": "longitude latitude time1 p560",
"out_name": "clmcalipso",
"type": "real",
"positive": "",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"clmisr": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Percentage Cloud Cover as Calculated by the MISR Simulator",
"comment": "Cloud percentage in spectral bands and layers as observed by the Multi-angle Imaging SpectroRadiometer (MISR) instrument.",
@@ -270,10 +284,11 @@
"ok_max_mean_abs": ""
},
"cltcalipso": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Total Cloud Fraction",
"comment": "",
@@ -287,10 +302,11 @@
"ok_max_mean_abs": ""
},
"co2": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "mole_fraction_of_carbon_dioxide_in_air",
"units": "mol mol-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "CO2 volume mixing ratio",
"comment": "",
@@ -304,10 +320,11 @@
"ok_max_mean_abs": ""
},
"hus": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Specific Humidity",
"comment": "",
@@ -321,15 +338,16 @@
"ok_max_mean_abs": ""
},
"hus7h": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Specific Humidity",
"comment": "",
"dimensions": "longitude latitude plev7h time1",
- "out_name": "hus7h",
+ "out_name": "hus",
"type": "",
"positive": "",
"valid_min": "",
@@ -338,14 +356,15 @@
"ok_max_mean_abs": ""
},
"jpdftaureicemodis": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "MODIS Optical Thickness-Particle Size joint distribution, ice",
"comment": "",
- "dimensions": "longitude latitude plev7c effectRadIc|tau time1",
+ "dimensions": "longitude latitude plev7c effectRadIc tau time1",
"out_name": "jpdftaureicemodis",
"type": "",
"positive": "",
@@ -355,14 +374,15 @@
"ok_max_mean_abs": ""
},
"jpdftaureliqmodis": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "MODIS Optical Thickness-Particle Size joint distribution, liquid",
"comment": "",
- "dimensions": "longitude latitude plev7c effectRadLi|tau time1",
+ "dimensions": "longitude latitude plev7c effectRadLi tau time1",
"out_name": "jpdftaureliqmodis",
"type": "",
"positive": "",
@@ -372,10 +392,11 @@
"ok_max_mean_abs": ""
},
"n2o": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "mole_fraction_of_nitrous_oxide_in_air",
"units": "mol mol-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "N2O volume mixing ratio",
"comment": "",
@@ -389,10 +410,11 @@
"ok_max_mean_abs": ""
},
"o3": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "mole_fraction_of_ozone_in_air",
"units": "mol mol-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Ozone volume mixing ratio",
"comment": "",
@@ -406,6 +428,7 @@
"ok_max_mean_abs": ""
},
"parasolRefl": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "toa_bidirectional_reflectance",
"units": "1.0",
@@ -422,11 +445,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "ps": {
+ "frequency": "3hr",
+ "modeling_realm": "atmos",
+ "standard_name": "surface_air_pressure",
+ "units": "Pa",
+ "cell_methods": "area: mean time: point",
+ "cell_measures": "area: areacella",
+ "long_name": "Surface Pressure",
+ "comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
+ "dimensions": "longitude latitude time1",
+ "out_name": "ps",
+ "type": "float",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"psl": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_sea_level",
"units": "Pa",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Sea Level Pressure",
"comment": "Sea Level Pressure",
@@ -439,33 +481,35 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsdcc": {
+ "rsdcs": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "downwelling_shortwave_flux_assuming_clean_clear_sky",
+ "standard_name": "downwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "Downwelling Clean-Clear-Sky Shortwave Radiation at each level",
- "comment": "Calculated in the absence of aerosols and clouds. This requires a double-call in the radiation code with precisely the same meteorology.",
+ "long_name": "Downwelling Clear-Sky Shortwave Radiation",
+ "comment": "Downwelling clear-sky shortwave radiation (includes the fluxes at the surface and top-of-atmosphere)",
"dimensions": "longitude latitude alevel time1",
- "out_name": "rsdcc",
- "type": "",
- "positive": "",
+ "out_name": "rsdcs",
+ "type": "real",
+ "positive": "down",
"valid_min": "",
"valid_max": "",
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsdccbnd": {
+ "rsdcsaf": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "band_downwelling_shortwave_flux_assuming_clean_clear_sky",
+ "standard_name": "downwelling_shortwave_flux_assuming_clean_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "Downwelling Clean-Clear-Sky Shortwave Radiation at each level for each band",
- "comment": "Calculated in the absence of aerosols and clouds. This requires a double-call in the radiation code with precisely the same meteorology.",
- "dimensions": "longitude latitude alevel spectband time1",
- "out_name": "rsdccbnd",
+ "long_name": "Downwelling Clean-Clear-Sky Shortwave Radiation at each level",
+ "comment": "Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology.",
+ "dimensions": "longitude latitude alevel time1",
+ "out_name": "rsdcsaf",
"type": "",
"positive": "",
"valid_min": "",
@@ -473,28 +517,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsdcs": {
+ "rsdcsafbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "downwelling_shortwave_flux_in_air_assuming_clear_sky",
+ "standard_name": "band_downwelling_shortwave_flux_assuming_clean_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "Downwelling Clear-Sky Shortwave Radiation",
- "comment": "Downwelling clear-sky shortwave radiation (includes the fluxes at the surface and top-of-atmosphere)",
- "dimensions": "longitude latitude alevel time1",
- "out_name": "rsdcs",
- "type": "real",
- "positive": "down",
+ "long_name": "Downwelling Clear-Sky, Aerosol-Free, Shortwave Radiation in Bands",
+ "comment": "Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology.",
+ "dimensions": "longitude latitude alevel spectband time1",
+ "out_name": "rsdcsafbnd",
+ "type": "",
+ "positive": "",
"valid_min": "",
"valid_max": "",
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
"rsdcsbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "band_downwelling_shortwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Downwelling Clear-Sky Shortwave Radiation at each level for each band",
"comment": "Calculated with aerosols but without clouds. This is a standard clear-sky calculation",
@@ -507,16 +553,17 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsdscc": {
+ "rsdscsaf": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_shortwave_flux_in_air_assuming_clean_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "Surface Downwelling Clean-Clear-Sky Shortwave Radiation",
+ "long_name": "Surface Downwelling Clear-Sky, Aerosol-Free Shortwave Radiation",
"comment": "Calculated in the absence of aerosols and clouds.",
"dimensions": "longitude latitude time1",
- "out_name": "rsdscc",
+ "out_name": "rsdscsaf",
"type": "",
"positive": "",
"valid_min": "",
@@ -524,16 +571,17 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsdsccbnd": {
+ "rsdscsafbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "band_surface_downwelling_shortwave_flux_in_air_assuming_clean_clear_sky",
+ "standard_name": "surface_downwelling_shortwave_flux_in_air_assuming_clean_clear_sky",
"units": "W m-2",
"cell_methods": "time: point",
"cell_measures": "area: areacella",
- "long_name": "Surface Downwelling Clean-Clear-Sky Shortwave Radiation for each band",
- "comment": "Calculated in the absence of aerosols and clouds. This requires a double-call in the radiation code with precisely the same meteorology.",
+ "long_name": "Surface Downwelling Clear-Sky, Aerosol-Free Shortwave Radiation in Bands",
+ "comment": "Calculated in the absence of aerosols and clouds, following Ghan (2013, ACP). This requires a double-call in the radiation code with precisely the same meteorology.",
"dimensions": "longitude latitude spectband time1",
- "out_name": "rsdsccbnd",
+ "out_name": "rsdscsafbnd",
"type": "",
"positive": "",
"valid_min": "",
@@ -542,8 +590,9 @@
"ok_max_mean_abs": ""
},
"rsdscsbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "band_surface_downwelling_shortwave_flux_in_air_assuming_clear_sky",
+ "standard_name": "surface_downwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
"cell_methods": "time: point",
"cell_measures": "area: areacella",
@@ -558,33 +607,35 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsucc": {
+ "rsucs": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "upwelling_shortwave_flux_assuming_clean_clear_sky",
+ "standard_name": "upwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "Upwelling Clean-Clear-Sky Shortwave Radiation at each level",
- "comment": "Calculated in the absence of aerosols and clouds. This requires a double-call in the radiation code with precisely the same meteorology.",
+ "long_name": "Upwelling Clear-Sky Shortwave Radiation",
+ "comment": "Upwelling clear-sky shortwave radiation (includes the fluxes at the surface and TOA)",
"dimensions": "longitude latitude alevel time1",
- "out_name": "rsucc",
- "type": "",
- "positive": "",
+ "out_name": "rsucs",
+ "type": "real",
+ "positive": "up",
"valid_min": "",
"valid_max": "",
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsuccbnd": {
+ "rsucsaf": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "band_upwelling_shortwave_flux_assuming_clean_clear_sky",
+ "standard_name": "upwelling_shortwave_flux_assuming_clean_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "Upwelling Clean-Clear-Sky Shortwave Radiation at each level for each band",
- "comment": "Calculated in the absence of aerosols and clouds. This requires a double-call in the radiation code with precisely the same meteorology.",
- "dimensions": "longitude latitude alevel spectband time1",
- "out_name": "rsuccbnd",
+ "long_name": "Upwelling Clean-Clear-Sky Shortwave Radiation at each level",
+ "comment": "Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology.",
+ "dimensions": "longitude latitude alevel time1",
+ "out_name": "rsucsaf",
"type": "",
"positive": "",
"valid_min": "",
@@ -592,28 +643,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsucs": {
+ "rsucsafbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "upwelling_shortwave_flux_in_air_assuming_clear_sky",
+ "standard_name": "band_upwelling_shortwave_flux_assuming_clean_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "Upwelling Clear-Sky Shortwave Radiation",
- "comment": "Upwelling clear-sky shortwave radiation (includes the fluxes at the surface and TOA)",
- "dimensions": "longitude latitude alevel time1",
- "out_name": "rsucs",
- "type": "real",
- "positive": "up",
+ "long_name": "Upwelling Clear-Sky, Aerosol-Free Shortwave Radiation in Bands",
+ "comment": "Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology.",
+ "dimensions": "longitude latitude alevel spectband time1",
+ "out_name": "rsucsafbnd",
+ "type": "",
+ "positive": "",
"valid_min": "",
"valid_max": "",
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
"rsucsbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "band_upwelling_shortwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Upwelling Clear-Sky Shortwave Radiation at each level for each band",
"comment": "Calculated with aerosols but without clouds. This is a standard clear-sky calculation",
@@ -626,33 +679,35 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsuscc": {
+ "rsuscs": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "surface_upwelling_shortwave_flux_in_air_assuming_clean_clear_sky",
+ "standard_name": "surface_upwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "Surface Upwelling Clean Clear-Sky Shortwave Radiation",
- "comment": "Surface upwelling clean clear-sky shortwave radiation",
+ "long_name": "Surface Upwelling Clear-Sky Shortwave Radiation",
+ "comment": "Surface Upwelling Clear-sky Shortwave Radiation",
"dimensions": "longitude latitude time1",
- "out_name": "rsuscc",
- "type": "",
- "positive": "",
+ "out_name": "rsuscs",
+ "type": "real",
+ "positive": "up",
"valid_min": "",
"valid_max": "",
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsusccbnd": {
+ "rsuscsaf": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "band_surface_upwelling_shortwave_flux_in_air_assuming_clean_clear_sky",
+ "standard_name": "surface_upwelling_shortwave_flux_in_air_assuming_clean_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "Surface Upwelling Clean-Clear-Sky Shortwave Radiation for each band",
- "comment": "Calculated in the absence of aerosols and clouds. This requires a double-call in the radiation code with precisely the same meteorology.",
- "dimensions": "longitude latitude spectband time1",
- "out_name": "rsusccbnd",
+ "long_name": "Surface Upwelling Clean Clear-Sky Shortwave Radiation",
+ "comment": "Surface Upwelling Clear-sky, Aerosol Free Shortwave Radiation",
+ "dimensions": "longitude latitude time1",
+ "out_name": "rsuscsaf",
"type": "",
"positive": "",
"valid_min": "",
@@ -660,26 +715,28 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsuscs": {
+ "rsuscsafbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "surface_upwelling_shortwave_flux_in_air_assuming_clear_sky",
+ "standard_name": "surface_upwelling_shortwave_flux_in_air_assuming_clean_clear_sky",
"units": "W m-2",
"cell_methods": "time: point",
"cell_measures": "area: areacella",
- "long_name": "Surface Upwelling Clear-Sky Shortwave Radiation",
- "comment": "Surface upwelling clear-sky shortwave radiation",
- "dimensions": "longitude latitude time1",
- "out_name": "rsuscs",
- "type": "real",
- "positive": "up",
+ "long_name": "Surface Upwelling Clear-Sky, Aerosol-Free Shortwave Radiation in Bands",
+ "comment": "Calculated in the absence of aerosols and clouds, following Ghan (ACP, 2013). This requires a double-call in the radiation code with precisely the same meteorology.",
+ "dimensions": "longitude latitude spectband time1",
+ "out_name": "rsuscsafbnd",
+ "type": "",
+ "positive": "",
"valid_min": "",
"valid_max": "",
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
"rsuscsbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "band_surface_upwelling_shortwave_flux_in_air_assuming_clear_sky",
+ "standard_name": "surface_upwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
"cell_methods": "time: point",
"cell_measures": "area: areacella",
@@ -694,33 +751,35 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsutcc": {
- "modeling_realm": "atmos",
- "standard_name": "toa_outgoing_shortwave_flux_assuming_clean_clear_sky",
+ "rsutcsaf": {
+ "frequency": "3hr",
+ "modeling_realm": "aerosol",
+ "standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "TOA Outgoing Clean-Clear-Sky Shortwave Radiation",
- "comment": "Calculated in the absence of aerosols and clouds.",
+ "long_name": "toa outgoing clear-sky shortwave radiation",
+ "comment": "Flux corresponding to rsutcs resulting fom aerosol-free call to radiation, following Ghan (ACP, 2013)",
"dimensions": "longitude latitude time1",
- "out_name": "rsutcc",
- "type": "",
+ "out_name": "rsutcsaf",
+ "type": "float",
"positive": "",
"valid_min": "",
"valid_max": "",
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsutccbnd": {
+ "rsutcsafbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "band_toa_outgoing_shortwave_flux_assuming_clean_clear_sky",
"units": "W m-2",
"cell_methods": "time: point",
"cell_measures": "area: areacella",
- "long_name": "TOA Outgoing Clean-Clear-Sky Shortwave Radiation for each band",
- "comment": "Calculated in the absence of aerosols and clouds. This requires a double-call in the radiation code with precisely the same meteorology.",
+ "long_name": "TOA Outgoing Clear-Sky, Aerosol-Free Shortwave Radiation in Bands",
+ "comment": "Calculated in the absence of aerosols and clouds, following Ghan (2013, ACP). This requires a double-call in the radiation code with precisely the same meteorology.",
"dimensions": "longitude latitude spectband time1",
- "out_name": "rsutccbnd",
+ "out_name": "rsutcsafbnd",
"type": "",
"positive": "",
"valid_min": "",
@@ -729,8 +788,9 @@
"ok_max_mean_abs": ""
},
"rsutcsbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
- "standard_name": "band_toa_outgoing_shortwave_flux_assuming_clear_sky",
+ "standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky",
"units": "W m-2",
"cell_methods": "time: point",
"cell_measures": "area: areacella",
@@ -746,6 +806,7 @@
"ok_max_mean_abs": ""
},
"solbnd": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "band_solar_insolation",
"units": "W m-2",
@@ -763,10 +824,11 @@
"ok_max_mean_abs": ""
},
"sza": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "solar_zenith_angle",
"units": "degree",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Solar Zenith Angle",
"comment": "The angle between the line of sight to the sun and the local vertical",
@@ -780,15 +842,16 @@
"ok_max_mean_abs": ""
},
"ta7h": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
"dimensions": "longitude latitude plev7h time1",
- "out_name": "ta7h",
+ "out_name": "ta",
"type": "",
"positive": "",
"valid_min": "",
@@ -797,10 +860,11 @@
"ok_max_mean_abs": ""
},
"ts": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "surface_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Surface Temperature",
"comment": "Temperature of the lower boundary of the atmosphere",
@@ -814,15 +878,16 @@
"ok_max_mean_abs": ""
},
"ua7h": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Eastward Wind",
"comment": "",
"dimensions": "longitude latitude plev7h time1",
- "out_name": "ua7h",
+ "out_name": "ua",
"type": "",
"positive": "",
"valid_min": "",
@@ -831,6 +896,7 @@
"ok_max_mean_abs": ""
},
"ua850": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -839,7 +905,7 @@
"long_name": "Eastward Wind",
"comment": "",
"dimensions": "longitude latitude time1 p850",
- "out_name": "ua850",
+ "out_name": "ua",
"type": "",
"positive": "",
"valid_min": "",
@@ -848,15 +914,16 @@
"ok_max_mean_abs": ""
},
"va7h": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Northward Wind",
"comment": "",
"dimensions": "longitude latitude plev7h time1",
- "out_name": "va7h",
+ "out_name": "va",
"type": "",
"positive": "",
"valid_min": "",
@@ -865,6 +932,7 @@
"ok_max_mean_abs": ""
},
"va850": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -873,7 +941,7 @@
"long_name": "Northward Wind",
"comment": "",
"dimensions": "longitude latitude time1 p850",
- "out_name": "va850",
+ "out_name": "va",
"type": "",
"positive": "",
"valid_min": "",
@@ -882,15 +950,16 @@
"ok_max_mean_abs": ""
},
"wap7h": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "omega (=dp/dt)",
"comment": "Omega (vertical velocity in pressure coordinates, positive downwards)",
"dimensions": "longitude latitude plev7h time1",
- "out_name": "wap7h",
+ "out_name": "wap",
"type": "real",
"positive": "",
"valid_min": "",
diff --git a/TestTables/CMIP6_E6hrZ.json b/TestTables/CMIP6_E6hrZ.json
index 0a33492..9f8c854 100644
--- a/TestTables/CMIP6_E6hrZ.json
+++ b/TestTables/CMIP6_E6hrZ.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table E6hrZ",
"realm": "atmos",
- "frequency": "6hr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.250000",
@@ -14,12 +13,31 @@
"Conventions": "CF-1.7 CMIP-6.0"
},
"variable_entry": {
+ "ps": {
+ "frequency": "6hr",
+ "modeling_realm": "atmos",
+ "standard_name": "surface_air_pressure",
+ "units": "Pa",
+ "cell_methods": "longitude: mean time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Surface Pressure",
+ "comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
+ "dimensions": "latitude time",
+ "out_name": "ps",
+ "type": "float",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"zmlwaero": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "longwave_heating_rate_due_to_volcanic_aerosols",
"units": "K s-1",
"cell_methods": "longitude: mean time: point",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "Zonal mean longwave heating rate due to volcanic aerosols",
"comment": "longwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required",
"dimensions": "latitude alevel time1",
@@ -32,11 +50,12 @@
"ok_max_mean_abs": ""
},
"zmswaero": {
+ "frequency": "6hr",
"modeling_realm": "atmos",
"standard_name": "shortwave_heating_rate_due_to_volcanic_aerosols",
"units": "K s-1",
"cell_methods": "longitude: mean time: point",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "Zonal mean shortwave heating rate due to volcanic aerosols",
"comment": "shortwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required",
"dimensions": "latitude alevel time1",
diff --git a/TestTables/CMIP6_Eday.json b/TestTables/CMIP6_Eday.json
index 76e9191..0eaf894 100644
--- a/TestTables/CMIP6_Eday.json
+++ b/TestTables/CMIP6_Eday.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Eday",
"realm": "aerosol",
- "frequency": "day",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "1.00000",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"agesno": {
+ "frequency": "day",
"modeling_realm": "landIce land",
"standard_name": "age_of_surface_snow",
"units": "day",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"albc": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "canopy_albedo",
"units": "1.0",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"albs": {
+ "frequency": "day",
"modeling_realm": "aerosol",
"standard_name": "surface_albedo",
"units": "1.0",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"albsn": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "snow_and_ice_albedo",
"units": "1.0",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"aod550volso4": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "aerosol_optical_depth_due_to_stratospheric_volcanic_aerosols",
"units": "1e-09",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Aerosol optical depth at 550 nm due to stratospheric volcanic aerosols",
"comment": "aerosol optical depth at 550 nm due to stratospheric volcanic aerosols",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"ares": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "aerodynamic_resistance",
"units": "s m-1",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"ccldncl": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "number_concentration_of_convective_cloud_liquid_water_particles_in_air_at_liquid_water_cloud_top",
"units": "m-3",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Cloud Droplet Number Concentration of Convective Cloud Tops",
"comment": "Droplets are liquid only. Report concentration 'as seen from space' over convective liquid cloudy portion of grid cell. This is the value from uppermost model layer with liquid cloud or, if available, it is better to sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Weight by total liquid cloud top fraction of (as seen from TOA) each time sample when computing monthly mean.",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"cldnci": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "number_concentration_of_ice_crystals_in_air_at_ice_cloud_top",
"units": "m-3",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Ice Crystal Number Concentration of Cloud Tops",
"comment": "Concentration 'as seen from space' over ice-cloud portion of grid cell. This is the value from uppermost model layer with ice cloud or, if available, it is the sum over all ice cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Weight by total ice cloud top fraction (as seen from TOA) of each time sample when computing monthly mean.",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"cldnvi": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_number_content_of_cloud_droplets",
"units": "m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Column Integrated Cloud Droplet Number",
"comment": "Droplets are liquid only. Values are weighted by liquid cloud fraction in each layer when vertically integrating, and for monthly means the samples are weighted by total liquid cloud fraction (as seen from TOA).",
@@ -168,10 +176,11 @@
"ok_max_mean_abs": ""
},
"clivic": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_convective_cloud_ice_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Ice Water Path",
"comment": "calculate mass of convective ice water in the column divided by the area of the column (not just the area of the cloudy portion of the column). This includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -184,11 +193,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "clt": {
+ "frequency": "day",
+ "modeling_realm": "atmos",
+ "standard_name": "cloud_area_fraction",
+ "units": "%",
+ "cell_methods": "area: mean where land time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Total Cloud Fraction",
+ "comment": "Total cloud area fraction for the whole atmospheric column, as seen from the surface or the top of the atmosphere. Includes both large-scale and convective cloud.",
+ "dimensions": "longitude latitude time",
+ "out_name": "clt",
+ "type": "real",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"clwvic": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_convective_cloud_condensed_water_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Condensed Water Path",
"comment": "calculate mass of convective condensed (liquid + ice) water in the column divided by the area of the column (not just the area of the cloudy portion of the column). This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -202,6 +230,7 @@
"ok_max_mean_abs": ""
},
"cnc": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "vegetation_area_fraction",
"units": "%",
@@ -218,92 +247,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "concbb": {
- "modeling_realm": "atmos",
- "standard_name": "mass_concentration_of_biomass_burning_dry_aerosol_in_air",
- "units": "kg m-3",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Concentration of Biomass Burning Aerosol",
- "comment": "",
- "dimensions": "longitude latitude time",
- "out_name": "concbb",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "conccmcn": {
- "modeling_realm": "atmos",
- "standard_name": "number_concentration_of_coarse_mode_ambient_aerosol_in_air",
- "units": "m-3",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Number Concentration Coarse Mode Aerosol",
- "comment": "includes all particles with diameter larger than 1 micron",
- "dimensions": "longitude latitude time",
- "out_name": "conccmcn",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "conccn": {
- "modeling_realm": "atmos",
- "standard_name": "number_concentration_of_ambient_aerosol_in_air",
- "units": "m-3",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Aerosol Number Concentration",
- "comment": "",
- "dimensions": "longitude latitude time",
- "out_name": "conccn",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "concnmcn": {
- "modeling_realm": "atmos",
- "standard_name": "number_concentration_of_nucleation_mode_ambient_aerosol_in_air",
- "units": "m-3",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Number Concentration of Nucleation Mode Aerosol",
- "comment": "includes all particles with diameter smaller than 3 nm",
- "dimensions": "longitude latitude time",
- "out_name": "concnmcn",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "concpoa": {
- "modeling_realm": "atmos",
- "standard_name": "mass_concentration_of_primary_particulate_organic_matter_dry_aerosol_in_air",
- "units": "kg m-3",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Concentration of Dry Aerosol Primary Organic Matter",
- "comment": "",
- "dimensions": "longitude latitude time",
- "out_name": "concpoa",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"cw": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "canopy_water_amount",
"units": "kg m-2",
@@ -321,6 +266,7 @@
"ok_max_mean_abs": ""
},
"dcw": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "change_over_time_in_canopy_water_amount",
"units": "kg m-2",
@@ -338,6 +284,7 @@
"ok_max_mean_abs": ""
},
"dfr": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "depth_of_frozen_soil",
"units": "m",
@@ -355,6 +302,7 @@
"ok_max_mean_abs": ""
},
"dgw": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "change_over_time_in_groundwater",
"units": "kg m-2",
@@ -372,6 +320,7 @@
"ok_max_mean_abs": ""
},
"dmlt": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "depth_of_subsurface_melting",
"units": "m",
@@ -389,6 +338,7 @@
"ok_max_mean_abs": ""
},
"drivw": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "change_over_time_in_river_water_amount",
"units": "kg m-2",
@@ -406,6 +356,7 @@
"ok_max_mean_abs": ""
},
"dslw": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "change_over_time_in_water_content_of_soil_layer",
"units": "kg m-2",
@@ -423,6 +374,7 @@
"ok_max_mean_abs": ""
},
"dsn": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "change_over_time_in_surface_snow_and_ice_amount",
"units": "kg m-2",
@@ -440,6 +392,7 @@
"ok_max_mean_abs": ""
},
"dsw": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "change_over_time_in_surface_water_amount",
"units": "kg m-2",
@@ -457,6 +410,7 @@
"ok_max_mean_abs": ""
},
"dtes": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "change_over_time_in_thermal_energy_content_of_surface",
"units": "J m-2",
@@ -474,6 +428,7 @@
"ok_max_mean_abs": ""
},
"dtesn": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "change_over_time_in_thermal_energy_content_of_surface_snow_and_ice",
"units": "J m-2",
@@ -491,6 +446,7 @@
"ok_max_mean_abs": ""
},
"ec": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "liquid_water_evaporation_flux_from_canopy",
"units": "kg m-2 s-1",
@@ -507,24 +463,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "ec550aer": {
- "modeling_realm": "aerosol",
- "standard_name": "volume_extinction_coefficient_in_air_due_to_ambient_aerosol_particles",
- "units": "m-1",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Aerosol extinction coefficient",
- "comment": "Aerosol Extinction @550nm",
- "dimensions": "longitude latitude time",
- "out_name": "ec550aer",
- "type": "float",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"eow": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "liquid_water_evaporation_flux_from_open_water",
"units": "kg m-2 s-1",
@@ -542,6 +482,7 @@
"ok_max_mean_abs": ""
},
"es": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "liquid_water_evaporation_flux_from_soil",
"units": "kg m-2 s-1",
@@ -559,6 +500,7 @@
"ok_max_mean_abs": ""
},
"esn": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "liquid_water_evaporation_flux_from_surface_snow",
"units": "kg m-2 s-1",
@@ -576,6 +518,7 @@
"ok_max_mean_abs": ""
},
"et": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "surface_evapotranspiration",
"units": "kg m-2 s-1",
@@ -593,6 +536,7 @@
"ok_max_mean_abs": ""
},
"hfdsl": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_downward_heat_flux_in_air",
"units": "W m-2",
@@ -610,6 +554,7 @@
"ok_max_mean_abs": ""
},
"hfdsn": {
+ "frequency": "day",
"modeling_realm": "landIce land",
"standard_name": "surface_downward_heat_flux_in_snow",
"units": "W m-2",
@@ -627,8 +572,9 @@
"ok_max_mean_abs": ""
},
"hfdsnb": {
+ "frequency": "day",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "W m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
@@ -643,7 +589,26 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "hfls": {
+ "frequency": "day",
+ "modeling_realm": "atmos",
+ "standard_name": "surface_upward_latent_heat_flux",
+ "units": "W m-2",
+ "cell_methods": "area: mean where land time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Surface Upward Latent Heat Flux",
+ "comment": "",
+ "dimensions": "longitude latitude time",
+ "out_name": "hfls",
+ "type": "real",
+ "positive": "up",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"hfmlt": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_snow_and_ice_melt_heat_flux",
"units": "W m-2",
@@ -661,6 +626,7 @@
"ok_max_mean_abs": ""
},
"hfrs": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "temperature_flux_due_to_rainfall_expressed_as_heat_flux_onto_snow_and_ice",
"units": "W m-2",
@@ -678,6 +644,7 @@
"ok_max_mean_abs": ""
},
"hfsbl": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_snow_and_ice_sublimation_heat_flux",
"units": "W m-2",
@@ -694,15 +661,34 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "hfss": {
+ "frequency": "day",
+ "modeling_realm": "atmos",
+ "standard_name": "surface_upward_sensible_heat_flux",
+ "units": "W m-2",
+ "cell_methods": "area: mean where land time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Surface Upward Sensible Heat Flux",
+ "comment": "",
+ "dimensions": "longitude latitude time",
+ "out_name": "hfss",
+ "type": "real",
+ "positive": "up",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"hursminCrop": {
- "modeling_realm": "",
+ "frequency": "day",
+ "modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean time: minimum",
"cell_measures": "area: areacella",
"long_name": "Daily Minimum Near-Surface Relative Humidity over Crop Tile",
"comment": "minimum near-surface (usually, 2 meter) relative humidity (add cell_method attribute 'time: min')",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time height2m",
"out_name": "hursminCrop",
"type": "",
"positive": "",
@@ -712,6 +698,7 @@
"ok_max_mean_abs": ""
},
"hus": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
@@ -729,6 +716,7 @@
"ok_max_mean_abs": ""
},
"hus850": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
@@ -745,32 +733,16 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "inc": {
- "modeling_realm": "atmos",
- "standard_name": "number_concentration_of_ice_crystals_in_air",
- "units": "m-3",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Ice Crystal Number Concentration",
- "comment": "Ice Crystal number concentration in ice clouds",
- "dimensions": "longitude latitude time",
- "out_name": "inc",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"jpdftaureicemodis": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "MODIS Optical Thickness-Particle Size joint distribution, ice",
"comment": "",
- "dimensions": "longitude latitude plev7c effectRadLi|tau time",
+ "dimensions": "longitude latitude plev7c effectRadIc tau time",
"out_name": "jpdftaureicemodis",
"type": "",
"positive": "",
@@ -780,14 +752,15 @@
"ok_max_mean_abs": ""
},
"jpdftaureliqmodis": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "MODIS Optical Thickness-Particle Size joint distribution, liquid",
"comment": "",
- "dimensions": "longitude latitude plev7c effectRadLi|tau time",
+ "dimensions": "longitude latitude plev7c effectRadLi tau time",
"out_name": "jpdftaureliqmodis",
"type": "",
"positive": "",
@@ -797,6 +770,7 @@
"ok_max_mean_abs": ""
},
"lai": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "leaf_area_index",
"units": "1.0",
@@ -814,10 +788,11 @@
"ok_max_mean_abs": ""
},
"loadbc": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_black_carbon_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of Black Carbon Aerosol",
"comment": "",
@@ -831,10 +806,11 @@
"ok_max_mean_abs": ""
},
"loaddust": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_dust_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of Dust",
"comment": "",
@@ -848,10 +824,11 @@
"ok_max_mean_abs": ""
},
"loadnh4": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_ammonium_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of NH4",
"comment": "",
@@ -865,10 +842,11 @@
"ok_max_mean_abs": ""
},
"loadno3": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_nitrate_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of NO3",
"comment": "",
@@ -882,10 +860,11 @@
"ok_max_mean_abs": ""
},
"loadoa": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_particulate_organic_matter_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of Dry Aerosol Organic Matter",
"comment": "atmosphere dry organic content: This is the vertically integrated sum of atmosphere_primary_organic_content and atmosphere_secondary_organic_content (see next two table entries).",
@@ -899,10 +878,11 @@
"ok_max_mean_abs": ""
},
"loadpoa": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_primary_particulate_organic_matter_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of Dry Aerosol Primary Organic Matter",
"comment": "",
@@ -916,10 +896,11 @@
"ok_max_mean_abs": ""
},
"loadso4": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_sulfate_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of SO4",
"comment": "",
@@ -933,10 +914,11 @@
"ok_max_mean_abs": ""
},
"loadsoa": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_secondary_particulate_organic_matter_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of Dry Aerosol Secondary Organic Matter",
"comment": "",
@@ -950,10 +932,11 @@
"ok_max_mean_abs": ""
},
"loadss": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_seasalt_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of Seasalt",
"comment": "",
@@ -967,6 +950,7 @@
"ok_max_mean_abs": ""
},
"lwsnl": {
+ "frequency": "day",
"modeling_realm": "landIce land",
"standard_name": "liquid_water_content_of_snow_layer",
"units": "kg m-2",
@@ -984,10 +968,11 @@
"ok_max_mean_abs": ""
},
"mlotst": {
+ "frequency": "day",
"modeling_realm": "ocean",
"standard_name": "ocean_mixed_layer_thickness_defined_by_sigma_t",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Ocean Mixed Layer Thickness Defined by Sigma T",
"comment": "Sigma T is potential density referenced to ocean surface.",
@@ -1001,6 +986,7 @@
"ok_max_mean_abs": ""
},
"mrfsofr": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "mass_fraction_of_frozen_water_in_soil_moisture",
"units": "1.0",
@@ -1018,6 +1004,7 @@
"ok_max_mean_abs": ""
},
"mrlqso": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "mass_fraction_of_unfrozen_water_in_soil_moisture",
"units": "1.0",
@@ -1035,6 +1022,7 @@
"ok_max_mean_abs": ""
},
"mrlsl": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "moisture_content_of_soil_layer",
"units": "kg m-2",
@@ -1051,24 +1039,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "mrro": {
- "modeling_realm": "land",
- "standard_name": "runoff_flux",
- "units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
- "cell_measures": "area: areacella",
- "long_name": "Total Runoff",
- "comment": "The total run-off (including drainage through the base of the soil model) per unit area leaving the land portion of the grid cell.",
- "dimensions": "longitude latitude time",
- "out_name": "mrro",
- "type": "real",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"mrrob": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "subsurface_runoff_flux",
"units": "kg m-2 s-1",
@@ -1086,6 +1058,7 @@
"ok_max_mean_abs": ""
},
"mrros": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "surface_runoff_flux",
"units": "kg m-2 s-1",
@@ -1103,13 +1076,14 @@
"ok_max_mean_abs": ""
},
"mrsfl": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "frozen_moisture_content_of_soil_layer",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Frozen water content of soil layer",
- "comment": "as specified by C4MIP",
+ "comment": "in each soil layer, the mass of water in ice phase. Reported as 'missing' for grid cells occupied entirely by 'sea'",
"dimensions": "longitude latitude sdepth time",
"out_name": "mrsfl",
"type": "",
@@ -1120,13 +1094,14 @@
"ok_max_mean_abs": ""
},
"mrsll": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "liquid_moisture_content_of_soil_layer",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Liquid water content of soil layer",
- "comment": "as specified by C4MIP",
+ "comment": "in each soil layer, the mass of water in liquid phase. Reported as 'missing' for grid cells occupied entirely by 'sea'",
"dimensions": "longitude latitude sdepth time",
"out_name": "mrsll",
"type": "",
@@ -1137,13 +1112,14 @@
"ok_max_mean_abs": ""
},
"mrsol": {
+ "frequency": "day",
"modeling_realm": "land",
- "standard_name": "total_moisture_content_of_soil_layer",
+ "standard_name": "moisture_content_of_soil_layer",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Total water content of soil layer",
- "comment": "as specified by C4MIP",
+ "comment": "in each soil layer, the mass of water in all phases, including ice. Reported as 'missing' for grid cells occupied entirely by 'sea'",
"dimensions": "longitude latitude sdepth time",
"out_name": "mrsol",
"type": "",
@@ -1154,6 +1130,7 @@
"ok_max_mean_abs": ""
},
"mrsow": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "volume_fraction_of_condensed_water_in_soil_at_field_capacity",
"units": "1.0",
@@ -1171,6 +1148,7 @@
"ok_max_mean_abs": ""
},
"nudgincsm": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "nudging_increment_in_water_content_of_soil_layer",
"units": "kg m-2",
@@ -1188,6 +1166,7 @@
"ok_max_mean_abs": ""
},
"nudgincswe": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "nudging_increment_in_surface_snow_and_ice_amount",
"units": "kg m-2",
@@ -1205,6 +1184,7 @@
"ok_max_mean_abs": ""
},
"parasolRefl": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "toa_bidirectional_reflectance",
"units": "1.0",
@@ -1222,6 +1202,7 @@
"ok_max_mean_abs": ""
},
"pflw": {
+ "frequency": "day",
"modeling_realm": "landIce land",
"standard_name": "liquid_water_content_of_permafrost_layer",
"units": "kg m-2",
@@ -1239,6 +1220,7 @@
"ok_max_mean_abs": ""
},
"potet": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "water_potential_evapotranspiration_flux",
"units": "kg m-2 s-1",
@@ -1256,10 +1238,11 @@
"ok_max_mean_abs": ""
},
"prCrop": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Precipitation over Crop Tile",
"comment": "includes both liquid and solid phases",
@@ -1273,10 +1256,11 @@
"ok_max_mean_abs": ""
},
"prhmax": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean time: mean within hours time: maximum over hours",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Maximum Hourly Precipitation Rate",
"comment": "",
@@ -1290,6 +1274,7 @@
"ok_max_mean_abs": ""
},
"prra": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "rainfall_flux",
"units": "kg m-2 s-1",
@@ -1307,6 +1292,7 @@
"ok_max_mean_abs": ""
},
"prrc": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "convective_rainfall_flux",
"units": "kg m-2 s-1",
@@ -1324,6 +1310,7 @@
"ok_max_mean_abs": ""
},
"prrsn": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_rainfall_onto_snow",
"units": "1",
@@ -1341,6 +1328,7 @@
"ok_max_mean_abs": ""
},
"prsnc": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "convective_snowfall_flux",
"units": "kg m-2 s-1",
@@ -1358,6 +1346,7 @@
"ok_max_mean_abs": ""
},
"prsnsn": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_snowfall_onto_snow",
"units": "1",
@@ -1375,6 +1364,7 @@
"ok_max_mean_abs": ""
},
"prveg": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "precipitation_flux_onto_canopy",
"units": "kg m-2 s-1",
@@ -1392,10 +1382,11 @@
"ok_max_mean_abs": ""
},
"prw": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_water_vapor_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Water Vapor Path",
"comment": "vertically integrated through the atmospheric column",
@@ -1409,6 +1400,7 @@
"ok_max_mean_abs": ""
},
"qgwr": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "water_flux_from_soil_layer_to_groundwater",
"units": "kg m-2 s-1",
@@ -1426,10 +1418,11 @@
"ok_max_mean_abs": ""
},
"reffcclwtop": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_convective_cloud_liquid_water_particle_at_liquid_water_cloud_top",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Cloud-Top Effective Droplet Radius In Convective Cloud",
"comment": "Droplets are liquid only. This is the effective radius 'as seen from space' over convective liquid cloudy portion of grid cell. This is the value from uppermost model layer with liquid cloud or, if available, or for some models it is the sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Reported values are weighted by total liquid cloud top fraction of (as seen from TOA) each time sample when co [...]
@@ -1442,45 +1435,12 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "reffclwc": {
- "modeling_realm": "atmos",
- "standard_name": "effective_radius_of_convective_cloud_liquid_water_particle",
- "units": "m",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Hydrometeor Effective Radius of Convective Cloud Liquid Water",
- "comment": "Droplets are liquid. The effective radius is defined as the ratio of the third moment over the second moment of the particle size distribution and the time-mean should be calculated, weighting the individual samples by the cloudy fraction of the grid cell.",
- "dimensions": "longitude latitude time",
- "out_name": "reffclwc",
- "type": "real",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "reffclws": {
- "modeling_realm": "atmos",
- "standard_name": "effective_radius_of_stratiform_cloud_liquid_water_particle",
- "units": "m",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Hydrometeor Effective Radius of Stratiform Cloud Liquid Water",
- "comment": "Droplets are liquid. The effective radius is defined as the ratio of the third moment over the second moment of the particle size distribution and the time-mean should be calculated, weighting the individual samples by the cloudy fraction of the grid cell.",
- "dimensions": "longitude latitude time",
- "out_name": "reffclws",
- "type": "real",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"reffsclwtop": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_stratiform_cloud_liquid_water_particle_at_liquid_water_cloud_top",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Cloud-Top Effective Droplet Radius In Stratiform Cloud",
"comment": "Droplets are liquid only. This is the effective radius 'as seen from space' over liquid stratiform cloudy portion of grid cell. This is the value from uppermost model layer with liquid cloud or, if available, or for some models it is the sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Reported values are weighted by total liquid cloud top fraction of (as seen from TOA) each time sample when co [...]
@@ -1494,6 +1454,7 @@
"ok_max_mean_abs": ""
},
"rivi": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "water_flux_from_upstream",
"units": "m3 s-1",
@@ -1511,6 +1472,7 @@
"ok_max_mean_abs": ""
},
"rivo": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "water_flux_to_downstream",
"units": "m3 s-1",
@@ -1528,6 +1490,7 @@
"ok_max_mean_abs": ""
},
"rls": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_net_downward_longwave_flux",
"units": "W m-2",
@@ -1545,10 +1508,11 @@
"ok_max_mean_abs": ""
},
"rsdscsdiff": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_diffuse_downwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Diffuse Downwelling Clear Sky Shortwave Radiation",
"comment": "",
@@ -1562,10 +1526,11 @@
"ok_max_mean_abs": ""
},
"rsdsdiff": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_diffuse_downwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Diffuse Downwelling Shortwave Radiation",
"comment": "",
@@ -1579,6 +1544,7 @@
"ok_max_mean_abs": ""
},
"rss": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_net_downward_shortwave_flux",
"units": "W m-2",
@@ -1596,6 +1562,7 @@
"ok_max_mean_abs": ""
},
"rzwc": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "water_content_of_root_zone",
"units": "kg m-2",
@@ -1613,6 +1580,7 @@
"ok_max_mean_abs": ""
},
"sbl": {
+ "frequency": "day",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_sublimation_flux",
"units": "kg m-2 s-1",
@@ -1630,10 +1598,11 @@
"ok_max_mean_abs": ""
},
"scldncl": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "number_concentration_of_stratiform_cloud_liquid_water_particles_in_air_at_liquid_water_cloud_top",
"units": "m-3",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Cloud Droplet Number Concentration of Stratiform Cloud Tops",
"comment": "Droplets are liquid only. Report concentration 'as seen from space' over stratiform liquid cloudy portion of grid cell. This is the value from uppermost model layer with liquid cloud or, if available, it is better to sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Weight by total liquid cloud top fraction of (as seen from TOA) each time sample when computing monthly mean.",
@@ -1646,24 +1615,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "sithick": {
- "modeling_realm": "seaIce ocean",
- "standard_name": "sea_ice_thickness",
- "units": "m",
- "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)",
- "cell_measures": "area: areacella",
- "long_name": "Sea Ice Thickness",
- "comment": "Actual (floe) thickness of sea ice (NOT volume divided by grid area as was done in CMIP5)",
- "dimensions": "longitude latitude time",
- "out_name": "sithick",
- "type": "real",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"slbnosn": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "sublimation_amount_assuming_no_snow",
"units": "kg m-2 s-1",
@@ -1681,6 +1634,7 @@
"ok_max_mean_abs": ""
},
"snd": {
+ "frequency": "day",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_thickness",
"units": "m",
@@ -1698,6 +1652,7 @@
"ok_max_mean_abs": ""
},
"snm": {
+ "frequency": "day",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_melt_flux",
"units": "kg m-2 s-1",
@@ -1715,6 +1670,7 @@
"ok_max_mean_abs": ""
},
"snmsl": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_snow_melt_flux_into_soil_layer",
"units": "kg m-2 s-1",
@@ -1732,6 +1688,7 @@
"ok_max_mean_abs": ""
},
"snrefr": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_snow_and_ice_refreezing_flux",
"units": "kg m-2 s-1",
@@ -1748,24 +1705,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "snw": {
- "modeling_realm": "landIce land",
- "standard_name": "surface_snow_amount",
- "units": "kg m-2",
- "cell_methods": "area: mean where land time: mean",
- "cell_measures": "area: areacella",
- "long_name": "Surface Snow Amount",
- "comment": "The mass of surface snow on the land portion of the grid cell divided by the land area in the grid cell; reported as missing where the land fraction is 0; excludes snow on vegetation canopy or on sea ice.",
- "dimensions": "longitude latitude time",
- "out_name": "snw",
- "type": "real",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"snwc": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "canopy_snow_amount",
"units": "kg m-2",
@@ -1783,6 +1724,7 @@
"ok_max_mean_abs": ""
},
"sootsn": {
+ "frequency": "day",
"modeling_realm": "landIce land",
"standard_name": "soot_content_of_surface_snow",
"units": "kg m-2",
@@ -1800,6 +1742,7 @@
"ok_max_mean_abs": ""
},
"sw": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "surface_water_amount_assuming_no_snow",
"units": "kg m-2",
@@ -1817,10 +1760,11 @@
"ok_max_mean_abs": ""
},
"t20d": {
+ "frequency": "day",
"modeling_realm": "ocean",
"standard_name": "depth_of_isosurface_of_sea_water_potential_temperature",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "20C isotherm depth",
"comment": "",
@@ -1834,6 +1778,7 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
@@ -1851,6 +1796,7 @@
"ok_max_mean_abs": ""
},
"ta500": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
@@ -1868,6 +1814,7 @@
"ok_max_mean_abs": ""
},
"ta850": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
@@ -1885,14 +1832,15 @@
"ok_max_mean_abs": ""
},
"tasmaxCrop": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean time: maximum",
"cell_measures": "area: areacella",
"long_name": "Daily Maximum Near-Surface Air Temperature over Crop Tile",
"comment": "maximum near-surface (usually, 2 meter) air temperature (add cell_method attribute 'time: max')",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time height2m",
"out_name": "tasmaxCrop",
"type": "",
"positive": "",
@@ -1902,14 +1850,15 @@
"ok_max_mean_abs": ""
},
"tasminCrop": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean time: minimum",
"cell_measures": "area: areacella",
"long_name": "Daily Minimum Near-Surface Air Temperature over Crop Tile",
"comment": "minimum near-surface (usually, 2 meter) air temperature (add cell_method attribute 'time: min')",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time height2m",
"out_name": "tasminCrop",
"type": "",
"positive": "",
@@ -1919,6 +1868,7 @@
"ok_max_mean_abs": ""
},
"tau": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_downward_stress",
"units": "N m-2",
@@ -1936,10 +1886,11 @@
"ok_max_mean_abs": ""
},
"tauu": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_downward_eastward_stress",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downward Eastward Wind Stress",
"comment": "Downward eastward wind stress at the surface",
@@ -1953,10 +1904,11 @@
"ok_max_mean_abs": ""
},
"tauupbl": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_downward_eastward_stress_due_to_planetary_boundary_layer",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "eastward surface stress from planetary boundary layer scheme",
"comment": "The downward eastward stress associated with the models parameterization of the plantary boundary layer. (This request is related to a WGNE effort to understand how models parameterize the surface stresses.)",
@@ -1970,10 +1922,11 @@
"ok_max_mean_abs": ""
},
"tauv": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_downward_northward_stress",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downward Northward Wind Stress",
"comment": "Downward northward wind stress at the surface",
@@ -1987,10 +1940,11 @@
"ok_max_mean_abs": ""
},
"tauvpbl": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_downward_northward_stress_due_to_planetary_boundary_layer",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "northward surface stress from planetary boundary layer scheme",
"comment": "The downward northward stress associated with the models parameterization of the plantary boundary layer. (This request is related to a WGNE effort to understand how models parameterize the surface stresses.)",
@@ -2004,6 +1958,7 @@
"ok_max_mean_abs": ""
},
"tcs": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "canopy_temperature",
"units": "K",
@@ -2021,10 +1976,11 @@
"ok_max_mean_abs": ""
},
"tdps": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "dew_point_temperature",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "2m dewpoint temperature",
"comment": "",
@@ -2038,6 +1994,7 @@
"ok_max_mean_abs": ""
},
"tgs": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "surface_temperature",
"units": "K",
@@ -2055,6 +2012,7 @@
"ok_max_mean_abs": ""
},
"tpf": {
+ "frequency": "day",
"modeling_realm": "landIce land",
"standard_name": "permafrost_layer_thickness",
"units": "m",
@@ -2072,6 +2030,7 @@
"ok_max_mean_abs": ""
},
"tr": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_temperature",
"units": "K",
@@ -2089,6 +2048,7 @@
"ok_max_mean_abs": ""
},
"tran": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "transpiration_flux",
"units": "kg m-2 s-1",
@@ -2106,10 +2066,11 @@
"ok_max_mean_abs": ""
},
"ts": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_temperature",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Temperature",
"comment": "Temperature of the lower boundary of the atmosphere",
@@ -2123,6 +2084,7 @@
"ok_max_mean_abs": ""
},
"tsl": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "soil_temperature",
"units": "K",
@@ -2140,6 +2102,7 @@
"ok_max_mean_abs": ""
},
"tsnl": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "snow_temperature",
"units": "K",
@@ -2157,6 +2120,7 @@
"ok_max_mean_abs": ""
},
"tsns": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_temperature",
"units": "K",
@@ -2174,6 +2138,7 @@
"ok_max_mean_abs": ""
},
"tws": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "canopy_and_surface_and_subsurface_water_amount",
"units": "kg m-2",
@@ -2191,6 +2156,7 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -2208,6 +2174,7 @@
"ok_max_mean_abs": ""
},
"ua200": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -2225,6 +2192,7 @@
"ok_max_mean_abs": ""
},
"ua850": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -2242,6 +2210,7 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -2259,6 +2228,7 @@
"ok_max_mean_abs": ""
},
"va200": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -2276,6 +2246,7 @@
"ok_max_mean_abs": ""
},
"va850": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -2293,6 +2264,7 @@
"ok_max_mean_abs": ""
},
"wap": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
@@ -2310,6 +2282,7 @@
"ok_max_mean_abs": ""
},
"wtd": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "depth_of_soil_moisture_saturation",
"units": "m",
@@ -2327,6 +2300,7 @@
"ok_max_mean_abs": ""
},
"zg": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
@@ -2343,28 +2317,12 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "zg500": {
- "modeling_realm": "aerosol",
- "standard_name": "geopotential_height",
- "units": "m",
- "cell_methods": "time: mean",
- "cell_measures": "area: areacella",
- "long_name": "Geopotential Height at 500 hPa",
- "comment": "geopotential height on the 500 hPa surface",
- "dimensions": "longitude latitude time p500",
- "out_name": "zg500",
- "type": "float",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"zmla": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "atmosphere_boundary_layer_thickness",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Height of Boundary Layer",
"comment": "",
diff --git a/TestTables/CMIP6_EdayZ.json b/TestTables/CMIP6_EdayZ.json
index 106227c..a1698cf 100644
--- a/TestTables/CMIP6_EdayZ.json
+++ b/TestTables/CMIP6_EdayZ.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table EdayZ",
"realm": "atmos",
- "frequency": "day",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "1.00000",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"epfy": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "northward_eliassen_palm_flux_in_air",
"units": "m3 s-2",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"epfz": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "upward_eliassen_palm_flux_in_air",
"units": "m3 s-2",
@@ -49,11 +50,12 @@
"ok_max_mean_abs": ""
},
"hus": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Specific Humidity",
"comment": "",
"dimensions": "latitude plev19 time",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"psitem": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "meridional_streamfunction_transformed_eulerian_mean",
"units": "kg s^-1",
@@ -83,11 +86,12 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
"dimensions": "latitude plev19 time",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"utendepfd": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "tendency_of_eastward_wind_due_to_eliassen_palm_flux_divergence",
"units": "m s-2",
@@ -134,6 +140,7 @@
"ok_max_mean_abs": ""
},
"utendnogw": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "tendency_of_eastward_wind_due_to_nonorographic_gravity_wave_drag",
"units": "m s-2",
@@ -151,6 +158,7 @@
"ok_max_mean_abs": ""
},
"utendogw": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "tendency_of_eastward_wind_due_to_orographic_gravity_wave_drag",
"units": "m s-2",
@@ -168,6 +176,7 @@
"ok_max_mean_abs": ""
},
"utendvtem": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "u-tendency_by_wstar_advection",
"units": "m s-1 d-1",
@@ -185,6 +194,7 @@
"ok_max_mean_abs": ""
},
"utendwtem": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "u-tendency_by_vstar_advection",
"units": "m s-1 d-1",
@@ -202,11 +212,12 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Northward Wind",
"comment": "",
"dimensions": "latitude plev19 time",
@@ -219,6 +230,7 @@
"ok_max_mean_abs": ""
},
"vtem": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "northward_transformed_eulerian_mean_air_velocity",
"units": "m s-1",
@@ -236,6 +248,7 @@
"ok_max_mean_abs": ""
},
"wtem": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "unset",
"units": "m s-1",
@@ -253,11 +266,12 @@
"ok_max_mean_abs": ""
},
"zg": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
- "cell_methods": "time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Geopotential Height",
"comment": "",
"dimensions": "latitude plev19 time",
diff --git a/TestTables/CMIP6_Efx.json b/TestTables/CMIP6_Efx.json
index 541e767..f0b412f 100644
--- a/TestTables/CMIP6_Efx.json
+++ b/TestTables/CMIP6_Efx.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Efx",
"realm": "land",
- "frequency": "fx",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.00000",
@@ -15,8 +14,9 @@
},
"variable_entry": {
"clayfrac": {
+ "frequency": "fx",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "1.0",
"cell_methods": "area: mean where land",
"cell_measures": "area: areacella",
@@ -32,8 +32,9 @@
"ok_max_mean_abs": ""
},
"fldcapacity": {
+ "frequency": "fx",
"modeling_realm": "land",
- "standard_name": "",
+ "standard_name": "missing",
"units": "%",
"cell_methods": "area: mean where land",
"cell_measures": "area: areacella",
@@ -49,8 +50,9 @@
"ok_max_mean_abs": ""
},
"ksat": {
+ "frequency": "fx",
"modeling_realm": "land",
- "standard_name": "",
+ "standard_name": "missing",
"units": "1e-6 m s-1",
"cell_methods": "area: mean where land",
"cell_measures": "area: areacella",
@@ -65,7 +67,26 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "ps": {
+ "frequency": "fx",
+ "modeling_realm": "atmos",
+ "standard_name": "surface_air_pressure",
+ "units": "Pa",
+ "cell_methods": "area: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Surface Pressure",
+ "comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
+ "dimensions": "longitude latitude",
+ "out_name": "ps",
+ "type": "float",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"rld": {
+ "frequency": "fx",
"modeling_realm": "atmos",
"standard_name": "downwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -73,7 +94,7 @@
"cell_measures": "",
"long_name": "Downwelling Longwave Radiation",
"comment": "Downwelling Longwave Radiation (includes the fluxes at the surface and TOA)",
- "dimensions": "alevel spectband time",
+ "dimensions": "alevel spectband",
"out_name": "rld",
"type": "real",
"positive": "down",
@@ -83,6 +104,7 @@
"ok_max_mean_abs": ""
},
"rlu": {
+ "frequency": "fx",
"modeling_realm": "atmos",
"standard_name": "upwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -90,7 +112,7 @@
"cell_measures": "",
"long_name": "Upwelling Longwave Radiation",
"comment": "Upwelling longwave radiation (includes the fluxes at the surface and TOA)",
- "dimensions": "alevel spectband time",
+ "dimensions": "alevel spectband",
"out_name": "rlu",
"type": "real",
"positive": "up",
@@ -100,8 +122,9 @@
"ok_max_mean_abs": ""
},
"rootdsl": {
+ "frequency": "fx",
"modeling_realm": "land",
- "standard_name": "",
+ "standard_name": "missing",
"units": "kg m-3",
"cell_methods": "area: mean where land",
"cell_measures": "area: areacella",
@@ -117,6 +140,7 @@
"ok_max_mean_abs": ""
},
"rsd": {
+ "frequency": "fx",
"modeling_realm": "atmos",
"standard_name": "downwelling_shortwave_flux_in_air",
"units": "W m-2",
@@ -124,7 +148,7 @@
"cell_measures": "",
"long_name": "Downwelling Shortwave Radiation",
"comment": "Downwelling shortwave radiation (includes the fluxes at the surface and top-of-atmosphere)",
- "dimensions": "alevel spectband time",
+ "dimensions": "alevel spectband",
"out_name": "rsd",
"type": "real",
"positive": "down",
@@ -134,6 +158,7 @@
"ok_max_mean_abs": ""
},
"rsu": {
+ "frequency": "fx",
"modeling_realm": "atmos",
"standard_name": "upwelling_shortwave_flux_in_air",
"units": "W m-2",
@@ -141,7 +166,7 @@
"cell_measures": "",
"long_name": "Upwelling Shortwave Radiation",
"comment": "Upwelling shortwave radiation (includes also the fluxes at the surface and top of atmosphere)",
- "dimensions": "alevel spectband time",
+ "dimensions": "alevel spectband",
"out_name": "rsu",
"type": "real",
"positive": "up",
@@ -151,8 +176,9 @@
"ok_max_mean_abs": ""
},
"sandfrac": {
+ "frequency": "fx",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "1.0",
"cell_methods": "area: mean where land",
"cell_measures": "area: areacella",
@@ -168,6 +194,7 @@
"ok_max_mean_abs": ""
},
"sftflf": {
+ "frequency": "fx",
"modeling_realm": "landIce",
"standard_name": "floating_ice_shelf_area_fraction",
"units": "%",
@@ -175,7 +202,7 @@
"cell_measures": "area: areacella",
"long_name": "Floating Ice Shelf Area Fraction",
"comment": "Fraction of grid cell covered by floating ice shelf, the component of the ice sheet that is flowing over seawater",
- "dimensions": "longitude latitude",
+ "dimensions": "longitude latitude typefis",
"out_name": "sftflf",
"type": "",
"positive": "",
@@ -185,6 +212,7 @@
"ok_max_mean_abs": ""
},
"sftgrf": {
+ "frequency": "fx",
"modeling_realm": "landIce",
"standard_name": "grounded_ice_sheet_area_fraction",
"units": "%",
@@ -192,7 +220,7 @@
"cell_measures": "area: areacella",
"long_name": "Grounded Ice Sheet Area Fraction",
"comment": "Fraction of grid cell covered by grounded ice sheet",
- "dimensions": "longitude latitude",
+ "dimensions": "longitude latitude typegis",
"out_name": "sftgrf",
"type": "",
"positive": "",
@@ -202,8 +230,9 @@
"ok_max_mean_abs": ""
},
"siltfrac": {
+ "frequency": "fx",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "1.0",
"cell_methods": "area: mean where land",
"cell_measures": "area: areacella",
@@ -219,8 +248,9 @@
"ok_max_mean_abs": ""
},
"slthick": {
+ "frequency": "fx",
"modeling_realm": "land",
- "standard_name": "",
+ "standard_name": "missing",
"units": "m",
"cell_methods": "area: mean where land",
"cell_measures": "area: areacella",
@@ -235,9 +265,28 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "vegHeight": {
+ "frequency": "fx",
+ "modeling_realm": "land",
+ "standard_name": "canopy_height",
+ "units": "m",
+ "cell_methods": "area: mean where land",
+ "cell_measures": "area: areacella",
+ "long_name": "canopy height",
+ "comment": "",
+ "dimensions": "longitude latitude",
+ "out_name": "vegHeight",
+ "type": "float",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"wilt": {
+ "frequency": "fx",
"modeling_realm": "land",
- "standard_name": "",
+ "standard_name": "missing",
"units": "%",
"cell_methods": "area: mean where land",
"cell_measures": "area: areacella",
diff --git a/TestTables/CMIP6_Emon.json b/TestTables/CMIP6_Emon.json
index 4b1833b..9849b5d 100644
--- a/TestTables/CMIP6_Emon.json
+++ b/TestTables/CMIP6_Emon.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Emon",
"realm": "atmos",
- "frequency": "mon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"H2p": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "2H in total precipitation",
"comment": "Roche - LSCE",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"H2s": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "2H in solid precipitation",
"comment": "Roche - LSCE",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"H2wv": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "H2 in water vapor",
"comment": "Roche - LSCE",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"O17p": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "17O in total precipitation",
"comment": "Roche - LSCE",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"O17s": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "17O in solid precipitation",
"comment": "Roche - LSCE",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"O17wv": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "O17 in water vapor",
"comment": "Roche - LSCE",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"O18p": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "18O in total precipitation",
"comment": "Roche - LSCE",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"O18s": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "18O in solid precipitation",
"comment": "Roche - LSCE",
@@ -151,11 +158,12 @@
"ok_max_mean_abs": ""
},
"O18sw": {
+ "frequency": "mon",
"modeling_realm": "ocean",
- "standard_name": "",
+ "standard_name": "missing",
"units": "",
- "cell_methods": "area: time: mean",
- "cell_measures": "area: areacello",
+ "cell_methods": "area: mean where sea time: mean",
+ "cell_measures": "area: areacello volume: volcello",
"long_name": "O18 in sea water",
"comment": "Roche - LSCE",
"dimensions": "longitude latitude olevel time",
@@ -168,10 +176,11 @@
"ok_max_mean_abs": ""
},
"O18wv": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "O18 in water vapor",
"comment": "Roche - LSCE",
@@ -184,65 +193,15 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "albs": {
- "modeling_realm": "aerosol",
- "standard_name": "surface_albedo",
- "units": "1.0",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "planetary albedo",
- "comment": "Grid cell average albedo for all wavelengths.",
- "dimensions": "longitude latitude time",
- "out_name": "albs",
- "type": "float",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "albsrfc": {
- "modeling_realm": "aerosol",
- "standard_name": "surface_albedo",
- "units": "1.0",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "surface albedo",
- "comment": "",
- "dimensions": "longitude latitude time",
- "out_name": "albsrfc",
- "type": "float",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "burntFractionAll": {
- "modeling_realm": "land",
- "standard_name": "burned_area_fraction_OR_area_fraction",
- "units": "%",
- "cell_methods": "area: mean where land time: mean",
- "cell_measures": "area: areacella",
- "long_name": "Fraction of grid cell burned due to all fires including natural and anthropogenic fires and those associated with anthropogenic land use change",
- "comment": "",
- "dimensions": "longitude latitude time",
- "out_name": "burntFractionAll",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"c13Land": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "total_land_c13",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass of 13C in all terrestrial carbon pools",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "c13Land",
"type": "",
@@ -253,13 +212,14 @@
"ok_max_mean_abs": ""
},
"c13Litter": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "litter_c13_content",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass of 13C in Litter Pool",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "c13Litter",
"type": "",
@@ -270,13 +230,14 @@
"ok_max_mean_abs": ""
},
"c13Soil": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_c13_content",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass of 13C in Soil Pool",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "c13Soil",
"type": "",
@@ -287,13 +248,14 @@
"ok_max_mean_abs": ""
},
"c13Veg": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "vegetation_c13_content",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass of 13C in Vegetation",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "c13Veg",
"type": "",
@@ -304,13 +266,14 @@
"ok_max_mean_abs": ""
},
"c14Land": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "total_land_c14",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass of 14C in all terrestrial carbon pools",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "c14Land",
"type": "",
@@ -321,13 +284,14 @@
"ok_max_mean_abs": ""
},
"c14Litter": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "litter_c14_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass of 14C in Litter Pool",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "c14Litter",
"type": "",
@@ -338,13 +302,14 @@
"ok_max_mean_abs": ""
},
"c14Soil": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_c14_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass of 14C in Soil Pool",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "c14Soil",
"type": "",
@@ -355,13 +320,14 @@
"ok_max_mean_abs": ""
},
"c14Veg": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "vegetation_c14_content",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass of 14C in Vegetation",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "c14Veg",
"type": "",
@@ -372,13 +338,14 @@
"ok_max_mean_abs": ""
},
"cLand": {
- "modeling_realm": "atmos",
+ "frequency": "mon",
+ "modeling_realm": "land",
"standard_name": "total_land_carbon",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Carbon in All Terrestrial Carbon Pools",
- "comment": "as specified by C4MIP",
+ "comment": "Report missing data over ocean grid cells. For fractional land report value averaged over the land fraction.",
"dimensions": "longitude latitude time",
"out_name": "cLand",
"type": "",
@@ -389,6 +356,7 @@
"ok_max_mean_abs": ""
},
"cLitterCwd": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "litter_wood_debris_carbon_content",
"units": "kg m-2",
@@ -406,10 +374,11 @@
"ok_max_mean_abs": ""
},
"cLitterGrass": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "litter_carbon_content_for_grass",
+ "standard_name": "litter_carbon_content",
"units": "kg m-2",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where natural_grasses (comment: mask=grassFrac)",
"cell_measures": "area: areacella",
"long_name": "Carbon mass in litter on grass tiles",
"comment": "",
@@ -423,10 +392,11 @@
"ok_max_mean_abs": ""
},
"cLitterShrub": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "litter_carbon_content_for_shrubs",
+ "standard_name": "litter_carbon_content",
"units": "kg m-2",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where shrubs (comment: mask=shrubFrac)",
"cell_measures": "area: areacella",
"long_name": "Carbon mass in litter on shrub tiles",
"comment": "",
@@ -440,6 +410,7 @@
"ok_max_mean_abs": ""
},
"cLitterSubSurf": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "subsurface_litter_carbon_content",
"units": "kg m-2",
@@ -457,6 +428,7 @@
"ok_max_mean_abs": ""
},
"cLitterSurf": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_litter_carbon_content",
"units": "kg m-2",
@@ -474,10 +446,11 @@
"ok_max_mean_abs": ""
},
"cLitterTree": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "litter_carbon_content_for_trees",
+ "standard_name": "litter_carbon_content",
"units": "kg m-2",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where trees (comment: mask=treeFrac)",
"cell_measures": "area: areacella",
"long_name": "Carbon mass in litter on tree tiles",
"comment": "",
@@ -491,6 +464,7 @@
"ok_max_mean_abs": ""
},
"cMisc": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "miscellaneous_living_matter_carbon_content",
"units": "kg m-2",
@@ -508,6 +482,7 @@
"ok_max_mean_abs": ""
},
"cOther": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "other_vegegtation_components_carbon_content",
"units": "kg m-2",
@@ -525,6 +500,7 @@
"ok_max_mean_abs": ""
},
"cSoil": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_carbon_content",
"units": "kg m-2",
@@ -542,6 +518,7 @@
"ok_max_mean_abs": ""
},
"cSoilAbove1m": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_carbon_content_above_1m_depth",
"units": "kg m-2",
@@ -559,6 +536,7 @@
"ok_max_mean_abs": ""
},
"cSoilBelow1m": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_carbon_content_below_1m_depth",
"units": "kg m-2",
@@ -576,10 +554,11 @@
"ok_max_mean_abs": ""
},
"cSoilGrass": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "soil_carbon_content_for_grass",
+ "standard_name": "soil_carbon_content",
"units": "kg m-2",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where natural_grasses (comment: mask=grassFrac)",
"cell_measures": "area: areacella",
"long_name": "Carbon mass in soil on grass tiles",
"comment": "",
@@ -593,6 +572,7 @@
"ok_max_mean_abs": ""
},
"cSoilLevels": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_carbon_content_on_model_levels",
"units": "kg m-2",
@@ -610,6 +590,7 @@
"ok_max_mean_abs": ""
},
"cSoilPools": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_carbon_content_by_pool",
"units": "kg m-2",
@@ -627,10 +608,11 @@
"ok_max_mean_abs": ""
},
"cSoilShrub": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "soil_carbon_content_for_shrubs",
+ "standard_name": "soil_carbon_content",
"units": "kg m-2",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where shrubs (comment: mask=shrubFrac)",
"cell_measures": "area: areacella",
"long_name": "Carbon mass in soil on shrub tiles",
"comment": "",
@@ -644,10 +626,11 @@
"ok_max_mean_abs": ""
},
"cSoilTree": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "soil_carbon_content_for_trees",
+ "standard_name": "soil_carbon_content",
"units": "kg m-2",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where trees (comment: mask=treeFrac)",
"cell_measures": "area: areacella",
"long_name": "Carbon mass in soil on tree tiles",
"comment": "",
@@ -661,6 +644,7 @@
"ok_max_mean_abs": ""
},
"cStem": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "stem_carbon_content",
"units": "kg m-2",
@@ -678,8 +662,9 @@
"ok_max_mean_abs": ""
},
"cTotFireLut": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "",
+ "standard_name": "missing",
"units": "kg m-2 s-1",
"cell_methods": "area: time: mean where landuse",
"cell_measures": "area: areacella",
@@ -695,10 +680,11 @@
"ok_max_mean_abs": ""
},
"cVegGrass": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "vegetation_carbon_content_for_grass",
+ "standard_name": "vegetation_carbon_content",
"units": "kg m-2",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where natural_grasses (comment: mask=grassFrac)",
"cell_measures": "area: areacella",
"long_name": "Carbon mass in vegetation on grass tiles",
"comment": "",
@@ -712,10 +698,11 @@
"ok_max_mean_abs": ""
},
"cVegShrub": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "vegetation_carbon_content_for_shrubs",
+ "standard_name": "vegetation_carbon_content",
"units": "kg m-2",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where shrubs (comment: mask=shrubFrac)",
"cell_measures": "area: areacella",
"long_name": "Carbon mass in vegetation on shrub tiles",
"comment": "",
@@ -729,10 +716,11 @@
"ok_max_mean_abs": ""
},
"cVegTree": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "vegetation_carbon_content_for_trees",
+ "standard_name": "vegetation_carbon_content",
"units": "kg m-2",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where trees (comment: mask=treeFrac)",
"cell_measures": "area: areacella",
"long_name": "Carbon mass in vegetation on tree tiles",
"comment": "",
@@ -746,6 +734,7 @@
"ok_max_mean_abs": ""
},
"cWood": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "wood_carbon_content",
"units": "kg m-2",
@@ -763,10 +752,11 @@
"ok_max_mean_abs": ""
},
"cfadDbze94": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "histogram_of_equivalent_reflectivity_factor_over_height_above_reference_ellipsoid",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "CloudSat Radar Reflectivity",
"comment": "CFAD (Cloud Frequency Altitude Diagrams) are frequency distributions of radar reflectivity (or lidar scattering ratio) as a function of altitude. The variable cfadDbze94 is defined as the simulated relative frequency of occurrence of radar reflectivity in sampling volumes defined by altitude bins. The radar is observing at a frequency of 94GHz.",
@@ -780,10 +770,11 @@
"ok_max_mean_abs": ""
},
"cfadLidarsr532": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "histogram_of_backscattering_ratio_over_height_above_reference_ellipsoid",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "CALIPSO Scattering Ratio",
"comment": "CFAD (Cloud Frequency Altitude Diagrams) are frequency distributions of radar reflectivity (or lidar scattering ratio) as a function of altitude. The variable cfadLidarsr532 is defined as the simulated relative frequency of lidar scattering ratio in sampling volumes defined by altitude bins. The lidar is observing at a wavelength of 532nm.",
@@ -797,6 +788,7 @@
"ok_max_mean_abs": ""
},
"clcalipsoice": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "ice_cloud_area_fraction_in_atmosphere_layer",
"units": "%",
@@ -814,6 +806,7 @@
"ok_max_mean_abs": ""
},
"clcalipsoliq": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "liquid_cloud_area_fraction_in_atmosphere_layer",
"units": "%",
@@ -831,6 +824,7 @@
"ok_max_mean_abs": ""
},
"cldicemxrat27": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_ice_mixing_ratio",
"units": "1.0",
@@ -839,7 +833,7 @@
"long_name": "Cloud Ice Mixing Ratio",
"comment": "Cloud ice mixing ratio",
"dimensions": "longitude latitude plev27 time",
- "out_name": "cldicemxrat27",
+ "out_name": "cldicemxrat",
"type": "",
"positive": "",
"valid_min": "",
@@ -848,10 +842,11 @@
"ok_max_mean_abs": ""
},
"cldnci": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "number_concentration_of_ice_crystals_in_air_at_ice_cloud_top",
"units": "m-3",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Ice Crystal Number Concentration of Cloud Tops",
"comment": "Concentration 'as seen from space' over ice-cloud portion of grid cell. This is the value from uppermost model layer with ice cloud or, if available, it is the sum over all ice cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Weight by total ice cloud top fraction (as seen from TOA) of each time sample when computing monthly mean.",
@@ -865,10 +860,11 @@
"ok_max_mean_abs": ""
},
"cldncl": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "number_concentration_of_cloud_liquid_water_particles_in_air_at_liquid_water_cloud_top",
"units": "m-3",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Cloud Droplet Number Concentration of Cloud Tops",
"comment": "Droplets are liquid only. Report concentration 'as seen from space' over liquid cloudy portion of grid cell. This is the value from uppermost model layer with liquid cloud or, if available, it is better to sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Weight by total liquid cloud top fraction of (as seen from TOA) each time sample when computing monthly mean.",
@@ -882,10 +878,11 @@
"ok_max_mean_abs": ""
},
"cldnvi": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_number_content_of_cloud_droplets",
"units": "m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Column Integrated Cloud Droplet Number",
"comment": "Droplets are liquid only. Values are weighted by liquid cloud fraction in each layer when vertically integrating, and for monthly means the samples are weighted by total liquid cloud fraction (as seen from TOA).",
@@ -899,6 +896,7 @@
"ok_max_mean_abs": ""
},
"cldwatmxrat27": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_liquid_water_mixing_ratio",
"units": "1.0",
@@ -907,7 +905,7 @@
"long_name": "Cloud Water Mixing Ratio",
"comment": "Cloud water mixing ratio",
"dimensions": "longitude latitude plev27 time",
- "out_name": "cldwatmxrat27",
+ "out_name": "cldwatmxrat",
"type": "",
"positive": "",
"valid_min": "",
@@ -916,10 +914,11 @@
"ok_max_mean_abs": ""
},
"climodis": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "ice_cloud_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "MODIS Ice Cloud Area Percentage",
"comment": "",
@@ -933,10 +932,11 @@
"ok_max_mean_abs": ""
},
"clmisr": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Percentage Cloud Cover as Calculated by the MISR Simulator",
"comment": "Cloud percentage in spectral bands and layers as observed by the Multi-angle Imaging SpectroRadiometer (MISR) instrument.",
@@ -950,10 +950,11 @@
"ok_max_mean_abs": ""
},
"cltmodis": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "MODIS Total Cloud Cover Percentage",
"comment": "",
@@ -967,10 +968,11 @@
"ok_max_mean_abs": ""
},
"clwmodis": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "liquid_cloud_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "MODIS Liquid Cloud Fraction",
"comment": "",
@@ -984,10 +986,11 @@
"ok_max_mean_abs": ""
},
"clwvic": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_convective_cloud_condensed_water_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Condensed Water Path",
"comment": "calculate mass of convective condensed (liquid + ice) water in the column divided by the area of the column (not just the area of the cloudy portion of the column). This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.",
@@ -1001,10 +1004,11 @@
"ok_max_mean_abs": ""
},
"co23D": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "CO2_3D_tracer",
"units": "kg kg-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "3D field of transported CO2",
"comment": "report 3D field of model simulated atmospheric CO2 mass mixing ration on model levels",
@@ -1018,10 +1022,11 @@
"ok_max_mean_abs": ""
},
"co2s": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "mass_fraction_of_carbon_dioxide_in_air_OR_mole_fraction_of_carbon_dioxide_in_air_OR_mole_concentration_of_carbon_dioxide_in_air",
+ "standard_name": "mole_fraction_of_carbon_dioxide_in_air",
"units": "1e-06",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Atmosphere CO2",
"comment": "As co2, but only at the surface",
@@ -1035,10 +1040,11 @@
"ok_max_mean_abs": ""
},
"columnmassflux": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_net_upward_convective_mass_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Column Integrated Mass Flux",
"comment": "Column integral of (mcu-mcd)",
@@ -1052,10 +1058,11 @@
"ok_max_mean_abs": ""
},
"conccmcn": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "number_concentration_of_coarse_mode_ambient_aerosol_in_air",
"units": "m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Number Concentration Coarse Mode Aerosol",
"comment": "includes all particles with diameter larger than 1 micron",
@@ -1069,10 +1076,11 @@
"ok_max_mean_abs": ""
},
"conccn": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "number_concentration_of_ambient_aerosol_in_air",
"units": "m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Aerosol Number Concentration",
"comment": "",
@@ -1086,10 +1094,11 @@
"ok_max_mean_abs": ""
},
"concdust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_concentration_of_dust_dry_aerosol_in_air",
"units": "kg m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Concentration of Dust",
"comment": "",
@@ -1103,10 +1112,11 @@
"ok_max_mean_abs": ""
},
"concnmcn": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "number_concentration_of_nucleation_mode_ambient_aerosol_in_air",
"units": "m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Number Concentration of Nucleation Mode Aerosol",
"comment": "includes all particles with diameter smaller than 3 nm",
@@ -1120,14 +1130,15 @@
"ok_max_mean_abs": ""
},
"cropFracC3": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "crop_fraction_c3",
+ "standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Percentage Cover by C3 Crops",
"comment": "Percentage of entire grid cell covered by C3 crops",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time typec3pft typecrop",
"out_name": "cropFracC3",
"type": "",
"positive": "",
@@ -1137,14 +1148,15 @@
"ok_max_mean_abs": ""
},
"cropFracC4": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "crop_fraction_c4",
+ "standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Percentage Cover by C4 Crops",
"comment": "Percentage of entire grid cell covered by C4 crops",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time typec4pft typecrop",
"out_name": "cropFracC4",
"type": "",
"positive": "",
@@ -1154,10 +1166,11 @@
"ok_max_mean_abs": ""
},
"depdust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_atmosphere_mass_content_of_dust_dry_aerosol_particles_due_to_total_deposition",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Deposition Rate of Dust",
"comment": "Balkanski - LSCE",
@@ -1171,6 +1184,7 @@
"ok_max_mean_abs": ""
},
"diabdrag": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_eastward_wind_due_to_numerical_artefacts",
"units": "m s-2",
@@ -1188,11 +1202,12 @@
"ok_max_mean_abs": ""
},
"dissi13c": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon13_in_sea_water",
"units": "mol m-3",
- "cell_methods": "area: time: mean",
- "cell_measures": "area: areacello",
+ "cell_methods": "area: mean where sea time: mean",
+ "cell_measures": "area: areacello volume: volcello",
"long_name": "Dissolved Inorganic 13Carbon Concentration",
"comment": "Dissolved inorganic 14carbon (CO3+HCO3+H2CO3) concentration",
"dimensions": "longitude latitude olevel time",
@@ -1205,14 +1220,15 @@
"ok_max_mean_abs": ""
},
"dissi14c": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "mole_concentration_of_dissolved_inorganic_c14_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacella",
+ "cell_measures": "area: areacello volume: volcello",
"long_name": "Concentration of DI14C",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude alevel time",
+ "comment": "",
+ "dimensions": "longitude latitude olevel time",
"out_name": "dissi14c",
"type": "",
"positive": "",
@@ -1222,10 +1238,11 @@
"ok_max_mean_abs": ""
},
"dissicnat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon_in_sea_water_natural_component",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Natural Dissolved Inorganic Carbon Concentration",
"comment": "Dissolved inorganic carbon (CO3+HCO3+H2CO3) concentration at preindustrial atmospheric xCO2",
@@ -1239,10 +1256,11 @@
"ok_max_mean_abs": ""
},
"ec550aer": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "volume_extinction_coefficient_in_air_due_to_ambient_aerosol_particles",
"units": "m-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Aerosol extinction coefficient",
"comment": "Aerosol Extinction @550nm",
@@ -1256,10 +1274,11 @@
"ok_max_mean_abs": ""
},
"evspsblpot": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "water_potential_evaporation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Potential Evapotranspiration",
"comment": "at surface; potential flux of water into the atmosphere due to conversion of both liquid and solid phases to vapor (from underlying surface and vegetation)",
@@ -1273,10 +1292,11 @@
"ok_max_mean_abs": ""
},
"exparag": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_aragonite_expressed_as_carbon_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Aragonite Flux",
"comment": "Downward flux of Aragonite",
@@ -1290,10 +1310,11 @@
"ok_max_mean_abs": ""
},
"expcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_calcite_expressed_as_carbon_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Calcite Flux",
"comment": "Downward flux of Calcite",
@@ -1307,10 +1328,11 @@
"ok_max_mean_abs": ""
},
"expcfe": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sinking_mole_flux_of_particulate_iron_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Particulate Iron Flux",
"comment": "",
@@ -1324,10 +1346,11 @@
"ok_max_mean_abs": ""
},
"expn": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_organic_nitrogen_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Particulate Organic Nitrogen Flux",
"comment": "",
@@ -1341,10 +1364,11 @@
"ok_max_mean_abs": ""
},
"expp": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_organic_phosphorus_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Particulate Organic Phosphorus Flux",
"comment": "",
@@ -1358,10 +1382,11 @@
"ok_max_mean_abs": ""
},
"expsi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_silicon_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Particulate Silica Flux",
"comment": "",
@@ -1375,6 +1400,7 @@
"ok_max_mean_abs": ""
},
"fAnthDisturb": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_anthrogpogenic_emission",
"units": "kg m-2 s-1",
@@ -1392,6 +1418,7 @@
"ok_max_mean_abs": ""
},
"fBNF": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "biological_nitrogen_fixation",
"units": "kg m-2 s-1",
@@ -1408,41 +1435,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "fBNFasymb": {
- "modeling_realm": "land",
- "standard_name": "asymbiontic_biological_nitrogen_fixation",
- "units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "asymbiontic biological nitrogen fixation",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
- "out_name": "fBNFasymb",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "fBNFsymb": {
- "modeling_realm": "land",
- "standard_name": "symbiontic_biological_nitrogen_fixation",
- "units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "symbiontic biological nitrogen fixation",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
- "out_name": "fBNFsymb",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"fCLandToOcean": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "carbon_mass_flux_into_ocean_from_rivers",
"units": "kg m-2 s-1",
@@ -1459,24 +1453,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "fDeforest": {
- "modeling_realm": "land",
- "standard_name": "deforested_biomass_due_to_anthorpogenic_land_use_change",
- "units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Deforested biomass as a result of anthropogenic land use change",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
- "out_name": "fDeforest",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"fDeforestToAtmos": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_net_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_anthropogenic_land_use_change",
"units": "kg m-2 s-1",
@@ -1494,6 +1472,7 @@
"ok_max_mean_abs": ""
},
"fDeforestToProduct": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "deforested_biomass_into_product_pool_due_to_anthorpogenic_land_use_change",
"units": "kg m-2 s-1",
@@ -1511,6 +1490,7 @@
"ok_max_mean_abs": ""
},
"fFireAll": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "fire_CO2_emissions_from_all_sources",
"units": "kg m-2 s-1",
@@ -1528,6 +1508,7 @@
"ok_max_mean_abs": ""
},
"fFireNat": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "fire_CO2_emissions_from_wildfire",
"units": "kg m-2 s-1",
@@ -1545,6 +1526,7 @@
"ok_max_mean_abs": ""
},
"fHarvestToAtmos": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_crop_harvesting",
"units": "kg m-2 s-1",
@@ -1562,6 +1544,7 @@
"ok_max_mean_abs": ""
},
"fHarvestToProduct": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "harvested_biomass_into_product_pool",
"units": "kg m-2 s-1",
@@ -1579,6 +1562,7 @@
"ok_max_mean_abs": ""
},
"fLitterFire": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "fire_CO2_emissions_from_litter_carbon",
"units": "kg m-2 s-1",
@@ -1596,6 +1580,7 @@
"ok_max_mean_abs": ""
},
"fLuc": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_net_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_anthropogenic_land_use_change",
"units": "kg m-2 s-1",
@@ -1613,6 +1598,7 @@
"ok_max_mean_abs": ""
},
"fLulccAtmLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_direct_to_atmosphere_due_to_anthropogenic_land_use_land_cover_change",
"units": "kg s-1",
@@ -1630,6 +1616,7 @@
"ok_max_mean_abs": ""
},
"fLulccProductLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "carbon_mass_flux_into_wood_and_agricultural_product_pools_due_to_anthropogenic_land_use_or_land_cover_change",
"units": "kg m-2 s-1",
@@ -1647,6 +1634,7 @@
"ok_max_mean_abs": ""
},
"fLulccResidueLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "carbon_mass_flux_into_soil_and_litter_due_to_anthropogenic_land_use_or_land_cover_change",
"units": "kg m-2 s-1",
@@ -1664,13 +1652,14 @@
"ok_max_mean_abs": ""
},
"fN2O": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "land_net_n2o_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Total land N2O flux",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "fN2O",
"type": "",
@@ -1681,6 +1670,7 @@
"ok_max_mean_abs": ""
},
"fNAnthDisturb": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "nitrogen_flux_into_atmos_due_to_direct_human_disturbance",
"units": "kg m-2 s-1",
@@ -1698,6 +1688,7 @@
"ok_max_mean_abs": ""
},
"fNLandToOcean": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "nitrogen_mass_flux_into_ocean_from_rivers",
"units": "kg m-2 s-1",
@@ -1715,6 +1706,7 @@
"ok_max_mean_abs": ""
},
"fNLitterSoil": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "nitrogen_mass_flux_into_soil_from_litter",
"units": "kg m-2 s-1",
@@ -1732,6 +1724,7 @@
"ok_max_mean_abs": ""
},
"fNOx": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "land_net_nox_flux",
"units": "kg m-2 s-1",
@@ -1749,6 +1742,7 @@
"ok_max_mean_abs": ""
},
"fNProduct": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "nitrogen_mass_flux_to_product_pool_due_to_anthorpogenic_activity",
"units": "kg m-2 s-1",
@@ -1766,6 +1760,7 @@
"ok_max_mean_abs": ""
},
"fNVegLitter": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "litter_nitrogen_flux",
"units": "kg m-2 s-1",
@@ -1783,6 +1778,7 @@
"ok_max_mean_abs": ""
},
"fNVegSoil": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "nitrogen_mass_flux_into_soil_from_vegetation_excluding_litter",
"units": "kg m-2 s-1",
@@ -1800,6 +1796,7 @@
"ok_max_mean_abs": ""
},
"fNdep": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "deposition_of_nitrogen_onto_land",
"units": "kg m-2 s-1",
@@ -1816,41 +1813,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "fNdepox": {
- "modeling_realm": "land",
- "standard_name": "deposition_of_oxidised_nitrogen_onto_land",
- "units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Dry and Wet Deposition of Oxidised Reactive Nitrogen onto Land",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
- "out_name": "fNdepox",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "fNdepred": {
- "modeling_realm": "land",
- "standard_name": "deposition_of_reduced_nitrogen_onto_land",
- "units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Dry and Wet Deposition of Reduced Reactive Nitrogen onto Land",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
- "out_name": "fNdepred",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"fNfert": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "fertiliser_of_nitrogen_onto_land",
"units": "kg m-2 s-1",
@@ -1868,13 +1832,14 @@
"ok_max_mean_abs": ""
},
"fNgas": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "land_nitrogen_lost_to_atmosphere",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Nitrogen lost to the atmosphere (sum of NHx, NOx, N2O, N2)",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "fNgas",
"type": "",
@@ -1885,6 +1850,7 @@
"ok_max_mean_abs": ""
},
"fNgasFire": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "land_nitrogen_lost_to_atmosphere_due_to_fire",
"units": "kg m-2 s-1",
@@ -1902,6 +1868,7 @@
"ok_max_mean_abs": ""
},
"fNgasNonFire": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "land_nitrogen_lost_to_atmosphere_not_due_to_fire",
"units": "kg m-2 s-1",
@@ -1919,13 +1886,14 @@
"ok_max_mean_abs": ""
},
"fNleach": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "land_nitrogen_lost_to_leaching",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Total N loss to leaching or runoff (sum of ammonium, nitrite and nitrate)",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "fNleach",
"type": "",
@@ -1936,6 +1904,7 @@
"ok_max_mean_abs": ""
},
"fNloss": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "land_nitrogen_lost",
"units": "kg m-2 s-1",
@@ -1953,13 +1922,14 @@
"ok_max_mean_abs": ""
},
"fNnetmin": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "net_nitrogen_mineralisation",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Net nitrogen release from soil and litter as the outcome of nitrogen immobilisation and gross mineralisation",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "fNnetmin",
"type": "",
@@ -1970,13 +1940,14 @@
"ok_max_mean_abs": ""
},
"fNup": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "plant_nitrogen_uptake",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "total plant nitrogen uptake (sum of ammonium and nitrate), irrespective of the source of nitrogen",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "fNup",
"type": "",
@@ -1987,6 +1958,7 @@
"ok_max_mean_abs": ""
},
"fProductDecomp": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "Carbon_flux_out_of_storage_product_pools_into_atmos",
"units": "kg m-2 s-1",
@@ -2004,6 +1976,7 @@
"ok_max_mean_abs": ""
},
"fProductDecompLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "tendency_of_atmospheric_mass_content_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_wood_and_agricultural_product_pool",
"units": "kg s-1",
@@ -2021,6 +1994,7 @@
"ok_max_mean_abs": ""
},
"fVegFire": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "fire_CO2_emissions_from_vegetation_carbon",
"units": "kg m-2 s-1",
@@ -2038,6 +2012,7 @@
"ok_max_mean_abs": ""
},
"fVegLitterMortality": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "mortality_litter_carbon_flux",
"units": "kg m-2 s-1",
@@ -2055,6 +2030,7 @@
"ok_max_mean_abs": ""
},
"fVegLitterSenescence": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "senescence_litter_carbon_flux",
"units": "kg m-2 s-1",
@@ -2072,6 +2048,7 @@
"ok_max_mean_abs": ""
},
"fVegSoilMortality": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "mortality_vegtosoil_carbon_flux",
"units": "kg m-2 s-1",
@@ -2089,6 +2066,7 @@
"ok_max_mean_abs": ""
},
"fVegSoilSenescence": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "senescence_vegtosoil_carbon_flux",
"units": "kg m-2 s-1",
@@ -2106,14 +2084,15 @@
"ok_max_mean_abs": ""
},
"fahLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upward_heat_flux_due_to_anthropogenic_energy_consumption",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean where landuse",
"cell_measures": "area: areacella",
"long_name": "Anthropogenic heat flux generated from non-renewable human primary energy consumption, including energy use by vehicles, commercial and residential buildings, industry, and power plants. Primary energy refers to energy in natural resources, fossil and nonfossil, before conversion into other forms, such as electricity.",
"comment": "",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude landUse time",
"out_name": "fahLut",
"type": "",
"positive": "",
@@ -2123,10 +2102,11 @@
"ok_max_mean_abs": ""
},
"fbddtalk": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "integral_wrt_depth_of_tendency_of_sea_water_alkalinity_expressed_as_mole_equivalent_due_to_biological_processes",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Biological Alkalinity due to Biological Activity",
"comment": "vertical integral of net biological terms in time rate of change of alkalinity",
@@ -2140,10 +2120,11 @@
"ok_max_mean_abs": ""
},
"fbddtdic": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_carbon_due_to_biological_processes",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Dissolved Inorganic Carbon due to Biological Activity",
"comment": "vertical integral of net biological terms in time rate of change of dissolved inorganic carbon",
@@ -2157,10 +2138,11 @@
"ok_max_mean_abs": ""
},
"fbddtdife": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_iron_due_to_biological_processes",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Dissolved Inorganic Iron due to Biological Activity",
"comment": "vertical integral of net biological terms in time rate of change of dissolved inorganic iron",
@@ -2174,10 +2156,11 @@
"ok_max_mean_abs": ""
},
"fbddtdin": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_nitrogen_due_to_biological_processes",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Dissolved Inorganic Nitrogen due to Biological Activity",
"comment": "vertical integral of net biological terms in time rate of change of nitrogen nutrients (e.g. NO3+NH4)",
@@ -2191,10 +2174,11 @@
"ok_max_mean_abs": ""
},
"fbddtdip": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_phosphorus_due_to_biological_processes",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Dissolved Inorganic Phosphorus due to Biological Activity",
"comment": "vertical integral of net biological terms in time rate of change of phosphate",
@@ -2208,10 +2192,11 @@
"ok_max_mean_abs": ""
},
"fbddtdisi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_silicon_due_to_biological_processes",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Dissolved Inorganic Silicon due to Biological Activity",
"comment": "vertical integral of net biological terms in time rate of change of dissolved inorganic silicate",
@@ -2225,10 +2210,11 @@
"ok_max_mean_abs": ""
},
"fddtalk": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "integral_wrt_depth_of_tendency_of_sea_water_alkalinity_expressed_as_mole_equivalent",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Total Alkalinity",
"comment": "vertical integral of net time rate of change of alkalinity",
@@ -2242,10 +2228,11 @@
"ok_max_mean_abs": ""
},
"fddtdic": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_carbon",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Net Dissolved Inorganic Carbon",
"comment": "",
@@ -2259,10 +2246,11 @@
"ok_max_mean_abs": ""
},
"fddtdife": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_iron",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Net Dissolved Inorganic Iron",
"comment": "vertical integral of net time rate of change of dissolved inorganic iron",
@@ -2276,10 +2264,11 @@
"ok_max_mean_abs": ""
},
"fddtdin": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_nitrogen",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Net Dissolved Inorganic Nitrogen",
"comment": "Net time rate of change of nitrogen nutrients (e.g. NO3+NH4)",
@@ -2293,10 +2282,11 @@
"ok_max_mean_abs": ""
},
"fddtdip": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_phosphorus",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Net Dissolved Inorganic Phosphate",
"comment": "vertical integral of net time rate of change of phosphate",
@@ -2310,10 +2300,11 @@
"ok_max_mean_abs": ""
},
"fddtdisi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_silicon",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Net Dissolved Inorganic Silicon",
"comment": "vertical integral of net time rate of change of dissolved inorganic silicate",
@@ -2327,13 +2318,14 @@
"ok_max_mean_abs": ""
},
"fg14co2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "air_sea_flux_of_14CO2",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Total air-sea flux of 14CO2",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "fg14co2",
"type": "",
@@ -2344,10 +2336,11 @@
"ok_max_mean_abs": ""
},
"fg14co2abio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mass_flux_of_abiotic_14_carbon_dioxide_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Surface Downward Flux of Abiotic 14CO2",
"comment": "Gas exchange flux of abiotic 14CO2 (positive into ocean)",
@@ -2361,10 +2354,11 @@
"ok_max_mean_abs": ""
},
"fgco2abio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mass_flux_of_abiotic_carbon_dioxide_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Surface Downward Flux of Abiotic CO2",
"comment": "Gas exchange flux of abiotic CO2 (positive into ocean)",
@@ -2378,10 +2372,11 @@
"ok_max_mean_abs": ""
},
"fgco2nat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mass_flux_of_natural_carbon_dioxide_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Surface Downward Flux of Natural CO2",
"comment": "Gas exchange flux of natural CO2 (positive into ocean)",
@@ -2395,10 +2390,11 @@
"ok_max_mean_abs": ""
},
"fgdms": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_upward_mole_flux_of_dimethyl_sulfide",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Surface Upward Flux of DMS",
"comment": "Gas exchange flux of DMS (positive into atmosphere)",
@@ -2412,10 +2408,11 @@
"ok_max_mean_abs": ""
},
"flandice": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "water_flux_into_sea_water_from_land_ice",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Water flux into Sea Water from Land Ice",
"comment": "Computed as the water flux into the ocean due to land ice (runoff water from surface and base of land ice or melt from base of ice shelf or vertical ice front) into the ocean divided by the area ocean portion of the grid cell",
@@ -2429,10 +2426,11 @@
"ok_max_mean_abs": ""
},
"flashrate": {
+ "frequency": "mon",
"modeling_realm": "atmosChem",
"standard_name": "lightning_flash_rate",
"units": "km-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Lightning Flash Rate",
"comment": "proposed name: lightning_flash_rate (units to be interpreted as 'counts km-2 s-1)",
@@ -2445,11 +2443,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "fracLut": {
+ "frequency": "mon",
+ "modeling_realm": "land",
+ "standard_name": "area_fraction",
+ "units": "%",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "fraction of grid cell for each land use tile",
+ "comment": "end of year values (not annual mean); note that fraction should be reported as fraction of land grid cell (example: frac_lnd = 0.5, frac_ocn = 0.5, frac_crop_lnd = 0.2 (of land portion of grid cell), then frac_lut(crp) = 0.5*0.2 = 0.1)",
+ "dimensions": "longitude latitude landUse time",
+ "out_name": "fracLut",
+ "type": "",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"gppGrass": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "gross_primary_production_of_grass",
+ "standard_name": "gross_primary_productivity_of_biomass_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where natural_grasses (comment: mask=grassFrac)",
"cell_measures": "area: areacella",
"long_name": "gross primary production on grass tiles",
"comment": "Total GPP of grass in the gridcell",
@@ -2463,6 +2480,7 @@
"ok_max_mean_abs": ""
},
"gppLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "gross_primary_productivity_of_biomass_expressed_as_carbon",
"units": "kg m-2 s-1",
@@ -2480,10 +2498,11 @@
"ok_max_mean_abs": ""
},
"gppShrub": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "gross_primary_production_of_shrubs",
+ "standard_name": "gross_primary_productivity_of_biomass_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where shrubs (comment: mask=shrubFrac)",
"cell_measures": "area: areacella",
"long_name": "gross primary production on Shrub tiles",
"comment": "Total GPP of shrubs in the gridcell",
@@ -2497,10 +2516,11 @@
"ok_max_mean_abs": ""
},
"gppTree": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "gross_primary_production_of_trees",
+ "standard_name": "gross_primary_productivity_of_biomass_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where trees (comment: mask=treeFrac)",
"cell_measures": "area: areacella",
"long_name": "gross primary production on tree tiles",
"comment": "Total GPP of trees in the gridcell",
@@ -2514,13 +2534,14 @@
"ok_max_mean_abs": ""
},
"gppc13": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "gross_primary_productivity_of_c13",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Flux of 13C out of Atmosphere due to Gross Primary Production on Land",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "gppc13",
"type": "",
@@ -2531,13 +2552,14 @@
"ok_max_mean_abs": ""
},
"gppc14": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "gross_primary_productivity_of_c14",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Flux of 14C out of Atmosphere due to Gross Primary Production on Land",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "gppc14",
"type": "",
@@ -2548,14 +2570,15 @@
"ok_max_mean_abs": ""
},
"grassFracC3": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "grass_fraction_c3",
+ "standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "C3 grass Area Percentage",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
+ "comment": "Fraction of entire grid cell covered by C3 grass.",
+ "dimensions": "longitude latitude time typec3pft typenatgr",
"out_name": "grassFracC3",
"type": "",
"positive": "",
@@ -2565,14 +2588,15 @@
"ok_max_mean_abs": ""
},
"grassFracC4": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "grass_fraction_c4",
+ "standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "C4 grass Area Percentage",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
+ "comment": "Fraction of entire grid cell covered by C4 grass.",
+ "dimensions": "longitude latitude time typec4pft typenatgr",
"out_name": "grassFracC4",
"type": "",
"positive": "",
@@ -2582,6 +2606,7 @@
"ok_max_mean_abs": ""
},
"grplmxrat27": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_graupel_in_air",
"units": "1.0",
@@ -2590,7 +2615,7 @@
"long_name": "Graupel Mixing Ratio",
"comment": "Graupel mixing ratio",
"dimensions": "longitude latitude plev27 time",
- "out_name": "grplmxrat27",
+ "out_name": "grplmxrat",
"type": "",
"positive": "",
"valid_min": "",
@@ -2599,10 +2624,11 @@
"ok_max_mean_abs": ""
},
"hcont300": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "heat_content_of_ocean_layer",
"units": "m K",
- "cell_methods": "area: time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Heat content of upper 300 meters",
"comment": "Used in PMIP2",
@@ -2616,6 +2642,7 @@
"ok_max_mean_abs": ""
},
"hflsLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upward_latent_heat_flux",
"units": "W m-2",
@@ -2633,6 +2660,7 @@
"ok_max_mean_abs": ""
},
"hfssLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upward_sensible_heat_flux",
"units": "W m-2",
@@ -2650,14 +2678,15 @@
"ok_max_mean_abs": ""
},
"hursminCrop": {
- "modeling_realm": "",
+ "frequency": "mon",
+ "modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean time: minimum within days time: mean over days",
"cell_measures": "area: areacella",
"long_name": "Daily Minimum Near-Surface Relative Humidity over Crop Tile",
"comment": "minimum near-surface (usually, 2 meter) relative humidity (add cell_method attribute 'time: min')",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time height2m",
"out_name": "hursminCrop",
"type": "",
"positive": "",
@@ -2667,6 +2696,7 @@
"ok_max_mean_abs": ""
},
"hus": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
@@ -2684,6 +2714,7 @@
"ok_max_mean_abs": ""
},
"hus27": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
@@ -2692,7 +2723,7 @@
"long_name": "Specific Humidity",
"comment": "",
"dimensions": "longitude latitude plev27 time",
- "out_name": "hus27",
+ "out_name": "hus",
"type": "",
"positive": "",
"valid_min": "",
@@ -2701,6 +2732,7 @@
"ok_max_mean_abs": ""
},
"hussLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "specific_humidity",
"units": "1.0",
@@ -2708,7 +2740,7 @@
"cell_measures": "area: areacella",
"long_name": "near-surface specific humidity on land use tile",
"comment": "Normally, the specific humidity should be reported at the 2 meter height",
- "dimensions": "longitude latitude landUse time",
+ "dimensions": "longitude latitude landUse time height2m",
"out_name": "hussLut",
"type": "",
"positive": "",
@@ -2718,10 +2750,11 @@
"ok_max_mean_abs": ""
},
"intuadse": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "vertical_integral_eastward_wind_by_dry_static_energy",
"units": "1.e6 J m-1 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Vertically integrated Eastward dry transport (cp.T +zg).u (Mass_weighted_vertical integral of the product of northward wind by dry static_energy per mass unit)",
"comment": "Used in PMIP2",
@@ -2735,10 +2768,11 @@
"ok_max_mean_abs": ""
},
"intuaw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "vertical_integral_eastward_wind_by_total_water",
"units": "kg m-1 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Vertically integrated Eastward moisture transport (Mass_weighted_vertical integral of the product of eastward wind by total water mass per unit mass)",
"comment": "Used in PMIP2",
@@ -2752,10 +2786,11 @@
"ok_max_mean_abs": ""
},
"intvadse": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "vertical_integral_northward_wind_by_dry_static_energy",
"units": "1.e6 J m-1 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Vertically integrated Northward dry transport (cp.T +zg).v (Mass_weighted_vertical integral of the product of northward wind by dry static_energy per mass unit)",
"comment": "Used in PMIP2",
@@ -2769,10 +2804,11 @@
"ok_max_mean_abs": ""
},
"intvaw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "vertical_integral_northward_wind_by_total_water",
"units": "kg m-1 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Vertically integrated Northward moisture transport (Mass_weighted_vertical integral of the product of northward wind by total water mass per unit mass)",
"comment": "Used in PMIP2",
@@ -2786,14 +2822,15 @@
"ok_max_mean_abs": ""
},
"irrLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_downward_water_flux_due_to_irrigation",
"units": "kg s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean where landuse",
"cell_measures": "area: areacella",
"long_name": "Irrigation flux including any irrigation for crops, trees, pasture, or urban lawns",
"comment": "",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude landUse time",
"out_name": "irrLut",
"type": "",
"positive": "",
@@ -2803,14 +2840,15 @@
"ok_max_mean_abs": ""
},
"jpdftaureicemodis": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "MODIS Optical Thickness-Particle Size joint distribution, ice",
"comment": "",
- "dimensions": "longitude latitude plev7c effectRadIc|tau time",
+ "dimensions": "longitude latitude plev7c effectRadIc tau time",
"out_name": "jpdftaureicemodis",
"type": "",
"positive": "",
@@ -2820,14 +2858,15 @@
"ok_max_mean_abs": ""
},
"jpdftaureliqmodis": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "MODIS Optical Thickness-Particle Size joint distribution, liquid",
"comment": "",
- "dimensions": "longitude latitude plev7c effectRadLi|tau time",
+ "dimensions": "longitude latitude plev7c effectRadLi tau time",
"out_name": "jpdftaureliqmodis",
"type": "",
"positive": "",
@@ -2837,8 +2876,9 @@
"ok_max_mean_abs": ""
},
"laiLut": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "",
+ "standard_name": "missing",
"units": "1.0",
"cell_methods": "area: time: mean where landuse",
"cell_measures": "area: areacella",
@@ -2853,28 +2893,12 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "lateralCtransfer": {
- "modeling_realm": "land",
- "standard_name": "lateral_carbon_transfer_over_land",
- "units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Lateral transfer of carbon into (positive) or out of (negative) a grid cell.",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
- "out_name": "lateralCtransfer",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"loaddust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_dust_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of Dust",
"comment": "",
@@ -2888,10 +2912,11 @@
"ok_max_mean_abs": ""
},
"loadso4": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_sulfate_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of SO4",
"comment": "",
@@ -2905,10 +2930,11 @@
"ok_max_mean_abs": ""
},
"loadss": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_mass_content_of_seasalt_dry_aerosol",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Load of Seasalt",
"comment": "",
@@ -2921,45 +2947,12 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "lts": {
- "modeling_realm": "atmos",
- "standard_name": "potential_temperature_difference_between_700hPa_and_1000hPa",
- "units": "K",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "lower tropospheric stability",
- "comment": "proposed name: potential_temperature_difference_between_700hPa_and_1000hPa (Lower Tropospheric Stability)",
- "dimensions": "longitude latitude time",
- "out_name": "lts",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "lwp": {
- "modeling_realm": "aerosol",
- "standard_name": "atmosphere_mass_content_of_cloud_liquid_water",
- "units": "kg m-2",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "liquid water path",
- "comment": "",
- "dimensions": "longitude latitude time",
- "out_name": "lwp",
- "type": "float",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"lwsrfasdust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_all_sky_surface_longwave_flux_to_dust_ambient_aerosol_particles",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "All-sky Surface Longwave radiative flux due to Dust",
"comment": "Balkanski - LSCE",
@@ -2973,10 +2966,11 @@
"ok_max_mean_abs": ""
},
"lwsrfcsdust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_clear_sky_surface_longwave_flux_to_dust_ambient_aerosol_particles",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Clear-sky Surface Longwave radiative flux due to Dust",
"comment": "Balkanski - LSCE",
@@ -2990,10 +2984,11 @@
"ok_max_mean_abs": ""
},
"lwtoaasdust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_instantaneous_longwave_forcing",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "all sky lw-rf dust at toa",
"comment": "proposed name: toa_instantaneous_longwave_forcing_due_to_dust_ambient_aerosol",
@@ -3007,10 +3002,11 @@
"ok_max_mean_abs": ""
},
"lwtoacs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_clear_sky_top_of_atmosphere_longwave_flux_to_dust_ambient_aerosol_particles___2D_field_radiative_properties",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Clear-sky TOA Longwave radiative flux due to Dust",
"comment": "Balkanski - LSCE",
@@ -3024,10 +3020,11 @@
"ok_max_mean_abs": ""
},
"lwtoacsaer": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_instantaneous_longwave_forcing",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "clear sky lw-rf aerosols at toa",
"comment": "proposed name: toa_instantaneous_longwave_forcing_due_to_ambient_aerosol_assuming_clear_sky",
@@ -3040,28 +3037,12 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "mcd": {
- "modeling_realm": "atmos",
- "standard_name": "atmosphere_downdraft_convective_mass_flux",
- "units": "kg m-2 s-1",
- "cell_methods": "time: mean",
- "cell_measures": "area: areacella",
- "long_name": "Downdraft Convective Mass Flux",
- "comment": "Calculated as the convective mass flux divided by the area of the whole grid cell (not just the area of the cloud).",
- "dimensions": "longitude latitude alevel time",
- "out_name": "mcd",
- "type": "real",
- "positive": "down",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"md": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_atmosphere_mass_content_of_dust_dry_aerosol_particles_due_to_emission",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Wet diameter mode coarse insoluble",
"comment": "Balkanski - LSCE",
@@ -3075,10 +3056,11 @@
"ok_max_mean_abs": ""
},
"mmraerso4": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_sulfate_dry_aerosol_in_air",
"units": "kg kg-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Aerosol Sulfate Mass Mixing Ratio",
"comment": "",
@@ -3092,10 +3074,11 @@
"ok_max_mean_abs": ""
},
"mmrbc": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_elemental_carbon_dry_aerosol_particles_in_air",
"units": "kg kg-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Elemental carbon mass mixing ratio",
"comment": "",
@@ -3108,28 +3091,12 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "mmrdust": {
- "modeling_realm": "aerosol",
- "standard_name": "mass_fraction_of_dust_dry_aerosol_particles_in_air",
- "units": "kg kg-1",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Dust aerosol mass mixing ratio",
- "comment": "",
- "dimensions": "longitude latitude time",
- "out_name": "mmrdust",
- "type": "float",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"mmrno3": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_nitrate_dry_aerosol_particles_in_air",
"units": "kg kg-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "NO3 aerosol mass mixing ratio",
"comment": "",
@@ -3143,10 +3110,11 @@
"ok_max_mean_abs": ""
},
"mmrss": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "mass_fraction_of_seasalt_dry_aerosol_particles_in_air",
"units": "kg kg-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Sea Salt mass mixing ratio",
"comment": "",
@@ -3160,13 +3128,14 @@
"ok_max_mean_abs": ""
},
"mrlso": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_liquid_water_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Soil Liquid Water Content",
- "comment": "as specified by C4MIP",
+ "comment": "the mass (summed over all all layers) of liquid water.",
"dimensions": "longitude latitude time",
"out_name": "mrlso",
"type": "",
@@ -3177,6 +3146,7 @@
"ok_max_mean_abs": ""
},
"mrroLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "runoff_flux",
"units": "kg m-2 s-1",
@@ -3194,13 +3164,14 @@
"ok_max_mean_abs": ""
},
"mrsfl": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "frozen_moisture_content_of_soil_layer",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Frozen water content of soil layer",
- "comment": "as specified by C4MIP",
+ "comment": "in each soil layer, the mass of water in ice phase. Reported as 'missing' for grid cells occupied entirely by 'sea'",
"dimensions": "longitude latitude sdepth time",
"out_name": "mrsfl",
"type": "",
@@ -3211,13 +3182,14 @@
"ok_max_mean_abs": ""
},
"mrsll": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "liquid_moisture_content_of_soil_layer",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Liquid water content of soil layer",
- "comment": "as specified by C4MIP",
+ "comment": "in each soil layer, the mass of water in liquid phase. Reported as 'missing' for grid cells occupied entirely by 'sea'",
"dimensions": "longitude latitude sdepth time",
"out_name": "mrsll",
"type": "",
@@ -3228,6 +3200,7 @@
"ok_max_mean_abs": ""
},
"mrsoLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_moisture_content",
"units": "kg m-2",
@@ -3245,13 +3218,14 @@
"ok_max_mean_abs": ""
},
"mrsol": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "total_moisture_content_of_soil_layer",
+ "standard_name": "moisture_content_of_soil_layer",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Total water content of soil layer",
- "comment": "as specified by C4MIP",
+ "comment": "in each soil layer, the mass of water in all phases, including ice. Reported as 'missing' for grid cells occupied entirely by 'sea'",
"dimensions": "longitude latitude sdepth time",
"out_name": "mrsol",
"type": "",
@@ -3262,6 +3236,7 @@
"ok_max_mean_abs": ""
},
"mrsosLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "moisture_content_of_soil_layer",
"units": "kg m-2",
@@ -3269,7 +3244,7 @@
"cell_measures": "area: areacella",
"long_name": "Moisture in Upper Portion of Soil Column of land use tile",
"comment": "the mass of water in all phases in a thin surface layer; integrate over uppermost 10cm",
- "dimensions": "longitude latitude landUse time",
+ "dimensions": "longitude latitude landUse time sdepth1",
"out_name": "mrsosLut",
"type": "",
"positive": "",
@@ -3279,13 +3254,14 @@
"ok_max_mean_abs": ""
},
"mrtws": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "total_water_storage",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Total water storage in a grid cell",
- "comment": "as specified by C4MIP",
+ "comment": "Mass of water in all phases and in all components including soil, canopy, vegetation, ice sheets, rivers and ground water.",
"dimensions": "longitude latitude time",
"out_name": "mrtws",
"type": "",
@@ -3296,13 +3272,14 @@
"ok_max_mean_abs": ""
},
"nLand": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "total_land_nitrogen",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Total nitrogen in all terrestrial nitrogen pools",
- "comment": "as specified by C4MIP",
+ "comment": "Report missing data over ocean grid cells. For fractional land report value averaged over the land fraction.",
"dimensions": "longitude latitude time",
"out_name": "nLand",
"type": "",
@@ -3313,6 +3290,7 @@
"ok_max_mean_abs": ""
},
"nLeaf": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "leaf_nitrogen_content",
"units": "kg m-2",
@@ -3330,13 +3308,14 @@
"ok_max_mean_abs": ""
},
"nLitter": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "litter_nitrogen_content",
"units": "kg m-2",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Nitrogen Mass in Litter Pool",
- "comment": "as specified by C4MIP",
+ "comment": "Report missing data over ocean grid cells. For fractional land report value averaged over the land fraction.",
"dimensions": "longitude latitude time",
"out_name": "nLitter",
"type": "",
@@ -3347,6 +3326,7 @@
"ok_max_mean_abs": ""
},
"nLitterCwd": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "litter_wood_debris_nitrogen_content",
"units": "kg m-2",
@@ -3364,6 +3344,7 @@
"ok_max_mean_abs": ""
},
"nLitterSubSurf": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "subsurface_litter_nitrogen_content",
"units": "kg m-2",
@@ -3381,6 +3362,7 @@
"ok_max_mean_abs": ""
},
"nLitterSurf": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_litter_nitrogen_content",
"units": "kg m-2",
@@ -3398,6 +3380,7 @@
"ok_max_mean_abs": ""
},
"nMineral": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "mineral_soil_nitrogen_content",
"units": "kg m-2",
@@ -3415,6 +3398,7 @@
"ok_max_mean_abs": ""
},
"nMineralNH4": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "mineral_nh4_soil_nitrogen_content",
"units": "kg m-2",
@@ -3432,6 +3416,7 @@
"ok_max_mean_abs": ""
},
"nMineralNO3": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "mineral_no3_soil_nitrogen_content",
"units": "kg m-2",
@@ -3449,6 +3434,7 @@
"ok_max_mean_abs": ""
},
"nOther": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "other_vegegtation_components_nitrogen_content",
"units": "kg m-2",
@@ -3466,13 +3452,14 @@
"ok_max_mean_abs": ""
},
"nProduct": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "nitrogen_content_of_products_of_anthropogenic_land_use_change",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Nitrogen Mass in Products of Land Use Change",
- "comment": "as specified by C4MIP",
+ "comment": "Report missing data over ocean grid cells. For fractional land report value averaged over the land fraction.",
"dimensions": "longitude latitude time",
"out_name": "nProduct",
"type": "",
@@ -3483,6 +3470,7 @@
"ok_max_mean_abs": ""
},
"nRoot": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "root_nitrogen_content",
"units": "kg m-2",
@@ -3500,13 +3488,14 @@
"ok_max_mean_abs": ""
},
"nSoil": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_nitrogen_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Nitrogen Mass in Soil Pool",
- "comment": "as specified by C4MIP",
+ "comment": "Report missing data over ocean grid cells. For fractional land report value averaged over the land fraction.",
"dimensions": "longitude latitude time",
"out_name": "nSoil",
"type": "",
@@ -3517,6 +3506,7 @@
"ok_max_mean_abs": ""
},
"nStem": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "stem_nitrogen_content",
"units": "kg m-2",
@@ -3534,13 +3524,14 @@
"ok_max_mean_abs": ""
},
"nVeg": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "vegetation_nitrogen_content",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Nitrogen Mass in Vegetation",
- "comment": "as specified by C4MIP",
+ "comment": "Report missing data over ocean grid cells. For fractional land report value averaged over the land fraction.",
"dimensions": "longitude latitude time",
"out_name": "nVeg",
"type": "",
@@ -3551,6 +3542,7 @@
"ok_max_mean_abs": ""
},
"necbLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_net_downward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_all_land_processes",
"units": "kg m-2 s-1",
@@ -3568,6 +3560,7 @@
"ok_max_mean_abs": ""
},
"nep": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_net_downward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_all_land_processes_excluding_anthropogenic_land_use_change",
"units": "kg m-2 s-1",
@@ -3585,13 +3578,14 @@
"ok_max_mean_abs": ""
},
"netAtmosLandC13Flux": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "net_atmos_to_land_C13_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Net Mass Flux of 13C between atmosphere and land (positive into land) as a result of all processes.",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "netAtmosLandC13Flux",
"type": "",
@@ -3602,13 +3596,14 @@
"ok_max_mean_abs": ""
},
"netAtmosLandC14Flux": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "net_atmos_to_land_C14_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Net Mass Flux of 14C between atmosphere and land (positive into land) as a result of all processes.",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "netAtmosLandC14Flux",
"type": "",
@@ -3619,13 +3614,14 @@
"ok_max_mean_abs": ""
},
"netAtmosLandCO2Flux": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_net_downward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_all_land_processes",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Net flux of CO2 between atmosphere and land (positive into land) as a result of all processes.",
- "comment": "as specified by C4MIP",
+ "comment": "This flux should be reproducible by differencing the sum of all carbon pools (cVeg, cLitter, cSoil, and cProducts or equivalently cLand) from one time step to the next, except in the case of lateral transfer of carbon due to harvest, riverine transport of dissolved organic and/or inorganic carbon, or any other process (in which case the lateral_carbon_transfer_over_land term, see below, will be zero data).",
"dimensions": "longitude latitude time",
"out_name": "netAtmosLandCO2Flux",
"type": "",
@@ -3636,10 +3632,11 @@
"ok_max_mean_abs": ""
},
"nppGrass": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "net_primary_production_of_grass",
+ "standard_name": "net_primary_productivity_of_biomass_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where natural_grasses (comment: mask=grassFrac)",
"cell_measures": "area: areacella",
"long_name": "net primary production on grass tiles",
"comment": "Total NPP of grass in the gridcell",
@@ -3653,6 +3650,7 @@
"ok_max_mean_abs": ""
},
"nppLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "net_primary_productivity_of_biomass_expressed_as_carbon",
"units": "kg m-2 s-1",
@@ -3670,6 +3668,7 @@
"ok_max_mean_abs": ""
},
"nppOther": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "net_primary_production_allocated_to_other",
"units": "kg m-2 s-1",
@@ -3687,10 +3686,11 @@
"ok_max_mean_abs": ""
},
"nppShrub": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "net_primary_production_of_shrubs",
+ "standard_name": "net_primary_productivity_of_biomass_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where shrubs (comment: mask=shrubFrac)",
"cell_measures": "area: areacella",
"long_name": "net primary production on Shrub tiles",
"comment": "Total NPP of shrubs in the gridcell",
@@ -3704,6 +3704,7 @@
"ok_max_mean_abs": ""
},
"nppStem": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "net_primary_production_allocated_to_stem",
"units": "kg m-2 s-1",
@@ -3721,10 +3722,11 @@
"ok_max_mean_abs": ""
},
"nppTree": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "net_primary_production_of_trees",
+ "standard_name": "net_primary_productivity_of_biomass_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where trees (comment: mask=treeFrac)",
"cell_measures": "area: areacella",
"long_name": "net primary production on tree tiles",
"comment": "Total NPP of trees in the gridcell",
@@ -3738,14 +3740,15 @@
"ok_max_mean_abs": ""
},
"nwdFracLut": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "",
+ "standard_name": "missing",
"units": "1",
- "cell_methods": "area: time: mean where landuse",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "fraction of land use tile tile that is non-woody vegetation ( e.g. herbaceous crops)",
"comment": "",
- "dimensions": "longitude latitude landUse time",
+ "dimensions": "longitude latitude landUse time typenwd",
"out_name": "nwdFracLut",
"type": "",
"positive": "",
@@ -3755,10 +3758,11 @@
"ok_max_mean_abs": ""
},
"o2sat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water_at_saturation",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Dissolved Oxygen Concentration at Saturation",
"comment": "",
@@ -3772,10 +3776,11 @@
"ok_max_mean_abs": ""
},
"ocontempdiff": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content_due_to_parameterized_dianeutral_mixing",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content due to parameterized dianeutral mixing",
"comment": "Tendency of heat content for a grid cell from parameterized dianeutral mixing. Reported only for models that use conservative temperature as prognostic field.",
@@ -3789,10 +3794,11 @@
"ok_max_mean_abs": ""
},
"ocontempmint": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "integral_wrt_depth_of_product_of_sea_water_density_and_conservative_temperature",
"units": "degC kg m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "integral wrt depth of product of sea water density and conservative temperature",
"comment": "Full column sum of density*cell thickness*conservative temperature. If the model is Boussinesq, then use Boussinesq reference density for the density factor.",
@@ -3806,10 +3812,11 @@
"ok_max_mean_abs": ""
},
"ocontemppadvect": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content_due_to_parameterized_eddy_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content due to parameterized eddy advection",
"comment": "Tendency of heat content for a grid cell from parameterized eddy advection (any form of eddy advection). Reported only for models that use conservative temperature as prognostic field.",
@@ -3823,10 +3830,11 @@
"ok_max_mean_abs": ""
},
"ocontemppmdiff": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content_due_to_parameterized_mesoscale_diffusion",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content due to parameterized mesoscale diffusion",
"comment": "Tendency of heat content for a grid cell from parameterized mesoscale eddy diffusion. Reported only for models that use conservative temperature as prognostic field.",
@@ -3840,10 +3848,11 @@
"ok_max_mean_abs": ""
},
"ocontemppsmadvect": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content_due_to_parameterized_submesoscale_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content due to parameterized submesoscale advection",
"comment": "Tendency of heat content for a grid cell from parameterized submesoscale eddy advection. Reported only for models that use conservative temperature as prognostic field.",
@@ -3857,10 +3866,11 @@
"ok_max_mean_abs": ""
},
"ocontemprmadvect": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content_due_to_residual_mean_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content due to residual mean (sum of Eulerian + parameterized) advection",
"comment": "",
@@ -3874,10 +3884,11 @@
"ok_max_mean_abs": ""
},
"ocontemptend": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content",
"comment": "Tendency of heat content for a grid cell from all processes. Reported only for models that use conservative temperature as prognostic field.",
@@ -3891,10 +3902,11 @@
"ok_max_mean_abs": ""
},
"od443dust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_optical_thickness_due_to_dust_ambient_aerosol_particles",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Optical thickness at 443 nm Dust",
"comment": "Balkanski - LSCE",
@@ -3907,28 +3919,12 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "od550aer": {
- "modeling_realm": "aerosol",
- "standard_name": "atmosphere_optical_thickness_due_to_ambient_aerosol_particles",
- "units": "1.0",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "ambient aerosol optical thickness at 550 nm",
- "comment": "AOD from the ambient aerosls (i.e., includes aerosol water). Does not include AOD from stratospheric aerosols if these are prescribed but includes other possible background aerosol types. Needs a comment attribute 'wavelength: 550 nm'",
- "dimensions": "longitude latitude time",
- "out_name": "od550aer",
- "type": "float",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"od550aerso": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Stratospheric Optical depth at 550 nm (all aerosols) 2D-field (here we limit the computation of OD to the stratosphere only)",
"comment": "Balkanski - LSCE",
@@ -3942,10 +3938,11 @@
"ok_max_mean_abs": ""
},
"od550aerstrat": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "strat_aerosol_optical_depth",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Stratospheric Aerosol Optical Depth at 550nm",
"comment": "From tropopause to stratopause as defined by the model",
@@ -3959,10 +3956,11 @@
"ok_max_mean_abs": ""
},
"od550so4so": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "missing",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Stratospheric Optical depth at 550 nm (sulphate only) 2D-field (here we limit the computation of OD to the stratosphere only)",
"comment": "Balkanski - LSCE",
@@ -3976,10 +3974,11 @@
"ok_max_mean_abs": ""
},
"od865dust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_optical_thickness_due_to_dust_ambient_aerosol_particles",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Optical thickness at 865 nm Dust",
"comment": "Balkanski - LSCE",
@@ -3993,10 +3992,11 @@
"ok_max_mean_abs": ""
},
"opottempdiff": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content_due_to_parameterized_dianeutral_mixing",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content due to parameterized dianeutral mixing",
"comment": "Tendency of heat content for a grid cell from parameterized dianeutral mixing. Reported only for models that use potential temperature as prognostic field.",
@@ -4010,10 +4010,11 @@
"ok_max_mean_abs": ""
},
"opottempmint": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "integral_wrt_depth_of_product_of_sea_water_density_and_potential_temperature",
"units": "degC kg m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "integral wrt depth of product of sea water density and potential temperature",
"comment": "",
@@ -4027,10 +4028,11 @@
"ok_max_mean_abs": ""
},
"opottemppadvect": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content_due_to_parameterized_eddy_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content due to parameterized eddy advection",
"comment": "Tendency of heat content for a grid cell from parameterized eddy advection (any form of eddy advection). Reported only for models that use potential temperature as prognostic field.",
@@ -4044,10 +4046,11 @@
"ok_max_mean_abs": ""
},
"opottemppmdiff": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content_due_to_parameterized_mesoscale_diffusion",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content due to parameterized mesoscale diffusion",
"comment": "Tendency of heat content for a grid cell from parameterized mesoscale eddy diffusion. Reported only for models that use potential temperature as prognostic field.",
@@ -4061,10 +4064,11 @@
"ok_max_mean_abs": ""
},
"opottemppsmadvect": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content_due_to_parameterized_submesoscale_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content due to parameterized submesoscale advection",
"comment": "Tendency of heat content for a grid cell from parameterized submesoscale eddy advection. Reported only for models that use potential temperature as prognostic field.",
@@ -4078,10 +4082,11 @@
"ok_max_mean_abs": ""
},
"opottemprmadvect": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content_due_to_residual_mean_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content due to residual mean advection",
"comment": "",
@@ -4095,10 +4100,11 @@
"ok_max_mean_abs": ""
},
"opottemptend": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content",
"comment": "Tendency of heat content for a grid cell from all processes. Reported only for models that use potential temperature as prognostic field.",
@@ -4112,10 +4118,11 @@
"ok_max_mean_abs": ""
},
"orog": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_altitude",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Altitude",
"comment": "The surface called 'surface' means the lower boundary of the atmosphere. Altitude is the (geometric) height above the geoid, which is the reference geopotential surface. The geoid is similar to mean sea level.",
@@ -4129,10 +4136,11 @@
"ok_max_mean_abs": ""
},
"osaltdiff": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content_due_to_parameterized_dianeutral_mixing",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content due to parameterized dianeutral mixing",
"comment": "Tendency of salt content for a grid cell from parameterized dianeutral mixing.",
@@ -4146,10 +4154,11 @@
"ok_max_mean_abs": ""
},
"osaltpadvect": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content_due_to_parameterized_eddy_advection",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content due to parameterized eddy advection",
"comment": "Tendency of salt content for a grid cell from parameterized eddy advection (any form of eddy advection).",
@@ -4163,10 +4172,11 @@
"ok_max_mean_abs": ""
},
"osaltpmdiff": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content_due_to_parameterized_mesoscale_diffusion",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content due to parameterized mesoscale diffusion",
"comment": "Tendency of salt content for a grid cell from parameterized mesoscale eddy diffusion.",
@@ -4180,10 +4190,11 @@
"ok_max_mean_abs": ""
},
"osaltpsmadvect": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content_due_to_parameterized_submesoscale_advection",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content due to parameterized submesoscale advection",
"comment": "Tendency of salt content for a grid cell from parameterized submesoscale eddy advection.",
@@ -4197,10 +4208,11 @@
"ok_max_mean_abs": ""
},
"osaltrmadvect": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content_due_to_residual_mean_advection",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content due to residual mean advection",
"comment": "",
@@ -4214,10 +4226,11 @@
"ok_max_mean_abs": ""
},
"osalttend": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content",
"comment": "Tendency of salt content for a grid cell from all processes.",
@@ -4231,10 +4244,11 @@
"ok_max_mean_abs": ""
},
"pabigthetao": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_added_conservative_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sea Water Added Conservative Temperature",
"comment": "",
@@ -4248,6 +4262,7 @@
"ok_max_mean_abs": ""
},
"parasolRefl": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_bidirectional_reflectance",
"units": "1.0",
@@ -4265,14 +4280,15 @@
"ok_max_mean_abs": ""
},
"pastureFracC3": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "pasture_fraction_c3",
- "units": "1",
- "cell_methods": "area: mean where land time: mean",
+ "standard_name": "area_fraction",
+ "units": "%",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
- "long_name": "C3 pasture fraction",
- "comment": "Fraction of entire grid cell covered by C3 pasture",
- "dimensions": "longitude latitude time",
+ "long_name": "C3 Pasture Area Percentage",
+ "comment": "Percentage of entire grid cell covered by C3 pasture",
+ "dimensions": "longitude latitude time typec3pft typepasture",
"out_name": "pastureFracC3",
"type": "",
"positive": "",
@@ -4282,14 +4298,15 @@
"ok_max_mean_abs": ""
},
"pastureFracC4": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "pasture_fraction_c4",
- "units": "1",
- "cell_methods": "area: mean where land time: mean",
+ "standard_name": "area_fraction",
+ "units": "%",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
- "long_name": "C4 pasture fraction",
- "comment": "Fraction of entire grid cell covered by C4 pasture",
- "dimensions": "longitude latitude time",
+ "long_name": "C4 Pasture Area Percentage",
+ "comment": "Percentage of entire grid cell covered by C4 pasture",
+ "dimensions": "longitude latitude time typec4pft typepasture",
"out_name": "pastureFracC4",
"type": "",
"positive": "",
@@ -4299,10 +4316,11 @@
"ok_max_mean_abs": ""
},
"pathetao": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_additional_potential_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "",
"comment": "",
@@ -4315,28 +4333,12 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "pcp": {
- "modeling_realm": "land",
- "standard_name": "total_precipitation_flux",
- "units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Total precipitation",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
- "out_name": "pcp",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"ppcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_calcareous_phytoplankton",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Net Primary Mole Productivity of Carbon by Calcareous Phytoplankton",
"comment": "Primary (organic carbon) production by the calcite-producing phytoplankton component alone",
@@ -4350,10 +4352,11 @@
"ok_max_mean_abs": ""
},
"ppdiat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_diatoms",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Net Primary Organic Carbon Production by Diatoms",
"comment": "Primary (organic carbon) production by the diatom component alone",
@@ -4367,10 +4370,11 @@
"ok_max_mean_abs": ""
},
"ppdiaz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_diazotrophs",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Net Primary Mole Productivity of Carbon by Diazotrophs",
"comment": "Primary (organic carbon) production by the diazotrophic phytoplankton component alone",
@@ -4384,10 +4388,11 @@
"ok_max_mean_abs": ""
},
"ppmisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_miscellaneous_phytoplankton",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Net Primary Organic Carbon Production by Other Phytoplankton",
"comment": "Primary (organic carbon) production by other phytoplankton components alone",
@@ -4401,10 +4406,11 @@
"ok_max_mean_abs": ""
},
"pppico": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_picophytoplankton",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Net Primary Mole Productivity of Carbon by Picophytoplankton",
"comment": "Primary (organic carbon) production by the picophytoplankton (<2 um) component alone",
@@ -4418,10 +4424,11 @@
"ok_max_mean_abs": ""
},
"prCrop": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Precipitation over Crop Tile",
"comment": "includes both liquid and solid phases",
@@ -4435,10 +4442,11 @@
"ok_max_mean_abs": ""
},
"prbigthetao": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_redistributed_conservative_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sea Water Redistributed Conservative Temperature",
"comment": "",
@@ -4452,6 +4460,7 @@
"ok_max_mean_abs": ""
},
"prhmax": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
@@ -4469,10 +4478,11 @@
"ok_max_mean_abs": ""
},
"prthetao": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_redistributed_potential_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "",
"comment": "",
@@ -4486,16 +4496,17 @@
"ok_max_mean_abs": ""
},
"ps": {
- "modeling_realm": "",
+ "frequency": "mon",
+ "modeling_realm": "atmos",
"standard_name": "surface_air_pressure",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Air Pressure",
"comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
"dimensions": "longitude latitude time",
"out_name": "ps",
- "type": "",
+ "type": "real",
"positive": "",
"valid_min": "",
"valid_max": "",
@@ -4503,10 +4514,11 @@
"ok_max_mean_abs": ""
},
"raGrass": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "autotrophic_respiration_of_grass",
+ "standard_name": "plant_respiration_carbon_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where natural_grasses (comment: mask=grassFrac)",
"cell_measures": "area: areacella",
"long_name": "autotrophic respiration on grass tiles",
"comment": "Total RA of grass in the gridcell",
@@ -4520,6 +4532,7 @@
"ok_max_mean_abs": ""
},
"raLeaf": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "autotrophic_respiration_from_leaves",
"units": "kg m-2 s-1",
@@ -4537,6 +4550,7 @@
"ok_max_mean_abs": ""
},
"raLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "plant_respiration_carbon_flux",
"units": "kg m-2 s-1",
@@ -4554,8 +4568,9 @@
"ok_max_mean_abs": ""
},
"raOther": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "autotrophic_respiration_from_other",
+ "standard_name": "autotrophic_respiration",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
@@ -4571,6 +4586,7 @@
"ok_max_mean_abs": ""
},
"raRoot": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "autotrophic_respiration_from_roots",
"units": "kg m-2 s-1",
@@ -4588,10 +4604,11 @@
"ok_max_mean_abs": ""
},
"raShrub": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "autotrophic_respiration_of_shrubs",
+ "standard_name": "plant_respiration_carbon_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where shrubs (comment: mask=shrubFrac)",
"cell_measures": "area: areacella",
"long_name": "autotrophic respiration on Shrub tiles",
"comment": "Total RA of shrubs in the gridcell",
@@ -4605,6 +4622,7 @@
"ok_max_mean_abs": ""
},
"raStem": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "autotrophic_respiration_from_stem",
"units": "kg m-2 s-1",
@@ -4622,10 +4640,11 @@
"ok_max_mean_abs": ""
},
"raTree": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "autotrophic_respiration_of_trees",
+ "standard_name": "plant_respiration_carbon_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where trees (comment: mask=treeFrac)",
"cell_measures": "area: areacella",
"long_name": "autotrophic respiration on tree tiles",
"comment": "Total RA of trees in the gridcell",
@@ -4639,13 +4658,14 @@
"ok_max_mean_abs": ""
},
"rac13": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "plant_respiration_c13_flux",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Flux of 13C into Atmosphere due to Autotrophic (Plant) Respiration on Land",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "rac13",
"type": "",
@@ -4656,13 +4676,14 @@
"ok_max_mean_abs": ""
},
"rac14": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "plant_respiration_c14_flux",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Flux of 14C into Atmosphere due to Autotrophic (Plant) Respiration on Land",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "rac14",
"type": "",
@@ -4673,6 +4694,7 @@
"ok_max_mean_abs": ""
},
"rainmxrat27": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_rain_in_air",
"units": "1.0",
@@ -4681,7 +4703,7 @@
"long_name": "rain_mixing_ratio",
"comment": "Rain mixing ratio",
"dimensions": "longitude latitude plev27 time",
- "out_name": "rainmxrat27",
+ "out_name": "rainmxrat",
"type": "",
"positive": "",
"valid_min": "",
@@ -4690,10 +4712,11 @@
"ok_max_mean_abs": ""
},
"reffclic": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_convective_cloud_ice_particle",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Convective Cloud Ice",
"comment": "This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell).",
@@ -4707,10 +4730,11 @@
"ok_max_mean_abs": ""
},
"reffclis": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_stratiform_cloud_ice_particle",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Stratiform Cloud Ice",
"comment": "This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell).",
@@ -4724,10 +4748,11 @@
"ok_max_mean_abs": ""
},
"reffclwc": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_convective_cloud_liquid_water_particle",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Convective Cloud Liquid Water",
"comment": "Droplets are liquid. The effective radius is defined as the ratio of the third moment over the second moment of the particle size distribution and the time-mean should be calculated, weighting the individual samples by the cloudy fraction of the grid cell.",
@@ -4741,10 +4766,11 @@
"ok_max_mean_abs": ""
},
"reffclws": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_stratiform_cloud_liquid_water_particle",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Hydrometeor Effective Radius of Stratiform Cloud Liquid Water",
"comment": "Droplets are liquid. The effective radius is defined as the ratio of the third moment over the second moment of the particle size distribution and the time-mean should be calculated, weighting the individual samples by the cloudy fraction of the grid cell.",
@@ -4758,10 +4784,11 @@
"ok_max_mean_abs": ""
},
"rhGrass": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "heterotrophic_respiration_of_grass",
+ "standard_name": "heterotrophic_respiration_carbon_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where natural_grasses (comment: mask=grassFrac)",
"cell_measures": "area: areacella",
"long_name": "heterotrophic respiration on grass tiles",
"comment": "Total RH of grass in the gridcell",
@@ -4775,6 +4802,7 @@
"ok_max_mean_abs": ""
},
"rhLitter": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "heterotrophic_respiration_carbon_flux_from_litter",
"units": "kg m-2 s-1",
@@ -4792,6 +4820,7 @@
"ok_max_mean_abs": ""
},
"rhLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "heterotrophic_respiration_carbon_flux",
"units": "kg m-2 s-1",
@@ -4809,10 +4838,11 @@
"ok_max_mean_abs": ""
},
"rhShrub": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "heterotrophic_respiration_of_shrubs",
+ "standard_name": "heterotrophic_respiration_carbon_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where shrubs (comment: mask=shrubFrac)",
"cell_measures": "area: areacella",
"long_name": "heterotrophic respiration on Shrub tiles",
"comment": "Total RH of shrubs in the gridcell",
@@ -4826,6 +4856,7 @@
"ok_max_mean_abs": ""
},
"rhSoil": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "heterotrophic_respiration_carbon_flux_from_soil",
"units": "kg m-2 s-1",
@@ -4843,10 +4874,11 @@
"ok_max_mean_abs": ""
},
"rhTree": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "heterotrophic_respiration_of_trees",
+ "standard_name": "heterotrophic_respiration_carbon_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where trees (comment: mask=treeFrac)",
"cell_measures": "area: areacella",
"long_name": "heterotrophic respiration on tree tiles",
"comment": "Total RH of trees in the gridcell",
@@ -4860,13 +4892,14 @@
"ok_max_mean_abs": ""
},
"rhc13": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "heterotrophic_respiration_c13_flux",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Flux of 13C into Atmosphere due to Heterotrophic Respiration on Land",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "rhc13",
"type": "",
@@ -4877,13 +4910,14 @@
"ok_max_mean_abs": ""
},
"rhc14": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "heterotrophic_respiration_c14_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass Flux of 14C into Atmosphere due to Heterotrophic Respiration on Land",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "rhc14",
"type": "",
@@ -4894,10 +4928,11 @@
"ok_max_mean_abs": ""
},
"rls": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_net_downward_longwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Net Longwave Surface Radiation",
"comment": "Net longwave surface radiation",
@@ -4911,6 +4946,7 @@
"ok_max_mean_abs": ""
},
"rlusLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -4928,10 +4964,11 @@
"ok_max_mean_abs": ""
},
"rsdoabsorb": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "net_rate_of_absorption_of_shortwave_energy_in_ocean_layer",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "net rate of absorption of shortwave energy in ocean layer",
"comment": "",
@@ -4945,10 +4982,11 @@
"ok_max_mean_abs": ""
},
"rsdscsdiff": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_diffuse_downwelling_shortwave_flux_in_air_assuming_clear_sky",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Diffuse Downwelling Clear Sky Shortwave Radiation",
"comment": "",
@@ -4962,10 +5000,11 @@
"ok_max_mean_abs": ""
},
"rsdsdiff": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_diffuse_downwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Diffuse Downwelling Shortwave Radiation",
"comment": "",
@@ -4979,10 +5018,11 @@
"ok_max_mean_abs": ""
},
"rss": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_net_downward_shortwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Net Shortwave Surface Radiation",
"comment": "Net downward shortwave radiation at the surface",
@@ -4996,6 +5036,7 @@
"ok_max_mean_abs": ""
},
"rsusLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upwelling_shortwave_flux_in_air",
"units": "W m-2",
@@ -5012,45 +5053,12 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "rsutna": {
- "modeling_realm": "atmos",
- "standard_name": "toa_outgoing_shortwave_flux_no_aerosol",
- "units": "W m-2",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "TOA Outgoing Clean-Sky Shortwave Radiation",
- "comment": "Based on Ghan (2013, ACP)",
- "dimensions": "longitude latitude time",
- "out_name": "rsutna",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
- "rsutnacs": {
- "modeling_realm": "atmos",
- "standard_name": "toa_outgoing_shortwave_flux_no_aerosol_assuming_clear_sky",
- "units": "W m-2",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "TOA Outgoing Clean-Sky Clear-Sky Shortwave Radiation",
- "comment": "Based on Ghan (2013, ACP)",
- "dimensions": "longitude latitude time",
- "out_name": "rsutnacs",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"sconcdust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_concentration_of_dust_dry_aerosol_in_air",
"units": "kg m-3",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Concentration of Dust",
"comment": "mass concentration of dust dry aerosol in air in model lowest layer",
@@ -5064,10 +5072,11 @@
"ok_max_mean_abs": ""
},
"sconcso4": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_concentration_of_sulfate_dry_aerosol_in_air",
"units": "kg m-3",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Concentration of SO4",
"comment": "mass concentration of sulfate dry aerosol in air in model lowest layer.",
@@ -5081,10 +5090,11 @@
"ok_max_mean_abs": ""
},
"sconcss": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_concentration_of_seasalt_dry_aerosol_in_air",
"units": "kg m-3",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Concentration of Seasalt",
"comment": "mass concentration of seasalt dry aerosol in air in model lowest layer",
@@ -5098,10 +5108,11 @@
"ok_max_mean_abs": ""
},
"sedustCI": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_atmosphere_mass_content_of_dust_dry_aerosol_particles_due_to_sedimentation",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Sedimentation Flux of dust mode coarse insoluble",
"comment": "Balkanski - LSCE",
@@ -5115,14 +5126,15 @@
"ok_max_mean_abs": ""
},
"sfcWindmax": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "wind_speed",
"units": "m s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Daily Maximum Near-Surface Wind Speed",
"comment": "Daily maximum near-surface (usually, 10 meters) wind speed.",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time height10m",
"out_name": "sfcWindmax",
"type": "real",
"positive": "",
@@ -5131,24 +5143,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "sithick": {
- "modeling_realm": "seaIce ocean",
- "standard_name": "sea_ice_thickness",
- "units": "m",
- "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)",
- "cell_measures": "area: areacella",
- "long_name": "Sea Ice Thickness",
- "comment": "Actual (floe) thickness of sea ice (NOT volume divided by grid area as was done in CMIP5)",
- "dimensions": "longitude latitude time",
- "out_name": "sithick",
- "type": "real",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"snowmxrat27": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "mass_fraction_of_snow_in_air",
"units": "1.0",
@@ -5157,7 +5153,7 @@
"long_name": "snow_mixing_ratio",
"comment": "Snow mixing ratio",
"dimensions": "longitude latitude plev27 time",
- "out_name": "snowmxrat27",
+ "out_name": "snowmxrat",
"type": "",
"positive": "",
"valid_min": "",
@@ -5166,10 +5162,11 @@
"ok_max_mean_abs": ""
},
"somint": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "integral_wrt_depth_of_product_of_sea_water_density_and_prognostic_salinity",
"units": "1e-3 kg m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "integral wrt depth of product of sea water density and salinity",
"comment": "Full column sum of density*cell thickness*prognostic salinity. If the model is Boussinesq, then use Boussinesq reference density for the density factor.",
@@ -5183,8 +5180,9 @@
"ok_max_mean_abs": ""
},
"sweLut": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "",
+ "standard_name": "missing",
"units": "m",
"cell_methods": "area: time: mean where landuse",
"cell_measures": "area: areacella",
@@ -5200,10 +5198,11 @@
"ok_max_mean_abs": ""
},
"swsrfasdust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_all_sky_surface_shortwave_flux_due_to_dust_ambient_aerosol_particles",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "All-sky Surface Shortwave radiative flux due to Dust",
"comment": "Balkanski - LSCE",
@@ -5217,10 +5216,11 @@
"ok_max_mean_abs": ""
},
"swsrfcsdust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_clear_sky_surface_shortwave_flux_due_to_dust_ambient_aerosol_particles",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Clear-sky Surface Shortwave radiative flux due to Dust",
"comment": "Balkanski - LSCE",
@@ -5234,10 +5234,11 @@
"ok_max_mean_abs": ""
},
"swtoaasdust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_instantaneous_shortwave_forcing",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "all sky sw-rf dust at toa",
"comment": "proposed name: toa_instantaneous_shortwave_forcing_due_to_dust_ambient_aerosol",
@@ -5251,10 +5252,11 @@
"ok_max_mean_abs": ""
},
"swtoacsdust": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "toa_instantaneous_shortwave_forcing",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "clear sky sw-rf dust at toa",
"comment": "proposed name: toa_instantaneous_shortwave_forcing_due_to_dust_ambient_aerosol_assuming_clear_sky",
@@ -5268,10 +5270,11 @@
"ok_max_mean_abs": ""
},
"t2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "square_of_air_temperature",
"units": "K2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "square_of_air_temperature",
"comment": "Air temperature squared",
@@ -5285,11 +5288,12 @@
"ok_max_mean_abs": ""
},
"t20d": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "depth_of_isosurface_of_sea_water_potential_temperature",
"units": "m",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: mean where sea time: mean",
+ "cell_measures": "area: areacello",
"long_name": "20C isotherm depth",
"comment": "",
"dimensions": "longitude latitude time",
@@ -5302,6 +5306,7 @@
"ok_max_mean_abs": ""
},
"tSoilPools": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_carbon_turnover_rate_by_pool",
"units": "s-1",
@@ -5319,6 +5324,7 @@
"ok_max_mean_abs": ""
},
"ta27": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
@@ -5327,7 +5333,7 @@
"long_name": "Air Temperature",
"comment": "Air Temperature",
"dimensions": "longitude latitude plev27 time",
- "out_name": "ta27",
+ "out_name": "ta",
"type": "",
"positive": "",
"valid_min": "",
@@ -5336,6 +5342,7 @@
"ok_max_mean_abs": ""
},
"tasLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "air_temperature",
"units": "K",
@@ -5343,7 +5350,7 @@
"cell_measures": "area: areacella",
"long_name": "near-surface air temperature (2m above displacement height, i.e. t_ref) on land use tile",
"comment": "",
- "dimensions": "longitude latitude landUse time",
+ "dimensions": "longitude latitude landUse time height2m",
"out_name": "tasLut",
"type": "",
"positive": "",
@@ -5353,14 +5360,15 @@
"ok_max_mean_abs": ""
},
"tasmaxCrop": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean time: maximum within days time: mean over days",
"cell_measures": "area: areacella",
"long_name": "Daily Maximum Near-Surface Air Temperature over Crop Tile",
"comment": "maximum near-surface (usually, 2 meter) air temperature (add cell_method attribute 'time: max')",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time height2m",
"out_name": "tasmaxCrop",
"type": "",
"positive": "",
@@ -5370,14 +5378,15 @@
"ok_max_mean_abs": ""
},
"tasminCrop": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean time: minimum within days time: mean over days",
"cell_measures": "area: areacella",
"long_name": "Daily Minimum Near-Surface Air Temperature over Crop Tile",
"comment": "minimum near-surface (usually, 2 meter) air temperature (add cell_method attribute 'time: min')",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time height2m",
"out_name": "tasminCrop",
"type": "",
"positive": "",
@@ -5387,10 +5396,11 @@
"ok_max_mean_abs": ""
},
"tdps": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "dew_point_temperature",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "2m dewpoint temperature",
"comment": "",
@@ -5404,10 +5414,11 @@
"ok_max_mean_abs": ""
},
"thetaot": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_potential_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Vertically Averaged Sea Water Potential Temperature",
"comment": "Vertical average of the sea water potential temperature through the whole ocean depth",
@@ -5421,10 +5432,11 @@
"ok_max_mean_abs": ""
},
"thetaot2000": {
+ "frequency": "mon",
"modeling_realm": "ocean",
- "standard_name": "thetaot2000",
+ "standard_name": "sea_water_potential_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Depth average potential temperature of upper 2000m",
"comment": "Upper 2000m, 2D field",
@@ -5438,10 +5450,11 @@
"ok_max_mean_abs": ""
},
"thetaot300": {
+ "frequency": "mon",
"modeling_realm": "ocean",
- "standard_name": "thetaot300",
+ "standard_name": "sea_water_potential_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Depth average potential temperature of upper 300m",
"comment": "Upper 300m, 2D field",
@@ -5455,10 +5468,11 @@
"ok_max_mean_abs": ""
},
"thetaot700": {
+ "frequency": "mon",
"modeling_realm": "ocean",
- "standard_name": "thetaot700",
+ "standard_name": "sea_water_potential_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Depth average potential temperature of upper 700m",
"comment": "Upper 700m, 2D field",
@@ -5472,10 +5486,11 @@
"ok_max_mean_abs": ""
},
"tnhuspbl": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_boundary_layer_mixing",
"units": "s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Specific Humidity Due to Boundary Layer Mixing",
"comment": "Includes all boundary layer terms including diffusive terms.",
@@ -5489,10 +5504,11 @@
"ok_max_mean_abs": ""
},
"tnhusscp": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_stratiform_clouds_and_precipitation",
"units": "s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Specific Humidity Due to Stratiform Clouds and Precipitation",
"comment": "",
@@ -5506,10 +5522,11 @@
"ok_max_mean_abs": ""
},
"tntd": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_numerical_diffusion",
"units": "K s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature due to Numerical Diffusion",
"comment": "This includes any horizontal or vertical numerical temperature diffusion not associated with the parametrized moist physics or the resolved dynamics. For example, any vertical diffusion which is part of the boundary layer mixing scheme should be excluded, as should any diffusion which is included in the terms from the resolved dynamics. This term is required to check the closure of the temperature budget.",
@@ -5523,6 +5540,7 @@
"ok_max_mean_abs": ""
},
"tntmp27": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_model_physics",
"units": "K s-1",
@@ -5531,7 +5549,7 @@
"long_name": "Tendency of Air Temperature due to Model Physics",
"comment": "Tendency of air temperature due to model physics. This includes sources and sinks from parametrized physics (e.g. radiation, convection, boundary layer, stratiform condensation/evaporation, etc.). It excludes sources and sinks from resolved dynamics and numerical diffusion not associated with parametrized physics. For example, any vertical diffusion which is part of the boundary layer mixing scheme should be included, while numerical diffusion applied in addition [...]
"dimensions": "longitude latitude plev27 time",
- "out_name": "tntmp27",
+ "out_name": "tntmp",
"type": "real",
"positive": "",
"valid_min": "",
@@ -5540,10 +5558,11 @@
"ok_max_mean_abs": ""
},
"tntpbl": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_boundary_layer_mixing",
"units": "K s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature Due to Boundary Layer Mixing",
"comment": "Includes all boundary layer terms including diffusive terms.",
@@ -5557,6 +5576,7 @@
"ok_max_mean_abs": ""
},
"tntrl27": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_air_temperature_due_to_longwave_heating",
"units": "K s-1",
@@ -5565,7 +5585,7 @@
"long_name": "Longwave heating rate",
"comment": "Tendency of air temperature due to longwave radiative heating",
"dimensions": "longitude latitude plev27 time",
- "out_name": "tntrl27",
+ "out_name": "tntrl",
"type": "float",
"positive": "",
"valid_min": "",
@@ -5574,10 +5594,11 @@
"ok_max_mean_abs": ""
},
"tntrlcs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky",
"units": "K s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature due to Clear Sky Longwave Radiative Heating",
"comment": "Tendency of Air Temperature due to Clear Sky Longwave Radiative Heating",
@@ -5591,6 +5612,7 @@
"ok_max_mean_abs": ""
},
"tntrs27": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_air_temperature_due_to_shortwave_heating",
"units": "K s-1",
@@ -5599,7 +5621,7 @@
"long_name": "Shortwave heating rate",
"comment": "Tendency of air temperature due to shortwave radiative heating",
"dimensions": "longitude latitude plev27 time",
- "out_name": "tntrs27",
+ "out_name": "tntrs",
"type": "float",
"positive": "",
"valid_min": "",
@@ -5608,10 +5630,11 @@
"ok_max_mean_abs": ""
},
"tntrscs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky",
"units": "K s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature due to Clear Sky Shortwave Radiative Heating",
"comment": "Tendency of Air Temperature due to Clear Sky Shortwave Radiative Heating",
@@ -5625,10 +5648,11 @@
"ok_max_mean_abs": ""
},
"tntscp": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_stratiform_clouds_and_precipitation",
"units": "K s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature Due to Stratiform Clouds and Precipitation",
"comment": "",
@@ -5642,10 +5666,11 @@
"ok_max_mean_abs": ""
},
"tomint": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "integral_wrt_depth_of_product_of_sea_water_density_and_prognostic_temperature",
"units": "1e-3 kg m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "integral wrt depth of product of sea water density and prognostic temperature",
"comment": "Full column sum of density*cell thickness*prognostic temperature. If the model is Boussinesq, then use Boussinesq reference density for the density factor.",
@@ -5659,14 +5684,15 @@
"ok_max_mean_abs": ""
},
"treeFracBdlDcd": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "tree_fraction_broadleaf_deciduous",
+ "standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Broadleaf deciduous tree fraction",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
+ "comment": "This is the fraction of the entire grid cell that is covered by broadleaf deciduous trees.",
+ "dimensions": "longitude latitude time typetreebd",
"out_name": "treeFracBdlDcd",
"type": "",
"positive": "",
@@ -5676,14 +5702,15 @@
"ok_max_mean_abs": ""
},
"treeFracBdlEvg": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "tree_fraction_broadleaf_evergreen",
+ "standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Broadleaf evergreen tree fraction",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
+ "comment": "This is the fraction of the entire grid cell that is covered by broadleaf evergreen trees.",
+ "dimensions": "longitude latitude time typetreebe",
"out_name": "treeFracBdlEvg",
"type": "",
"positive": "",
@@ -5693,14 +5720,15 @@
"ok_max_mean_abs": ""
},
"treeFracNdlDcd": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "tree_fraction_needleleaf_deciduous",
+ "standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Needleleaf deciduous tree fraction",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
+ "comment": "This is the fraction of the entire grid cell that is covered by needleleaf deciduous trees.",
+ "dimensions": "longitude latitude time typetreend",
"out_name": "treeFracNdlDcd",
"type": "",
"positive": "",
@@ -5710,14 +5738,15 @@
"ok_max_mean_abs": ""
},
"treeFracNdlEvg": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "tree_fraction_needleleaf_evergreen",
+ "standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Needleleaf evergreen tree fraction",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
+ "comment": "This is the fraction of the entire grid cell that is covered by needleleaf evergreen trees.",
+ "dimensions": "longitude latitude time typetreene",
"out_name": "treeFracNdlEvg",
"type": "",
"positive": "",
@@ -5727,6 +5756,7 @@
"ok_max_mean_abs": ""
},
"tslsiLut": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_temperature",
"units": "K",
@@ -5744,10 +5774,11 @@
"ok_max_mean_abs": ""
},
"twap": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "product_of_omega_and_air_temperature",
"units": "K Pa s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "air_temperature_times_omega",
"comment": "Product of air temperature and pressure tendency",
@@ -5761,10 +5792,11 @@
"ok_max_mean_abs": ""
},
"u2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "square_of_eastward_wind",
"units": "m2 s-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "square_of_eastward_wind",
"comment": "u*u",
@@ -5778,6 +5810,7 @@
"ok_max_mean_abs": ""
},
"ua27": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -5786,7 +5819,7 @@
"long_name": "Eastward Wind",
"comment": "",
"dimensions": "longitude latitude plev27 time",
- "out_name": "ua27",
+ "out_name": "ua",
"type": "",
"positive": "",
"valid_min": "",
@@ -5795,10 +5828,11 @@
"ok_max_mean_abs": ""
},
"uqint": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "integral_of_product_of_eastward_wind_and_specific_humidity_wrt_height",
"units": "m2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "integrated_eastward_wind_times_humidity",
"comment": "Column integrated eastward wind times specific humidity",
@@ -5812,10 +5846,11 @@
"ok_max_mean_abs": ""
},
"ut": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "product_of_eastward_wind_and_air_temperature",
"units": "K m s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "air_temperature_times_eastward_wind",
"comment": "Product of air temperature and eastward wind",
@@ -5829,6 +5864,7 @@
"ok_max_mean_abs": ""
},
"utendnogw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_eastward_wind_due_to_nonorographic_gravity_wave_drag",
"units": "m s-2",
@@ -5846,6 +5882,7 @@
"ok_max_mean_abs": ""
},
"utendogw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_eastward_wind_due_to_orographic_gravity_wave_drag",
"units": "m s-2",
@@ -5863,10 +5900,11 @@
"ok_max_mean_abs": ""
},
"uv": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "product_of_eastward_wind_and_northward_wind",
"units": "m2 s-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "eastward_wind_times_northward_wind",
"comment": "u*v",
@@ -5880,10 +5918,11 @@
"ok_max_mean_abs": ""
},
"uwap": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "product_of_eastward_wind_and_omega",
"units": "Pa m s-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "eastward_wind_times_omega",
"comment": "u*omega",
@@ -5897,10 +5936,11 @@
"ok_max_mean_abs": ""
},
"v2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "square_of_northward_wind",
"units": "m2 s-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "square_of_northwardwind",
"comment": "v*v",
@@ -5914,6 +5954,7 @@
"ok_max_mean_abs": ""
},
"va27": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -5922,7 +5963,7 @@
"long_name": "Northward Wind",
"comment": "",
"dimensions": "longitude latitude plev27 time",
- "out_name": "va27",
+ "out_name": "va",
"type": "",
"positive": "",
"valid_min": "",
@@ -5930,32 +5971,16 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "vas": {
- "modeling_realm": "atmos",
- "standard_name": "northward_wind",
- "units": "m s-1",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
- "long_name": "Northward Near-Surface Wind",
- "comment": "Northward component of the near surface wind",
- "dimensions": "longitude latitude time",
- "out_name": "vas",
- "type": "real",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"vegFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "total_vegetated_fraction",
+ "standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Total vegetated fraction",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
+ "comment": "fraction of grid cell that is covered by vegetation.This SHOULD be the sum of tree, grass, crop and shrub fractions.",
+ "dimensions": "longitude latitude time typeveg",
"out_name": "vegFrac",
"type": "",
"positive": "",
@@ -5965,16 +5990,17 @@
"ok_max_mean_abs": ""
},
"vegHeight": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "canopy_height",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
- "long_name": "Vegetation height averaged over all vegetation types and over the vegetated fraction of a grid cell.",
- "comment": "as specified by C4MIP",
+ "long_name": "canopy height",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "vegHeight",
- "type": "",
+ "type": "float",
"positive": "",
"valid_min": "",
"valid_max": "",
@@ -5982,13 +6008,14 @@
"ok_max_mean_abs": ""
},
"vegHeightCrop": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "canopy_height",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean where crops (comment: mask=cropFrac)",
"cell_measures": "area: areacella",
"long_name": "Vegetation height averaged over the crop fraction of a grid cell.",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "vegHeightCrop",
"type": "",
@@ -5999,13 +6026,14 @@
"ok_max_mean_abs": ""
},
"vegHeightGrass": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "canopy_height",
"units": "m",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where natural_grasses (comment: mask=grassFrac)",
"cell_measures": "area: areacella",
"long_name": "Vegetation height averaged over the grass fraction of a grid cell.",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "vegHeightGrass",
"type": "",
@@ -6016,8 +6044,9 @@
"ok_max_mean_abs": ""
},
"vegHeightPasture": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "pasture_vegetation_height",
+ "standard_name": "canopy_height",
"units": "m",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
@@ -6033,13 +6062,14 @@
"ok_max_mean_abs": ""
},
"vegHeightShrub": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "canopy_height",
"units": "m",
- "cell_methods": "area: mean where land time: mean",
+ "cell_methods": "area: time: mean where shrubs (comment: mask=shrubFrac)",
"cell_measures": "area: areacella",
"long_name": "Vegetation height averaged over the shrub fraction of a grid cell.",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "vegHeightShrub",
"type": "",
@@ -6050,13 +6080,14 @@
"ok_max_mean_abs": ""
},
"vegHeightTree": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "canopy_height",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean where trees (comment: mask=treeFrac)",
"cell_measures": "area: areacella",
"long_name": "Vegetation height averaged over the tree fraction of a grid cell.",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "vegHeightTree",
"type": "",
@@ -6067,10 +6098,11 @@
"ok_max_mean_abs": ""
},
"vqint": {
+ "frequency": "mon",
"modeling_realm": "atmos",
- "standard_name": "",
+ "standard_name": "integral_of_product_of_northward_wind_and_specific_humidity_wrt_height",
"units": "m2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "integrated_northward_wind_times_humidity",
"comment": "Column integrated northward wind times specific humidity",
@@ -6084,10 +6116,11 @@
"ok_max_mean_abs": ""
},
"vt": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "product_of_northward_wind_and_air_temperature",
"units": "K m s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "air_temperature_times_northward_wind",
"comment": "Product of air temperature and northward wind",
@@ -6101,6 +6134,7 @@
"ok_max_mean_abs": ""
},
"vtendnogw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_northward_wind_due_to_nonorographic_gravity_wave_drag",
"units": "m s-2",
@@ -6118,6 +6152,7 @@
"ok_max_mean_abs": ""
},
"vtendogw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_northward_wind_due_to_orographic_gravity_wave_drag",
"units": "m s-2",
@@ -6135,10 +6170,11 @@
"ok_max_mean_abs": ""
},
"vwap": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "product_of_northward_wind_and_omega",
"units": "Pa m s-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "northward_wind_times_omega",
"comment": "v*omega",
@@ -6152,10 +6188,11 @@
"ok_max_mean_abs": ""
},
"wap": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "omega (=dp/dt)",
"comment": "Omega (vertical velocity in pressure coordinates, positive downwards)",
@@ -6169,10 +6206,11 @@
"ok_max_mean_abs": ""
},
"wap2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "square_of_lagrangian_tendency_of_air_pressure",
"units": "Pa2 s-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "square_of_omega",
"comment": "omega*omega",
@@ -6186,6 +6224,7 @@
"ok_max_mean_abs": ""
},
"waterDpth": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "water_table_depth",
"units": "m",
@@ -6203,13 +6242,14 @@
"ok_max_mean_abs": ""
},
"wetlandCH4": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "wetland_methane_emissions",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Grid averaged methane emissions from wetlands",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "wetlandCH4",
"type": "",
@@ -6220,6 +6260,7 @@
"ok_max_mean_abs": ""
},
"wetlandCH4cons": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "wetland_methane_consumption",
"units": "kg m-2 s-1",
@@ -6237,6 +6278,7 @@
"ok_max_mean_abs": ""
},
"wetlandCH4prod": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "wetland_methane_production",
"units": "kg m-2 s-1",
@@ -6254,14 +6296,15 @@
"ok_max_mean_abs": ""
},
"wetlandFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "wetland_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Fraction of a grid cell covered by wetland.",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude time",
+ "comment": "Report only one year if specified fraction is used, or time series if values are determined dynamically.",
+ "dimensions": "longitude latitude time typewetla",
"out_name": "wetlandFrac",
"type": "",
"positive": "",
@@ -6271,10 +6314,11 @@
"ok_max_mean_abs": ""
},
"xgwdparam": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_eastward_stress_due_to_gravity_wave_drag",
"units": "Pa",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "x_gravity_wave_drag_param",
"comment": "Parameterised x-component of gravity wave drag",
@@ -6288,10 +6332,11 @@
"ok_max_mean_abs": ""
},
"ygwdparam": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_northward_stress_due_to_gravity_wave_drag",
"units": "Pa",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "y_gravity_wave_drag_param",
"comment": "Parameterised y- component of gravity wave drag",
@@ -6305,6 +6350,7 @@
"ok_max_mean_abs": ""
},
"zg27": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
@@ -6313,7 +6359,7 @@
"long_name": "Geopotential Height",
"comment": "",
"dimensions": "longitude latitude plev27 time",
- "out_name": "zg27",
+ "out_name": "zg",
"type": "float",
"positive": "",
"valid_min": "",
@@ -6322,10 +6368,11 @@
"ok_max_mean_abs": ""
},
"zoomeso": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "mole_concentration_of_mesozooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Mesozooplankton expressed as Carbon in Sea Water",
"comment": "carbon concentration from mesozooplankton (20-200 um) component alone",
@@ -6339,10 +6386,11 @@
"ok_max_mean_abs": ""
},
"zoomicro": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "mole_concentration_of_microzooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Microzooplankton expressed as Carbon in Sea Water",
"comment": "carbon concentration from the microzooplankton (<20 um) component alone",
@@ -6356,10 +6404,11 @@
"ok_max_mean_abs": ""
},
"zoomisc": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "mole_concentration_of_miscellaneous_zooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Other Zooplankton Carbon Concentration",
"comment": "carbon from additional zooplankton component concentrations alone (e.g. Micro, meso). Since the models all have different numbers of components, this variable has been included to provide a check for intercomparison between models since some phytoplankton groups are supersets.",
diff --git a/TestTables/CMIP6_EmonZ.json b/TestTables/CMIP6_EmonZ.json
index 748a6f1..03e4052 100644
--- a/TestTables/CMIP6_EmonZ.json
+++ b/TestTables/CMIP6_EmonZ.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table EmonZ",
"realm": "atmos",
- "frequency": "mon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"co2totalmass": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "CO2_total_mass_in_atmos",
"units": "kg",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "",
"long_name": "Globally integrated Carbon Mass in Atmosphere",
"comment": "globally integrated mass of carbon as CO2 in atmsophere. Report as a single number for all emissions-driven runs",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"epfy": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "northward_eliassen_palm_flux_in_air",
"units": "m3 s-2",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"epfz": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "upward_eliassen_palm_flux_in_air",
"units": "m3 s-2",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"jo2": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "photolysis_rate_of_molecular_oxygen",
"units": "s-1",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"jo3": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "photolysis_rate_of_ozone",
"units": "s-1",
@@ -99,24 +103,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "mrsos": {
- "modeling_realm": "land",
- "standard_name": "moisture_content_of_soil_layer",
- "units": "kg m-2",
- "cell_methods": "area: mean where land time: mean",
- "cell_measures": "",
- "long_name": "Moisture in Upper Portion of Soil Column",
- "comment": "The mass of water in all phases in the upper 10cm of the soil layer.",
- "dimensions": "height10m time",
- "out_name": "mrsos",
- "type": "real",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"oxloss": {
+ "frequency": "mon",
"modeling_realm": "atmosChem",
"standard_name": "tendency_of_mole_concentration_of_ozone_and_atomic_oxygen_and_1D_oxygen_atom_due_to_chemical_destruction",
"units": "mol m-3 s-1",
@@ -134,6 +122,7 @@
"ok_max_mean_abs": ""
},
"oxprod": {
+ "frequency": "mon",
"modeling_realm": "atmosChem",
"standard_name": "tendency_of_mole_concentration_of_ozone_and_atomic_oxygen_and_1D_oxygen_atom_due_to_chemical_production_and_photolysis",
"units": "mol m-3 s-1",
@@ -151,11 +140,12 @@
"ok_max_mean_abs": ""
},
"sltbasin": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_salt_transport",
"units": "kg s-1",
"cell_methods": "longitude: mean (basin) time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "Northward Ocean Salt Transport",
"comment": "function of latitude, basin",
"dimensions": "latitude basin time",
@@ -167,29 +157,13 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "sltnorth": {
- "modeling_realm": "ocean",
- "standard_name": "northward_ocean_salt_transport",
- "units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
- "long_name": "Northward Ocean Salt Transport",
- "comment": "",
- "dimensions": "latitude basin time",
- "out_name": "sltnorth",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"sltnortha": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_salt_transport",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean (basin) time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Atlantic Northward Ocean Salt Transport",
"comment": "",
"dimensions": "latitude basin time",
@@ -202,6 +176,7 @@
"ok_max_mean_abs": ""
},
"tntc": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_convection",
"units": "K s-1",
@@ -219,6 +194,7 @@
"ok_max_mean_abs": ""
},
"tntmp": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_model_physics",
"units": "K s-1",
@@ -236,6 +212,7 @@
"ok_max_mean_abs": ""
},
"tntnogw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "temperature_tendency_due_to_dissipation_nonorographic_gravity_wave_drag",
"units": "K s-1",
@@ -253,6 +230,7 @@
"ok_max_mean_abs": ""
},
"tntogw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "temperature_tendency_due_to_dissipation_orographic_gravity_wave_drag",
"units": "K s-1",
@@ -270,6 +248,7 @@
"ok_max_mean_abs": ""
},
"tntrl": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_air_temperature_due_to_longwave_heating",
"units": "K s-1",
@@ -287,6 +266,7 @@
"ok_max_mean_abs": ""
},
"tntrlcs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky",
"units": "K s-1",
@@ -304,6 +284,7 @@
"ok_max_mean_abs": ""
},
"tntrs": {
+ "frequency": "mon",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_air_temperature_due_to_shortwave_heating",
"units": "K s-1",
@@ -321,6 +302,7 @@
"ok_max_mean_abs": ""
},
"tntrscs": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky",
"units": "K s-1",
@@ -338,6 +320,7 @@
"ok_max_mean_abs": ""
},
"tntscp": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_stratiform_clouds_and_precipitation",
"units": "K s-1",
@@ -355,6 +338,7 @@
"ok_max_mean_abs": ""
},
"utendepfd": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_eastward_wind_due_to_eliassen_palm_flux_divergence",
"units": "m s-2",
@@ -372,6 +356,7 @@
"ok_max_mean_abs": ""
},
"utendnogw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_eastward_wind_due_to_nonorographic_gravity_wave_drag",
"units": "m s-2",
@@ -389,6 +374,7 @@
"ok_max_mean_abs": ""
},
"vmrox": {
+ "frequency": "mon",
"modeling_realm": "atmosChem",
"standard_name": "mole_fraction_of_ozone_and_atomic_oxygen_and_1D_oxygen_atom",
"units": "mol mol-1",
@@ -406,6 +392,7 @@
"ok_max_mean_abs": ""
},
"vtem": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "northward_transformed_eulerian_mean_air_velocity",
"units": "m s-1",
@@ -423,6 +410,7 @@
"ok_max_mean_abs": ""
},
"vtendnogw": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_northward_wind_due_to_nonorographic_gravity_wave_drag",
"units": "m s-2",
@@ -440,6 +428,7 @@
"ok_max_mean_abs": ""
},
"wtem": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "unset",
"units": "m s-1",
@@ -457,6 +446,7 @@
"ok_max_mean_abs": ""
},
"xgwdparam": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_eastward_stress_due_to_gravity_wave_drag",
"units": "Pa",
@@ -474,6 +464,7 @@
"ok_max_mean_abs": ""
},
"ygwdparam": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "atmosphere_northward_stress_due_to_gravity_wave_drag",
"units": "Pa",
@@ -491,6 +482,7 @@
"ok_max_mean_abs": ""
},
"zmtnt": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_diabatic_processes",
"units": "K s-1",
diff --git a/TestTables/CMIP6_Esubhr.json b/TestTables/CMIP6_Esubhr.json
index d78a417..378a806 100644
--- a/TestTables/CMIP6_Esubhr.json
+++ b/TestTables/CMIP6_Esubhr.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Esubhr",
"realm": "atmos",
- "frequency": "subhr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.017361",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"bldep": {
+ "frequency": "subhr",
"modeling_realm": "aerosol",
"standard_name": "atmosphere_boundary_layer_thickness",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Boundary Layer Depth",
"comment": "Boundary layer depth",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"hfls": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_upward_latent_heat_flux",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Surface Upward Latent Heat Flux",
"comment": "",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"hfss": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "surface_upward_sensible_heat_flux",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Surface Upward Sensible Heat Flux",
"comment": "",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"hus": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Specific Humidity",
"comment": "",
@@ -83,14 +86,15 @@
"ok_max_mean_abs": ""
},
"huss": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Specific Humidity",
"comment": "Near-surface (usually, 2 meter) specific humidity.",
- "dimensions": "longitude latitude time1",
+ "dimensions": "longitude latitude time1 height2m",
"out_name": "huss",
"type": "real",
"positive": "",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"mc": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_net_upward_convective_mass_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Convective Mass Flux",
"comment": "The net mass flux should represent the difference between the updraft and downdraft components. The flux is computed as the mass divided by the area of the grid cell.",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"pr": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Precipitation",
"comment": "includes both liquid and solid phases",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"prc": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "convective_precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Convective Precipitation",
"comment": "Convective precipitation at surface; includes both liquid and solid phases.",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"prw": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "atmosphere_water_vapor_content",
"units": "kg m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Water Vapor Path",
"comment": "vertically integrated through the atmospheric column",
@@ -167,11 +175,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "ps": {
+ "frequency": "3hr",
+ "modeling_realm": "atmos",
+ "standard_name": "surface_air_pressure",
+ "units": "Pa",
+ "cell_methods": "area: mean time: point",
+ "cell_measures": "area: areacella",
+ "long_name": "Surface Pressure",
+ "comment": "surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates",
+ "dimensions": "longitude latitude time1",
+ "out_name": "ps",
+ "type": "float",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"reffclic": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_convective_cloud_ice_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Hydrometeor Effective Radius of Convective Cloud Ice",
"comment": "This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell).",
@@ -185,10 +212,11 @@
"ok_max_mean_abs": ""
},
"reffclis": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_stratiform_cloud_ice_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Hydrometeor Effective Radius of Stratiform Cloud Ice",
"comment": "This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell).",
@@ -202,10 +230,11 @@
"ok_max_mean_abs": ""
},
"reffclwc": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_convective_cloud_liquid_water_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Hydrometeor Effective Radius of Convective Cloud Liquid Water",
"comment": "Droplets are liquid. The effective radius is defined as the ratio of the third moment over the second moment of the particle size distribution and the time-mean should be calculated, weighting the individual samples by the cloudy fraction of the grid cell.",
@@ -219,10 +248,11 @@
"ok_max_mean_abs": ""
},
"reffclws": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "effective_radius_of_stratiform_cloud_liquid_water_particle",
"units": "m",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Hydrometeor Effective Radius of Stratiform Cloud Liquid Water",
"comment": "Droplets are liquid. The effective radius is defined as the ratio of the third moment over the second moment of the particle size distribution and the time-mean should be calculated, weighting the individual samples by the cloudy fraction of the grid cell.",
@@ -236,10 +266,11 @@
"ok_max_mean_abs": ""
},
"rlut": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Longwave Radiatio",
"comment": "at the top of the atmosphere (to be compared with satellite measurements)",
@@ -253,10 +284,11 @@
"ok_max_mean_abs": ""
},
"rsdt": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "toa_incoming_shortwave_flux",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "TOA Incident Shortwave Radiation",
"comment": "Shortwave radiation incident at the top of the atmosphere",
@@ -270,10 +302,11 @@
"ok_max_mean_abs": ""
},
"rsut": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_shortwave_flux",
"units": "W m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Top-of-Atmosphere Outgoing Shortwave Radiation",
"comment": "at the top of the atmosphere",
@@ -287,10 +320,11 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Air Temperature",
"comment": "Air Temperature",
@@ -304,14 +338,15 @@
"ok_max_mean_abs": ""
},
"tas": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
- "long_name": "Surface Temperature",
+ "long_name": "Surface Air Temperature",
"comment": "near-surface (usually, 2 meter) air temperature",
- "dimensions": "longitude latitude time1",
+ "dimensions": "longitude latitude time1 height2m",
"out_name": "tas",
"type": "float",
"positive": "",
@@ -321,10 +356,11 @@
"ok_max_mean_abs": ""
},
"tnhus": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity",
"units": "s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Tendency of Specific Humidity",
"comment": "Tendency of Specific Humidity",
@@ -338,10 +374,11 @@
"ok_max_mean_abs": ""
},
"tnhuspbl": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_boundary_layer_mixing",
"units": "s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Tendency of Specific Humidity Due to Boundary Layer Mixing",
"comment": "Includes all boundary layer terms including diffusive terms.",
@@ -355,10 +392,11 @@
"ok_max_mean_abs": ""
},
"tnhusscp": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_specific_humidity_due_to_stratiform_clouds_and_precipitation",
"units": "s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Tendency of Specific Humidity Due to Stratiform Clouds and Precipitation",
"comment": "",
@@ -372,10 +410,11 @@
"ok_max_mean_abs": ""
},
"tnt": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature",
"units": "K s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Tendency of Air Temperature",
"comment": "Tendency of Air Temperature",
@@ -389,10 +428,11 @@
"ok_max_mean_abs": ""
},
"tntd": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_numerical_diffusion",
"units": "K s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Tendency of Air Temperature due to Numerical Diffusion",
"comment": "This includes any horizontal or vertical numerical temperature diffusion not associated with the parametrized moist physics or the resolved dynamics. For example, any vertical diffusion which is part of the boundary layer mixing scheme should be excluded, as should any diffusion which is included in the terms from the resolved dynamics. This term is required to check the closure of the temperature budget.",
@@ -406,10 +446,11 @@
"ok_max_mean_abs": ""
},
"tntpbl": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_boundary_layer_mixing",
"units": "K s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Tendency of Air Temperature Due to Boundary Layer Mixing",
"comment": "Includes all boundary layer terms including diffusive terms.",
@@ -423,10 +464,11 @@
"ok_max_mean_abs": ""
},
"tntrl": {
+ "frequency": "subhr",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_air_temperature_due_to_longwave_heating",
"units": "K s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Longwave heating rate",
"comment": "Tendency of air temperature due to longwave radiative heating",
@@ -440,10 +482,11 @@
"ok_max_mean_abs": ""
},
"tntrlcs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky",
"units": "K s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Tendency of Air Temperature due to Clear Sky Longwave Radiative Heating",
"comment": "Tendency of Air Temperature due to Clear Sky Longwave Radiative Heating",
@@ -457,10 +500,11 @@
"ok_max_mean_abs": ""
},
"tntrs": {
+ "frequency": "subhr",
"modeling_realm": "aerosol",
"standard_name": "tendency_of_air_temperature_due_to_shortwave_heating",
"units": "K s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Shortwave heating rate",
"comment": "Tendency of air temperature due to shortwave radiative heating",
@@ -474,10 +518,11 @@
"ok_max_mean_abs": ""
},
"tntrscs": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky",
"units": "K s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Tendency of Air Temperature due to Clear Sky Shortwave Radiative Heating",
"comment": "Tendency of Air Temperature due to Clear Sky Shortwave Radiative Heating",
@@ -491,10 +536,11 @@
"ok_max_mean_abs": ""
},
"tntscp": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_air_temperature_due_to_stratiform_clouds_and_precipitation",
"units": "K s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: point time: point",
"cell_measures": "",
"long_name": "Tendency of Air Temperature Due to Stratiform Clouds and Precipitation",
"comment": "",
@@ -508,10 +554,11 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Eastward Wind",
"comment": "",
@@ -525,10 +572,11 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "Northward Wind",
"comment": "",
@@ -542,10 +590,11 @@
"ok_max_mean_abs": ""
},
"wap": {
+ "frequency": "subhr",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean time: point",
"cell_measures": "area: areacella",
"long_name": "omega (=dp/dt)",
"comment": "Omega (vertical velocity in pressure coordinates, positive downwards)",
diff --git a/TestTables/CMIP6_Eyr.json b/TestTables/CMIP6_Eyr.json
index 04a36ba..bfc3c46 100644
--- a/TestTables/CMIP6_Eyr.json
+++ b/TestTables/CMIP6_Eyr.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Eyr",
"realm": "land",
- "frequency": "yr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "365",
@@ -15,14 +14,15 @@
},
"variable_entry": {
"baresoilFrac": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Bare Soil Fraction",
"comment": "Percentage of entire grid cell that is covered by bare soil.",
- "dimensions": "longitude latitude typebare time",
+ "dimensions": "longitude latitude time typebare",
"out_name": "baresoilFrac",
"type": "real",
"positive": "",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"cLitter": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "litter_carbon_content",
"units": "kg m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean where land time: point",
"cell_measures": "area: areacella",
"long_name": "Carbon Mass in Litter Pool",
"comment": "",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"cLitterLut": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "litter_carbon_content",
"units": "kg m-2",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"cProduct": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "carbon_content_of_products_of_anthropogenic_land_use_change",
"units": "kg m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean where land time: point",
"cell_measures": "area: areacella",
"long_name": "Carbon Mass in Products of Land Use Change",
"comment": "Carbon mass per unit area in that has been removed from the environment through landuse change.",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"cProductLut": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "carbon_content_in_wood_and_agricultural_products",
"units": "kg m-2",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"cSoil": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "soil_carbon_content",
"units": "kg m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean where land time: point",
"cell_measures": "area: areacella",
"long_name": "Carbon Mass in Soil Pool",
"comment": "Carbon mass in the full depth of the soil model.",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"cSoilLut": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "soil_carbon_content",
"units": "kg m-2",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"cVeg": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "vegetation_carbon_content",
"units": "kg m-2",
- "cell_methods": "time: point",
+ "cell_methods": "area: mean where land time: point",
"cell_measures": "area: areacella",
"long_name": "Carbon Mass in Vegetation",
"comment": "Carbon mass per unit area in vegetation.",
@@ -151,6 +158,7 @@
"ok_max_mean_abs": ""
},
"cVegLut": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "vegetation_carbon_content",
"units": "kg m-2",
@@ -168,14 +176,15 @@
"ok_max_mean_abs": ""
},
"cropFrac": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Crop Fraction",
"comment": "Percentage of entire grid cell that is covered by crop.",
- "dimensions": "longitude latitude typecrop time",
+ "dimensions": "longitude latitude time typecrop",
"out_name": "cropFrac",
"type": "real",
"positive": "",
@@ -185,10 +194,11 @@
"ok_max_mean_abs": ""
},
"fracInLut": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: mean time: sum",
+ "cell_methods": "area: mean where land over all_area_types time: sum",
"cell_measures": "area: areacella",
"long_name": "annual gross fraction that was transferred into this tile from other land use tiles",
"comment": "cumulative fractional transitions over the year; note that fraction should be reported as fraction of atmospheric grid cell",
@@ -202,10 +212,11 @@
"ok_max_mean_abs": ""
},
"fracLut": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: mean where landuse time: point",
+ "cell_methods": "area: mean where land over all_area_types time: point",
"cell_measures": "area: areacella",
"long_name": "fraction of grid cell for each land use tile",
"comment": "end of year values (not annual mean); note that fraction should be reported as fraction of land grid cell (example: frac_lnd = 0.5, frac_ocn = 0.5, frac_crop_lnd = 0.2 (of land portion of grid cell), then frac_lut(crp) = 0.5*0.2 = 0.1)",
@@ -219,10 +230,11 @@
"ok_max_mean_abs": ""
},
"fracOutLut": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: mean time: sum",
+ "cell_methods": "area: mean where land over all_area_types time: sum",
"cell_measures": "area: areacella",
"long_name": "annual gross fraction of land use tile that was transferred into other land use tiles",
"comment": "cumulative fractional transitions over the year; note that fraction should be reported as fraction of atmospheric grid cell",
@@ -236,14 +248,15 @@
"ok_max_mean_abs": ""
},
"grassFrac": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Natural Grass Fraction",
"comment": "Percentage of entire grid cell that is covered by natural grass.",
- "dimensions": "longitude latitude typenatgr time",
+ "dimensions": "longitude latitude time typenatgr",
"out_name": "grassFrac",
"type": "real",
"positive": "",
@@ -253,14 +266,15 @@
"ok_max_mean_abs": ""
},
"residualFrac": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Fraction of Grid Cell that is Land but Neither Vegetation-Covered nor Bare Soil",
"comment": "Percentage of entire grid cell that is land and is covered by neither vegetation nor bare-soil (e.g., urban, ice, lakes, etc.)",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time typeresidual",
"out_name": "residualFrac",
"type": "real",
"positive": "",
@@ -270,14 +284,15 @@
"ok_max_mean_abs": ""
},
"shrubFrac": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Shrub Fraction",
"comment": "Percentage of entire grid cell that is covered by shrub.",
- "dimensions": "longitude latitude typeshrub time",
+ "dimensions": "longitude latitude time typeshrub",
"out_name": "shrubFrac",
"type": "real",
"positive": "",
@@ -286,32 +301,16 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "tnpeo": {
- "modeling_realm": "ocean",
- "standard_name": "tendency_of_ocean_potential_energy_content",
- "units": "W m-2",
- "cell_methods": "time: mean",
- "cell_measures": "area: areacello",
- "long_name": "tendency of ocean potential energy content",
- "comment": "Rate that work is done against vertical stratification, as measured by the vertical heat and salt diffusivity. Report here as depth integrated two-dimensional field.",
- "dimensions": "longitude latitude time",
- "out_name": "tnpeo",
- "type": "real",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"treeFrac": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Tree Cover Fraction",
"comment": "Percentage of entire grid cell that is covered by trees.",
- "dimensions": "longitude latitude typetree time",
+ "dimensions": "longitude latitude time typetree",
"out_name": "treeFrac",
"type": "real",
"positive": "",
@@ -321,14 +320,15 @@
"ok_max_mean_abs": ""
},
"vegFrac": {
- "modeling_realm": "atmos",
- "standard_name": "total_vegetated_fraction",
+ "frequency": "yr",
+ "modeling_realm": "",
+ "standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Total vegetated fraction",
- "comment": "as specified by C4MIP",
- "dimensions": "longitude latitude typeveg time",
+ "comment": "fraction of grid cell that is covered by vegetation.This SHOULD be the sum of tree, grass, crop and shrub fractions.",
+ "dimensions": "longitude latitude time typeveg",
"out_name": "vegFrac",
"type": "",
"positive": "",
@@ -337,16 +337,17 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "zfull": {
+ "zfullo": {
+ "frequency": "yr",
"modeling_realm": "ocean",
- "standard_name": "height_above_reference_ellipsoid",
+ "standard_name": "depth_below_geoid",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
- "long_name": "Altitude of Model Full-Levels",
- "comment": "",
+ "long_name": "Depth Below Geoid of Ocean Layer",
+ "comment": "Depth below geoid",
"dimensions": "longitude latitude olevel time",
- "out_name": "zfull",
+ "out_name": "zfullo",
"type": "real",
"positive": "",
"valid_min": "",
diff --git a/TestTables/CMIP6_IfxAnt.json b/TestTables/CMIP6_IfxAnt.json
index e72cbef..eeb8508 100644
--- a/TestTables/CMIP6_IfxAnt.json
+++ b/TestTables/CMIP6_IfxAnt.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table IfxAnt",
"realm": "landIce",
- "frequency": "fx",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"areacellg": {
+ "frequency": "fx",
"modeling_realm": "land",
"standard_name": "cell_area",
"units": "m2",
@@ -22,7 +22,7 @@
"cell_measures": "area: areacellg",
"long_name": "Grid Cell Area for Interpolated Grids",
"comment": "Area of the target grid (not the interpolated area of the source grid).",
- "dimensions": "xant yant time",
+ "dimensions": "xant yant",
"out_name": "areacellg",
"type": "",
"positive": "",
@@ -32,14 +32,15 @@
"ok_max_mean_abs": ""
},
"hfgeoubed": {
+ "frequency": "fx",
"modeling_realm": "landIce",
- "standard_name": "upward_geothermal_heat_flux_at_ground_level",
+ "standard_name": "upward_geothermal_heat_flux_at_ground_level_in_land_ice",
"units": "W m-2",
"cell_methods": "area: mean",
"cell_measures": "area: areacellg",
"long_name": "Geothermal Heat flux beneath land ice",
"comment": "Upward geothermal heat flux per unit area beneath land ice",
- "dimensions": "xant yant time",
+ "dimensions": "xant yant",
"out_name": "hfgeoubed",
"type": "",
"positive": "",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"lithk": {
+ "frequency": "fx",
"modeling_realm": "landIce",
"standard_name": "land_ice_thickness",
"units": "m",
@@ -56,7 +58,7 @@
"cell_measures": "area: areacellg",
"long_name": "Ice Sheet Thickness",
"comment": "The thickness of the ice sheet",
- "dimensions": "xant yant time",
+ "dimensions": "xant yant",
"out_name": "lithk",
"type": "",
"positive": "",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"topg": {
+ "frequency": "fx",
"modeling_realm": "landIce",
"standard_name": "bedrock_altitude",
"units": "m",
@@ -73,7 +76,7 @@
"cell_measures": "area: areacellg",
"long_name": "Bedrock Altitude",
"comment": "The bedrock topography beneath the land ice",
- "dimensions": "xant yant time",
+ "dimensions": "xant yant",
"out_name": "topg",
"type": "",
"positive": "",
diff --git a/TestTables/CMIP6_IfxGre.json b/TestTables/CMIP6_IfxGre.json
index 50954fc..1d9e224 100644
--- a/TestTables/CMIP6_IfxGre.json
+++ b/TestTables/CMIP6_IfxGre.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table IfxGre",
"realm": "landIce",
- "frequency": "fx",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"areacellg": {
+ "frequency": "fx",
"modeling_realm": "land",
"standard_name": "cell_area",
"units": "m2",
@@ -22,7 +22,7 @@
"cell_measures": "area: areacellg",
"long_name": "Grid Cell Area for Interpolated Grids",
"comment": "Area of the target grid (not the interpolated area of the source grid).",
- "dimensions": "xgre ygre time",
+ "dimensions": "xgre ygre",
"out_name": "areacellg",
"type": "",
"positive": "",
@@ -32,14 +32,15 @@
"ok_max_mean_abs": ""
},
"hfgeoubed": {
+ "frequency": "fx",
"modeling_realm": "landIce",
- "standard_name": "upward_geothermal_heat_flux_at_ground_level",
+ "standard_name": "upward_geothermal_heat_flux_at_ground_level_in_land_ice",
"units": "W m-2",
"cell_methods": "area: mean",
"cell_measures": "area: areacellg",
"long_name": "Geothermal Heat flux beneath land ice",
"comment": "Upward geothermal heat flux per unit area beneath land ice",
- "dimensions": "xgre ygre time",
+ "dimensions": "xgre ygre",
"out_name": "hfgeoubed",
"type": "",
"positive": "",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"lithk": {
+ "frequency": "fx",
"modeling_realm": "landIce",
"standard_name": "land_ice_thickness",
"units": "m",
@@ -56,7 +58,7 @@
"cell_measures": "area: areacellg",
"long_name": "Ice Sheet Thickness",
"comment": "The thickness of the ice sheet",
- "dimensions": "xgre ygre time",
+ "dimensions": "xgre ygre",
"out_name": "lithk",
"type": "",
"positive": "",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"topg": {
+ "frequency": "fx",
"modeling_realm": "landIce",
"standard_name": "bedrock_altitude",
"units": "m",
@@ -73,7 +76,7 @@
"cell_measures": "area: areacellg",
"long_name": "Bedrock Altitude",
"comment": "The bedrock topography beneath the land ice",
- "dimensions": "xgre ygre time",
+ "dimensions": "xgre ygre",
"out_name": "topg",
"type": "",
"positive": "",
diff --git a/TestTables/CMIP6_ImonAnt.json b/TestTables/CMIP6_ImonAnt.json
index 889589e..a80b976 100644
--- a/TestTables/CMIP6_ImonAnt.json
+++ b/TestTables/CMIP6_ImonAnt.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table ImonAnt",
"realm": "atmos",
- "frequency": "mon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"acabf": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"hfls": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upward_latent_heat_flux",
"units": "W m-2",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"hfss": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upward_sensible_heat_flux",
"units": "W m-2",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"icem": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_melt_flux",
"units": "kg m-2 s-1",
@@ -82,24 +85,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "lialb": {
- "modeling_realm": "landIce",
- "standard_name": "surface_albedo",
- "units": "1.0",
- "cell_methods": "area: time: mean where ice_sheet",
- "cell_measures": "area: areacellg",
- "long_name": "Land ice or snow albedo",
- "comment": "Mean surface albedo of entire land ice covered part of the grid cell",
- "dimensions": "xant yant time",
- "out_name": "lialb",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"libmassbffl": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -117,6 +104,7 @@
"ok_max_mean_abs": ""
},
"libmassbfgr": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -134,6 +122,7 @@
"ok_max_mean_abs": ""
},
"licalvf": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_specific_mass_flux_due_to_calving",
"units": "kg m-2 s-1",
@@ -151,6 +140,7 @@
"ok_max_mean_abs": ""
},
"lifmassbf": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_specific_mass_flux_due_to_calving_and_ice_front_melting",
"units": "kg m-2 s-1",
@@ -168,6 +158,7 @@
"ok_max_mean_abs": ""
},
"litempbotfl": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_temperature",
"units": "K",
@@ -185,6 +176,7 @@
"ok_max_mean_abs": ""
},
"litempbotgr": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_temperature",
"units": "K",
@@ -202,6 +194,7 @@
"ok_max_mean_abs": ""
},
"litemptop": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "temperature_at_top_of_ice_sheet_model",
"units": "K",
@@ -219,6 +212,7 @@
"ok_max_mean_abs": ""
},
"mrroLi": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "land_ice_runoff_flux",
"units": "kg m-2 s-1",
@@ -236,6 +230,7 @@
"ok_max_mean_abs": ""
},
"orog": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_altitude",
"units": "m",
@@ -253,6 +248,7 @@
"ok_max_mean_abs": ""
},
"prra": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "rainfall_flux",
"units": "kg m-2 s-1",
@@ -270,6 +266,7 @@
"ok_max_mean_abs": ""
},
"prsn": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "snowfall_flux",
"units": "kg m-2 s-1",
@@ -287,6 +284,7 @@
"ok_max_mean_abs": ""
},
"rlds": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -304,6 +302,7 @@
"ok_max_mean_abs": ""
},
"rlus": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -321,6 +320,7 @@
"ok_max_mean_abs": ""
},
"rsds": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_shortwave_flux_in_air",
"units": "W m-2",
@@ -338,6 +338,7 @@
"ok_max_mean_abs": ""
},
"rsus": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_shortwave_flux_in_air",
"units": "W m-2",
@@ -355,6 +356,7 @@
"ok_max_mean_abs": ""
},
"sbl": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_sublimation_flux",
"units": "kg m-2 s-1",
@@ -372,6 +374,7 @@
"ok_max_mean_abs": ""
},
"snc": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_area_fraction",
"units": "%",
@@ -389,6 +392,7 @@
"ok_max_mean_abs": ""
},
"snicefreez": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_refreezing_flux",
"units": "kg m-2 s-1",
@@ -406,6 +410,7 @@
"ok_max_mean_abs": ""
},
"snicem": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_melt_flux",
"units": "kg m-2 s-1",
@@ -423,6 +428,7 @@
"ok_max_mean_abs": ""
},
"snm": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_melt_flux",
"units": "kg m-2 s-1",
@@ -440,14 +446,15 @@
"ok_max_mean_abs": ""
},
"tas": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
"cell_methods": "area: time: mean where ice_sheet",
- "cell_measures": "area: areacellg",
- "long_name": "Surface Temperature",
+ "cell_measures": "",
+ "long_name": "Surface Air Temperature",
"comment": "near-surface (usually, 2 meter) air temperature",
- "dimensions": "xant yant time",
+ "dimensions": "time height2m",
"out_name": "tas",
"type": "float",
"positive": "",
@@ -457,6 +464,7 @@
"ok_max_mean_abs": ""
},
"ts": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_temperature",
"units": "K",
@@ -474,6 +482,7 @@
"ok_max_mean_abs": ""
},
"tsn": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "temperature_in_surface_snow",
"units": "K",
diff --git a/TestTables/CMIP6_ImonGre.json b/TestTables/CMIP6_ImonGre.json
index 6a48b92..d5c9625 100644
--- a/TestTables/CMIP6_ImonGre.json
+++ b/TestTables/CMIP6_ImonGre.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table ImonGre",
"realm": "atmos",
- "frequency": "mon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"acabf": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"hfls": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upward_latent_heat_flux",
"units": "W m-2",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"hfss": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upward_sensible_heat_flux",
"units": "W m-2",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"icem": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_melt_flux",
"units": "kg m-2 s-1",
@@ -82,24 +85,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "lialb": {
- "modeling_realm": "landIce",
- "standard_name": "surface_albedo",
- "units": "1.0",
- "cell_methods": "area: time: mean where ice_sheet",
- "cell_measures": "area: areacellg",
- "long_name": "Land ice or snow albedo",
- "comment": "Mean surface albedo of entire land ice covered part of the grid cell",
- "dimensions": "xgre ygre time",
- "out_name": "lialb",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"libmassbffl": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -117,6 +104,7 @@
"ok_max_mean_abs": ""
},
"libmassbfgr": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -134,6 +122,7 @@
"ok_max_mean_abs": ""
},
"licalvf": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_specific_mass_flux_due_to_calving",
"units": "kg m-2 s-1",
@@ -151,6 +140,7 @@
"ok_max_mean_abs": ""
},
"lifmassbf": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_specific_mass_flux_due_to_calving_and_ice_front_melting",
"units": "kg m-2 s-1",
@@ -168,6 +158,7 @@
"ok_max_mean_abs": ""
},
"litempbotfl": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_temperature",
"units": "K",
@@ -185,6 +176,7 @@
"ok_max_mean_abs": ""
},
"litempbotgr": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_temperature",
"units": "K",
@@ -202,6 +194,7 @@
"ok_max_mean_abs": ""
},
"litemptop": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "temperature_at_top_of_ice_sheet_model",
"units": "K",
@@ -219,6 +212,7 @@
"ok_max_mean_abs": ""
},
"mrroLi": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "land_ice_runoff_flux",
"units": "kg m-2 s-1",
@@ -236,6 +230,7 @@
"ok_max_mean_abs": ""
},
"orog": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_altitude",
"units": "m",
@@ -253,6 +248,7 @@
"ok_max_mean_abs": ""
},
"prra": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "rainfall_flux",
"units": "kg m-2 s-1",
@@ -270,6 +266,7 @@
"ok_max_mean_abs": ""
},
"prsn": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "snowfall_flux",
"units": "kg m-2 s-1",
@@ -287,6 +284,7 @@
"ok_max_mean_abs": ""
},
"rlds": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -304,6 +302,7 @@
"ok_max_mean_abs": ""
},
"rlus": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -321,6 +320,7 @@
"ok_max_mean_abs": ""
},
"rsds": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_shortwave_flux_in_air",
"units": "W m-2",
@@ -338,6 +338,7 @@
"ok_max_mean_abs": ""
},
"rsus": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_shortwave_flux_in_air",
"units": "W m-2",
@@ -355,6 +356,7 @@
"ok_max_mean_abs": ""
},
"sbl": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_sublimation_flux",
"units": "kg m-2 s-1",
@@ -372,6 +374,7 @@
"ok_max_mean_abs": ""
},
"snc": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_area_fraction",
"units": "%",
@@ -389,6 +392,7 @@
"ok_max_mean_abs": ""
},
"snicefreez": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_refreezing_flux",
"units": "kg m-2 s-1",
@@ -406,6 +410,7 @@
"ok_max_mean_abs": ""
},
"snicem": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_melt_flux",
"units": "kg m-2 s-1",
@@ -423,6 +428,7 @@
"ok_max_mean_abs": ""
},
"snm": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_melt_flux",
"units": "kg m-2 s-1",
@@ -440,14 +446,15 @@
"ok_max_mean_abs": ""
},
"tas": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
"cell_methods": "area: time: mean where ice_sheet",
- "cell_measures": "area: areacellg",
- "long_name": "Surface Temperature",
+ "cell_measures": "",
+ "long_name": "Surface Air Temperature",
"comment": "near-surface (usually, 2 meter) air temperature",
- "dimensions": "xgre ygre time",
+ "dimensions": "time height2m",
"out_name": "tas",
"type": "float",
"positive": "",
@@ -457,6 +464,7 @@
"ok_max_mean_abs": ""
},
"ts": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "surface_temperature",
"units": "K",
@@ -474,6 +482,7 @@
"ok_max_mean_abs": ""
},
"tsn": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "temperature_in_surface_snow",
"units": "K",
diff --git a/TestTables/CMIP6_IyrAnt.json b/TestTables/CMIP6_IyrAnt.json
index ec87f6f..8987816 100644
--- a/TestTables/CMIP6_IyrAnt.json
+++ b/TestTables/CMIP6_IyrAnt.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table IyrAnt",
"realm": "landIce",
- "frequency": "yr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "365.00",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"acabf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"areacelli": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "cell_area",
"units": "m2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacellg",
"long_name": "Ice-Sheet Grid Cell Area",
"comment": "Horizontal area of ice-sheet grid cells",
@@ -49,8 +50,9 @@
"ok_max_mean_abs": ""
},
"hfgeoubed": {
+ "frequency": "yr",
"modeling_realm": "landIce",
- "standard_name": "upward_geothermal_heat_flux_at_ground_level",
+ "standard_name": "upward_geothermal_heat_flux_at_ground_level_in_land_ice",
"units": "W m-2",
"cell_methods": "area: time: mean where ice_sheet",
"cell_measures": "area: areacellg",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"iareafl": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "floating_ice_shelf_area",
"units": "m2",
@@ -83,8 +86,9 @@
"ok_max_mean_abs": ""
},
"iareagr": {
+ "frequency": "yr",
"modeling_realm": "atmos",
- "standard_name": "grounded_land_ice_area",
+ "standard_name": "grounded_ice_sheet_area",
"units": "m2",
"cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)",
"cell_measures": "",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"libmassbffl": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"libmassbfgr": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -134,6 +140,7 @@
"ok_max_mean_abs": ""
},
"licalvf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_specific_mass_flux_due_to_calving",
"units": "kg m-2 s-1",
@@ -151,6 +158,7 @@
"ok_max_mean_abs": ""
},
"lifmassbf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_specific_mass_flux_due_to_calving_and_ice_front_melting",
"units": "kg m-2 s-1",
@@ -168,6 +176,7 @@
"ok_max_mean_abs": ""
},
"lim": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "land_ice_mass",
"units": "kg",
@@ -185,6 +194,7 @@
"ok_max_mean_abs": ""
},
"limnsw": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "land_ice_mass_not_displacing_sea_water",
"units": "kg",
@@ -202,6 +212,7 @@
"ok_max_mean_abs": ""
},
"litempbotfl": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_temperature",
"units": "K",
@@ -219,6 +230,7 @@
"ok_max_mean_abs": ""
},
"litempbotgr": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_temperature",
"units": "K",
@@ -236,6 +248,7 @@
"ok_max_mean_abs": ""
},
"litemptop": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "temperature_at_top_of_ice_sheet_model",
"units": "K",
@@ -253,6 +266,7 @@
"ok_max_mean_abs": ""
},
"lithk": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_thickness",
"units": "m",
@@ -270,6 +284,7 @@
"ok_max_mean_abs": ""
},
"orog": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "surface_altitude",
"units": "m",
@@ -287,14 +302,15 @@
"ok_max_mean_abs": ""
},
"sftflf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "floating_ice_shelf_area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacellg",
"long_name": "Floating Ice Shelf Area Fraction",
"comment": "Fraction of grid cell covered by floating ice shelf, the component of the ice sheet that is flowing over seawater",
- "dimensions": "xant yant time",
+ "dimensions": "xant yant time typefis",
"out_name": "sftflf",
"type": "",
"positive": "",
@@ -304,14 +320,15 @@
"ok_max_mean_abs": ""
},
"sftgif": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "land_ice_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean where ice_sheet",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacellg",
"long_name": "Fraction of Grid Cell Covered with Glacier",
"comment": "Fraction of grid cell covered by land ice (ice sheet, ice shelf, ice cap, glacier)",
- "dimensions": "xant yant time",
+ "dimensions": "xant yant time typeli",
"out_name": "sftgif",
"type": "real",
"positive": "",
@@ -321,14 +338,15 @@
"ok_max_mean_abs": ""
},
"sftgrf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "grounded_ice_sheet_area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacellg",
"long_name": "Grounded Ice Sheet Area Fraction",
"comment": "Fraction of grid cell covered by grounded ice sheet",
- "dimensions": "xant yant time",
+ "dimensions": "xant yant time typegis",
"out_name": "sftgrf",
"type": "",
"positive": "",
@@ -338,6 +356,7 @@
"ok_max_mean_abs": ""
},
"snc": {
+ "frequency": "yr",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_area_fraction",
"units": "%",
@@ -355,6 +374,7 @@
"ok_max_mean_abs": ""
},
"strbasemag": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "magnitude_of_basal_drag_at_land_ice_base",
"units": "Pa",
@@ -372,6 +392,7 @@
"ok_max_mean_abs": ""
},
"tendacabf": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_land_ice_mass_due_to_surface_mass_balance",
"units": "kg s-1",
@@ -389,6 +410,7 @@
"ok_max_mean_abs": ""
},
"tendlibmassbf": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_land_ice_mass_due_to_basal_mass_balance",
"units": "kg s-1",
@@ -406,6 +428,7 @@
"ok_max_mean_abs": ""
},
"tendlicalvf": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_land_ice_mass_due_to_calving",
"units": "kg s-1",
@@ -423,6 +446,7 @@
"ok_max_mean_abs": ""
},
"topg": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "bedrock_altitude",
"units": "m",
@@ -440,6 +464,7 @@
"ok_max_mean_abs": ""
},
"xvelbase": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_x_velocity",
"units": "m s-1",
@@ -457,6 +482,7 @@
"ok_max_mean_abs": ""
},
"xvelmean": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_vertical_mean_x_velocity",
"units": "m s-1",
@@ -474,6 +500,7 @@
"ok_max_mean_abs": ""
},
"xvelsurf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_x_velocity",
"units": "m s-1",
@@ -491,6 +518,7 @@
"ok_max_mean_abs": ""
},
"yvelbase": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_y_velocity",
"units": "m s-1",
@@ -508,6 +536,7 @@
"ok_max_mean_abs": ""
},
"yvelmean": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_vertical_mean_y_velocity",
"units": "m s-1",
@@ -525,6 +554,7 @@
"ok_max_mean_abs": ""
},
"yvelsurf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_y_velocity",
"units": "m s-1",
@@ -542,6 +572,7 @@
"ok_max_mean_abs": ""
},
"zvelbase": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_upward_velocity",
"units": "m s-1",
@@ -559,6 +590,7 @@
"ok_max_mean_abs": ""
},
"zvelsurf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_upward_velocity",
"units": "m s-1",
diff --git a/TestTables/CMIP6_IyrGre.json b/TestTables/CMIP6_IyrGre.json
index baeb1e2..629fb94 100644
--- a/TestTables/CMIP6_IyrGre.json
+++ b/TestTables/CMIP6_IyrGre.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table IyrGre",
"realm": "landIce",
- "frequency": "yr",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "365.00",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"acabf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"areacelli": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "cell_area",
"units": "m2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacellg",
"long_name": "Ice-Sheet Grid Cell Area",
"comment": "Horizontal area of ice-sheet grid cells",
@@ -49,8 +50,9 @@
"ok_max_mean_abs": ""
},
"hfgeoubed": {
+ "frequency": "yr",
"modeling_realm": "landIce",
- "standard_name": "upward_geothermal_heat_flux_at_ground_level",
+ "standard_name": "upward_geothermal_heat_flux_at_ground_level_in_land_ice",
"units": "W m-2",
"cell_methods": "area: time: mean where ice_sheet",
"cell_measures": "area: areacellg",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"iareafl": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "floating_ice_shelf_area",
"units": "m2",
@@ -83,8 +86,9 @@
"ok_max_mean_abs": ""
},
"iareagr": {
+ "frequency": "yr",
"modeling_realm": "atmos",
- "standard_name": "grounded_land_ice_area",
+ "standard_name": "grounded_ice_sheet_area",
"units": "m2",
"cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)",
"cell_measures": "",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"libmassbffl": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"libmassbfgr": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -134,6 +140,7 @@
"ok_max_mean_abs": ""
},
"licalvf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_specific_mass_flux_due_to_calving",
"units": "kg m-2 s-1",
@@ -151,6 +158,7 @@
"ok_max_mean_abs": ""
},
"lifmassbf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_specific_mass_flux_due_to_calving_and_ice_front_melting",
"units": "kg m-2 s-1",
@@ -168,6 +176,7 @@
"ok_max_mean_abs": ""
},
"lim": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "land_ice_mass",
"units": "kg",
@@ -185,6 +194,7 @@
"ok_max_mean_abs": ""
},
"limnsw": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "land_ice_mass_not_displacing_sea_water",
"units": "kg",
@@ -202,6 +212,7 @@
"ok_max_mean_abs": ""
},
"litempbotfl": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_temperature",
"units": "K",
@@ -219,6 +230,7 @@
"ok_max_mean_abs": ""
},
"litempbotgr": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_temperature",
"units": "K",
@@ -236,6 +248,7 @@
"ok_max_mean_abs": ""
},
"litemptop": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "temperature_at_top_of_ice_sheet_model",
"units": "K",
@@ -253,6 +266,7 @@
"ok_max_mean_abs": ""
},
"lithk": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_thickness",
"units": "m",
@@ -270,6 +284,7 @@
"ok_max_mean_abs": ""
},
"orog": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "surface_altitude",
"units": "m",
@@ -287,14 +302,15 @@
"ok_max_mean_abs": ""
},
"sftflf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "floating_ice_shelf_area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacellg",
"long_name": "Floating Ice Shelf Area Fraction",
"comment": "Fraction of grid cell covered by floating ice shelf, the component of the ice sheet that is flowing over seawater",
- "dimensions": "xgre ygre time",
+ "dimensions": "xgre ygre time typefis",
"out_name": "sftflf",
"type": "",
"positive": "",
@@ -304,14 +320,15 @@
"ok_max_mean_abs": ""
},
"sftgif": {
+ "frequency": "yr",
"modeling_realm": "land",
"standard_name": "land_ice_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean where ice_sheet",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacellg",
"long_name": "Fraction of Grid Cell Covered with Glacier",
"comment": "Fraction of grid cell covered by land ice (ice sheet, ice shelf, ice cap, glacier)",
- "dimensions": "xgre ygre time",
+ "dimensions": "xgre ygre time typeli",
"out_name": "sftgif",
"type": "real",
"positive": "",
@@ -321,14 +338,15 @@
"ok_max_mean_abs": ""
},
"sftgrf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "grounded_ice_sheet_area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacellg",
"long_name": "Grounded Ice Sheet Area Fraction",
"comment": "Fraction of grid cell covered by grounded ice sheet",
- "dimensions": "xgre ygre time",
+ "dimensions": "xgre ygre time typegis",
"out_name": "sftgrf",
"type": "",
"positive": "",
@@ -338,6 +356,7 @@
"ok_max_mean_abs": ""
},
"snc": {
+ "frequency": "yr",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_area_fraction",
"units": "%",
@@ -355,6 +374,7 @@
"ok_max_mean_abs": ""
},
"strbasemag": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "magnitude_of_basal_drag_at_land_ice_base",
"units": "Pa",
@@ -372,6 +392,7 @@
"ok_max_mean_abs": ""
},
"tendacabf": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_land_ice_mass_due_to_surface_mass_balance",
"units": "kg s-1",
@@ -389,6 +410,7 @@
"ok_max_mean_abs": ""
},
"tendlibmassbf": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_land_ice_mass_due_to_basal_mass_balance",
"units": "kg s-1",
@@ -406,6 +428,7 @@
"ok_max_mean_abs": ""
},
"tendlicalvf": {
+ "frequency": "yr",
"modeling_realm": "atmos",
"standard_name": "tendency_of_land_ice_mass_due_to_calving",
"units": "kg s-1",
@@ -423,6 +446,7 @@
"ok_max_mean_abs": ""
},
"topg": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "bedrock_altitude",
"units": "m",
@@ -440,6 +464,7 @@
"ok_max_mean_abs": ""
},
"xvelbase": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_x_velocity",
"units": "m s-1",
@@ -457,6 +482,7 @@
"ok_max_mean_abs": ""
},
"xvelmean": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_vertical_mean_x_velocity",
"units": "m s-1",
@@ -474,6 +500,7 @@
"ok_max_mean_abs": ""
},
"xvelsurf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_x_velocity",
"units": "m s-1",
@@ -491,6 +518,7 @@
"ok_max_mean_abs": ""
},
"yvelbase": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_y_velocity",
"units": "m s-1",
@@ -508,6 +536,7 @@
"ok_max_mean_abs": ""
},
"yvelmean": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_vertical_mean_y_velocity",
"units": "m s-1",
@@ -525,6 +554,7 @@
"ok_max_mean_abs": ""
},
"yvelsurf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_y_velocity",
"units": "m s-1",
@@ -542,6 +572,7 @@
"ok_max_mean_abs": ""
},
"zvelbase": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_basal_upward_velocity",
"units": "m s-1",
@@ -559,6 +590,7 @@
"ok_max_mean_abs": ""
},
"zvelsurf": {
+ "frequency": "yr",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_upward_velocity",
"units": "m s-1",
diff --git a/TestTables/CMIP6_LImon.json b/TestTables/CMIP6_LImon.json
index 94ed922..1fe1c2c 100644
--- a/TestTables/CMIP6_LImon.json
+++ b/TestTables/CMIP6_LImon.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table LImon",
"realm": "landIce land",
- "frequency": "mon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00000",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"acabfIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_specific_mass_balance_flux",
"units": "kg m-2 s-1",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"agesno": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "age_of_surface_snow",
"units": "day",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"hfdsn": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "surface_downward_heat_flux_in_snow",
"units": "W m-2",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"hflsIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_upward_latent_heat_flux",
"units": "W m-2",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"hfssIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_upward_sensible_heat_flux",
"units": "W m-2",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"icemIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "land_ice_surface_melt_flux",
"units": "kg m-2 s-1",
@@ -116,24 +121,8 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "lialbIs": {
- "modeling_realm": "landIce",
- "standard_name": "surface_albedo",
- "units": "1.0",
- "cell_methods": "area: time: mean where ice_sheet",
- "cell_measures": "area: areacella",
- "long_name": "Ice Sheet Ice or Snow Albedo",
- "comment": "Mean surface albedo of entire land ice covered part of the grid cell",
- "dimensions": "longitude latitude time",
- "out_name": "lialbIs",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"litemptopIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "temperature_at_top_of_ice_sheet_model",
"units": "K",
@@ -151,6 +140,7 @@
"ok_max_mean_abs": ""
},
"lwsnl": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "liquid_water_content_of_snow_layer",
"units": "kg m-2",
@@ -168,6 +158,7 @@
"ok_max_mean_abs": ""
},
"mrroIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "runoff_flux",
"units": "kg m-2 s-1",
@@ -185,6 +176,7 @@
"ok_max_mean_abs": ""
},
"orogIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_altitude",
"units": "m",
@@ -202,6 +194,7 @@
"ok_max_mean_abs": ""
},
"pflw": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "liquid_water_content_of_permafrost_layer",
"units": "kg m-2",
@@ -219,6 +212,7 @@
"ok_max_mean_abs": ""
},
"prraIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "rainfall_flux",
"units": "kg m-2 s-1",
@@ -236,6 +230,7 @@
"ok_max_mean_abs": ""
},
"prsnIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "snowfall_flux",
"units": "kg m-2 s-1",
@@ -253,6 +248,7 @@
"ok_max_mean_abs": ""
},
"rldsIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_downwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -270,6 +266,7 @@
"ok_max_mean_abs": ""
},
"rlusIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_upwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -287,6 +284,7 @@
"ok_max_mean_abs": ""
},
"rsdsIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_downwelling_shortwave_flux_in_air",
"units": "W m-2",
@@ -304,6 +302,7 @@
"ok_max_mean_abs": ""
},
"rsusIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_upwelling_shortwave_flux_in_air",
"units": "W m-2",
@@ -321,6 +320,7 @@
"ok_max_mean_abs": ""
},
"sbl": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_sublimation_flux",
"units": "kg m-2 s-1",
@@ -338,6 +338,7 @@
"ok_max_mean_abs": ""
},
"sblIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_sublimation_flux",
"units": "kg m-2 s-1",
@@ -355,14 +356,15 @@
"ok_max_mean_abs": ""
},
"sftflf": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "floating_ice_shelf_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean where floating_ice_shelf (comment: mask=sftflf)",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Floating Ice Shelf Area Fraction",
"comment": "Fraction of grid cell covered by floating ice shelf, the component of the ice sheet that is flowing over seawater",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time typefis",
"out_name": "sftflf",
"type": "",
"positive": "",
@@ -372,14 +374,15 @@
"ok_max_mean_abs": ""
},
"sftgif": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "land_ice_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Fraction of Grid Cell Covered with Glacier",
"comment": "Fraction of grid cell covered by land ice (ice sheet, ice shelf, ice cap, glacier)",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time typeli",
"out_name": "sftgif",
"type": "real",
"positive": "",
@@ -389,14 +392,15 @@
"ok_max_mean_abs": ""
},
"sftgrf": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "grounded_ice_sheet_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Grounded Ice Sheet Area Fraction",
"comment": "Fraction of grid cell covered by grounded ice sheet",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time typegis",
"out_name": "sftgrf",
"type": "",
"positive": "",
@@ -406,10 +410,11 @@
"ok_max_mean_abs": ""
},
"snc": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Snow Area Fraction",
"comment": "Fraction of each grid cell that is occupied by snow that rests on land portion of cell.",
@@ -423,6 +428,7 @@
"ok_max_mean_abs": ""
},
"sncIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_area_fraction",
"units": "%",
@@ -440,6 +446,7 @@
"ok_max_mean_abs": ""
},
"snd": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_thickness",
"units": "m",
@@ -457,6 +464,7 @@
"ok_max_mean_abs": ""
},
"snicefreezIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_refreezing_flux",
"units": "kg m-2 s-1",
@@ -474,6 +482,7 @@
"ok_max_mean_abs": ""
},
"snicemIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_and_ice_melt_flux",
"units": "kg m-2 s-1",
@@ -491,6 +500,7 @@
"ok_max_mean_abs": ""
},
"snm": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_melt_flux",
"units": "kg m-2 s-1",
@@ -508,6 +518,7 @@
"ok_max_mean_abs": ""
},
"snmIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_snow_melt_flux",
"units": "kg m-2 s-1",
@@ -525,6 +536,7 @@
"ok_max_mean_abs": ""
},
"snw": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "surface_snow_amount",
"units": "kg m-2",
@@ -542,6 +554,7 @@
"ok_max_mean_abs": ""
},
"sootsn": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "soot_content_of_surface_snow",
"units": "kg m-2",
@@ -559,6 +572,7 @@
"ok_max_mean_abs": ""
},
"tasIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "air_temperature",
"units": "K",
@@ -576,6 +590,7 @@
"ok_max_mean_abs": ""
},
"tpf": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "permafrost_layer_thickness",
"units": "m",
@@ -593,6 +608,7 @@
"ok_max_mean_abs": ""
},
"tsIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "surface_temperature",
"units": "K",
@@ -610,6 +626,7 @@
"ok_max_mean_abs": ""
},
"tsn": {
+ "frequency": "mon",
"modeling_realm": "landIce land",
"standard_name": "temperature_in_surface_snow",
"units": "K",
@@ -627,6 +644,7 @@
"ok_max_mean_abs": ""
},
"tsnIs": {
+ "frequency": "mon",
"modeling_realm": "landIce",
"standard_name": "temperature_in_surface_snow",
"units": "K",
diff --git a/TestTables/CMIP6_Lmon.json b/TestTables/CMIP6_Lmon.json
index bd2fb2a..a26d90d 100644
--- a/TestTables/CMIP6_Lmon.json
+++ b/TestTables/CMIP6_Lmon.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Lmon",
"realm": "land",
- "frequency": "mon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"baresoilFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Bare Soil Fraction",
"comment": "Percentage of entire grid cell that is covered by bare soil.",
@@ -31,16 +31,17 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "burntArea": {
+ "burntFractionAll": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
- "long_name": "Burnt Area Fraction",
- "comment": "Fraction of entire grid cell that is covered by burnt vegetation.",
+ "long_name": "Percentage of Entire Grid cell that is Covered by Burnt Vegetation (All Classes)",
+ "comment": "Percentage of grid cell burned due to all fires including natural and anthropogenic fires and those associated with anthropogenic land use change",
"dimensions": "longitude latitude time typeburnt",
- "out_name": "burntArea",
+ "out_name": "burntFractionAll",
"type": "real",
"positive": "",
"valid_min": "",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"c3PftFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Total C3 PFT Cover Fraction",
"comment": "Percentage of entire grid cell that is covered by C3 PFTs (including grass, crops, and trees).",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"c4PftFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Total C4 PFT Cover Fraction",
"comment": "Percentage of entire grid cell that is covered by C4 PFTs (including grass and crops).",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"cCwd": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "wood_debris_carbon_content",
"units": "kg m-2",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"cLeaf": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "leaf_carbon_content",
"units": "kg m-2",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"cLitter": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "litter_carbon_content",
"units": "kg m-2",
@@ -134,6 +140,7 @@
"ok_max_mean_abs": ""
},
"cLitterAbove": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_litter_carbon_content",
"units": "kg m-2",
@@ -151,6 +158,7 @@
"ok_max_mean_abs": ""
},
"cLitterBelow": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "subsurface_litter_carbon_content",
"units": "kg m-2",
@@ -168,6 +176,7 @@
"ok_max_mean_abs": ""
},
"cProduct": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "carbon_content_of_products_of_anthropogenic_land_use_change",
"units": "kg m-2",
@@ -185,6 +194,7 @@
"ok_max_mean_abs": ""
},
"cRoot": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "root_carbon_content",
"units": "kg m-2",
@@ -202,6 +212,7 @@
"ok_max_mean_abs": ""
},
"cSoilFast": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "fast_soil_pool_carbon_content",
"units": "kg m-2",
@@ -219,6 +230,7 @@
"ok_max_mean_abs": ""
},
"cSoilMedium": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "medium_soil_pool_carbon_content",
"units": "kg m-2",
@@ -236,6 +248,7 @@
"ok_max_mean_abs": ""
},
"cSoilSlow": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "slow_soil_pool_carbon_content",
"units": "kg m-2",
@@ -253,6 +266,7 @@
"ok_max_mean_abs": ""
},
"cVeg": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "vegetation_carbon_content",
"units": "kg m-2",
@@ -270,10 +284,11 @@
"ok_max_mean_abs": ""
},
"cropFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Crop Fraction",
"comment": "Percentage of entire grid cell that is covered by crop.",
@@ -287,6 +302,7 @@
"ok_max_mean_abs": ""
},
"evspsblsoi": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "water_evaporation_flux_from_soil",
"units": "kg m-2 s-1",
@@ -304,6 +320,7 @@
"ok_max_mean_abs": ""
},
"evspsblveg": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "water_evaporation_flux_from_canopy",
"units": "kg m-2 s-1",
@@ -321,6 +338,7 @@
"ok_max_mean_abs": ""
},
"fFire": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_fires_excluding_anthropogenic_land_use_change",
"units": "kg m-2 s-1",
@@ -338,6 +356,7 @@
"ok_max_mean_abs": ""
},
"fGrazing": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_grazing",
"units": "kg m-2 s-1",
@@ -355,6 +374,7 @@
"ok_max_mean_abs": ""
},
"fHarvest": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_crop_harvesting",
"units": "kg m-2 s-1",
@@ -372,6 +392,7 @@
"ok_max_mean_abs": ""
},
"fLitterSoil": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "carbon_mass_flux_into_soil_from_litter",
"units": "kg m-2 s-1",
@@ -389,6 +410,7 @@
"ok_max_mean_abs": ""
},
"fVegLitter": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "litter_carbon_flux",
"units": "kg m-2 s-1",
@@ -406,6 +428,7 @@
"ok_max_mean_abs": ""
},
"fVegSoil": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "carbon_mass_flux_into_soil_from_vegetation_excluding_litter",
"units": "kg m-2 s-1",
@@ -423,8 +446,9 @@
"ok_max_mean_abs": ""
},
"gpp": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "gross_primary_productivity_of_carbon",
+ "standard_name": "gross_primary_productivity_of_biomass_expressed_as_carbon",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
@@ -440,10 +464,11 @@
"ok_max_mean_abs": ""
},
"grassFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Natural Grass Fraction",
"comment": "Percentage of entire grid cell that is covered by natural grass.",
@@ -457,6 +482,7 @@
"ok_max_mean_abs": ""
},
"lai": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "leaf_area_index",
"units": "1.0",
@@ -474,10 +500,11 @@
"ok_max_mean_abs": ""
},
"landCoverFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Plant Functional Type Grid Fraction",
"comment": "Percentage of grid cell area occupied by different model vegetation/land cover categories. The categories may differ from model to model, depending on each model's subgrid land cover category definitions. Categories may include natural vegetation, anthropogenic vegetation, bare soil, lakes, urban areas, glaciers, etc. Sum of all should equal the fraction of the grid-cell that is land.",
@@ -491,6 +518,7 @@
"ok_max_mean_abs": ""
},
"mrfso": {
+ "frequency": "mon",
"modeling_realm": "land landIce",
"standard_name": "soil_frozen_water_content",
"units": "kg m-2",
@@ -508,6 +536,7 @@
"ok_max_mean_abs": ""
},
"mrlsl": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "moisture_content_of_soil_layer",
"units": "kg m-2",
@@ -525,6 +554,7 @@
"ok_max_mean_abs": ""
},
"mrro": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "runoff_flux",
"units": "kg m-2 s-1",
@@ -542,6 +572,7 @@
"ok_max_mean_abs": ""
},
"mrros": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_runoff_flux",
"units": "kg m-2 s-1",
@@ -559,6 +590,7 @@
"ok_max_mean_abs": ""
},
"mrso": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_moisture_content",
"units": "kg m-2",
@@ -576,6 +608,7 @@
"ok_max_mean_abs": ""
},
"mrsos": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "moisture_content_of_soil_layer",
"units": "kg m-2",
@@ -593,6 +626,7 @@
"ok_max_mean_abs": ""
},
"nbp": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_net_downward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_all_land_processes",
"units": "kg m-2 s-1",
@@ -610,8 +644,9 @@
"ok_max_mean_abs": ""
},
"npp": {
+ "frequency": "mon",
"modeling_realm": "land",
- "standard_name": "net_primary_productivity_of_carbon",
+ "standard_name": "net_primary_productivity_of_biomass_expressed_as_carbon",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
@@ -627,6 +662,7 @@
"ok_max_mean_abs": ""
},
"nppLeaf": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "net_primary_productivity_of_carbon_accumulated_in_leaves",
"units": "kg m-2 s-1",
@@ -644,6 +680,7 @@
"ok_max_mean_abs": ""
},
"nppRoot": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "net_primary_productivity_of_carbon_accumulated_in_roots",
"units": "kg m-2 s-1",
@@ -661,6 +698,7 @@
"ok_max_mean_abs": ""
},
"nppWood": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "net_primary_productivity_of_carbon_accumulated_in_wood",
"units": "kg m-2 s-1",
@@ -678,10 +716,11 @@
"ok_max_mean_abs": ""
},
"pastureFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Anthropogenic Pasture Fraction",
"comment": "Percentage of entire grid cell that is covered by anthropogenic pasture.",
@@ -695,6 +734,7 @@
"ok_max_mean_abs": ""
},
"prveg": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "precipitation_flux_onto_canopy",
"units": "kg m-2 s-1",
@@ -712,6 +752,7 @@
"ok_max_mean_abs": ""
},
"rGrowth": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upward_carbon_mass_flux_due_to_plant_respiration_for_biomass_growth",
"units": "kg m-2 s-1",
@@ -729,6 +770,7 @@
"ok_max_mean_abs": ""
},
"rMaint": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "surface_upward_carbon_mass_flux_due_to_plant_respiration_for_biomass_maintenance",
"units": "kg m-2 s-1",
@@ -746,6 +788,7 @@
"ok_max_mean_abs": ""
},
"ra": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "plant_respiration_carbon_flux",
"units": "kg m-2 s-1",
@@ -763,14 +806,15 @@
"ok_max_mean_abs": ""
},
"residualFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Fraction of Grid Cell that is Land but Neither Vegetation-Covered nor Bare Soil",
"comment": "Percentage of entire grid cell that is land and is covered by neither vegetation nor bare-soil (e.g., urban, ice, lakes, etc.)",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time typeresidual",
"out_name": "residualFrac",
"type": "real",
"positive": "",
@@ -780,6 +824,7 @@
"ok_max_mean_abs": ""
},
"rh": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "heterotrophic_respiration_carbon_flux",
"units": "kg m-2 s-1",
@@ -797,10 +842,11 @@
"ok_max_mean_abs": ""
},
"shrubFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Shrub Fraction",
"comment": "Percentage of entire grid cell that is covered by shrub.",
@@ -814,6 +860,7 @@
"ok_max_mean_abs": ""
},
"tran": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "transpiration_flux",
"units": "kg m-2 s-1",
@@ -831,10 +878,11 @@
"ok_max_mean_abs": ""
},
"treeFrac": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Tree Cover Fraction",
"comment": "Percentage of entire grid cell that is covered by trees.",
@@ -848,10 +896,11 @@
"ok_max_mean_abs": ""
},
"treeFracPrimDec": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Primary Deciduous Tree Fraction",
"comment": "Percentage of the entire grid cell that is covered by total primary deciduous trees.",
@@ -865,10 +914,11 @@
"ok_max_mean_abs": ""
},
"treeFracPrimEver": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Primary Evergreen Tree Cover Fraction",
"comment": "Percentage of entire grid cell that is covered by primary evergreen trees.",
@@ -882,10 +932,11 @@
"ok_max_mean_abs": ""
},
"treeFracSecDec": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Secondary Deciduous Tree Cover Fraction",
"comment": "Percentage of entire grid cell that is covered by secondary deciduous trees.",
@@ -899,10 +950,11 @@
"ok_max_mean_abs": ""
},
"treeFracSecEver": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "area_fraction",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land over all_area_types time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Secondary Evergreen Tree Cover Fraction",
"comment": "Percentage of entire grid cell that is covered by secondary evergreen trees.",
@@ -916,10 +968,11 @@
"ok_max_mean_abs": ""
},
"tsl": {
+ "frequency": "mon",
"modeling_realm": "land",
"standard_name": "soil_temperature",
"units": "K",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
"long_name": "Temperature of Soil",
"comment": "Temperature of each soil layer. Reported as missing for grid cells with no land.",
diff --git a/TestTables/CMIP6_Oclim.json b/TestTables/CMIP6_Oclim.json
index 02897a0..c6966c1 100644
--- a/TestTables/CMIP6_Oclim.json
+++ b/TestTables/CMIP6_Oclim.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Oclim",
"realm": "ocean",
- "frequency": "monClim",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"difmxybo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_momentum_xy_biharmonic_diffusivity",
"units": "m4 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Momentum XY Biharmonic Diffusivity",
"comment": "Lateral biharmonic viscosity applied to the momentum equitions.",
@@ -32,15 +32,16 @@
"ok_max_mean_abs": ""
},
"difmxybo2d": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_momentum_xy_biharmonic_diffusivity",
"units": "m4 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello",
"long_name": "Ocean Momentum XY Biharmonic Diffusivity",
"comment": "Lateral biharmonic viscosity applied to the momentum equitions.",
"dimensions": "longitude latitude time2",
- "out_name": "difmxybo2d",
+ "out_name": "difmxybo",
"type": "real",
"positive": "",
"valid_min": "",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"difmxylo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_momentum_xy_laplacian_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Momentum XY Laplacian Diffusivity",
"comment": "Lateral Laplacian viscosity applied to the momentum equitions.",
@@ -66,15 +68,16 @@
"ok_max_mean_abs": ""
},
"difmxylo2d": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_momentum_xy_laplacian_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello",
"long_name": "Ocean Momentum XY Laplacian Diffusivity",
"comment": "Lateral Laplacian viscosity applied to the momentum equitions.",
"dimensions": "longitude latitude time2",
- "out_name": "difmxylo2d",
+ "out_name": "difmxylo",
"type": "real",
"positive": "",
"valid_min": "",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"diftrbbo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_bolus_biharmonic_diffusivity",
"units": "m4 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Tracer Bolus Biharmonic Diffusivity",
"comment": "",
@@ -100,15 +104,16 @@
"ok_max_mean_abs": ""
},
"diftrbbo2d": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_bolus_biharmonic_diffusivity",
"units": "m4 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello",
"long_name": "Ocean Tracer Bolus Biharmonic Diffusivity",
"comment": "",
"dimensions": "longitude latitude time2",
- "out_name": "diftrbbo2d",
+ "out_name": "diftrbbo",
"type": "real",
"positive": "",
"valid_min": "",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"diftrblo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_bolus_laplacian_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Tracer Bolus Laplacian Diffusivity",
"comment": "Ocean tracer diffusivity associated with parameterized eddy-induced advective transport. Sometimes this diffusivity is called the 'thickness' diffusivity. For CMIP5, this diagnostic was called 'ocean tracer bolus laplacian diffusivity'. The CMIP6 name is physically more relevant.",
@@ -134,15 +140,16 @@
"ok_max_mean_abs": ""
},
"diftrblo2d": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_bolus_laplacian_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello",
"long_name": "Ocean Tracer Bolus Laplacian Diffusivity",
"comment": "Ocean tracer diffusivity associated with parameterized eddy-induced advective transport. Sometimes this diffusivity is called the 'thickness' diffusivity. For CMIP5, this diagnostic was called 'ocean tracer bolus laplacian diffusivity'. The CMIP6 name is physically more relevant.",
"dimensions": "longitude latitude time2",
- "out_name": "diftrblo2d",
+ "out_name": "diftrblo",
"type": "real",
"positive": "",
"valid_min": "",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"diftrebo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_epineutral_biharmonic_diffusivity",
"units": "m4 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Tracer Epineutral Biharmonic Diffusivity",
"comment": "",
@@ -168,15 +176,16 @@
"ok_max_mean_abs": ""
},
"diftrebo2d": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_epineutral_biharmonic_diffusivity",
"units": "m4 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello",
"long_name": "Ocean Tracer Epineutral Biharmonic Diffusivity",
"comment": "",
"dimensions": "longitude latitude time2",
- "out_name": "diftrebo2d",
+ "out_name": "diftrebo",
"type": "real",
"positive": "",
"valid_min": "",
@@ -185,10 +194,11 @@
"ok_max_mean_abs": ""
},
"diftrelo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_epineutral_laplacian_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Tracer Epineutral Laplacian Diffusivity",
"comment": "Ocean tracer diffusivity associated with parameterized eddy-induced diffusive transport oriented along neutral or isopycnal directions. Sometimes this diffusivity is called the neutral diffusivity or isopycnal diffusivity or Redi diffusivity.",
@@ -202,15 +212,16 @@
"ok_max_mean_abs": ""
},
"diftrelo2d": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_epineutral_laplacian_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello",
"long_name": "Ocean Tracer Epineutral Laplacian Diffusivity",
"comment": "Ocean tracer diffusivity associated with parameterized eddy-induced diffusive transport oriented along neutral or isopycnal directions. Sometimes this diffusivity is called the neutral diffusivity or isopycnal diffusivity or Redi diffusivity.",
"dimensions": "longitude latitude time2",
- "out_name": "diftrelo2d",
+ "out_name": "diftrelo",
"type": "real",
"positive": "",
"valid_min": "",
@@ -219,10 +230,11 @@
"ok_max_mean_abs": ""
},
"diftrxybo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_xy_biharmonic_diffusivity",
"units": "m4 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Tracer XY Biharmonic Diffusivity",
"comment": "",
@@ -236,15 +248,16 @@
"ok_max_mean_abs": ""
},
"diftrxybo2d": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_xy_biharmonic_diffusivity",
"units": "m4 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello",
"long_name": "Ocean Tracer XY Biharmonic Diffusivity",
"comment": "",
"dimensions": "longitude latitude time2",
- "out_name": "diftrxybo2d",
+ "out_name": "diftrxybo",
"type": "real",
"positive": "",
"valid_min": "",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"diftrxylo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_xy_laplacian_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Tracer XY Laplacian Diffusivity",
"comment": "",
@@ -270,15 +284,16 @@
"ok_max_mean_abs": ""
},
"diftrxylo2d": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_xy_laplacian_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello",
"long_name": "Ocean Tracer XY Laplacian Diffusivity",
"comment": "",
"dimensions": "longitude latitude time2",
- "out_name": "diftrxylo2d",
+ "out_name": "diftrxylo",
"type": "real",
"positive": "",
"valid_min": "",
@@ -287,10 +302,11 @@
"ok_max_mean_abs": ""
},
"difvho": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_vertical_heat_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Vertical Heat Diffusivity",
"comment": "Vertical/dianeutral diffusivity applied to prognostic temperature field.",
@@ -304,10 +320,11 @@
"ok_max_mean_abs": ""
},
"difvmbo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_vertical_momentum_diffusivity_due_to_background",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Vertical Momentum Diffusivity due to Background",
"comment": "",
@@ -321,10 +338,11 @@
"ok_max_mean_abs": ""
},
"difvmfdo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_vertical_momentum_diffusivity_due_to_form_drag",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Vertical Momentum Diffusivity due to Form Drag",
"comment": "",
@@ -338,10 +356,11 @@
"ok_max_mean_abs": ""
},
"difvmo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_vertical_momentum_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Vertical Momentum Diffusivity",
"comment": "",
@@ -355,10 +374,11 @@
"ok_max_mean_abs": ""
},
"difvmto": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_vertical_momentum_diffusivity_due_to_tides",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Vertical Momentum Diffusivity due to Tides",
"comment": "",
@@ -372,10 +392,11 @@
"ok_max_mean_abs": ""
},
"difvso": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_vertical_salt_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Vertical Salt Diffusivity",
"comment": "Vertical/dianeutral diffusivity applied to prognostic salinity field.",
@@ -389,10 +410,11 @@
"ok_max_mean_abs": ""
},
"difvtrbo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_vertical_tracer_diffusivity_due_to_background",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Vertical Tracer Diffusivity due to Background",
"comment": "",
@@ -406,10 +428,11 @@
"ok_max_mean_abs": ""
},
"difvtrto": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_vertical_tracer_diffusivity_due_to_tides",
"units": "m2 s-1",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Vertical Tracer Diffusivity due to Tides",
"comment": "",
@@ -423,10 +446,11 @@
"ok_max_mean_abs": ""
},
"dispkevfo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_kinetic_energy_dissipation_per_unit_area_due_to_vertical_friction",
"units": "W m-2",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Kinetic Energy Dissipation Per Unit Area due to Vertical Friction",
"comment": "",
@@ -440,10 +464,11 @@
"ok_max_mean_abs": ""
},
"dispkexyfo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction",
"units": "W m-2",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Kinetic Energy Dissipation Per Unit Area due to XY Friction",
"comment": "Depth integrated impacts on kinetic energy arising from lateral frictional dissipation associated with Laplacian and/or biharmonic viscosity. For CMIP5, this diagnostic was 3d, whereas the CMIP6 depth integrated diagnostic is sufficient for many purposes and reduces archive requirements.",
@@ -457,15 +482,16 @@
"ok_max_mean_abs": ""
},
"dispkexyfo2d": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction",
"units": "W m-2",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello",
"long_name": "Ocean Kinetic Energy Dissipation Per Unit Area due to XY Friction",
"comment": "Depth integrated impacts on kinetic energy arising from lateral frictional dissipation associated with Laplacian and/or biharmonic viscosity. For CMIP5, this diagnostic was 3d, whereas the CMIP6 depth integrated diagnostic is sufficient for many purposes and reduces archive requirements.",
"dimensions": "longitude latitude time2",
- "out_name": "dispkexyfo2d",
+ "out_name": "dispkexyfo",
"type": "real",
"positive": "",
"valid_min": "",
@@ -474,10 +500,11 @@
"ok_max_mean_abs": ""
},
"tnkebto": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport",
"units": "W m-2",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Tendency of Ocean Eddy Kinetic Energy Content due to Bolus Transport",
"comment": "Depth integrated impacts on kinetic energy arising from parameterized eddy-induced advection. For CMIP5, this diagnostic was 3d, whereas the CMIP6 depth integrated diagnostic is sufficient for many purposes and reduces archive requirements.",
@@ -491,15 +518,16 @@
"ok_max_mean_abs": ""
},
"tnkebto2d": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport",
"units": "W m-2",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello",
"long_name": "Tendency of Ocean Eddy Kinetic Energy Content due to Bolus Transport",
"comment": "Depth integrated impacts on kinetic energy arising from parameterized eddy-induced advection. For CMIP5, this diagnostic was 3d, whereas the CMIP6 depth integrated diagnostic is sufficient for many purposes and reduces archive requirements.",
"dimensions": "longitude latitude time2",
- "out_name": "tnkebto2d",
+ "out_name": "tnkebto",
"type": "real",
"positive": "",
"valid_min": "",
@@ -508,10 +536,11 @@
"ok_max_mean_abs": ""
},
"tnpeo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "tendency_of_ocean_potential_energy_content",
"units": "W m-2",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Tendency of Ocean Potential Energy Content",
"comment": "Rate that work is done against vertical stratification, as measured by the vertical heat and salt diffusivity. Report here as depth integrated two-dimensional field.",
@@ -525,10 +554,11 @@
"ok_max_mean_abs": ""
},
"tnpeot": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "tendency_of_ocean_potential_energy_content_due_to_tides",
"units": "W m-2",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Tendency of Ocean Potential Energy Content due to Tides",
"comment": "",
@@ -542,10 +572,11 @@
"ok_max_mean_abs": ""
},
"tnpeotb": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "tendency_of_ocean_potential_energy_content_due_to_background",
"units": "W m-2",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Tendency of Ocean Potential Energy Content due to Background",
"comment": "",
@@ -559,10 +590,11 @@
"ok_max_mean_abs": ""
},
"zfullo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "depth_below_geoid",
"units": "m",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Depth Below Geoid of Ocean Layer",
"comment": "Depth below geoid",
@@ -576,10 +608,11 @@
"ok_max_mean_abs": ""
},
"zhalfo": {
+ "frequency": "monClim",
"modeling_realm": "ocean",
"standard_name": "depth_below_geoid",
"units": "m",
- "cell_methods": "time: mean within years time: mean over years",
+ "cell_methods": "area: mean time: mean within years time: mean over years",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Depth Below Geoid of Interfaces Between Ocean Layers",
"comment": "Depth below geoid",
diff --git a/TestTables/CMIP6_Oday.json b/TestTables/CMIP6_Oday.json
index da22d8e..9bc48c8 100644
--- a/TestTables/CMIP6_Oday.json
+++ b/TestTables/CMIP6_Oday.json
@@ -1,25 +1,25 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Oday",
- "realm": "ocnBgchem",
- "frequency": "day",
+ "realm": "ocnBgChem",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "1.00000",
- "generic_levels": "",
+ "generic_levels": "olevel",
"mip_era": "CMIP6",
"Conventions": "CF-1.7 CMIP-6.0"
},
"variable_entry": {
"chlos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "day",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_phytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Sea Surface Total Chlorophyll Mass Concentration",
"comment": "Sum of chlorophyll from all phytoplankton group concentrations at the sea surface. In most models this is equal to chldiat+chlmisc, that is the sum of 'Diatom Chlorophyll Mass Concentration' plus 'Other Phytoplankton Chlorophyll Mass Concentration'",
"dimensions": "longitude latitude time",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"omldamax": {
+ "frequency": "day",
"modeling_realm": "ocean",
"standard_name": "ocean_mixed_layer_thickness_defined_by_mixing_scheme",
"units": "m",
@@ -49,11 +50,12 @@
"ok_max_mean_abs": ""
},
"phycos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "day",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Sea Surface Phytoplankton Carbon Concentration",
"comment": "sum of phytoplankton organic carbon component concentrations at the sea surface",
"dimensions": "longitude latitude time",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"sos": {
+ "frequency": "day",
"modeling_realm": "ocean",
"standard_name": "sea_surface_salinity",
"units": "0.001",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Sea Surface Salinity",
"comment": "",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"sossq": {
+ "frequency": "day",
"modeling_realm": "ocean",
"standard_name": "square_of_sea_surface_salinity",
"units": "1e-06",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Square of Sea Surface Salinity",
"comment": "",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"tos": {
+ "frequency": "day",
"modeling_realm": "ocean",
- "standard_name": "surface_temperature",
+ "standard_name": "sea_surface_temperature",
"units": "K",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Sea Surface Temperature",
"comment": "temperature of liquid ocean. Note that the correct standard_name for this variable is 'sea_surface_temperature', not 'surface_temperature', but this was discovered too late to correct. To maintain consistency across CMIP5 models, the wrong standard_name will continue to be used.",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"tossq": {
+ "frequency": "day",
"modeling_realm": "ocean",
"standard_name": "square_of_sea_surface_temperature",
"units": "degC2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Square of Sea Surface Temperature",
"comment": "square of temperature of liquid ocean, averaged over the day.",
diff --git a/TestTables/CMIP6_Odec.json b/TestTables/CMIP6_Odec.json
index 8793ec3..9afd924 100644
--- a/TestTables/CMIP6_Odec.json
+++ b/TestTables/CMIP6_Odec.json
@@ -1,24 +1,24 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Odec",
"realm": "ocean",
- "frequency": "dec",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
- "approx_interval": "",
- "generic_levels": "",
+ "approx_interval": "3650.00000",
+ "generic_levels": "olevel",
"mip_era": "CMIP6",
"Conventions": "CF-1.7 CMIP-6.0"
},
"variable_entry": {
"agessc": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_water_age_since_surface_contact",
"units": "yr",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sea Water Age Since Surface Contact",
"comment": "Time elapsed since water was last in surface layer of the ocean.",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"bigthetaoga": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_water_conservative_temperature",
"units": "degC",
@@ -49,11 +50,12 @@
"ok_max_mean_abs": ""
},
"hfbasin": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_heat_transport",
"units": "W",
"cell_methods": "longitude: mean (basin) time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "Northward Ocean Heat Transport",
"comment": "Contains contributions from all physical processes affecting the northward heat transport, including resolved advection, parameterized advection, lateral diffusion, etc. Diagnosed here as a function of latitude and basin. Use Celsius for temperature scale.",
"dimensions": "latitude basin time",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"hfds": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "surface_downward_heat_flux_in_sea_water",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Downward Heat Flux at Sea Water Surface",
"comment": "This is the net flux of heat entering the liquid water column through its upper surface (excluding any 'flux adjustment') .",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"masso": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_water_mass",
"units": "kg",
@@ -100,11 +104,12 @@
"ok_max_mean_abs": ""
},
"msftmyz": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "ocean_meridional_overturning_mass_streamfunction",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean (comment: basin mean[ along zig-zag grid path]) time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Ocean Meridional Overturning Mass Streamfunction",
"comment": "Overturning mass streamfunction arising from all advective mass transport processes, resolved and parameterized.",
"dimensions": "latitude olevel basin time",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"sfdsi": {
+ "frequency": "dec",
"modeling_realm": "ocean seaIce",
"standard_name": "downward_sea_ice_basal_salt_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Downward Sea Ice Basal Salt Flux",
"comment": "This field is physical, and it arises since sea ice has a nonzero salt content, so it exchanges salt with the liquid ocean upon melting and freezing.",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"sfriver": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "salt_flux_into_sea_water_from_rivers",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Salt Flux into Sea Water from Rivers",
"comment": "This field is physical, and it arises when rivers carry a nonzero salt content. Often this is zero, with rivers assumed to be fresh.",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"so": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_water_salinity",
"units": "0.001",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sea Water Salinity",
"comment": "",
@@ -168,6 +176,7 @@
"ok_max_mean_abs": ""
},
"soga": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_water_salinity",
"units": "0.001",
@@ -185,10 +194,11 @@
"ok_max_mean_abs": ""
},
"sos": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_surface_salinity",
"units": "0.001",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Sea Surface Salinity",
"comment": "",
@@ -202,10 +212,11 @@
"ok_max_mean_abs": ""
},
"sosga": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_surface_salinity",
"units": "0.001",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "",
"long_name": "Global Average Sea Surface Salinity",
"comment": "",
@@ -219,10 +230,11 @@
"ok_max_mean_abs": ""
},
"tauuo": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "surface_downward_x_stress",
"units": "N m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Surface Downward X Stress",
"comment": "This is the stress on the liquid ocean from overlying atmosphere, sea ice, ice shelf, etc.",
@@ -236,10 +248,11 @@
"ok_max_mean_abs": ""
},
"tauvo": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "surface_downward_y_stress",
"units": "N m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Surface Downward Y Stress",
"comment": "This is the stress on the liquid ocean from overlying atmosphere, sea ice, ice shelf, etc.",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"thetao": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_water_potential_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sea Water Potential Temperature",
"comment": "Diagnostic should be contributed even for models using conservative temperature as prognostic field.",
@@ -270,6 +284,7 @@
"ok_max_mean_abs": ""
},
"thetaoga": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_water_potential_temperature",
"units": "degC",
@@ -287,10 +302,11 @@
"ok_max_mean_abs": ""
},
"thkcello": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "cell_thickness",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Model Cell Thickness",
"comment": "",
@@ -304,10 +320,11 @@
"ok_max_mean_abs": ""
},
"tos": {
+ "frequency": "dec",
"modeling_realm": "ocean",
- "standard_name": "surface_temperature",
+ "standard_name": "sea_surface_temperature",
"units": "K",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Sea Surface Temperature",
"comment": "temperature of liquid ocean. Note that the correct standard_name for this variable is 'sea_surface_temperature', not 'surface_temperature', but this was discovered too late to correct. To maintain consistency across CMIP5 models, the wrong standard_name will continue to be used.",
@@ -321,10 +338,11 @@
"ok_max_mean_abs": ""
},
"tosga": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_surface_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "",
"long_name": "Global Average Sea Surface Temperature",
"comment": "This may differ from 'surface temperature' in regions of sea ice.This may differ from 'surface temperature' in regions of sea ice.For models using conservative temperature as prognostic field, they should report the SST as surface potent",
@@ -338,6 +356,7 @@
"ok_max_mean_abs": ""
},
"uo": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_water_x_velocity",
"units": "m s-1",
@@ -355,6 +374,7 @@
"ok_max_mean_abs": ""
},
"vo": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_water_y_velocity",
"units": "m s-1",
@@ -372,6 +392,7 @@
"ok_max_mean_abs": ""
},
"volo": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "sea_water_volume",
"units": "m3",
@@ -389,10 +410,11 @@
"ok_max_mean_abs": ""
},
"wfo": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "water_flux_into_sea_water",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Water Flux into Sea Water",
"comment": "computed as the water flux into the ocean divided by the area of the ocean portion of the grid cell. This is the sum of the next two variables in this table.",
@@ -406,6 +428,7 @@
"ok_max_mean_abs": ""
},
"wo": {
+ "frequency": "dec",
"modeling_realm": "ocean",
"standard_name": "upward_sea_water_velocity",
"units": "m s-1",
diff --git a/TestTables/CMIP6_Ofx.json b/TestTables/CMIP6_Ofx.json
index 1d94f51..bea001f 100644
--- a/TestTables/CMIP6_Ofx.json
+++ b/TestTables/CMIP6_Ofx.json
@@ -1,20 +1,20 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Ofx",
"realm": "ocean",
- "frequency": "fx",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
- "approx_interval": "",
- "generic_levels": "",
+ "approx_interval": "0.00000",
+ "generic_levels": "olevel",
"mip_era": "CMIP6",
"Conventions": "CF-1.7 CMIP-6.0"
},
"variable_entry": {
"areacello": {
+ "frequency": "fx",
"modeling_realm": "ocean",
"standard_name": "cell_area",
"units": "m2",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"basin": {
+ "frequency": "fx",
"modeling_realm": "ocean",
"standard_name": "region",
"units": "1.0",
@@ -45,11 +46,13 @@
"positive": "",
"valid_min": "",
"valid_max": "",
+ "flag_values": "0 1 2 3 4 5 6 7 8 9 10",
"flag_meanings": "global_land southern_ocean atlantic_ocean pacific_ocean arctic_ocean indian_ocean mediterranean_sea black_sea hudson_bay baltic_sea red_sea",
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
"deptho": {
+ "frequency": "fx",
"modeling_realm": "ocean",
"standard_name": "sea_floor_depth_below_geoid",
"units": "m",
@@ -67,6 +70,7 @@
"ok_max_mean_abs": ""
},
"hfgeou": {
+ "frequency": "fx",
"modeling_realm": "ocean",
"standard_name": "upward_geothermal_heat_flux_at_sea_floor",
"units": "W m-2",
@@ -84,6 +88,7 @@
"ok_max_mean_abs": ""
},
"masscello": {
+ "frequency": "fx",
"modeling_realm": "ocean",
"standard_name": "sea_water_mass_per_unit_area",
"units": "kg m-2",
@@ -101,6 +106,7 @@
"ok_max_mean_abs": ""
},
"sftof": {
+ "frequency": "fx",
"modeling_realm": "ocean",
"standard_name": "sea_area_fraction",
"units": "%",
@@ -108,7 +114,7 @@
"cell_measures": "area: areacello",
"long_name": "Sea Area Fraction",
"comment": "This is the area fraction at the ocean surface.",
- "dimensions": "longitude latitude",
+ "dimensions": "longitude latitude typesea",
"out_name": "sftof",
"type": "real",
"positive": "",
@@ -118,6 +124,7 @@
"ok_max_mean_abs": ""
},
"thkcello": {
+ "frequency": "fx",
"modeling_realm": "ocean",
"standard_name": "cell_thickness",
"units": "m",
@@ -134,7 +141,26 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "ugrid": {
+ "frequency": "fx",
+ "modeling_realm": "ocean",
+ "standard_name": "missing",
+ "units": "",
+ "cell_methods": "",
+ "cell_measures": "--UGRID",
+ "long_name": "UGRID Grid Information",
+ "comment": "",
+ "dimensions": "longitude latitude",
+ "out_name": "ugrido",
+ "type": "float",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"volcello": {
+ "frequency": "fx",
"modeling_realm": "ocean",
"standard_name": "ocean_volume",
"units": "m3",
diff --git a/TestTables/CMIP6_Omon.json b/TestTables/CMIP6_Omon.json
index a2b9fe2..3ef40b3 100644
--- a/TestTables/CMIP6_Omon.json
+++ b/TestTables/CMIP6_Omon.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Omon",
- "realm": "ocnBgchem",
- "frequency": "mon",
+ "realm": "ocnBgChem",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"agessc": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_age_since_surface_contact",
"units": "yr",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sea Water Age Since Surface Contact",
"comment": "Time elapsed since water was last in surface layer of the ocean.",
@@ -32,7 +32,8 @@
"ok_max_mean_abs": ""
},
"arag": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_aragonite_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -49,11 +50,12 @@
"ok_max_mean_abs": ""
},
"aragos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_aragonite_epressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Aragonite Concentration",
"comment": "sum of particulate aragonite components (e.g. Phytoplankton, Detrital, etc.)",
"dimensions": "longitude latitude time",
@@ -66,7 +68,8 @@
"ok_max_mean_abs": ""
},
"bacc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_bacteria_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -83,11 +86,12 @@
"ok_max_mean_abs": ""
},
"baccos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_bacteria_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Bacterial Carbon Concentration",
"comment": "sum of bacterial carbon component concentrations",
"dimensions": "longitude latitude time",
@@ -100,7 +104,8 @@
"ok_max_mean_abs": ""
},
"bfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_particulate_organic_matter_expressed_as_iron_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -117,11 +122,12 @@
"ok_max_mean_abs": ""
},
"bfeos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_particulate_organic_matter_expressed_as_iron_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Particulate Organic Matter expressed as Iron in sea water",
"comment": "sum of particulate organic iron component concentrations",
"dimensions": "longitude latitude time",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"bigthetao": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_conservative_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sea Water Convervative Temperature",
"comment": "Sea water conservative temperature (this should be contributed only for models using conservative temperature as prognostic field)",
@@ -151,6 +158,7 @@
"ok_max_mean_abs": ""
},
"bigthetaoga": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_conservative_temperature",
"units": "degC",
@@ -168,7 +176,8 @@
"ok_max_mean_abs": ""
},
"bsi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_particulate_matter_expressed_as_silicon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -185,11 +194,12 @@
"ok_max_mean_abs": ""
},
"bsios": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_particulate_matter_expressed_as_silicon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Particulate Organic Matter expressed as Silicon in sea water",
"comment": "sum of particulate silica component concentrations",
"dimensions": "longitude latitude time",
@@ -202,7 +212,8 @@
"ok_max_mean_abs": ""
},
"calc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_calcite_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -219,11 +230,12 @@
"ok_max_mean_abs": ""
},
"calcos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_calcite_epressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Calcite Concentration",
"comment": "sum of particulate calcite component concentrations (e.g. Phytoplankton, Detrital, etc.)",
"dimensions": "longitude latitude time",
@@ -236,10 +248,11 @@
"ok_max_mean_abs": ""
},
"cfc11": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "mole_concentration_of_cfc11_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Moles Per Unit Mass of CFC-11 in sea water",
"comment": "",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"cfc12": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "mole_concentration_of_cfc12_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Moles Per Unit Mass of CFC-12 in sea water",
"comment": "",
@@ -270,7 +284,8 @@
"ok_max_mean_abs": ""
},
"chl": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_phytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -287,7 +302,8 @@
"ok_max_mean_abs": ""
},
"chlcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_calcareous_phytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -304,11 +320,12 @@
"ok_max_mean_abs": ""
},
"chlcalcos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_calcareous_phytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mass Concentration of Calcareous Phytoplankton expressed as Chlorophyll in sea water",
"comment": "chlorophyll concentration from the calcite-producing phytoplankton component alone",
"dimensions": "longitude latitude time",
@@ -321,7 +338,8 @@
"ok_max_mean_abs": ""
},
"chldiat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_diatoms_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -338,11 +356,12 @@
"ok_max_mean_abs": ""
},
"chldiatos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_diatoms_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mass Concentration of Diatoms expressed as Chlorophyll in sea water",
"comment": "chlorophyll from diatom phytoplankton component concentration alone",
"dimensions": "longitude latitude time",
@@ -355,7 +374,8 @@
"ok_max_mean_abs": ""
},
"chldiaz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_diazotrophs_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -372,11 +392,12 @@
"ok_max_mean_abs": ""
},
"chldiazos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_diazotrophs_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mass Concentration of Diazotrophs expressed as Chlorophyll in sea water",
"comment": "chlorophyll concentration from the diazotrophic phytoplankton component alone",
"dimensions": "longitude latitude time",
@@ -389,7 +410,8 @@
"ok_max_mean_abs": ""
},
"chlmisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_miscellaneous_phytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -406,11 +428,12 @@
"ok_max_mean_abs": ""
},
"chlmiscos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_miscellaneous_phytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mass Concentration of Other Phytoplankton expressed as Chlorophyll in sea water",
"comment": "chlorophyll from additional phytoplankton component concentrations alone",
"dimensions": "longitude latitude time",
@@ -423,11 +446,12 @@
"ok_max_mean_abs": ""
},
"chlos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_phytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mass Concentration of Total Phytoplankton expressed as Chlorophyll in sea water",
"comment": "Sum of chlorophyll from all phytoplankton group concentrations at the sea surface. In most models this is equal to chldiat+chlmisc, that is the sum of 'Diatom Chlorophyll Mass Concentration' plus 'Other Phytoplankton Chlorophyll Mass Concentration'",
"dimensions": "longitude latitude time",
@@ -440,7 +464,8 @@
"ok_max_mean_abs": ""
},
"chlpico": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_picophytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -457,11 +482,12 @@
"ok_max_mean_abs": ""
},
"chlpicoos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_picophytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mass Concentration of Picophytoplankton expressed as Chlorophyll in sea water",
"comment": "chlorophyll concentration from the picophytoplankton (<2 um) component alone",
"dimensions": "longitude latitude time",
@@ -474,7 +500,8 @@
"ok_max_mean_abs": ""
},
"co3": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_carbonate_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -491,7 +518,8 @@
"ok_max_mean_abs": ""
},
"co3abio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_carbonate_expressed_as_carbon_in_sea_water_due_to_abiotic_component",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -508,11 +536,12 @@
"ok_max_mean_abs": ""
},
"co3abioos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_carbonate_expressed_as_carbon_in_sea_water_due_to_abiotic_component",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Abiotic Carbonate ion Concentration",
"comment": "",
"dimensions": "longitude latitude time",
@@ -525,7 +554,8 @@
"ok_max_mean_abs": ""
},
"co3nat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_carbonate_expressed_as_carbon_in_sea_water_due_to_natural_component",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -542,11 +572,12 @@
"ok_max_mean_abs": ""
},
"co3natos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_carbonate_expressed_as_carbon_in_sea_water_due_to_natural_component",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Natural Carbonate ion Concentration",
"comment": "",
"dimensions": "longitude latitude time",
@@ -559,11 +590,12 @@
"ok_max_mean_abs": ""
},
"co3os": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_carbonate_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Carbonate ion Concentration",
"comment": "",
"dimensions": "longitude latitude time",
@@ -576,7 +608,8 @@
"ok_max_mean_abs": ""
},
"co3satarag": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_aragonite_expressed_as_carbon_in_sea_water_at_saturation",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -593,11 +626,12 @@
"ok_max_mean_abs": ""
},
"co3sataragos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_carbonate_expressed_as_carbon_for_sea_water_in_equilibrium_with_pure_aragonite",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Carbonate Ion in Equilibrium with Pure Aragonite in sea water",
"comment": "",
"dimensions": "longitude latitude time",
@@ -610,7 +644,8 @@
"ok_max_mean_abs": ""
},
"co3satcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_calcite_expressed_as_carbon_in_sea_water_at_saturation",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -627,11 +662,12 @@
"ok_max_mean_abs": ""
},
"co3satcalcos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_carbonate_expressed_as_carbon_for_sea_water_in_equilibrium_with_pure_calcite",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Carbonate Ion in Equilibrium with Pure Calcite in sea water",
"comment": "",
"dimensions": "longitude latitude time",
@@ -644,7 +680,8 @@
"ok_max_mean_abs": ""
},
"detoc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_organic_detritus_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -661,11 +698,12 @@
"ok_max_mean_abs": ""
},
"detocos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_organic_detritus_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Detrital Organic Carbon Concentration",
"comment": "sum of detrital organic carbon component concentrations",
"dimensions": "longitude latitude time",
@@ -678,7 +716,8 @@
"ok_max_mean_abs": ""
},
"dfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_iron_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -695,11 +734,12 @@
"ok_max_mean_abs": ""
},
"dfeos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dissolved_iron_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Dissolved Iron Concentration",
"comment": "dissolved iron in sea water is meant to include both Fe2+ and Fe3+ ions (but not, e.g., particulate detrital iron)",
"dimensions": "longitude latitude time",
@@ -712,7 +752,8 @@
"ok_max_mean_abs": ""
},
"dissi13c": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon13_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -729,11 +770,12 @@
"ok_max_mean_abs": ""
},
"dissi13cos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dissolved_inorganic_carbon13_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Dissolved Inorganic 13Carbon Concentration",
"comment": "Dissolved inorganic 14carbon (CO3+HCO3+H2CO3) concentration",
"dimensions": "longitude latitude time",
@@ -746,7 +788,8 @@
"ok_max_mean_abs": ""
},
"dissi14cabio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon14_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -763,11 +806,12 @@
"ok_max_mean_abs": ""
},
"dissi14cabioos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dissolved_inorganic_carbon14_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Abiotic Dissolved Inorganic 14Carbon Concentration",
"comment": "Abiotic Dissolved inorganic 14carbon (CO3+HCO3+H2CO3) concentration",
"dimensions": "longitude latitude time",
@@ -780,7 +824,8 @@
"ok_max_mean_abs": ""
},
"dissic": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -797,7 +842,8 @@
"ok_max_mean_abs": ""
},
"dissicabio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon_in_sea_water_abiotic_component",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -814,11 +860,12 @@
"ok_max_mean_abs": ""
},
"dissicabioos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dissolved_inorganic_carbon_in_sea_water_due_to_abiotic_component",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Abiotic Dissolved Inorganic Carbon Concentration",
"comment": "Abiotic Dissolved inorganic carbon (CO3+HCO3+H2CO3) concentration",
"dimensions": "longitude latitude time",
@@ -831,7 +878,8 @@
"ok_max_mean_abs": ""
},
"dissicnat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon_in_sea_water_natural_component",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -848,11 +896,12 @@
"ok_max_mean_abs": ""
},
"dissicnatos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dissolved_inorganic_carbon_in_sea_water_due_to_natural_component",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Natural Dissolved Inorganic Carbon Concentration",
"comment": "Dissolved inorganic carbon (CO3+HCO3+H2CO3) concentration at preindustrial atmospheric xCO2",
"dimensions": "longitude latitude time",
@@ -865,11 +914,12 @@
"ok_max_mean_abs": ""
},
"dissicos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dissolved_inorganic_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Dissolved Inorganic Carbon Concentration",
"comment": "Dissolved inorganic carbon (CO3+HCO3+H2CO3) concentration",
"dimensions": "longitude latitude time",
@@ -882,7 +932,8 @@
"ok_max_mean_abs": ""
},
"dissoc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_organic_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -899,11 +950,12 @@
"ok_max_mean_abs": ""
},
"dissocos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dissolved_organic_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Dissolved Organic Carbon Concentration",
"comment": "Sum of dissolved carbon component concentrations explicitly represented (i.e. not ~40 uM refractory unless explicit)",
"dimensions": "longitude latitude time",
@@ -916,7 +968,8 @@
"ok_max_mean_abs": ""
},
"dms": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_fraction_of_dimethyl_sulfide_in_air",
"units": "mol mol-1",
"cell_methods": "area: mean where sea time: mean",
@@ -933,10 +986,11 @@
"ok_max_mean_abs": ""
},
"dmso": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dimethyl_sulfide_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Dimethyl Sulphide in sea water",
"comment": "Mole concentration of dimethyl sulphide in water",
@@ -950,11 +1004,12 @@
"ok_max_mean_abs": ""
},
"dmsos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dimethyl_sulfide_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Dimethyl Sulphide in sea water",
"comment": "",
"dimensions": "longitude latitude time",
@@ -967,7 +1022,8 @@
"ok_max_mean_abs": ""
},
"dpco2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_carbon_dioxide_partial_pressure_difference_between_sea_water_and_air",
"units": "Pa",
"cell_methods": "area: mean where sea time: mean",
@@ -984,7 +1040,8 @@
"ok_max_mean_abs": ""
},
"dpco2abio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_carbon_dioxide_partial_pressure_difference_between_sea_water_and_air_due_to_abiotic_component",
"units": "Pa",
"cell_methods": "area: mean where sea time: mean",
@@ -1001,7 +1058,8 @@
"ok_max_mean_abs": ""
},
"dpco2nat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_carbon_dioxide_partial_pressure_difference_between_sea_water_and_air_due_to_natural_component",
"units": "Pa",
"cell_methods": "area: mean where sea time: mean",
@@ -1018,7 +1076,8 @@
"ok_max_mean_abs": ""
},
"dpo2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_molecular_oxygen_partial_pressure_difference_between_sea_water_and_air",
"units": "Pa",
"cell_methods": "area: mean where sea time: mean",
@@ -1035,7 +1094,8 @@
"ok_max_mean_abs": ""
},
"eparag100": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_aragonite_expressed_as_carbon_in_sea_water",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1052,7 +1112,8 @@
"ok_max_mean_abs": ""
},
"epc100": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_organic_matter_expressed_as_carbon_in_sea_water",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1069,7 +1130,8 @@
"ok_max_mean_abs": ""
},
"epcalc100": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_calcite_expressed_as_carbon_in_sea_water",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1086,7 +1148,8 @@
"ok_max_mean_abs": ""
},
"epfe100": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_iron_in_sea_water",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1103,7 +1166,8 @@
"ok_max_mean_abs": ""
},
"epn100": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_nitrogen_in_sea_water",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1120,7 +1184,8 @@
"ok_max_mean_abs": ""
},
"epp100": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_phosphorus_in_sea_water",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1137,7 +1202,8 @@
"ok_max_mean_abs": ""
},
"epsi100": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_silicon_in_sea_water",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1154,6 +1220,7 @@
"ok_max_mean_abs": ""
},
"evs": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "water_evaporation_flux",
"units": "kg m-2 s-1",
@@ -1171,10 +1238,11 @@
"ok_max_mean_abs": ""
},
"expc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_organic_matter_expressed_as_carbon_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Particulate Organic Carbon Flux",
"comment": "Downward flux of particulate organic carbon",
@@ -1188,7 +1256,8 @@
"ok_max_mean_abs": ""
},
"fbddtalk": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "integral_wrt_depth_of_tendency_of_sea_water_alkalinity_expressed_as_mole_equivalent_due_to_biological_processes",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1205,7 +1274,8 @@
"ok_max_mean_abs": ""
},
"fbddtdic": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_carbon_due_to_biological_processes",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1222,7 +1292,8 @@
"ok_max_mean_abs": ""
},
"fbddtdife": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_iron_due_to_biological_processes",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1239,7 +1310,8 @@
"ok_max_mean_abs": ""
},
"fbddtdin": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_nitrogen_due_to_biological_processes",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1256,7 +1328,8 @@
"ok_max_mean_abs": ""
},
"fbddtdip": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_phosphorus_due_to_biological_processes",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1273,7 +1346,8 @@
"ok_max_mean_abs": ""
},
"fbddtdisi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_silicon_due_to_biological_processes",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1290,7 +1364,8 @@
"ok_max_mean_abs": ""
},
"fddtalk": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "integral_wrt_depth_of_tendency_of_sea_water_alkalinity_expressed_as_mole_equivalent",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1307,7 +1382,8 @@
"ok_max_mean_abs": ""
},
"fddtdic": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_carbon",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1324,7 +1400,8 @@
"ok_max_mean_abs": ""
},
"fddtdife": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_iron",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1341,7 +1418,8 @@
"ok_max_mean_abs": ""
},
"fddtdin": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_nitrogen",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1358,7 +1436,8 @@
"ok_max_mean_abs": ""
},
"fddtdip": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_phosphorus",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1375,7 +1454,8 @@
"ok_max_mean_abs": ""
},
"fddtdisi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_dissolved_inorganic_silicon",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea (top 100m only) time: mean",
@@ -1392,13 +1472,14 @@
"ok_max_mean_abs": ""
},
"fg13co2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "air_sea_flux_of_13CO2",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Surface Downward Flux of Abiotic 13CO2",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time depth0m",
"out_name": "fg13co2",
"type": "real",
@@ -1409,7 +1490,8 @@
"ok_max_mean_abs": ""
},
"fg14co2abio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mass_flux_of_abiotic_14_carbon_dioxide_expressed_as_carbon",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1426,10 +1508,11 @@
"ok_max_mean_abs": ""
},
"fgcfc11": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "surface_downward_mole_flux_of_cfc11",
"units": "mol sec-1 m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Surface Downward CFC11 flux",
"comment": "gas exchange flux of CFC11",
@@ -1443,10 +1526,11 @@
"ok_max_mean_abs": ""
},
"fgcfc12": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "surface_downward_mole_flux_of_cfc12",
"units": "mol sec-1 m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Surface Downward CFC12 flux",
"comment": "gas exchange flux of CFC12",
@@ -1460,7 +1544,8 @@
"ok_max_mean_abs": ""
},
"fgco2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mass_flux_of_carbon_dioxide_expressed_as_carbon",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1477,7 +1562,8 @@
"ok_max_mean_abs": ""
},
"fgco2abio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mass_flux_of_abiotic_carbon_dioxide_expressed_as_carbon",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1494,7 +1580,8 @@
"ok_max_mean_abs": ""
},
"fgco2nat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mass_flux_of_natural_carbon_dioxide_expressed_as_carbon",
"units": "kg m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1511,7 +1598,8 @@
"ok_max_mean_abs": ""
},
"fgdms": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_upward_mole_flux_of_dimethyl_sulfide",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1528,7 +1616,8 @@
"ok_max_mean_abs": ""
},
"fgo2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mole_flux_of_molecular_oxygen",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1545,10 +1634,11 @@
"ok_max_mean_abs": ""
},
"fgsf6": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "surface_downward_mole_flux_of_sf6",
"units": "mol sec-1 m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Surface Downward SF6 flux",
"comment": "gas exchange flux of SF6",
@@ -1562,10 +1652,11 @@
"ok_max_mean_abs": ""
},
"ficeberg": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "water_flux_into_sea_water_from_icebergs",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Water Flux into Sea Water From Icebergs",
"comment": "computed as the iceberg melt water flux into the ocean divided by the area of the ocean portion of the grid cell.",
@@ -1579,15 +1670,16 @@
"ok_max_mean_abs": ""
},
"ficeberg2d": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "water_flux_into_sea_water_from_icebergs",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Water Flux into Sea Water From Icebergs",
"comment": "computed as the iceberg melt water flux into the ocean divided by the area of the ocean portion of the grid cell.",
"dimensions": "longitude latitude time",
- "out_name": "ficeberg2d",
+ "out_name": "ficeberg",
"type": "real",
"positive": "",
"valid_min": "",
@@ -1596,10 +1688,11 @@
"ok_max_mean_abs": ""
},
"frfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_iron_due_to_sedimentation",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Iron Loss to Sediments",
"comment": "",
@@ -1613,10 +1706,11 @@
"ok_max_mean_abs": ""
},
"fric": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_inorganic_carbon_due_to_sedimentation",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Downward Inorganic Carbon Flux at Ocean Bottom",
"comment": "Inorganic Carbon loss to sediments",
@@ -1630,10 +1724,11 @@
"ok_max_mean_abs": ""
},
"friver": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "water_flux_into_sea_water_from_rivers",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Water Flux into Sea Water From Rivers",
"comment": "computed as the river flux of water into the ocean divided by the area of the ocean portion of the grid cell.",
@@ -1647,10 +1742,11 @@
"ok_max_mean_abs": ""
},
"frn": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_elemental_nitrogen_due_to_denitrification_and_sedimentation",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Nitrogen Loss to Sediments and through Denitrification",
"comment": "",
@@ -1664,10 +1760,11 @@
"ok_max_mean_abs": ""
},
"froc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_organic_carbon_due_to_sedimentation",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Downward Organic Carbon Flux at Ocean Bottom",
"comment": "Organic Carbon loss to sediments",
@@ -1681,7 +1778,8 @@
"ok_max_mean_abs": ""
},
"fsfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_iron_due_to_deposition_and_runoff_and_sediment_dissolution",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1698,10 +1796,11 @@
"ok_max_mean_abs": ""
},
"fsitherm": {
+ "frequency": "mon",
"modeling_realm": "ocean seaIce",
"standard_name": "water_flux_into_sea_water_due_to_sea_ice_thermodynamics",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Water Flux into Sea Water due to Sea Ice Thermodynamics",
"comment": "computed as the sea ice thermodynamic water flux into the ocean divided by the area of the ocean portion of the grid cell.",
@@ -1715,7 +1814,8 @@
"ok_max_mean_abs": ""
},
"fsn": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_elemental_nitrogen_due_to_deposition_and_fixation_and_runoff",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -1732,10 +1832,11 @@
"ok_max_mean_abs": ""
},
"graz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_grazing_of_phytoplankton",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Total Grazing of Phytoplankton by Zooplankton",
"comment": "",
@@ -1749,11 +1850,12 @@
"ok_max_mean_abs": ""
},
"hfbasin": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_heat_transport",
"units": "W",
"cell_methods": "longitude: mean (basin) time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "Northward Ocean Heat Transport",
"comment": "Contains contributions from all physical processes affecting the northward heat transport, including resolved advection, parameterized advection, lateral diffusion, etc. Diagnosed here as a function of latitude and basin. Use Celsius for temperature scale.",
"dimensions": "latitude basin time",
@@ -1766,11 +1868,12 @@
"ok_max_mean_abs": ""
},
"hfbasinpadv": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_heat_transport_due_to_parameterized_eddy_advection",
"units": "W",
"cell_methods": "longitude: mean (basin) time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "northward ocean heat transport due to parameterized eddy advection",
"comment": "Contributions to heat transport from parameterized eddy-induced advective transport due to any subgrid advective process. Diagnosed here as a function of latitude and basin. Use Celsius for temperature scale.",
"dimensions": "latitude basin time",
@@ -1783,11 +1886,12 @@
"ok_max_mean_abs": ""
},
"hfbasinpmadv": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_heat_transport_due_to_parameterized_mesoscale_advection",
"units": "W",
"cell_methods": "longitude: mean (basin) time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "northward ocean heat transport due to parameterized mesoscale advection",
"comment": "Contributions to heat transport from parameterized mesoscale eddy-induced advective transport. Diagnosed here as a function of latitude and basin. Use Celsius for temperature scale.",
"dimensions": "latitude basin time",
@@ -1800,11 +1904,12 @@
"ok_max_mean_abs": ""
},
"hfbasinpmdiff": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_heat_transport_due_to_parameterized_mesoscale_diffusion",
"units": "W",
"cell_methods": "longitude: mean (basin) time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "northward ocean heat transport due to parameterized mesoscale diffusion",
"comment": "Contributions to heat transport from parameterized mesoscale eddy-induced diffusive transport (i.e., neutral diffusion). Diagnosed here as a function of latitude and basin.",
"dimensions": "latitude basin time",
@@ -1817,11 +1922,12 @@
"ok_max_mean_abs": ""
},
"hfbasinpsmadv": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_heat_transport_due_to_parameterized_submesoscale_advection",
"units": "W",
"cell_methods": "longitude: mean (basin) time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "northward ocean heat transport due to parameterized submesoscale advection",
"comment": "Contributions to heat transport from parameterized mesoscale eddy-induced advective transport. Diagnosed here as a function of latitude and basin. Use Celsius for temperature scale.",
"dimensions": "latitude basin time",
@@ -1834,10 +1940,11 @@
"ok_max_mean_abs": ""
},
"hfcorr": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "heat_flux_correction",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Heat Flux Correction",
"comment": "",
@@ -1851,10 +1958,11 @@
"ok_max_mean_abs": ""
},
"hfds": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "surface_downward_heat_flux_in_sea_water",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Downward Heat Flux at Sea Water Surface",
"comment": "This is the net flux of heat entering the liquid water column through its upper surface (excluding any 'flux adjustment') .",
@@ -1868,6 +1976,7 @@
"ok_max_mean_abs": ""
},
"hfevapds": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water",
"units": "W m-2",
@@ -1885,10 +1994,11 @@
"ok_max_mean_abs": ""
},
"hfgeou": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "upward_geothermal_heat_flux_at_sea_floor",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Upward Geothermal Heat Flux at Sea Floor",
"comment": "",
@@ -1902,10 +2012,11 @@
"ok_max_mean_abs": ""
},
"hfibthermds": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "heat_flux_into_sea_water_due_to_iceberg_thermodynamics",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Heat Flux into Sea Water due to Iceberg Thermodynamics",
"comment": "",
@@ -1919,15 +2030,16 @@
"ok_max_mean_abs": ""
},
"hfibthermds2d": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "heat_flux_into_sea_water_due_to_iceberg_thermodynamics",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Heat Flux into Sea Water due to Iceberg Thermodynamics",
"comment": "",
"dimensions": "longitude latitude time",
- "out_name": "hfibthermds2d",
+ "out_name": "hfibthermds",
"type": "real",
"positive": "",
"valid_min": "",
@@ -1936,6 +2048,7 @@
"ok_max_mean_abs": ""
},
"hflso": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "surface_downward_latent_heat_flux",
"units": "W m-2",
@@ -1953,6 +2066,7 @@
"ok_max_mean_abs": ""
},
"hfrainds": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "temperature_flux_due_to_rainfall_expressed_as_heat_flux_into_sea_water",
"units": "W m-2",
@@ -1970,10 +2084,11 @@
"ok_max_mean_abs": ""
},
"hfrunoffds": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Temperature Flux due to Runoff Expressed as Heat Flux into Sea Water",
"comment": "",
@@ -1987,15 +2102,16 @@
"ok_max_mean_abs": ""
},
"hfrunoffds2d": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Temperature Flux due to Runoff Expressed as Heat Flux into Sea Water",
"comment": "",
"dimensions": "longitude latitude time",
- "out_name": "hfrunoffds2d",
+ "out_name": "hfrunoffds",
"type": "real",
"positive": "",
"valid_min": "",
@@ -2004,10 +2120,11 @@
"ok_max_mean_abs": ""
},
"hfsifrazil": {
+ "frequency": "mon",
"modeling_realm": "ocean seaIce",
"standard_name": "heat_flux_into_sea_water_due_to_freezing_of_frazil_ice",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Heat Flux into Sea Water due to Frazil Ice Formation",
"comment": "",
@@ -2021,15 +2138,16 @@
"ok_max_mean_abs": ""
},
"hfsifrazil2d": {
+ "frequency": "mon",
"modeling_realm": "ocean seaIce",
"standard_name": "heat_flux_into_sea_water_due_to_freezing_of_frazil_ice",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Heat Flux into Sea Water due to Frazil Ice Formation",
"comment": "",
"dimensions": "longitude latitude time",
- "out_name": "hfsifrazil2d",
+ "out_name": "hfsifrazil",
"type": "real",
"positive": "",
"valid_min": "",
@@ -2038,10 +2156,11 @@
"ok_max_mean_abs": ""
},
"hfsnthermds": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "heat_flux_into_sea_water_due_to_snow_thermodynamics",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Heat Flux into Sea Water due to Snow Thermodynamics",
"comment": "",
@@ -2055,15 +2174,16 @@
"ok_max_mean_abs": ""
},
"hfsnthermds2d": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "heat_flux_into_sea_water_due_to_snow_thermodynamics",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Heat Flux into Sea Water due to Snow Thermodynamics",
"comment": "",
"dimensions": "longitude latitude time",
- "out_name": "hfsnthermds2d",
+ "out_name": "hfsnthermds",
"type": "real",
"positive": "",
"valid_min": "",
@@ -2072,6 +2192,7 @@
"ok_max_mean_abs": ""
},
"hfsso": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "surface_downward_sensible_heat_flux",
"units": "W m-2",
@@ -2089,6 +2210,7 @@
"ok_max_mean_abs": ""
},
"hfx": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_heat_x_transport",
"units": "W",
@@ -2106,6 +2228,7 @@
"ok_max_mean_abs": ""
},
"hfy": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_heat_y_transport",
"units": "W",
@@ -2123,11 +2246,12 @@
"ok_max_mean_abs": ""
},
"htovgyre": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_heat_transport_due_to_gyre",
"units": "W",
"cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "Northward Ocean Heat Transport due to Gyre",
"comment": "From all advective mass transport processes, resolved and parameterized.",
"dimensions": "latitude basin time",
@@ -2140,11 +2264,12 @@
"ok_max_mean_abs": ""
},
"htovovrt": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_heat_transport_due_to_overturning",
"units": "W",
"cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "Northward Ocean Heat Transport due to Overturning",
"comment": "From all advective mass transport processes, resolved and parameterized.",
"dimensions": "latitude basin time",
@@ -2157,7 +2282,8 @@
"ok_max_mean_abs": ""
},
"icfriver": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_inorganic_carbon_due_to_runoff_and_sediment_dissolution",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -2174,7 +2300,8 @@
"ok_max_mean_abs": ""
},
"intdic": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "ocean_mass_content_of_dissolved_inorganic_carbon",
"units": "kg m-2",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2191,7 +2318,8 @@
"ok_max_mean_abs": ""
},
"intdoc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "ocean_mass_content_of_dissolved_organic_carbon",
"units": "kg m-2",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2208,7 +2336,8 @@
"ok_max_mean_abs": ""
},
"intparag": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_aragonite_expressed_as_carbon_due_to_biological_production",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2225,7 +2354,8 @@
"ok_max_mean_abs": ""
},
"intpbfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_iron_due_to_biological_production",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2242,7 +2372,8 @@
"ok_max_mean_abs": ""
},
"intpbn": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_nitrogen_due_to_biological_production",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2259,7 +2390,8 @@
"ok_max_mean_abs": ""
},
"intpbp": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_phosphorus_due_to_biological_production",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2276,7 +2408,8 @@
"ok_max_mean_abs": ""
},
"intpbsi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_silicon_due_to_biological_production",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2293,7 +2426,8 @@
"ok_max_mean_abs": ""
},
"intpcalcite": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_calcite_expressed_as_carbon_due_to_biological_production",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2310,7 +2444,8 @@
"ok_max_mean_abs": ""
},
"intpn2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_elemental_nitrogen_due_to_fixation",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2327,7 +2462,8 @@
"ok_max_mean_abs": ""
},
"intpoc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "ocean_mass_content_of_particulate_organic_matter_expressed_as_carbon",
"units": "kg m-2",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2344,7 +2480,8 @@
"ok_max_mean_abs": ""
},
"intpp": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "net_primary_mole_productivity_of_biomass_expressed_as_carbon_by_phytoplankton",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2361,7 +2498,8 @@
"ok_max_mean_abs": ""
},
"intppcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "net_primary_mole_productivity_of_biomass_expressed_as_carbon_by_calcareous_phytoplankton",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2378,7 +2516,8 @@
"ok_max_mean_abs": ""
},
"intppdiat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "net_primary_mole_productivity_of_biomass_expressed_as_carbon_by_diatoms",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2395,7 +2534,8 @@
"ok_max_mean_abs": ""
},
"intppdiaz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "net_primary_mole_productivity_of_biomass_expressed_as_carbon_by_diazotrophs",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2412,7 +2552,8 @@
"ok_max_mean_abs": ""
},
"intppmisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "net_primary_mole_productivity_of_biomass_expressed_as_carbon_by_miscellaneous_phytoplankton",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2429,7 +2570,8 @@
"ok_max_mean_abs": ""
},
"intppnitrate": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "net_primary_mole_productivity_of_biomass_expressed_as_carbon_due_to_nitrate_utilization",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2446,7 +2588,8 @@
"ok_max_mean_abs": ""
},
"intpppico": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "net_primary_mole_productivity_of_biomass_expressed_as_carbon_by_picophytoplankton",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea depth: sum where sea time: mean",
@@ -2463,10 +2606,11 @@
"ok_max_mean_abs": ""
},
"limfecalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "iron_limitation_of_calcareous_phytoplankton",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Iron limitation of Calcareous Phytoplankton",
"comment": "",
@@ -2480,10 +2624,11 @@
"ok_max_mean_abs": ""
},
"limfediat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "iron_limitation_of_diatoms",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Iron limitation of Diatoms",
"comment": "",
@@ -2497,10 +2642,11 @@
"ok_max_mean_abs": ""
},
"limfediaz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "iron_limitation_of_diazotrophs",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Iron limitation of Diazotrophs",
"comment": "",
@@ -2514,10 +2660,11 @@
"ok_max_mean_abs": ""
},
"limfemisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "iron_limitation_of_miscellaneous_phytoplankton",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Iron Limitation of Other Phytoplankton",
"comment": "",
@@ -2531,10 +2678,11 @@
"ok_max_mean_abs": ""
},
"limfepico": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "iron_limitation_of_picophytoplankton",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Iron limitation of Picophytoplankton",
"comment": "",
@@ -2548,10 +2696,11 @@
"ok_max_mean_abs": ""
},
"limirrcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "irradiance_limitation_of_calcareous_phytoplankton",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Irradiance limitation of Calcareous Phytoplankton",
"comment": "",
@@ -2565,10 +2714,11 @@
"ok_max_mean_abs": ""
},
"limirrdiat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "irradiance_limitation_of_diatoms",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Irradiance limitation of Diatoms",
"comment": "",
@@ -2582,10 +2732,11 @@
"ok_max_mean_abs": ""
},
"limirrdiaz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "irradiance_limitation_of_diazotrophs",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Irradiance limitation of Diazotrophs",
"comment": "",
@@ -2599,10 +2750,11 @@
"ok_max_mean_abs": ""
},
"limirrmisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "irradiance_limitation_of_miscellaneous_phytoplankton",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Irradiance Limitation of Other Phytoplankton",
"comment": "",
@@ -2616,10 +2768,11 @@
"ok_max_mean_abs": ""
},
"limirrpico": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "irradiance_limitation_of_picophytoplankton",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Irradiance limitation of Picophytoplankton",
"comment": "",
@@ -2633,10 +2786,11 @@
"ok_max_mean_abs": ""
},
"limncalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "nitrogen_limitation_of_calcareous_phytoplankton",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Nitrogen limitation of Calcareous Phytoplankton",
"comment": "",
@@ -2650,10 +2804,11 @@
"ok_max_mean_abs": ""
},
"limndiat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "nitrogen_limitation_of_diatoms",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Nitrogen limitation of Diatoms",
"comment": "",
@@ -2667,10 +2822,11 @@
"ok_max_mean_abs": ""
},
"limndiaz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "nitrogen_limitation_of_diazotrophs",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Nitrogen limitation of Diazotrophs",
"comment": "",
@@ -2684,10 +2840,11 @@
"ok_max_mean_abs": ""
},
"limnmisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "nitrogen_limitation_of_miscellaneous_phytoplankton",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Nitrogen Limitation of Other Phytoplankton",
"comment": "",
@@ -2701,10 +2858,11 @@
"ok_max_mean_abs": ""
},
"limnpico": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "nitrogen_limitation_of_picophytoplankton",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Nitrogen limitation of Picophytoplankton",
"comment": "",
@@ -2718,10 +2876,11 @@
"ok_max_mean_abs": ""
},
"masscello": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_mass_per_unit_area",
"units": "kg m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sea Water Mass Per Unit Area",
"comment": "Tracer grid-cell mass per unit area used for computing tracer budgets. For Boussinesq models with static ocean grid cell thickness, masscello = rhozero*thickcello, where thickcello is static cell thickness and rhozero is constant Boussinesq reference density. More generally, masscello is time dependent and reported as part of Omon.",
@@ -2735,6 +2894,7 @@
"ok_max_mean_abs": ""
},
"masso": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_mass",
"units": "kg",
@@ -2752,11 +2912,12 @@
"ok_max_mean_abs": ""
},
"mfo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_transport_across_line",
"units": "kg s-1",
"cell_methods": "time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "Sea Water Transport",
"comment": "",
"dimensions": "oline time",
@@ -2769,10 +2930,11 @@
"ok_max_mean_abs": ""
},
"mlotst": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_mixed_layer_thickness_defined_by_sigma_t",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Ocean Mixed Layer Thickness Defined by Sigma T",
"comment": "Sigma T is potential density referenced to ocean surface.",
@@ -2786,6 +2948,7 @@
"ok_max_mean_abs": ""
},
"mlotstmax": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_mixed_layer_thickness_defined_by_sigma_t",
"units": "m",
@@ -2803,6 +2966,7 @@
"ok_max_mean_abs": ""
},
"mlotstmin": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_mixed_layer_thickness_defined_by_sigma_t",
"units": "m",
@@ -2820,10 +2984,11 @@
"ok_max_mean_abs": ""
},
"mlotstsq": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "square_of_ocean_mixed_layer_thickness_defined_by_sigma_t",
"units": "m2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Square of Ocean Mixed Layer Thickness Defined by Sigma T",
"comment": "",
@@ -2837,10 +3002,11 @@
"ok_max_mean_abs": ""
},
"msftbarot": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_barotropic_mass_streamfunction",
"units": "kg s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Ocean Barotropic Mass Streamfunction",
"comment": "Streamfunction or its approximation for free surface models. See OMDP document for details.",
@@ -2854,11 +3020,12 @@
"ok_max_mean_abs": ""
},
"msftmrho": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_meridional_overturning_mass_streamfunction",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean (comment: basin mean[ along zig-zag grid path]) time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Ocean Meridional Overturning Mass Streamfunction",
"comment": "Overturning mass streamfunction arising from all advective mass transport processes, resolved and parameterized.",
"dimensions": "latitude rho basin time",
@@ -2871,11 +3038,12 @@
"ok_max_mean_abs": ""
},
"msftmrhompa": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_meridional_overturning_mass_streamfunction_due_to_parameterized_mesoscale_advection",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean (comment: basin mean[ along zig-zag grid path]) time: mean",
+ "cell_measures": "area: areacella",
"long_name": "ocean meridional overturning mass streamfunction due to parameterized mesoscale advection",
"comment": "CMIP5 called this 'due to Bolus Advection'. Name change respects the more general physics of the mesoscale parameterizations.",
"dimensions": "latitude rho basin time",
@@ -2888,11 +3056,12 @@
"ok_max_mean_abs": ""
},
"msftmyz": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_meridional_overturning_mass_streamfunction",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean (comment: basin mean[ along zig-zag grid path]) time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Ocean Meridional Overturning Mass Streamfunction",
"comment": "Overturning mass streamfunction arising from all advective mass transport processes, resolved and parameterized.",
"dimensions": "latitude olevel basin time",
@@ -2905,11 +3074,12 @@
"ok_max_mean_abs": ""
},
"msftmzmpa": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_meridional_overturning_mass_streamfunction_due_to_parameterized_mesoscale_advection",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean (comment: basin mean[ along zig-zag grid path]) time: mean",
+ "cell_measures": "area: areacella",
"long_name": "ocean meridional overturning mass streamfunction due to parameterized mesoscale advection",
"comment": "CMIP5 called this 'due to Bolus Advection'. Name change respects the more general physics of the mesoscale parameterizations.",
"dimensions": "latitude olevel basin time",
@@ -2922,11 +3092,12 @@
"ok_max_mean_abs": ""
},
"msftmzsmpa": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_meridional_overturning_mass_streamfunction_due_to_parameterized_submesoscale_advection",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean (comment: basin mean[ along zig-zag grid path]) time: mean",
+ "cell_measures": "area: areacella",
"long_name": "ocean meridional overturning mass streamfunction due to parameterized submesoscale advection",
"comment": "Report only if there is a submesoscale eddy parameterization.",
"dimensions": "latitude olevel basin time",
@@ -2939,11 +3110,12 @@
"ok_max_mean_abs": ""
},
"msftyrho": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_y_overturning_mass_streamfunction",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "time: mean grid_longitude: mean",
+ "cell_measures": "area: areacella",
"long_name": "Ocean Y Overturning Mass Streamfunction",
"comment": "Overturning mass streamfunction arising from all advective mass transport processes, resolved and parameterized.",
"dimensions": "latitude rho basin time",
@@ -2956,11 +3128,12 @@
"ok_max_mean_abs": ""
},
"msftyrhompa": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_y_overturning_mass_streamfunction_due_to_parameterized_mesoscale_advection",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "time: mean grid_longitude: mean",
+ "cell_measures": "area: areacella",
"long_name": "ocean Y overturning mass streamfunction due to parameterized mesoscale advection",
"comment": "CMIP5 called this 'due to Bolus Advection'. Name change respects the more general physics of the mesoscale parameterizations.",
"dimensions": "latitude rho basin time",
@@ -2973,11 +3146,12 @@
"ok_max_mean_abs": ""
},
"msftyyz": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_y_overturning_mass_streamfunction",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "time: mean grid_longitude: mean",
+ "cell_measures": "area: areacella",
"long_name": "Ocean Y Overturning Mass Streamfunction",
"comment": "Overturning mass streamfunction arising from all advective mass transport processes, resolved and parameterized.",
"dimensions": "latitude olevel basin time",
@@ -2990,11 +3164,12 @@
"ok_max_mean_abs": ""
},
"msftyzmpa": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_y_overturning_mass_streamfunction_due_to_parameterized_mesoscale_advection",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "time: mean grid_longitude: mean",
+ "cell_measures": "area: areacella",
"long_name": "ocean Y overturning mass streamfunction due to parameterized mesoscale advection",
"comment": "CMIP5 called this 'due to Bolus Advection'. Name change respects the more general physics of the mesoscale parameterizations.",
"dimensions": "latitude olevel basin time",
@@ -3007,11 +3182,12 @@
"ok_max_mean_abs": ""
},
"msftyzsmpa": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_meridional_overturning_mass_streamfunction_due_to_parameterized_submesoscale_advection",
"units": "kg s-1",
- "cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_methods": "longitude: mean (comment: basin mean[ along zig-zag grid path]) time: mean",
+ "cell_measures": "area: areacella",
"long_name": "ocean Y overturning mass streamfunction due to parameterized submesoscale advection",
"comment": "Report only if there is a submesoscale eddy parameterization.",
"dimensions": "latitude olevel basin time",
@@ -3024,7 +3200,8 @@
"ok_max_mean_abs": ""
},
"nh4": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_ammonium_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3041,11 +3218,12 @@
"ok_max_mean_abs": ""
},
"nh4os": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_ammonium_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Dissolved Ammonium Concentration",
"comment": "",
"dimensions": "longitude latitude time",
@@ -3058,7 +3236,8 @@
"ok_max_mean_abs": ""
},
"no3": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_nitrate_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3075,11 +3254,12 @@
"ok_max_mean_abs": ""
},
"no3os": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_nitrate_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Dissolved Nitrate Concentration",
"comment": "",
"dimensions": "longitude latitude time",
@@ -3092,7 +3272,8 @@
"ok_max_mean_abs": ""
},
"o2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3109,10 +3290,11 @@
"ok_max_mean_abs": ""
},
"o2min": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water_at_shallowest_local_minimum_in_vertical_profile",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Oxygen Minimum Concentration",
"comment": "",
@@ -3126,11 +3308,12 @@
"ok_max_mean_abs": ""
},
"o2os": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dissolved_molecular_oxygen_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Dissolved Oxygen Concentration",
"comment": "",
"dimensions": "longitude latitude time",
@@ -3143,7 +3326,8 @@
"ok_max_mean_abs": ""
},
"o2sat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water_at_saturation",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3160,11 +3344,12 @@
"ok_max_mean_abs": ""
},
"o2satos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dissolved_molecular_oxygen_in_sea_water_at_saturation",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Dissolved Oxygen Concentration at Saturation",
"comment": "",
"dimensions": "longitude latitude time",
@@ -3177,10 +3362,11 @@
"ok_max_mean_abs": ""
},
"obvfsq": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "square_of_brunt_vaisala_frequency_in_sea_water",
"units": "s-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Square of Brunt Vaisala Frequency in Sea Water",
"comment": "",
@@ -3194,7 +3380,8 @@
"ok_max_mean_abs": ""
},
"ocfriver": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_ocean_mole_content_of_organic_carbon_due_to_runoff_and_sediment_dissolution",
"units": "mol m-2 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -3211,7 +3398,8 @@
"ok_max_mean_abs": ""
},
"pbfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_iron_in_sea_water_due_to_biological_production",
"units": "mol m-3 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -3228,10 +3416,11 @@
"ok_max_mean_abs": ""
},
"pbo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_pressure_at_sea_floor",
"units": "Pa",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Sea Water Pressure at Sea floor",
"comment": "",
@@ -3245,7 +3434,8 @@
"ok_max_mean_abs": ""
},
"pbsi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_silicon_in_sea_water_due_to_biological_production",
"units": "mol m-3 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -3262,7 +3452,8 @@
"ok_max_mean_abs": ""
},
"ph": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_ph_reported_on_total_scale",
"units": "1.0",
"cell_methods": "area: mean where sea time: mean",
@@ -3279,7 +3470,8 @@
"ok_max_mean_abs": ""
},
"phabio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_ph_reported_on_total_scale_due_to_abiotic_component",
"units": "1.0",
"cell_methods": "area: mean where sea time: mean",
@@ -3296,11 +3488,12 @@
"ok_max_mean_abs": ""
},
"phabioos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_ph_reported_on_total_scale_due_to_abiotic_component",
"units": "1.0",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Abiotic pH",
"comment": "negative log10 of hydrogen ion concentration with the concentration expressed as mol H kg-1.",
"dimensions": "longitude latitude time",
@@ -3313,7 +3506,8 @@
"ok_max_mean_abs": ""
},
"phnat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_ph_reported_on_total_scale_due_to_natural_component",
"units": "1.0",
"cell_methods": "area: mean where sea time: mean",
@@ -3330,11 +3524,12 @@
"ok_max_mean_abs": ""
},
"phnatos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_ph_reported_on_total_scale_due_to_natural_component",
"units": "1.0",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Natural pH",
"comment": "negative log10 of hydrogen ion concentration with the concentration expressed as mol H kg-1.",
"dimensions": "longitude latitude time",
@@ -3347,11 +3542,12 @@
"ok_max_mean_abs": ""
},
"phos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_ph_reported_on_total_scale",
"units": "1.0",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface pH",
"comment": "negative log10 of hydrogen ion concentration with the concentration expressed as mol H kg-1.",
"dimensions": "longitude latitude time",
@@ -3364,7 +3560,8 @@
"ok_max_mean_abs": ""
},
"phyc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3381,7 +3578,8 @@
"ok_max_mean_abs": ""
},
"phycalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_calcareous_phytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3398,11 +3596,12 @@
"ok_max_mean_abs": ""
},
"phycalcos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_calcareous_phytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Calcareous Phytoplankton expressed as Carbon in Sea Water",
"comment": "carbon concentration from calcareous (calcite-producing) phytoplankton component alone",
"dimensions": "longitude latitude time",
@@ -3415,11 +3614,12 @@
"ok_max_mean_abs": ""
},
"phycos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Phytoplankton Carbon Concentration",
"comment": "sum of phytoplankton organic carbon component concentrations at the sea surface",
"dimensions": "longitude latitude time",
@@ -3432,7 +3632,8 @@
"ok_max_mean_abs": ""
},
"phydiat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_diatoms_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3449,11 +3650,12 @@
"ok_max_mean_abs": ""
},
"phydiatos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_diatoms_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Diatoms expressed as Carbon in Sea Water",
"comment": "carbon from the diatom phytoplankton component concentration alone",
"dimensions": "longitude latitude time",
@@ -3466,7 +3668,8 @@
"ok_max_mean_abs": ""
},
"phydiaz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_diazotrophs_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3483,11 +3686,12 @@
"ok_max_mean_abs": ""
},
"phydiazos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_diazotrophs_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Diazotrophs Expressed as Carbon in Sea Water",
"comment": "carbon concentration from the diazotrophic phytoplankton component alone",
"dimensions": "longitude latitude time",
@@ -3500,7 +3704,8 @@
"ok_max_mean_abs": ""
},
"phyfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_iron_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3517,11 +3722,12 @@
"ok_max_mean_abs": ""
},
"phyfeos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_phytoplankton_expressed_as_iron_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mass Concentration of Diazotrophs expressed as Chlorophyll in sea water",
"comment": "sum of phytoplankton iron component concentrations",
"dimensions": "longitude latitude time",
@@ -3534,7 +3740,8 @@
"ok_max_mean_abs": ""
},
"phymisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_miscellaneous_phytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3551,11 +3758,12 @@
"ok_max_mean_abs": ""
},
"phymiscos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_miscellaneous_phytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Miscellaneous Phytoplankton expressed as Carbon in Sea Water",
"comment": "carbon concentration from additional phytoplankton component alone",
"dimensions": "longitude latitude time",
@@ -3568,7 +3776,8 @@
"ok_max_mean_abs": ""
},
"phyn": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_nitrogen_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3585,11 +3794,12 @@
"ok_max_mean_abs": ""
},
"phynos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_phytoplankton_expressed_as_nitrogen_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Phytoplankton Nitrogen in sea water",
"comment": "sum of phytoplankton nitrogen component concentrations",
"dimensions": "longitude latitude time",
@@ -3602,7 +3812,8 @@
"ok_max_mean_abs": ""
},
"phyp": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_phosphorus_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3619,7 +3830,8 @@
"ok_max_mean_abs": ""
},
"phypico": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_picophytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3636,11 +3848,12 @@
"ok_max_mean_abs": ""
},
"phypicoos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_picophytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Picophytoplankton expressed as Carbon in Sea Water",
"comment": "carbon concentration from the picophytoplankton (<2 um) component alone",
"dimensions": "longitude latitude time",
@@ -3653,11 +3866,12 @@
"ok_max_mean_abs": ""
},
"phypos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_phytoplankton_expressed_as_phosphorus_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Total Phytoplankton expressed as Phosphorus in sea water",
"comment": "sum of phytoplankton phosphorus components",
"dimensions": "longitude latitude time",
@@ -3670,7 +3884,8 @@
"ok_max_mean_abs": ""
},
"physi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_silicon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3687,11 +3902,12 @@
"ok_max_mean_abs": ""
},
"physios": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_phytoplankton_expressed_as_silicon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Total Phytoplankton expressed as Silicon in sea water",
"comment": "sum of phytoplankton silica component concentrations",
"dimensions": "longitude latitude time",
@@ -3704,7 +3920,8 @@
"ok_max_mean_abs": ""
},
"pnitrate": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_nitrate_utilization",
"units": "mol m-3 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -3721,7 +3938,8 @@
"ok_max_mean_abs": ""
},
"po4": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_phosphorus_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3738,11 +3956,12 @@
"ok_max_mean_abs": ""
},
"po4os": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dissolved_inorganic_phosphorus_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Total Dissolved Inorganic Phosphorus Concentration",
"comment": "",
"dimensions": "longitude latitude time",
@@ -3755,7 +3974,8 @@
"ok_max_mean_abs": ""
},
"pon": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_particulate_organic_matter_expressed_as_nitrogen_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3772,11 +3992,12 @@
"ok_max_mean_abs": ""
},
"ponos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_particulate_organic_matter_expressed_as_nitrogen_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Particulate Organic Matter expressed as Nitrogen in sea water",
"comment": "sum of particulate organic nitrogen component concentrations",
"dimensions": "longitude latitude time",
@@ -3789,7 +4010,8 @@
"ok_max_mean_abs": ""
},
"pop": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_particulate_organic_matter_expressed_as_phosphorus_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -3806,11 +4028,12 @@
"ok_max_mean_abs": ""
},
"popos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_particulate_organic_matter_expressed_as_phosphorus_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Particulate Organic Matter expressed as Phosphorus in sea water",
"comment": "sum of particulate organic phosphorus component concentrations",
"dimensions": "longitude latitude time",
@@ -3823,7 +4046,8 @@
"ok_max_mean_abs": ""
},
"pp": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production",
"units": "mol m-3 s-1",
"cell_methods": "area: mean where sea time: mean",
@@ -3840,6 +4064,7 @@
"ok_max_mean_abs": ""
},
"prra": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "rainfall_flux",
"units": "kg m-2 s-1",
@@ -3857,6 +4082,7 @@
"ok_max_mean_abs": ""
},
"prsn": {
+ "frequency": "mon",
"modeling_realm": "atmos",
"standard_name": "snowfall_flux",
"units": "kg m-2 s-1",
@@ -3874,10 +4100,11 @@
"ok_max_mean_abs": ""
},
"pso": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_pressure_at_sea_water_surface",
"units": "Pa",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Sea Water Pressure at Sea Water Surface",
"comment": "",
@@ -3891,6 +4118,7 @@
"ok_max_mean_abs": ""
},
"rlntds": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "surface_net_downward_longwave_flux",
"units": "W m-2",
@@ -3908,10 +4136,11 @@
"ok_max_mean_abs": ""
},
"rsdo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "downwelling_shortwave_flux_in_sea_water",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Downwelling Shortwave Radiation in Sea Water",
"comment": "",
@@ -3925,10 +4154,11 @@
"ok_max_mean_abs": ""
},
"rsntds": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "net_downward_shortwave_flux_at_sea_water_surface",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Net Downward Shortwave Radiation at Sea Water Surface",
"comment": "This is the flux into the surface of liquid sea water only. This excludes shortwave flux absorbed by sea ice, but includes any light that passes through the ice and is absorbed by the ocean.",
@@ -3942,10 +4172,11 @@
"ok_max_mean_abs": ""
},
"sf6": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "mole_concentration_of_sulfur_hexafluoride_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Moles Per Unit Mass of SF6 in sea water",
"comment": "",
@@ -3959,10 +4190,11 @@
"ok_max_mean_abs": ""
},
"sfdsi": {
+ "frequency": "mon",
"modeling_realm": "ocean seaIce",
"standard_name": "downward_sea_ice_basal_salt_flux",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Downward Sea Ice Basal Salt Flux",
"comment": "This field is physical, and it arises since sea ice has a nonzero salt content, so it exchanges salt with the liquid ocean upon melting and freezing.",
@@ -3976,10 +4208,11 @@
"ok_max_mean_abs": ""
},
"sfriver": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "salt_flux_into_sea_water_from_rivers",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Salt Flux into Sea Water from Rivers",
"comment": "This field is physical, and it arises when rivers carry a nonzero salt content. Often this is zero, with rivers assumed to be fresh.",
@@ -3993,7 +4226,8 @@
"ok_max_mean_abs": ""
},
"si": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_silicon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -4010,11 +4244,12 @@
"ok_max_mean_abs": ""
},
"sios": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_dissolved_inorganic_silicon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Total Dissolved Inorganic Silicon Concentration",
"comment": "",
"dimensions": "longitude latitude time",
@@ -4027,11 +4262,12 @@
"ok_max_mean_abs": ""
},
"sltovgyre": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_salt_transport_due_to_gyre",
"units": "kg s-1",
"cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "Northward Ocean Salt Transport due to Gyre",
"comment": "From all advective mass transport processes, resolved and parameterized.",
"dimensions": "latitude basin time",
@@ -4044,11 +4280,12 @@
"ok_max_mean_abs": ""
},
"sltovovrt": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "northward_ocean_salt_transport_due_to_overturning",
"units": "kg s-1",
"cell_methods": "longitude: mean time: mean",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "Northward Ocean Salt Transport due to Overturning",
"comment": "From all advective mass transport processes, resolved and parameterized.",
"dimensions": "latitude basin time",
@@ -4061,10 +4298,11 @@
"ok_max_mean_abs": ""
},
"so": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_salinity",
"units": "0.001",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sea Water Salinity",
"comment": "",
@@ -4078,10 +4316,11 @@
"ok_max_mean_abs": ""
},
"sob": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_salinity_at_sea_floor",
"units": "0.001",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "sea water salinity at sea floor",
"comment": "Model prognostic salinity at bottom-most model grid cell",
@@ -4095,6 +4334,7 @@
"ok_max_mean_abs": ""
},
"soga": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_salinity",
"units": "0.001",
@@ -4112,10 +4352,11 @@
"ok_max_mean_abs": ""
},
"sos": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_surface_salinity",
"units": "0.001",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Sea Surface Salinity",
"comment": "",
@@ -4129,10 +4370,11 @@
"ok_max_mean_abs": ""
},
"sosga": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_surface_salinity",
"units": "0.001",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "",
"long_name": "Global Average Sea Surface Salinity",
"comment": "",
@@ -4146,10 +4388,11 @@
"ok_max_mean_abs": ""
},
"sossq": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "square_of_sea_surface_salinity",
"units": "1e-06",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Square of Sea Surface Salinity",
"comment": "",
@@ -4163,7 +4406,8 @@
"ok_max_mean_abs": ""
},
"spco2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_partial_pressure_of_carbon_dioxide_in_sea_water",
"units": "Pa",
"cell_methods": "area: mean where sea time: mean",
@@ -4180,7 +4424,8 @@
"ok_max_mean_abs": ""
},
"spco2abio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_partial_pressure_of_carbon_dioxide_in_sea_water_due_to_abiotic_component",
"units": "Pa",
"cell_methods": "area: mean where sea time: mean",
@@ -4197,7 +4442,8 @@
"ok_max_mean_abs": ""
},
"spco2nat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_partial_pressure_of_carbon_dioxide_in_sea_water_due_to_natural_component",
"units": "Pa",
"cell_methods": "area: mean where sea time: mean",
@@ -4214,7 +4460,8 @@
"ok_max_mean_abs": ""
},
"talk": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_alkalinity_expressed_as_mole_equivalent",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -4231,7 +4478,8 @@
"ok_max_mean_abs": ""
},
"talknat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "seawater_alkalinity_expressed_as_mole_equivalent_natural_component",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -4248,11 +4496,12 @@
"ok_max_mean_abs": ""
},
"talknatos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_alkalinity_expressed_as_mole_equivalent_due_to_natural_component",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Natural Total Alkalinity",
"comment": "total alkalinity equivalent concentration (including carbonate, borate, phosphorus, silicon, and nitrogen components) at preindustrial atmospheric xCO2",
"dimensions": "longitude latitude time",
@@ -4265,11 +4514,12 @@
"ok_max_mean_abs": ""
},
"talkos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_alkalinity_expressed_as_mole_equivalent",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Total Alkalinity",
"comment": "total alkalinity equivalent concentration (including carbonate, borate, phosphorus, silicon, and nitrogen components)",
"dimensions": "longitude latitude time",
@@ -4282,10 +4532,11 @@
"ok_max_mean_abs": ""
},
"tauucorr": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "surface_downward_x_stress_correction",
"units": "N m-2",
- "cell_methods": "area: mean where sea time: mean",
+ "cell_methods": "time: mean",
"cell_measures": "--OPT",
"long_name": "Surface Downward X Stress Correction",
"comment": "This is the stress on the liquid ocean from overlying atmosphere, sea ice, ice shelf, etc.",
@@ -4299,10 +4550,11 @@
"ok_max_mean_abs": ""
},
"tauuo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "surface_downward_x_stress",
"units": "N m-2",
- "cell_methods": "area: mean where sea time: mean",
+ "cell_methods": "time: mean",
"cell_measures": "--OPT",
"long_name": "Surface Downward X Stress",
"comment": "This is the stress on the liquid ocean from overlying atmosphere, sea ice, ice shelf, etc.",
@@ -4316,10 +4568,11 @@
"ok_max_mean_abs": ""
},
"tauvcorr": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "surface_downward_y_stress_correction",
"units": "N m-2",
- "cell_methods": "area: mean where sea time: mean",
+ "cell_methods": "time: mean",
"cell_measures": "--OPT",
"long_name": "Surface Downward Y Stress Correction",
"comment": "This is the stress on the liquid ocean from overlying atmosphere, sea ice, ice shelf, etc.",
@@ -4333,10 +4586,11 @@
"ok_max_mean_abs": ""
},
"tauvo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "surface_downward_y_stress",
"units": "N m-2",
- "cell_methods": "area: mean where sea time: mean",
+ "cell_methods": "time: mean",
"cell_measures": "--OPT",
"long_name": "Surface Downward Y Stress",
"comment": "This is the stress on the liquid ocean from overlying atmosphere, sea ice, ice shelf, etc.",
@@ -4350,10 +4604,11 @@
"ok_max_mean_abs": ""
},
"thetao": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_potential_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sea Water Potential Temperature",
"comment": "Diagnostic should be contributed even for models using conservative temperature as prognostic field.",
@@ -4367,6 +4622,7 @@
"ok_max_mean_abs": ""
},
"thetaoga": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_potential_temperature",
"units": "degC",
@@ -4384,10 +4640,11 @@
"ok_max_mean_abs": ""
},
"thkcello": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "cell_thickness",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Ocean Model Cell Thickness",
"comment": "",
@@ -4401,10 +4658,11 @@
"ok_max_mean_abs": ""
},
"tob": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_potential_temperature_at_sea_floor",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Sea Water Potential Temperature at Sea Floor",
"comment": "Potential temperature at the ocean bottom-most grid cell.",
@@ -4418,10 +4676,11 @@
"ok_max_mean_abs": ""
},
"tos": {
+ "frequency": "mon",
"modeling_realm": "ocean",
- "standard_name": "surface_temperature",
+ "standard_name": "sea_surface_temperature",
"units": "K",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Sea Surface Temperature",
"comment": "temperature of liquid ocean. Note that the correct standard_name for this variable is 'sea_surface_temperature', not 'surface_temperature', but this was discovered too late to correct. To maintain consistency across CMIP5 models, the wrong standard_name will continue to be used.",
@@ -4435,10 +4694,11 @@
"ok_max_mean_abs": ""
},
"tosga": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_surface_temperature",
"units": "degC",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "",
"long_name": "Global Average Sea Surface Temperature",
"comment": "This may differ from 'surface temperature' in regions of sea ice.This may differ from 'surface temperature' in regions of sea ice.For models using conservative temperature as prognostic field, they should report the SST as surface potent",
@@ -4452,10 +4712,11 @@
"ok_max_mean_abs": ""
},
"tossq": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "square_of_sea_surface_temperature",
"units": "degC2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Square of Sea Surface Temperature",
"comment": "square of temperature of liquid ocean, averaged over the day.",
@@ -4469,6 +4730,7 @@
"ok_max_mean_abs": ""
},
"umo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_mass_x_transport",
"units": "kg s-1",
@@ -4486,6 +4748,7 @@
"ok_max_mean_abs": ""
},
"uo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_x_velocity",
"units": "m s-1",
@@ -4503,6 +4766,7 @@
"ok_max_mean_abs": ""
},
"vmo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "ocean_mass_y_transport",
"units": "kg s-1",
@@ -4520,6 +4784,7 @@
"ok_max_mean_abs": ""
},
"vo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_y_velocity",
"units": "m s-1",
@@ -4537,6 +4802,7 @@
"ok_max_mean_abs": ""
},
"volo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_volume",
"units": "m3",
@@ -4554,10 +4820,11 @@
"ok_max_mean_abs": ""
},
"vsf": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "virtual_salt_flux_into_sea_water",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Virtual Salt Flux into Sea Water",
"comment": "It is set to zero in models which receive a real water flux.",
@@ -4571,10 +4838,11 @@
"ok_max_mean_abs": ""
},
"vsfcorr": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "virtual_salt_flux_correction",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Virtual Salt Flux Correction",
"comment": "It is set to zero in models which receive a real water flux.",
@@ -4588,10 +4856,11 @@
"ok_max_mean_abs": ""
},
"vsfevap": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "virtual_salt_flux_into_sea_water_due_to_evaporation",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Virtual Salt Flux into Sea Water due to Evaporation",
"comment": "zero for models using real water fluxes.",
@@ -4605,10 +4874,11 @@
"ok_max_mean_abs": ""
},
"vsfpr": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "virtual_salt_flux_into_sea_water_due_to_rainfall",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Virtual Salt Flux into Sea Water due to Rainfall",
"comment": "zero for models using real water fluxes.",
@@ -4622,10 +4892,11 @@
"ok_max_mean_abs": ""
},
"vsfriver": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "virtual_salt_flux_into_sea_water_from_rivers",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Virtual Salt Flux into Sea Water From Rivers",
"comment": "zero for models using real water fluxes.",
@@ -4639,10 +4910,11 @@
"ok_max_mean_abs": ""
},
"vsfsit": {
+ "frequency": "mon",
"modeling_realm": "ocean seaIce",
"standard_name": "virtual_salt_flux_into_sea_water_due_to_sea_ice_thermodynamics",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Virtual Salt Flux into Sea Water due to Sea Ice Thermodynamics",
"comment": "This variable measures the virtual salt flux into sea water due to the melting of sea ice. It is set to zero in models which receive a real water flux.",
@@ -4656,10 +4928,11 @@
"ok_max_mean_abs": ""
},
"wfcorr": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "water_flux_correction",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Water Flux Correction",
"comment": "Positive flux implies correction adds water to ocean.",
@@ -4673,10 +4946,11 @@
"ok_max_mean_abs": ""
},
"wfo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "water_flux_into_sea_water",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Water Flux into Sea Water",
"comment": "computed as the water flux into the ocean divided by the area of the ocean portion of the grid cell. This is the sum of the next two variables in this table.",
@@ -4690,10 +4964,11 @@
"ok_max_mean_abs": ""
},
"wfonocorr": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "water_flux_into_sea_water_without_flux_correction",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Water Flux into Sea Water Without Flux Correction",
"comment": "computed as the water flux (without flux correction) into the ocean divided by the area of the ocean portion of the grid cell.",
@@ -4707,10 +4982,11 @@
"ok_max_mean_abs": ""
},
"wmo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "upward_ocean_mass_transport",
"units": "kg s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Upward Ocean Mass Transport",
"comment": "Upward mass transport from resolved and parameterized advective transport.",
@@ -4724,6 +5000,7 @@
"ok_max_mean_abs": ""
},
"wo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "upward_sea_water_velocity",
"units": "m s-1",
@@ -4741,10 +5018,11 @@
"ok_max_mean_abs": ""
},
"zfullo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "depth_below_geoid",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Depth Below Geoid of Ocean Layer",
"comment": "Depth below geoid",
@@ -4758,10 +5036,11 @@
"ok_max_mean_abs": ""
},
"zhalfo": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "depth_below_geoid",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Depth Below Geoid of Interfaces Between Ocean Layers",
"comment": "Depth below geoid",
@@ -4775,7 +5054,8 @@
"ok_max_mean_abs": ""
},
"zmeso": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_mesozooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -4792,11 +5072,12 @@
"ok_max_mean_abs": ""
},
"zmesoos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_mesozooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Mesozooplankton expressed as Carbon in Sea Water",
"comment": "carbon concentration from mesozooplankton (20-200 um) component alone",
"dimensions": "longitude latitude time",
@@ -4809,7 +5090,8 @@
"ok_max_mean_abs": ""
},
"zmicro": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_microzooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -4826,11 +5108,12 @@
"ok_max_mean_abs": ""
},
"zmicroos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_microzooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentration of Microzooplankton expressed as Carbon in Sea Water",
"comment": "carbon concentration from the microzooplankton (<20 um) component alone",
"dimensions": "longitude latitude time",
@@ -4843,7 +5126,8 @@
"ok_max_mean_abs": ""
},
"zmisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_miscellaneous_zooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -4860,11 +5144,12 @@
"ok_max_mean_abs": ""
},
"zmiscos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_miscellaneous_zooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Mole Concentraiton of Other Zooplankton expressed as Carbon in sea water",
"comment": "carbon from additional zooplankton component concentrations alone (e.g. Micro, meso). Since the models all have different numbers of components, this variable has been included to provide a check for intercomparison between models since some phytoplankton groups are supersets.",
"dimensions": "longitude latitude time",
@@ -4877,10 +5162,11 @@
"ok_max_mean_abs": ""
},
"zo2min": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "depth_at_shallowest_local_minimum_in_vertical_profile_of_mole_concentration_of_dissolved_molecular_oxygen_in_sea_water",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Depth of Oxygen Minimum Concentration",
"comment": "Depth of vertical minimum concentration of dissolved oxygen gas (if two, then the shallower)",
@@ -4894,7 +5180,8 @@
"ok_max_mean_abs": ""
},
"zooc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_zooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
@@ -4911,11 +5198,12 @@
"ok_max_mean_abs": ""
},
"zoocos": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_mole_concentration_of_zooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "Surface Zooplankton Carbon Concentration",
"comment": "sum of zooplankton carbon component concentrations",
"dimensions": "longitude latitude time",
@@ -4928,10 +5216,11 @@
"ok_max_mean_abs": ""
},
"zos": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_surface_height_above_geoid",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Sea Surface Height Above Geoid",
"comment": "This is the dynamic sea level, so should have zero global area mean. It should not include inverse barometer depressions from sea ice.",
@@ -4945,10 +5234,11 @@
"ok_max_mean_abs": ""
},
"zossq": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "square_of_sea_surface_height_above_geoid",
"units": "m2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Square of Sea Surface Height Above Geoid",
"comment": "Surface ocean geoid defines z=0.",
@@ -4962,6 +5252,7 @@
"ok_max_mean_abs": ""
},
"zostoga": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "global_average_thermosteric_sea_level_change",
"units": "m",
@@ -4979,10 +5270,11 @@
"ok_max_mean_abs": ""
},
"zsatarag": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "minimum_depth_of_aragonite_undersaturation_in_sea_water",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Aragonite Saturation Depth",
"comment": "Depth of aragonite saturation horizon (0 if undersaturated at all depths, 'missing' if supersaturated at all depths; if multiple horizons exist, the shallowest should be taken).",
@@ -4996,10 +5288,11 @@
"ok_max_mean_abs": ""
},
"zsatcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "mon",
+ "modeling_realm": "ocnBgChem",
"standard_name": "minimum_depth_of_calcite_undersaturation_in_sea_water",
"units": "m",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Calcite Saturation Depth",
"comment": "Depth of calcite saturation horizon (0 if undersaturated at all depths, and missing saturated through whole depth; if two or more horizons exist, then the shallowest is reported)",
diff --git a/TestTables/CMIP6_Omonbad.json b/TestTables/CMIP6_Omonbad.json
index fc3a6c7..da421ed 100644
--- a/TestTables/CMIP6_Omonbad.json
+++ b/TestTables/CMIP6_Omonbad.json
@@ -3627,6 +3627,7 @@
"ok_max_mean_abs": ""
},
"masso": {
+ "frequency": "mon",
"modeling_realm": "ocean",
"standard_name": "sea_water_mass",
"units": "kg",
diff --git a/TestTables/CMIP6_Oyr.json b/TestTables/CMIP6_Oyr.json
index 9154a11..36035eb 100644
--- a/TestTables/CMIP6_Oyr.json
+++ b/TestTables/CMIP6_Oyr.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table Oyr",
- "realm": "ocnBgchem",
- "frequency": "yr",
+ "realm": "ocnBgChem",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "365.00000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"arag": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_aragonite_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Aragonite Concentration",
"comment": "Sum of particulate aragonite components (e.g. Phytoplankton, Detrital, etc.)",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"bacc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_bacteria_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Bacterial Carbon Concentration",
"comment": "Sum of bacterial carbon component concentrations",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"bddtalk": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_sea_water_alkalinity_expressed_as_mole_equivalent_due_to_biological_processes",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Alkalinity due to Biological Activity",
"comment": "Net total of biological terms in time rate of change of alkalinity",
@@ -66,10 +68,11 @@
"ok_max_mean_abs": ""
},
"bddtdic": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_dissolved_inorganic_carbon_in_sea_water_due_to_biological_processes",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Dissolved Inorganic Carbon due to Biological Activity",
"comment": "Net total of biological terms in time rate of change of dissolved inorganic carbon",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"bddtdife": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_dissolved_inorganic_iron_in_sea_water_due_to_biological_processes",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Dissolved Inorganic Iron due to Biological Activity",
"comment": "Net total of biological terms in time rate of change of dissolved inorganic iron",
@@ -100,10 +104,11 @@
"ok_max_mean_abs": ""
},
"bddtdin": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_dissolved_inorganic_nitrogen_in_sea_water_due_to_biological_processes",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Nitrogen Nutrient due to Biological Activity",
"comment": "Net total of biological terms in time rate of change of nitrogen nutrients (e.g. NO3+NH4)",
@@ -117,10 +122,11 @@
"ok_max_mean_abs": ""
},
"bddtdip": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_dissolved_inorganic_phosphorus_in_sea_water_due_to_biological_processes",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Dissolved phosphorus due to Biological Activity",
"comment": "Net of biological terms in time rate of change of dissolved phosphate",
@@ -134,10 +140,11 @@
"ok_max_mean_abs": ""
},
"bddtdisi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_dissolved_inorganic_silicon_in_sea_water_due_to_biological_processes",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Rate of Change of Dissolved Inorganic silicon due to Biological Activity",
"comment": "Net of biological terms in time rate of change of dissolved inorganic silicon",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"bfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_particulate_organic_matter_expressed_as_iron_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Particulate Organic Matter expressed as Iron in sea water",
"comment": "Sum of particulate organic iron component concentrations",
@@ -168,10 +176,11 @@
"ok_max_mean_abs": ""
},
"bsi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_particulate_matter_expressed_as_silicon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Particulate Organic Matter expressed as silicon in sea water",
"comment": "Sum of particulate silica component concentrations",
@@ -185,10 +194,11 @@
"ok_max_mean_abs": ""
},
"calc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_calcite_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Calcite Concentration",
"comment": "Sum of particulate calcite component concentrations (e.g. Phytoplankton, Detrital, etc.)",
@@ -202,10 +212,11 @@
"ok_max_mean_abs": ""
},
"cfc11": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "mole_concentration_of_cfc11_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of CFC-11 in sea water",
"comment": "",
@@ -219,10 +230,11 @@
"ok_max_mean_abs": ""
},
"cfc12": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "mole_concentration_of_cfc12_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of CFC-12 in sea water",
"comment": "",
@@ -236,10 +248,11 @@
"ok_max_mean_abs": ""
},
"chl": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_phytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mass Concentration of Total Chlorophyll in sea water",
"comment": "Sum of chlorophyll from all phytoplankton group concentrations. In most models this is equal to chldiat+chlmisc, that is the sum of Diatom Chlorophyll Mass Concentration and Other Phytoplankton Chlorophyll Mass Concentration",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"chlcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_calcareous_phytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mass Concentration of Calcareous Phytoplankton expressed as Chlorophyll in sea water",
"comment": "chlorophyll concentration from the calcite-producing phytoplankton component alone",
@@ -270,10 +284,11 @@
"ok_max_mean_abs": ""
},
"chldiat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_diatoms_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mass Concentration of Diatom expressed as Chlorophyll in sea water",
"comment": "Chlorophyll from diatom phytoplankton component concentration alone",
@@ -287,10 +302,11 @@
"ok_max_mean_abs": ""
},
"chldiaz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_diazotrophs_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mass Concentration of Diazotrophs expressed as Chlorophyll in sea water",
"comment": "Chlorophyll concentration from the diazotrophic phytoplankton component alone",
@@ -304,10 +320,11 @@
"ok_max_mean_abs": ""
},
"chlmisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_miscellaneous_phytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mass Concentration of Other Phytoplankton expressed as Chlorophyll in sea water",
"comment": "Chlorophyll from additional phytoplankton component concentrations alone",
@@ -321,10 +338,11 @@
"ok_max_mean_abs": ""
},
"chlpico": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mass_concentration_of_picophytoplankton_expressed_as_chlorophyll_in_sea_water",
"units": "kg m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mass Concentration of Picophytoplankton expressed as Chlorophyll in sea water",
"comment": "chlorophyll concentration from the picophytoplankton (<2 um) component alone",
@@ -338,10 +356,11 @@
"ok_max_mean_abs": ""
},
"co3": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_carbonate_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Carbonate ion Concentration",
"comment": "",
@@ -355,10 +374,11 @@
"ok_max_mean_abs": ""
},
"co3abio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_carbonate_expressed_as_carbon_in_sea_water_due_to_abiotic_component",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Abiotic Carbonate ion Concentration",
"comment": "",
@@ -372,10 +392,11 @@
"ok_max_mean_abs": ""
},
"co3nat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_carbonate_expressed_as_carbon_in_sea_water_due_to_natural_component",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Natural Carbonate ion Concentration",
"comment": "",
@@ -389,10 +410,11 @@
"ok_max_mean_abs": ""
},
"co3satarag": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_aragonite_expressed_as_carbon_in_sea_water_at_saturation",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Carbonate ion Concentration for sea water in equilibrium with pure Aragonite",
"comment": "",
@@ -406,10 +428,11 @@
"ok_max_mean_abs": ""
},
"co3satcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_calcite_expressed_as_carbon_in_sea_water_at_saturation",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Carbonate ion Concentration for sea water in equilibrium with pure Calcite",
"comment": "",
@@ -423,10 +446,11 @@
"ok_max_mean_abs": ""
},
"darag": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_aragonite_expressed_as_carbon_in_sea_water_due_to_dissolution",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Aragonite Dissolution",
"comment": "Rate of change of Aragonite carbon mole concentration due to dissolution",
@@ -440,10 +464,11 @@
"ok_max_mean_abs": ""
},
"dcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_calcite_expressed_as_carbon_in_sea_water_due_to_dissolution",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Calcite Dissolution",
"comment": "Rate of change of Calcite carbon mole concentration due to dissolution",
@@ -457,10 +482,11 @@
"ok_max_mean_abs": ""
},
"detoc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_organic_detritus_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Detrital Organic Carbon Concentration",
"comment": "Sum of detrital organic carbon component concentrations",
@@ -474,10 +500,11 @@
"ok_max_mean_abs": ""
},
"dfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_iron_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Dissolved Iron in sea water",
"comment": "Dissolved iron in sea water, including both Fe2+ and Fe3+ ions (but not particulate detrital iron)",
@@ -491,10 +518,11 @@
"ok_max_mean_abs": ""
},
"difmxybo": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "ocean_momentum_xy_biharmonic_diffusivity",
"units": "m4 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "ocean momentum xy biharmonic diffusivity",
"comment": "Lateral biharmonic viscosity applied to the momentum equitions.",
@@ -508,10 +536,11 @@
"ok_max_mean_abs": ""
},
"difmxylo": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "ocean_momentum_xy_laplacian_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "ocean momentum xy laplacian diffusivity",
"comment": "Lateral Laplacian viscosity applied to the momentum equitions.",
@@ -525,10 +554,11 @@
"ok_max_mean_abs": ""
},
"diftrblo": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_bolus_laplacian_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "ocean tracer diffusivity due to parameterized mesoscale advection",
"comment": "Ocean tracer diffusivity associated with parameterized eddy-induced advective transport. Sometimes this diffusivity is called the 'thickness' diffusivity. For CMIP5, this diagnostic was called 'ocean tracer bolus laplacian diffusivity'. The CMIP6 name is physically more relevant.",
@@ -542,10 +572,11 @@
"ok_max_mean_abs": ""
},
"diftrelo": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "ocean_tracer_epineutral_laplacian_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "ocean tracer epineutral laplacian diffusivity",
"comment": "Ocean tracer diffusivity associated with parameterized eddy-induced diffusive transport oriented along neutral or isopycnal directions. Sometimes this diffusivity is called the neutral diffusivity or isopycnal diffusivity or Redi diffusivity.",
@@ -559,10 +590,11 @@
"ok_max_mean_abs": ""
},
"difvho": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "ocean_vertical_heat_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "ocean vertical heat diffusivity",
"comment": "Vertical/dianeutral diffusivity applied to prognostic temperature field.",
@@ -576,10 +608,11 @@
"ok_max_mean_abs": ""
},
"difvso": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "ocean_vertical_salt_diffusivity",
"units": "m2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "ocean vertical salt diffusivity",
"comment": "Vertical/dianeutral diffusivity applied to prognostic salinity field.",
@@ -593,11 +626,12 @@
"ok_max_mean_abs": ""
},
"dispkexyfo": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction",
"units": "W m-2",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "ocean kinetic energy dissipation per unit area due to xy friction",
"comment": "Depth integrated impacts on kinetic energy arising from lateral frictional dissipation associated with Laplacian and/or biharmonic viscosity. For CMIP5, this diagnostic was 3d, whereas the CMIP6 depth integrated diagnostic is sufficient for many purposes and reduces archive requirements.",
"dimensions": "longitude latitude time",
@@ -610,10 +644,11 @@
"ok_max_mean_abs": ""
},
"dissi13c": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon13_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Dissolved Inorganic 13Carbon Concentration",
"comment": "Dissolved inorganic 14carbon (CO3+HCO3+H2CO3) concentration",
@@ -627,10 +662,11 @@
"ok_max_mean_abs": ""
},
"dissi14cabio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon14_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Abiotic Dissolved Inorganic 14Carbon Concentration",
"comment": "Abiotic Dissolved inorganic 14carbon (CO3+HCO3+H2CO3) concentration",
@@ -644,10 +680,11 @@
"ok_max_mean_abs": ""
},
"dissic": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Dissolved Inorganic Carbon Concentration",
"comment": "Dissolved inorganic carbon (CO3+HCO3+H2CO3) concentration",
@@ -661,10 +698,11 @@
"ok_max_mean_abs": ""
},
"dissicabio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon_in_sea_water_abiotic_component",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Abiotic Dissolved Inorganic Carbon Concentration",
"comment": "Abiotic Dissolved inorganic carbon (CO3+HCO3+H2CO3) concentration",
@@ -678,10 +716,11 @@
"ok_max_mean_abs": ""
},
"dissicnat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_carbon_in_sea_water_natural_component",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Natural Dissolved Inorganic Carbon Concentration",
"comment": "Dissolved inorganic carbon (CO3+HCO3+H2CO3) concentration at preindustrial atmospheric xCO2",
@@ -695,10 +734,11 @@
"ok_max_mean_abs": ""
},
"dissoc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_organic_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Dissolved Organic Carbon Concentration",
"comment": "Sum of dissolved carbon component concentrations explicitly represented (i.e. not ~40 uM refractory unless explicit)",
@@ -712,10 +752,11 @@
"ok_max_mean_abs": ""
},
"dms": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_fraction_of_dimethyl_sulfide_in_air",
"units": "mol mol-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Dimethyl Sulphide in sea water",
"comment": "",
@@ -729,10 +770,11 @@
"ok_max_mean_abs": ""
},
"dpocdtcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_calcareous_phytoplankton",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Tendency of Mole Concentration of Organic Carbon in sea water due to Net Primary Production by Calcareous Phytoplankton",
"comment": "Primary (organic carbon) production by the calcite-producing phytoplankton component alone",
@@ -746,10 +788,11 @@
"ok_max_mean_abs": ""
},
"dpocdtdiaz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_diazotrophs",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Tendency of Mole Concentration of Organic Carbon in sea water due to Net Primary Production by Diazotrophs",
"comment": "Primary (organic carbon) production by the diazotrophic phytoplankton component alone",
@@ -763,10 +806,11 @@
"ok_max_mean_abs": ""
},
"dpocdtpico": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_picophytoplankton",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Tendency of Mole Concentration of Organic Carbon in sea water due to Net Primary Production by Picophytoplankton",
"comment": "Primary (organic carbon) production by the picophytoplankton (<2 um) component alone",
@@ -780,10 +824,11 @@
"ok_max_mean_abs": ""
},
"exparag": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_aragonite_expressed_as_carbon_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Aragonite Flux",
"comment": "Downward flux of Aragonite",
@@ -797,10 +842,11 @@
"ok_max_mean_abs": ""
},
"expc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_organic_matter_expressed_as_carbon_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Particulate Organic Carbon Flux",
"comment": "Downward flux of particulate organic carbon",
@@ -814,10 +860,11 @@
"ok_max_mean_abs": ""
},
"expcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_calcite_expressed_as_carbon_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Calcite Flux",
"comment": "Downward flux of Calcite",
@@ -831,10 +878,11 @@
"ok_max_mean_abs": ""
},
"expfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_iron_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Particulate Iron Flux",
"comment": "",
@@ -848,10 +896,11 @@
"ok_max_mean_abs": ""
},
"expn": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_organic_nitrogen_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Particulate Organic Nitrogen Flux",
"comment": "",
@@ -865,10 +914,11 @@
"ok_max_mean_abs": ""
},
"expp": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_organic_phosphorus_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Particulate Organic Phosphorus Flux",
"comment": "",
@@ -882,10 +932,11 @@
"ok_max_mean_abs": ""
},
"expsi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sinking_mole_flux_of_particulate_silicon_in_sea_water",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Sinking Particulate Silica Flux",
"comment": "",
@@ -899,10 +950,11 @@
"ok_max_mean_abs": ""
},
"fediss": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_dissolved_iron_in_sea_water_due_to_dissolution_from_inorganic_particles",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Particle Source of Dissolved Iron",
"comment": "Dissolution, remineralization and desorption of iron back to the dissolved phase",
@@ -916,10 +968,11 @@
"ok_max_mean_abs": ""
},
"fescav": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_dissolved_iron_in_sea_water_due_to_scavenging_by_inorganic_particles",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Nonbiogenic Iron Scavenging",
"comment": "Dissolved Fe removed through nonbiogenic scavenging onto particles",
@@ -933,13 +986,14 @@
"ok_max_mean_abs": ""
},
"fg13co2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "air_sea_flux_of_13CO2",
"units": "mol m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Surface Downward Flux of Abiotic 13CO2",
- "comment": "as specified by C4MIP",
+ "comment": "",
"dimensions": "longitude latitude time",
"out_name": "fg13co2",
"type": "real",
@@ -950,10 +1004,11 @@
"ok_max_mean_abs": ""
},
"fg14co2abio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mass_flux_of_abiotic_14_carbon_dioxide_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Surface Downward Flux of Abiotic 14CO2",
"comment": "Gas exchange flux of abiotic 14CO2 (positive into ocean)",
@@ -967,10 +1022,11 @@
"ok_max_mean_abs": ""
},
"fgco2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mass_flux_of_carbon_dioxide_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Surface Downward Flux of Total CO2",
"comment": "Gas exchange flux of CO2 (positive into ocean)",
@@ -984,10 +1040,11 @@
"ok_max_mean_abs": ""
},
"fgco2abio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mass_flux_of_abiotic_carbon_dioxide_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Surface Downward Flux of Abiotic CO2",
"comment": "Gas exchange flux of abiotic CO2 (positive into ocean)",
@@ -1001,10 +1058,11 @@
"ok_max_mean_abs": ""
},
"fgco2nat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "surface_downward_mass_flux_of_natural_carbon_dioxide_expressed_as_carbon",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "Surface Downward Flux of Natural CO2",
"comment": "Gas exchange flux of natural CO2 (positive into ocean)",
@@ -1018,10 +1076,11 @@
"ok_max_mean_abs": ""
},
"graz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_grazing_of_phytoplankton",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Total Grazing of Phytoplankton by Zooplankton",
"comment": "",
@@ -1035,10 +1094,11 @@
"ok_max_mean_abs": ""
},
"nh4": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_ammonium_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Dissolved Ammonium Concentration",
"comment": "",
@@ -1052,10 +1112,11 @@
"ok_max_mean_abs": ""
},
"no3": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_nitrate_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Dissolved Nitrate Concentration",
"comment": "",
@@ -1069,10 +1130,11 @@
"ok_max_mean_abs": ""
},
"o2": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Dissolved Oxygen Concentration",
"comment": "",
@@ -1086,10 +1148,11 @@
"ok_max_mean_abs": ""
},
"o2sat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water_at_saturation",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Dissolved Oxygen Concentration at Saturation",
"comment": "",
@@ -1103,10 +1166,11 @@
"ok_max_mean_abs": ""
},
"ocontempdiff": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content_due_to_parameterized_dianeutral_mixing",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content due to parameterized dianeutral mixing",
"comment": "Tendency of heat content for a grid cell from parameterized dianeutral mixing. Reported only for models that use conservative temperature as prognostic field.",
@@ -1120,10 +1184,11 @@
"ok_max_mean_abs": ""
},
"ocontempmint": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "integral_wrt_depth_of_product_of_sea_water_density_and_conservative_temperature",
"units": "degC kg m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "integral wrt depth of product of sea water density and conservative temperature",
"comment": "Full column sum of density*cell thickness*conservative temperature. If the model is Boussinesq, then use Boussinesq reference density for the density factor.",
@@ -1137,10 +1202,11 @@
"ok_max_mean_abs": ""
},
"ocontemppadvect": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content_due_to_parameterized_eddy_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content due to parameterized eddy advection",
"comment": "Tendency of heat content for a grid cell from parameterized eddy advection (any form of eddy advection). Reported only for models that use conservative temperature as prognostic field.",
@@ -1154,10 +1220,11 @@
"ok_max_mean_abs": ""
},
"ocontemppmdiff": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content_due_to_parameterized_mesoscale_diffusion",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content due to parameterized mesoscale diffusion",
"comment": "Tendency of heat content for a grid cell from parameterized mesoscale eddy diffusion. Reported only for models that use conservative temperature as prognostic field.",
@@ -1171,10 +1238,11 @@
"ok_max_mean_abs": ""
},
"ocontemppsmadvect": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content_due_to_parameterized_submesoscale_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content due to parameterized submesoscale advection",
"comment": "Tendency of heat content for a grid cell from parameterized submesoscale eddy advection. Reported only for models that use conservative temperature as prognostic field.",
@@ -1188,10 +1256,11 @@
"ok_max_mean_abs": ""
},
"ocontemprmadvect": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content_due_to_residual_mean_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content due to residual mean (sum of Eulerian + parameterized) advection",
"comment": "",
@@ -1205,10 +1274,11 @@
"ok_max_mean_abs": ""
},
"ocontemptend": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water conservative temperature expressed as heat content",
"comment": "Tendency of heat content for a grid cell from all processes. Reported only for models that use conservative temperature as prognostic field.",
@@ -1222,10 +1292,11 @@
"ok_max_mean_abs": ""
},
"opottempdiff": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content_due_to_parameterized_dianeutral_mixing",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content due to parameterized dianeutral mixing",
"comment": "Tendency of heat content for a grid cell from parameterized dianeutral mixing. Reported only for models that use potential temperature as prognostic field.",
@@ -1239,10 +1310,11 @@
"ok_max_mean_abs": ""
},
"opottempmint": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "integral_wrt_depth_of_product_of_sea_water_density_and_potential_temperature",
"units": "degC kg m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "integral wrt depth of product of sea water density and potential temperature",
"comment": "",
@@ -1256,10 +1328,11 @@
"ok_max_mean_abs": ""
},
"opottemppadvect": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content_due_to_parameterized_eddy_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content due to parameterized eddy advection",
"comment": "Tendency of heat content for a grid cell from parameterized eddy advection (any form of eddy advection). Reported only for models that use potential temperature as prognostic field.",
@@ -1273,10 +1346,11 @@
"ok_max_mean_abs": ""
},
"opottemppmdiff": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content_due_to_parameterized_mesoscale_diffusion",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content due to parameterized mesoscale diffusion",
"comment": "Tendency of heat content for a grid cell from parameterized mesoscale eddy diffusion. Reported only for models that use potential temperature as prognostic field.",
@@ -1290,10 +1364,11 @@
"ok_max_mean_abs": ""
},
"opottemppsmadvect": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content_due_to_parameterized_submesoscale_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content due to parameterized submesoscale advection",
"comment": "Tendency of heat content for a grid cell from parameterized submesoscale eddy advection. Reported only for models that use potential temperature as prognostic field.",
@@ -1307,10 +1382,11 @@
"ok_max_mean_abs": ""
},
"opottemprmadvect": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content_due_to_residual_mean_advection",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content due to residual mean advection",
"comment": "",
@@ -1324,10 +1400,11 @@
"ok_max_mean_abs": ""
},
"opottemptend": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_potential_temperature_expressed_as_heat_content",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water potential temperature expressed as heat content",
"comment": "Tendency of heat content for a grid cell from all processes. Reported only for models that use potential temperature as prognostic field.",
@@ -1341,10 +1418,11 @@
"ok_max_mean_abs": ""
},
"osaltdiff": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content_due_to_parameterized_dianeutral_mixing",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content due to parameterized dianeutral mixing",
"comment": "Tendency of salt content for a grid cell from parameterized dianeutral mixing.",
@@ -1358,10 +1436,11 @@
"ok_max_mean_abs": ""
},
"osaltpadvect": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content_due_to_parameterized_eddy_advection",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content due to parameterized eddy advection",
"comment": "Tendency of salt content for a grid cell from parameterized eddy advection (any form of eddy advection).",
@@ -1375,10 +1454,11 @@
"ok_max_mean_abs": ""
},
"osaltpmdiff": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content_due_to_parameterized_mesoscale_diffusion",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content due to parameterized mesoscale diffusion",
"comment": "Tendency of salt content for a grid cell from parameterized mesoscale eddy diffusion.",
@@ -1392,10 +1472,11 @@
"ok_max_mean_abs": ""
},
"osaltpsmadvect": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content_due_to_parameterized_submesoscale_advection",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content due to parameterized submesoscale advection",
"comment": "Tendency of salt content for a grid cell from parameterized submesoscale eddy advection.",
@@ -1409,10 +1490,11 @@
"ok_max_mean_abs": ""
},
"osaltrmadvect": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content_due_to_residual_mean_advection",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content due to residual mean advection",
"comment": "",
@@ -1426,10 +1508,11 @@
"ok_max_mean_abs": ""
},
"osalttend": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content",
"units": "kg m-2 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "tendency of sea water salinity expressed as salt content",
"comment": "Tendency of salt content for a grid cell from all processes.",
@@ -1443,10 +1526,11 @@
"ok_max_mean_abs": ""
},
"parag": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_aragonite_expressed_as_carbon_in_sea_water_due_to_biological_production",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Aragonite Production",
"comment": "",
@@ -1460,10 +1544,11 @@
"ok_max_mean_abs": ""
},
"pbfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_iron_in_sea_water_due_to_biological_production",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Biogenic Iron Production",
"comment": "",
@@ -1477,10 +1562,11 @@
"ok_max_mean_abs": ""
},
"pbsi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_silicon_in_sea_water_due_to_biological_production",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Biogenic Silica Production",
"comment": "",
@@ -1494,10 +1580,11 @@
"ok_max_mean_abs": ""
},
"pcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_calcite_expressed_as_carbon_in_sea_water_due_to_biological_production",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Calcite Production",
"comment": "",
@@ -1511,10 +1598,11 @@
"ok_max_mean_abs": ""
},
"pdi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_diatoms",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Diatom Primary Carbon Production",
"comment": "Primary (organic carbon) production by the diatom component alone",
@@ -1528,10 +1616,11 @@
"ok_max_mean_abs": ""
},
"ph": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_ph_reported_on_total_scale",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "pH",
"comment": "negative log of hydrogen ion concentration with the concentration expressed as mol H kg-1.",
@@ -1545,10 +1634,11 @@
"ok_max_mean_abs": ""
},
"phabio": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_ph_reported_on_total_scale_due_to_abiotic_component",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Abiotic pH",
"comment": "negative log10 of hydrogen ion concentration with the concentration expressed as mol H kg-1 (abiotic component)..",
@@ -1562,10 +1652,11 @@
"ok_max_mean_abs": ""
},
"phnat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_ph_reported_on_total_scale_due_to_natural_component",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Natural pH",
"comment": "negative log10 of hydrogen ion concentration with the concentration expressed as mol H kg-1.",
@@ -1579,10 +1670,11 @@
"ok_max_mean_abs": ""
},
"phyc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Phytoplankton Carbon Concentration",
"comment": "sum of phytoplankton carbon component concentrations. In most (all?) cases this is the sum of phycdiat and phycmisc (i.e., 'Diatom Carbon Concentration' and 'Non-Diatom Phytoplankton Carbon Concentration'",
@@ -1596,10 +1688,11 @@
"ok_max_mean_abs": ""
},
"phycalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_calcareous_phytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Calcareous Phytoplankton expressed as Carbon in sea water",
"comment": "carbon concentration from calcareous (calcite-producing) phytoplankton component alone",
@@ -1613,10 +1706,11 @@
"ok_max_mean_abs": ""
},
"phydiat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_diatoms_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Diatoms expressed as Carbon in sea water",
"comment": "carbon from the diatom phytoplankton component concentration alone",
@@ -1630,10 +1724,11 @@
"ok_max_mean_abs": ""
},
"phydiaz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_diazotrophs_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Diazotrophs Expressed as Carbon in sea water",
"comment": "carbon concentration from the diazotrophic phytoplankton component alone",
@@ -1647,10 +1742,11 @@
"ok_max_mean_abs": ""
},
"phyfe": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_iron_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Total Phytoplankton expressed as Iron in sea water",
"comment": "sum of phytoplankton iron component concentrations",
@@ -1664,10 +1760,11 @@
"ok_max_mean_abs": ""
},
"phymisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_miscellaneous_phytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Miscellaneous Phytoplankton expressed as Carbon in sea water",
"comment": "carbon concentration from additional phytoplankton component alone",
@@ -1681,10 +1778,11 @@
"ok_max_mean_abs": ""
},
"phyn": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_nitrogen_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Total Phytoplankton expressed as Nitrogen in sea water",
"comment": "sum of phytoplankton nitrogen component concentrations",
@@ -1698,10 +1796,11 @@
"ok_max_mean_abs": ""
},
"phyp": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_phosphorus_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Total Phytoplankton expressed as Phosphorus in sea water",
"comment": "sum of phytoplankton phosphorus components",
@@ -1715,10 +1814,11 @@
"ok_max_mean_abs": ""
},
"phypico": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_picophytoplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Picophytoplankton expressed as Carbon in sea water",
"comment": "carbon concentration from the picophytoplankton (<2 um) component alone",
@@ -1732,10 +1832,11 @@
"ok_max_mean_abs": ""
},
"physi": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_phytoplankton_expressed_as_silicon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Total Phytoplankton expressed as Silicon in sea water",
"comment": "sum of phytoplankton silica component concentrations",
@@ -1749,10 +1850,11 @@
"ok_max_mean_abs": ""
},
"pnitrate": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_nitrate_utilization",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Primary Carbon Production by Phytoplankton due to Nitrate Uptake Alone",
"comment": "Primary (organic carbon) production by phytoplankton due to nitrate uptake alone",
@@ -1766,10 +1868,11 @@
"ok_max_mean_abs": ""
},
"po4": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_phosphorus_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Total Dissolved Inorganic Phosphorus Concentration",
"comment": "",
@@ -1783,10 +1886,11 @@
"ok_max_mean_abs": ""
},
"pon": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_particulate_organic_matter_expressed_as_nitrogen_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Particulate Organic Matter expressed as Nitrogen in sea water",
"comment": "sum of particulate organic nitrogen component concentrations",
@@ -1800,10 +1904,11 @@
"ok_max_mean_abs": ""
},
"pop": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_particulate_organic_matter_expressed_as_phosphorus_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Particulate Organic Matter expressed as Phosphorus in sea water",
"comment": "sum of particulate organic phosphorus component concentrations",
@@ -1817,10 +1922,11 @@
"ok_max_mean_abs": ""
},
"pp": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Primary Carbon Production by Total Phytoplankton",
"comment": "total primary (organic carbon) production by phytoplankton",
@@ -1834,10 +1940,11 @@
"ok_max_mean_abs": ""
},
"ppcalc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_calcareous_phytoplankton",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Net Primary Mole Productivity of Carbon by Calcareous Phytoplankton",
"comment": "Primary (organic carbon) production by the calcite-producing phytoplankton component alone",
@@ -1851,10 +1958,11 @@
"ok_max_mean_abs": ""
},
"ppdiat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_diatoms",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Net Primary Organic Carbon Production by Diatoms",
"comment": "Primary (organic carbon) production by the diatom component alone",
@@ -1868,10 +1976,11 @@
"ok_max_mean_abs": ""
},
"ppdiaz": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_diazotrophs",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Net Primary Mole Productivity of Carbon by Diazotrophs",
"comment": "Primary (organic carbon) production by the diazotrophic phytoplankton component alone",
@@ -1885,10 +1994,11 @@
"ok_max_mean_abs": ""
},
"ppmisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_miscellaneous_phytoplankton",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Net Primary Organic Carbon Production by Other Phytoplankton",
"comment": "Primary (organic carbon) production by other phytoplankton components alone",
@@ -1902,10 +2012,11 @@
"ok_max_mean_abs": ""
},
"pppico": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_particulate_organic_matter_expressed_as_carbon_in_sea_water_due_to_net_primary_production_by_picophytoplankton",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Net Primary Mole Productivity of Carbon by Picophytoplankton",
"comment": "Primary (organic carbon) production by the picophytoplankton (<2 um) component alone",
@@ -1919,10 +2030,11 @@
"ok_max_mean_abs": ""
},
"remoc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "tendency_of_mole_concentration_of_organic_matter_expressed_as_carbon_in_sea_water_due_to_remineralization",
"units": "mol m-3 s-1",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Remineralization of Organic Carbon",
"comment": "",
@@ -1936,10 +2048,11 @@
"ok_max_mean_abs": ""
},
"rsdoabsorb": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "net_rate_of_absorption_of_shortwave_energy_in_ocean_layer",
"units": "W m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "net rate of absorption of shortwave energy in ocean layer",
"comment": "",
@@ -1953,10 +2066,11 @@
"ok_max_mean_abs": ""
},
"sf6": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "mole_concentration_of_sulfur_hexafluoride_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of SF6 in sea water",
"comment": "",
@@ -1970,10 +2084,11 @@
"ok_max_mean_abs": ""
},
"si": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_dissolved_inorganic_silicon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Total Dissolved Inorganic Silicon Concentration",
"comment": "",
@@ -1987,10 +2102,11 @@
"ok_max_mean_abs": ""
},
"somint": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "integral_wrt_depth_of_product_of_sea_water_density_and_prognostic_salinity",
"units": "1e-3 kg m-2",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello",
"long_name": "integral wrt depth of product of sea water density and salinity",
"comment": "Full column sum of density*cell thickness*prognostic salinity. If the model is Boussinesq, then use Boussinesq reference density for the density factor.",
@@ -2004,10 +2120,11 @@
"ok_max_mean_abs": ""
},
"talk": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "sea_water_alkalinity_expressed_as_mole_equivalent",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Total Alkalinity",
"comment": "total alkalinity equivalent concentration (including carbonate, nitrogen, silicate, and borate components)",
@@ -2021,10 +2138,11 @@
"ok_max_mean_abs": ""
},
"talknat": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "seawater_alkalinity_expressed_as_mole_equivalent_natural_component",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Natural Total Alkalinity",
"comment": "total alkalinity equivalent concentration (including carbonate, borate, phosphorus, silicon, and nitrogen components) at preindustrial atmospheric xCO2",
@@ -2038,11 +2156,12 @@
"ok_max_mean_abs": ""
},
"tnkebto": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport",
"units": "W m-2",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "tendency of ocean eddy kinetic energy content due to parameterized eddy advection",
"comment": "Depth integrated impacts on kinetic energy arising from parameterized eddy-induced advection. For CMIP5, this diagnostic was 3d, whereas the CMIP6 depth integrated diagnostic is sufficient for many purposes and reduces archive requirements.",
"dimensions": "longitude latitude time",
@@ -2055,11 +2174,12 @@
"ok_max_mean_abs": ""
},
"tnpeo": {
+ "frequency": "yr",
"modeling_realm": "ocean",
"standard_name": "tendency_of_ocean_potential_energy_content",
"units": "W m-2",
"cell_methods": "area: mean where sea time: mean",
- "cell_measures": "area: areacello volume: volcello",
+ "cell_measures": "area: areacello",
"long_name": "tendency of ocean potential energy content",
"comment": "Rate that work is done against vertical stratification, as measured by the vertical heat and salt diffusivity. Report here as depth integrated two-dimensional field.",
"dimensions": "longitude latitude time",
@@ -2072,10 +2192,11 @@
"ok_max_mean_abs": ""
},
"zmeso": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_mesozooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Mesozooplankton expressed as Carbon in sea water",
"comment": "carbon concentration from mesozooplankton (20-200 um) component alone",
@@ -2089,10 +2210,11 @@
"ok_max_mean_abs": ""
},
"zmicro": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_microzooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concentration of Microzooplankton expressed as Carbon in sea water",
"comment": "carbon concentration from the microzooplankton (<20 um) component alone",
@@ -2106,10 +2228,11 @@
"ok_max_mean_abs": ""
},
"zmisc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_miscellaneous_zooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Mole Concetration of Other Zooplankton expressed as Carbon in sea water",
"comment": "carbon from additional zooplankton component concentrations alone (e.g. Micro, meso). Since the models all have different numbers of components, this variable has been included to provide a check for intercomparison between models since some phytoplankton groups are supersets.",
@@ -2123,10 +2246,11 @@
"ok_max_mean_abs": ""
},
"zooc": {
- "modeling_realm": "ocnBgchem",
+ "frequency": "yr",
+ "modeling_realm": "ocnBgChem",
"standard_name": "mole_concentration_of_zooplankton_expressed_as_carbon_in_sea_water",
"units": "mol m-3",
- "cell_methods": "time: mean",
+ "cell_methods": "area: mean where sea time: mean",
"cell_measures": "area: areacello volume: volcello",
"long_name": "Zooplankton Carbon Concentration",
"comment": "sum of zooplankton carbon component concentrations",
diff --git a/TestTables/CMIP6_SIday.json b/TestTables/CMIP6_SIday.json
index 916f181..3ebcf1c 100644
--- a/TestTables/CMIP6_SIday.json
+++ b/TestTables/CMIP6_SIday.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table SIday",
"realm": "seaIce",
- "frequency": "day",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "1.00000",
@@ -15,14 +14,15 @@
},
"variable_entry": {
"siconc": {
+ "frequency": "day",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: mean where sea time: mean",
+ "cell_measures": "area: areacello",
"long_name": "Sea Ice Area Fraction",
"comment": "Area fraction of grid cell covered by sea ice",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time typesi",
"out_name": "siconc",
"type": "real",
"positive": "",
@@ -31,7 +31,26 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "siconco": {
+ "frequency": "day",
+ "modeling_realm": "seaIce",
+ "standard_name": "sea_ice_area_fraction",
+ "units": "%",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Sea Ice Area Fraction",
+ "comment": "Area fraction of grid cell covered by sea ice",
+ "dimensions": "longitude latitude time typesi",
+ "out_name": "siconco",
+ "type": "real",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"sisnthick": {
+ "frequency": "day",
"modeling_realm": "seaIce",
"standard_name": "surface_snow_thickness",
"units": "m",
@@ -49,6 +68,7 @@
"ok_max_mean_abs": ""
},
"sispeed": {
+ "frequency": "day",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_speed",
"units": "m s-1",
@@ -66,6 +86,7 @@
"ok_max_mean_abs": ""
},
"sitemptop": {
+ "frequency": "day",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_surface_temperature",
"units": "K",
@@ -82,11 +103,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "sithick": {
+ "frequency": "day",
+ "modeling_realm": "seaIce ocean",
+ "standard_name": "sea_ice_thickness",
+ "units": "m",
+ "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)",
+ "cell_measures": "area: areacella",
+ "long_name": "Sea Ice Thickness",
+ "comment": "Actual (floe) thickness of sea ice (NOT volume divided by grid area as was done in CMIP5)",
+ "dimensions": "longitude latitude time",
+ "out_name": "sithick",
+ "type": "real",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"sitimefrac": {
+ "frequency": "day",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_time_fraction",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Fraction of time steps with sea ice",
"comment": "Fraction of time steps of the averaging period during which sea ice is present (siconc >0 ) in a grid cell",
@@ -100,6 +140,7 @@
"ok_max_mean_abs": ""
},
"siu": {
+ "frequency": "day",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_x_velocity",
"units": "m s-1",
@@ -117,6 +158,7 @@
"ok_max_mean_abs": ""
},
"siv": {
+ "frequency": "day",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_y_velocity",
"units": "m s-1",
diff --git a/TestTables/CMIP6_SImon.json b/TestTables/CMIP6_SImon.json
index 6579ed9..69c87c9 100644
--- a/TestTables/CMIP6_SImon.json
+++ b/TestTables/CMIP6_SImon.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table SImon",
"realm": "seaIce",
- "frequency": "mon",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "30.00000",
@@ -15,6 +14,7 @@
},
"variable_entry": {
"siage": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "age_of_sea_ice",
"units": "s",
@@ -31,29 +31,13 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "sialb": {
- "modeling_realm": "seaIce",
- "standard_name": "sea_ice_albedo",
- "units": "1.0",
- "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)",
- "cell_measures": "area: areacella",
- "long_name": "Sea-ice or snow albedo",
- "comment": "Mean surface albedo of entire ice-covered part of grid cell",
- "dimensions": "longitude latitude time",
- "out_name": "sialb",
- "type": "",
- "positive": "",
- "valid_min": "",
- "valid_max": "",
- "ok_min_mean_abs": "",
- "ok_max_mean_abs": ""
- },
"siareaacrossline": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_area_transport_across_line",
"units": "m2 s-1",
- "cell_methods": "area: time: mean",
- "cell_measures": "",
+ "cell_methods": "time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Sea ice area flux through straits",
"comment": "net (sum of transport in all directions) sea ice area transport through the following four passages, positive into the Arctic Ocean 1. Fram Strait = (11.5W,81.3N to (10.5E,79.6N) 2. Canadian Archipelego = (128.2W,70.6N) to (59.3W,82.1N) 3. Barents opening = (16.8E,76.5N) to (19.2E,70.2N) 4. Bering Strait = (171W,66.2N) to (166W,65N)",
"dimensions": "siline time",
@@ -66,6 +50,7 @@
"ok_max_mean_abs": ""
},
"siarean": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_area",
"units": "1e6 km2",
@@ -83,6 +68,7 @@
"ok_max_mean_abs": ""
},
"siareas": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_area",
"units": "1e6 km2",
@@ -100,6 +86,7 @@
"ok_max_mean_abs": ""
},
"sicompstren": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "compressive_strength_of_sea_ice",
"units": "N m-1",
@@ -117,14 +104,15 @@
"ok_max_mean_abs": ""
},
"siconc": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
- "cell_measures": "area: areacella",
+ "cell_methods": "area: mean where sea time: mean",
+ "cell_measures": "area: areacello",
"long_name": "Sea Ice Area Fraction",
"comment": "Area fraction of grid cell covered by sea ice",
- "dimensions": "longitude latitude time",
+ "dimensions": "longitude latitude time typesi",
"out_name": "siconc",
"type": "real",
"positive": "",
@@ -133,11 +121,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "siconco": {
+ "frequency": "mon",
+ "modeling_realm": "seaIce",
+ "standard_name": "sea_ice_area_fraction",
+ "units": "%",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Sea Ice Area Fraction",
+ "comment": "Area fraction of grid cell covered by sea ice",
+ "dimensions": "longitude latitude time typesi",
+ "out_name": "siconco",
+ "type": "real",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"sidconcdyn": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_sea_ice_area_fraction_due_to_dynamics",
"units": "s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sea-ice area fraction change from dynamics",
"comment": "Total change in sea-ice area fraction through dynamics-related processes (advection, divergence...)",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"sidconcth": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_sea_ice_area_fraction_due_to_thermodynamics",
"units": "s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sea-ice area fraction change from thermodynamics",
"comment": "Total change in sea-ice area fraction through thermodynamic processes",
@@ -168,6 +176,7 @@
"ok_max_mean_abs": ""
},
"sidivvel": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "divergence_of_sea_ice_velocity",
"units": "s-1",
@@ -185,10 +194,11 @@
"ok_max_mean_abs": ""
},
"sidmassdyn": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_sea_ice_amount_due_to_dynamics",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sea-ice mass change from dynamics",
"comment": "Total change in sea-ice mass through dynamics-related processes (advection,...) divided by grid-cell area",
@@ -202,10 +212,11 @@
"ok_max_mean_abs": ""
},
"sidmassevapsubl": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "water_evaporation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sea-ice mass change through evaporation and sublimation",
"comment": "The rate of change of sea-ice mass change through evaporation and sublimation divided by grid-cell area",
@@ -219,10 +230,11 @@
"ok_max_mean_abs": ""
},
"sidmassgrowthbot": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_sea_ice_amount_due_to_congelation_ice_accumulation",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sea-ice mass change through basal growth",
"comment": "The rate of change of sea ice mass due to vertical growth of existing sea ice at its base divided by grid-cell area.",
@@ -236,10 +248,11 @@
"ok_max_mean_abs": ""
},
"sidmassgrowthwat": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_sea_ice_amount_due_to_freezing_in_open_water",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sea-ice mass change through growth in supercooled open water (aka frazil)",
"comment": "The rate of change of sea ice mass due to sea ice formation in supercooled water (often through frazil formation) divided by grid-cell area. Together, sidmassgrowthwat and sidmassgrowthbot should give total ice growth",
@@ -253,10 +266,11 @@
"ok_max_mean_abs": ""
},
"sidmasslat": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_sea_ice_amount_due_to_lateral_melting",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Lateral sea ice melt rate",
"comment": "The rate of change of sea ice mass through lateral melting divided by grid-cell area (report 0 if not explicitly calculated thermodynamically)",
@@ -270,10 +284,11 @@
"ok_max_mean_abs": ""
},
"sidmassmeltbot": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_sea_ice_amount_due_to_basal_melting",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sea-ice mass change through bottom melting",
"comment": "The rate of change of sea ice mass through melting at the ice bottom divided by grid-cell area",
@@ -287,10 +302,11 @@
"ok_max_mean_abs": ""
},
"sidmassmelttop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_sea_ice_amount_due_to_surface_melting",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sea-ice mass change through surface melting",
"comment": "The rate of change of sea ice mass through melting at the ice surface divided by grid-cell area",
@@ -304,10 +320,11 @@
"ok_max_mean_abs": ""
},
"sidmasssi": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_sea_ice_amount_due_to_snow_conversion",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sea-ice mass change through snow-to-ice conversion",
"comment": "The rate of change of sea ice mass due to transformation of snow to sea ice divided by grid-cell area",
@@ -321,10 +338,11 @@
"ok_max_mean_abs": ""
},
"sidmassth": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_sea_ice_amount_due_to_thermodynamics",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "sea-ice mass change from thermodynamics",
"comment": "Total change in sea-ice mass from thermodynamic processes divided by grid-cell area",
@@ -338,6 +356,7 @@
"ok_max_mean_abs": ""
},
"sidmasstranx": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_x_transport",
"units": "kg s-1",
@@ -355,6 +374,7 @@
"ok_max_mean_abs": ""
},
"sidmasstrany": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_y_transport",
"units": "kg s-1",
@@ -372,6 +392,7 @@
"ok_max_mean_abs": ""
},
"sidragbot": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_drag_coefficient_for_momentum_in_water",
"units": "1.0",
@@ -389,6 +410,7 @@
"ok_max_mean_abs": ""
},
"sidragtop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_drag_coefficient_for_momentum_in_air",
"units": "1.0",
@@ -406,6 +428,7 @@
"ok_max_mean_abs": ""
},
"siextentn": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_extent",
"units": "1e6 km2",
@@ -423,6 +446,7 @@
"ok_max_mean_abs": ""
},
"siextents": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_extent",
"units": "1e6 km2",
@@ -440,6 +464,7 @@
"ok_max_mean_abs": ""
},
"sifb": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_freeboard",
"units": "m",
@@ -457,6 +482,7 @@
"ok_max_mean_abs": ""
},
"siflcondbot": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "conductive_heat_flux_at_sea_ice_bottom",
"units": "W m-2",
@@ -474,6 +500,7 @@
"ok_max_mean_abs": ""
},
"siflcondtop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "conductive_heat_flux_at_sea_ice_surface",
"units": "W m-2",
@@ -491,6 +518,7 @@
"ok_max_mean_abs": ""
},
"siflfwbot": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "freshwater_flux_from_ice",
"units": "kg m-2 s-1",
@@ -508,6 +536,7 @@
"ok_max_mean_abs": ""
},
"siflfwdrain": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "freshwater_flux_from_ice_surface",
"units": "kg m-2 s-1",
@@ -525,6 +554,7 @@
"ok_max_mean_abs": ""
},
"sifllatstop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_upward_latent_heat_flux",
"units": "W m-2",
@@ -542,6 +572,7 @@
"ok_max_mean_abs": ""
},
"sifllwdtop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_downwelling_longwave_flux_in_air",
"units": "W m-2",
@@ -559,13 +590,14 @@
"ok_max_mean_abs": ""
},
"sifllwutop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_upwelling_longwave_flux_in_air",
"units": "W m-2",
"cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)",
"cell_measures": "area: areacella",
- "long_name": "Upward longwave flux over sea ice",
- "comment": "the upward longwave flux over sea ice (always negative)",
+ "long_name": "Upwelling Longwave Flux over Sea Ice",
+ "comment": "the upwelling longwave flux over sea ice (always negative)",
"dimensions": "longitude latitude time",
"out_name": "sifllwutop",
"type": "",
@@ -576,6 +608,7 @@
"ok_max_mean_abs": ""
},
"siflsaltbot": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "salt_flux_from_ice",
"units": "kg m-2 s-1",
@@ -593,6 +626,7 @@
"ok_max_mean_abs": ""
},
"siflsenstop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_upward_sensible_heat_flux",
"units": "W m-2",
@@ -610,6 +644,7 @@
"ok_max_mean_abs": ""
},
"siflsensupbot": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "ice_ocean_heat_flux",
"units": "W m-2",
@@ -627,13 +662,14 @@
"ok_max_mean_abs": ""
},
"siflswdbot": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "bottom_downwelling_shortwave_flux_into_ocean",
"units": "W m-2",
"cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)",
"cell_measures": "area: areacella",
"long_name": "Downwelling shortwave flux under sea ice",
- "comment": "the downwelling shortwave flux underneath sea ice (always positive)",
+ "comment": "The downwelling shortwave flux underneath sea ice (always positive)",
"dimensions": "longitude latitude time",
"out_name": "siflswdbot",
"type": "",
@@ -644,13 +680,14 @@
"ok_max_mean_abs": ""
},
"siflswdtop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_downwelling_shortwave_flux_in_air",
"units": "W m-2",
"cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)",
"cell_measures": "area: areacella",
"long_name": "Downwelling shortwave flux over sea ice",
- "comment": "the downwelling shortwave flux over sea ice (always positive by sign convention)",
+ "comment": "The downwelling shortwave flux over sea ice (always positive by sign convention)",
"dimensions": "longitude latitude time",
"out_name": "siflswdtop",
"type": "",
@@ -661,13 +698,14 @@
"ok_max_mean_abs": ""
},
"siflswutop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_upwelling_shortwave_flux_in_air",
"units": "W m-2",
"cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)",
"cell_measures": "area: areacella",
- "long_name": "Upward shortwave flux over sea ice",
- "comment": "the upward shortwave flux over sea ice (always negative)",
+ "long_name": "Upwelling Shortwave Flux over Sea Ice",
+ "comment": "The upwelling shortwave flux over sea ice (always negative)",
"dimensions": "longitude latitude time",
"out_name": "siflswutop",
"type": "",
@@ -678,6 +716,7 @@
"ok_max_mean_abs": ""
},
"siforcecoriolx": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "coriolis_force_on_sea_ice_x",
"units": "N m-2",
@@ -695,6 +734,7 @@
"ok_max_mean_abs": ""
},
"siforcecorioly": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "coriolis_force_on_sea_ice_y",
"units": "N m-2",
@@ -712,6 +752,7 @@
"ok_max_mean_abs": ""
},
"siforceintstrx": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "internal_stress_in_sea_ice_x",
"units": "N m-2",
@@ -729,6 +770,7 @@
"ok_max_mean_abs": ""
},
"siforceintstry": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "internal_stress_in_sea_ice_y",
"units": "N m-2",
@@ -746,6 +788,7 @@
"ok_max_mean_abs": ""
},
"siforcetiltx": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_surface_tilt_force_on_sea_ice_x",
"units": "N m-2",
@@ -763,6 +806,7 @@
"ok_max_mean_abs": ""
},
"siforcetilty": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_surface_tilt_force_on_sea_ice_y",
"units": "N m-2",
@@ -780,10 +824,11 @@
"ok_max_mean_abs": ""
},
"sihc": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "integral_of_sea_ice_temperature_wrt_depth_expressed_as_heat_content",
"units": "J m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Sea-ice heat content per unit area",
"comment": "Heat content of all ice in grid cell divided by total grid-cell area. Water at 0 Celsius is assumed to have a heat content of 0 J. Does not include heat content of snow, but does include heat content of brine. Heat content is always negative, since both the sensible and the latent heat content of ice are less than that of water",
@@ -797,6 +842,7 @@
"ok_max_mean_abs": ""
},
"siitdconc": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_area_fraction_over_categories",
"units": "%",
@@ -814,6 +860,7 @@
"ok_max_mean_abs": ""
},
"siitdsnconc": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "snow_area_fraction_over_categories",
"units": "%",
@@ -831,6 +878,7 @@
"ok_max_mean_abs": ""
},
"siitdsnthick": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "snow_thickness_over_categories",
"units": "m",
@@ -848,6 +896,7 @@
"ok_max_mean_abs": ""
},
"siitdthick": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_thickness_over_categories",
"units": "m",
@@ -865,10 +914,11 @@
"ok_max_mean_abs": ""
},
"simass": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_amount",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Sea-ice mass per area",
"comment": "Total mass of sea ice divided by grid-cell area",
@@ -882,11 +932,12 @@
"ok_max_mean_abs": ""
},
"simassacrossline": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
- "standard_name": "sea_ice_mass_transport_across_line",
+ "standard_name": "sea_ice_transport_across_line",
"units": "kg s-1",
- "cell_methods": "area: time: mean",
- "cell_measures": "",
+ "cell_methods": "time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Sea mass area flux through straits",
"comment": "net (sum of transport in all directions) sea ice area transport through the following four passages, positive into the Arctic Ocean 1. Fram Strait = (11.5W,81.3N to (10.5E,79.6N) 2. Canadian Archipelego = (128.2W,70.6N) to (59.3W,82.1N) 3. Barents opening = (16.8E,76.5N) to (19.2E,70.2N) 4. Bering Strait = (171W,66.2N) to (166W,65N)",
"dimensions": "siline time",
@@ -899,14 +950,15 @@
"ok_max_mean_abs": ""
},
"simpconc": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "area_fraction",
"units": "%",
"cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)",
"cell_measures": "area: areacella",
- "long_name": "Meltpond area fraction",
+ "long_name": "Percentage Cover of Sea-Ice by Meltpond",
"comment": "Fraction of sea ice, by area, which is covered by melt ponds, giving equal weight to every square metre of sea ice .",
- "dimensions": "longitude latitude typemp time",
+ "dimensions": "longitude latitude time typemp",
"out_name": "simpconc",
"type": "",
"positive": "",
@@ -916,12 +968,13 @@
"ok_max_mean_abs": ""
},
"simpmass": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_liquid_water_amount",
"units": "kg m-2",
"cell_methods": "area: time: mean where sea_ice_melt_pond (comment: mask=simpconc)",
"cell_measures": "area: areacella",
- "long_name": "Meltpond mass per area",
+ "long_name": "Meltpond Mass per Unit Area",
"comment": "Meltpond mass per area of sea ice.",
"dimensions": "longitude latitude time",
"out_name": "simpmass",
@@ -933,6 +986,7 @@
"ok_max_mean_abs": ""
},
"simprefrozen": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "melt_pond_refrozen_ice",
"units": "m",
@@ -950,6 +1004,7 @@
"ok_max_mean_abs": ""
},
"sipr": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "rainfall_flux",
"units": "kg m-2 s-1",
@@ -967,12 +1022,13 @@
"ok_max_mean_abs": ""
},
"sirdgconc": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "fraction_of_ridged_sea_ice",
"units": "1.0",
"cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)",
"cell_measures": "area: areacella",
- "long_name": "Ridged Ice Area Fraction",
+ "long_name": "Percentage Cover of Sea-Ice by Ridging",
"comment": "Fraction of sea ice, by area, which is covered by sea ice ridges, giving equal weight to every square metre of sea ice .",
"dimensions": "longitude latitude time",
"out_name": "sirdgconc",
@@ -984,10 +1040,11 @@
"ok_max_mean_abs": ""
},
"sirdgthick": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "thickness_of_ridged_sea_ice",
"units": "m",
- "cell_methods": "area: time: mean where sea_ice (comment: mask=sirdgconc)",
+ "cell_methods": "area: time: mean where sea_ice (comment: mask=sirdgconc - ridges only)",
"cell_measures": "area: areacella",
"long_name": "Ridged ice thickness",
"comment": "Sea Ice Ridge Height (representing mean height over the ridged area)",
@@ -1001,6 +1058,7 @@
"ok_max_mean_abs": ""
},
"sisali": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_salinity",
"units": "0.001",
@@ -1018,10 +1076,11 @@
"ok_max_mean_abs": ""
},
"sisaltmass": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_salt_mass",
"units": "kg m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Mass of salt in sea ice per area",
"comment": "Total mass of all salt in sea ice divided by grid-cell area",
@@ -1035,6 +1094,7 @@
"ok_max_mean_abs": ""
},
"sishevel": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "maximum_shear_of_sea_ice_velocity",
"units": "s-1",
@@ -1052,6 +1112,7 @@
"ok_max_mean_abs": ""
},
"sisnconc": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_snow_area_fraction",
"units": "%",
@@ -1069,6 +1130,7 @@
"ok_max_mean_abs": ""
},
"sisnhc": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "thermal_energy_content_of_surface_snow",
"units": "J m-2",
@@ -1086,6 +1148,7 @@
"ok_max_mean_abs": ""
},
"sisnmass": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "liquid_water_content_of_surface_snow",
"units": "kg m-2",
@@ -1103,6 +1166,7 @@
"ok_max_mean_abs": ""
},
"sisnthick": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_snow_thickness",
"units": "m",
@@ -1120,6 +1184,7 @@
"ok_max_mean_abs": ""
},
"sispeed": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_speed",
"units": "m s-1",
@@ -1137,6 +1202,7 @@
"ok_max_mean_abs": ""
},
"sistremax": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "maximum_shear_stress",
"units": "N m-1",
@@ -1154,6 +1220,7 @@
"ok_max_mean_abs": ""
},
"sistresave": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "average_normal_stress",
"units": "N m-1",
@@ -1171,6 +1238,7 @@
"ok_max_mean_abs": ""
},
"sistrxdtop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_downward_x_stress",
"units": "N m-2",
@@ -1188,6 +1256,7 @@
"ok_max_mean_abs": ""
},
"sistrxubot": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_base_upward_x_stress",
"units": "N m-2",
@@ -1205,6 +1274,7 @@
"ok_max_mean_abs": ""
},
"sistrydtop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_downward_y_stress",
"units": "N m-2",
@@ -1222,6 +1292,7 @@
"ok_max_mean_abs": ""
},
"sistryubot": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "downward_y_stress_at_sea_ice_base",
"units": "N m-2",
@@ -1239,6 +1310,7 @@
"ok_max_mean_abs": ""
},
"sitempbot": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_bottom_temperature",
"units": "K",
@@ -1256,6 +1328,7 @@
"ok_max_mean_abs": ""
},
"sitempsnic": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_surface_temperature",
"units": "K",
@@ -1273,6 +1346,7 @@
"ok_max_mean_abs": ""
},
"sitemptop": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_surface_temperature",
"units": "K",
@@ -1289,11 +1363,30 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "sithick": {
+ "frequency": "mon",
+ "modeling_realm": "seaIce ocean",
+ "standard_name": "sea_ice_thickness",
+ "units": "m",
+ "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)",
+ "cell_measures": "area: areacella",
+ "long_name": "Sea Ice Thickness",
+ "comment": "Actual (floe) thickness of sea ice (NOT volume divided by grid area as was done in CMIP5)",
+ "dimensions": "longitude latitude time",
+ "out_name": "sithick",
+ "type": "real",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"sitimefrac": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_time_fraction",
"units": "1.0",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Fraction of time steps with sea ice",
"comment": "Fraction of time steps of the averaging period during which sea ice is present (siconc >0 ) in a grid cell",
@@ -1307,6 +1400,7 @@
"ok_max_mean_abs": ""
},
"siu": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_x_velocity",
"units": "m s-1",
@@ -1324,6 +1418,7 @@
"ok_max_mean_abs": ""
},
"siv": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_y_velocity",
"units": "m s-1",
@@ -1341,10 +1436,11 @@
"ok_max_mean_abs": ""
},
"sivol": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_thickness",
"units": "m",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Sea-ice volume per area",
"comment": "Total volume of sea ice divided by grid-cell area (this used to be called ice thickness in CMIP5)",
@@ -1358,6 +1454,7 @@
"ok_max_mean_abs": ""
},
"sivoln": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_volume",
"units": "1e3 km3",
@@ -1375,6 +1472,7 @@
"ok_max_mean_abs": ""
},
"sivols": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "sea_ice_volume",
"units": "1e3 km3",
@@ -1392,10 +1490,11 @@
"ok_max_mean_abs": ""
},
"sndmassdyn": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_snow_mass_due_to_sea_ice_dynamics",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Snow Mass Rate of Change through Avection by Sea-ice Dynamics",
"comment": "the rate of change of snow mass through advection with sea ice divided by grid-cell area",
@@ -1409,10 +1508,11 @@
"ok_max_mean_abs": ""
},
"sndmassmelt": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_snow_melt_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Snow Mass Rate of Change through Melt",
"comment": "the rate of change of snow mass through melt divided by grid-cell area",
@@ -1426,10 +1526,11 @@
"ok_max_mean_abs": ""
},
"sndmasssi": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_surface_snow_amount_due_to_conversion_of_snow_to_sea_ice",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Snow Mass Rate of Change through Snow-to-Ice Conversion",
"comment": "the rate of change of snow mass due to transformation of snow to sea ice divided by grid-cell area",
@@ -1443,10 +1544,11 @@
"ok_max_mean_abs": ""
},
"sndmasssnf": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "snowfall_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "snow mass change through snow fall",
"comment": "mass of solid precipitation falling onto sea ice divided by grid-cell area",
@@ -1460,10 +1562,11 @@
"ok_max_mean_abs": ""
},
"sndmasssubl": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "surface_snow_sublimation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Snow Mass Rate of Change through Evaporation or Sublimation",
"comment": "the rate of change of snow mass through sublimation and evaporation divided by grid-cell area",
@@ -1477,10 +1580,11 @@
"ok_max_mean_abs": ""
},
"sndmasswindrif": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "tendency_of_snow_mass_due_to_drifting_snow",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Snow Mass Rate of Change through Wind Drift of Snow",
"comment": "the rate of change of snow mass through wind drift of snow (from sea-ice into the sea) divided by grid-cell area",
@@ -1494,11 +1598,12 @@
"ok_max_mean_abs": ""
},
"snmassacrossline": {
+ "frequency": "mon",
"modeling_realm": "seaIce",
"standard_name": "snow_mass_transport_across_line",
"units": "kg s-1",
- "cell_methods": "area: time: mean",
- "cell_measures": "",
+ "cell_methods": "time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Snow mass flux through straits",
"comment": "net (sum of transport in all directions) snow mass transport through the following four passages, positive into the Arctic Ocean 1. Fram Strait = (11.5W,81.3N to (10.5E,79.6N) 2. Canadian Archipelego = (128.2W,70.6N) to (59.3W,82.1N) 3. Barents opening = (16.8E,76.5N) to (19.2E,70.2N) 4. Bering Strait = (171W,66.2N) to (166W,65N)",
"dimensions": "siline time",
diff --git a/TestTables/CMIP6_cf3hr_0.json b/TestTables/CMIP6_cf3hr_0.json
index 4d90b28..03ef5d1 100644
--- a/TestTables/CMIP6_cf3hr_0.json
+++ b/TestTables/CMIP6_cf3hr_0.json
@@ -95,6 +95,7 @@
},
"variable_entry": {
"latitude": {
+ "frequency": "3hr",
"dimensions": "longitude latitude",
"valid_min": "-90.0",
"long_name": "",
@@ -104,6 +105,7 @@
"valid_max": "90.0"
},
"longitude": {
+ "frequency": "3hr",
"dimensions": "longitude latitude",
"valid_min": "0.0",
"long_name": "",
@@ -113,6 +115,7 @@
"valid_max": "360.0"
},
"vertices_latitude": {
+ "frequency": "3hr",
"standard_name": "vertices_latitude",
"units": "degrees_north",
"long_name": "latitude vertices coordinate",
@@ -122,6 +125,7 @@
"valid_min": "-90.0"
},
"vertices_longitude": {
+ "frequency": "3hr",
"standard_name": "vertices_longitude",
"units": "degrees_east",
"long_name": "longitude vertices coordinate",
@@ -131,6 +135,7 @@
"valid_min": "0.0"
},
"curtain": {
+ "frequency": "3hr",
"units": "1",
"long_name": "curtain",
"dimensions":"height40 location section",
diff --git a/TestTables/CMIP6_cf3hr_1.json b/TestTables/CMIP6_cf3hr_1.json
index 3d3f364..d35d069 100644
--- a/TestTables/CMIP6_cf3hr_1.json
+++ b/TestTables/CMIP6_cf3hr_1.json
@@ -3,7 +3,6 @@
"data_specs_version": "10.10.10",
"table_id": "Table cf3hr",
"realm": "atmos",
- "frequency": "3hr",
"cmor_version": "3.2",
"table_date": "04 October 2016",
"missing_value": "1e20",
@@ -96,6 +95,7 @@
},
"variable_entry": {
"latitude": {
+ "frequency": "3hr",
"dimensions": "longitude latitude",
"valid_min": "-90.0",
"long_name": "",
@@ -105,6 +105,7 @@
"valid_max": "90.0"
},
"longitude": {
+ "frequency": "3hr",
"dimensions": "longitude latitude",
"valid_min": "0.0",
"long_name": "",
@@ -114,6 +115,7 @@
"valid_max": "360.0"
},
"vertices_latitude": {
+ "frequency": "3hr",
"standard_name": "vertices_latitude",
"units": "degrees_north",
"long_name": "latitude vertices coordinate",
@@ -123,6 +125,7 @@
"valid_min": "-90.0"
},
"vertices_longitude": {
+ "frequency": "3hr",
"standard_name": "vertices_longitude",
"units": "degrees_east",
"long_name": "longitude vertices coordinate",
@@ -132,6 +135,7 @@
"valid_min": "0.0"
},
"curtain": {
+ "frequency": "3hr",
"units": "1",
"long_name": "curtain",
"dimensions":"height40 location section",
diff --git a/TestTables/CMIP6_cf3hr_2.json b/TestTables/CMIP6_cf3hr_2.json
index dde1801..e49cc81 100644
--- a/TestTables/CMIP6_cf3hr_2.json
+++ b/TestTables/CMIP6_cf3hr_2.json
@@ -127,6 +127,7 @@
},
"variable_entry": {
"cllcalipso": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
@@ -143,6 +144,7 @@
"ok_min_mean_abs": "", "ok_max_mean_abs": "" },
"clcalipso": {
+ "frequency": "3hr",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction_in_atmosphere_layer",
"units": "%",
@@ -159,6 +161,7 @@
"ok_min_mean_abs": "", "ok_max_mean_abs": "" },
"latitude": {
+ "frequency": "3hr",
"dimensions": "longitude latitude",
"valid_min": "-90.0",
"long_name": "",
@@ -168,6 +171,7 @@
"valid_max": "90.0"
},
"longitude": {
+ "frequency": "3hr",
"dimensions": "longitude latitude",
"valid_min": "0.0",
"long_name": "",
@@ -177,6 +181,7 @@
"valid_max": "360.0"
},
"vertices_latitude": {
+ "frequency": "3hr",
"standard_name": "vertices_latitude",
"units": "degrees_north",
"long_name": "latitude vertices coordinate",
@@ -186,6 +191,7 @@
"valid_min": "-90.0"
},
"vertices_longitude": {
+ "frequency": "3hr",
"standard_name": "vertices_longitude",
"units": "degrees_east",
"long_name": "longitude vertices coordinate",
@@ -195,6 +201,7 @@
"valid_min": "0.0"
},
"curtain": {
+ "frequency": "3hr",
"units": "1",
"long_name": "curtain",
"dimensions":"height40 location section",
diff --git a/TestTables/CMIP6_chunking.json b/TestTables/CMIP6_chunking.json
index 469f026..d3fd35c 100644
--- a/TestTables/CMIP6_chunking.json
+++ b/TestTables/CMIP6_chunking.json
@@ -3,7 +3,6 @@
"missing_value": "1e20",
"approx_interval": "30.00000",
"cmor_version": "3.0",
- "frequency": "mon",
"table_id": "Table AmonChunking",
"table_date": "24 February 2016",
"realm": "atmos",
@@ -14,6 +13,7 @@
},
"variable_entry": {
"tas": {
+ "frequency": "mon",
"deflate": "1",
"shuffle": "1",
"deflate_level": "9",
diff --git a/TestTables/CMIP6_coordinate.json b/TestTables/CMIP6_coordinate.json
index 5c8f4c4..0e9174f 100644
--- a/TestTables/CMIP6_coordinate.json
+++ b/TestTables/CMIP6_coordinate.json
@@ -51,38 +51,38 @@
"18000"
],
"requested_bounds": [
- "-99000",
- "0",
- "0",
- "500",
- "500",
- "1000",
- "1000",
- "1500",
- "1500",
- "2000",
- "2000",
- "2500",
- "2500",
- "3000",
- "3000",
- "4000",
- "4000",
- "5000",
- "5000",
- "7000",
- "7000",
- "9000",
- "9000",
- "11000",
- "11000",
- "13000",
- "13000",
- "15000",
- "15000",
- "17000",
- "17000",
- "99000"
+ "-99000.0",
+ "0.0",
+ "0.0",
+ "500.0",
+ "500.0",
+ "1000.0",
+ "1000.0",
+ "1500.0",
+ "1500.0",
+ "2000.0",
+ "2000.0",
+ "2500.0",
+ "2500.0",
+ "3000.0",
+ "3000.0",
+ "4000.0",
+ "4000.0",
+ "5000.0",
+ "5000.0",
+ "7000.0",
+ "7000.0",
+ "9000.0",
+ "9000.0",
+ "11000.0",
+ "11000.0",
+ "13000.0",
+ "13000.0",
+ "15000.0",
+ "15000.0",
+ "17000.0",
+ "17000.0",
+ "99000.0"
],
"stored_direction": "increasing",
"tolerance": "",
@@ -147,86 +147,86 @@
"18960."
],
"requested_bounds": [
- "0.",
- "480.",
- "480.",
- "960.",
- "960.",
- "1440.",
- "1440.",
- "1920.",
- "1920.",
- "2400.",
- "2400.",
- "2880.",
- "2880.",
- "3360.",
- "3360.",
- "3840.",
- "3840.",
- "4320.",
- "4320.",
- "4800.",
- "4800.",
- "5280.",
- "5280.",
- "5760.",
- "5760.",
- "6240.",
- "6240.",
- "6720.",
- "6720.",
- "7200.",
- "7200.",
- "7680.",
- "7680.",
- "8160.",
- "8160.",
- "8640.",
- "8640.",
- "9120.",
- "9120.",
- "9600.",
- "9600.",
- "10080.",
- "10080.",
- "10560.",
- "10560.",
- "11040.",
- "11040.",
- "11520.",
- "11520.",
- "12000.",
- "12000.",
- "12480.",
- "12480.",
- "12960.",
- "12960.",
- "13440.",
- "13440.",
- "13920.",
- "13920.",
- "14400.",
- "14400.",
- "14880.",
- "14880.",
- "15360.",
- "15360.",
- "15840.",
- "15840.",
- "16320.",
- "16320.",
- "16800.",
- "16800.",
- "17280.",
- "17280.",
- "17760.",
- "17760.",
- "18240.",
- "18240.",
- "18720.",
- "18720.",
- "19200."
+ "0.0",
+ "480.0",
+ "480.0",
+ "960.0",
+ "960.0",
+ "1440.0",
+ "1440.0",
+ "1920.0",
+ "1920.0",
+ "2400.0",
+ "2400.0",
+ "2880.0",
+ "2880.0",
+ "3360.0",
+ "3360.0",
+ "3840.0",
+ "3840.0",
+ "4320.0",
+ "4320.0",
+ "4800.0",
+ "4800.0",
+ "5280.0",
+ "5280.0",
+ "5760.0",
+ "5760.0",
+ "6240.0",
+ "6240.0",
+ "6720.0",
+ "6720.0",
+ "7200.0",
+ "7200.0",
+ "7680.0",
+ "7680.0",
+ "8160.0",
+ "8160.0",
+ "8640.0",
+ "8640.0",
+ "9120.0",
+ "9120.0",
+ "9600.0",
+ "9600.0",
+ "10080.0",
+ "10080.0",
+ "10560.0",
+ "10560.0",
+ "11040.0",
+ "11040.0",
+ "11520.0",
+ "11520.0",
+ "12000.0",
+ "12000.0",
+ "12480.0",
+ "12480.0",
+ "12960.0",
+ "12960.0",
+ "13440.0",
+ "13440.0",
+ "13920.0",
+ "13920.0",
+ "14400.0",
+ "14400.0",
+ "14880.0",
+ "14880.0",
+ "15360.0",
+ "15360.0",
+ "15840.0",
+ "15840.0",
+ "16320.0",
+ "16320.0",
+ "16800.0",
+ "16800.0",
+ "17280.0",
+ "17280.0",
+ "17760.0",
+ "17760.0",
+ "18240.0",
+ "18240.0",
+ "18720.0",
+ "18720.0",
+ "19200.0"
],
"stored_direction": "increasing",
"tolerance": "",
@@ -314,36 +314,36 @@
"22.5"
],
"requested_bounds": [
- "-50.",
- "-45.",
- "-45.",
- "-40.",
- "-40.",
- "-35.",
- "-35.",
- "-30.",
- "-30.",
- "-25.",
- "-25.",
- "-20.",
- "-20.",
- "-15.",
- "-15.",
- "-10.",
- "-10.",
- "-5.",
- "-5.",
- "0.",
- "0.",
- "5.",
- "5.",
- "10.",
- "10.",
- "15.",
- "15.",
- "20.",
- "20.",
- "25."
+ "-50.0",
+ "-45.0",
+ "-45.0",
+ "-40.0",
+ "-40.0",
+ "-35.0",
+ "-35.0",
+ "-30.0",
+ "-30.0",
+ "-25.0",
+ "-25.0",
+ "-20.0",
+ "-20.0",
+ "-15.0",
+ "-15.0",
+ "-10.0",
+ "-10.0",
+ "-5.0",
+ "-5.0",
+ "0.0",
+ "0.0",
+ "5.0",
+ "5.0",
+ "10.0",
+ "10.0",
+ "15.0",
+ "15.0",
+ "20.0",
+ "20.0",
+ "25.0"
],
"stored_direction": "increasing",
"tolerance": "",
@@ -506,18 +506,18 @@
"75."
],
"requested_bounds": [
- "0.",
- "10.",
- "10.",
- "20.",
- "20.",
- "30.",
- "30.",
- "40.",
- "40.",
- "60.",
- "60.",
- "90."
+ "0.0",
+ "10.0",
+ "10.0",
+ "20.0",
+ "20.0",
+ "30.0",
+ "30.0",
+ "40.0",
+ "40.0",
+ "60.0",
+ "60.0",
+ "90.0"
],
"stored_direction": "",
"tolerance": "",
@@ -548,18 +548,18 @@
"25."
],
"requested_bounds": [
- "0.",
- "8.",
- "8.",
- "10.",
- "10.",
- "13.",
- "13.",
- "15.",
- "15.",
- "20.",
- "20.",
- "30."
+ "0.0",
+ "8.0",
+ "8.0",
+ "10.0",
+ "10.0",
+ "13.0",
+ "13.0",
+ "15.0",
+ "15.0",
+ "20.0",
+ "20.0",
+ "30.0"
],
"stored_direction": "",
"tolerance": "",
@@ -717,9 +717,9 @@
"out_name": "landuse",
"positive": "",
"requested": [
- "natural",
- "pastoral",
- "crop",
+ "primary_and_secondary_land",
+ "pastures",
+ "crops",
"urban"
],
"requested_bounds": "",
@@ -1086,7 +1086,7 @@
"long_name": "pressure",
"climatology": "",
"formula": "",
- "must_have_bounds": "no",
+ "must_have_bounds": "yes",
"out_name": "plev",
"positive": "down",
"requested": "",
@@ -1130,7 +1130,7 @@
"long_name": "pressure",
"climatology": "",
"formula": "",
- "must_have_bounds": "no",
+ "must_have_bounds": "yes",
"out_name": "plev",
"positive": "down",
"requested": "",
@@ -1165,7 +1165,7 @@
"value": "70000.",
"z_bounds_factors": "",
"z_factors": "",
- "bounds_values": "85000.0 60000.0"
+ "bounds_values": ""
},
"p840": {
"standard_name": "air_pressure",
@@ -1174,7 +1174,7 @@
"long_name": "pressure",
"climatology": "",
"formula": "",
- "must_have_bounds": "no",
+ "must_have_bounds": "yes",
"out_name": "plev",
"positive": "down",
"requested": "",
@@ -1218,7 +1218,7 @@
"long_name": "pressure",
"climatology": "",
"formula": "",
- "must_have_bounds": "no",
+ "must_have_bounds": "yes",
"out_name": "plev",
"positive": "down",
"requested": "",
@@ -1231,7 +1231,7 @@
"value": "70000.",
"z_bounds_factors": "",
"z_factors": "",
- "bounds_values": ""
+ "bounds_values": "85000.0 60000.0"
},
"plev10": {
"standard_name": "air_pressure",
@@ -1610,20 +1610,20 @@
"9000."
],
"requested_bounds": [
- "100000.",
- "80000.",
- "80000.",
- "68000.",
- "68000.",
- "56000.",
- "56000.",
- "44000.",
- "44000.",
- "31000.",
- "31000.",
- "18000.",
- "18000.",
- "0."
+ "100000.0",
+ "80000.0",
+ "80000.0",
+ "68000.0",
+ "68000.0",
+ "56000.0",
+ "56000.0",
+ "44000.0",
+ "44000.0",
+ "31000.0",
+ "31000.0",
+ "18000.0",
+ "18000.0",
+ "0.0"
],
"stored_direction": "decreasing",
"tolerance": "",
@@ -1746,36 +1746,36 @@
"50040."
],
"requested_bounds": [
- "0.",
+ "0.0",
"0.01",
"0.01",
"1.2",
"1.2",
- "3.",
- "3.",
- "5.",
- "5.",
- "7.",
- "7.",
- "10.",
- "10.",
- "15.",
- "15.",
- "20.",
- "20.",
- "25.",
- "25.",
- "30.",
- "30.",
- "40.",
- "40.",
- "50.",
- "50.",
- "60.",
- "60.",
- "80.",
- "80.",
- "100000."
+ "3.0",
+ "3.0",
+ "5.0",
+ "5.0",
+ "7.0",
+ "7.0",
+ "10.0",
+ "10.0",
+ "15.0",
+ "15.0",
+ "20.0",
+ "20.0",
+ "25.0",
+ "25.0",
+ "30.0",
+ "30.0",
+ "40.0",
+ "40.0",
+ "50.0",
+ "50.0",
+ "60.0",
+ "60.0",
+ "80.0",
+ "80.0",
+ "100000.0"
],
"stored_direction": "increasing",
"tolerance": "",
@@ -2077,7 +2077,7 @@
"23.0",
"60.0",
"60.0",
- "100000."
+ "100000.0"
],
"stored_direction": "increasing",
"tolerance": "",
@@ -2133,51 +2133,51 @@
"z_factors": "",
"bounds_values": ""
},
- "time2": {
- "standard_name": "time",
- "units": "days since ?",
- "axis": "T",
- "long_name": "time",
+ "typebare": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "surface type",
"climatology": "",
"formula": "",
- "must_have_bounds": "yes",
- "out_name": "time",
+ "must_have_bounds": "no",
+ "out_name": "type",
"positive": "",
"requested": "",
"requested_bounds": "",
- "stored_direction": "increasing",
+ "stored_direction": "",
"tolerance": "",
- "type": "double",
+ "type": "character",
"valid_max": "",
"valid_min": "",
- "value": "",
+ "value": "bare_ground",
"z_bounds_factors": "",
"z_factors": "",
"bounds_values": ""
},
- "time3": {
- "standard_name": "time",
- "units": "days since ?",
- "axis": "T",
- "long_name": "time",
+ "typeburnt": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Burnt vegetation area type",
"climatology": "",
"formula": "",
- "must_have_bounds": "yes",
- "out_name": "time",
+ "must_have_bounds": "no",
+ "out_name": "type",
"positive": "",
"requested": "",
"requested_bounds": "",
- "stored_direction": "increasing",
+ "stored_direction": "",
"tolerance": "",
- "type": "double",
+ "type": "character",
"valid_max": "",
"valid_min": "",
- "value": "",
+ "value": "burnt_vegetation",
"z_bounds_factors": "",
"z_factors": "",
"bounds_values": ""
},
- "typebare": {
+ "typec3pft": {
"standard_name": "area_type",
"units": "",
"axis": "",
@@ -2194,16 +2194,16 @@
"type": "character",
"valid_max": "",
"valid_min": "",
- "value": "bare_ground",
+ "value": "c3_plant_functional_types",
"z_bounds_factors": "",
"z_factors": "",
"bounds_values": ""
},
- "typeburnt": {
+ "typec4pft": {
"standard_name": "area_type",
"units": "",
"axis": "",
- "long_name": "Burnt vegetation area type",
+ "long_name": "surface type",
"climatology": "",
"formula": "",
"must_have_bounds": "no",
@@ -2216,16 +2216,16 @@
"type": "character",
"valid_max": "",
"valid_min": "",
- "value": "burnt_vegetation",
+ "value": "c4_plant_functional_types",
"z_bounds_factors": "",
"z_factors": "",
"bounds_values": ""
},
- "typec3pft": {
+ "typecloud": {
"standard_name": "area_type",
"units": "",
"axis": "",
- "long_name": "surface type",
+ "long_name": "Cloud area type",
"climatology": "",
"formula": "",
"must_have_bounds": "no",
@@ -2238,16 +2238,16 @@
"type": "character",
"valid_max": "",
"valid_min": "",
- "value": "c3_plant_functional_types",
+ "value": "cloud",
"z_bounds_factors": "",
"z_factors": "",
"bounds_values": ""
},
- "typec4pft": {
+ "typecrop": {
"standard_name": "area_type",
"units": "",
"axis": "",
- "long_name": "surface type",
+ "long_name": "Crop area type",
"climatology": "",
"formula": "",
"must_have_bounds": "no",
@@ -2260,16 +2260,16 @@
"type": "character",
"valid_max": "",
"valid_min": "",
- "value": "c4_plant_functional_types",
+ "value": "crops",
"z_bounds_factors": "",
"z_factors": "",
"bounds_values": ""
},
- "typecrop": {
+ "typefis": {
"standard_name": "area_type",
"units": "",
"axis": "",
- "long_name": "Crop area type",
+ "long_name": "Floating Ice Shelf area type",
"climatology": "",
"formula": "",
"must_have_bounds": "no",
@@ -2282,7 +2282,73 @@
"type": "character",
"valid_max": "",
"valid_min": "",
- "value": "crops",
+ "value": "floating_ice_shelf",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
+ "typegis": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Grounded Ice Sheet area type",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "grounded_ice_sheet",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
+ "typeland": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Land area type",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "land",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
+ "typeli": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Land Ice area type",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "land_ice",
"z_bounds_factors": "",
"z_factors": "",
"bounds_values": ""
@@ -2331,6 +2397,28 @@
"z_factors": "",
"bounds_values": ""
},
+ "typenwd": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Non-Woody Vegetation area type",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "non_woody_vegetation",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
"typepasture": {
"standard_name": "area_type",
"units": "",
@@ -2397,6 +2485,28 @@
"z_factors": "",
"bounds_values": ""
},
+ "typeresidual": {
+ "standard_name": "",
+ "units": "",
+ "axis": "",
+ "long_name": "Residual area",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "residual",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
"typesdec": {
"standard_name": "area_type",
"units": "",
@@ -2419,6 +2529,28 @@
"z_factors": "",
"bounds_values": ""
},
+ "typesea": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Ocean area type",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "sea",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
"typesever": {
"standard_name": "area_type",
"units": "",
@@ -2463,6 +2595,28 @@
"z_factors": "",
"bounds_values": ""
},
+ "typesi": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Sea Ice area type",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "sea_ice",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
"typetree": {
"standard_name": "area_type",
"units": "",
@@ -2485,6 +2639,94 @@
"z_factors": "",
"bounds_values": ""
},
+ "typetreebd": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Tree area type (Broadleaf Deciduous)",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "trees",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
+ "typetreebe": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Tree area type (Broadleaf Evergreen)",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "trees",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
+ "typetreend": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Tree area type (Narrowleaf Deciduous)",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "trees",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
+ "typetreene": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Tree area type (Narrowleaf Evergreen)",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "trees",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
"typeveg": {
"standard_name": "area_type",
"units": "",
@@ -2507,6 +2749,28 @@
"z_factors": "",
"bounds_values": ""
},
+ "typewetla": {
+ "standard_name": "area_type",
+ "units": "",
+ "axis": "",
+ "long_name": "Wetland",
+ "climatology": "",
+ "formula": "",
+ "must_have_bounds": "no",
+ "out_name": "type",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "",
+ "tolerance": "",
+ "type": "character",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
"vegtype": {
"standard_name": "",
"units": "",
@@ -2616,6 +2880,50 @@
"z_bounds_factors": "",
"z_factors": "",
"bounds_values": ""
+ },
+ "time2": {
+ "standard_name": "time",
+ "units": "days since ?",
+ "axis": "T",
+ "long_name": "time",
+ "climatology": "yes",
+ "formula": "",
+ "must_have_bounds": "yes",
+ "out_name": "time",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "increasing",
+ "tolerance": "",
+ "type": "double",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
+ },
+ "time3": {
+ "standard_name": "time",
+ "units": "days since ?",
+ "axis": "T",
+ "long_name": "time",
+ "climatology": "yes",
+ "formula": "",
+ "must_have_bounds": "yes",
+ "out_name": "time",
+ "positive": "",
+ "requested": "",
+ "requested_bounds": "",
+ "stored_direction": "increasing",
+ "tolerance": "",
+ "type": "double",
+ "valid_max": "",
+ "valid_min": "",
+ "value": "",
+ "z_bounds_factors": "",
+ "z_factors": "",
+ "bounds_values": ""
}
}
}
diff --git a/TestTables/CMIP6_day.json b/TestTables/CMIP6_day.json
index 647a1ac..98a4c70 100644
--- a/TestTables/CMIP6_day.json
+++ b/TestTables/CMIP6_day.json
@@ -1,11 +1,10 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table day",
"realm": "atmos",
- "frequency": "day",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "1.00000",
@@ -15,10 +14,11 @@
},
"variable_entry": {
"clt": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "cloud_area_fraction",
"units": "%",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Total Cloud Fraction",
"comment": "Total cloud area fraction for the whole atmospheric column, as seen from the surface or the top of the atmosphere. Includes both large-scale and convective cloud.",
@@ -32,10 +32,11 @@
"ok_max_mean_abs": ""
},
"hfls": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_upward_latent_heat_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upward Latent Heat Flux",
"comment": "",
@@ -49,10 +50,11 @@
"ok_max_mean_abs": ""
},
"hfss": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_upward_sensible_heat_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upward Sensible Heat Flux",
"comment": "",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"hur": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
@@ -83,10 +86,11 @@
"ok_max_mean_abs": ""
},
"hurs": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Relative Humidity",
"comment": "The relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C.",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"hursmax": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
@@ -117,6 +122,7 @@
"ok_max_mean_abs": ""
},
"hursmin": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "relative_humidity",
"units": "%",
@@ -134,6 +140,7 @@
"ok_max_mean_abs": ""
},
"hus": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
@@ -151,10 +158,11 @@
"ok_max_mean_abs": ""
},
"huss": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "specific_humidity",
"units": "1.0",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Specific Humidity",
"comment": "Near-surface (usually, 2 meter) specific humidity.",
@@ -167,7 +175,26 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
+ "mrro": {
+ "frequency": "day",
+ "modeling_realm": "land",
+ "standard_name": "runoff_flux",
+ "units": "kg m-2 s-1",
+ "cell_methods": "area: mean where land time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Total Runoff",
+ "comment": "The total run-off (including drainage through the base of the soil model) per unit area leaving the land portion of the grid cell.",
+ "dimensions": "longitude latitude time",
+ "out_name": "mrro",
+ "type": "real",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
+ },
"mrso": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "soil_moisture_content",
"units": "kg m-2",
@@ -185,6 +212,7 @@
"ok_max_mean_abs": ""
},
"mrsos": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "moisture_content_of_soil_layer",
"units": "kg m-2",
@@ -202,10 +230,11 @@
"ok_max_mean_abs": ""
},
"pr": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Precipitation",
"comment": "includes both liquid and solid phases",
@@ -219,10 +248,11 @@
"ok_max_mean_abs": ""
},
"prc": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "convective_precipitation_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Convective Precipitation",
"comment": "Convective precipitation at surface; includes both liquid and solid phases.",
@@ -236,10 +266,11 @@
"ok_max_mean_abs": ""
},
"prsn": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "snowfall_flux",
"units": "kg m-2 s-1",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Snowfall Flux",
"comment": "at surface; includes precipitation of all forms of water in the solid phase",
@@ -253,10 +284,11 @@
"ok_max_mean_abs": ""
},
"psl": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_pressure_at_sea_level",
"units": "Pa",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Sea Level Pressure",
"comment": "Sea Level Pressure",
@@ -270,10 +302,11 @@
"ok_max_mean_abs": ""
},
"rlds": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Longwave Radiation",
"comment": "",
@@ -287,10 +320,11 @@
"ok_max_mean_abs": ""
},
"rlus": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_longwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upwelling Longwave Radiation",
"comment": "",
@@ -304,10 +338,11 @@
"ok_max_mean_abs": ""
},
"rlut": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "toa_outgoing_longwave_flux",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "TOA Outgoing Longwave Radiation",
"comment": "at the top of the atmosphere (to be compared with satellite measurements)",
@@ -321,10 +356,11 @@
"ok_max_mean_abs": ""
},
"rsds": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_downwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Downwelling Shortwave Radiation",
"comment": "surface solar irradiance for UV calculations",
@@ -338,10 +374,11 @@
"ok_max_mean_abs": ""
},
"rsus": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "surface_upwelling_shortwave_flux_in_air",
"units": "W m-2",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Surface Upwelling Shortwave Radiation",
"comment": "",
@@ -355,11 +392,12 @@
"ok_max_mean_abs": ""
},
"sfcWind": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "wind_speed",
"units": "m s-1",
- "cell_methods": "time: mean",
- "cell_measures": "",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Daily-Mean Near-Surface Wind Speed",
"comment": "near-surface (usually, 10 meters) wind speed.",
"dimensions": "longitude latitude time height10m",
@@ -372,11 +410,12 @@
"ok_max_mean_abs": ""
},
"sfcWindmax": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "wind_speed",
"units": "m s-1",
"cell_methods": "area: mean time: maximum",
- "cell_measures": "",
+ "cell_measures": "area: areacella",
"long_name": "Daily Maximum Near-Surface Wind Speed",
"comment": "Daily maximum near-surface (usually, 10 meters) wind speed.",
"dimensions": "longitude latitude time height10m",
@@ -388,16 +427,17 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "sithick": {
- "modeling_realm": "seaIce ocean",
- "standard_name": "sea_ice_thickness",
- "units": "m",
- "cell_methods": "time: mean",
- "cell_measures": "area: areacello",
- "long_name": "Sea Ice Thickness",
- "comment": "Actual (floe) thickness of sea ice (NOT volume divided by grid area as was done in CMIP5)",
+ "snc": {
+ "frequency": "day",
+ "modeling_realm": "landIce land",
+ "standard_name": "surface_snow_area_fraction",
+ "units": "%",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Snow Area Fraction",
+ "comment": "Fraction of each grid cell that is occupied by snow that rests on land portion of cell.",
"dimensions": "longitude latitude time",
- "out_name": "sithick",
+ "out_name": "snc",
"type": "real",
"positive": "",
"valid_min": "",
@@ -405,16 +445,17 @@
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
},
- "snc": {
+ "snw": {
+ "frequency": "day",
"modeling_realm": "landIce land",
- "standard_name": "surface_snow_area_fraction",
- "units": "%",
- "cell_methods": "area: time: mean ",
+ "standard_name": "surface_snow_amount",
+ "units": "kg m-2",
+ "cell_methods": "area: mean where land time: mean",
"cell_measures": "area: areacella",
- "long_name": "Snow Area Fraction",
- "comment": "Fraction of each grid cell that is occupied by snow that rests on land portion of cell.",
+ "long_name": "Surface Snow Amount",
+ "comment": "The mass of surface snow on the land portion of the grid cell divided by the land area in the grid cell; reported as missing where the land fraction is 0; excludes snow on vegetation canopy or on sea ice.",
"dimensions": "longitude latitude time",
- "out_name": "snc",
+ "out_name": "snw",
"type": "real",
"positive": "",
"valid_min": "",
@@ -423,6 +464,7 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
@@ -440,10 +482,11 @@
"ok_max_mean_abs": ""
},
"tas": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
- "cell_methods": "time: mean",
+ "cell_methods": "area: time: mean",
"cell_measures": "area: areacella",
"long_name": "Near-Surface Air Temperature",
"comment": "near-surface (usually, 2 meter) air temperature",
@@ -457,6 +500,7 @@
"ok_max_mean_abs": ""
},
"tasmax": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
@@ -474,6 +518,7 @@
"ok_max_mean_abs": ""
},
"tasmin": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "air_temperature",
"units": "K",
@@ -491,10 +536,11 @@
"ok_max_mean_abs": ""
},
"tslsi": {
+ "frequency": "day",
"modeling_realm": "land",
"standard_name": "surface_temperature",
"units": "K",
- "cell_methods": "area: time: mean ",
+ "cell_methods": "area: time: mean (comment: over land and sea ice)",
"cell_measures": "area: areacella",
"long_name": "Surface Temperature Where Land or Sea Ice",
"comment": "'skin' temperature of all surfaces except open ocean.",
@@ -508,6 +554,7 @@
"ok_max_mean_abs": ""
},
"ua": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
@@ -525,11 +572,12 @@
"ok_max_mean_abs": ""
},
"uas": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "eastward_wind",
"units": "m s-1",
- "cell_methods": "time: mean",
- "cell_measures": "",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Eastward Near-Surface Wind",
"comment": "Eastward component of the near-surface (usually, 10 meters) wind",
"dimensions": "longitude latitude time height10m",
@@ -542,6 +590,7 @@
"ok_max_mean_abs": ""
},
"va": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
@@ -559,11 +608,12 @@
"ok_max_mean_abs": ""
},
"vas": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "northward_wind",
"units": "m s-1",
- "cell_methods": "time: mean",
- "cell_measures": "",
+ "cell_methods": "area: time: mean",
+ "cell_measures": "area: areacella",
"long_name": "Northward Near-Surface Wind",
"comment": "Northward component of the near surface wind",
"dimensions": "longitude latitude time height10m",
@@ -576,6 +626,7 @@
"ok_max_mean_abs": ""
},
"wap": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "lagrangian_tendency_of_air_pressure",
"units": "Pa s-1",
@@ -593,6 +644,7 @@
"ok_max_mean_abs": ""
},
"zg": {
+ "frequency": "day",
"modeling_realm": "atmos",
"standard_name": "geopotential_height",
"units": "m",
diff --git a/TestTables/CMIP6_fx.json b/TestTables/CMIP6_fx.json
index 429e831..3c01e40 100644
--- a/TestTables/CMIP6_fx.json
+++ b/TestTables/CMIP6_fx.json
@@ -1,20 +1,20 @@
{
"Header": {
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"table_id": "Table fx",
"realm": "land",
- "frequency": "fx",
"cmor_version": "3.2",
- "table_date": "10 April 2017",
+ "table_date": "16 June 2017",
"missing_value": "1e20",
"product": "model-output",
"approx_interval": "0.00000",
- "generic_levels": "olevel",
+ "generic_levels": "alevel",
"mip_era": "CMIP6",
"Conventions": "CF-1.7 CMIP-6.0"
},
"variable_entry": {
"areacella": {
+ "frequency": "fx",
"modeling_realm": "atmos land",
"standard_name": "cell_area",
"units": "m2",
@@ -32,6 +32,7 @@
"ok_max_mean_abs": ""
},
"mrsofc": {
+ "frequency": "fx",
"modeling_realm": "land",
"standard_name": "soil_moisture_content_at_field_capacity",
"units": "kg m-2",
@@ -49,6 +50,7 @@
"ok_max_mean_abs": ""
},
"orog": {
+ "frequency": "fx",
"modeling_realm": "land",
"standard_name": "surface_altitude",
"units": "m",
@@ -66,6 +68,7 @@
"ok_max_mean_abs": ""
},
"rootd": {
+ "frequency": "fx",
"modeling_realm": "land",
"standard_name": "root_depth",
"units": "m",
@@ -83,6 +86,7 @@
"ok_max_mean_abs": ""
},
"sftgif": {
+ "frequency": "fx",
"modeling_realm": "land",
"standard_name": "land_ice_area_fraction",
"units": "%",
@@ -90,7 +94,7 @@
"cell_measures": "area: areacella",
"long_name": "Fraction of Grid Cell Covered with Glacier",
"comment": "Fraction of grid cell covered by land ice (ice sheet, ice shelf, ice cap, glacier)",
- "dimensions": "longitude latitude",
+ "dimensions": "longitude latitude typeli",
"out_name": "sftgif",
"type": "real",
"positive": "",
@@ -100,6 +104,7 @@
"ok_max_mean_abs": ""
},
"sftlf": {
+ "frequency": "fx",
"modeling_realm": "atmos",
"standard_name": "land_area_fraction",
"units": "%",
@@ -107,7 +112,7 @@
"cell_measures": "area: areacella",
"long_name": "Land Area Fraction",
"comment": "Please express 'X_area_fraction' as the percentage of horizontal area occupied by X.",
- "dimensions": "longitude latitude",
+ "dimensions": "longitude latitude typeland",
"out_name": "sftlf",
"type": "real",
"positive": "",
@@ -115,6 +120,24 @@
"valid_max": "",
"ok_min_mean_abs": "",
"ok_max_mean_abs": ""
+ },
+ "zfull": {
+ "frequency": "fx",
+ "modeling_realm": "atmos",
+ "standard_name": "height_above_reference_ellipsoid",
+ "units": "m",
+ "cell_methods": "area: mean",
+ "cell_measures": "area: areacella",
+ "long_name": "Altitude of Model Full-Levels",
+ "comment": "",
+ "dimensions": "longitude latitude alevel",
+ "out_name": "zfull",
+ "type": "float",
+ "positive": "",
+ "valid_min": "",
+ "valid_max": "",
+ "ok_min_mean_abs": "",
+ "ok_max_mean_abs": ""
}
}
}
diff --git a/TestTables/CMIP6_grids.json b/TestTables/CMIP6_grids.json
index 19a8266..c8cbd88 100644
--- a/TestTables/CMIP6_grids.json
+++ b/TestTables/CMIP6_grids.json
@@ -2,11 +2,11 @@
"Header": {
"product": "output",
"cmor_version": "3.2",
- "Conventions": "CF-1.6 CMIP-6.0",
+ "Conventions": "CF-1.7 CMIP-6.0",
"table_id": "Table grids",
- "data_specs_version": "01.00.06",
+ "data_specs_version": "01.00.11",
"missing_value": "1e20",
- "table_date": "10 April 2017"
+ "table_date": "16 June 2017"
},
"mapping_entry": {
"sample_user_mapping": {
@@ -118,7 +118,7 @@
"dimensions": "longitude latitude",
"valid_min": "-90.0",
"long_name": "",
- "standard_name": "",
+ "standard_name": "latitude",
"out_name": "latitude",
"units": "degrees_north",
"valid_max": "90.0"
@@ -127,7 +127,7 @@
"dimensions": "vertices longitude latitude",
"valid_min": "-90.0",
"long_name": "",
- "standard_name": "",
+ "standard_name": "vertices_latitude",
"out_name": "vertices_latitude",
"units": "degrees_north",
"valid_max": "90.0"
@@ -136,7 +136,7 @@
"dimensions": "vertices longitude latitude",
"valid_min": "0.0",
"long_name": "",
- "standard_name": "",
+ "standard_name": "vertices_longitude",
"out_name": "vertices_longitude",
"units": "degrees_east",
"valid_max": "360.0"
@@ -145,7 +145,7 @@
"dimensions": "longitude latitude",
"valid_min": "0.0",
"long_name": "",
- "standard_name": "",
+ "standard_name": "longitude",
"out_name": "longitude",
"units": "degrees_east",
"valid_max": "360.0"
diff --git a/TestTables/python_test_table_A b/TestTables/python_test_table_A
index 1d76101..7526325 100644
--- a/TestTables/python_test_table_A
+++ b/TestTables/python_test_table_A
@@ -3,7 +3,6 @@
"data_specs_version": "01.10.38",
"table_id": "Table AmonBounds",
"realm": "atmos atmosChem",
- "frequency": "mon",
"cmor_version": "3.2",
"table_date": "15 November 2016",
"missing_value": "1e20",
@@ -217,6 +216,7 @@
},
"pressure2": {
+ "frequency": "mon",
"standard_name": "air_pressure",
"stored_direction": "decreasing",
"units": "Pa",
@@ -706,6 +706,7 @@
"ok_max_mean_abs": ""
},
"ta": {
+ "frequency": "mon",
"comment": "",
"dimensions": "longitude latitude pressure2 time",
"positive": "",
diff --git a/configure b/configure
index e0f4643..9bc047f 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for cmor 3.2.3.
+# Generated by GNU Autoconf 2.69 for cmor 3.2.4.
#
# Report bugs to <nadeau1 at llnl.gov>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='cmor'
PACKAGE_TARNAME='cmor'
-PACKAGE_VERSION='3.2.3'
-PACKAGE_STRING='cmor 3.2.3'
+PACKAGE_VERSION='3.2.4'
+PACKAGE_STRING='cmor 3.2.4'
PACKAGE_BUGREPORT='nadeau1 at llnl.gov'
PACKAGE_URL=''
@@ -1261,7 +1261,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures cmor 3.2.3 to adapt to many kinds of systems.
+\`configure' configures cmor 3.2.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1328,7 +1328,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of cmor 3.2.3:";;
+ short | recursive ) echo "Configuration of cmor 3.2.4:";;
esac
cat <<\_ACEOF
@@ -1430,7 +1430,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-cmor configure 3.2.3
+cmor configure 3.2.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1648,7 +1648,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by cmor $as_me 3.2.3, which was
+It was created by cmor $as_me 3.2.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2264,7 +2264,7 @@ else
MODFILES="cmor_users_functions.*"
fi
-CDATPREFIX=" "
+CDATPREFIX="--prefix=${prefix}"
MAKETESTPYTHON=" "
# Check whether --with-cdat was given.
@@ -4982,7 +4982,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by cmor $as_me 3.2.3, which was
+This file was extended by cmor $as_me 3.2.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5035,7 +5035,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-cmor config.status 3.2.3
+cmor config.status 3.2.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index d8d1e6f..2b69342 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl
dnl Process this file with autoconf to produce a configure script.
dnl AC_PREREQ(2.59)
-AC_INIT(cmor, 3.2.3, nadeau1 at llnl.gov)
+AC_INIT(cmor, 3.2.4, nadeau1 at llnl.gov)
GIT_TAG=`./get_git_version.sh`
@@ -115,7 +115,7 @@ else
MODFILES="cmor_users_functions.*"
fi
-CDATPREFIX=" "
+CDATPREFIX="--prefix=${prefix}"
MAKETESTPYTHON=" "
dnl turn on/off python
AC_ARG_WITH([cdat],[AS_HELP_STRING([--with-cdat],[enable support for cdat put path root (w/o bin/cdat)])],[],[with_cdat="no"])
diff --git a/include/cmor.h b/include/cmor.h
index 2dcbfa7..ef11ec1 100644
--- a/include/cmor.h
+++ b/include/cmor.h
@@ -3,7 +3,7 @@
#define CMOR_VERSION_MAJOR 3
#define CMOR_VERSION_MINOR 2
-#define CMOR_VERSION_PATCH 3
+#define CMOR_VERSION_PATCH 4
#define CMOR_CF_VERSION_MAJOR 1
#define CMOR_CF_VERSION_MINOR 7
@@ -71,7 +71,7 @@
#define AXIS_ATT_AXIS "axis"
#define AXIS_ATT_INDEXONLY "index_only"
#define AXIS_ATT_MUSTBOUNDS "must_have_bounds"
-#define AXIS_ATT_MUSTCALLGRID "must_call_cmmore_grid"
+#define AXIS_ATT_MUSTCALLGRID "must_call_cmor_grid"
#define AXIS_ATT_TYPE "type"
#define AXIS_ATT_VALIDMIN "valid_min"
#define AXIS_ATT_VALIDMAX "valid_max"
@@ -83,6 +83,7 @@
#define AXIS_ATT_BOUNDSREQUESTED "bounds_requested"
#define AXIS_ATT_REQUESTEDBOUNDS "requested_bounds"
#define AXIS_ATT_REQUESTED "requested"
+#define AXIS_FORECAST_TIME "reftime"
#define TABLE_CONTROL_FILENAME "CMIP6_CV.json"
#define TABLE_FOUND -1
@@ -230,7 +231,6 @@
#define TABLE_HEADER_REALM "realm"
#define TABLE_HEADER_TABLE_DATE "table_date"
#define TABLE_HEADER_FORCINGS "forcings"
-#define TABLE_HEADER_FREQUENCY "frequency"
#define TABLE_HEADER_TABLE_ID "table_id"
#define TABLE_HEADER_BASEURL "baseURL"
#define TABLE_HEADER_PRODUCT "product"
@@ -252,7 +252,7 @@
#define AREA "area"
#define VOLUME "volume"
#define CMIP6 "CMIP6"
-#define CMOR_DEFAULT_PATH_TEMPLATE "<mip_era><activity_id><institute_id><source_id><experiment_id><member_id><table><variable_id><grid_label><version>"
+#define CMOR_DEFAULT_PATH_TEMPLATE "<mip_era><activity_id><institution_id><source_id><experiment_id><member_id><table><variable_id><grid_label><version>"
#define CMOR_DEFAULT_FILE_TEMPLATE "<variable_id><table><source_id><experiment_id><member_id><grid_label>"
#define CMOR_DEFAULT_FURTHERURL_TEMPLATE "http://furtherinfo.es-doc.org/<mip_era><institution_id><source_id><experiment_id><sub_experiment_id><variant_label>"
//#define EXTERNAL_VARIABLE_REGEX "([[:alpha:]]+):[[:blank:]]*([[:alpha:]]+)[[:blank:]]*([[:alpha:]]+:[[:blank:]]*([[:alpha:]]+))*"
@@ -423,6 +423,7 @@ typedef struct cmor_var_ {
int ref_table_id;
int ref_var_id;
int initialized;
+ int error;
int closed;
int nc_var_id;
int nc_zfactors[CMOR_MAX_VARIABLES];
@@ -473,6 +474,7 @@ typedef struct cmor_var_ {
char current_path[CMOR_MAX_STRING];
char suffix[CMOR_MAX_STRING];
int suffix_has_date;
+ char frequency[CMOR_MAX_STRING];
} cmor_var_t;
extern cmor_var_t cmor_vars[CMOR_MAX_VARIABLES];
@@ -517,7 +519,6 @@ typedef struct cmor_table_ {
char product[CMOR_MAX_STRING];
char realm[CMOR_MAX_STRING];
char path[CMOR_MAX_STRING];
- char frequency[CMOR_MAX_STRING];
char **forcings;
int nforcings;
unsigned char md5[16];
diff --git a/include/cmor_func_def.h b/include/cmor_func_def.h
index fcab266..3831c81 100644
--- a/include/cmor_func_def.h
+++ b/include/cmor_func_def.h
@@ -24,6 +24,8 @@ extern int cmor_have_NetCDF3( void );
extern int cmor_have_NetCDF363( void );
extern void cmor_handle_error( char error_msg[CMOR_MAX_STRING],
int level );
+extern void cmor_handle_error_var( char error_msg[CMOR_MAX_STRING], int level,
+ int var_id );
extern int cmor_setup( char *path, int *netcdf, int *verbosity, int *mode,
char *logfile, int *cmor_create_subdirectories);
diff --git a/scripts/createCMIP6CV.py b/scripts/createCMIP6CV.py
index 5ccb9fc..7d58ad9 100644
--- a/scripts/createCMIP6CV.py
+++ b/scripts/createCMIP6CV.py
@@ -69,7 +69,6 @@ def run():
regexp["tracking_id"] = [ "hdl:21.14100/.*" ]
regexp["mip_era"] = [ "CMIP6" ]
- regexp["frequency"] = [ "3hr", "6hr", "day", "fx", "mon", "monClim", "subhr", "yr" ]
regexp["further_info_url"] = [ "http://furtherinfo.es-doc.org/[[:alpha:]]\\{1,\\}" ]
regexp["product"] = [ "model-output" ]
regexp["Conventions"] = [ "^CF-1.7 CMIP-6.0\\( UGRID-1.0\\)\\{0,\\}$" ]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cmor.git
More information about the debian-science-commits
mailing list