From 7406094803be67ba79d6846404b0c274caf8e9e8 Mon Sep 17 00:00:00 2001 From: Denis Nadeau Date: Wed, 19 Apr 2017 14:55:07 -0700 Subject: [PATCH] Cmor 3.2.3 (#159) * add travis CI for Pushes * add service docker to travis * change cdms to cmor and comment out test * add script * It would help to acually have the scripts * change to PCMDI channel * try with osx * error in PCMDI token * Fix osx miniconda link * add entry_point * update tables and PrePARE * fix test * add parent experiment id and sub experiment id validation * Fix some tests * Fix all Tables for tests * allow a maximum of 30 tables to be loaded in memory * Add Test/test_python_toomany_tables.py * Fix PrePARE entry_points using setuptools * Check filename for for PrePARE * Fix member_id and variant_label confusion * add numpy 1.12 to anaconda upload * update tables and CMIP6_CV * Fix PrePARE filname check * fix log problem * clean code * fix Grid pywrapper issues and clean code * add test to Makefile.in and fix test_interface_03 directory * create source in CMIP6_CV.json file for sourc_id section * autopep8 files and increase to 3.2.3 * fix .travis.yaml --- .travis.yml | 58 +- INSTALL | 4 +- Lib/pywrapper.py | 6 +- LibCV/PrePARE/PrePARE.py | 75 +- LibCV/PrePARE/__init__.py | 1 + LibCV/__init__.py | 2 +- LibCV/cmor_const.py | 1 + LibCV/pywrapper.py | 56 +- Makefile.in | 2 + Src/_cmormodule.c | 41 +- Src/_controlvocabulary.c | 89 +- Src/cmor.c | 533 +- Src/cmor_CV.c | 1071 +- Src/cmor_axes.c | 8 +- Src/cmor_grids.c | 457 +- Src/cmor_tables.c | 43 +- Src/cmor_variables.c | 4 +- Test/_cmor_stub.py | 2 + Test/all_tests.py | 1 + Test/check_results.py | 58 +- Test/cmor_speed_and_compression.py | 197 +- Test/cmor_speed_and_compression_01.py | 86 +- Test/cmor_speed_and_compression_02.py | 259 +- Test/cmor_speed_and_compression_03.py | 163 +- Test/common_user_input.json | 26 +- Test/common_user_inputNOBOUNDS.json | 2 +- Test/common_user_input_NOID.json | 3 +- Test/in_files.py | 56 +- Test/jamie_hybrid_height.py | 59 +- Test/jamie_positive.py | 46 +- Test/nc2asc.py | 89 +- Test/out_files.py | 180 +- Test/speed_test_table_A | 5 +- Test/test_checker_works.py | 2723 +++-- Test/test_chunking.py | 23 +- Test/test_compression.py | 61 +- Test/test_doc.py | 40 +- Test/test_grid_stub_jamie.py | 143 +- Test/test_lon_gt_360.py | 54 +- Test/test_lon_thro_360.py | 64 +- Test/test_non_monotonic_climo_bonds_ok.py | 62 +- Test/test_python_1D_var.py | 14 +- Test/test_python_2Gb_file.py | 81 +- Test/test_python_2Gb_slice.py | 59 +- Test/test_python_3hr.py | 37 - Test/test_python_CMIP6_CV_baddirectory.py | 4 +- Test/test_python_CMIP6_CV_badgridgr.py | 10 +- Test/test_python_CMIP6_CV_badgridlabel.py | 7 +- .../test_python_CMIP6_CV_badgridresolution.py | 10 +- Test/test_python_CMIP6_CV_badinstitution.py | 8 +- Test/test_python_CMIP6_CV_badinstitutionID.py | 11 +- ..._python_CMIP6_CV_badinstitutionIDNotSet.py | 12 +- Test/test_python_CMIP6_CV_badsource.py | 8 +- Test/test_python_CMIP6_CV_badsourceid.py | 8 +- Test/test_python_CMIP6_CV_badsourcetype.py | 7 +- ...st_python_CMIP6_CV_badsourcetypeCHEMAER.py | 12 +- ...t_python_CMIP6_CV_badsourcetypeRequired.py | 14 +- Test/test_python_CMIP6_CV_badvariant.py | 13 +- .../test_python_CMIP6_CV_externalvariables.py | 16 +- ...est_python_CMIP6_CV_forcemultipleparent.py | 151 + Test/test_python_CMIP6_CV_forcenoparent.py | 85 + Test/test_python_CMIP6_CV_forceparent.py | 98 + Test/test_python_CMIP6_CV_furtherinfourl.py | 70 +- Test/test_python_CMIP6_CV_fxtable.py | 17 +- ...st_python_CMIP6_CV_longrealizationindex.py | 12 +- Test/test_python_CMIP6_CV_nomipera.py | 13 +- Test/test_python_CMIP6_CV_parentmipera.py | 95 + Test/test_python_CMIP6_CV_parentsourceid.py | 94 + Test/test_python_CMIP6_CV_parenttimeunits.py | 97 + ...test_python_CMIP6_CV_parentvariantlabel.py | 95 + ...est_python_CMIP6_CV_sub_experimentIDbad.py | 96 + .../test_python_CMIP6_CV_sub_experiment_id.py | 96 + .../test_python_CMIP6_CV_sub_experimentbad.py | 95 + ...st_python_CMIP6_CV_sub_experimentnotset.py | 97 + Test/test_python_CMIP6_CV_trackingNoprefix.py | 7 +- Test/test_python_CMIP6_CV_trackingprefix.py | 42 +- Test/test_python_CMIP6_driving.py | 11 +- Test/test_python_CMIP6_experimentID.py | 11 +- Test/test_python_CMIP6_projections.py | 112 + Test/test_python_CMIP6_wrong_activity.py | 11 +- Test/test_python_YYYMMDDHH_exp_fmt.py | 42 +- Test/test_python_alastair_1.py | 99 +- Test/test_python_appending.py | 94 +- Test/test_python_bad_date.py | 111 +- Test/test_python_bentley_01.py | 81 +- Test/test_python_bounds_request.py | 61 +- Test/test_python_cfmip_site_axis_test.py | 135 +- Test/test_python_clim_bounds.py | 70 +- Test/test_python_clim_bounds_02.py | 93 +- Test/test_python_clim_bounds_03.py | 99 +- Test/test_python_clim_bounds_04.py | 99 +- Test/test_python_common.py | 228 +- Test/test_python_direct_calls.py | 213 +- Test/test_python_free_wrapping_issue.py | 131 +- Test/test_python_grid_and_ocn_sigma.py | 225 +- Test/test_python_index_coord.py | 70 +- Test/test_python_jamie.py | 40 +- Test/test_python_jamie_10.py | 52 +- Test/test_python_jamie_11.py | 156 - Test/test_python_jamie_12.py | 55 +- Test/test_python_jamie_2.py | 39 +- Test/test_python_jamie_3.py | 36 +- Test/test_python_jamie_3hr.py | 58 +- Test/test_python_jamie_4.py | 36 +- Test/test_python_jamie_6.py | 247 +- Test/test_python_jamie_7.py | 101 +- Test/test_python_jamie_8.py | 97 +- Test/test_python_jamie_9.py | 54 +- Test/test_python_jamie_site_surface.py | 48 +- Test/test_python_joerg_1.py | 92 +- Test/test_python_joerg_10.py | 121 +- Test/test_python_joerg_11.py | 89 +- Test/test_python_joerg_12.py | 91 +- Test/test_python_joerg_2.py | 66 +- Test/test_python_joerg_3.py | 215 +- Test/test_python_joerg_4.py | 106 +- Test/test_python_joerg_5.py | 22 +- Test/test_python_joerg_6.py | 19 +- Test/test_python_joerg_7.py | 65 +- Test/test_python_joerg_8.py | 89 +- Test/test_python_joerg_9.py | 138 +- Test/test_python_joerg_tim2_clim.py | 71 +- Test/test_python_joerg_tim2_clim_02.py | 57 +- Test/test_python_max_variables.py | 94 +- Test/test_python_max_variables_2.py | 113 +- Test/test_python_memory_check.py | 84 +- Test/test_python_new_tables.py | 52 +- Test/test_python_obs4MIPs.py | 34 +- Test/test_python_open_close_cmor_multiple.py | 120 +- Test/test_python_polar_stereo.py | 94 +- Test/test_python_region.py | 44 +- Test/test_python_reverted_lats.py | 107 +- ..._python_singleton_anywhere_in_table_def.py | 137 +- Test/test_python_singleton_string.py | 115 +- Test/test_python_stephanie_6hrPlev_minutes.py | 68 +- Test/test_python_toomany_tables.py | 123 + Test/test_python_user_interface_00.py | 162 +- Test/test_python_user_interface_01.py | 99 +- Test/test_python_user_interface_03.py | 93 +- Test/test_site_ts.py | 55 +- Test/test_sophie.f90 | 6 +- Test/test_time_gap_multi_write.py | 84 +- Test/test_time_gap_single_write1.py | 77 +- Test/test_time_gap_single_write2.py | 76 +- TestTables/CMIP6_3hr.json | 38 +- TestTables/CMIP6_6hrLev.json | 35 +- TestTables/CMIP6_6hrPlev.json | 99 +- TestTables/CMIP6_6hrPlevPt.json | 118 +- TestTables/CMIP6_AERday.json | 57 +- TestTables/CMIP6_AERhr.json | 20 +- TestTables/CMIP6_AERmon.json | 356 +- TestTables/CMIP6_AERmonZ.json | 14 +- TestTables/CMIP6_Amon.json | 90 +- TestTables/CMIP6_Amon_json_hfls | 6 +- TestTables/CMIP6_CF3hr.json | 216 +- TestTables/CMIP6_CFday.json | 52 +- TestTables/CMIP6_CFmon.json | 22 +- TestTables/CMIP6_CFsubhr.json | 30 +- TestTables/CMIP6_CFsubhrOff.json | 10 +- TestTables/CMIP6_CV.json | 10170 +++++++++------- TestTables/CMIP6_E1hr.json | 18 +- TestTables/CMIP6_E1hrClimMon.json | 10 +- TestTables/CMIP6_E3hr.json | 120 +- TestTables/CMIP6_E3hrPt.json | 56 +- TestTables/CMIP6_E6hrZ.json | 8 +- TestTables/CMIP6_Eday.json | 498 +- TestTables/CMIP6_EdayZ.json | 40 +- TestTables/CMIP6_Efx.json | 170 +- TestTables/CMIP6_Emon.json | 602 +- TestTables/CMIP6_EmonZ.json | 49 +- TestTables/CMIP6_Esubhr.json | 20 +- TestTables/CMIP6_Eyr.json | 90 +- TestTables/CMIP6_IfxAnt.json | 10 +- TestTables/CMIP6_IfxGre.json | 10 +- TestTables/CMIP6_ImonAnt.json | 94 +- TestTables/CMIP6_ImonGre.json | 94 +- TestTables/CMIP6_IyrAnt.json | 72 +- TestTables/CMIP6_IyrGre.json | 72 +- TestTables/CMIP6_LImon.json | 66 +- TestTables/CMIP6_Lmon.json | 24 +- TestTables/CMIP6_Oclim.json | 16 +- TestTables/CMIP6_Oday.json | 39 +- TestTables/CMIP6_Odec.json | 18 +- TestTables/CMIP6_Ofx.json | 101 +- TestTables/CMIP6_Omon.json | 135 +- TestTables/CMIP6_Omonbad.json | 4 +- TestTables/CMIP6_Oyr.json | 60 +- TestTables/CMIP6_SIday.json | 39 +- TestTables/CMIP6_SImon.json | 135 +- TestTables/CMIP6_cf3hr_0.json | 6 +- TestTables/CMIP6_cf3hr_1.json | 6 +- TestTables/CMIP6_cf3hr_2.json | 6 +- TestTables/CMIP6_chunking.json | 3 +- TestTables/CMIP6_coordinate.json | 302 +- TestTables/CMIP6_day.json | 82 +- TestTables/CMIP6_fx.json | 82 +- TestTables/CMIP6_grids.json | 6 +- TestTables/python_test_table_A | 11 +- configure | 18 +- configure.ac | 2 +- include/cmor.h | 40 +- include/cmor_func_def.h | 6 + scripts/PrePARE.py | 325 - scripts/conda_upload.sh | 36 + scripts/createCMIP6CV.py | 36 +- setup.py.in | 13 +- 206 files changed, 16922 insertions(+), 12598 deletions(-) delete mode 100644 Test/test_python_3hr.py create mode 100644 Test/test_python_CMIP6_CV_forcemultipleparent.py create mode 100644 Test/test_python_CMIP6_CV_forcenoparent.py create mode 100644 Test/test_python_CMIP6_CV_forceparent.py create mode 100644 Test/test_python_CMIP6_CV_parentmipera.py create mode 100644 Test/test_python_CMIP6_CV_parentsourceid.py create mode 100644 Test/test_python_CMIP6_CV_parenttimeunits.py create mode 100644 Test/test_python_CMIP6_CV_parentvariantlabel.py create mode 100644 Test/test_python_CMIP6_CV_sub_experimentIDbad.py create mode 100644 Test/test_python_CMIP6_CV_sub_experiment_id.py create mode 100644 Test/test_python_CMIP6_CV_sub_experimentbad.py create mode 100644 Test/test_python_CMIP6_CV_sub_experimentnotset.py create mode 100644 Test/test_python_CMIP6_projections.py delete mode 100644 Test/test_python_jamie_11.py create mode 100644 Test/test_python_toomany_tables.py delete mode 100644 scripts/PrePARE.py create mode 100755 scripts/conda_upload.sh diff --git a/.travis.yml b/.travis.yml index 1a87871c..964bfdfa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,18 @@ os: - linux - osx - python: - 2.7 -#sudo: required +services: + - docker + sudo: false before_install: -# - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y gfortran ; fi - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; fi - -# - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update ; fi - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then wget https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh -O miniconda.sh; fi -# - if [ "$TRAVIS_OS_NAME" = "osx" ]; then wget https://github.com/UV-CDAT/uvcdat/releases/download/v2.4.1/gfortran-4.9.2-Mac.tar.gz -O ~/gfortran-4.9.2-Mac.tar.gz ; pushd / ; sudo tar xzvf ~/gfortran-4.9.2-Mac.tar.gz ; popd ; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh + -O miniconda.sh; fi + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh + -O miniconda.sh; fi - export PATH="$HOME/miniconda/bin:$PATH" - export PREFIX="$HOME/miniconda" - export UDUNITS2_XML_PATH=$HOME/miniconda/share/udunits/udunits2.xml @@ -24,28 +23,31 @@ before_install: - conda install openssl=1.0.2d - conda install cdms2 -c uvcdat/label/nightly -c conda-forge -c uvcdat - conda install udunits2 -c uvcdat/label/nightly -c conda-forge -c uvcdat - - conda install gcc - - conda install nose + - conda install gcc install: - - git clone https://github.com/PCMDI/cmip6-cmor-tables - - ln -s cmip6-cmor-tables/Tables Tables - - ./configure --prefix=$PREFIX --with-python --with-uuid=$PREFIX --with-udunits2=$PREFIX --with-netcdf=$PREFIX --enable-verbose-test - - make install + - git clone https://github.com/PCMDI/cmip6-cmor-tables + - ln -s cmip6-cmor-tables/Tables Tables + - "./configure --prefix=$PREFIX --with-python --with-uuid=$PREFIX --with-udunits2=$PREFIX + --with-netcdf=$PREFIX --enable-verbose-test" + - make install -script: - - make test - - for file in `ls -1 Test/test_python_CMIP6_CV*.py`; do echo $file; python $file; if [[ "$?" != "0" ]]; then return $?; fi; done -# - nosetests -vv --collect-only Test/test_python_CMIP6_CV_*.py -# - nosetests -vv --collect-only Test/test_python_has_*.py -# - for file in `ls -1 Test/test_python_CMIP6_CV*.py`; do echo $file; python $file; done -# - python run_tests2.py -# - python run_tests.py +script: + - make test + - for file in `ls -1 Test/test_python_CMIP6_CV*.py`; do echo $file; python $file; mystatus=$?; if [[ "$mystatus" != "0" ]]; then return ${mystatus}; fi; done after_failure: - - ulimit -a - - free -m - - find CMIP6/ - - df -kh ./ - - ls -lR - - cat ~/build.sh + - ulimit -a + - free -m + - find CMIP6/ + - df -kh ./ + - ls -lR + - cat ~/build.sh + +env: + global: + secure: V5q+wzxrJ5Rmk1vVYXimIdHgWUwZSHINd5W+oi3mTmfbtVyrngau9XQVZyiPyg8S309vHAbys9uMaplp83to7OY1Cw3+w002oMWkCaLwlVMn4UWs+xU7lJGn/wwLwN1OikZnTtiXF8RqrtBZpYsbAxjdebqZ8uZx/zDJXHVvvZY= + +after_success: + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then bash scripts/conda_upload.sh ${TRAVIS_BRANCH} ; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then docker run -v `pwd`:/travis_home -e CONDA_UPLOAD_TOKEN=${CONDA_UPLOAD_TOKEN} -a STDOUT -a STDERR cdat/conda:conda-forge-cdms2 /travis_home/scripts/conda_upload.sh ${TRAVIS_BRANCH} ; fi diff --git a/INSTALL b/INSTALL index 330e986f..84422407 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ INSTALLATION INSTRUCTIONS ------------------------- -Climate Model Output Rewriter (CMOR) version 3.2.2 installation instructions. +Climate Model Output Rewriter (CMOR) version 3.2.3 installation instructions. DOWNLOAD @@ -13,7 +13,7 @@ cd CMOR INSTALLATION ------------ -CMOR 3.2.2 requires external packages that need to be installed first. +CMOR 3.2.3 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/pywrapper.py b/Lib/pywrapper.py index fff7545c..b01da298 100644 --- a/Lib/pywrapper.py +++ b/Lib/pywrapper.py @@ -197,11 +197,11 @@ def set_grid_mapping(grid_id,mapping_name,parameter_names,parameter_values=None, raise Exception, "mapping name must be a string" if isinstance(parameter_names,dict): - pnams = [] + pnms = [] pvals = [] punit = [] for k in parameter_names.keys(): - pnams.append(k) + pnms.append(k) val = parameter_names[k] if isinstance(val,dict): ks = val.keys() @@ -219,7 +219,7 @@ def set_grid_mapping(grid_id,mapping_name,parameter_names,parameter_values=None, pvals.append(float(v)) except: pass - if len(pvals)!=len(punits) or len(pvals)!=len(pnams): + 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 diff --git a/LibCV/PrePARE/PrePARE.py b/LibCV/PrePARE/PrePARE.py index 67220e62..393f881a 100644 --- a/LibCV/PrePARE/PrePARE.py +++ b/LibCV/PrePARE/PrePARE.py @@ -16,7 +16,6 @@ @author: Denis Nadeau LLNL ''' - import cmip6_cv import cdms2 import argparse @@ -130,9 +129,9 @@ def __init__(self, args): # ------------------------------------------------------------------- # find variable that contains a "history" (should only be one) # ------------------------------------------------------------------- - self.var = [var for var in self.variables if 'history' in self.infile.listattribute(var)] + 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" @@ -171,13 +170,19 @@ def __init__(self, args): 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()] + if(self.dictGbl["sub_experiment_id"] not in ["none"]): + 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) + self.setDoubleValue('branch_time_in_parent') + self.setDoubleValue('branch_time_in_child') # ------------------------------------------------------------------- # Create a dictionnary of attributes for var # ------------------------------------------------------------------- @@ -185,11 +190,23 @@ def __init__(self, args): [(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 ?" # ------------------------------------------------------------------- # 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): + self.dictGbl[attribute] = self.dictGbl[attribute][0] + cmip6_cv.set_cur_dataset_attribute(attribute,self.dictGbl[attribute]) + def ControlVocab(self): ''' Check CMIP6 global attributes against Control Vocabulary file. @@ -210,7 +227,55 @@ def ControlVocab(self): cmip6_cv.check_grids(self.table_id) cmip6_cv.check_ISOTime() cmip6_cv.check_furtherinfourl(self.table_id) - varid = cmip6_cv.setup_variable(self.var[0], 'm', 1e20) + cmip6_cv.check_parentExpID(self.table_id) + cmip6_cv.check_subExpID(self.table_id) + try: + startimebnds = self.infile['time_bnds'][0][0] + endtimebnds = self.infile['time_bnds'][-1][1] + except: + startimebnds = 0 + endtimebnds = 0 + try: + startime = self.infile['time'][0] + endtime = self.infile['time'][-1] + except: + startime = 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) + fn = os.path.basename(self.infile.id) + 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 + print "=====================================================================================" + print "realization_index is not an integer: ", type(self.dictGbl['realization_index']) + print "=====================================================================================" + print bcolors.ENDC + cmip6_cv.set_CV_Error() + if not isinstance(self.dictGbl['initialization_index'], numpy.ndarray): + print bcolors.FAIL + print "=====================================================================================" + print "initialization_index is not an integer: ", type(self.dictGbl['initialization_index']) + print "=====================================================================================" + print bcolors.ENDC + cmip6_cv.set_CV_Error() + if not isinstance(self.dictGbl['physics_index'], numpy.ndarray): + print bcolors.FAIL + print "=====================================================================================" + print "physics_index is not an integer: ", type(self.dictGbl['physics_index']) + print "=====================================================================================" + print bcolors.ENDC + cmip6_cv.set_CV_Error() + if not isinstance(self.dictGbl['forcing_index'], numpy.ndarray): + print bcolors.FAIL + print "=====================================================================================" + print "forcing_index is not an integer: ", type(self.dictGbl['forcing_index']) + print "=====================================================================================" + print bcolors.ENDC + cmip6_cv.set_CV_Error() prepLIST = cmip6_cv.list_variable_attributes(varid) for key in prepLIST: diff --git a/LibCV/PrePARE/__init__.py b/LibCV/PrePARE/__init__.py index e69de29b..5855e2a5 100644 --- a/LibCV/PrePARE/__init__.py +++ b/LibCV/PrePARE/__init__.py @@ -0,0 +1 @@ +from PrePARE import main diff --git a/LibCV/__init__.py b/LibCV/__init__.py index 42548441..fe851090 100644 --- a/LibCV/__init__.py +++ b/LibCV/__init__.py @@ -1,4 +1,4 @@ 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 +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/cmor_const.py b/LibCV/cmor_const.py index 1dc5b2a0..c8650823 100644 --- a/LibCV/cmor_const.py +++ b/LibCV/cmor_const.py @@ -30,6 +30,7 @@ FILE_PATH_TEMPLATE FILE_NAME_TEMPLATE GLOBAL_ATT_FURTHERINFOURLTMPL +GLOBAL_ATT_MEMBER_ID CMOR_AXIS_ENTRY_FILE CMOR_FORMULA_VAR_FILE """ diff --git a/LibCV/pywrapper.py b/LibCV/pywrapper.py index 9b4ef71a..d6df766e 100644 --- a/LibCV/pywrapper.py +++ b/LibCV/pywrapper.py @@ -143,7 +143,7 @@ def set_cur_dataset_attribute(name, value): def has_cur_dataset_attribute(name): """determines if the current cmor dataset has an attribute Usage: - cmor.het_cur_dataset_attribute(name) + cmor.has_cur_dataset_attribute(name) Where: name: is the name of the attribute Returns True if the dataset has the attribute, False otherwise @@ -256,6 +256,21 @@ def check_sourceID(table_id): return(ierr) +def check_filename(table_id, var_name, calendar, timeunits, infile): + ''' + Validate filename with timestamp for current variable and file + + Usage: + 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 + Return 0 on success + ''' + 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. @@ -300,6 +315,37 @@ def check_requiredattributes(table_id): return(ierr) +def check_subExpID(table_id): + ''' + Validate that sub_experiment ind sub_experiment_id are set to appropriate value + as defined in the CV file. + + Usage: + cmip6_cv.check_subExpID(table_id) + Where: + table_id is the table id returned by load_table() + Return 0 on success + ''' + 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 + attributes are set to "no parent" + + if parent is set to any string, validate all related attributes. + + Usage: + cmip6_cv.check_parentExpID(table_id) + Where: + table_id is the table id returned by load_table() + Return 0 on success + ''' + ierr = _cmip6_cv.check_parentExpID(table_id) + return(ierr) + def check_ISOTime(): ''' Validate that creation attribute contains time @@ -313,7 +359,7 @@ def check_ISOTime(): return(ierr) -def setup_variable(name, units, missing): +def setup_variable(name, units, missing, startime, endtime, startimebnds, endtimebnds): ''' Create variable attributes from the table loaded by load_table. @@ -323,10 +369,14 @@ def setup_variable(name, units, missing): name is the variable name to validate units are the variable units missing is the missing value for this variable. + startime: time value for first part of timestap -- time[0] + endtime: time value for last part of timestap -- time[-1] + startimebnds: time bound value for first part of timestap -- time_bnds[0] + endtimebnds: time bound value for last part of timestap -- time_bnds[-1] return: variable_id on success -1 on failure ''' - ierr = _cmip6_cv.setup_variable(name, units, missing) + ierr = _cmip6_cv.setup_variable(name, units, missing, startime, endtime, startimebnds, endtimebnds) return(ierr) def get_CV_Error(): ''' diff --git a/Makefile.in b/Makefile.in index 9b5020e8..25259f6f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -150,6 +150,8 @@ test_a_python: @echo "${OK_COLOR}Testing ${TEST_NAME} ${NO_COLOR}" ${PYTHONEXEC} ${TEST_NAME} ${VERB} test_python: python + env TEST_NAME=Test/test_python_CMIP6_projections.py make test_a_python + env TEST_NAME=Test/test_python_toomany_tables.py make test_a_python env TEST_NAME=Test/test_chunking.py make test_a_python env TEST_NAME=Test/test_python_direct_calls.py make test_a_python env TEST_NAME=Test/test_python_user_interface_00.py make test_a_python diff --git a/Src/_cmormodule.c b/Src/_cmormodule.c index c630ad48..c6d454ff 100644 --- a/Src/_cmormodule.c +++ b/Src/_cmormodule.c @@ -1,4 +1,5 @@ #include +#define NPY_NO_DEPRECATED_API NPY_1_10_API_VERSION #include "numpy/arrayobject.h" #include "cmor.h" @@ -419,14 +420,14 @@ static PyObject *PyCMOR_axis( PyObject * self, PyObject * args ) { NPY_NOTYPE, 1, 0 ); - if( coords->nd != 1 ) { + if( PyArray_NDIM(coords) != 1 ) { printf ( "ok we need to pass contiguous flattened arrays only!\n" ); return NULL; } if( type != 'c' ) { - coord_vals = ( void * ) coords->data; + coord_vals = ( void * ) PyArray_DATA(coords); n = cell_bounds_ndim; } else { tmpstr = @@ -453,12 +454,12 @@ static PyObject *PyCMOR_axis( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( bounds_obj, NPY_NOTYPE, 1, 0 ); - if( bounds->nd != 1 ) { + if( PyArray_NDIM(bounds) != 1 ) { printf ( "ok we need to pass contiguous flattened arrays only!\n" ); return NULL; } - cell_bounds = ( void * ) bounds->data; + cell_bounds = ( void * ) PyArray_DATA(bounds); } ierr = @@ -541,11 +542,11 @@ static PyObject *PyCMOR_variable( PyObject * self, PyObject * args ) { NPY_NOTYPE, 1, 0 ); - if( axes->nd != 1 ) { + if( PyArray_NDIM(axes) != 1 ) { printf( "ok we need to pass contiguous flattened arrays only!\n" ); return NULL; } - axes_ids = ( int * ) axes->data; + axes_ids = ( int * ) PyArray_DATA(axes); if( missing_obj == Py_None ) { pass_missing = NULL; @@ -613,7 +614,7 @@ static PyObject *PyCMOR_zfactor( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( axes_obj, NPY_NOTYPE, 1, 0 ); - axes_ids = ( void * ) axes->data; + axes_ids = ( void * ) PyArray_DATA(axes); } else { itmp = ( int ) PyInt_AsLong( axes_obj ); axes_ids = &itmp; @@ -628,7 +629,7 @@ static PyObject *PyCMOR_zfactor( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( values_obj, NPY_NOTYPE, 1, 0 ); - values = ( void * ) values_array->data; + values = ( void * ) PyArray_DATA(values_array); } if( bounds_obj == Py_None ) { @@ -638,7 +639,7 @@ static PyObject *PyCMOR_zfactor( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( bounds_obj, NPY_NOTYPE, 1, 0 ); - bounds = ( void * ) bounds_array->data; + bounds = ( void * ) PyArray_DATA(bounds_array); } ierr = @@ -685,7 +686,7 @@ static PyObject *PyCMOR_grid_mapping( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( param_val_obj, NPY_NOTYPE, 1, 0 ); - param_val = param_val_arr->data; + param_val = PyArray_DATA(param_val_arr); n = PyList_Size( param_nm_obj ); for( i = 0; i < n; i++ ) { @@ -749,7 +750,7 @@ static PyObject *PyCMOR_write( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( data_obj, NPY_NOTYPE, 1, 0 ); - data = data_array->data; + data = PyArray_DATA(data_array); if( times_obj == Py_None ) { times = NULL; @@ -759,7 +760,7 @@ static PyObject *PyCMOR_write( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( times_obj, NPY_NOTYPE, 1, 0 ); - times = ( void * ) times_array->data; + times = ( void * ) PyArray_DATA(times_array); } else { itime = ( double ) PyFloat_AsDouble( times_obj ); times = &itime; @@ -773,7 +774,7 @@ static PyObject *PyCMOR_write( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( times_bnds_obj, NPY_NOTYPE, 1, 0 ); - times_bnds = ( void * ) times_bnds_array->data; + times_bnds = ( void * ) PyArray_DATA(times_bnds_array); } if( ref_obj == Py_None ) { @@ -911,8 +912,8 @@ 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; + PyArrayObject *axes_arr = NULL, *lat_arr = NULL, *lon_arr = NULL, + *blat_arr = NULL, *blon_arr = NULL; void *axes, *lon, *lat, *blon, *blat; char type; int nvert, ndims; @@ -929,7 +930,7 @@ static PyObject *PyCMOR_grid( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( axes_obj, NPY_NOTYPE, 1, 0 ); - axes = ( void * ) axes_arr->data; + axes = ( void * ) PyArray_DATA(axes_arr); if( lat_obj == Py_None ) { lat = NULL; @@ -938,7 +939,7 @@ static PyObject *PyCMOR_grid( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( lat_obj, NPY_NOTYPE, 1, 0 ); - lat = ( void * ) lat_arr->data; + lat = ( void * ) PyArray_DATA(lat_arr); } if( lon_obj == Py_None ) { @@ -948,7 +949,7 @@ static PyObject *PyCMOR_grid( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( lon_obj, NPY_NOTYPE, 1, 0 ); - lon = ( void * ) lon_arr->data; + lon = ( void * ) PyArray_DATA(lon_arr); } if( blat_obj == Py_None ) { @@ -958,7 +959,7 @@ static PyObject *PyCMOR_grid( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( blat_obj, NPY_NOTYPE, 1, 0 ); - blat = ( void * ) blat_arr->data; + blat = ( void * ) PyArray_DATA(blat_arr); } if( blon_obj == Py_None ) { blon = NULL; @@ -967,7 +968,7 @@ static PyObject *PyCMOR_grid( PyObject * self, PyObject * args ) { ( PyArrayObject * ) PyArray_ContiguousFromObject( blon_obj, NPY_NOTYPE, 1, 0 ); - blon = ( void * ) blon_arr->data; + blon = ( void * ) PyArray_DATA(blon_arr); } ierr = diff --git a/Src/_controlvocabulary.c b/Src/_controlvocabulary.c index 1c6a405c..21797229 100644 --- a/Src/_controlvocabulary.c +++ b/Src/_controlvocabulary.c @@ -1,8 +1,73 @@ #include +#define NPY_NO_DEPRECATED_API NPY_1_10_API_VERSION + #include "numpy/arrayobject.h" #include "cmor.h" -extern int cmor_CV_variable(int *, char *, char *, float *); +extern int cmor_CV_variable(int *, char *, char *, float *, + float, float, float, float); + +/************************************************************************/ +/* PyCV_checkFilename */ +/************************************************************************/ +static PyObject *PyCV_checkFilename( PyObject * self, PyObject * args ) { + int ntable; + int varid; + char *szInTimeCalendar; + char *szInTimeUnits; + char *infile; + int nTimeCalLen; + int nTimeUnitsLen; + int ninfile; + cmor_is_setup(); + + + if( !PyArg_ParseTuple( args, "iis#s#s#", &ntable, &varid, + &szInTimeCalendar, &nTimeCalLen, + &szInTimeUnits, &nTimeUnitsLen, + &infile, &ninfile) ) { + return(Py_BuildValue( "i", -1 )); + } + + cmor_CV_checkFilename(cmor_tables[ntable].CV, varid, + szInTimeCalendar, + szInTimeUnits, + infile); + + return( Py_BuildValue( "i", 0 ) ); +} + +/************************************************************************/ +/* PyCV_checkSubExpID */ +/************************************************************************/ +static PyObject *PyCV_checkSubExpID( PyObject * self, PyObject * args ) { + int nVarRefTblID; + cmor_is_setup(); + + if( !PyArg_ParseTuple( args, "i", &nVarRefTblID) ) { + return(Py_BuildValue( "i", -1 )); + } + + cmor_CV_checkSubExpID(cmor_tables[nVarRefTblID].CV); + + return( Py_BuildValue( "i", 0 ) ); +} + +/************************************************************************/ +/* PyCV_checkParentExpID */ +/************************************************************************/ +static PyObject *PyCV_checkParentExpID( PyObject * self, PyObject * args ) { + int nVarRefTblID; + cmor_is_setup(); + + if( !PyArg_ParseTuple( args, "i", &nVarRefTblID) ) { + return(Py_BuildValue( "i", -1 )); + } + + cmor_CV_checkParentExpID(cmor_tables[nVarRefTblID].CV); + + return( Py_BuildValue( "i", 0 ) ); +} /************************************************************************/ /* PyCV_setInstitution() */ @@ -225,9 +290,9 @@ static PyObject* PyCMOR_get_variable_attribute_list(PyObject* self, char type; int i; - if( !PyArg_ParseTuple( args, "i", &var_id ) ) - return NULL; - + if (!PyArg_ParseTuple(args, "i", &var_id)) { + return NULL; + } index = cmor_vars[var_id].nattributes; if( index == -1 ) return NULL; @@ -462,6 +527,8 @@ static PyObject *PyCMOR_getincvalues( PyObject * self, PyObject * args ) { return( Py_BuildValue( "s", CV_CHECK_ERROR )); } else if( strcmp( att_name, "GLOBAL_ATT_FURTHERINFOURLTMPL" ) == 0 ) { return( Py_BuildValue( "s", GLOBAL_ATT_FURTHERINFOURLTMPL )); + } else if( strcmp( att_name, "GLOBAL_ATT_MEMBER_ID" ) == 0 ) { + return( Py_BuildValue( "s", GLOBAL_ATT_MEMBER_ID )); } else if( strcmp( att_name, "CMOR_AXIS_ENTRY_FILE" ) == 0 ) { return( Py_BuildValue( "s", CMOR_AXIS_ENTRY_FILE )); } else if( strcmp( att_name, "CMOR_FORMULA_VAR_FILE" ) == 0 ) { @@ -480,13 +547,20 @@ static PyObject *PyCV_setup_variable( PyObject * self, PyObject * args ) { char *name; char *units; float missing; + float startime; + float endtime; + float startimebnds; + float endtimebnds; + int var_id; - if( !PyArg_ParseTuple( args, "ssf", &name, &units, &missing ) ){ + if( !PyArg_ParseTuple( args, "ssfffff", &name, &units, &missing, + &startime, &endtime, &startimebnds, &endtimebnds) ){ return( Py_BuildValue( "i", -1 ) ); } - cmor_CV_variable( &var_id, name, units, &missing ); + cmor_CV_variable( &var_id, name, units, &missing, startime, endtime, + startimebnds, endtimebnds); return( Py_BuildValue( "i", var_id) ); @@ -532,11 +606,14 @@ static PyMethodDef MyExtractMethods[] = { {"list_variable_attributes", PyCMOR_get_variable_attribute_list, METH_VARARGS}, {"set_institution", PyCV_setInstitution, METH_VARARGS }, + {"check_parentExpID", PyCV_checkParentExpID, METH_VARARGS }, + {"check_subExpID", PyCV_checkSubExpID, METH_VARARGS }, {"check_sourceID", PyCV_checkSourceID, METH_VARARGS }, {"check_grids", PyCV_checkGrids, METH_VARARGS }, {"check_experiment", PyCV_checkExperiment, METH_VARARGS}, {"check_furtherinfourl", PyCV_checkFurtherInfoURL, METH_VARARGS }, {"check_gblattributes", PyCV_GblAttributes, METH_VARARGS }, + {"check_filename", PyCV_checkFilename, METH_VARARGS }, {"check_ISOTime", PyCV_checkISOTime, METH_VARARGS }, {"getCMOR_defaults_include", PyCMOR_getincvalues, METH_VARARGS}, {"setup_variable", PyCV_setup_variable, METH_VARARGS}, diff --git a/Src/cmor.c b/Src/cmor.c index f297f1df..c7dd58b6 100644 --- a/Src/cmor.c +++ b/Src/cmor.c @@ -522,89 +522,88 @@ int cmor_have_NetCDF41min( void ) { /************************************************************************/ /* 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; - if( output_logfile == NULL ) - output_logfile = stderr; + if (output_logfile == NULL) + output_logfile = stderr; msg[0] = '\0'; - if( CMOR_VERBOSITY != CMOR_QUIET ) { - fprintf( output_logfile, "\n" ); + if (CMOR_VERBOSITY != CMOR_QUIET) { + fprintf(output_logfile, "\n"); } - if( level == CMOR_WARNING ) { - cmor_nwarnings++; - if( CMOR_VERBOSITY != CMOR_QUIET ) { - + if (level == CMOR_WARNING) { + cmor_nwarnings++; + if (CMOR_VERBOSITY != CMOR_QUIET) { + #ifdef COLOREDOUTPUT - fprintf( output_logfile, "%c[%d;%d;%dm", 0X1B, 2, 34, 47 ); + fprintf(output_logfile, "%c[%d;%d;%dm", 0X1B, 2, 34, 47); #endif - - fprintf( output_logfile, "C Traceback:\nIn function: %s", - cmor_traceback_info ); - + + fprintf(output_logfile, "C Traceback:\nIn function: %s", + cmor_traceback_info); + #ifdef COLOREDOUTPUT - fprintf( output_logfile, "%c[%dm", 0X1B, 0 ); + fprintf(output_logfile, "%c[%dm", 0X1B, 0); #endif - - fprintf( output_logfile, "\n\n" ); - + + fprintf(output_logfile, "\n\n"); + #ifdef COLOREDOUTPUT - fprintf( output_logfile, "%c[%d;%d;%dm", 0X1B, 1, 34, 47 ); + fprintf(output_logfile, "%c[%d;%d;%dm", 0X1B, 1, 34, 47); #endif - - snprintf( msg, CMOR_MAX_STRING, "! Warning: %s", error_msg ); - } + + snprintf(msg, CMOR_MAX_STRING, "! Warning: %s", error_msg); + } } else { - cmor_nerrors++; - + cmor_nerrors++; + #ifdef COLOREDOUTPUT - fprintf( output_logfile, "%c[%d;%d;%dm", 0X1B, 2, 31, 47 ); + fprintf(output_logfile, "%c[%d;%d;%dm", 0X1B, 2, 31, 47); #endif - - fprintf( output_logfile, "C Traceback:\n! In function: %s", - cmor_traceback_info ); + + fprintf(output_logfile, "C Traceback:\n! In function: %s", + cmor_traceback_info); #ifdef COLOREDOUTPUT - fprintf( output_logfile, "%c[%dm", 0X1B, 0 ); + fprintf(output_logfile, "%c[%dm", 0X1B, 0); #endif - fprintf( output_logfile, "\n\n" ); + fprintf(output_logfile, "\n\n"); #ifdef COLOREDOUTPUT - fprintf( output_logfile, "%c[%d;%d;%dm", 0X1B, 1, 31, 47 ); + fprintf(output_logfile, "%c[%d;%d;%dm", 0X1B, 1, 31, 47); #endif - snprintf( msg, CMOR_MAX_STRING, "! Error: %s", error_msg ); + snprintf(msg, CMOR_MAX_STRING, "! Error: %s", error_msg); } - if( CMOR_VERBOSITY != CMOR_QUIET || level != CMOR_WARNING ) { - for( i = 0; i < 25; i++ ) { - fprintf( output_logfile, "!" ); - } - fprintf( output_logfile, "\n" ); - fprintf( output_logfile, "!\n" ); - fprintf( output_logfile, "%s\n", msg ); - fprintf( output_logfile, "!\n" ); - - for( i = 0; i < 25; i++ ) - fprintf( output_logfile, "!" ); - + if (CMOR_VERBOSITY != CMOR_QUIET || level != CMOR_WARNING) { + for (i = 0; i < 25; i++) { + fprintf(output_logfile, "!"); + } + fprintf(output_logfile, "\n"); + fprintf(output_logfile, "!\n"); + fprintf(output_logfile, "%s\n", msg); + fprintf(output_logfile, "!\n"); + + for (i = 0; i < 25; i++) + fprintf(output_logfile, "!"); + #ifdef COLOREDOUTPUT - fprintf( output_logfile, "%c[%dm", 0X1B, 0 ); + fprintf(output_logfile, "%c[%dm", 0X1B, 0); #endif - - fprintf( output_logfile, "\n\n" ); + + fprintf(output_logfile, "\n\n"); } - CV_ERROR=1; - if( level == CMOR_NOT_SETUP) { + CV_ERROR = 1; + if (level == CMOR_NOT_SETUP) { exit(1); } - if( ( CMOR_MODE == CMOR_EXIT_ON_WARNING ) - || ( level == CMOR_CRITICAL ) ) { + if ((CMOR_MODE == CMOR_EXIT_ON_WARNING) || (level == CMOR_CRITICAL)) { kill(getpid(), SIGTERM); } } @@ -761,6 +760,38 @@ int cmor_setup( char *path, cmor_nerrors = 0; cmor_nwarnings = 0; + // Define mode + if (mode == NULL) { + CMOR_MODE = CMOR_NORMAL; + + } else { + + if (*mode != CMOR_EXIT_ON_WARNING && *mode != CMOR_EXIT_ON_MAJOR + && *mode != CMOR_NORMAL) { + + snprintf(msg, CMOR_MAX_STRING, + "exit mode can be either CMOR_EXIT_ON_WARNING CMOR_NORMAL " + "or CMOR_EXIT_ON_MAJOR"); + cmor_handle_error(msg, CMOR_CRITICAL); + } + + CMOR_MODE = *mode; + + } + // Define verbosity + if (verbosity == NULL) { + CMOR_VERBOSITY = CMOR_NORMAL; + + } else { + + if (*verbosity != CMOR_QUIET && *verbosity != CMOR_NORMAL) { + snprintf(msg, CMOR_MAX_STRING, + "verbosity mode can be either CMOR_QUIET or CMOR_NORMAL"); + cmor_handle_error(msg, CMOR_NORMAL); + } + CMOR_VERBOSITY = *verbosity; + } + if (logfile == NULL) { output_logfile = NULL; } else { @@ -788,7 +819,7 @@ int cmor_setup( char *path, rename(tmplogfile, msg); snprintf(msg2, CMOR_MAX_STRING, - "Logfile %s already existed. Renamed to: %s", tmplogfile, + "Logfile %s already exist.\n! Renamed to: %s", tmplogfile, msg); output_logfile = NULL; output_logfile = fopen(tmplogfile, "w"); @@ -810,35 +841,7 @@ int cmor_setup( char *path, } } - if (mode == NULL) { - CMOR_MODE = CMOR_NORMAL; - - } else { - - if (*mode != CMOR_EXIT_ON_WARNING && *mode != CMOR_EXIT_ON_MAJOR - && *mode != CMOR_NORMAL) { - snprintf(msg, CMOR_MAX_STRING, - "exit mode can be either CMOR_EXIT_ON_WARNING CMOR_NORMAL " - "or CMOR_EXIT_ON_MAJOR"); - cmor_handle_error(msg, CMOR_CRITICAL); - } - - CMOR_MODE = *mode; - - } - if (verbosity == NULL) { - CMOR_VERBOSITY = CMOR_NORMAL; - - } else { - - if (*verbosity != CMOR_QUIET && *verbosity != CMOR_NORMAL) { - snprintf(msg, CMOR_MAX_STRING, - "verbosity mode can be either CMOR_QUIET or CMOR_NORMAL"); - cmor_handle_error(msg, CMOR_NORMAL); - } - CMOR_VERBOSITY = *verbosity; - } if (netcdf == NULL) { CMOR_NETCDF_MODE = CMOR_PRESERVE; @@ -1164,6 +1167,9 @@ json_object *cmor_open_inpathFile(char *szFilename ) { free(buffer); buffer=NULL; } + if( table_file != NULL ) { + fclose(table_file); + } return(oJSON); } @@ -1722,7 +1728,6 @@ int cmor_define_zfactors_vars( int var_id, int ncid, int *nc_dim, int dim_holder[CMOR_MAX_VARIABLES]; int lnzfactors; int ics, icd, icdl, ia; - int bChunk; cmor_add_traceback( "cmor_define_zfactors_vars" ); cmor_is_setup( ); lnzfactors = *nzfactors; @@ -2344,6 +2349,8 @@ int cmor_validateFilename(char *outname, int var_id) { "or use CMOR_REPLACE or CMOR_APPEND for\n! " "CMOR_NETCDF_MODE value in cmor_setup", outname); cmor_handle_error(msg, CMOR_CRITICAL); + ierr = fclose(fperr); + fperr=NULL; } ierr = nc_create(outname, NC_NOCLOBBER | cmode, &ncid); } else if ((CMOR_NETCDF_MODE == CMOR_APPEND_4) @@ -2363,6 +2370,7 @@ int cmor_validateFilename(char *outname, int var_id) { } else { /*ok it was there already */ ierr = fclose(fperr); + fperr=NULL; ierr = nc_open(outname, NC_WRITE, &ncid); if (ierr != NC_NOERR) { @@ -2490,11 +2498,12 @@ int cmor_setGblAttr(int var_id) { char ctmp[CMOR_MAX_STRING]; char ctmp2[CMOR_MAX_STRING]; char words[CMOR_MAX_STRING]; + char trimword[CMOR_MAX_STRING]; + char *szToken; int i; int n_matches = 10; regmatch_t m[n_matches]; regex_t regex; - char *ret; int numchar; int nVarRefTblID; int rc; @@ -2621,9 +2630,15 @@ int cmor_setGblAttr(int var_id) { /* -------------------------------------------------------------------- */ /* first check if the variable itself has a realm */ /* -------------------------------------------------------------------- */ - if (cmor_tables[nVarRefTblID].vars[nVarRefTblID].realm[0] != '\0') { - cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_REALM, - cmor_tables[nVarRefTblID].vars[nVarRefTblID].realm, 0); + if (cmor_tables[nVarRefTblID].vars[var_id].realm[0] != '\0') { + szToken = strtok(cmor_tables[nVarRefTblID].vars[var_id].realm, " "); + if( szToken != NULL){ + cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_REALM, + szToken, 0); + } else { + cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_REALM, + cmor_tables[nVarRefTblID].vars[var_id].realm, 0); + } } else { /* -------------------------------------------------------------------- */ /* ok it didn't so we're using the value from the table */ @@ -2635,68 +2650,71 @@ int cmor_setGblAttr(int var_id) { /* -------------------------------------------------------------------- */ /* Create external_variables */ /* -------------------------------------------------------------------- */ - if (cmor_has_variable_attribute(var_id, VARIABLE_ATT_CELLMEASURES) == 0) { - cmor_get_variable_attribute(var_id, VARIABLE_ATT_CELLMEASURES, ctmp); + if (cmor_has_variable_attribute(var_id, VARIABLE_ATT_CELLMEASURES) == 0) { + cmor_get_variable_attribute(var_id, VARIABLE_ATT_CELLMEASURES, ctmp); /* -------------------------------------------------------------------- */ /* If CELLMEASURE is set to @OPT we don't do anything */ /* -------------------------------------------------------------------- */ - if( (strcmp(ctmp, "@OPT") == 0) || (strcmp(ctmp, "--OPT") == 0) || - (strcmp(ctmp, "--MODEL") == 0)){ - cmor_set_variable_attribute(var_id, - VARIABLE_ATT_CELLMEASURES, 'c', ""); - } - else { + if ((strcmp(ctmp, "@OPT") == 0) || (strcmp(ctmp, "--OPT") == 0) + || (strcmp(ctmp, "--MODEL") == 0)) { + cmor_set_variable_attribute(var_id, + VARIABLE_ATT_CELLMEASURES, 'c', ""); + } else { /* -------------------------------------------------------------------- */ /* Extract 2 words after "area:" or "volume:" if exist. */ /* -------------------------------------------------------------------- */ - regcomp(®ex, EXTERNAL_VARIABLE_REGEX, REG_EXTENDED); + regcomp(®ex, EXTERNAL_VARIABLE_REGEX, REG_EXTENDED); - 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: volume: \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); - regfree(®ex); - return(-1); + 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: volume: \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); + regfree(®ex); + return (-1); - } - words[0] = '\0'; - ctmp2[0] = '\0'; - for (i = 0; i < n_matches; i++) { - numchar = (int) m[i].rm_eo - (int) m[i].rm_so; + } + words[0] = '\0'; + ctmp2[0] = '\0'; + for (i = 0; i < n_matches; i++) { + 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)) { - break; - } + if (((int) m[i].rm_so < 0) || (numchar == 0)) { + break; + } - strncpy(words, ctmp + m[i].rm_so, numchar); - words[numchar] = '\0'; - ret = strstr(words, ":"); + strncpy(words, ctmp + m[i].rm_so, numchar); + words[numchar] = '\0'; + if(strstr(words, ":") != 0) { + continue; + } + cmor_trim_string(words, trimword); + if((strcmp(trimword, AREA) != 0) && (strcmp(trimword, VOLUME) != 0) + && (strlen(trimword) != strlen(ctmp))) { /* -------------------------------------------------------------------- */ -/* Rejects all line with ":" in it */ +/* Rejects all word area and volume. */ /* -------------------------------------------------------------------- */ - if (ret == NULL) { - if (ctmp2[0] == '\0') { - strncat(ctmp2, words, numchar); - } else { - strcat(ctmp2, " "); - strncat(ctmp2, words, numchar); - } - } - } - cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_EXTERNAL_VAR, - ctmp2, 0); - regfree(®ex); - } - } + if (ctmp2[0] == '\0') { + strncat(ctmp2, trimword, numchar); + } else { + strcat(ctmp2, " "); + strncat(ctmp2, trimword, numchar); + } + } + } + cmor_set_cur_dataset_attribute_internal(GLOBAL_ATT_EXTERNAL_VAR, + ctmp2, 0); + regfree(®ex); + } + } if( cmor_has_cur_dataset_attribute(GLOBAL_ATT_INSTITUTION_ID) == 0) { ierr += cmor_CV_setInstitution(cmor_tables[nVarRefTblID].CV); } @@ -2705,7 +2723,9 @@ int cmor_setGblAttr(int var_id) { ierr += cmor_CV_checkSourceID(cmor_tables[nVarRefTblID].CV); ierr += cmor_CV_checkExperiment(cmor_tables[nVarRefTblID].CV); ierr += cmor_CV_checkGrids(cmor_tables[nVarRefTblID].CV); - ierr += cmor_CV_checkFurtherInfoURL(var_id); + ierr += cmor_CV_checkFurtherInfoURL(nVarRefTblID); + ierr += cmor_CV_checkParentExpID(cmor_tables[nVarRefTblID].CV); + ierr += cmor_CV_checkSubExpID(cmor_tables[nVarRefTblID].CV); } ierr += cmor_CV_checkGblAttributes(cmor_tables[nVarRefTblID].CV); ierr += cmor_CV_checkISOTime(GLOBAL_ATT_CREATION_DATE); @@ -3055,7 +3075,6 @@ void cmor_define_dimensions(int var_id, int ncid, int nVarRefTblID = cmor_vars[var_id].ref_table_id; int ics, icd, icdl; int itmpmsg, itmp2, itmp3; - int bChunk; cmor_add_traceback("cmor_define_dimensions"); for (i = 0; i < cmor_vars[var_id].ndims; i++) { @@ -4092,7 +4111,7 @@ int cmor_write( int var_id, void *data, char type, strncpy(outname, outpath, CMOR_MAX_STRING); strncpytrim(cmor_vars[var_id].base_path, outname, CMOR_MAX_STRING); strcat(outname, "XXXXXX"); - mkstemp(outname); + ierr = mkstemp(outname); unlink(outname); /* -------------------------------------------------------------------- */ /* Add Process ID and a random number to filename */ @@ -4403,7 +4422,6 @@ void cmor_create_var_attributes(int var_id, int ncid, int ncafid, size_t nc_dim_chunking[cmor_vars[var_id].ndims]; bChunk = cmor_set_chunking(var_id, nVarRefTblID, nc_dim_chunking); - int n; if (bChunk != -1 && (!((cmor_vars[var_id].grid_id > -1) && (cmor_grids[cmor_vars[var_id].grid_id].istimevarying == 1)))) { @@ -5077,6 +5095,8 @@ int cmor_addRIPF(char *variant) { int reti; regex_t regex; int ierr=0; + char szValue[CMOR_MAX_STRING]; + char szVariant[CMOR_MAX_STRING]; char msg[CMOR_MAX_STRING]; @@ -5201,6 +5221,23 @@ int cmor_addRIPF(char *variant) { 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_MEMBER_ID, variant, 1); + + // append sub_experiment_id + 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) { + strcat(szValue, "-"); + strcat(szValue, szVariant); + cmor_set_cur_dataset_attribute_internal( + GLOBAL_ATT_MEMBER_ID, szValue, 1); + } + } + } + regfree(®ex); cmor_pop_traceback(); return(ierr); @@ -5596,30 +5633,30 @@ int cmor_close_variable( int var_id, char *file_name, int *preserve ) { /* -------------------------------------------------------------------- */ /* ok first let's check if the file does exists or not */ /* -------------------------------------------------------------------- */ - fperr = NULL; - fperr = fopen( outname, "r" ); - if( fperr != NULL ) { - 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 ); - } 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 ); - } - cmor_handle_error( msg, CMOR_CRITICAL ); - } - } + fperr = NULL; + fperr = fopen(outname, "r"); + if (fperr != NULL) { + 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); + } 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); + } + ierr = fclose(fperr); + fperr=NULL; + cmor_handle_error(msg, CMOR_CRITICAL); + } + } ierr = rename( cmor_vars[var_id].current_path, outname ); if( ierr != 0 ) { snprintf( msg, CMOR_MAX_STRING, @@ -5682,122 +5719,120 @@ int cmor_close_variable( int var_id, char *file_name, int *preserve ) { /************************************************************************/ /* cmor_close() */ /************************************************************************/ -int cmor_close( void ) { - int i, j, k; +int cmor_close(void) { + int i, j, k; extern int cmor_nvars; char msg[CMOR_MAX_STRING]; extern ut_system *ut_read; extern FILE *output_logfile; - cmor_add_traceback( "cmor_close" ); - cmor_is_setup( ); - if( output_logfile == NULL ) - output_logfile = stderr; + cmor_add_traceback("cmor_close"); + cmor_is_setup(); + if (output_logfile == NULL) + output_logfile = stderr; - for( i = 0; i < cmor_nvars + 1; i++ ) { - if( cmor_vars[i].initialized != -1 ) { - if( cmor_vars[i].closed == 0 ) { - cmor_close_variable( i, NULL, NULL ); - } - } else if( ( cmor_vars[i].needsinit == 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 ); - cmor_handle_error( msg, CMOR_WARNING ); - } + for (i = 0; i < cmor_nvars + 1; i++) { + if (cmor_vars[i].initialized != -1) { + if (cmor_vars[i].closed == 0) { + cmor_close_variable(i, NULL, NULL); + } + } else if ((cmor_vars[i].needsinit == 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); + cmor_handle_error(msg, CMOR_WARNING); + } } - for( i = 0; i < CMOR_MAX_TABLES; i++ ) { - for( j = 0; j < CMOR_MAX_ELEMENTS; j++ ) { - if( cmor_tables[i].axes[j].requested != NULL ) { - free( cmor_tables[i].axes[j].requested ); - cmor_tables[i].axes[j].requested = NULL; - } - if( cmor_tables[i].axes[j].requested_bounds != NULL ) { - free( cmor_tables[i].axes[j].requested_bounds ); - cmor_tables[i].axes[j].requested_bounds = NULL; - } - if( cmor_tables[i].axes[j].crequested != NULL ) { - free( cmor_tables[i].axes[j].crequested ); - cmor_tables[i].axes[j].crequested = NULL; - } - } - if( cmor_tables[i].nforcings > 0 ) { - for( j = 0; j < cmor_tables[i].nforcings; j++ ) { - free( cmor_tables[i].forcings[j] ); - cmor_tables[i].forcings[j] = NULL; - } - free( cmor_tables[i].forcings ); - cmor_tables[i].forcings = NULL; - cmor_tables[i].nforcings = 0; - } - if(cmor_tables[i].CV != NULL) { - for(k=0; k< cmor_tables[i].CV->nbObjects; k++ ) { - if( &cmor_tables[i].CV[k] != NULL ) { - cmor_CV_free( &cmor_tables[i].CV[k] ); + for (i = 0; i < CMOR_MAX_TABLES; i++) { + for (j = 0; j < CMOR_MAX_ELEMENTS; j++) { + if (cmor_tables[i].axes[j].requested != NULL) { + free(cmor_tables[i].axes[j].requested); + cmor_tables[i].axes[j].requested = NULL; + } + if (cmor_tables[i].axes[j].requested_bounds != NULL) { + free(cmor_tables[i].axes[j].requested_bounds); + cmor_tables[i].axes[j].requested_bounds = NULL; + } + if (cmor_tables[i].axes[j].crequested != NULL) { + free(cmor_tables[i].axes[j].crequested); + cmor_tables[i].axes[j].crequested = NULL; + } + } + if (cmor_tables[i].nforcings > 0) { + for (j = 0; j < cmor_tables[i].nforcings; j++) { + free(cmor_tables[i].forcings[j]); + cmor_tables[i].forcings[j] = NULL; + } + free(cmor_tables[i].forcings); + cmor_tables[i].forcings = NULL; + cmor_tables[i].nforcings = 0; + } + if (cmor_tables[i].CV != NULL) { + for (k = 0; k < cmor_tables[i].CV->nbObjects; k++) { + if (&cmor_tables[i].CV[k] != NULL) { + cmor_CV_free(&cmor_tables[i].CV[k]); } } - if(cmor_tables[i].CV != NULL ){ + if (cmor_tables[i].CV != NULL) { free(cmor_tables[i].CV); - cmor_tables[i].CV=NULL; + cmor_tables[i].CV = NULL; } } } - for( i = 0; i < CMOR_MAX_GRIDS; i++ ) { - if( cmor_grids[i].lons != NULL ) { - free( cmor_grids[i].lons ); - cmor_grids[i].lons = NULL; - } - if( cmor_grids[i].lats != NULL ) { - free( cmor_grids[i].lats ); - cmor_grids[i].lats = NULL; - } - if( cmor_grids[i].blons != NULL ) { - free( cmor_grids[i].blons ); - cmor_grids[i].blons = NULL; - } - if( cmor_grids[i].blats != NULL ) { - free( cmor_grids[i].blats ); - cmor_grids[i].blats = NULL; - } + for (i = 0; i < CMOR_MAX_GRIDS; i++) { + if (cmor_grids[i].lons != NULL) { + free(cmor_grids[i].lons); + cmor_grids[i].lons = NULL; + } + if (cmor_grids[i].lats != NULL) { + free(cmor_grids[i].lats); + cmor_grids[i].lats = NULL; + } + if (cmor_grids[i].blons != NULL) { + free(cmor_grids[i].blons); + cmor_grids[i].blons = NULL; + } + if (cmor_grids[i].blats != NULL) { + free(cmor_grids[i].blats); + cmor_grids[i].blats = NULL; + } } - if( (cmor_nerrors != 0 || cmor_nwarnings != 0 ) ){ - fprintf( output_logfile, - "! ------\n! CMOR is now closed.\n! ------\n! " - "During execution we encountered:\n! " ); + if ((cmor_nerrors != 0 || cmor_nwarnings != 0)) { + 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 ); + 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! " ); + 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 ); + 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! " ); - cmor_nerrors = 0; - cmor_nwarnings = 0; + fprintf(output_logfile, + "\n! ------\n! Please review them.\n! ------\n! \n"); + cmor_nerrors = 0; + cmor_nwarnings = 0; } else { - fprintf( output_logfile, - "\n! ------\n! All files were closed successfully. \n! ------\n! "); + fprintf(output_logfile, + "\n! ------\n! All files were closed successfully. \n! ------\n! \n"); } - if( output_logfile != stderr ) { - fclose( output_logfile ); - output_logfile = NULL; + if (output_logfile != stderr) { + fclose(output_logfile); + output_logfile = NULL; } - cmor_pop_traceback( ); - return( 0 ); + cmor_pop_traceback(); + return (0); } /************************************************************************/ diff --git a/Src/cmor_CV.c b/Src/cmor_CV.c index c3ac333a..ee4acd64 100644 --- a/Src/cmor_CV.c +++ b/Src/cmor_CV.c @@ -9,6 +9,15 @@ #include "json_tokener.h" #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 ); + + /************************************************************************/ /* cmor_CV_set_att() */ /************************************************************************/ @@ -295,7 +304,7 @@ void cmor_CV_free(cmor_CV_def_t *CV) { /************************************************************************/ /* cmor_CV_checkFurtherInfoURL() */ /************************************************************************/ -int cmor_CV_checkFurtherInfoURL(int var_id){ +int cmor_CV_checkFurtherInfoURL(int nVarRefTblID){ char szFurtherInfoURLTemplate[CMOR_MAX_STRING]; char szFurtherInfoURL[CMOR_MAX_STRING]; char copyURL[CMOR_MAX_STRING]; @@ -334,13 +343,13 @@ int cmor_CV_checkFurtherInfoURL(int var_id){ /* -------------------------------------------------------------------- */ strcpy(copyURL, szFurtherInfoURLTemplate); baseURL = dirname(copyURL); - cmor_CreateFromTemplate( var_id, baseURL, + cmor_CreateFromTemplate( nVarRefTblID, baseURL, szFurtherInfoBaseURL, "/" ); strcpy(copyURL, szFurtherInfoURLTemplate); fileURL = basename(copyURL); - cmor_CreateFromTemplate( var_id, fileURL, + cmor_CreateFromTemplate( nVarRefTblID, fileURL, szFurtherInfoFileURL, "." ); strncpy(szFurtherInfoURL, szFurtherInfoBaseURL, CMOR_MAX_STRING); @@ -402,7 +411,7 @@ int cmor_CV_checkSourceType(cmor_CV_def_t *CV_exp, char *szExptID){ char *szTokenAdd; int nbSourceType; char *ptr; - int nbGoodType=0; + int nbGoodType; cmor_add_traceback("_CV_checkSourceType"); szAddSourceType[0] = '\0'; @@ -410,7 +419,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; cmor_get_cur_dataset_attribute(CV_INPUTFILENAME, CV_Filename); szAddSourceType[0] = '\0'; @@ -500,7 +510,7 @@ int cmor_CV_checkSourceType(cmor_CV_def_t *CV_exp, char *szExptID){ "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!", + "Check your Control Vocabulary file \"%s\".\n! ", szSourceType, szReqSourceTypeCpy, szAddSourceTypeCpy, CV_Filename); cmor_handle_error(msg, CMOR_NORMAL); @@ -526,7 +536,8 @@ int cmor_CV_checkSourceID(cmor_CV_def_t *CV){ char msg[CMOR_MAX_STRING]; char CV_Filename[CMOR_MAX_STRING]; int rc; - int i,j; + int i; + int j=0; cmor_is_setup( ); cmor_add_traceback("_CV_checkSourceID"); @@ -579,7 +590,7 @@ int cmor_CV_checkSourceID(cmor_CV_def_t *CV){ } if( j == CV_source_id->nbObjects) { snprintf(msg, CMOR_MAX_STRING, - "Could not find %s string in experiment_id section.\n! \n! \n!" + "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); @@ -626,6 +637,628 @@ int cmor_CV_checkSourceID(cmor_CV_def_t *CV){ return(0); } +/************************************************************************/ +/* CV_VerifyNBElement() */ +/************************************************************************/ +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); +// printf("**** CV->anElement: %d\n", CV->anElements); +// 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); +} +/************************************************************************/ +/* CV_CompareNoParent() */ +/************************************************************************/ +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); +} +/************************************************************************/ +/* InArray() */ +/************************************************************************/ +int CV_IsStringInArray(cmor_CV_def_t *CV, char *szValue) { + int nElements; + int i; + 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; + break; + } + } + cmor_pop_traceback( ); + return(found); +} + +/************************************************************************/ +/* cmor_CV_checkSubExpID() */ +/************************************************************************/ +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; + cmor_CV_def_t *CV_sub_experiment_id; + cmor_CV_def_t *CV_sub_experiment_id_key; + + char szExperiment_ID[CMOR_MAX_STRING]; + char CV_Filename[CMOR_MAX_STRING]; + char szSubExptID[CMOR_MAX_STRING]; + char szValue[CMOR_MAX_STRING]; + char szVariant[CMOR_MAX_STRING]; + + char msg[CMOR_MAX_STRING]; + + cmor_add_traceback("_CV_checkSubExperiment"); + // Initialize variables + cmor_get_cur_dataset_attribute(CV_INPUTFILENAME, CV_Filename); + cmor_get_cur_dataset_attribute(GLOBAL_ATT_EXPERIMENTID, szExperiment_ID); + // Look for sub_experiment_id section + 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); + 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); + cmor_handle_error(msg, CMOR_NORMAL); + cmor_pop_traceback(); + return (-1); + } + // Get specified experiment + 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); + 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); + 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); + cmor_handle_error(msg, CMOR_NORMAL); + cmor_pop_traceback(); + return (-1); + } + // Check sub_experiment_id value + if (cmor_has_cur_dataset_attribute(GLOBAL_ATT_SUB_EXPT_ID) != 0) { + // 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); + cmor_handle_error(msg, CMOR_WARNING); + 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); + cmor_handle_error(msg, CMOR_NORMAL); + cmor_pop_traceback(); + return (-1); + + } + + } else { + // sub_experiment_id has been defined! + cmor_get_cur_dataset_attribute(GLOBAL_ATT_SUB_EXPT_ID, szSubExptID); + // cannot be found in CV + if (!CV_IsStringInArray(CV_experiment_sub_exp_id, szSubExptID)) { + // 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]); + 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); + + } 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); + cmor_handle_error(msg, CMOR_NORMAL); + cmor_pop_traceback(); + return (-1); + } + } + } + // 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); + cmor_handle_error(msg, CMOR_WARNING); + 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); + 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); + cmor_handle_error(msg, CMOR_NORMAL); + cmor_pop_traceback(); + return (-1); + } + + 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); + cmor_handle_error(msg, CMOR_WARNING); + 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) { + 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) { + strcat(szValue, "-"); + strcat(szValue, szVariant); + cmor_set_cur_dataset_attribute_internal( + GLOBAL_ATT_MEMBER_ID, szValue, 1); + } + } + } + + cmor_pop_traceback(); + return (0); +} +/************************************************************************/ +/* cmor_CV_checkParentExpID() */ +/************************************************************************/ +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; + cmor_CV_def_t *CV_parent_activity_id; + cmor_CV_def_t *CV_source_id; + cmor_CV_def_t *CV_source; + + char szValue[CMOR_MAX_STRING]; + char szParentExpValue[CMOR_MAX_STRING]; + char szExperiment_ID[CMOR_MAX_STRING]; + char szBranchMethod[CMOR_MAX_STRING]; + char szBranchTimeInChild[CMOR_MAX_STRING]; + char szBranchTimeInParent[CMOR_MAX_STRING]; + double dBranchTimeInChild; + double dBranchTimeInParent; + char szParentSourceId[CMOR_MAX_STRING]; + char szParentTimeUnits[CMOR_MAX_STRING]; + char szParentVariantLabel[CMOR_MAX_STRING]; + regex_t regex; + + char CV_Filename[CMOR_MAX_STRING]; + char msg[CMOR_MAX_STRING]; + int rc; + + szParentExpValue[0] = '\0'; + cmor_add_traceback("_CV_checkParentExpID"); + + cmor_get_cur_dataset_attribute(CV_INPUTFILENAME, CV_Filename); + cmor_get_cur_dataset_attribute(GLOBAL_ATT_EXPERIMENTID, szExperiment_ID); + // Look for experiment_id section + 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); + + cmor_handle_error(msg, CMOR_NORMAL); + cmor_pop_traceback(); + return (-1); + } + // Get specified experiment + 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); + 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); + 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); + 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); + // "no parent" case + if (strcmp(szParentExpValue, NO_PARENT) == 0) { + CV_CompareNoParent(PARENT_ACTIVITY_ID); + CV_CompareNoParent(PARENT_MIP_ERA); + CV_CompareNoParent(PARENT_SOURCE_ID); + CV_CompareNoParent(PARENT_TIME_UNITS); + CV_CompareNoParent(PARENT_VARIANT_LABEL); + CV_CompareNoParent(BRANCH_METHOD); + // 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); + 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); + cmor_handle_error(msg, CMOR_WARNING); + } + + } + // Do we have branch_time_in_parent? + if (cmor_has_cur_dataset_attribute(BRANCH_TIME_IN_PARENT) == 0) { + 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); + + cmor_handle_error(msg, CMOR_WARNING); + } + } + + cmor_pop_traceback(); + return (0); + } else { + // real parent case + // 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); + 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); + 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]); + cmor_handle_error(msg, CMOR_WARNING); + 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); + cmor_handle_error(msg, CMOR_WARNING); + } + } + } + // 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); + 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); + } + } + // 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); + cmor_handle_error(msg, CMOR_CRITICAL); + + } else { + cmor_get_cur_dataset_attribute(BRANCH_TIME_IN_CHILD, + 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); + cmor_handle_error(msg, CMOR_CRITICAL); + } + } + + // 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); + cmor_handle_error(msg, CMOR_CRITICAL); + + } else { + cmor_get_cur_dataset_attribute(BRANCH_TIME_IN_PARENT, + 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); + 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); + cmor_handle_error(msg, CMOR_CRITICAL); + + } else { + char template[CMOR_MAX_STRING]; + int reti; + cmor_get_cur_dataset_attribute(PARENT_TIME_UNITS, + szParentTimeUnits); + strcpy(template, + "^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); + regfree(®ex); + cmor_handle_error(msg, CMOR_NORMAL); + cmor_pop_traceback(); + return (-1); + } +/* -------------------------------------------------------------------- */ +/* Execute regular expression */ +/* -------------------------------------------------------------------- */ + 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); + regfree(®ex); + cmor_handle_error(msg, CMOR_NORMAL); + } + regfree(®ex); + } + // 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); + cmor_handle_error(msg, CMOR_CRITICAL); + + } else { + char template[CMOR_MAX_STRING]; + int reti; + cmor_get_cur_dataset_attribute(PARENT_VARIANT_LABEL, + szParentVariantLabel); + strcpy(template, + "^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); + regfree(®ex); + cmor_handle_error(msg, CMOR_NORMAL); + } +/* -------------------------------------------------------------------- */ +/* Execute regular expression */ +/* -------------------------------------------------------------------- */ + 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); + regfree(®ex); + cmor_handle_error(msg, CMOR_NORMAL); + } + regfree(®ex); + } + // 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); + cmor_handle_error(msg, CMOR_NORMAL); + + } else { + cmor_get_cur_dataset_attribute(PARENT_SOURCE_ID, + 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); + + cmor_handle_error(msg, CMOR_NORMAL); + cmor_pop_traceback(); + return (-1); + } + // Get specified experiment + cmor_get_cur_dataset_attribute(PARENT_SOURCE_ID, + szParentSourceId); + CV_source = cmor_CV_search_child_key(CV_source_id, + 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); + cmor_handle_error(msg, CMOR_NORMAL); + cmor_pop_traceback(); + return (-1); + } + } + // 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); + 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); + cmor_handle_error(msg, CMOR_WARNING); + cmor_set_cur_dataset_attribute_internal( + PARENT_MIP_ERA, szValue, 1); + } + } + } + } + cmor_pop_traceback(); + return (0); +} + /************************************************************************/ /* cmor_CV_checkExperiment() */ /************************************************************************/ @@ -652,7 +1285,7 @@ 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_IDS); + 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! " @@ -684,6 +1317,7 @@ int cmor_CV_checkExperiment( cmor_CV_def_t *CV){ bWarning = FALSE; CV_experiment_attr = &CV_experiment->oValue[i]; 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; @@ -707,47 +1341,305 @@ int cmor_CV_checkExperiment( cmor_CV_def_t *CV){ break; } } - if (j == CV_experiment_attr->anElements) { - strcpy(szExpValue, CV_experiment_attr->aszValue[0] ); - bWarning = TRUE; - } - } else - // - // 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) { - strcpy(szExpValue,CV_experiment_attr->szValue); - bWarning = TRUE; - } - } + 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); + cmor_handle_error(msg, CMOR_CRITICAL); + + } + } + } else + // + // 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) { + strcpy(szExpValue, CV_experiment_attr->szValue); + bWarning = TRUE; + } + } } - 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); - cmor_handle_error(msg, CMOR_WARNING); - } - // Set/replace attribute. - cmor_set_cur_dataset_attribute_internal(CV_experiment_attr->key, - CV_experiment_attr->szValue, 1); - } - cmor_pop_traceback(); + 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); + cmor_handle_error(msg, CMOR_WARNING); + } + // Set/replace attribute. + cmor_set_cur_dataset_attribute_internal(CV_experiment_attr->key, + szExpValue, 1); + if (cmor_has_cur_dataset_attribute(CV_experiment_attr->key) == 0) { + cmor_get_cur_dataset_attribute(CV_experiment_attr->key, szValue); + } + } + cmor_pop_traceback(); - return(0); + return (0); } +/************************************************************************/ +/* cmor_CV_checkFilename() */ +/************************************************************************/ +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]; + char CV_Filename[CMOR_MAX_STRING]; + char szTmp[CMOR_MAX_STRING]; + cdCompTime comptime; + double interval; + int i, j, n; + int ierr; + int timeDim; + + outname[0] = '\0'; + ierr = cmor_CreateFromTemplate(0, cmor_current_dataset.file_template, + outname, "_"); + cmor_get_cur_dataset_attribute(CV_INPUTFILENAME, CV_Filename); + 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; + break; + } + } + + 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); + cmor_pop_traceback(); + return (1); + } + //Compute timestamps + + if ((cmor_tables[0].axes[timeDim].climatology == 1) + && (cmor_vars[0].first_bound != 1.e20)) { + cdRel2Comp(icalo, szInTimeUnits, cmor_vars[0].first_bound, + &comptime); + } else { + cdRel2Comp(icalo, szInTimeUnits, cmor_vars[0].first_time, + &comptime); + } + /* -------------------------------------------------------------------- */ + /* need to figure out the approximate interval */ + /* -------------------------------------------------------------------- */ + + interval = cmor_convert_interval_to_seconds(cmor_tables[0].interval, + cmor_tables[0].axes[timeDim].units); + + //first time point + strncat(outname, "_", CMOR_MAX_STRING - strlen(outname)); + //year + snprintf(szTmp, CMOR_MAX_STRING, "%.4ld", comptime.year); + strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname)); + // month + if (interval < 29.E6) { + snprintf(szTmp, CMOR_MAX_STRING, "%.2i", comptime.month); + strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname)); + } + // day + if (interval < 2.E6) { + snprintf(szTmp, CMOR_MAX_STRING, "%.2i", comptime.day); + strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname)); + } + // hour + if (interval < 86000) { + 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.); + snprintf(szTmp, CMOR_MAX_STRING, "%.2i", ierr); + strncat(outname, szTmp, + CMOR_MAX_STRING - strlen(outname)); + } + 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)); + } + +/* -------------------------------------------------------------------- */ +/* separator between first and last time */ +/* -------------------------------------------------------------------- */ + + strncat(outname, "-", CMOR_MAX_STRING - strlen(outname)); + + if ((cmor_tables[0].axes[timeDim].climatology == 1) + && (cmor_vars[0].last_bound != 1.e20)) { + cdRel2Comp(icalo, szInTimeUnits, cmor_vars[0].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... */ +/* -------------------------------------------------------------------- */ + + if (icalo == cdMixed) { + cdCompAddMixed(comptime, -1. / 3600., &comptime); + } else { + cdCompAdd(comptime, -1. / 3600., icalo, &comptime); + } + } else { + cdRel2Comp(icalo, szInTimeUnits, cmor_vars[0].last_time, &comptime); + } + +/* -------------------------------------------------------------------- */ +/* last time point */ +/* -------------------------------------------------------------------- */ + snprintf(szTmp, CMOR_MAX_STRING, "%.4ld", comptime.year); + strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname)); + +/* -------------------------------------------------------------------- */ +/* less than a year */ +/* -------------------------------------------------------------------- */ + if (interval < 29.E6) { + snprintf(szTmp, CMOR_MAX_STRING, "%.2i", comptime.month); + strncat(outname, szTmp, + CMOR_MAX_STRING - strlen(outname)); + } +/* -------------------------------------------------------------------- */ +/* less than a month */ +/* -------------------------------------------------------------------- */ + + if (interval < 2.E6) { + snprintf(szTmp, CMOR_MAX_STRING, "%.2i", comptime.day); + 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)); + } +/* -------------------------------------------------------------------- */ +/* less than 6hr */ +/* -------------------------------------------------------------------- */ + + if (interval < 21000) { +/* -------------------------------------------------------------------- */ +/* from now on add 1 more level of precision since that frequency */ +/* -------------------------------------------------------------------- */ + + ierr = (int) ((comptime.hour - (int) (comptime.hour)) * 60.); + snprintf(szTmp, CMOR_MAX_STRING, "%.2i", ierr); + 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)); + } + + if (cmor_tables[0].axes[timeDim].climatology == 1) { + strncat(outname, "-clim", + CMOR_MAX_STRING - strlen(outname)); + } + + } + if (cmor_vars[0].suffix_has_date == 1) { +/* -------------------------------------------------------------------- */ +/* all right we need to pop out the date part.... */ +/* -------------------------------------------------------------------- */ + n = strlen(cmor_vars[0].suffix); + i = 0; + while (cmor_vars[0].suffix[i] != '_') + i++; + i++; + while ((cmor_vars[0].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[0].axes[timeDim].climatology == 1) { + i += 5; + } + strcpy(szTmp,""); + for (j = i; j < n; j++) { + szTmp[j - i] = cmor_vars[var_id].suffix[i]; + szTmp[j - i + 1] = '\0'; + } + } else { + strncpy(szTmp, cmor_vars[0].suffix, CMOR_MAX_STRING); + } + + if (strlen(szTmp) > 0) { + strncat(outname, "_", CMOR_MAX_STRING - strlen(outname)); + strncat(outname, szTmp, CMOR_MAX_STRING - strlen(outname)); + } + 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); + cmor_pop_traceback(); + return (-1); + } + cmor_pop_traceback(); + 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; @@ -777,12 +1669,12 @@ 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_IDS); + CV_institution_ids = cmor_CV_rootsearch(CV, CV_KEY_INSTITUTION_ID); if(CV_institution_ids == NULL) { snprintf( msg, CMOR_MAX_STRING, - "Your \"institution_ids\" key could not be found in\n! " + "Your \"%s\" key could not be found in\n! " "your Control Vocabulary file.(%s)\n! ", - CV_Filename); + CV_KEY_INSTITUTION_ID, CV_Filename); cmor_handle_error( msg, CMOR_NORMAL ); cmor_pop_traceback( ); @@ -827,8 +1719,8 @@ int cmor_CV_setInstitution( cmor_CV_def_t *CV){ snprintf( msg, CMOR_MAX_STRING, "There is no institution associated to institution_id \"%s\"\n! " "in your Control Vocabulary file.\n! " - "Check your institution_ids dictionary!!\n! ", - szInstitution_ID); + "Check your \"%s\" dictionary!!\n! ", + CV_KEY_INSTITUTION_ID, szInstitution_ID); cmor_handle_error( msg, CMOR_NORMAL ); cmor_pop_traceback( ); return(-1); @@ -892,7 +1784,7 @@ int cmor_CV_ValidateAttribute(cmor_CV_def_t *CV, char *szKey){ reti = regcomp(®ex, attr_CV->aszValue[i],0); if(reti) { snprintf( msg, CMOR_MAX_STRING, - "You regular expression \"%s\" is invalid. \n!" + "You regular expression \"%s\" is invalid. \n! " "Check your Control Vocabulary file \"%s\".\n! ", attr_CV->aszValue[i], CV_Filename ); regfree(®ex); @@ -991,22 +1883,22 @@ int cmor_CV_checkGrids(cmor_CV_def_t *CV) { return(-1); } if (CV_grid_labels->anElements > 0) { - for (i = 0; i < CV_grid_labels->anElements; i++) { - rc = strcmp(CV_grid_labels->aszValue[i], szGridLabel); - if (rc == 0) { - break; - } - } - 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); - cmor_handle_error(msg, CMOR_NORMAL); - cmor_pop_traceback(); - return(-1); - - } + for (i = 0; i < CV_grid_labels->anElements; i++) { + rc = strcmp(CV_grid_labels->aszValue[i], szGridLabel); + if (rc == 0) { + break; + } + } + 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); + cmor_handle_error(msg, CMOR_NORMAL); + cmor_pop_traceback(); + return (-1); + + } } CV_grid_resolution = cmor_CV_rootsearch(CV, CV_KEY_GRID_RESOLUTION); if(CV_grid_resolution == NULL ) { @@ -1020,24 +1912,24 @@ int cmor_CV_checkGrids(cmor_CV_def_t *CV) { } - if (CV_grid_resolution->anElements > 0) { - for (i = 0; i < CV_grid_resolution->anElements; i++) { - rc = strcmp(CV_grid_resolution->aszValue[i], szGridResolution); - if (rc == 0) { - break; - } - } - 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); - cmor_handle_error(msg, CMOR_NORMAL); - cmor_pop_traceback(); - return(-1); + if (CV_grid_resolution->anElements > 0) { + for (i = 0; i < CV_grid_resolution->anElements; i++) { + rc = strcmp(CV_grid_resolution->aszValue[i], szGridResolution); + if (rc == 0) { + break; + } + } + 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); + cmor_handle_error(msg, CMOR_NORMAL); + cmor_pop_traceback(); + return (-1); - } - } + } + } cmor_pop_traceback( ); return(0); @@ -1190,7 +2082,9 @@ int cmor_CV_checkISOTime(char *szAttribute) { /************************************************************************/ /* cmor_CV_variable() */ /************************************************************************/ -int cmor_CV_variable( int *var_id, char *name, char *units, float *missing ) { +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 i; @@ -1279,6 +2173,11 @@ int cmor_CV_variable( int *var_id, char *name, char *units, float *missing ) { cmor_vars[vrid].shuffle = refvar.shuffle; cmor_vars[vrid].deflate = refvar.deflate; cmor_vars[vrid].deflate_level = refvar.deflate_level; + cmor_vars[vrid].first_bound = startimebnds; + cmor_vars[vrid].last_bound = endtimebnds; + 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); @@ -1286,10 +2185,12 @@ int cmor_CV_variable( int *var_id, char *name, char *units, float *missing ) { strncpy(cmor_vars[vrid].id, refvar.out_name, CMOR_MAX_STRING); } - cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_STANDARDNAME, 'c', + cmor_set_variable_attribute_internal(vrid, + VARIABLE_ATT_STANDARDNAME, 'c', refvar.standard_name); - cmor_set_variable_attribute_internal(vrid, VARIABLE_ATT_LONGNAME, 'c', + cmor_set_variable_attribute_internal(vrid, + VARIABLE_ATT_LONGNAME, 'c', refvar.long_name); if ((refvar.flag_values != NULL) && (refvar.flag_values[0] != '\0')) { diff --git a/Src/cmor_axes.c b/Src/cmor_axes.c index 12a19f2e..678e59d8 100644 --- a/Src/cmor_axes.c +++ b/Src/cmor_axes.c @@ -101,25 +101,27 @@ double cmor_convert_interval_to_seconds( double interv, char *inunits ) { user_units = ut_parse( ut_read, msg, UT_ASCII ); if( ut_get_status( ) != UT_SUCCESS ) { snprintf( msg, CMOR_MAX_STRING, - "In udunuits parsing user units: %s", msg ); + "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 udunuits getting converter" ); + 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 udunuits converting" ); + snprintf( msg, CMOR_MAX_STRING, "In udunits converting" ); cmor_handle_error( msg, CMOR_CRITICAL ); } cv_free( ut_cmor_converter ); diff --git a/Src/cmor_grids.c b/Src/cmor_grids.c index 9bbce32f..8e58e94d 100644 --- a/Src/cmor_grids.c +++ b/Src/cmor_grids.c @@ -523,23 +523,23 @@ int cmor_set_grid_mapping( int gid, char *name, int nparam, char msg2[CMOR_MAX_STRING]; char grid_dimensions[CMOR_MAX_DIMENSIONS][CMOR_MAX_STRING]; - 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_handle_error( msg, CMOR_CRITICAL ); + 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_handle_error(msg, CMOR_CRITICAL); } - 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 ); - achar += lparams; - bchar += lnunits; + 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); + achar += lparams; + bchar += lnunits; } grid_id = -gid - CMOR_MAX_GRIDS; @@ -547,16 +547,18 @@ int cmor_set_grid_mapping( int gid, char *name, int nparam, /* reads in grid definitions */ /* -------------------------------------------------------------------- */ - cmor_grid_valid_mapping_attribute_names( name, &nattributes, - grid_attributes, &ndims, - grid_dimensions ); + cmor_grid_valid_mapping_attribute_names(name, &nattributes, grid_attributes, + &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); + cmor_handle_error(msg, CMOR_CRITICAL); + cmor_pop_traceback(); + return (-1); - 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 ); - cmor_handle_error( msg, CMOR_CRITICAL ); } /* -------------------------------------------------------------------- */ @@ -565,106 +567,101 @@ int cmor_set_grid_mapping( int gid, char *name, int nparam, /* -------------------------------------------------------------------- */ k = 0; - 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 ); - if( strcmp( grid_dimensions[i], msg ) == 0 ) { - cmor_grids[grid_id].axes_ids[i] = - cmor_grids[grid_id].original_axes_ids[j]; + 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); + if (strcmp(grid_dimensions[i], msg) == 0) { + cmor_grids[grid_id].axes_ids[i] = + 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]; - } - } - k++; - } - } + 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]; + } + } + k++; + } + } } + 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); + for (i = 0; i < ndims; i++) { + snprintf(msg2, CMOR_MAX_STRING, " %s", grid_dimensions[i]); + strncat(msg, msg2, CMOR_MAX_STRING - strlen(msg)); + } + cmor_handle_error(msg, CMOR_CRITICAL); + cmor_pop_traceback(); + return (-1); - 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 ); - for( i = 0; i < ndims; i++ ) { - snprintf( msg2, CMOR_MAX_STRING, " %s", grid_dimensions[i] ); - strncat( msg, msg2, CMOR_MAX_STRING - strlen( msg ) ); - } - cmor_handle_error( msg, CMOR_CRITICAL ); } - - for( i = 0; i < nparam; i++ ) { - if( cmor_attribute_in_list - ( lattributes_names[i], nattributes, - &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 ) ) { + for (i = 0; i < nparam; i++) { + if (cmor_attribute_in_list(lattributes_names[i], nattributes, + &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)) { /* -------------------------------------------------------------------- */ /* ok do nothing it is just that we need 2 values for this */ /* parameter */ /* -------------------------------------------------------------------- */ - - cmor_set_grid_attribute( gid, lattributes_names[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 ); - cmor_handle_error( msg, CMOR_WARNING ); - } - } else { - cmor_set_grid_attribute( gid, lattributes_names[i], - &attributes_values[i], lunits[i] ); - } + + cmor_set_grid_attribute(gid, lattributes_names[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); + 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]); + } } /* -------------------------------------------------------------------- */ /* checks all parameter (but last 6 which are optional) have */ /* been set */ /* -------------------------------------------------------------------- */ - 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] ); - cmor_handle_error( msg, CMOR_WARNING ); - } + 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]); + cmor_handle_error(msg, CMOR_WARNING); + } } /* -------------------------------------------------------------------- */ /* Ok finally we need to copy the name to the grid struct */ /* -------------------------------------------------------------------- */ - strncpy( cmor_grids[grid_id].mapping, name, CMOR_MAX_STRING ); - cmor_pop_traceback( ); - return(0); + strncpy(cmor_grids[grid_id].mapping, name, CMOR_MAX_STRING); + cmor_pop_traceback(); + return (0); } /************************************************************************/ /* cmor_time_varying_grid_coordinate() */ /************************************************************************/ -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 ) { +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) { int ierr = 0, j; int axes[2]; char msg[CMOR_MAX_STRING]; @@ -678,185 +675,179 @@ int cmor_time_varying_grid_coordinate( int *coord_grid_id, int grid_id, axes[0] = grid_id; current_cmor_grids = &cmor_grids[-grid_id - CMOR_MAX_GRIDS]; nvertices = current_cmor_grids->nvertices; - table_id = cmor_axes[current_cmor_grids->axes_ids[0]].ref_table_id; - - cmor_add_traceback( "cmor_time_varying_grid_coordinate" ); - cmor_is_setup( ); - - strcpy( msg, "not found" ); - if( coordinate_type == NULL ) { - 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 ); - break; - } - } - if( strcmp( msg, "latitude" ) == 0 ) - ctype = 0; - if( strcmp( msg, "longitude" ) == 0 ) - ctype = 1; - if( strcmp( msg, "vertices_latitude" ) == 0 ) - ctype = 2; - if( strcmp( msg, "vertices_longitude" ) == 0 ) - ctype = 3; + //table_id = cmor_axes[current_cmor_grids->axes_ids[0]].ref_table_id; + table_id = CMOR_TABLE; + cmor_add_traceback("cmor_time_varying_grid_coordinate"); + cmor_is_setup(); + + strcpy(msg, "not found"); + if (coordinate_type == NULL) { + 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); + break; + } + } + if (strcmp(msg, "latitude") == 0) + ctype = 0; + if (strcmp(msg, "longitude") == 0) + ctype = 1; + if (strcmp(msg, "vertices_latitude") == 0) + ctype = 2; + if (strcmp(msg, "vertices_longitude") == 0) + ctype = 3; } else { - ctype = *coordinate_type; + 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; + 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; /* -------------------------------------------------------------------- */ /* 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 ); - break; + 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; - cmor_pop_traceback( ); - return(ierr); + cmor_pop_traceback(); + return (ierr); } /************************************************************************/ /* cmor_grid() */ diff --git a/Src/cmor_tables.c b/Src/cmor_tables.c index 5bfb3f1b..ce7616bf 100644 --- a/Src/cmor_tables.c +++ b/Src/cmor_tables.c @@ -453,25 +453,24 @@ int cmor_set_dataset_att(cmor_table_t * table, char att[CMOR_MAX_STRING], /* cmor_set_table() */ /************************************************************************/ -int cmor_set_table( int table ) { +int cmor_set_table(int table) { extern int CMOR_TABLE; char msg[CMOR_MAX_STRING]; - cmor_add_traceback( "cmor_set_table" ); - cmor_is_setup( ); - if( table > cmor_ntables ) { - snprintf( msg, CMOR_MAX_STRING, "Invalid table number: %i", - table ); - cmor_handle_error( msg, CMOR_CRITICAL ); + cmor_add_traceback("cmor_set_table"); + cmor_is_setup(); + if (table > cmor_ntables) { + snprintf(msg, CMOR_MAX_STRING, "Invalid table number: %i", table); + cmor_handle_error(msg, CMOR_CRITICAL); } - if( cmor_tables[table].szTable_id == '\0' ) { - snprintf( msg, CMOR_MAX_STRING, - "Invalid table: %i , not loaded yet!", table ); - cmor_handle_error( msg, CMOR_CRITICAL ); + if (cmor_tables[table].szTable_id == '\0') { + snprintf(msg, CMOR_MAX_STRING, "Invalid table: %i , not loaded yet!", + table); + cmor_handle_error(msg, CMOR_CRITICAL); } CMOR_TABLE = table; - cmor_pop_traceback( ); - return(0); + cmor_pop_traceback(); + return (0); } /************************************************************************/ @@ -489,6 +488,15 @@ 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" ); + + 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); @@ -576,6 +584,7 @@ int cmor_load_table( char szTable[CMOR_MAX_STRING], int *table_id ) { } free(szTableName); + return(rc); } /************************************************************************/ @@ -593,7 +602,7 @@ int cmor_search_table( char szTable[CMOR_MAX_STRING], return (TABLE_FOUND); } } - + cmor_pop_traceback( ); return (TABLE_NOTFOUND); } @@ -865,7 +874,7 @@ int cmor_load_table_internal( char szTable[CMOR_MAX_STRING], int *table_id) { } else { /* -------------------------------------------------------------------- */ -/* nothing knwon we will not be setting any attributes! */ +/* nothing known we will not be setting any attributes! */ /* -------------------------------------------------------------------- */ snprintf( msg, CMOR_MAX_STRING, @@ -890,6 +899,10 @@ int cmor_load_table_internal( char szTable[CMOR_MAX_STRING], int *table_id) { } *table_id = cmor_ntables; CMOR_TABLE = cmor_ntables; + if(table_file != NULL) { + fclose(table_file); + table_file=NULL; + } cmor_pop_traceback( ); free(buffer); json_object_put(json_obj); diff --git a/Src/cmor_variables.c b/Src/cmor_variables.c index c3992381..62219bf7 100644 --- a/Src/cmor_variables.c +++ b/Src/cmor_variables.c @@ -2329,6 +2329,7 @@ int cmor_write_var_to_file( int ncid, cmor_var_t * avar, void *data, char msg_max[CMOR_MAX_STRING]; extern ut_system *ut_read; int tmpindex = 0; + int index; cmor_add_traceback( "cmor_write_var_to_file" ); cmor_is_setup( ); @@ -2408,7 +2409,8 @@ int cmor_write_var_to_file( int ncid, cmor_var_t * avar, void *data, for( i = 0; i < avar->ndims; i++ ) { for( j = 0; j < avar->ndims; j++ ) { if( avar->axes_ids[i] == avar->original_order[j] ) { - counter_orig2[i] = counter_orig[j + 1]; + index = j+1; + counter_orig2[i] = counter_orig[index]; } } } diff --git a/Test/_cmor_stub.py b/Test/_cmor_stub.py index 011796af..929e8957 100644 --- a/Test/_cmor_stub.py +++ b/Test/_cmor_stub.py @@ -1,7 +1,9 @@ '''stub implementation of the C functions''' + def grid(*args): return args + def getCMOR_defaults_include(attr): return attr diff --git a/Test/all_tests.py b/Test/all_tests.py index dbce74de..99ce6184 100644 --- a/Test/all_tests.py +++ b/Test/all_tests.py @@ -2,6 +2,7 @@ import os import unittest + def create_test_suite(): test_file_strings = glob.glob('Test/test_python_CMIP6_CV*.py') # test_file_strings = glob.glob('Test/test_python_CMIP6_CV*further*.py') diff --git a/Test/check_results.py b/Test/check_results.py index 96e1bb56..65fe8bad 100644 --- a/Test/check_results.py +++ b/Test/check_results.py @@ -1,51 +1,63 @@ from out_files import out from in_files import input_tables -import sys,os +import sys +import os import cmor test = sys.argv[1] test = os.path.split(test)[1] -if test[-4:].lower()=='.f90': - test=test[:-4] +if test[-4:].lower() == '.f90': + test = test[:-4] -print 'Checking results for:',test +print 'Checking results for:', test -outfiles = out.get(test,[]) -intables = input_tables.get(test,['IPCC_test_table_A',]) +outfiles = out.get(test, []) +intables = input_tables.get(test, ['IPCC_test_table_A', ]) class CMORResultCheckError(Exception): - def __init__(self,args=None): - self.args=args + def __init__(self, args=None): + self.args = args + nfiles = 0 -print 'files:',outfiles -gotfiles=[] -missing=[] +print 'files:', outfiles +gotfiles = [] +missing = [] for f in outfiles: if f is None: print 'No checking' sys.exit() - tables=[] + tables = [] for t in intables: - tables.append(os.path.join("Test",t)) + tables.append(os.path.join("Test", t)) tbl = tables.pop(0) - if len(tables)==0: - tables=[None,] - fnm = os.path.join("Test",f) + if len(tables) == 0: + tables = [None, ] + fnm = os.path.join("Test", f) if os.path.exists(fnm): - nfiles+=1 + nfiles += 1 gotfiles.append(fnm) - print 'Checking output file:',f - cmor.checkCMOR(sys.stdout,fnm,tbl,other_tables=tables) + print 'Checking output file:', f + cmor.checkCMOR(sys.stdout, fnm, tbl, other_tables=tables) print '----------------------- Success ------------------------------' os.remove(fnm) else: missing.append(fnm) -if nfiles == 0 and outfiles!=[]: - raise CMORResultCheckError,["Error could not find any output file for test: Test/%s.f90" % (test),] -elif nfiles!=len(outfiles): - raise CMORResultCheckError,["Error checking output files for test: Test/%s.f90 we could only find %i files when %i were expected.\n\n Expected files: \n\t%s\n\nPresent files: \n\t%s\n\nMissing files: \n\t%s\n" % (test,nfiles,len(outfiles),repr(outfiles),repr(gotfiles),repr(missing)),] +if nfiles == 0 and outfiles != []: + raise CMORResultCheckError( + ["Error could not find any output file for test: Test/%s.f90" % (test), ]) +elif nfiles != len(outfiles): + raise CMORResultCheckError( + [ + "Error checking output files for test: Test/%s.f90 we could only find %i files when %i were expected.\n\n Expected files: \n\t%s\n\nPresent files: \n\t%s\n\nMissing files: \n\t%s\n" % + (test, + nfiles, + len(outfiles), + repr(outfiles), + repr(gotfiles), + repr(missing)), + ]) diff --git a/Test/cmor_speed_and_compression.py b/Test/cmor_speed_and_compression.py index 9f66767d..a674f159 100644 --- a/Test/cmor_speed_and_compression.py +++ b/Test/cmor_speed_and_compression.py @@ -1,4 +1,7 @@ -import cmor,numpy,sys,os +import cmor +import numpy +import sys +import os from time import localtime, strftime today = strftime("%Y%m%d", localtime()) @@ -7,148 +10,154 @@ cdms2.setNetcdfShuffleFlag(0) cdms2.setNetcdfDeflateFlag(0) cdms2.setNetcdfDeflateLevelFlag(0) -except: +except BaseException: print "This test code needs a recent cdms2 interface for i/0" sys.exit() -if len(sys.argv)>1: +if len(sys.argv) > 1: level = int(sys.argv[1]) else: - level=int(os.environ.get("DEFLATE_LEVEL",0)) + level = int(os.environ.get("DEFLATE_LEVEL", 0)) -if len(sys.argv)>2: - shuffle= int(sys.argv[2]) +if len(sys.argv) > 2: + shuffle = int(sys.argv[2]) else: - shuffle=int(os.environ.get("SHUFFLE",0)) + shuffle = int(os.environ.get("SHUFFLE", 0)) -if level==0: +if level == 0: deflate = 0 else: deflate = 1 -f=open("Test/speed_test_table_A") -s=f.read() +f = open("Test/speed_test_table_A") +s = f.read() f.close() -s=s.replace("${DEFLATE_LEVEL}",str(level)) -s=s.replace("${DEFLATE}",str(deflate)) -s=s.replace("${SHUFFLE}",str(shuffle)) -f=open("mytable","w") +s = s.replace("${DEFLATE_LEVEL}", str(level)) +s = s.replace("${DEFLATE}", str(deflate)) +s = s.replace("${SHUFFLE}", str(shuffle)) +f = open("mytable", "w") f.write(s) f.close() -cmor.setup(inpath="Tables",set_verbosity=cmor.CMOR_NORMAL, netcdf_file_action = cmor.CMOR_REPLACE_4, exit_control = cmor.CMOR_EXIT_ON_MAJOR); +cmor.setup( + inpath="Tables", + set_verbosity=cmor.CMOR_NORMAL, + netcdf_file_action=cmor.CMOR_REPLACE_4, + exit_control=cmor.CMOR_EXIT_ON_MAJOR) cmor.dataset_json("Test/common_user_input.json") -tables=[] +tables = [] tables.append(cmor.load_table("mytable")) -print 'Tables ids:',tables +print 'Tables ids:', tables -## read in data, just one slice -f=cdms2.open('data/tas_ccsr-95a.xml') +# read in data, just one slice +f = cdms2.open('data/tas_ccsr-95a.xml') -s=f("tas",time=slice(0,1),squeeze=1) +s = f("tas", time=slice(0, 1), squeeze=1) ntimes = 12 -myaxes=numpy.arange(10) -myvars=numpy.arange(10) -myaxes[0] = cmor.axis(table_entry = 'latitude', - units = 'degrees_north', - coord_vals = s.getLatitude()[:],cell_bounds=s.getLatitude().getBounds()) -myaxes[1] = cmor.axis(table_entry = 'longitude', - units = 'degrees_north', - coord_vals = s.getLongitude()[:],cell_bounds=s.getLongitude().getBounds()) +myaxes = numpy.arange(10) +myvars = numpy.arange(10) +myaxes[0] = cmor.axis(table_entry='latitude', + units='degrees_north', + coord_vals=s.getLatitude()[:], cell_bounds=s.getLatitude().getBounds()) +myaxes[1] = cmor.axis(table_entry='longitude', + units='degrees_north', + coord_vals=s.getLongitude()[:], cell_bounds=s.getLongitude().getBounds()) +myaxes[3] = cmor.axis(table_entry='time', + units='months since 1980', + coord_vals=numpy.arange(ntimes), cell_bounds=numpy.arange(ntimes + 1)) -myaxes[3] = cmor.axis(table_entry = 'time', - units = 'months since 1980', - coord_vals = numpy.arange(ntimes), cell_bounds=numpy.arange(ntimes+1)) +pass_axes = [myaxes[2], myaxes[0], myaxes[1]] -pass_axes = [myaxes[2],myaxes[0],myaxes[1]] +myvars[0] = cmor.variable(table_entry='tas', + units='K', + axis_ids=pass_axes, + original_name='CLT', + history='no history', + comment='testing speed' + ) -myvars[0] = cmor.variable( table_entry = 'tas', - units = 'K', - axis_ids = pass_axes, - original_name = 'CLT', - history = 'no history', - comment = 'testing speed' - ) - -import time,MV2 +import time +import MV2 st = time.time() -totcmor=0 -totcdms=0 -maxcmor=0 -mincmor=1000 -maxcdms=0 -mincdms=1000 -c0=st -s2=s*1 -sh=list(s.shape) -print 'shape:',sh -sh.insert(0,1) -s2=MV2.reshape(s2,sh) -s2.setAxis(1,s.getLatitude()) -s2.setAxis(2,s.getLongitude()) -f=cdms2.open("Test/crap.nc","w") +totcmor = 0 +totcdms = 0 +maxcmor = 0 +mincmor = 1000 +maxcdms = 0 +mincdms = 1000 +c0 = st +s2 = s * 1 +sh = list(s.shape) +print 'shape:', sh +sh.insert(0, 1) +s2 = MV2.reshape(s2, sh) +s2.setAxis(1, s.getLatitude()) +s2.setAxis(2, s.getLongitude()) +f = cdms2.open("Test/crap.nc", "w") for i in range(ntimes): - #print 'Time:',i - cmor.write(myvars[0],s.filled(),1) - c=time.time() - #print 'cmor write time:',c-c0 - totcmor+=c-c0 - if maxcmorc-c0: - mincmor=c-c0 - c0=c - t=cdms2.createAxis([i]) - t.id='time' - t.units='months since 1980' + # print 'Time:',i + cmor.write(myvars[0], s.filled(), 1) + 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 + t = cdms2.createAxis([i]) + t.id = 'time' + t.units = 'months since 1980' t.designateTime() - s2.setAxis(0,t) - f.write(s2,id='tas') - c=time.time() - #print 'cdms time:',c-c0 - totcdms+=c-c0 - if maxcdmsc-c0: - mincdms=c-c0 - c0=c + s2.setAxis(0, t) + f.write(s2, id='tas') + 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 f.close() cmor.close() -import cdtime,os -ltime = cdtime.reltime(ntimes-1,'month since 1980').tocomp() +import cdtime +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" % (today,ltime.year,ltime.month))[6] -print 'level:',level,"shuffle:",shuffle -print 'total cmor:',totcmor,mincmor,totcmor/ntimes,maxcmor,lcmor +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" % + (today, ltime.year, ltime.month))[6] +print 'level:', level, "shuffle:", shuffle +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") + 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.write(repr(dic)) f.close() - diff --git a/Test/cmor_speed_and_compression_01.py b/Test/cmor_speed_and_compression_01.py index b4fa43fc..f57e53eb 100644 --- a/Test/cmor_speed_and_compression_01.py +++ b/Test/cmor_speed_and_compression_01.py @@ -1,4 +1,7 @@ -import cmor,numpy,sys,os +import cmor +import numpy +import sys +import os from time import localtime, strftime today = strftime("%Y%m%d", localtime()) @@ -7,7 +10,7 @@ cdms2.setNetcdfShuffleFlag(0) cdms2.setNetcdfDeflateFlag(0) cdms2.setNetcdfDeflateLevelFlag(0) -except: +except BaseException: print "This test code needs a recent cdms2 interface for i/0" sys.exit() @@ -36,7 +39,11 @@ f.write(s) f.close() -cmor.setup(inpath="Tables",set_verbosity=cmor.CMOR_NORMAL, netcdf_file_action = cmor.CMOR_REPLACE_4, exit_control = cmor.CMOR_EXIT_ON_MAJOR); +cmor.setup( + inpath="Tables", + set_verbosity=cmor.CMOR_NORMAL, + netcdf_file_action=cmor.CMOR_REPLACE_4, + exit_control=cmor.CMOR_EXIT_ON_MAJOR) cmor.dataset_json("Test/common_user_input.json") tables = [] @@ -44,9 +51,9 @@ print 'Tables ids:', tables -## read in data, just one slice -f=cdms2.open('data/tas_ccsr-95a.xml') -s=f("tas",time=slice(0,12),squeeze=1) +# read in data, just one slice +f = cdms2.open('data/tas_ccsr-95a.xml') +s = f("tas", time=slice(0, 12), squeeze=1) ntimes = 12 varout = 'tas' @@ -78,43 +85,46 @@ 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") -#print 'Time:',i +totcmor = 0 +totcdms = 0 +maxcmor = 0 +mincmor = 1000 +maxcdms = 0 +mincdms = 1000 +c0 = st +f = cdms2.open("Test/crap.nc", "w") +# print 'Time:',i print s.filled().shape -cmor.write(myvars[0],s.filled(),ntimes_passed=ntimes) -c=time.time() -print 'cmor write time:',c-c0 -totcmor+=c-c0 -if maxcmorc-c0: - mincmor=c-c0 -c0=c -f.write(s,id=varout) -c=time.time() -print 'cdms time:',c-c0 -totcdms+=c-c0 -if maxcdmsc-c0: - mincdms=c-c0 -c0=c +cmor.write(myvars[0], s.filled(), ntimes_passed=ntimes) +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 +f.write(s, id=varout) +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 f.close() cmor.close() -import cdtime,os -ltime = cdtime.reltime(ntimes-1,'month since 1980').tocomp() +import cdtime +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] -print 'level:',level,"shuffle:",shuffle -print 'total cmor:',totcmor,mincmor,totcmor/ntimes,maxcmor,lcmor +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] +print 'level:', level, "shuffle:", shuffle +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) diff --git a/Test/cmor_speed_and_compression_02.py b/Test/cmor_speed_and_compression_02.py index 7eff20c9..2bed494c 100644 --- a/Test/cmor_speed_and_compression_02.py +++ b/Test/cmor_speed_and_compression_02.py @@ -1,187 +1,192 @@ -import cmor,numpy,sys,os +import cmor +import numpy +import sys +import os from time import localtime, strftime today = strftime("%Y%m%d", localtime()) try: import cdms2 -except: - 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) cdms2.setNetcdfDeflateFlag(0) cdms2.setNetcdfDeflateLevelFlag(0) -if len(sys.argv)>1: +if len(sys.argv) > 1: level = int(sys.argv[1]) else: - level=int(os.environ.get("DEFLATE_LEVEL",0)) + level = int(os.environ.get("DEFLATE_LEVEL", 0)) -if len(sys.argv)>2: - shuffle= int(sys.argv[2]) +if len(sys.argv) > 2: + shuffle = int(sys.argv[2]) else: - shuffle=int(os.environ.get("SHUFFLE",0)) + shuffle = int(os.environ.get("SHUFFLE", 0)) -if level==0: +if level == 0: deflate = 0 else: deflate = 1 -f=open("Test/speed_test_table_A") -s=f.read() +f = open("Test/speed_test_table_A") +s = f.read() f.close() -s=s.replace("${DEFLATE_LEVEL}",str(level)) -s=s.replace("${DEFLATE}",str(deflate)) -s=s.replace("${SHUFFLE}",str(shuffle)) -f=open("mytable","w") +s = s.replace("${DEFLATE_LEVEL}", str(level)) +s = s.replace("${DEFLATE}", str(deflate)) +s = s.replace("${SHUFFLE}", str(shuffle)) +f = open("mytable", "w") f.write(s) f.close() -cmor.setup(inpath="Test",set_verbosity=cmor.CMOR_NORMAL, netcdf_file_action = cmor.CMOR_REPLACE, exit_control = cmor.CMOR_EXIT_ON_MAJOR); +cmor.setup( + inpath="Test", + set_verbosity=cmor.CMOR_NORMAL, + netcdf_file_action=cmor.CMOR_REPLACE, + exit_control=cmor.CMOR_EXIT_ON_MAJOR) cmor.dataset( - outpath = "Test", - experiment_id = "2xCO2 equilibrium experiment", - institution = "GICC (Generic International Climate Center, Geneva, Switzerland)", - source = "GICCM1 (2002): atmosphere: GICAM3 (gicam_0_brnchT_itea_2, T63L32); ocean: MOM (mom3_ver_3.5.2, 2x3L15); sea ice: GISIM4; land: GILSM2.5", - calendar = "standard", - realization = 1, - contact = "Charles Doutriaux (doutriaux1@llnl.gov)", - history = "Test for speed and compression.", - comment = "NetCDF4 vs NetCDF3 testing", - references = "http://cdat.sf.net", + outpath="Test", + experiment_id="2xCO2 equilibrium experiment", + institution="GICC (Generic International Climate Center, Geneva, Switzerland)", + source="GICCM1 (2002): atmosphere: GICAM3 (gicam_0_brnchT_itea_2, T63L32); ocean: MOM (mom3_ver_3.5.2, 2x3L15); sea ice: GISIM4; land: GILSM2.5", + calendar="standard", + realization=1, + contact="Charles Doutriaux (doutriaux1@llnl.gov)", + history="Test for speed and compression.", + comment="NetCDF4 vs NetCDF3 testing", + references="http://cdat.sf.net", leap_year=0, leap_month=0, - month_lengths=None,model_id="pcmdi-09a",forcing="co2") + month_lengths=None, model_id="pcmdi-09a", forcing="co2") -tables=[] +tables = [] tables.append(cmor.load_table("mytable")) -print 'Tables ids:',tables +print 'Tables ids:', tables -## read in data, just one slice -var='tos' -#f=cdms2.open('/export/ipcc/20c3m/atm/3h/tas/miroc3_2_medres/run1/tas_A3.nc') -#f=cdms2.open('/export/ipcc/20c3m/atm/3h/pr/miroc3_2_medres/run1/pr_A3.nc') -f=cdms2.open('/export/ipcc/20c3m/ocn/mo/tos/miroc3_2_medres/run1/tos_O1_1934_2000.nc') -s=f[var] +# read in data, just one slice +var = 'tos' +# f=cdms2.open('/export/ipcc/20c3m/atm/3h/tas/miroc3_2_medres/run1/tas_A3.nc') +# f=cdms2.open('/export/ipcc/20c3m/atm/3h/pr/miroc3_2_medres/run1/pr_A3.nc') +f = cdms2.open( + '/export/ipcc/20c3m/ocn/mo/tos/miroc3_2_medres/run1/tos_O1_1934_2000.nc') +s = f[var] ntimes = s.shape[0] -ntimes=100 +ntimes = 100 Tim = s.getTime().clone() -myaxes=numpy.arange(10) -myvars=numpy.arange(10) +myaxes = numpy.arange(10) +myvars = numpy.arange(10) try: missing_value = s.missing_value[0] -except: - try: - missing_value=s.missing_value - except: - missing_value=None +except BaseException: try: + missing_value = s.missing_value + except BaseException: missing_value =None -print 'Missing:',type(missing_value),missing_value +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[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', +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]) + +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 + tolerance= 1.e-2 ) -import time,MV2 +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 -for i in range(0,ntimes,step): - print 'Time:',i - j1=i - j2=i+step - cmor.write(myvars[0],s[j1:j2].filled(),step,file_suffix="speed-comp-02") - c=time.time() - #print 'cmor write time:',c-c0 - totcmor+=c-c0 - if maxcmorc-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.setAxis(-1,s.getLongitude()) - s2.setAxis(-2,s.getLatitude()) - t=cdms2.createAxis([Tim[i],]) - t.id='time' - t.units=Tim.units +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 + cmor.write(myvars[0], s[j1:j2].filled(), step, file_suffix="speed-comp-02") + c =time.time() + # print 'cmor write time:',c-c0 + totcmor +=c-c0 + if maxcmor 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.setAxis(-1, s.getLongitude()) + s2.setAxis(-2, s.getLatitude()) + 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() - #print 'cdms time:',c-c0 - totcdms+=c-c0 - if maxcdmsc-c0: - mincdms=c-c0 - c0=c + s2.setAxis(0, t) + f.write(s2, id=var) + c =time.time() + # print 'cdms time:',c-c0 + totcdms +=c-c0 + if maxcdms c-c0: + mincdms =c-c0 + c0 =c f.close() cmor.close() -import cdtime,os -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] -print 'level:',level,"shuffle:",shuffle -print 'total cmor:',totcmor,mincmor,totcmor/ntimes,maxcmor,lcmor +import cdtime +import os +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] +print 'level:', level, "shuffle:", shuffle +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") + 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.write(repr(dic)) f.close() - diff --git a/Test/cmor_speed_and_compression_03.py b/Test/cmor_speed_and_compression_03.py index 89f44bbf..8c9f55e1 100644 --- a/Test/cmor_speed_and_compression_03.py +++ b/Test/cmor_speed_and_compression_03.py @@ -1,4 +1,7 @@ -import cmor,numpy,sys,os +import cmor +import numpy +import sys +import os from time import localtime, strftime today = strftime("%Y%m%d", localtime()) @@ -8,112 +11,118 @@ cdms2.setNetcdfShuffleFlag(0) cdms2.setNetcdfDeflateFlag(0) cdms2.setNetcdfDeflateLevelFlag(0) -except: +except BaseException: print "This test code needs a recent cdms2 interface for i/0" sys.exit() level = 3 shuffle = 1 -cmor.setup(inpath="Tables",set_verbosity=cmor.CMOR_NORMAL, netcdf_file_action = cmor.CMOR_REPLACE_4, exit_control = cmor.CMOR_EXIT_ON_MAJOR); +cmor.setup( + inpath="Tables", + set_verbosity=cmor.CMOR_NORMAL, + netcdf_file_action=cmor.CMOR_REPLACE_4, + exit_control=cmor.CMOR_EXIT_ON_MAJOR) cmor.dataset_json("Test/common_user_input.json") -tables=[] +tables = [] tables.append(cmor.load_table("CMIP6_Amon.json")) -print 'Tables ids:',tables +print 'Tables ids:', tables -## read in data, just one slice -f=cdms2.open('data/tas_ccsr-95a.xml') -s=f("tas",time=slice(0,12),squeeze=1) +# read in data, just one slice +f = cdms2.open('data/tas_ccsr-95a.xml') +s = f("tas", time=slice(0, 12), squeeze=1) ntimes = 12 -varout='tas' - -myaxes=numpy.arange(10) -myvars=numpy.arange(10) -myaxes[0] = cmor.axis(table_entry = 'latitude', - units = 'degrees_north', - coord_vals = s.getLatitude()[:],cell_bounds=s.getLatitude().getBounds()) -myaxes[1] = cmor.axis(table_entry = 'longitude', - units = 'degrees_north', - coord_vals = s.getLongitude()[:],cell_bounds=s.getLongitude().getBounds()) - - - -myaxes[2] = cmor.axis(table_entry = 'time', - units = s.getTime().units, - coord_vals = s.getTime()[:],cell_bounds=s.getTime().getBounds()) - -pass_axes = [myaxes[2],myaxes[0],myaxes[1]] - -myvars[0] = cmor.variable( table_entry = varout, - units = s.units, - axis_ids = pass_axes, - original_name = s.id, - history = 'no history', - comment = 'testing speed' - ) +varout = 'tas' + +myaxes = numpy.arange(10) +myvars = numpy.arange(10) +myaxes[0] = cmor.axis(table_entry='latitude', + units='degrees_north', + coord_vals=s.getLatitude()[:], cell_bounds=s.getLatitude().getBounds()) +myaxes[1] = cmor.axis(table_entry='longitude', + units='degrees_north', + coord_vals=s.getLongitude()[:], cell_bounds=s.getLongitude().getBounds()) + + +myaxes[2] = cmor.axis(table_entry='time', + units=s.getTime().units, + coord_vals=s.getTime()[:], cell_bounds=s.getTime().getBounds()) + +pass_axes = [myaxes[2], myaxes[0], myaxes[1]] + +myvars[0] = cmor.variable(table_entry=varout, + units=s.units, + axis_ids=pass_axes, + original_name=s.id, + history='no history', + comment='testing speed' + ) cmor.set_deflate(myvars[0], shuffle, 1, level) -import time,MV2 +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") -#print 'Time:',i +totcmor = 0 +totcdms = 0 +maxcmor = 0 +mincmor = 1000 +maxcdms = 0 +mincdms = 1000 +c0 = st +f = cdms2.open("Test/crap.nc", "w") +# print 'Time:',i print s.filled().shape -cmor.write(myvars[0],s.filled(),ntimes_passed=ntimes) -c=time.time() -print 'cmor write time:',c-c0 -totcmor+=c-c0 -if maxcmorc-c0: - mincmor=c-c0 -c0=c -f.write(s,id=varout) -c=time.time() -print 'cdms time:',c-c0 -totcdms+=c-c0 -if maxcdmsc-c0: - mincdms=c-c0 -c0=c +cmor.write(myvars[0], s.filled(), ntimes_passed=ntimes) +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 +f.write(s, id=varout) +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 f.close() cmor.close() -import cdtime,os -ltime = cdtime.reltime(ntimes-1,'month since 1980').tocomp() +import cdtime +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] -print 'level:',level,"shuffle:",shuffle -print 'total cmor:',totcmor,mincmor,totcmor/ntimes,maxcmor,lcmor +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] +print 'level:', level, "shuffle:", shuffle +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") + 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.write(repr(dic)) f.close() - diff --git a/Test/common_user_input.json b/Test/common_user_input.json index 6c0150d2..4b63eba7 100644 --- a/Test/common_user_input.json +++ b/Test/common_user_input.json @@ -7,22 +7,19 @@ "tracking_prefix": "hdl:21.14100", "activity_id": "ISMIP6", - "branch_method": "standard", - "branch_time_in_child": "365.0", "#output": "Output Path where files are written", "outpath": "CMIP6", "#experiment_id": "CMIP6 valid experiment_ids are found in CMIP6_CV.json", "experiment_id": "piControl-withism", - "sub_experiment_id": "None", - "sub_experiment": "None", + "sub_experiment_id": "none", + "sub_experiment": "none", "source_type": "AOGCM ISM AER", "parent_mip_era": "N/A", "mip_era": "CMIP6", "calendar": "360_day", - "branch_time": "1.34", "realization_index": "11", "initialization_index": "1", @@ -47,10 +44,17 @@ "institution_id": "PCMDI", - "parent_activity_id": "CMIP", "parent_experiment_id": "histALL", - "parent_source_id": "GFDL-CM2-1", - "parent_variant_label": "r1i1p1f3", + "parent_activity_id": "ISMIP6", + "parent_mip_era": "CMIP6", + + "parent_source_id": "PCMDI-test-1-0", + "parent_time_units": "days since 1970-01-01", + "parent_variant_label": "r123i1p33f5", + + "branch_method": "Spin-up documentation", + "branch_time_in_child": 2310.0, + "branch_time_in_parent": 12345.0, "#run_variant": "Description of run variant (Recommended).", @@ -64,10 +68,10 @@ "#output_path_template": "Template for output path directory using tables keys or global attributes", - "output_path_template": "", - "output_file_template": "
", + "output_path_template": "<_member_id>
", + "output_file_template": "
<_member_id>", - "license": "CMIP6 model data produced by is licensed under a Creative Commons Attribution NonCommercial \"Share Alike\" 4.0 International License (http://creativecommons.org/licenses/by/4.0/). Use of the data must be acknowledged following guidelines found at https://pcmdi.llnl.gov/home/CMIP6/citation.html. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) and at cmor.llnl.gov. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law." + "license": "CMIP6 model data produced by Lawrence Livermore PCMDI is licensed under a Creative Commons Attribution ShareAlike 4.0 International License (https://creativecommons.org/licenses). Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) and at https:///pcmdi.llnl.gov/. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law." } diff --git a/Test/common_user_inputNOBOUNDS.json b/Test/common_user_inputNOBOUNDS.json index ee07fbb0..6696a1b2 100644 --- a/Test/common_user_inputNOBOUNDS.json +++ b/Test/common_user_inputNOBOUNDS.json @@ -66,8 +66,8 @@ "#output_path_template": "Template for output path directory using tables keys or global attributes", "output_path_template": "
", "output_file_template": "
", + "license": "CMIP6 model data produced by Lawrence Livermore PCMDI is licensed under a Creative Commons Attribution ShareAlike 4.0 International License (https://creativecommons.org/licenses). Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) and at https:///pcmdi.llnl.gov/. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law." - "license": "CMIP6 model data produced by is licensed under a Creative Commons Attribution NonCommercial \"Share Alike\" 4.0 International License (http://creativecommons.org/licenses/by/4.0/). Use of the data must be acknowledged following guidelines found at https://pcmdi.llnl.gov/home/CMIP6/citation.html. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) and at cmor.llnl.gov. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law." } diff --git a/Test/common_user_input_NOID.json b/Test/common_user_input_NOID.json index 126a6bc9..f3bd5514 100644 --- a/Test/common_user_input_NOID.json +++ b/Test/common_user_input_NOID.json @@ -66,7 +66,8 @@ "output_path_template": "
", "output_file_template": "
", - "license": "CMIP6 model data produced by is licensed under a Creative Commons Attribution NonCommercial \"Share Alike\" 4.0 International License (http://creativecommons.org/licenses/by/4.0/). Use of the data must be acknowledged following guidelines found at https://pcmdi.llnl.gov/home/CMIP6/citation.html. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) and at cmor.llnl.gov. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law." + "license": "CMIP6 model data produced by Lawrence Livermore PCMDI is licensed under a Creative Commons Attribution ShareAlike 4.0 International License (https://creativecommons.org/licenses). Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) and at https:///pcmdi.llnl.gov/. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law." + } diff --git a/Test/in_files.py b/Test/in_files.py index c010f741..e5b5ac64 100644 --- a/Test/in_files.py +++ b/Test/in_files.py @@ -1,31 +1,31 @@ input_tables = { - 'climatology_test_code' : ['climatology_test_table_A'], - 'test_any_from_asc' : ['CMOR_SAMPLE_TABLE'], - 'test_any_from_asc_d' : ['CMOR_SAMPLE_TABLE'], - 'test_any_from_asc_i' : ['CMOR_SAMPLE_TABLE'], - 'karls_test' : ['IPCC_test_table_A'], - 'test1' : ['CMOR_SAMPLE_TABLE'], - 'test2' : ['CMOR_SAMPLE_TABLE'], - 'test3' : ['CMOR_SAMPLE_TABLE'], - 'test4' : ['CMOR_SAMPLE_TABLE'], - 'main_prog' : ['CMOR_SAMPLE_TABLE'], - 'test_any_from_asc_i' : ['CMOR_SAMPLE_TABLE',], - 'mytest_4d_r' : ['CMOR_SAMPLE_TABLE'], + 'climatology_test_code': ['climatology_test_table_A'], + 'test_any_from_asc': ['CMOR_SAMPLE_TABLE'], + 'test_any_from_asc_d': ['CMOR_SAMPLE_TABLE'], + 'test_any_from_asc_i': ['CMOR_SAMPLE_TABLE'], + 'karls_test': ['IPCC_test_table_A'], + 'test1': ['CMOR_SAMPLE_TABLE'], + 'test2': ['CMOR_SAMPLE_TABLE'], + 'test3': ['CMOR_SAMPLE_TABLE'], + 'test4': ['CMOR_SAMPLE_TABLE'], + 'main_prog': ['CMOR_SAMPLE_TABLE'], + 'test_any_from_asc_i': ['CMOR_SAMPLE_TABLE', ], + 'mytest_4d_r': ['CMOR_SAMPLE_TABLE'], 'rewrite_harvardf_data': ['Curts_table'], - 'test_3h' : ['IPCC_table_A3'], - 'test_dimensionless' : ['IPCC_table_A1'], - 'test_fortran_example_00' : ['IPCC_test_table_A'], - 'test_fortran_example_01' : ['IPCC_test_table_A','IPCC_test_table_Grids'], - 'test_station_data' : ['IPCC_test_table_S'], + 'test_3h': ['IPCC_table_A3'], + 'test_dimensionless': ['IPCC_table_A1'], + 'test_fortran_example_00': ['IPCC_test_table_A'], + 'test_fortran_example_01': ['IPCC_test_table_A', 'IPCC_test_table_Grids'], + 'test_station_data': ['IPCC_test_table_S'], 'test_region': ['IPCC_test_table_O'], - 'test_sigma' : ['IPCC_table_A1'], - 'test_singleton' : ['IPCC_test_table_A'], - 'mytest_4d_r_big_array' : ['CMOR_SAMPLE_TABLE'], - 'mytest_4d_d_big_array_2' : ['CMOR_SAMPLE_TABLE'], - 'mytest_4d_d_big_array_3' : ['CMOR_SAMPLE_TABLE'], - 'mytest_4d_d_big_array_4' : ['CMOR_SAMPLE_TABLE'], - 'mytest_4d_d_big_array_5' : ['CMOR_SAMPLE_TABLE'], - 'test_lots_of_variables' : ['IPCC_test_table_As'], - 'test_shrt_exp_nm_set_att_initi' : ['IPCC_test_table_As'], - 'test_sophie' : ['Sophie_Table'], - } + 'test_sigma': ['IPCC_table_A1'], + 'test_singleton': ['IPCC_test_table_A'], + 'mytest_4d_r_big_array': ['CMOR_SAMPLE_TABLE'], + 'mytest_4d_d_big_array_2': ['CMOR_SAMPLE_TABLE'], + 'mytest_4d_d_big_array_3': ['CMOR_SAMPLE_TABLE'], + 'mytest_4d_d_big_array_4': ['CMOR_SAMPLE_TABLE'], + 'mytest_4d_d_big_array_5': ['CMOR_SAMPLE_TABLE'], + 'test_lots_of_variables': ['IPCC_test_table_As'], + 'test_shrt_exp_nm_set_att_initi': ['IPCC_test_table_As'], + 'test_sophie': ['Sophie_Table'], +} diff --git a/Test/jamie_hybrid_height.py b/Test/jamie_hybrid_height.py index 9685569f..d0f10ad4 100644 --- a/Test/jamie_hybrid_height.py +++ b/Test/jamie_hybrid_height.py @@ -3,34 +3,35 @@ import cmor import numpy + def main(): cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE) + netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") - + table = 'CMIP6_6hrLev.json' cmor.load_table(table) - axes = [ {'table_entry': 'time1', - 'units': 'days since 2000-01-01 00:00:00' - }, - {'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]}, - {'table_entry': 'hybrid_height', - 'coord_vals': [0, 1], - 'cell_bounds': [[0., 0.5], [0.5, 1.]], - 'units': 'm', - }, - ] - - values = numpy.array([1.2,1.2], numpy.float32) - numpy.reshape(values, (2,1,1,1)) + axes = [{'table_entry': 'time1', + 'units': 'days since 2000-01-01 00:00:00' + }, + {'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]}, + {'table_entry': 'hybrid_height', + 'coord_vals': [0, 1], + 'cell_bounds': [[0., 0.5], [0.5, 1.]], + 'units': 'm', + }, + ] + + values = numpy.array([1.2, 1.2], numpy.float32) + numpy.reshape(values, (2, 1, 1, 1)) axis_ids = list() for axis in axes: axis_id = cmor.axis(**axis) @@ -38,23 +39,25 @@ def main(): print 'cmor.axis calls complete' - cmor.zfactor(axis_ids[3], 'b', '', axis_ids[3:4], 'd', [0., 0.5], [[0., 0.25], [0.25, 1.]]) - cmor.zfactor(axis_ids[3], 'orog', 'm', axis_ids[1:3], 'd', [[0.]]) + cmor.zfactor(axis_ids[3], 'b', '', axis_ids[3:4], + 'd', [0., 0.5], [[0., 0.25], [0.25, 1.]]) + cmor.zfactor(axis_ids[3], 'orog', 'm', axis_ids[1:3], 'd', [[0.]]) print 'cmor.zfactor calls complete' varid = cmor.variable('ua', 'm s-1', axis_ids, - missing_value = -99 + missing_value=-99 ) print 'cmor.variable call complete' - - cmor.write(varid, values, time_vals = [6.0], time_bnds = [3., 12.]) + + cmor.write(varid, values, time_vals=[6.0], time_bnds=[3., 12.]) print 'cmor.write call complete' cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/jamie_positive.py b/Test/jamie_positive.py index 981c6152..8702c4f1 100644 --- a/Test/jamie_positive.py +++ b/Test/jamie_positive.py @@ -2,28 +2,29 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3) + netcdf_file_action=cmor.CMOR_REPLACE_3) cmor.dataset_json("Test/common_user_input.json") - + table = 'CMIP6_Amon.json' cmor.load_table(table) - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'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]}, - ] - - values = numpy.array([1.], numpy.float32)+200 + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'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]}, + ] + + values = numpy.array([1.], numpy.float32) + 200 axis_ids = list() for axis in axes: axis_id = cmor.axis(**axis) @@ -35,14 +36,15 @@ def main(): varid = cmor.variable(var, units, axis_ids, - history = 'variable history', - missing_value = -99, - positive = positive + history='variable history', + missing_value=-99, + positive=positive ) - cmor.write(varid, values, time_vals = [15], time_bnds = [ [0,30] ]) + cmor.write(varid, values, time_vals=[15], time_bnds=[[0, 30]]) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/nc2asc.py b/Test/nc2asc.py index 88f2600d..b3fa29b5 100755 --- a/Test/nc2asc.py +++ b/Test/nc2asc.py @@ -1,69 +1,74 @@ #!/usr/bin/env python -import cdms2,sys, genutil +import cdms2 +import sys +import genutil cdms2.setAutoBounds('on') type = 'd' -order='zxty' -#order='xty' +order = 'zxty' +# order='xty' #order = None #order= 'txy' -var ='ta' -if len(sys.argv)>2: - fnm=sys.argv[1] - fout=sys.argv[2] +var = 'ta' +if len(sys.argv) > 2: + fnm = sys.argv[1] + fout = sys.argv[2] else: - fnm='/ipcc/20c3m/atm/mo/%s/ncar_ccsm3_0/run1/%s_A1.20C3M_1.CCSM.atmm.1870-01_cat_1879-12.nc' % (var,var) - fout='Test/%s.asc' % (var) + fnm = '/ipcc/20c3m/atm/mo/%s/ncar_ccsm3_0/run1/%s_A1.20C3M_1.CCSM.atmm.1870-01_cat_1879-12.nc' % ( + var, var) + fout = 'Test/%s.asc' % (var) -f=cdms2.open(fnm) +f = cdms2.open(fnm) -ntimes= 3 -print 'var:',var -#s=f(var,time=slice(0,3),latitude=(-20,20),order=order,squeeze=1) +ntimes = 3 +print 'var:', var +# s=f(var,time=slice(0,3),latitude=(-20,20),order=order,squeeze=1) if order is not None: - if order.find('z')>-1: - s=f(var,time=slice(0,ntimes),order=order,squeeze=1,longitude=(-180,180,'con'),level=slice(5,12)) - print s.getLevel()[:] - else: - s=f(var,time=slice(0,ntimes),order=order,squeeze=1,longitude=(-180,180,'con')) + if order.find('z') > -1: + s = f(var, time=slice(0, ntimes), order=order, squeeze=1, + longitude=(-180, 180, 'con'), level=slice(5, 12)) + print s.getLevel()[:] + else: + s = f(var, time=slice(0, ntimes), order=order, + squeeze=1, longitude=(-180, 180, 'con')) else: - s=f(var,time=slice(0,ntimes),squeeze=1) -#s=s[:,::4,::4] -print 'Read in',s.shape + s = f(var, time=slice(0, ntimes), squeeze=1) +# s=s[:,::4,::4] +print 'Read in', s.shape try: - p=s.getLevel() - p.id='pressure' - p.units='Pa' -except: - pass -#print genutil.minmax(s) + p = s.getLevel() + p.id = 'pressure' + p.units = 'Pa' +except BaseException: + pass +# print genutil.minmax(s) f.close() -f=open(fout,'w') +f = open(fout, 'w') -ndim=s.rank() +ndim = s.rank() print 'Dumping' print >>f, s.id print >>f, s.units print >>f, ndim for i in range(ndim): - ax=s.getAxis(i) + ax = s.getAxis(i) print >>f, len(ax) - + for i in range(ndim): - ax=s.getAxis(i) + ax = s.getAxis(i) if ax.isLatitude(): - print >>f, 'latitude' + print >>f, 'latitude' elif ax.isLongitude(): - print >>f,'longitude' + print >>f, 'longitude' else: - print >>f, ax.id + print >>f, ax.id print >>f, ax.units - print ax.id - print ax.units + print ax.id + print ax.units for j in ax[:]: print >>f, j, print >>f @@ -72,13 +77,13 @@ print >>f f.flush() -s=s.filled(120).astype(type) -s=s.flat -j=0 +s = s.filled(120).astype(type) +s = s.flat +j = 0 for i in s[:]: print >>f, i, - j+=1 + j += 1 print >>f -print j,s[-1] +print j, s[-1] f.close() diff --git a/Test/out_files.py b/Test/out_files.py index a448bfb7..1211d424 100644 --- a/Test/out_files.py +++ b/Test/out_files.py @@ -400,94 +400,94 @@ IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atmosphere/hfls98/r1i4p6/hfls98_A1_pcmdi-08a_2xco2_r1i4p6_197901-197902.nc IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atmosphere/hfls99/r1i4p6/hfls99_A1_pcmdi-08a_2xco2_r1i4p6_197901-197902.nc """.split() - + out = { - 'old_cmor_tables_climatology_test_code' : ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-01/2xco2/monClim/atm/tasDiurnal/r1i1p1/tasDiurnal_A1_pcmdi-01_2xco2_r1i1p1_203001-203003_clim.nc'], - 'old_cmor_tables_test_any_from_asc' : ['IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-01a_2xco2_r1i1p1_187001-187003.nc'], - 'old_cmor_tables_test_any_from_asc_d' : ['IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-01a_2xco2_r1i1p1_187001-187003.nc'], - 'old_cmor_tables_test_any_from_asc_i' : ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-08a_2xco2_r1i1p1_187001-187003.nc'], - 'old_cmor_tables_karls_test' : ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/cl/r1i1p1/cl_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atmosphere/hfls/r1i1p1/hfls_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/mrsos/r1i1p1/mrsos_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/ps/r1i1p1/ps_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/ta/r1i1p1/ta_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/tas/r1i1p1/tas_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/ua/r1i1p1/ua_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc'], - 'old_cmor_tables_test1' : ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfls/r1i1p1/hfls_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc'], - 'old_cmor_tables_test2' : ['IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/hfls/r1i1p1/hfls_2_pcmdi-01a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_2_pcmdi-01a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-01a_2xco2_r1i1p1_197901-197902_User-suffix-1979-2001.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-01a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/ua/r1i1p1/ua_2_pcmdi-01a_2xco2_r1i1p1_197901-197902_User-suffix-1979-2001.nc'], - 'old_cmor_tables_test3' : ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfls/r1i1p1/hfls_2_pcmdi-08a_2xco2_r1i1p1_197901-197902_1979-2001.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_2_pcmdi-08a_2xco2_r1i1p1_197901-197902_1979-2001.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_197901-197902_1979-2001.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-08a_2xco2_r1i1p1_197901-197902_1979-2001.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_2_pcmdi-08a_2xco2_r1i1p1_197901-197902_1979-2001.nc'], - 'old_cmor_tables_test4' : ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfls/r1i1p1/hfls_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc'], - 'old_cmor_tables_main_prog' : ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfls/r1i1p1/hfls_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', - 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc'], - 'old_cmor_tables_mytest_4d_r' : ['IPCC/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-a08_2xco2_r1i1p1_194901-194903.nc'], - 'old_cmor_tables_rewrite_harvardf_data' :['IPCC_Fourth_Assessment/output/INSTITUTE_ID/20c3m/day/atm/tas/r1i1p1/tas_A_20c3m_r1i1p1_19920101-19920110.nc'], - 'old_cmor_tables_test_3h' : ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/3hr/atm/hfls/r1i1p1/hfls_A3_pcmdi-08a_2xco2_r1i1p1_2030010101-2030010104.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/3hr/atm/pr/r1i1p1/pr_A3_pcmdi-08a_2xco2_r1i1p1_2030010101-2030010104.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/3hr/atm/tas/r1i1p1/tas_A3_pcmdi-08a_2xco2_r1i1p1_2030010101-2030010104.nc'], - 'old_cmor_tables_test_dimensionless' : ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/cl/r1i1p1/cl_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/hfls/r1i1p1/hfls_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/mrsos/r1i1p1/mrsos_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/ps/r1i1p1/ps_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/ta/r1i1p1/ta_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/tas/r1i1p1/tas_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/tro3/r1i1p1/tro3_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/ua/r1i1p1/ua_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc'], - 'old_cmor_tables_test_fortran_example_00' : ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/cl/r1i1p1/cl_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atmosphere/hfls/r1i1p1/hfls_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ps/r1i1p1/ps_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc'], - 'old_cmor_tables_test_fortran_example_01' : ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atmosphere/hfls/r1i1p1/hfls_A1_pcmdi-08a_2xco2_r1i1p1_198001-198002_ftn-01.nc',] , - 'old_cmor_tables_test_fortran_example_02' : ['Test/IPCC_Fourth_Assessment/output/INSTITUTE_ID/mon/REALM/hfls/r1i1p1/hfls_A1_r1i1p1_203001-203002_ftn-02.nc', - 'Test/IPCC_Fourth_Assessment/output/INSTITUTE_ID/mon/REALM/mrsos/r1i1p1/mrsos_A1_r1i1p1_203001-203002_ftn-02.nc', - 'Test/IPCC_Fourth_Assessment/output/INSTITUTE_ID/mon/REALM/ps/r1i1p1/ps_A1_r1i1p1_203001-203002_ftn-02.nc', - 'Test/IPCC_Fourth_Assessment/output/INSTITUTE_ID/mon/REALM/tas/r1i1p1/tas_A1_r1i1p1_203001-203002_ftn-02.nc', - ], - 'old_cmor_tables_test_station_data': [None], - 'old_cmor_tables_test_cmor_grid_alejandro' : [None], - 'old_cmor_tables_test_sophie': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/fx/atmosphere/hfls/r0i0p0/hfls_A1_pcmdi-08a_r0i0p0.nc'], - 'old_cmor_tables_test_region' : ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfogo/r1i1p1/hfogo_O1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc'], - 'old_cmor_tables_test_sigma' : ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/cl/r1i1p1/cl_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfls/r1i1p1/hfls_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ps/r1i1p1/ps_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tro3/r1i1p1/tro3_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc'], - 'old_cmor_tables_test_singleton' : ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/cl/r1i1p1/cl_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atmosphere/hfls/r1i1p1/hfls_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ps/r1i1p1/ps_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', - 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc'], - 'old_cmor_tables_mytest_4d_r_big_array' : ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_194901-194903.nc'], - 'old_cmor_tables_mytest_4d_d_big_array_2' : ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_194901-194903.nc'], - 'old_cmor_tables_mytest_4d_d_big_array_3' : ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_194901-194903.nc'], - 'old_cmor_tables_mytest_4d_d_big_array_4' : ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_194901-194903.nc'], - 'old_cmor_tables_mytest_4d_d_big_array_5' : ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_194901-194903.nc'], - 'old_cmor_tables_test_lots_of_variables' : lots, - 'old_cmor_tables_test_shrt_exp_nm_set_att_initi' : ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atmosphere/hfls0/r1i1p1/hfls0_A1_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc'], - } + 'old_cmor_tables_climatology_test_code': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-01/2xco2/monClim/atm/tasDiurnal/r1i1p1/tasDiurnal_A1_pcmdi-01_2xco2_r1i1p1_203001-203003_clim.nc'], + 'old_cmor_tables_test_any_from_asc': ['IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-01a_2xco2_r1i1p1_187001-187003.nc'], + 'old_cmor_tables_test_any_from_asc_d': ['IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-01a_2xco2_r1i1p1_187001-187003.nc'], + 'old_cmor_tables_test_any_from_asc_i': ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-08a_2xco2_r1i1p1_187001-187003.nc'], + 'old_cmor_tables_karls_test': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/cl/r1i1p1/cl_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atmosphere/hfls/r1i1p1/hfls_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/mrsos/r1i1p1/mrsos_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/ps/r1i1p1/ps_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/ta/r1i1p1/ta_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/tas/r1i1p1/tas_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a01/2xco2/mon/atm/ua/r1i1p1/ua_A1_pcmdi-a01_2xco2_r1i1p1_203001-203002.nc'], + 'old_cmor_tables_test1': ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfls/r1i1p1/hfls_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc'], + 'old_cmor_tables_test2': ['IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/hfls/r1i1p1/hfls_2_pcmdi-01a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_2_pcmdi-01a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-01a_2xco2_r1i1p1_197901-197902_User-suffix-1979-2001.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-01a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-01a/2xco2/mon/atm/ua/r1i1p1/ua_2_pcmdi-01a_2xco2_r1i1p1_197901-197902_User-suffix-1979-2001.nc'], + 'old_cmor_tables_test3': ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfls/r1i1p1/hfls_2_pcmdi-08a_2xco2_r1i1p1_197901-197902_1979-2001.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_2_pcmdi-08a_2xco2_r1i1p1_197901-197902_1979-2001.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_197901-197902_1979-2001.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-08a_2xco2_r1i1p1_197901-197902_1979-2001.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_2_pcmdi-08a_2xco2_r1i1p1_197901-197902_1979-2001.nc'], + 'old_cmor_tables_test4': ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfls/r1i1p1/hfls_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc'], + 'old_cmor_tables_main_prog': ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfls/r1i1p1/hfls_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc', + 'IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_2_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc'], + 'old_cmor_tables_mytest_4d_r': ['IPCC/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-a08_2xco2_r1i1p1_194901-194903.nc'], + 'old_cmor_tables_rewrite_harvardf_data': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/20c3m/day/atm/tas/r1i1p1/tas_A_20c3m_r1i1p1_19920101-19920110.nc'], + 'old_cmor_tables_test_3h': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/3hr/atm/hfls/r1i1p1/hfls_A3_pcmdi-08a_2xco2_r1i1p1_2030010101-2030010104.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/3hr/atm/pr/r1i1p1/pr_A3_pcmdi-08a_2xco2_r1i1p1_2030010101-2030010104.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/3hr/atm/tas/r1i1p1/tas_A3_pcmdi-08a_2xco2_r1i1p1_2030010101-2030010104.nc'], + 'old_cmor_tables_test_dimensionless': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/cl/r1i1p1/cl_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/hfls/r1i1p1/hfls_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/mrsos/r1i1p1/mrsos_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/ps/r1i1p1/ps_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/ta/r1i1p1/ta_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/tas/r1i1p1/tas_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/tro3/r1i1p1/tro3_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-a08/2xco2/mon/atm/ua/r1i1p1/ua_A1_pcmdi-a08_2xco2_r1i1p1_203001-203002.nc'], + 'old_cmor_tables_test_fortran_example_00': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/cl/r1i1p1/cl_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atmosphere/hfls/r1i1p1/hfls_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ps/r1i1p1/ps_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002_ftn-00.nc'], + 'old_cmor_tables_test_fortran_example_01': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atmosphere/hfls/r1i1p1/hfls_A1_pcmdi-08a_2xco2_r1i1p1_198001-198002_ftn-01.nc', ], + 'old_cmor_tables_test_fortran_example_02': ['Test/IPCC_Fourth_Assessment/output/INSTITUTE_ID/mon/REALM/hfls/r1i1p1/hfls_A1_r1i1p1_203001-203002_ftn-02.nc', + 'Test/IPCC_Fourth_Assessment/output/INSTITUTE_ID/mon/REALM/mrsos/r1i1p1/mrsos_A1_r1i1p1_203001-203002_ftn-02.nc', + 'Test/IPCC_Fourth_Assessment/output/INSTITUTE_ID/mon/REALM/ps/r1i1p1/ps_A1_r1i1p1_203001-203002_ftn-02.nc', + 'Test/IPCC_Fourth_Assessment/output/INSTITUTE_ID/mon/REALM/tas/r1i1p1/tas_A1_r1i1p1_203001-203002_ftn-02.nc', + ], + 'old_cmor_tables_test_station_data': [None], + 'old_cmor_tables_test_cmor_grid_alejandro': [None], + 'old_cmor_tables_test_sophie': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/fx/atmosphere/hfls/r0i0p0/hfls_A1_pcmdi-08a_r0i0p0.nc'], + 'old_cmor_tables_test_region': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfogo/r1i1p1/hfogo_O1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc'], + 'old_cmor_tables_test_sigma': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/cl/r1i1p1/cl_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/hfls/r1i1p1/hfls_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ps/r1i1p1/ps_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tro3/r1i1p1/tro3_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc'], + 'old_cmor_tables_test_singleton': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/cl/r1i1p1/cl_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atmosphere/hfls/r1i1p1/hfls_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/mrsos/r1i1p1/mrsos_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ps/r1i1p1/ps_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/tas/r1i1p1/tas_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc', + 'IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ua/r1i1p1/ua_A1_pcmdi-08a_2xco2_r1i1p1_203001-203002.nc'], + 'old_cmor_tables_mytest_4d_r_big_array': ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_194901-194903.nc'], + 'old_cmor_tables_mytest_4d_d_big_array_2': ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_194901-194903.nc'], + 'old_cmor_tables_mytest_4d_d_big_array_3': ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_194901-194903.nc'], + 'old_cmor_tables_mytest_4d_d_big_array_4': ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_194901-194903.nc'], + 'old_cmor_tables_mytest_4d_d_big_array_5': ['IPCC/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atm/ta/r1i1p1/ta_2_pcmdi-08a_2xco2_r1i1p1_194901-194903.nc'], + 'old_cmor_tables_test_lots_of_variables': lots, + 'old_cmor_tables_test_shrt_exp_nm_set_att_initi': ['IPCC_Fourth_Assessment/output/INSTITUTE_ID/pcmdi-08a/2xco2/mon/atmosphere/hfls0/r1i1p1/hfls0_A1_pcmdi-08a_2xco2_r1i1p1_197901-197902.nc'], +} diff --git a/Test/speed_test_table_A b/Test/speed_test_table_A index 96a30b61..dfe90134 100644 --- a/Test/speed_test_table_A +++ b/Test/speed_test_table_A @@ -9,8 +9,9 @@ "table_date": "24 February 2016", "realm": "atmos", "generic_levels": "alevel alevhalf", - "data_specs_version": "3.0", - "Conventions": "CF-1.8 CMIP-6.0" + "data_specs_version": "10.10.10", + "product": "model-output", + "Conventions": "CF-1.7 CMIP-6.0" }, "axis_entry": { "olayer100m": { diff --git a/Test/test_checker_works.py b/Test/test_checker_works.py index fcee7674..c00a06f9 100644 --- a/Test/test_checker_works.py +++ b/Test/test_checker_works.py @@ -14,935 +14,935 @@ fo = sys.stdout if fo != sys.stdout: - fo=open(fo,"w") - + fo = open(fo, "w") + # First of all run the Test script that generates the "good" file -#execfile("Test/test_python_joerg_3.py") +# execfile("Test/test_python_joerg_3.py") file = 'Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc' -cmor.checkCMOR(fo,file,"Tables/CMIP5_6hrLev") +cmor.checkCMOR(fo, file, "Tables/CMIP5_6hrLev") -## #Ok at this point we are going to test failures to make sure it actually checks for each things -## # Ok testing the DRS +# Ok at this point we are going to test failures to make sure it actually checks for each things +# Ok testing the DRS -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) -## print 'Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) +# print 'Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/huhs/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## try: -## os.makedirs(os.path.split(F)[0]) -## except: -## pass -## shutil.copy(file,F) -## print 'Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/huhs/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# try: +# os.makedirs(os.path.split(F)[0]) +# except: +# pass +# shutil.copy(file,F) +# print 'Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmfos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## try: -## os.makedirs(os.path.split(F)[0]) -## except: -## pass -## shutil.copy(file,F) -## print 'Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmfos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# try: +# os.makedirs(os.path.split(F)[0]) +# except: +# pass +# shutil.copy(file,F) +# print 'Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/16hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## try: -## os.makedirs(os.path.split(F)[0]) -## except: -## pass -## shutil.copy(file,F) -## print 'Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/16hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# try: +# os.makedirs(os.path.split(F)[0]) +# except: +# pass +# shutil.copy(file,F) +# print 'Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/noVolfdc2000/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## try: -## os.makedirs(os.path.split(F)[0]) -## except: -## pass -## shutil.copy(file,F) -## print 'Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/noVolfdc2000/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# try: +# os.makedirs(os.path.split(F)[0]) +# except: +# pass +# shutil.copy(file,F) +# print 'Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10b/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## try: -## os.makedirs(os.path.split(F)[0]) -## except: -## pass -## shutil.copy(file,F) -## print 'Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10b/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# try: +# os.makedirs(os.path.split(F)[0]) +# except: +# pass +# shutil.copy(file,F) +# print 'Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTEd_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## try: -## os.makedirs(os.path.split(F)[0]) -## except: -## pass -## shutil.copy(file,F) -## print 'Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="Test/CMIP5/output/INSTITUTEd_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# try: +# os.makedirs(os.path.split(F)[0]) +# except: +# pass +# shutil.copy(file,F) +# print 'Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## F="Test/CMIP5/outputt/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## try: -## os.makedirs(os.path.split(F)[0]) -## except: -## pass -## shutil.copy(file,F) -## print 'Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="Test/CMIP5/outputt/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# try: +# os.makedirs(os.path.split(F)[0]) +# except: +# pass +# shutil.copy(file,F) +# print 'Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## F="Test/CMIpP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## try: -## os.makedirs(os.path.split(F)[0]) -## except: -## pass -## shutil.copy(file,F) -## print 'Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="Test/CMIpP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# try: +# os.makedirs(os.path.split(F)[0]) +# except: +# pass +# shutil.copy(file,F) +# print 'Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## F="Test/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## try: -## os.makedirs(os.path.split(F)[0]) -## except: -## pass -## shutil.copy(file,F) -## print 'Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="Test/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# try: +# os.makedirs(os.path.split(F)[0]) +# except: +# pass +# shutil.copy(file,F) +# print 'Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## try: -## os.makedirs(os.path.split(F)[0]) -## except: -## pass -## shutil.copy(file,F) -## print 'Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# try: +# os.makedirs(os.path.split(F)[0]) +# except: +# pass +# shutil.copy(file,F) +# print 'Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## #The following should pass, DRS test turned off -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## try: -## os.makedirs(os.path.split(F)[0]) -## except: -## pass -## shutil.copy(file,F) -## print 'No Testing DRS' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) -## os.remove(F) +# The following should pass, DRS test turned off +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# try: +# os.makedirs(os.path.split(F)[0]) +# except: +# pass +# shutil.copy(file,F) +# print 'No Testing DRS' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_20f10010100-2010010218.nc" -## shutil.copy(file,F) -## print 'Testing DRS wrong date' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_20f10010100-2010010218.nc" +# shutil.copy(file,F) +# print 'Testing DRS wrong date' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_20100g10100-2010010218.nc" -## shutil.copy(file,F) -## print 'Testing DRS wrong date' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# os.remove(F) +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_20100g10100-2010010218.nc" +# shutil.copy(file,F) +# print 'Testing DRS wrong date' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010g100-2010010218.nc" -## shutil.copy(file,F) -## print 'Testing DRS wrong date' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# os.remove(F) +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010g100-2010010218.nc" +# shutil.copy(file,F) +# print 'Testing DRS wrong date' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_201001010g0-2010010218.nc" -## shutil.copy(file,F) -## print 'Testing DRS wrong date' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# os.remove(F) +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_201001010g0-2010010218.nc" +# shutil.copy(file,F) +# print 'Testing DRS wrong date' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2f01001041 8.nc" -## shutil.copy(file,F) -## print 'Testing DRS wrong date' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# shutil.copy(file,F) +# print 'Testing DRS wrong date' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010h010218.nc" -## shutil.copy(file,F) -## print 'Testing DRS wrong date' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# os.remove(F) +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010h010218.nc" +# shutil.copy(file,F) +# print 'Testing DRS wrong date' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010h418.nc" -## shutil.copy(file,F) -## print 'Testing DRS wrong date' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# os.remove(F) +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010h418.nc" +# shutil.copy(file,F) +# print 'Testing DRS wrong date' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-201001041g8.nc" -## shutil.copy(file,F) -## print 'Testing DRS wrong date' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") +# os.remove(F) +# try: +# F="Test/CMIP5/output/INSTITUTE_ID/pcmdi-10a/DcppC2/6hr/atmos/hus/r1i1p1/hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-201001041g8.nc" +# shutil.copy(file,F) +# print 'Testing DRS wrong date' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev") ## raise "DRS Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) -## f=cdms2.open(F,"a") -## h=f("hus") -## f.write(h,id='hur') -## f.close() -## print 'Testing many vars' -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# try: +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) +# f=cdms2.open(F,"a") +# h=f("hus") +# f.write(h,id='hur') +# f.close() +# print 'Testing many vars' +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise "Too man vars Check failed!" -## except cmor.check_CMOR_compliant.CMORError,err: -## print 'Failed with CMOR error as expected:',err -## pass -## except Exception,err: +# except cmor.check_CMOR_compliant.CMORError,err: +# print 'Failed with CMOR error as expected:',err +# pass +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) ## gbl = ['branch_time','contact','Conventions','creation_date','experiment','experiment_id','forcing','frequency','initialization_method','institute_id','institution','model_id','modeling_realm','parent_experiment_id','physics_version','product','project_id','realization','source','table_id','tracking_id'] -## for gatt in gbl: -## try: -## print 'Testing no %s global att' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# for gatt in gbl: +# try: +# print 'Testing no %s global att' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## f.close() -## fi.close() -## os.remove(F) +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"No global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("File must have global attribute: %s" % (gatt))>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("File must have global attribute: %s" % (gatt))>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) # test validity of Creation Time -## try: +# try: ## gatt = "creation_date" -## print 'Testing Validity of %s' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing Validity of %s' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## else: +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# else: ## f.write(l.strip()[:-3]+'blabla" ;\n') -## f.close() -## fi.close() -## os.remove(F) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) -## print 'Did we get here?' +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# print 'Did we get here?' ## raise Exception,"wrong global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("Creation Date must be in format: %Y-%m-%dT%H:%M:%SZ yours is")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("Creation Date must be in format: %Y-%m-%dT%H:%M:%SZ yours is")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## gatt = "branch_time" -## print 'Testing Validity of %s' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing Validity of %s' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## else: +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# else: ## f.write(l.strip()[:-4]+'"blabla" ;\n') -## f.close() -## fi.close() -## os.remove(F) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("branch_time must be convertible to float, you have")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("branch_time must be convertible to float, you have")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## gatt = "branch_time" -## print 'Testing Validity of %s' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing Validity of %s' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## else: +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# else: ## f.write(l.strip()[:-4]+'1. ;\n') -## f.close() -## fi.close() -## os.remove(F) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("if global attribute parent_experiment_id is N/A then branch_time must be 0., you have")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("if global attribute parent_experiment_id is N/A then branch_time must be 0., you have")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## gatt = "experiment_id" -## print 'Testing Validity of %s' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing Validity of %s' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## else: +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# else: ## f.write(l.strip()[:-3]+'x" ;\n') -## f.close() -## fi.close() -## os.remove(F) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("experiment_id file attribute must be one of")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("experiment_id file attribute must be one of")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## gatt = "experiment" -## print 'Testing Validity of %s' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing Validity of %s' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## else: +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# else: ## f.write(l.strip()[:-3]+'x" ;\n') -## f.close() -## fi.close() -## os.remove(F) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("experiment file attribute must be one of")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("experiment file attribute must be one of")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## gatt = "forcing" -## print 'Testing Validity of %s' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing Validity of %s' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## else: +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# else: ## f.write(l.strip()[:-3]+'x" ;\n') -## f.close() -## fi.close() -## os.remove(F) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("file attribute forcing must be a comma separated list with values in")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("file attribute forcing must be a comma separated list with values in")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## gatt = "frequency" -## print 'Testing Validity of %s' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing Validity of %s' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## else: +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# else: ## f.write(l.strip()[:-6]+'moyn" ;\n') -## f.close() -## fi.close() -## os.remove(F) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("frequency must be one")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("frequency must be one")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## gatt = "frequency" -## print 'Testing Validity of %s' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing Validity of %s' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## else: +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# else: ## f.write(l.strip()[:-6]+'mon" ;\n') -## f.close() -## fi.close() -## os.remove(F) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("your file name indicates a frequency of ")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("your file name indicates a frequency of ")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## gatt = "parent_experiment_id" -## print 'Testing Validity of %s' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing Validity of %s' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## else: +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# else: ## f.write(l.strip()[:-3]+'bla" ;\n') -## f.close() -## fi.close() -## os.remove(F) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("parent_experiment_id file attribute must be one of")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("parent_experiment_id file attribute must be one of")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## gatt = "parent_experiment_id" -## print 'Testing Validity of %s' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing Validity of %s' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## else: +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# else: ## f.write(l.strip()[:-6]+'DcppC2" ;\n') -## f.close() -## fi.close() -## os.remove(F) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("parent_experiment_id and experiment_id cannot be the same")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("parent_experiment_id and experiment_id cannot be the same")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## gatt = "project_id" -## print 'Testing Validity of %s' % (gatt) -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing Validity of %s' % (gatt) +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## fglb=False -## for l in fi.xreadlines(): -## if l.find("// global attributes")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# fglb=False +# for l in fi.xreadlines(): +# if l.find("// global attributes")>-1: ## fglb = True -## if fglb is False: -## f.write(l) -## elif l.find(":%s" % gatt)==-1: -## f.write(l) -## else: +# if fglb is False: +# f.write(l) +# elif l.find(":%s" % gatt)==-1: +# f.write(l) +# else: ## f.write(l.strip()[:-3]+'0" ;\n') -## f.close() -## fi.close() -## os.remove(F) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong global attribute %s test failed" % (gatt) -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("project_id must be ")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("project_id must be ")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of global attribute %s failed for the wrong reason! %s" % (gatt,err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## try: -## print 'Testing Validity of variable type' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# try: +# print 'Testing Validity of variable type' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for l in fi.xreadlines(): -## if l.find("float hus(time")>-1: -## f.write(l.replace("float","double")) +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for l in fi.xreadlines(): +# if l.find("float hus(time")>-1: +# f.write(l.replace("float","double")) ## fglb = True -## else: -## f.write(l) -## f.close() -## fi.close() -## os.remove(F) +# else: +# f.write(l) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong variable type test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("variable typecode must be ")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("variable typecode must be ")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing Validity of coordinate type' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing Validity of coordinate type' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for l in fi.xreadlines(): -## if l.find("double lon(")>-1: -## f.write(l.replace("double","float")) +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for l in fi.xreadlines(): +# if l.find("double lon(")>-1: +# f.write(l.replace("double","float")) ## fglb = True -## else: -## f.write(l) -## f.close() -## fi.close() -## os.remove(F) +# else: +# f.write(l) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong coord type test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("required typecode")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("required typecode")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing Validity of coordinate type' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing Validity of coordinate type' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for l in fi.xreadlines(): -## if l.find("double ap(")>-1: -## f.write(l.replace("double","float")) +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for l in fi.xreadlines(): +# if l.find("double ap(")>-1: +# f.write(l.replace("double","float")) ## fglb = True -## else: -## f.write(l) -## f.close() -## fi.close() -## os.remove(F) +# else: +# f.write(l) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong coord type test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("variable typecode")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("variable typecode")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing Validity of coordinate name' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing Validity of coordinate name' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for l in fi.xreadlines(): -## if l.find("lat")>-1: -## if l.find('"latitude"')>-1: -## f.write(l.replace("lat","latitude",1)) -## else: -## f.write(l.replace("lat","latitude")) -## else: -## f.write(l) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for l in fi.xreadlines(): +# if l.find("lat")>-1: +# if l.find('"latitude"')>-1: +# f.write(l.replace("lat","latitude",1)) +# else: +# f.write(l.replace("lat","latitude")) +# else: +# f.write(l) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong coord name test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("Axis name latitude is not valid")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("Axis name latitude is not valid")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing Validity of coordinate units' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing Validity of coordinate units' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for l in fi.xreadlines(): -## if l.find("lev:units")>-1: -## f.write(l.replace("1","%")) -## else: -## f.write(l) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for l in fi.xreadlines(): +# if l.find("lev:units")>-1: +# f.write(l.replace("1","%")) +# else: +# f.write(l) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong coord units test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find("are not the required units")>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find("are not the required units")>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: +# os.remove(F) +# try: ## import cdms2 -## print 'Testing Validity of time units' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) -## f=cdms2.open(F,"r+") -## t=f['hus'].getTime() +# print 'Testing Validity of time units' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) +# f=cdms2.open(F,"r+") +# t=f['hus'].getTime() ## t.toRelativeTime("seconds since 2010") -## f.close() -## f=open("Tables/CMIP5_6hrLev") -## fot=open("tmp_table.txt","w") -## for ln in f.xreadlines(): -## if ln.find("approx_in")>-1: -## fot.write(ln.replace("0.25","21600.")) -## else: -## fot.write(ln) -## fot.close() -## cmor.checkCMOR(fo,F,"tmp_table.txt",dodrs=False) -## os.remove("tmp_table.txt") +# f.close() +# f=open("Tables/CMIP5_6hrLev") +# fot=open("tmp_table.txt","w") +# for ln in f.xreadlines(): +# if ln.find("approx_in")>-1: +# fot.write(ln.replace("0.25","21600.")) +# else: +# fot.write(ln) +# fot.close() +# cmor.checkCMOR(fo,F,"tmp_table.txt",dodrs=False) +# os.remove("tmp_table.txt") ## raise Exception,"wrong time units test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('Time units must be in "days since')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('Time units must be in "days since')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## data = """time_bnds = +# data = """time_bnds = ## -0.125, 0.125, ## 0.125, 0.375, ## 0.375, 0.625, @@ -950,8 +950,8 @@ ## 0.875, 1.125, ## 1.125, 1.375, ## 1.375, 1.625, -## 1.625, 1.875 ;""" -## data2 = """time_bnds = +# 1.625, 1.875 ;""" +# data2 = """time_bnds = ## -0.1251, 0.1251, ## 0.1251, 0.3751, ## 0.3751, 0.6251, @@ -959,35 +959,35 @@ ## 0.8751, 1.1251, ## 1.1251, 1.3751, ## 1.3751, 1.6251, -## 1.6251, 1.8751 ;""" -## try: +# 1.6251, 1.8751 ;""" +# try: ## import cdms2 -## print 'Testing time is mean of bounds' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing time is mean of bounds' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## f.write(fi.read().replace(data,data2)) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# f.write(fi.read().replace(data,data2)) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"time is avg of bounds test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('Time units must be in "days since')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('Time units must be in "days since')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## data = """ time_bnds = +# data = """ time_bnds = ## -0.125, 0.125, ## 0.125, 0.375, ## 0.375, 0.625, @@ -995,45 +995,45 @@ ## 0.875, 1.125, ## 1.125, 1.375, ## 1.375, 1.625, -## 1.625, 1.875 ;""" -## try: +# 1.625, 1.875 ;""" +# try: ## import cdms2 -## print 'Testing lack of bounds' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing lack of bounds' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## s=fi.read() -## fi.close() -## fi=open("crap.txt",'w') -## fi.write(s.replace(data,"")) -## fi.close() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("time:bounds")>-1: -## continue -## if ln.find("double time_bnds")>-1: -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# s=fi.read() +# fi.close() +# fi=open("crap.txt",'w') +# fi.write(s.replace(data,"")) +# fi.close() +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("time:bounds")>-1: +# continue +# if ln.find("double time_bnds")>-1: +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"lack of bounds test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('attribute bounds is required for axis')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('attribute bounds is required for axis')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## data = """ time_bnds = +# os.remove(F) +# data = """ time_bnds = ## -0.125, 0.125, ## 0.125, 0.375, ## 0.375, 0.625, @@ -1041,705 +1041,705 @@ ## 0.875, 1.125, ## 1.125, 1.375, ## 1.375, 1.625, -## 1.625, 1.875 ;""" -## try: +# 1.625, 1.875 ;""" +# try: ## import cdms2 -## print 'Testing lack of bounds' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing lack of bounds' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## s=fi.read() -## fi.close() -## fi=open("crap.txt",'w') -## fi.write(s.replace(data,"")) -## fi.close() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("time:bounds")>-1: -## continue -## if ln.find("double time_bnds")>-1: -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# s=fi.read() +# fi.close() +# fi=open("crap.txt",'w') +# fi.write(s.replace(data,"")) +# fi.close() +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("time:bounds")>-1: +# continue +# if ln.find("double time_bnds")>-1: +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"lack of bounds test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('attribute bounds is required for axis')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('attribute bounds is required for axis')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) ## data="""double ap(lev) ;""" -## n=567 -## data=data[:15] -## data2=""" ap = 0.1, 0.2, 0.3, 0.22, 0.1 ; +# n=567 +# data=data[:15] +# data2=""" ap = 0.1, 0.2, 0.3, 0.22, 0.1 ; ## b = 0, 0.1, 0.2, 0.5, 0.8 ; -## ps =""" +# ps =""" -## data3=""" ap_bnds = +# data3=""" ap_bnds = ## 0, 0.15, ## 0.15, 0.25, ## 0.25, 0.25, ## 0.25, 0.16, ## 0.16, 0 ; -## b_bnds = +# b_bnds = ## 0, 0.05, ## 0.05, 0.15, ## 0.15, 0.35, ## 0.35, 0.65, ## 0.65, 1 ; -## """ -## try: +# """ +# try: ## import cdms2 -## print 'Testing lack of formulaterms' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# print 'Testing lack of formulaterms' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## s=fi.read() -## fi.close() -## print 'orig:',len(s) -## i=s.find(data) -## print 'i,n:',i,n -## s=s[:i]+s[i+n:] -## s=s.replace(data2,"") -## s=s.replace(data3,"") -## print 'end:',len(s) -## fi=open("crap.txt",'w') -## fi.write(s) -## fi.close() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("formula")>-1: -## continue -## if ln.find("1013")>-1: -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# s=fi.read() +# fi.close() +# print 'orig:',len(s) +# i=s.find(data) +# print 'i,n:',i,n +# s=s[:i]+s[i+n:] +# s=s.replace(data2,"") +# s=s.replace(data3,"") +# print 'end:',len(s) +# fi=open("crap.txt",'w') +# fi.write(s) +# fi.close() +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("formula")>-1: +# continue +# if ln.find("1013")>-1: +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"lack of formula_terms test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('attribute formula_terms is required for axis')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('attribute formula_terms is required for axis')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing wrong names on zfactors axis for hybrid' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing wrong names on zfactors axis for hybrid' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("ap")>-1: -## tmp=ln.replace("ap","ap2") +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("ap")>-1: +# tmp=ln.replace("ap","ap2") ## if tmp.find("formula_term")>-1: tmp=tmp.replace("ap2:","ap:") -## tmp=tmp.replace("ap2_bnds","ap_bnds") -## f.write(tmp) -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# tmp=tmp.replace("ap2_bnds","ap_bnds") +# f.write(tmp) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"lack of formula_terms test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('formula should be')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('formula should be')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing wrong names on stabdard_name axis for hybrid' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing wrong names on stabdard_name axis for hybrid' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## ln=ln.replace("atmosphere_hybrid_sigma_pressure_coordinate","atmosphere_ln_pressure_coordinate") -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# ln=ln.replace("atmosphere_hybrid_sigma_pressure_coordinate","atmosphere_ln_pressure_coordinate") +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"lack of formula_terms test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('axis attribute formula should be')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('axis attribute formula should be')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: +## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) +# except Exception,err: +## raise Exception,err +# os.remove(F) +# for anm in ['lon','lat','lev','time']: +# try: +# print 'Testing axis attribute' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) +## os.popen("ncdump %s > crap.txt"%F).readlines() +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("%s:axis"%anm)>-1: +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) +## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +## raise Exception,"no axis attribute test failed" +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('axis must have associated axis attribute')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## for anm in ['lon','lat','lev','time']: - ## try: - ## print 'Testing axis attribute' - ## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" - ## shutil.copy(file,F) - ## os.popen("ncdump %s > crap.txt"%F).readlines() - ## fi=open("crap.txt") - ## f=open("crapo.txt","w") - ## for ln in fi.xreadlines(): - ## if ln.find("%s:axis"%anm)>-1: - ## continue - ## f.write(ln) - ## f.close() - ## fi.close() - ## os.remove(F) - ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() - ## os.remove("crap.txt") - ## os.remove("crapo.txt") - ## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) - ## raise Exception,"no axis attribute test failed" - ## except cmor.check_CMOR_compliant.CMORError,err: - ## if str(err).find('axis must have associated axis attribute')>-1: - ## print 'Failed with CMOR error as expected:',err - ## pass - ## else: - ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) - ## except Exception,err: - ## raise Exception,err - ## os.remove(F) -## try: -## print 'Testing calendar attribute' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing calendar attribute' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("time:calendar")>-1: -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("time:calendar")>-1: +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"no calendar attribute test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('calendar attribute must be defined')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('calendar attribute must be defined')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing wrong calendar attribute' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing wrong calendar attribute' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("time:calendar")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("time:calendar")>-1: ## f.write('time:calendar = "mayan" ;') -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"no calendar attribute test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('calendar must be one of')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('calendar must be one of')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing wrong variable datatype' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing wrong variable datatype' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("float hus")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("float hus")>-1: ## f.write(ln.replace("float hus","double hus")) -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong var typecode test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('variable typecode must be')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('variable typecode must be')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing wrong variable name' -## F="HUS_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing wrong variable name' +# F="HUS_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("hus")>-1: -## f.write(ln.replace("hus","HUS")) -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("hus")>-1: +# f.write(ln.replace("hus","HUS")) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong var name test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('does not start with standard CMIP5 variable name ')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('does not start with standard CMIP5 variable name ')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing wrong variable name' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing wrong variable name' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("hus")>-1: -## f.write(ln.replace("hus","tas")) -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("hus")>-1: +# f.write(ln.replace("hus","tas")) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong var name test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('Your file name says it contains variable')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('Your file name says it contains variable')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing wrong variable units' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing wrong variable units' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("hus:units")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("hus:units")>-1: ## f.write(' hus:units = "%" ;\n') -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong var name test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('do not match IPCC units')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('do not match IPCC units')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing wrong dim ordering' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing wrong dim ordering' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("float hus(time, lev, lat, lon)")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("float hus(time, lev, lat, lon)")>-1: ## f.write(ln.replace("lat, lon","lon, lat")) -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong var ordering test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('in ordering for dimension')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('in ordering for dimension')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) -## data = """ lon = 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, -## 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, -## 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, -## 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, -## 250, 254, 258, 262, 266, 270, 274, 278, 282, 286, 290, 294, 298, 302, -## 306, 310, 314, 318, 322, 326, 330, 334, 338, 342, 346, 350, 354, 358 ;""" +# data = """ lon = 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, +## 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, +## 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, +## 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234, 238, 242, 246, +## 250, 254, 258, 262, 266, 270, 274, 278, 282, 286, 290, 294, 298, 302, +# 306, 310, 314, 318, 322, 326, 330, 334, 338, 342, 346, 350, 354, 358 ;""" ## datanew = """ lon = """+"""358, 354, 350, 346, 342, 338, 334, 330, 326, 322, 318, 314, 310, 306, 302, 298, 294, 290, 286, 282, 278, 274, 270, 266, 262, 258, 254, 250, 246, 242, 238, 234, 230, 226, 222, 218, 214, 210, 206, 202, 198, 194, 190, 186, 182, 178, 174, 170, 166, 162, 158, 154, 150, 146, 142, 138, 134, 130, 126, 122, 118, 114, 110, 106, 102, 98, 94, 90, 86, 82, 78, 74, 70, 66, 62, 58, 54, 50, 46, 42, 38, 34, 30, 26, 22, 18, 14, 10, 6, 2 ;""" -## try: -## print 'Testing wrong dim ordering' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# try: +# print 'Testing wrong dim ordering' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## s=fi.read() -## fi.close() -## fi=open("crap.txt","w") -## fi.write(s.replace(data,datanew)) -## fi.close() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# s=fi.read() +# fi.close() +# fi=open("crap.txt","w") +# fi.write(s.replace(data,datanew)) +# fi.close() +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong var ordering test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('axis values for lon must be stored:increasingly')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('axis values for lon must be stored:increasingly')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing wrong dim ordering' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing wrong dim ordering' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("lon = 2, 6, 10"): +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("lon = 2, 6, 10"): ## f.write(ln.replace("lon = 2, 6, 10","lon = -2, 6, 10")) -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong var ordering test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('first longitude must be >= 0 degrees_east')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('first longitude must be >= 0 degrees_east')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## data = """ lat = -88, -84, -80, -76, -72, -68, -64, -60, -56, -52, -48, -44, -40, -36, -## -32, -28, -24, -20, -16, -12, -8, -4, 0, 4, 8, 12, 16, 20, 24, 28, 32, -## 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88 ;""" -## datanew = """ lat = """+"""88, 84, 80, 76, 72, 68, 64, 60, 56, 52, 48, 44, 40, 36, -## 32, 28, 24, 20, 16, 12, 8, 4, 0, -4, -8, -12, -16, -20, -24, -28, -32, -## -36, -40, -44, -48, -52, -56, -60, -64, -68, -72, -76, -80, -84, -88 ;""" -## try: -## print 'Testing wrong dim ordering' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# data = """ lat = -88, -84, -80, -76, -72, -68, -64, -60, -56, -52, -48, -44, -40, -36, +## -32, -28, -24, -20, -16, -12, -8, -4, 0, 4, 8, 12, 16, 20, 24, 28, 32, +# 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88 ;""" +# datanew = """ lat = """+"""88, 84, 80, 76, 72, 68, 64, 60, 56, 52, 48, 44, 40, 36, +## 32, 28, 24, 20, 16, 12, 8, 4, 0, -4, -8, -12, -16, -20, -24, -28, -32, +# -36, -40, -44, -48, -52, -56, -60, -64, -68, -72, -76, -80, -84, -88 ;""" +# try: +# print 'Testing wrong dim ordering' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## s=fi.read() -## fi.close() -## fi=open("crap.txt","w") -## fi.write(s.replace(data,datanew)) -## fi.close() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# s=fi.read() +# fi.close() +# fi=open("crap.txt","w") +# fi.write(s.replace(data,datanew)) +# fi.close() +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong var ordering test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('axis values for lat must be stored:increasingly')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('axis values for lat must be stored:increasingly')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) ## data = """ time = 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75 ;""" ## datanew = """ time = 0, -0.25, -0.5, -0.75, -1, -1.25, -1.5, -1.75 ;""" -## try: -## print 'Testing wrong dim ordering' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2009123018.nc" -## shutil.copy(file,F) +# try: +# print 'Testing wrong dim ordering' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2009123018.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## s=fi.read() -## fi.close() -## fi=open("crap.txt","w") -## fi.write(s.replace(data,datanew)) -## fi.close() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# s=fi.read() +# fi.close() +# fi=open("crap.txt","w") +# fi.write(s.replace(data,datanew)) +# fi.close() +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong var ordering test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('axis values for time must be stored:increasingly')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('axis values for time must be stored:increasingly')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing fill and miss values different ordering' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing fill and miss values different ordering' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("hus:mis")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("hus:mis")>-1: ## f.write(" hus:missing_value = 1.e+30f ;\n") -## continue -## elif ln.find("hus:_F")>-1: +# continue +# elif ln.find("hus:_F")>-1: ## f.write(" hus:_FillValue = 1.e+20f ;\n") -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong var ordering test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('missing_value and _FillValue attributes are different')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('missing_value and _FillValue attributes are different')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing fill and miss values different ordering' -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing fill and miss values different ordering' +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("hus:mis")>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("hus:mis")>-1: ## f.write(" hus:missing_value = 1.e+30f ;\n") -## continue -## elif ln.find("hus:_F")>-1: +# continue +# elif ln.find("hus:_F")>-1: ## f.write(" hus:_FillValue = 1.e+30f ;\n") -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"wrong var ordering test failed" -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('missing_value and _FillValue must be set to 1.e20f')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('missing_value and _FillValue must be set to 1.e20f')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## for att in ['associated_files','cell_measures','long_name','standard_name','units']: -## try: -## print 'Testing required var att %s' % att -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# for att in ['associated_files','cell_measures','long_name','standard_name','units']: +# try: +# print 'Testing required var att %s' % att +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("hus:%s"%att)>-1: -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("hus:%s"%att)>-1: +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"missing var att %s test failed" % att -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('Attribute %s is required but not set for var hus' % att)>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('Attribute %s is required but not set for var hus' % att)>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) +# os.remove(F) ## att = 'associated_files' -## try: -## print 'Testing wrong var att %s' % att -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# try: +# print 'Testing wrong var att %s' % att +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("hus:%s"%att)>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("hus:%s"%att)>-1: ## f.write(' hus:%s = "blabla" ; \n' % att) -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"missing var att %s test failed" % att -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('associated_files attributes must contain a baseURL')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('associated_files attributes must contain a baseURL')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -## try: -## print 'Testing wrong var att %s' % att -## F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" -## shutil.copy(file,F) +# os.remove(F) +# try: +# print 'Testing wrong var att %s' % att +# F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" +# shutil.copy(file,F) ## os.popen("ncdump %s > crap.txt"%F).readlines() -## fi=open("crap.txt") -## f=open("crapo.txt","w") -## for ln in fi.xreadlines(): -## if ln.find("hus:%s"%att)>-1: +# fi=open("crap.txt") +# f=open("crapo.txt","w") +# for ln in fi.xreadlines(): +# if ln.find("hus:%s"%att)>-1: ## f.write(' hus:associated_files = "baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile: gridspec_fx_pcmdi-10a_DcppC2_r0i0p0.nc cellAreaFile: areacellla_fx_pcmdi-10a_DcppC2_r0i0p0.nc" ;') -## continue -## f.write(ln) -## f.close() -## fi.close() -## os.remove(F) +# continue +# f.write(ln) +# f.close() +# fi.close() +# os.remove(F) ## os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() -## os.remove("crap.txt") -## os.remove("crapo.txt") -## cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) +# os.remove("crap.txt") +# os.remove("crapo.txt") +# cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) ## raise Exception,"missing var att %s test failed" % att -## except cmor.check_CMOR_compliant.CMORError,err: -## if str(err).find('associated files should point to file containing: areacella')>-1: -## print 'Failed with CMOR error as expected:',err -## pass -## else: +# except cmor.check_CMOR_compliant.CMORError,err: +# if str(err).find('associated files should point to file containing: areacella')>-1: +# print 'Failed with CMOR error as expected:',err +# pass +# else: ## raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -## except Exception,err: +# except Exception,err: ## raise Exception,err -## os.remove(F) -att="cell_measures" +# os.remove(F) +att = "cell_measures" try: print 'Testing wrong var att %s' % att - F="hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" - shutil.copy(file,F) - os.popen("ncdump %s > crap.txt"%F).readlines() - fi=open("crap.txt") - f=open("crapo.txt","w") - for ln in fi.xreadlines(): - if ln.find("hus:%s"%att)>-1: + F = "hus_6hrLev_pcmdi-10a_DcppC2_r1i1p1_2010010100-2010010218.nc" + shutil.copy(file, F) + os.popen("ncdump %s > crap.txt" % F).readlines() + fi = open("crap.txt") + f = open("crapo.txt", "w") + for ln in fi: + if ln.find("hus:%s" % att) > -1: f.write(' hus:%s = "area: cl" ;' % att) continue f.write(ln) @@ -1749,19 +1749,16 @@ os.popen("ncgen -b -o %s crapo.txt" % (F)).readlines() os.remove("crap.txt") os.remove("crapo.txt") - cmor.checkCMOR(fo,F,"Tables/CMIP5_6hrLev",dodrs=False) - raise Exception,"missing var att %s test failed" % att -except cmor.check_CMOR_compliant.CMORError,err: - if str(err).find('variable attribute cell_measures should be')>-1: - print 'Failed with CMOR error as expected:',err + cmor.checkCMOR(fo, F, "Tables/CMIP5_6hrLev", dodrs=False) + raise Exception("missing var att %s test failed" % att) +except cmor.check_CMOR_compliant.CMORError as err: + if str(err).find('variable attribute cell_measures should be') > -1: + print 'Failed with CMOR error as expected:', err pass else: - raise Exception,"Checker of variable type failed for the wrong reason! %s" % (err) -except Exception,err: - raise Exception,err + raise Exception( + "Checker of variable type failed for the wrong reason! %s" % + (err)) +except Exception as err: + raise Exception(err) os.remove(F) - - - - - diff --git a/Test/test_chunking.py b/Test/test_chunking.py index 42fabe06..6e274633 100644 --- a/Test/test_chunking.py +++ b/Test/test_chunking.py @@ -1,4 +1,7 @@ -import cmor,numpy,sys,os +import cmor +import numpy +import sys +import os from time import localtime, strftime today = strftime("%Y%m%d", localtime()) @@ -7,12 +10,16 @@ cdms2.setNetcdfShuffleFlag(0) cdms2.setNetcdfDeflateFlag(0) cdms2.setNetcdfDeflateLevelFlag(0) -except: +except BaseException: print "This test code needs a recent cdms2 interface for i/0" sys.exit() -cmor.setup(inpath="Tables",set_verbosity=cmor.CMOR_NORMAL, netcdf_file_action = cmor.CMOR_REPLACE_4, exit_control = cmor.CMOR_EXIT_ON_MAJOR); +cmor.setup( + inpath="Tables", + set_verbosity=cmor.CMOR_NORMAL, + netcdf_file_action=cmor.CMOR_REPLACE_4, + exit_control=cmor.CMOR_EXIT_ON_MAJOR) cmor.dataset_json("Test/common_user_input.json") tables = [] @@ -20,9 +27,9 @@ print 'Tables ids:', tables -## read in data, just one slice -f=cdms2.open('data/tas_ccsr-95a.xml') -s=f("tas",time=slice(0,12),squeeze=1) +# read in data, just one slice +f = cdms2.open('data/tas_ccsr-95a.xml') +s = f("tas", time=slice(0, 12), squeeze=1) ntimes = 12 varout = 'tas' @@ -51,9 +58,7 @@ ) -cmor.write(myvars[0],s.filled(),ntimes_passed=ntimes) +cmor.write(myvars[0], s.filled(), ntimes_passed=ntimes) cmor.close() #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] - - diff --git a/Test/test_compression.py b/Test/test_compression.py index 41561c10..fddaefc3 100644 --- a/Test/test_compression.py +++ b/Test/test_compression.py @@ -1,56 +1,67 @@ -import sys,os +import sys +import os try: import cdms2 -except: +except BaseException: print 'This test requires cdms2 for I/O' sys.exit() - -import cmor,numpy -f=cdms2.open(os.path.join('data/clt.nc')) +import cmor +import numpy + +f = cdms2.open(os.path.join('data/clt.nc')) pth = os.path.split(os.path.realpath(os.curdir)) -if pth[-1]=='Test': +if pth[-1] == 'Test': ipth = opth = '.' else: ipth = opth = 'Test' cmor.setup(inpath=ipth, set_verbosity=cmor.CMOR_NORMAL, - netcdf_file_action = cmor.CMOR_REPLACE) + netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") cmor.load_table("Tables/CMIP6_Amon.json") -s=f("clt",slice(14)) +s = f("clt", slice(14)) Saxes = s.getAxisList() -axes=[] +axes = [] for ax in Saxes[1:]: - tmp = cmor.axis(ax.id,coord_vals=ax[:],cell_bounds=ax.getBounds(),units=ax.units) + tmp = cmor.axis( + ax.id, + coord_vals=ax[:], + cell_bounds=ax.getBounds(), + units=ax.units) axes.append(tmp) -#Now creates a dummy HUGE axis for resizing s as really big +# Now creates a dummy HUGE axis for resizing s as really big factor = 100 -nt = s.shape[0]*factor -print 'nt is:',nt +nt = s.shape[0] * factor +print 'nt is:', nt t = numpy.arange(nt) -tmp = cmor.axis('time',coord_vals=t,units=Saxes[0].units,cell_bounds=numpy.arange(nt+1)) -axes.insert(0,tmp) +tmp = cmor.axis( + 'time', + coord_vals=t, + units=Saxes[0].units, + cell_bounds=numpy.arange( + nt + 1)) +axes.insert(0, tmp) print axes -var_id1 = cmor.variable(s.id,s.units,axes) -## the one with 2 at the end is compressed -var_id2 = cmor.variable(s.id,s.units,axes) -sh=list(s.shape) -sh[0]=nt -s=numpy.resize(s,sh) -#s=numpy.where(numpy.greater(s,100.),100,s) -s=numpy.random.random(s.shape)*10000. +var_id1 = cmor.variable(s.id, s.units, axes) +# the one with 2 at the end is compressed +var_id2 = cmor.variable(s.id, s.units, axes) +sh = list(s.shape) +sh[0] = nt +s = numpy.resize(s, sh) +# s=numpy.where(numpy.greater(s,100.),100,s) +s = numpy.random.random(s.shape) * 10000. print s.shape -cmor.write(var_id1,s) +cmor.write(var_id1, s) cmor.close(var_id1) -cmor.write(var_id2,s) +cmor.write(var_id2, s) cmor.close() diff --git a/Test/test_doc.py b/Test/test_doc.py index 2dd20aaf..8c24564d 100644 --- a/Test/test_doc.py +++ b/Test/test_doc.py @@ -1,31 +1,29 @@ import cmor -cmor.setup(inpath='Tables',netcdf_file_action=cmor.CMOR_REPLACE_4) +cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE_4) cmor.dataset_json("Test/common_user_input.json") - -table='CMIP6_Amon.json' + +table = 'CMIP6_Amon.json' cmor.load_table(table) -itime = cmor.axis(table_entry= 'time', - units= 'days since 2000-01-01 00:00:00', - coord_vals= [15,], - cell_bounds= [0, 30]) -ilat = cmor.axis(table_entry= 'latitude', - units= 'degrees_north', - coord_vals= [0], - cell_bounds= [-1, 1]) -ilon = cmor.axis(table_entry= 'longitude', - units= 'degrees_east', - coord_vals= [90], - cell_bounds= [89, 91]) +itime = cmor.axis(table_entry='time', + units='days since 2000-01-01 00:00:00', + coord_vals=[15, ], + cell_bounds=[0, 30]) +ilat = cmor.axis(table_entry='latitude', + units='degrees_north', + coord_vals=[0], + cell_bounds=[-1, 1]) +ilon = cmor.axis(table_entry='longitude', + units='degrees_east', + coord_vals=[90], + cell_bounds=[89, 91]) + +axis_ids = [itime, ilat, ilon] -axis_ids = [itime,ilat,ilon] - varid = cmor.variable('ts', 'K', axis_ids) cmor.write(varid, [273]) -outfile=cmor.close(varid, file_name=True) -print "File written: ",outfile +outfile = cmor.close(varid, file_name=True) +print "File written: ", outfile cmor.close() - - diff --git a/Test/test_grid_stub_jamie.py b/Test/test_grid_stub_jamie.py index 76bbff45..0b330673 100644 --- a/Test/test_grid_stub_jamie.py +++ b/Test/test_grid_stub_jamie.py @@ -4,23 +4,24 @@ import unittest from cmor import grid -import _cmor_stub #this should be a stub cmor implementation +import _cmor_stub # this should be a stub cmor implementation + class TestGrid(unittest.TestCase): - + def test_pass_only_axis_ids(self): - for axis_ids in ([1,2], numpy.array([1,2])): + for axis_ids in ([1, 2], numpy.array([1, 2])): args = grid(axis_ids) self.assert_on_axis_id_args(axis_ids, args) self.assert_on_default_coordinates(args) self.assert_on_default_vertices(args) - + def test_lat_lon_grid(self): axis_ids = [1, 2] for atype in (numpy.array, list, tuple): - lats = atype(numpy.arange(2*3).reshape(2,3) + 0.1) - lons = atype(numpy.arange(2*3).reshape(2,3) - 0.1) - args = grid(axis_ids, latitude = lats, longitude = lons) + lats = atype(numpy.arange(2 * 3).reshape(2, 3) + 0.1) + lons = atype(numpy.arange(2 * 3).reshape(2, 3) - 0.1) + args = grid(axis_ids, latitude=lats, longitude=lons) self.assert_on_axis_id_args(axis_ids, args) self.assert_on_coordiantes(lats, lons, args) self.assert_on_default_vertices(args) @@ -29,15 +30,31 @@ def test_lat_lon_with_vertices(self): axis_ids = [1, 2] nvert = 4 for atype in (numpy.array, list, tuple): - lats = atype(numpy.arange(2*3).reshape(2,3) + 0.1) - lons = atype(numpy.arange(2*3).reshape(2,3) - 0.1) - lat_vert = atype(numpy.arange(2*3*nvert).reshape(2,3,nvert) + 0.5) - lon_vert = atype(numpy.arange(2*3*nvert).reshape(2,3,nvert) - 0.5) + lats = atype(numpy.arange(2 * 3).reshape(2, 3) + 0.1) + lons = atype(numpy.arange(2 * 3).reshape(2, 3) - 0.1) + lat_vert = atype( + numpy.arange( + 2 * + 3 * + nvert).reshape( + 2, + 3, + nvert) + + 0.5) + lon_vert = atype( + numpy.arange( + 2 * + 3 * + nvert).reshape( + 2, + 3, + nvert) - + 0.5) args = grid(axis_ids, - latitude = lats, - longitude = lons, - latitude_vertices = lat_vert, - longitude_vertices = lon_vert) + latitude=lats, + longitude=lons, + latitude_vertices=lat_vert, + longitude_vertices=lon_vert) self.assert_on_axis_id_args(axis_ids, args) self.assert_on_coordiantes(lats, lons, args) self.assert_on_vertices(nvert, lat_vert, lon_vert, args) @@ -55,110 +72,120 @@ def assert_on_vertices(self, nvert, lat_vert, lon_vert, args): self.assertEquals(nvert, args[5]) self.assertTrue((lat_vert == args[6]).all()) self.assertTrue((lon_vert == args[7]).all()) - + def assert_on_default_coordinates(self, args): self.assertEquals('f', args[2]) self.assertEquals(None, args[3]) self.assertEquals(None, args[4]) - + def assert_on_default_vertices(self, args): self.assertEquals(0, args[5]) self.assertEquals(None, args[6]) self.assertEquals(None, args[7]) + class TestGridCallErrors(unittest.TestCase): def test_error_rank_axis_ids(self): try: grid([[1], [2]]) self.fail('should raise exception') - except Exception, e: + except Exception as e: self.assertEquals('error axes list/array must be 1D', str(e)) - + def test_error_on_axis_ids(self): - bad_axis_ids = ( 0, 'astring') + bad_axis_ids = (0, 'astring') for axis_ids in bad_axis_ids: try: grid(axis_ids) self.fail('should raise exception') - except Exception, e: + except Exception as e: self.assertEquals('Error could not convert axis_ids list to a numpy array', str(e)) def test_error_latitude_no_longitude(self): try: - grid([0], latitude = numpy.arange(2)) + grid([0], latitude=numpy.arange(2)) self.fail('should raise exception') - except Exception, e: - self.assertEquals("Error could not convert longitude to a numpy array", str(e)) + except Exception as e: + self.assertEquals( + "Error could not convert longitude to a numpy array", str(e)) def test_error_longitude_no_latitude(self): try: - grid([0], longitude = numpy.arange(2)) + grid([0], longitude=numpy.arange(2)) self.fail('should raise exception') - except Exception, e: - self.assertEquals("latitude and longitude must be BOTH an array or None", str(e)) + except Exception as e: + self.assertEquals( + "latitude and longitude must be BOTH an array or None", str(e)) def test_error_type_lats(self): - lons = numpy.arange(2*3).reshape(2,3) + lons = numpy.arange(2 * 3).reshape(2, 3) for lats in (0, 0.1, 'string', {}): try: - grid([0, 11], latitude = lats, longitude = lons) + grid([0, 11], latitude=lats, longitude=lons) self.fail('should raise exception') - except Exception, e: - self.assertEquals('Error could not convert latitude to a numpy array', str(e)) + except Exception as e: + self.assertEquals( + 'Error could not convert latitude to a numpy array', str(e)) + def test_error_type_lons(self): - lats = numpy.arange(2*3).reshape(2,3) + lats = numpy.arange(2 * 3).reshape(2, 3) for lons in (0, 0.1, 'string', {}): try: - grid([0, 1], latitude = lats, longitude = lons) + grid([0, 1], latitude=lats, longitude=lons) self.fail('should raise exception') - except Exception, e: - self.assertEquals('Error could not convert longitude to a numpy array', str(e)) + except Exception as e: + self.assertEquals( + 'Error could not convert longitude to a numpy array', str(e)) + def test_error_rank_lons(self): axis_ids = [1, 2] - lats = numpy.arange(2*3).reshape(2,3) + lats = numpy.arange(2 * 3).reshape(2, 3) lons = numpy.arange(3) try: - grid(axis_ids, latitude = lats, longitude = lons) + grid(axis_ids, latitude=lats, longitude=lons) self.fail('should raise exception') - except Exception, e: - self.assertEquals("longitude's rank does not match number of axes passed via axis_ids", str(e)) + except Exception as e: + self.assertEquals( + "longitude's rank does not match number of axes passed via axis_ids", str(e)) def test_error_rank_lats(self): axis_ids = [1, 2] lats = numpy.arange(2) - lons = numpy.arange(2*3).reshape(2,3) + lons = numpy.arange(2 * 3).reshape(2, 3) try: - grid(axis_ids, latitude = lats, longitude = lons) + grid(axis_ids, latitude=lats, longitude=lons) self.fail('should raise exception') - except Exception, e: - self.assertEquals("latitude's rank does not match number of axes passed via axis_ids", str(e)) + except Exception as e: + self.assertEquals( + "latitude's rank does not match number of axes passed via axis_ids", str(e)) - def test_error_rank_lat_verts(self): # this test may be fragile? + def test_error_rank_lat_verts(self): # this test may be fragile? axis_ids = [1, 2] - lats = numpy.arange(2*3).reshape(2,3) - lons = numpy.arange(2*3).reshape(2,3) + lats = numpy.arange(2 * 3).reshape(2, 3) + lons = numpy.arange(2 * 3).reshape(2, 3) lat_verts = lats try: - grid(axis_ids, latitude = lats, longitude = lons, - latitude_vertices = lat_verts) + grid(axis_ids, latitude=lats, longitude=lons, + latitude_vertices=lat_verts) self.fail('should raise exception') - except Exception, e: + except Exception as e: self.assertEquals("latitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)", - str(e)) + str(e)) - def test_error_rank_lon_verts(self): # this test may be fragile? + def test_error_rank_lon_verts(self): # this test may be fragile? axis_ids = [1, 2] - lats = numpy.arange(2*3).reshape(2,3) - lons = numpy.arange(2*3).reshape(2,3) + lats = numpy.arange(2 * 3).reshape(2, 3) + lons = numpy.arange(2 * 3).reshape(2, 3) lon_verts = lons try: - grid(axis_ids, latitude = lats, longitude = lons, - longitude_vertices = lon_verts) + grid(axis_ids, latitude=lats, longitude=lons, + longitude_vertices=lon_verts) self.fail('should raise exception') - except Exception, e: + except Exception as e: self.assertEquals("longitude_vertices's rank does not match number of axes passed via axis_ids +1 (for vertices)", - str(e)) - + str(e)) + + if __name__ == '__main__': unittest.main() diff --git a/Test/test_lon_gt_360.py b/Test/test_lon_gt_360.py index e98b535a..4fe9d566 100644 --- a/Test/test_lon_gt_360.py +++ b/Test/test_lon_gt_360.py @@ -1,54 +1,59 @@ import cmor import numpy + def cmor_initialisation(): cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3, - create_subdirectories = 0) + netcdf_file_action=cmor.CMOR_REPLACE_3, + create_subdirectories=0) cmor.dataset_json("Test/common_user_input.json") + def setup_data(): - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00' - }, - {'table_entry': 'latitude', - 'units': 'degrees', - 'coord_vals': [0], - 'cell_bounds': [-0.5, 0.5]}, - {'table_entry': 'longitude', - 'units': 'degrees', - 'coord_vals': [361., 362.], - 'cell_bounds': [360., 361., 362.]}, - ] + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00' + }, + {'table_entry': 'latitude', + 'units': 'degrees', + 'coord_vals': [0], + 'cell_bounds': [-0.5, 0.5]}, + {'table_entry': 'longitude', + 'units': 'degrees', + 'coord_vals': [361., 362.], + 'cell_bounds': [360., 361., 362.]}, + ] values = numpy.array([215., 216.], numpy.float32) return values, axes + def cmor_define_and_write(values, axes): table = 'CMIP6_Amon.json' cmor.load_table(table) axis_ids = list() for axis in axes: - axis_ids.append(cmor.axis(**axis)) - + axis_ids.append(cmor.axis(**axis)) + table = 'CMIP6_Amon.json' cmor.load_table(table) varid = cmor.variable('rlut', 'W m-2', axis_ids, - history = 'variable history', - missing_value = -99, - positive = 'up' + history='variable history', + missing_value=-99, + positive='up' ) - cmor.write(varid, values, time_vals = [15], time_bnds = [0, 30]) + cmor.write(varid, values, time_vals=[15], time_bnds=[0, 30]) + def version(cmor): - return '%s.%s.%s' % (cmor.CMOR_VERSION_MAJOR, - cmor.CMOR_VERSION_MINOR, - cmor.CMOR_VERSION_PATCH) + return '%s.%s.%s' % (cmor.CMOR_VERSION_MAJOR, + cmor.CMOR_VERSION_MINOR, + cmor.CMOR_VERSION_PATCH) + def main(): assert version(cmor) >= '3.0.0' @@ -56,7 +61,8 @@ def main(): values, axes = setup_data() cmor_define_and_write(values, axes) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_lon_thro_360.py b/Test/test_lon_thro_360.py index 4ca0faee..75e17d77 100644 --- a/Test/test_lon_thro_360.py +++ b/Test/test_lon_thro_360.py @@ -1,64 +1,70 @@ import cmor import numpy + def cmor_initialisation(): cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3, - create_subdirectories = 0) + netcdf_file_action=cmor.CMOR_REPLACE_3, + create_subdirectories=0) cmor.dataset_json("Test/common_user_input.json") + def setup_data(): - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00' - }, - {'table_entry': 'latitude', - 'units': 'degrees', - 'coord_vals': [0], - 'cell_bounds': [-0.5, 0.5]}, - {'table_entry': 'longitude', - 'units': 'degrees', - 'coord_vals': [359., 361.,363.], - 'cell_bounds': [[358,359.9], - [359.9, 362.], - [362.,364.]]}, - ] - - values = numpy.array([360., 1.,3.], numpy.float32) + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00' + }, + {'table_entry': 'latitude', + 'units': 'degrees', + 'coord_vals': [0], + 'cell_bounds': [-0.5, 0.5]}, + {'table_entry': 'longitude', + 'units': 'degrees', + 'coord_vals': [359., 361., 363.], + 'cell_bounds': [[358, 359.9], + [359.9, 362.], + [362., 364.]]}, + ] + + values = numpy.array([360., 1., 3.], numpy.float32) return values, axes + def cmor_define_and_write(values, axes): table = 'CMIP6_Amon.json' cmor.load_table(table) axis_ids = list() for axis in axes: - axis_ids.append(cmor.axis(**axis)) - + axis_ids.append(cmor.axis(**axis)) + table = 'CMIP6_Amon.json' cmor.load_table(table) varid = cmor.variable('rlut', 'W m-2', axis_ids, - history = 'variable history', - missing_value = -99, - positive = 'up' + history='variable history', + missing_value=-99, + positive='up' ) - cmor.write(varid, values, time_vals = [15], time_bnds = [0, 30]) + cmor.write(varid, values, time_vals=[15], time_bnds=[0, 30]) + def version(cmor): - return '%s.%s.%s' % (cmor.CMOR_VERSION_MAJOR, - cmor.CMOR_VERSION_MINOR, - cmor.CMOR_VERSION_PATCH) - + return '%s.%s.%s' % (cmor.CMOR_VERSION_MAJOR, + cmor.CMOR_VERSION_MINOR, + cmor.CMOR_VERSION_PATCH) + + def main(): #assert version(cmor) == '2.8.3' cmor_initialisation() values, axes = setup_data() cmor_define_and_write(values, axes) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_non_monotonic_climo_bonds_ok.py b/Test/test_non_monotonic_climo_bonds_ok.py index 16b8bce8..10f0cdbd 100644 --- a/Test/test_non_monotonic_climo_bonds_ok.py +++ b/Test/test_non_monotonic_climo_bonds_ok.py @@ -1,54 +1,56 @@ import cmor -## Hypothetical data are going from march 2000 thru feb 2010 -times = [72,75,78] -times_bnds = [[11,134],[2,125],[5,128]] # first full djf one year later than first full mam +# Hypothetical data are going from march 2000 thru feb 2010 +times = [72, 75, 78] +# first full djf one year later than first full mam +times_bnds = [[11, 134], [2, 125], [5, 128]] def path_test(): - cmor.setup(inpath='TestTables',netcdf_file_action=cmor.CMOR_REPLACE) + cmor.setup(inpath='TestTables', netcdf_file_action=cmor.CMOR_REPLACE) - cmor.dataset('historical', 'ukmo', 'HadCM3', '360_day',model_id='HadCM3',forcing='Nat', + cmor.dataset('historical', 'ukmo', 'HadCM3', '360_day', model_id='HadCM3', forcing='Nat', contact="J.T. Snow", institute_id="PCMDI", parent_experiment_id="N/A", parent_experiment_rip="N/A", branch_time=0) - - table='CMIP6_Amon.json' + + table = 'CMIP6_Amon.json' cmor.load_table(table) - axes = [ {'table_entry': 'time2', - 'units': 'months since 2000-01-01 00:00:00', - 'coord_vals': times, - 'cell_bounds': times_bnds, - }, - {'table_entry': 'plevs', - 'units': 'Pa', - 'coord_vals': [100000., 92500., 85000., 70000., 60000., 50000., - 40000., 30000., 25000., 20000., 15000., - 10000., 7000., 5000., 3000., 2000., 1000.]}, - {'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]}, - ] - + axes = [{'table_entry': 'time2', + 'units': 'months since 2000-01-01 00:00:00', + 'coord_vals': times, + 'cell_bounds': times_bnds, + }, + {'table_entry': 'plevs', + 'units': 'Pa', + 'coord_vals': [100000., 92500., 85000., 70000., 60000., 50000., + 40000., 30000., 25000., 20000., 15000., + 10000., 7000., 5000., 3000., 2000., 1000.]}, + {'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('co2Clim', '1.e-6', axis_ids) import numpy - data =numpy.array([3,4,5]) - data.resize((3,17,1,1)) + data = numpy.array([3, 4, 5]) + data.resize((3, 17, 1, 1)) cmor.write(varid, data) - path=cmor.close(varid, file_name=True) + path = cmor.close(varid, file_name=True) print path + if __name__ == '__main__': path_test() diff --git a/Test/test_python_1D_var.py b/Test/test_python_1D_var.py index a918034e..2c775adc 100644 --- a/Test/test_python_1D_var.py +++ b/Test/test_python_1D_var.py @@ -5,16 +5,16 @@ error_flag = cmor.dataset_json("Test/common_user_input.json") cmor.load_table("CMIP6_Omon.json") -itim = cmor.axis( - table_entry='time', +itim = cmor.axis( + table_entry='time', units='months since 2010-1-1', - coord_vals=[0,1,2,3,4,5,6,7,8,9,10,11], - cell_bounds=[0,1,2,3,4,5,6,7,8,9,10,11,12]) + coord_vals=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], + cell_bounds=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) -ivar = cmor.variable('thetaoga',units='deg_C',axis_ids=[itim,]) +ivar = cmor.variable('thetaoga', units='deg_C', axis_ids=[itim, ]) -data=[280.,]*12 # 12 months worth of data +data = [280., ] * 12 # 12 months worth of data -cmor.write(ivar,data) +cmor.write(ivar, data) cmor.close() diff --git a/Test/test_python_2Gb_file.py b/Test/test_python_2Gb_file.py index f3300dd5..2c8842f9 100644 --- a/Test/test_python_2Gb_file.py +++ b/Test/test_python_2Gb_file.py @@ -1,47 +1,76 @@ -import cmor,numpy - - +import cmor +import numpy nlat = 360 -dlat = 180./nlat +dlat = 180. / nlat nlon = 720 -dlon = 360./nlon +dlon = 360. / nlon nlev = 19 ntimes = 12 -lats = numpy.arange(-90+dlat/2.,90,dlat) -blats = numpy.arange(-90,90+dlat,dlat) -lons = numpy.arange(0+dlon/2.,360.,dlon) -blons = numpy.arange(0,360.+dlon,dlon) +lats = numpy.arange(-90 + dlat / 2., 90, dlat) +blats = numpy.arange(-90, 90 + dlat, dlat) +lons = numpy.arange(0 + dlon / 2., 360., dlon) +blons = numpy.arange(0, 360. + dlon, dlon) -cmor.setup(inpath='Tables',netcdf_file_action=cmor.CMOR_REPLACE) +cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") -table='CMIP6_Amon.json' +table = 'CMIP6_Amon.json' cmor.load_table(table) -ilat = cmor.axis(table_entry='latitude',coord_vals=lats,cell_bounds=blats,units='degrees_north') -ilon = cmor.axis(table_entry='longitude',coord_vals=lons,cell_bounds=blons,units='degrees_east') -itim = cmor.axis(table_entry='time',units='months since 2010')#,coord_vals=numpy.arange(ntimes,dtype=numpy.float),cell_bounds=numpy.arange(ntimes+1,dtype=float),units='months since 2000') -ilev = cmor.axis(table_entry='plev19',coord_vals=numpy.array([1000.,925,850,700,600,500,400,300,250,200,150,100,70,50,30,20,10,5,1]),units='hPa') - -axes=[itim,ilev,ilat,ilon] - -var = cmor.variable(table_entry='ta',units='K',axis_ids=axes) -ntimes=250 - -data = numpy.random.random((nlev,nlat,nlon))*30+273.15 +ilat = cmor.axis( + table_entry='latitude', + coord_vals=lats, + cell_bounds=blats, + units='degrees_north') +ilon = cmor.axis( + table_entry='longitude', + coord_vals=lons, + cell_bounds=blons, + units='degrees_east') +# ,coord_vals=numpy.arange(ntimes,dtype=numpy.float),cell_bounds=numpy.arange(ntimes+1,dtype=float),units='months since 2000') +itim = cmor.axis(table_entry='time', units='months since 2010') +ilev = cmor.axis(table_entry='plev19', + coord_vals=numpy.array([1000., + 925, + 850, + 700, + 600, + 500, + 400, + 300, + 250, + 200, + 150, + 100, + 70, + 50, + 30, + 20, + 10, + 5, + 1]), + units='hPa') + +axes = [itim, ilev, ilat, ilon] + +var = cmor.variable(table_entry='ta', units='K', axis_ids=axes) +ntimes = 250 + +data = numpy.random.random((nlev, nlat, nlon)) * 30 + 273.15 for i in range(ntimes): - if i%10==0 : print 'Writing time:',i - cmor.write(var,data,time_vals=numpy.array([float(i),]),time_bnds=numpy.array([i,i+1.])) + if i % 10 == 0: + print 'Writing time:', i + cmor.write(var, data, time_vals=numpy.array( + [float(i), ]), time_bnds=numpy.array([i, i + 1.])) -print cmor.close(var_id=var,file_name=True) +print cmor.close(var_id=var, file_name=True) cmor.close() - print 'hello' diff --git a/Test/test_python_2Gb_slice.py b/Test/test_python_2Gb_slice.py index 66d8ffe3..0d444430 100644 --- a/Test/test_python_2Gb_slice.py +++ b/Test/test_python_2Gb_slice.py @@ -1,52 +1,61 @@ -import cmor,numpy - - - +import cmor +import numpy nlat = 3600 -dlat = 180./nlat +dlat = 180. / nlat nlon = 7200 -dlon = 360./nlon +dlon = 360. / nlon nlev = 26 -dlev = 1000./nlev +dlev = 1000. / nlev ntimes = 1 -lats = numpy.arange(-90+dlat/2.,90,dlat) -blats = numpy.arange(-90,90+dlat,dlat) -lons = numpy.arange(0+dlon/2.,360.,dlon) -blons = numpy.arange(0,360.+dlon,dlon) +lats = numpy.arange(-90 + dlat / 2., 90, dlat) +blats = numpy.arange(-90, 90 + dlat, dlat) +lons = numpy.arange(0 + dlon / 2., 360., dlon) +blons = numpy.arange(0, 360. + dlon, dlon) -levs = numpy.array([1000.,925,900,850,800,700,600,500,400,300,250,200,150,100,75,70,50,30,20,10,7.5,5,2.5,1,.5,.1]) -alllevs = numpy.arange(1000,0,-dlev).tolist() +levs = numpy.array([1000., 925, 900, 850, 800, 700, 600, 500, 400, 300, + 250, 200, 150, 100, 75, 70, 50, 30, 20, 10, 7.5, 5, 2.5, 1, .5, .1]) +alllevs = numpy.arange(1000, 0, -dlev).tolist() print len(alllevs) cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") -table='CMIP6_Amon.json' +table = 'CMIP6_Amon.json' cmor.load_table(table) -ilat = cmor.axis(table_entry='latitude',coord_vals=lats,cell_bounds=blats,units='degrees_north') -ilon = cmor.axis(table_entry='longitude',coord_vals=lons,cell_bounds=blons,units='degrees_east') -itim = cmor.axis(table_entry='time',units='months since 2010')#,coord_vals=numpy.arange(ntimes,dtype=numpy.float),cell_bounds=numpy.arange(ntimes+1,dtype=float),units='months since 2000') -ilev = cmor.axis(table_entry='plev19',coord_vals=levs,units='hPa') - -axes=[itim,ilev,ilat,ilon] +ilat = cmor.axis( + table_entry='latitude', + coord_vals=lats, + cell_bounds=blats, + units='degrees_north') +ilon = cmor.axis( + table_entry='longitude', + coord_vals=lons, + cell_bounds=blons, + units='degrees_east') +# ,coord_vals=numpy.arange(ntimes,dtype=numpy.float),cell_bounds=numpy.arange(ntimes+1,dtype=float),units='months since 2000') +itim = cmor.axis(table_entry='time', units='months since 2010') +ilev = cmor.axis(table_entry='plev19', coord_vals=levs, units='hPa') + +axes = [itim, ilev, ilat, ilon] -var = cmor.variable(table_entry='ta',units='K',axis_ids=axes) +var = cmor.variable(table_entry='ta', units='K', axis_ids=axes) print "allocating mem for data" -data = numpy.random.random((nlev,nlat,nlon))*30+273.15 +data = numpy.random.random((nlev, nlat, nlon)) * 30 + 273.15 print "moving on to writing" for i in range(ntimes): - print 'Writing time:',i - cmor.write(var,data,time_vals=numpy.array([float(i),]),time_bnds=numpy.array([i,i+1.])) + print 'Writing time:', i + cmor.write(var, data, time_vals=numpy.array( + [float(i), ]), time_bnds=numpy.array([i, i + 1.])) print "closing var" -print cmor.close(var_id=var,file_name=True) +print cmor.close(var_id=var, file_name=True) print "closing cmor" cmor.close() print "done" diff --git a/Test/test_python_3hr.py b/Test/test_python_3hr.py deleted file mode 100644 index 11be31f6..00000000 --- a/Test/test_python_3hr.py +++ /dev/null @@ -1,37 +0,0 @@ -import cmor,numpy - -error_flag = cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) - -error_flag = cmor.dataset_json("Test/common_user_input.json") - -n_lev = 40 -zlevs = 480.*numpy.arange(0,n_lev)+240. -zbnds = numpy.zeros((n_lev,2)) - -zbnds[:,0]=zlevs-240. -zbnds[:,1]=zlevs+240. - -# creates 1 degree grid -cmor.load_table("CMIP6_CF3hr.json") - - -ialt40 = cmor.axis("alt40",units="m",coord_vals=zlevs,cell_bounds=zbnds) - -itm = cmor.axis("time1",units="months since 2000") -iloc = cmor.axis("location",units="1",coord_vals=numpy.arange(2)) - -igrid = cmor.grid(axis_ids=[iloc,itm]) - -print igrid - -ilat = cmor.time_varying_grid_coordinate(igrid,table_entry='latitude',units='degrees_north') -ilon = cmor.time_varying_grid_coordinate(igrid,table_entry='longitude',units='degrees_east') - -#cmor.load_table("Tables/CMIP6_cf3hr.json") -ivar = cmor.variable("clcalipso",axis_ids=[igrid,ialt40],units="%") - -ierr =cmor.write(ivar,numpy.ones((2,3,n_lev)),time_vals=numpy.arange(3)) -ierr =cmor.write(ilat,-90.*numpy.ones((2,3,n_lev)),time_vals=numpy.arange(3),store_with=ivar) -ierr =cmor.write(ilon,180.*numpy.ones((2,3,n_lev)),time_vals=numpy.arange(3),store_with=ivar) -error_flag = cmor.close() - diff --git a/Test/test_python_CMIP6_CV_baddirectory.py b/Test/test_python_CMIP6_CV_baddirectory.py index b292cf9f..bc18ab22 100644 --- a/Test/test_python_CMIP6_CV_baddirectory.py +++ b/Test/test_python_CMIP6_CV_baddirectory.py @@ -58,7 +58,7 @@ def test_Directory(self): try: cmor.dataset_json("Test/baddirectory.json") - except: + except BaseException: testOK = self.getAssertTest() os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) @@ -67,7 +67,5 @@ def test_Directory(self): self.assertIn("unable to create this directory", testOK) - - if __name__ == '__main__': run() diff --git a/Test/test_python_CMIP6_CV_badgridgr.py b/Test/test_python_CMIP6_CV_badgridgr.py index 0f867d7f..3048cb27 100644 --- a/Test/test_python_CMIP6_CV_badgridgr.py +++ b/Test/test_python_CMIP6_CV_badgridgr.py @@ -71,13 +71,16 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) cmor.close() - except: + except BaseException: os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) sys.stdout = os.fdopen(self.newstdout, 'w', 0) @@ -90,8 +93,7 @@ def testCMIP6(self): def tearDown(self): import shutil - shutil.rmtree("./CMIP6") - + shutil.rmtree("./CMIP6") if __name__ == '__main__': diff --git a/Test/test_python_CMIP6_CV_badgridlabel.py b/Test/test_python_CMIP6_CV_badgridlabel.py index 94efd1bc..cafbf89e 100644 --- a/Test/test_python_CMIP6_CV_badgridlabel.py +++ b/Test/test_python_CMIP6_CV_badgridlabel.py @@ -79,13 +79,16 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) cmor.close() - except: + except BaseException: os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) testOK = self.getAssertTest() diff --git a/Test/test_python_CMIP6_CV_badgridresolution.py b/Test/test_python_CMIP6_CV_badgridresolution.py index 0eee7fad..e1bc4334 100644 --- a/Test/test_python_CMIP6_CV_badgridresolution.py +++ b/Test/test_python_CMIP6_CV_badgridresolution.py @@ -71,13 +71,16 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) cmor.close() - except: + except BaseException: os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) sys.stdout = os.fdopen(self.newstdout, 'w', 0) @@ -87,8 +90,7 @@ def testCMIP6(self): def tearDown(self): import shutil - shutil.rmtree("./CMIP6") - + shutil.rmtree("./CMIP6") if __name__ == '__main__': diff --git a/Test/test_python_CMIP6_CV_badinstitution.py b/Test/test_python_CMIP6_CV_badinstitution.py index 92364098..aed2aa17 100644 --- a/Test/test_python_CMIP6_CV_badinstitution.py +++ b/Test/test_python_CMIP6_CV_badinstitution.py @@ -43,7 +43,6 @@ def testCMIP6(self): cmor.dataset_json("Test/common_user_input.json") cmor.set_cur_dataset_attribute("institution", "NCC2") - # ------------------------------------------ # load Omon table and create masso variable # ------------------------------------------ @@ -51,13 +50,16 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) cmor.close() - except: + except BaseException: pass os.dup2(newstdout, 1) os.dup2(newstderr, 2) diff --git a/Test/test_python_CMIP6_CV_badinstitutionID.py b/Test/test_python_CMIP6_CV_badinstitutionID.py index 6a993c7e..173d229c 100644 --- a/Test/test_python_CMIP6_CV_badinstitutionID.py +++ b/Test/test_python_CMIP6_CV_badinstitutionID.py @@ -67,24 +67,27 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) - cmor.close() + cmor.close() - except: + except BaseException: os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) sys.stdout = os.fdopen(self.newstdout, 'w', 0) testOK = self.getAssertTest() self.assertIn("ddPCMDI", testOK) - def tearDown(self): import shutil shutil.rmtree("./CMIP6") + if __name__ == '__main__': run() diff --git a/Test/test_python_CMIP6_CV_badinstitutionIDNotSet.py b/Test/test_python_CMIP6_CV_badinstitutionIDNotSet.py index 915365f2..ae31bd7d 100644 --- a/Test/test_python_CMIP6_CV_badinstitutionIDNotSet.py +++ b/Test/test_python_CMIP6_CV_badinstitutionIDNotSet.py @@ -65,22 +65,26 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) - cmor.close() - except: + cmor.close() + except BaseException: os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) sys.stdout = os.fdopen(self.newstdout, 'w', 0) sys.stderr = os.fdopen(self.newstderr, 'w', 0) testOK = self.getAssertTest() self.assertIn("Control Vocabulary file", testOK) + def tearDown(self): import shutil - # shutil.rmtree("./CMIP6") + shutil.rmtree("./CMIP6") if __name__ == '__main__': diff --git a/Test/test_python_CMIP6_CV_badsource.py b/Test/test_python_CMIP6_CV_badsource.py index c18f72a4..3b8d754b 100644 --- a/Test/test_python_CMIP6_CV_badsource.py +++ b/Test/test_python_CMIP6_CV_badsource.py @@ -20,7 +20,6 @@ import tempfile - class TestCase(unittest.TestCase): def testCMIP6(self): @@ -52,13 +51,16 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) cmor.close() - except: + except BaseException: raise os.dup2(newstdout, 1) os.dup2(newstderr, 2) diff --git a/Test/test_python_CMIP6_CV_badsourceid.py b/Test/test_python_CMIP6_CV_badsourceid.py index 5dc4d670..451ee076 100644 --- a/Test/test_python_CMIP6_CV_badsourceid.py +++ b/Test/test_python_CMIP6_CV_badsourceid.py @@ -20,7 +20,6 @@ import tempfile - def run(): unittest.main() @@ -68,13 +67,16 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) cmor.close() - except: + except BaseException: os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) sys.stdout = os.fdopen(self.newstdout, 'w', 0) diff --git a/Test/test_python_CMIP6_CV_badsourcetype.py b/Test/test_python_CMIP6_CV_badsourcetype.py index 64073d45..698e43aa 100644 --- a/Test/test_python_CMIP6_CV_badsourcetype.py +++ b/Test/test_python_CMIP6_CV_badsourcetype.py @@ -68,13 +68,16 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) cmor.close() - except: + except BaseException: pass os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) diff --git a/Test/test_python_CMIP6_CV_badsourcetypeCHEMAER.py b/Test/test_python_CMIP6_CV_badsourcetypeCHEMAER.py index 109837fb..2b65b784 100644 --- a/Test/test_python_CMIP6_CV_badsourcetypeCHEMAER.py +++ b/Test/test_python_CMIP6_CV_badsourcetypeCHEMAER.py @@ -56,7 +56,8 @@ def testCMIP6(self): # Try to call cmor with a bad institution_ID # ------------------------------------------- cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) - cmor.dataset_json("Test/test_python_CMIP6_CV_badsourcetypeCHEMAER.json") + cmor.dataset_json( + "Test/test_python_CMIP6_CV_badsourcetypeCHEMAER.json") # ------------------------------------------ # load Omon table and create masso variable @@ -65,14 +66,17 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) - cmor.close() + cmor.close() - except: + except BaseException: pass os.dup2(self.newstdout, 1) diff --git a/Test/test_python_CMIP6_CV_badsourcetypeRequired.py b/Test/test_python_CMIP6_CV_badsourcetypeRequired.py index f86d0805..b0b33c07 100644 --- a/Test/test_python_CMIP6_CV_badsourcetypeRequired.py +++ b/Test/test_python_CMIP6_CV_badsourcetypeRequired.py @@ -48,7 +48,7 @@ def getAssertTest(self): f = open(self.tmpfile[1], 'r') lines = f.readlines() for line in lines: - if line.find('Your ') != -1: + if line.find('source type is set to') != -1: testOK = line.strip() break f.close() @@ -62,7 +62,8 @@ def testCMIP6(self): # ------------------------------------------- cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") - cmor.set_cur_dataset_attribute("source_type", "AOGCM ISM BGCM LAND") + cmor.set_cur_dataset_attribute( + "source_type", "AOGCM ISM BGCM LAND") # ------------------------------------------ # load Omon table and create masso variable @@ -71,14 +72,17 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): a = cmor.write(ivar, data[i:i]) - cmor.close() + cmor.close() - except: + except BaseException: pass os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) diff --git a/Test/test_python_CMIP6_CV_badvariant.py b/Test/test_python_CMIP6_CV_badvariant.py index ae6265d5..0cb5f6b4 100644 --- a/Test/test_python_CMIP6_CV_badvariant.py +++ b/Test/test_python_CMIP6_CV_badvariant.py @@ -62,7 +62,7 @@ def testCMIP6(self): # ------------------------------------------- cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") - cmor.set_cur_dataset_attribute("physics_index", "1A") + cmor.set_cur_dataset_attribute("physics_index", "1A") # ------------------------------------------ # load Omon table and create masso variable @@ -71,14 +71,17 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) - cmor.close() + cmor.close() - except: + except BaseException: os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) sys.stdout = os.fdopen(self.newstdout, 'w', 0) @@ -89,11 +92,11 @@ def testCMIP6(self): testOK = self.getAssertTest() self.assertIn("\"1A\"", testOK) - def tearDown(self): import shutil shutil.rmtree("./CMIP6") + if __name__ == '__main__': run() diff --git a/Test/test_python_CMIP6_CV_externalvariables.py b/Test/test_python_CMIP6_CV_externalvariables.py index 440ba706..4dea5b9f 100644 --- a/Test/test_python_CMIP6_CV_externalvariables.py +++ b/Test/test_python_CMIP6_CV_externalvariables.py @@ -70,12 +70,22 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ilat = cmor.axis(table_entry='latitude', coord_vals=lats, cell_bounds=blats, units='degrees_north') - ilon = cmor.axis(table_entry='longitude', coord_vals=lons, cell_bounds=blons, units='degrees_east') + ilat = cmor.axis( + table_entry='latitude', + coord_vals=lats, + cell_bounds=blats, + units='degrees_north') + ilon = cmor.axis( + table_entry='longitude', + coord_vals=lons, + cell_bounds=blons, + units='degrees_east') ilev = cmor.axis(table_entry='depth_coord', length=5, cell_bounds=numpy.arange(0, 12000, 2000), coord_vals=numpy.arange(0, 10000, 2000), units="m") - ivar = cmor.variable(table_entry="masscello", axis_ids=[itime, ilev, ilat, ilon, ], units='kg/m2') + ivar = cmor.variable( + table_entry="masscello", axis_ids=[ + itime, ilev, ilat, ilon, ], units='kg/m2') data = numpy.random.random((ntimes, nlev, nlat, nlon)) * 100. diff --git a/Test/test_python_CMIP6_CV_forcemultipleparent.py b/Test/test_python_CMIP6_CV_forcemultipleparent.py new file mode 100644 index 00000000..f688356b --- /dev/null +++ b/Test/test_python_CMIP6_CV_forcemultipleparent.py @@ -0,0 +1,151 @@ +# If this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testParentActivityID(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute( + "parent_experiment_id", "dcppA-assim") + cmor.set_cur_dataset_attribute("parent_activity_id", "CMIP") + cmor.set_cur_dataset_attribute( + "experiment_id", "dcppC-forecast-addAgung") + cmor.set_cur_dataset_attribute("activity_id", "DCPP") + cmor.set_cur_dataset_attribute("source_type", "AOGCM AER") + cmor.set_cur_dataset_attribute("sub_experiment_id", "s2014") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + pass + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + for line in lines: + if line.find('Error:') != -1: + self.assertIn('parent_activity_id', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def testParentExperimentID(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute( + "parent_experiment_id", "historical") + cmor.set_cur_dataset_attribute("parent_activity_id", "DCPP") + cmor.set_cur_dataset_attribute( + "experiment_id", "dcppC-forecast-addAgung") + cmor.set_cur_dataset_attribute("activity_id", "DCPP") + cmor.set_cur_dataset_attribute("source_type", "AOGCM AER") + cmor.set_cur_dataset_attribute("sub_experiment_id", "s2014") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + pass + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + for line in lines: + if line.find('Error:') != -1: + self.assertIn('parent_experiment_id', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_CMIP6_CV_forcenoparent.py b/Test/test_python_CMIP6_CV_forcenoparent.py new file mode 100644 index 00000000..5c442e31 --- /dev/null +++ b/Test/test_python_CMIP6_CV_forcenoparent.py @@ -0,0 +1,85 @@ +# If this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + raise + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + count = 0 + # We need 8 attributes to be replaced + for line in lines: + if line.find('replaced') != -1: + count = count + 1 + self.assertEqual(count, 9) + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_CMIP6_CV_forceparent.py b/Test/test_python_CMIP6_CV_forceparent.py new file mode 100644 index 00000000..09db07dc --- /dev/null +++ b/Test/test_python_CMIP6_CV_forceparent.py @@ -0,0 +1,98 @@ +# If this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute("experiment_id", "ssp434") + cmor.set_cur_dataset_attribute( + "parent_experiment_id", "historical") + cmor.set_cur_dataset_attribute("parent_activity_id", "CMIP") + cmor.set_cur_dataset_attribute("activity_id", "ScenarioMIP") + cmor.set_cur_dataset_attribute("source_type", "AOGCM") + cmor.set_cur_dataset_attribute("sub_experiment_id", "none") + cmor.set_cur_dataset_attribute( + "parent_variant_label", "r11i123p4556f333") + cmor.set_cur_dataset_attribute("parent_source_id", "child") + cmor.set_cur_dataset_attribute("parent_mip_era", "CMIP6") + cmor.set_cur_dataset_attribute("parent_timeunits", "no parent") + cmor.set_cur_dataset_attribute("branch_method", "no parent") + cmor.set_cur_dataset_attribute( + "branc_child_in_parent", "no parent") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + pass + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + for line in lines: + if line.find('Error:') != -1: + self.assertIn('child', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_CMIP6_CV_furtherinfourl.py b/Test/test_python_CMIP6_CV_furtherinfourl.py index 49a2ae6f..8d5ef717 100644 --- a/Test/test_python_CMIP6_CV_furtherinfourl.py +++ b/Test/test_python_CMIP6_CV_furtherinfourl.py @@ -21,7 +21,6 @@ import cdms2 - # ============================== # main thread # ============================== @@ -30,38 +29,37 @@ def run(): class TestCase(unittest.TestCase): - def setUp(self, *args, **kwargs): - # ------------------------------------------------------ - # Copy stdout and stderr file descriptor for cmor output - # ------------------------------------------------------ - self.newstdout = os.dup(1) - self.newstderr = os.dup(2) - # -------------- - # Create tmpfile - # -------------- + def setUp(self, *args, **kwargs): + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + self.newstdout = os.dup(1) + self.newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- self.tmpfile = tempfile.mkstemp() - os.dup2(self.tmpfile[0], 1) - os.dup2(self.tmpfile[0], 2) - os.close(self.tmpfile[0]) - - def getAssertTest(self): - f = open(self.tmpfile[1], 'r') - lines = f.readlines() - for line in lines: - if line.find('Error:') != -1: - testOK = line.strip() - break - f.close() - os.unlink(self.tmpfile[1]) - return testOK + os.dup2(self.tmpfile[0], 1) + os.dup2(self.tmpfile[0], 2) + os.close(self.tmpfile[0]) + def getAssertTest(self): + f = open(self.tmpfile[1], 'r') + lines = f.readlines() + for line in lines: + if line.find('Error:') != -1: + testOK = line.strip() + break + f.close() + os.unlink(self.tmpfile[1]) + return testOK def testCMIP6(self): try: # ------------------------------------------- # Try to call cmor with a bad institution_ID # ------------------------------------------- - cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") # ------------------------------------------ @@ -71,26 +69,32 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2000', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) cmor.close() - except: + except BaseException: raise - os.dup2(self.newstdout, 1) - os.dup2(self.newstderr, 2) - sys.stdout = os.fdopen(self.newstdout, 'w', 0) - sys.stderr = os.fdopen(self.newstderr, 'w', 0) + os.dup2(self.newstdout, 1) + os.dup2(self.newstderr, 2) + sys.stdout = os.fdopen(self.newstdout, 'w', 0) + sys.stderr = os.fdopen(self.newstderr, 'w', 0) f = cdms2.open(cmor.get_final_filename(), "r") a = f.getglobal("further_info_url") - self.assertEqual("http://furtherinfo.es-doc.org/CMIP6.PCMDI.PCMDI-test-1-0.piControl-withism.None.r11i1p1f1", a) - + self.assertEqual( + "http://furtherinfo.es-doc.org/CMIP6.PCMDI.PCMDI-test-1-0.piControl-withism.none.r11i1p1f1", + a) def tearDown(self): import shutil shutil.rmtree("./CMIP6") + + if __name__ == '__main__': run() diff --git a/Test/test_python_CMIP6_CV_fxtable.py b/Test/test_python_CMIP6_CV_fxtable.py index f55b7042..138d306f 100644 --- a/Test/test_python_CMIP6_CV_fxtable.py +++ b/Test/test_python_CMIP6_CV_fxtable.py @@ -69,13 +69,23 @@ def testCMIP6(self): data = (data + 1e10) / 750. + 233.2 - ilat = cmor.axis(table_entry='latitude', coord_vals=lats, cell_bounds=blats, units='degrees_north') - ilon = cmor.axis(table_entry='longitude', coord_vals=lons, cell_bounds=blons, units='degrees_east') + ilat = cmor.axis( + table_entry='latitude', + coord_vals=lats, + cell_bounds=blats, + units='degrees_north') + ilon = cmor.axis( + table_entry='longitude', + coord_vals=lons, + cell_bounds=blons, + units='degrees_east') # ------------------------------------------ # load Omon table and create masso variable # ------------------------------------------ - ivar = cmor.variable(table_entry="areacella", axis_ids=[ilat, ilon], units='m2') + ivar = cmor.variable( + table_entry="areacella", axis_ids=[ + ilat, ilon], units='m2') cmor.write(ivar, data) cmor.close() @@ -88,5 +98,6 @@ def tearDown(self): import shutil shutil.rmtree("./CMIP6") + if __name__ == '__main__': run() diff --git a/Test/test_python_CMIP6_CV_longrealizationindex.py b/Test/test_python_CMIP6_CV_longrealizationindex.py index f6b3c66a..977f9f14 100644 --- a/Test/test_python_CMIP6_CV_longrealizationindex.py +++ b/Test/test_python_CMIP6_CV_longrealizationindex.py @@ -61,10 +61,9 @@ def testCMIP6(self): # ------------------------------------------- cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") - cmor.set_cur_dataset_attribute("initialization_index", + cmor.set_cur_dataset_attribute("initialization_index", "1209374928349823498274987234987") - # ------------------------------------------ # load Omon table and create masso variable # ------------------------------------------ @@ -72,14 +71,17 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 1): cmor.write(ivar, data[i:i]) - cmor.close() + cmor.close() - except: + except BaseException: os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) sys.stdout = os.fdopen(self.newstdout, 'w', 0) diff --git a/Test/test_python_CMIP6_CV_nomipera.py b/Test/test_python_CMIP6_CV_nomipera.py index 7a7bc6e0..e7ab919f 100644 --- a/Test/test_python_CMIP6_CV_nomipera.py +++ b/Test/test_python_CMIP6_CV_nomipera.py @@ -60,7 +60,9 @@ def testCMIP6(self): # ------------------------------------------- # Try to call cmor with a bad institution_ID # ------------------------------------------- - cmor.setup(inpath='TestTables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.setup( + inpath='TestTables', + netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") # ------------------------------------------ @@ -70,13 +72,16 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): cmor.write(ivar, data[i:i]) - cmor.close() - except: + cmor.close() + except BaseException: os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) sys.stdout = os.fdopen(self.newstdout, 'w', 0) diff --git a/Test/test_python_CMIP6_CV_parentmipera.py b/Test/test_python_CMIP6_CV_parentmipera.py new file mode 100644 index 00000000..f54b5232 --- /dev/null +++ b/Test/test_python_CMIP6_CV_parentmipera.py @@ -0,0 +1,95 @@ +# If this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute("experiment_id", "ssp434") + cmor.set_cur_dataset_attribute( + "parent_experiment_id", "historical") + cmor.set_cur_dataset_attribute("parent_activity_id", "CMIP") + cmor.set_cur_dataset_attribute("activity_id", "ScenarioMIP") + cmor.set_cur_dataset_attribute("source_type", "AOGCM") + cmor.set_cur_dataset_attribute("sub_experiment_id", "none") + cmor.set_cur_dataset_attribute( + "parent_variant_label", "r11i123p4556f333") + cmor.set_cur_dataset_attribute( + "parent_source_id", "PCMDI-test-1-0") + cmor.set_cur_dataset_attribute("parent_mip_era", "CMIP-6") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + pass + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + for line in lines: + if line.find('parent_mip_era') != -1: + self.assertIn('CMIP-6', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_CMIP6_CV_parentsourceid.py b/Test/test_python_CMIP6_CV_parentsourceid.py new file mode 100644 index 00000000..989c8f67 --- /dev/null +++ b/Test/test_python_CMIP6_CV_parentsourceid.py @@ -0,0 +1,94 @@ +# If this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute("experiment_id", "ssp434") + cmor.set_cur_dataset_attribute( + "parent_experiment_id", "historical") + cmor.set_cur_dataset_attribute("parent_activity_id", "CMIP") + cmor.set_cur_dataset_attribute("activity_id", "ScenarioMIP") + cmor.set_cur_dataset_attribute("source_type", "AOGCM") + cmor.set_cur_dataset_attribute("sub_experiment_id", "none") + cmor.set_cur_dataset_attribute( + "parent_variant_label", "r11i123p4556f333") + cmor.set_cur_dataset_attribute("parent_source_id", "OLD-SOURCE") + cmor.set_cur_dataset_attribute("parent_mip_era", "CMIP6") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + pass + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + for line in lines: + if line.find('Error:') != -1: + self.assertIn('OLD', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_CMIP6_CV_parenttimeunits.py b/Test/test_python_CMIP6_CV_parenttimeunits.py new file mode 100644 index 00000000..9ea71f5b --- /dev/null +++ b/Test/test_python_CMIP6_CV_parenttimeunits.py @@ -0,0 +1,97 @@ +# If this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute("experiment_id", "ssp434") + cmor.set_cur_dataset_attribute( + "parent_experiment_id", "historical") + cmor.set_cur_dataset_attribute("parent_activity_id", "CMIP") + cmor.set_cur_dataset_attribute("activity_id", "ScenarioMIP") + cmor.set_cur_dataset_attribute("source_type", "AOGCM") + cmor.set_cur_dataset_attribute("sub_experiment_id", "none") + cmor.set_cur_dataset_attribute( + "parent_variant_label", "r11i123p4556f333") + cmor.set_cur_dataset_attribute( + "parent_source_id", "PCMDI-test-1-0") + cmor.set_cur_dataset_attribute("parent_mip_era", "CMIP6") + cmor.set_cur_dataset_attribute( + "parent_time_units", "days since 1980-01") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + raise + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + for line in lines: + if line.find('Error:') != -1: + self.assertIn('1980-01', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_CMIP6_CV_parentvariantlabel.py b/Test/test_python_CMIP6_CV_parentvariantlabel.py new file mode 100644 index 00000000..2d35a5dd --- /dev/null +++ b/Test/test_python_CMIP6_CV_parentvariantlabel.py @@ -0,0 +1,95 @@ +# If this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute("experiment_id", "ssp434") + cmor.set_cur_dataset_attribute( + "parent_experiment_id", "historical") + cmor.set_cur_dataset_attribute("parent_activity_id", "CMIP") + cmor.set_cur_dataset_attribute("activity_id", "ScenarioMIP") + cmor.set_cur_dataset_attribute("source_type", "AOGCM") + cmor.set_cur_dataset_attribute("sub_experiment_id", "none") + cmor.set_cur_dataset_attribute( + "parent_variant_label", "r11i123p4556") + cmor.set_cur_dataset_attribute( + "parent_source_id", "PCMDI-test-1-0") + cmor.set_cur_dataset_attribute("parent_mip_era", "CMIP6") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + pass + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + for line in lines: + if line.find('Error:') != -1: + self.assertIn('r11i123p4556', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_CMIP6_CV_sub_experimentIDbad.py b/Test/test_python_CMIP6_CV_sub_experimentIDbad.py new file mode 100644 index 00000000..5830ea16 --- /dev/null +++ b/Test/test_python_CMIP6_CV_sub_experimentIDbad.py @@ -0,0 +1,96 @@ +# If this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute("experiment_id", "dcppA-hindcast") + cmor.set_cur_dataset_attribute( + "parent_experiment_id", "dcppA-assim") + cmor.set_cur_dataset_attribute("parent_activity_id", "DCPP") + cmor.set_cur_dataset_attribute("activity_id", "DCPP") + cmor.set_cur_dataset_attribute("source_type", "AOGCM AER") + cmor.set_cur_dataset_attribute("sub_experiment_id", "s3000") + cmor.set_cur_dataset_attribute( + "parent_variant_label", "r11i123p4556f333") + cmor.set_cur_dataset_attribute( + "parent_source_id", "PCMDI-test-1-0") + cmor.set_cur_dataset_attribute("parent_mip_era", "CMIP6") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + pass + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + # We need 8 attributes to be replaced + for line in lines: + if line.find('Error') != -1: + self.assertIn('sub_experiment_id', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_CMIP6_CV_sub_experiment_id.py b/Test/test_python_CMIP6_CV_sub_experiment_id.py new file mode 100644 index 00000000..5830ea16 --- /dev/null +++ b/Test/test_python_CMIP6_CV_sub_experiment_id.py @@ -0,0 +1,96 @@ +# If this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute("experiment_id", "dcppA-hindcast") + cmor.set_cur_dataset_attribute( + "parent_experiment_id", "dcppA-assim") + cmor.set_cur_dataset_attribute("parent_activity_id", "DCPP") + cmor.set_cur_dataset_attribute("activity_id", "DCPP") + cmor.set_cur_dataset_attribute("source_type", "AOGCM AER") + cmor.set_cur_dataset_attribute("sub_experiment_id", "s3000") + cmor.set_cur_dataset_attribute( + "parent_variant_label", "r11i123p4556f333") + cmor.set_cur_dataset_attribute( + "parent_source_id", "PCMDI-test-1-0") + cmor.set_cur_dataset_attribute("parent_mip_era", "CMIP6") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + pass + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + # We need 8 attributes to be replaced + for line in lines: + if line.find('Error') != -1: + self.assertIn('sub_experiment_id', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_CMIP6_CV_sub_experimentbad.py b/Test/test_python_CMIP6_CV_sub_experimentbad.py new file mode 100644 index 00000000..fcfe5dfe --- /dev/null +++ b/Test/test_python_CMIP6_CV_sub_experimentbad.py @@ -0,0 +1,95 @@ +# Irf this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute("parent_source_id", "no parent") + cmor.set_cur_dataset_attribute("parent_time_units", "no parent") + cmor.set_cur_dataset_attribute("parent_variant_label", "no parent") + cmor.set_cur_dataset_attribute("parent_activity_id", "no parent") + cmor.set_cur_dataset_attribute("parent_experiment_id", "no parent") + cmor.set_cur_dataset_attribute("branch_method", "no parent") + cmor.set_cur_dataset_attribute("parent_mip_era", "no parent") + cmor.set_cur_dataset_attribute("branch_time_in_child", "0.0") + cmor.set_cur_dataset_attribute("branch_time_in_parent", "0.0") + cmor.set_cur_dataset_attribute("sub_experiment_id", "none") + cmor.set_cur_dataset_attribute("sub_experiment", "iasdf") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + pass + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + # We need 8 attributes to be replaced + for line in lines: + if line.find('sub_experiment') != -1: + self.assertIn('iasdf', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_CMIP6_CV_sub_experimentnotset.py b/Test/test_python_CMIP6_CV_sub_experimentnotset.py new file mode 100644 index 00000000..752c3d92 --- /dev/null +++ b/Test/test_python_CMIP6_CV_sub_experimentnotset.py @@ -0,0 +1,97 @@ +# Irf this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute("experiment_id", "dcppA-hindcast") + cmor.set_cur_dataset_attribute( + "parent_experiment_id", "dcppA-assim") + cmor.set_cur_dataset_attribute("parent_activity_id", "DCPP") + cmor.set_cur_dataset_attribute("activity_id", "DCPP") + cmor.set_cur_dataset_attribute("source_type", "AOGCM AER") + cmor.set_cur_dataset_attribute("sub_experiment_id", "s2000") + cmor.set_cur_dataset_attribute("sub_experiment", "none") + cmor.set_cur_dataset_attribute( + "parent_variant_label", "r11i123p4556f333") + cmor.set_cur_dataset_attribute( + "parent_source_id", "PCMDI-test-1-0") + cmor.set_cur_dataset_attribute("parent_mip_era", "CMIP6") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + itime = cmor.axis(table_entry="time", units='months since 2010', + coord_vals=numpy.array([0, 1, 2, 3, 4.]), + cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') + + data = numpy.random.random(5) + for i in range(0, 5): + cmor.write(ivar, data[i:i]) + cmor.close() + except BaseException: + pass + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + # We need 8 attributes to be replaced + for line in lines: + if line.find('sub_experiment') != -1: + self.assertIn('none', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_CMIP6_CV_trackingNoprefix.py b/Test/test_python_CMIP6_CV_trackingNoprefix.py index 273501eb..36156a55 100644 --- a/Test/test_python_CMIP6_CV_trackingNoprefix.py +++ b/Test/test_python_CMIP6_CV_trackingNoprefix.py @@ -72,7 +72,10 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): @@ -85,7 +88,7 @@ def testCMIP6(self): f = cdms2.open(cmor.get_final_filename(), "r") a = f.getglobal("tracking_id").split('/')[0] self.assertNotIn("hdl:21.14100/", a) - except: + except BaseException: raise def tearDown(self): diff --git a/Test/test_python_CMIP6_CV_trackingprefix.py b/Test/test_python_CMIP6_CV_trackingprefix.py index 6474a830..48a2d1e3 100644 --- a/Test/test_python_CMIP6_CV_trackingprefix.py +++ b/Test/test_python_CMIP6_CV_trackingprefix.py @@ -30,20 +30,19 @@ def run(): class TestCase(unittest.TestCase): - def setUp(self, *args, **kwargs): - # ------------------------------------------------------ - # Copy stdout and stderr file descriptor for cmor output - # ------------------------------------------------------ - self.newstdout = os.dup(1) - self.newstderr = os.dup(2) - # -------------- - # Create tmpfile - # -------------- - self.tmpfile = tempfile.mkstemp() - os.dup2(self.tmpfile[0], 1) - os.dup2(self.tmpfile[0], 2) - os.close(self.tmpfile[0]) - + def setUp(self, *args, **kwargs): + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + self.newstdout = os.dup(1) + self.newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + self.tmpfile = tempfile.mkstemp() + os.dup2(self.tmpfile[0], 1) + os.dup2(self.tmpfile[0], 2) + os.close(self.tmpfile[0]) def testCMIP6(self): try: @@ -61,18 +60,21 @@ def testCMIP6(self): itime = cmor.axis(table_entry="time", units='months since 2011', coord_vals=numpy.array([0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): a = cmor.write(ivar, data[i:i]) cmor.close() - except: + except BaseException: raise - os.dup2(self.newstdout, 1) - os.dup2(self.newstderr, 2) - sys.stdout = os.fdopen(self.newstdout, 'w', 0) - sys.stderr = os.fdopen(self.newstderr, 'w', 0) + os.dup2(self.newstdout, 1) + os.dup2(self.newstderr, 2) + sys.stdout = os.fdopen(self.newstdout, 'w', 0) + sys.stderr = os.fdopen(self.newstderr, 'w', 0) f = cdms2.open(cmor.get_final_filename(), "r") a = f.getglobal("tracking_id").split('/')[0] diff --git a/Test/test_python_CMIP6_driving.py b/Test/test_python_CMIP6_driving.py index ad93a748..0b78ce42 100644 --- a/Test/test_python_CMIP6_driving.py +++ b/Test/test_python_CMIP6_driving.py @@ -65,18 +65,23 @@ def testCMIP6(self): cmor.load_table("CMIP6_Omon.json") itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array( [0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): - cmor.write(ivar, data[i:i]) # ,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1])) + # ,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1])) + cmor.write(ivar, data[i:i]) cmor.close() - except: + except BaseException: os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) sys.stdout = os.fdopen(self.newstdout, 'w', 0) sys.stderr = os.fdopen(self.newstderr, 'w', 0) self.assertIn('d', testOK) + if __name__ == '__main__': run() diff --git a/Test/test_python_CMIP6_experimentID.py b/Test/test_python_CMIP6_experimentID.py index 095a6b03..88c3ebca 100644 --- a/Test/test_python_CMIP6_experimentID.py +++ b/Test/test_python_CMIP6_experimentID.py @@ -65,13 +65,17 @@ def testCMIP6(self): cmor.load_table("CMIP6_Omon.json") itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array( [0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): - cmor.write(ivar, data[i:i]) # ,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1])) + # ,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1])) + cmor.write(ivar, data[i:i]) cmor.close() - except: + except BaseException: os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) sys.stdout = os.fdopen(self.newstdout, 'w', 0) @@ -79,5 +83,6 @@ def testCMIP6(self): testOK = self.getAssertTest() self.assertIn('piControlbad', testOK) + if __name__ == '__main__': run() diff --git a/Test/test_python_CMIP6_projections.py b/Test/test_python_CMIP6_projections.py new file mode 100644 index 00000000..fb0bd713 --- /dev/null +++ b/Test/test_python_CMIP6_projections.py @@ -0,0 +1,112 @@ +# If this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import os +import sys +import tempfile + +# ============================== +# main thread +# ============================== + + +def run(): + unittest.main() + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # Create x and y coordinates and bounds. + # + coordVals = numpy.arange(-533750.0, 533750.0 + + 2500.0, 2500.0, numpy.float32) + coordBnds = numpy.zeros((coordVals.shape[0], 2), numpy.float32) + + coordBnds[:, 0] = coordVals - 1250.0 + coordBnds[:, 1] = coordVals + 1250.0 + + # Create longitude and latitude fields for a polar stereographic projection. + # + xgrid, ygrid = numpy.broadcast_arrays( + numpy.expand_dims( + coordVals, 0), numpy.expand_dims( + coordVals, 1)) + + rhogrid = numpy.sqrt(xgrid**2 + ygrid**2) + cgrid = 2.0 * numpy.arctan((0.5 / 6378137.0) * rhogrid) + latgrid = (180.0 / 3.141592654) * numpy.arcsin(numpy.cos(cgrid)) + longrid = (180.0 / 3.141592654) * numpy.arctan2(xgrid, -ygrid) + + # Set up CMOR with information from the CMOR config dictionary. + # + + cmor.setup("Tables", netcdf_file_action=cmor.CMOR_REPLACE_4) + + # Create the output CMOR dataset using the output configuration. + # + cmor.dataset_json("Test/common_user_input.json") + + # Load the grid table. + # + cmor_table_obj = cmor.load_table("CMIP6_grids.json") + + # Create ygre and xgre axes. + # + entry = { + 'table_entry': 'y', + 'units': 'm', + 'coord_vals': coordVals, + 'cell_bounds': coordBnds} + + axis_ygre = cmor.axis(**entry) + + entry = { + 'table_entry': 'x', + 'units': 'm', + 'coord_vals': coordVals, + 'cell_bounds': coordBnds} + + axis_xgre = cmor.axis(**entry) + + # Create the grid + # + grid_id = cmor.grid( + axis_ids=[ + axis_ygre, + axis_xgre], + latitude=latgrid, + longitude=longrid) + + # Set the CMOR grid mapping. + # + # mapnm = 'polar_stereographic' + param_dict = { + 'latitude_of_projection_origin': [90.0, 'degrees_north'], + 'straight_vertical_longitude_from_pole': [135.0, 'degrees_east'], + 'standard_parallel': [70.0, 'degrees_north'], + 'false_northing': [0.0, 'meters'], + 'false_easting': [0.0, 'meters'] + } + ierr = cmor.set_grid_mapping( + grid_id, 'polar_stereographic', param_dict) + self.assertEqual(ierr, 0) + + +if __name__ == '__main__': + run() diff --git a/Test/test_python_CMIP6_wrong_activity.py b/Test/test_python_CMIP6_wrong_activity.py index 51436819..48c60ba0 100644 --- a/Test/test_python_CMIP6_wrong_activity.py +++ b/Test/test_python_CMIP6_wrong_activity.py @@ -66,10 +66,14 @@ def testCMIP6(self): cmor.load_table("CMIP6_Omon.json") itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array( [0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) - ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') + ivar = cmor.variable( + table_entry="masso", + axis_ids=[itime], + units='kg') data = numpy.random.random(5) for i in range(0, 5): - cmor.write(ivar, data[i:i]) # ,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1])) + # ,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1])) + cmor.write(ivar, data[i:i]) cmor.close() os.dup2(self.newstdout, 1) os.dup2(self.newstderr, 2) @@ -77,8 +81,9 @@ def testCMIP6(self): sys.stderr = os.fdopen(self.newstderr, 'w', 0) testOK = self.getAssertTest() self.assertIn('CMIP5-PMIP', testOK) - except: + except BaseException: raise + if __name__ == '__main__': run() diff --git a/Test/test_python_YYYMMDDHH_exp_fmt.py b/Test/test_python_YYYMMDDHH_exp_fmt.py index 873fe35b..714648a2 100644 --- a/Test/test_python_YYYMMDDHH_exp_fmt.py +++ b/Test/test_python_YYYMMDDHH_exp_fmt.py @@ -1,36 +1,38 @@ import cmor + def path_test(): - cmor.setup(inpath='Test',netcdf_file_action=cmor.CMOR_REPLACE) + cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") - - table='Tables/CMIP6_Amon.json' + + table = 'Tables/CMIP6_Amon.json' cmor.load_table(table) - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - 'coord_vals': [15], - 'cell_bounds': [0, 30] - }, - {'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]}, - ] - + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + 'coord_vals': [15], + 'cell_bounds': [0, 30] + }, + {'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]) - path=cmor.close(varid, file_name=True) + path = cmor.close(varid, file_name=True) + + print "Saved file: ", path - print "Saved file: ",path if __name__ == '__main__': path_test() diff --git a/Test/test_python_alastair_1.py b/Test/test_python_alastair_1.py index 8a4e9d10..7a7442cf 100644 --- a/Test/test_python_alastair_1.py +++ b/Test/test_python_alastair_1.py @@ -1,71 +1,70 @@ -import cmor,numpy +import cmor +import numpy error_flag = cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) - + error_flag = cmor.dataset_json("Test/common_user_input.json") # creates 1 degree grid -nlat=18 -nlon=36 -alats = numpy.arange(180)-89.5 -bnds_lat = numpy.arange(181)-90 -alons=numpy.arange(360)+.5 -bnds_lon=numpy.arange(361) +nlat = 18 +nlon = 36 +alats = numpy.arange(180) - 89.5 +bnds_lat = numpy.arange(181) - 90 +alons = numpy.arange(360) + .5 +bnds_lon = numpy.arange(361) cmor.load_table("CMIP6_Amon.json") -ilat = cmor.axis( - table_entry='latitude', - units='degrees_north', - length=nlat, - coord_vals=alats, - cell_bounds=bnds_lat) +ilat = cmor.axis( + table_entry='latitude', + units='degrees_north', + length=nlat, + coord_vals=alats, + cell_bounds=bnds_lat) -ilon = cmor.axis( - table_entry='longitude', - length=nlon, - units='degrees_east', - coord_vals=alons, - cell_bounds=bnds_lon) +ilon = cmor.axis( + table_entry='longitude', + length=nlon, + units='degrees_east', + coord_vals=alons, + cell_bounds=bnds_lon) -ntimes=12 -plevs = numpy.array([100000., 92500., 85000., 70000., 60000., 50000., 40000., 30000., 25000., - 20000., 15000., 10000., 7000., 5000., 3000., 2000., 1000., 500., 100.]) -plevs=plevs[::-1] +ntimes = 12 +plevs = numpy.array([100000., 92500., 85000., 70000., 60000., 50000., 40000., 30000., 25000., + 20000., 15000., 10000., 7000., 5000., 3000., 2000., 1000., 500., 100.]) +plevs = plevs[::-1] -itim = cmor.axis( - table_entry='time', - units='months since 2030-1-1', - length=ntimes, +itim = cmor.axis( + table_entry='time', + units='months since 2030-1-1', + length=ntimes, interval='1 month') -ilev = cmor.axis( - table_entry='plev19', - units='Pa', - coord_vals=plevs, - cell_bounds=None) - +ilev = cmor.axis( + table_entry='plev19', + units='Pa', + coord_vals=plevs, + cell_bounds=None) + -var3d_ids = cmor.variable( - table_entry='ta', - units='K', - axis_ids=numpy.array((ilev, ilon, ilat,itim)), - missing_value=numpy.array([1.0e28,],dtype=numpy.float32)[0], +var3d_ids = cmor.variable( + table_entry='ta', + units='K', + axis_ids=numpy.array((ilev, ilon, ilat, itim)), + missing_value=numpy.array([1.0e28, ], dtype=numpy.float32)[0], original_name='cloud') - for it in range(ntimes): time = numpy.array((it)) - bnds_time = numpy.array((it,it+1)) - data3d = numpy.random.random((len(plevs),nlon,nlat))*30.+265. + bnds_time = numpy.array((it, it + 1)) + data3d = numpy.random.random((len(plevs), nlon, nlat)) * 30. + 265. data3d = data3d.astype('f') - error_flag = cmor.write( - var_id = var3d_ids, - data = data3d, - ntimes_passed = 1, - time_vals = time, - time_bnds = bnds_time ) + error_flag = cmor.write( + var_id=var3d_ids, + data=data3d, + ntimes_passed=1, + time_vals=time, + time_bnds=bnds_time) - -error_flag = cmor.close() +error_flag = cmor.close() diff --git a/Test/test_python_appending.py b/Test/test_python_appending.py index 474d4d3c..e462f146 100644 --- a/Test/test_python_appending.py +++ b/Test/test_python_appending.py @@ -1,84 +1,104 @@ -import cmor,numpy +import cmor +import numpy nlat = 90 nlon = 180 -def mywrite(data = None, time_vals = None, append_to = None,cell_bounds=None): + +def mywrite(data=None, time_vals=None, append_to=None, cell_bounds=None): breq = "100000. 80000. 80000. 68000. 68000. 56000. 56000. 44000. 44000. 31000. 31000. 18000. 18000. 0.".split() bnds_req = [] for b in breq: bnds_req.append(float(b)) - bnds_req=numpy.array(bnds_req) - bnds_req.shape=(7,2) + bnds_req = numpy.array(bnds_req) + bnds_req.shape = (7, 2) print bnds_req[-2], bnds_req.shape - levs=[] + levs = [] for b in bnds_req: - levs.append((b[0]+b[1])/2.) + levs.append((b[0] + b[1]) / 2.) - levs=numpy.array(levs) + levs = numpy.array(levs) print levs - ipth="Test" + ipth = "Test" if append_to is None: mode = cmor.CMOR_REPLACE else: mode = cmor.CMOR_APPEND - print 'Mode in python:',mode + print 'Mode in python:', mode cmor.setup(inpath=ipth, set_verbosity=cmor.CMOR_NORMAL, - netcdf_file_action = mode, - logfile = None) + netcdf_file_action=mode, + logfile=None) cmor.dataset_json("Test/common_user_input.json") cmor.load_table("Tables/CMIP6_Amon.json") - dlat = 180/nlat - dlon = 360./nlon - lats = numpy.arange(-90+dlat/2.,90,dlat) - bnds_lat = numpy.arange(-90,90+dlat,dlat) - lons = numpy.arange(0+dlon/2.,360.,dlon)-180. - bnds_lon = numpy.arange(0,360.+dlon,dlon)-180. + dlat = 180 / nlat + dlon = 360. / nlon + lats = numpy.arange(-90 + dlat / 2., 90, dlat) + bnds_lat = numpy.arange(-90, 90 + dlat, dlat) + lons = numpy.arange(0 + dlon / 2., 360., dlon) - 180. + bnds_lon = numpy.arange(0, 360. + dlon, dlon) - 180. plevs = numpy.array([100000., 92500., 85000., 70000., 60000., 50000., 40000., 30000., 25000., 20000., 15000., 10000., 7000., 5000., 3000., 2000., 1000., 500., 100.]) - itim = cmor.axis(table_entry='time',units='month since 2008') + itim = cmor.axis(table_entry='time', units='month since 2008') #itim = cmor.axis(table_entry='time',units='month since 2008',coord_vals=numpy.arange(0,12,1)) - ilat = cmor.axis(table_entry='latitude',coord_vals=lats,units='degrees_north',cell_bounds=bnds_lat) - ilon = cmor.axis(table_entry='longitude',coord_vals=lons,units='degrees_east',cell_bounds=bnds_lon) - print 'so far',itim,ilat,ilon - ilev = cmor.axis(table_entry="plev19",coord_vals=plevs,units="Pa") - - iv = cmor.variable(table_entry='ta',axis_ids=numpy.array((itim,ilev,ilat,ilon)),units='K') - - #cmor.write(iv,data) + ilat = cmor.axis( + table_entry='latitude', + coord_vals=lats, + units='degrees_north', + cell_bounds=bnds_lat) + ilon = cmor.axis( + table_entry='longitude', + coord_vals=lons, + units='degrees_east', + cell_bounds=bnds_lon) + print 'so far', itim, ilat, ilon + ilev = cmor.axis(table_entry="plev19", coord_vals=plevs, units="Pa") + + iv = cmor.variable( + table_entry='ta', axis_ids=numpy.array( + (itim, ilev, ilat, ilon)), units='K') + + # cmor.write(iv,data) if append_to is None: - print 'time:',time_vals - print 'bnds:',cell_bounds - cmor.write(iv,data,time_vals=time_vals,time_bnds=cell_bounds)#,file_suffix="with-appending") + print 'time:', time_vals + print 'bnds:', cell_bounds + # ,file_suffix="with-appending") + cmor.write(iv, data, time_vals=time_vals, time_bnds=cell_bounds) else: - print 'Ok writing with a suffix',append_to - cmor.write(iv,data,time_vals=time_vals,file_suffix=append_to,time_bnds=cell_bounds) + print 'Ok writing with a suffix', append_to + cmor.write( + iv, + data, + time_vals=time_vals, + file_suffix=append_to, + time_bnds=cell_bounds) print 'and back' - file = cmor.close(iv,file_name=True) - print 'Ok dumped to:',file + file = cmor.close(iv, file_name=True) + print 'Ok dumped to:', file cmor.close() return file ntime = 12 -data = numpy.random.random((ntime,19,nlat,nlon))+280. +data = numpy.random.random((ntime, 19, nlat, nlon)) + 280. -f1 = mywrite(data = data[:6], time_vals = numpy.arange(0,6,1),cell_bounds=numpy.arange(0,7,1)) -print 'First part: ',f1 -f2 = mywrite(data = data[6:], time_vals = numpy.arange(6,12,1), cell_bounds=numpy.arange(6,13,1), append_to=f1) +f1 = mywrite(data=data[:6], time_vals=numpy.arange( + 0, 6, 1), cell_bounds=numpy.arange(0, 7, 1)) +print 'First part: ', f1 +f2 = mywrite(data=data[6:], time_vals=numpy.arange( + 6, 12, 1), cell_bounds=numpy.arange(6, 13, 1), append_to=f1) print f2 diff --git a/Test/test_python_bad_date.py b/Test/test_python_bad_date.py index f194b472..79b57f7c 100644 --- a/Test/test_python_bad_date.py +++ b/Test/test_python_bad_date.py @@ -1,60 +1,63 @@ import cmor import numpy + def cmor_initialisation(): cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3, - create_subdirectories = 0) + netcdf_file_action=cmor.CMOR_REPLACE_3, + create_subdirectories=0) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', '360_day', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - parent_experiment_rip = 'N/A', - branch_time = 0., - contact = 'bob', - outpath = 'Test') + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + parent_experiment_rip='N/A', + branch_time=0., + contact='bob', + outpath='Test') + def setup_data(): - ntimes=7200 - tvals = numpy.arange(ntimes)*6. + ntimes = 7200 + tvals = numpy.arange(ntimes) * 6. tbnds = list(tvals) tbnds.append(43200) - tbnds=numpy.array(tbnds)-3. - print "tvals:",tvals - print "tbnds:",tbnds + tbnds = numpy.array(tbnds) - 3. + print "tvals:", tvals + print "tbnds:", tbnds import cdtime - tunits='hours since 209-01-01 06:00:00' - t1=cdtime.reltime(tvals[0],tunits) - t2=cdtime.reltime(tvals[-1],tunits) - t3=cdtime.reltime(tbnds[-1],tunits) - print t1.tocomp(),t1.tocomp(cdtime.Calendar360) - print t2.tocomp(),t2.tocomp(cdtime.Calendar360) - print t3.tocomp(),t3.tocomp(cdtime.Calendar360) - - axes = [ {'table_entry': 'time1', - 'units': tunits, - 'coord_vals' : tvals, - 'cell_bounds' : tbnds, - }, - {'table_entry': 'latitude', - 'units': 'degrees_north', - 'coord_vals': [0], - 'cell_bounds': [-5,5]}, - {'table_entry': 'longitude', - 'units': 'degrees_east', - 'coord_vals': [0], - 'cell_bounds':[-10,10]}, - ## {'table_entry': 'depth', - ## 'units': 'm', - ## 'coord_vals': [10], - ## 'cell_bounds': [5,15]}, - ] - - values = numpy.ones(ntimes)*1013. + tunits = 'hours since 209-01-01 06:00:00' + t1 = cdtime.reltime(tvals[0], tunits) + t2 = cdtime.reltime(tvals[-1], tunits) + t3 = cdtime.reltime(tbnds[-1], tunits) + print t1.tocomp(), t1.tocomp(cdtime.Calendar360) + print t2.tocomp(), t2.tocomp(cdtime.Calendar360) + print t3.tocomp(), t3.tocomp(cdtime.Calendar360) + + axes = [{'table_entry': 'time1', + 'units': tunits, + 'coord_vals': tvals, + 'cell_bounds': tbnds, + }, + {'table_entry': 'latitude', + 'units': 'degrees_north', + 'coord_vals': [0], + 'cell_bounds': [-5, 5]}, + {'table_entry': 'longitude', + 'units': 'degrees_east', + 'coord_vals': [0], + 'cell_bounds':[-10, 10]}, + # {'table_entry': 'depth', + # 'units': 'm', + # 'coord_vals': [10], + # 'cell_bounds': [5,15]}, + ] + + values = numpy.ones(ntimes) * 1013. return values.astype("f"), axes + def cmor_define_and_write(values, axes): table = '/git/cmip5-cmor-tables/Tables/CMIP5_6hrPlev' cmor.load_table(table) @@ -67,26 +70,26 @@ def cmor_define_and_write(values, axes): #gid = cmor.grid([site_axis_id,],latitude=numpy.array([-20,]),longitude=numpy.array([150,])) - - axis_ids = [time_axis_id,lat_axis_id,lon_axis_id] + axis_ids = [time_axis_id, lat_axis_id, lon_axis_id] varid = cmor.variable('psl', 'hPa', axis_ids, - history = 'variable history', - missing_value = -99, + history='variable history', + missing_value=-99, ) cmor.write(varid, values) return varid - - + + def main(): - + cmor_initialisation() - values,axes = setup_data() + values, axes = setup_data() vid = cmor_define_and_write(values, axes) - print cmor.close(var_id=vid,file_name=True) - + print cmor.close(var_id=vid, file_name=True) + + if __name__ == '__main__': main() diff --git a/Test/test_python_bentley_01.py b/Test/test_python_bentley_01.py index c50dc819..ccc7fdd2 100644 --- a/Test/test_python_bentley_01.py +++ b/Test/test_python_bentley_01.py @@ -2,38 +2,41 @@ import numpy import cdtime + def cmor_initialisation(): cmor.setup(inpath='/git/cmip5-cmor-tables/Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3, - create_subdirectories = 0) + netcdf_file_action=cmor.CMOR_REPLACE_3, + create_subdirectories=0) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', '360_day', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - parent_experiment_rip = 'N/A', - branch_time = 0., - contact = 'bob', - outpath = './out') + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + parent_experiment_rip='N/A', + branch_time=0., + contact='bob', + outpath='./out') + def setup_data(): - axes = [ {'table_entry': 'time1', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'table_entry': 'site', - 'units': '', - 'coord_vals': [0]}, - {'table_entry': 'hybrid_height', - 'units': 'm', - 'coord_vals': range(2), - 'cell_bounds': [[x-0.5, x+0.5] for x in range(2)], - }, - ] + axes = [{'table_entry': 'time1', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'table_entry': 'site', + 'units': '', + 'coord_vals': [0]}, + {'table_entry': 'hybrid_height', + 'units': 'm', + 'coord_vals': range(2), + 'cell_bounds': [[x - 0.5, x + 0.5] for x in range(2)], + }, + ] values = numpy.array([0.5, 0.5], numpy.float32) return values, axes + def cmor_define_and_write(values, axes): table = 'CMIP5_cfSites' cmor.load_table(table) @@ -44,38 +47,38 @@ def cmor_define_and_write(values, axes): axis_ids.append(axis_id) igrid = cmor.grid([axis_ids[1]], [0.], [0.]) - cmor.zfactor(axis_ids[2], 'b', axis_ids = [axis_ids[2]], - zfactor_values = range(2), - zfactor_bounds = [[x-0.5, x+0.5] for x in range(2)]) + cmor.zfactor(axis_ids[2], 'b', axis_ids=[axis_ids[2]], + zfactor_values=range(2), + zfactor_bounds=[[x - 0.5, x + 0.5] for x in range(2)]) - cmor.zfactor(axis_ids[2], 'orog', 'm', axis_ids = [igrid], - zfactor_values = [0]) + cmor.zfactor(axis_ids[2], 'orog', 'm', axis_ids=[igrid], + zfactor_values=[0]) ids_for_var = [axis_ids[0], igrid, axis_ids[2]] varid = cmor.variable('tnhus', 's-1', ids_for_var, - history = 'variable history', - missing_value = -99, + history='variable history', + missing_value=-99, ) - for time in [x * 1800./ 86400 for x in range(48)]: - time += 1./3600./24. - tr = cdtime.reltime(time,axes[0]["units"]) - print "Writing: %.03f" % time,"|",tr.tocomp(cdtime.Calendar360),"|",tr.tocomp() - cmor.write(varid, values, time_vals = [time]) + for time in [x * 1800. / 86400 for x in range(48)]: + time += 1. / 3600. / 24. + tr = cdtime.reltime(time, axes[0]["units"]) + print "Writing: %.03f" % time, "|", tr.tocomp(cdtime.Calendar360), "|", tr.tocomp() + cmor.write(varid, values, time_vals=[time]) return varid def main(): - + cmor_initialisation() values, axes = setup_data() varid = cmor_define_and_write(values, axes) - fname = cmor.close(varid, file_name = True) - print "Done:",fname + fname = cmor.close(varid, file_name=True) + print "Done:", fname + - if __name__ == '__main__': main() diff --git a/Test/test_python_bounds_request.py b/Test/test_python_bounds_request.py index 72715af8..4c6eab0c 100644 --- a/Test/test_python_bounds_request.py +++ b/Test/test_python_bounds_request.py @@ -1,4 +1,5 @@ -import cmor,numpy +import cmor +import numpy breq = "100000. 80000. 80000. 68000. 68000. 56000. 56000. 44000. 44000. 31000. 31000. 18000. 18000. 0.".split() @@ -6,48 +7,66 @@ for b in breq: bnds_req.append(float(b)) -bnds_req=numpy.array(bnds_req) -bnds_req.shape=(7,2) +bnds_req = numpy.array(bnds_req) +bnds_req.shape = (7, 2) print bnds_req[-2], bnds_req.shape -levs=[] +levs = [] for b in bnds_req: - levs.append((b[0]+b[1])/2.) + levs.append((b[0] + b[1]) / 2.) -levs=numpy.array(levs) +levs = numpy.array(levs) print levs cmor.setup(inpath="Tables", set_verbosity=cmor.CMOR_NORMAL, - netcdf_file_action = cmor.CMOR_REPLACE, - logfile = None) + netcdf_file_action=cmor.CMOR_REPLACE, + logfile=None) cmor.dataset_json("Test/common_user_inputNOBOUNDS.json") cmor.load_table("TestTables/python_test_table_A") nlat = 90 -dlat = 180/nlat +dlat = 180 / nlat nlon = 180 -dlon = 360./nlon +dlon = 360. / nlon -lats = numpy.arange(-90+dlat/2.,90,dlat) -lons = numpy.arange(0,360.,dlon) +lats = numpy.arange(-90 + dlat / 2., 90, dlat) +lons = numpy.arange(0, 360., dlon) ntime = 12 -data = numpy.random.random((ntime,7,nlat,nlon))+280. - -itim = cmor.axis(table_entry='time',coord_vals=numpy.arange(0,ntime,1),units='month since 2008') -ilat = cmor.axis(table_entry='latitude',coord_vals=lats,units='degrees_north') -ilon = cmor.axis(table_entry='longitude',coord_vals=lons,units='degrees_east') -print 'so far',itim,ilat,ilon +data = numpy.random.random((ntime, 7, nlat, nlon)) + 280. + +itim = cmor.axis( + table_entry='time', + coord_vals=numpy.arange( + 0, + ntime, + 1), + units='month since 2008') +ilat = cmor.axis( + table_entry='latitude', + coord_vals=lats, + units='degrees_north') +ilon = cmor.axis( + table_entry='longitude', + coord_vals=lons, + units='degrees_east') +print 'so far', itim, ilat, ilon print bnds_req -ilev = cmor.axis(table_entry="pressure2",coord_vals=levs,cell_bounds=bnds_req,units="Pa") +ilev = cmor.axis( + table_entry="pressure2", + coord_vals=levs, + cell_bounds=bnds_req, + units="Pa") -iv = cmor.variable(table_entry='ta',axis_ids=numpy.array((itim,ilev,ilat,ilon)),units='K') +iv = cmor.variable( + table_entry='ta', axis_ids=numpy.array( + (itim, ilev, ilat, ilon)), units='K') -cmor.write(iv,data) +cmor.write(iv, data) diff --git a/Test/test_python_cfmip_site_axis_test.py b/Test/test_python_cfmip_site_axis_test.py index 20792b86..18c8ff08 100644 --- a/Test/test_python_cfmip_site_axis_test.py +++ b/Test/test_python_cfmip_site_axis_test.py @@ -33,65 +33,76 @@ MIP_TABLE_DIR = 'Tables' # set according to your MIP table location -#--------------------------------------------------------------------------------------------------- -def setup_cmor() : -#--------------------------------------------------------------------------------------------------- - # Initialise CMOR library - cmor.setup(inpath=MIP_TABLE_DIR, netcdf_file_action=cmor.CMOR_REPLACE_3, - set_verbosity=cmor.CMOR_NORMAL, create_subdirectories=0) - - # Create CMOR dataset - cmor.dataset_json("Test/common_user_input.json") - -#--------------------------------------------------------------------------------------------------- -if __name__ == '__main__' : -#--------------------------------------------------------------------------------------------------- - - # Initialise CMOR dataset and table - setup_cmor() - - # Set dummy site lats and longs. - site_lats = numpy.array([-90.0, 0.0, 90.0], dtype=numpy.float32) - site_lons = numpy.array([0.0, 0.0, 0.0], dtype=numpy.float32) - - # Create CMOR axes and grids - table_id = cmor.load_table('CMIP6_CFsubhr.json') - taxis_id = cmor.axis('time1', units='days since 2000-01-01 00:00:00') #, length=1, interval='30 minutes') - print 'ok: created time axis' - - saxis_id = cmor.axis('site', units='1', coord_vals=[1,2,3]) - print 'ok: created site axis',saxis_id - - zaxis_id = cmor.axis('hybrid_height', units='m', coord_vals=[1.0], cell_bounds=[0.0,2.0]) - print 'ok: created height axis',zaxis_id - - # Create zfactors for b and orog for hybrid height axis. - # Where do these get used, if anywhere? - bfact_id = cmor.zfactor(zaxis_id, 'b', '1', [zaxis_id], 'd', zfactor_values=[1.0], - zfactor_bounds=[0.0,2.0]) - print 'ok: created b zfactors' - - # Create grid object to link site-dimensioned variables to (lat,long). - # Need to make CMIP6_grids the current MIP table for this to work. - table_id = cmor.load_table('CMIP6_grids.json') - gaxis_id = cmor.grid([saxis_id], site_lats, site_lons) - print 'ok: created site grid' - - # Create CMOR variable for cloud area fraction: MIP name = 'cl', STASH = m01s02i261*100 - table_id = cmor.load_table('CMIP6_CFsubhr.json') - var_id = cmor.variable('cl', '%', [taxis_id, gaxis_id, zaxis_id], type='f', - missing_value=-99.0, original_name='STASH m01s02i261*100') - print 'ok: created variable for "cl"' - - ofact_id = cmor.zfactor(zaxis_id, 'orog', 'm', [gaxis_id], 'd', - zfactor_values=[123.0]) - print 'ok: created orog zfactors' - # Write some data to this variable. First convert raw data to numpy arrays. - shape = (1, 3, 1) - data = numpy.array([10, 20, 30], dtype=numpy.float32) - data = data.reshape(shape) - cmor.write(var_id, data, time_vals=[1.0]) - print 'ok: wrote variable data' - - # Close CMOR. - cmor.close() +#------------------------------------------------------------------------- + + +def setup_cmor(): + #------------------------------------------------------------------------- + # Initialise CMOR library + cmor.setup(inpath=MIP_TABLE_DIR, netcdf_file_action=cmor.CMOR_REPLACE_3, + set_verbosity=cmor.CMOR_NORMAL, create_subdirectories=0) + + # Create CMOR dataset + cmor.dataset_json("Test/common_user_input.json") + + +#------------------------------------------------------------------------- +if __name__ == '__main__': + #------------------------------------------------------------------------- + + # Initialise CMOR dataset and table + setup_cmor() + + # Set dummy site lats and longs. + site_lats = numpy.array([-90.0, 0.0, 90.0], dtype=numpy.float32) + site_lons = numpy.array([0.0, 0.0, 0.0], dtype=numpy.float32) + + # Create CMOR axes and grids + table_id = cmor.load_table('CMIP6_CFsubhr.json') + # , length=1, interval='30 minutes') + taxis_id = cmor.axis('time1', units='days since 2000-01-01 00:00:00') + print 'ok: created time axis' + + saxis_id = cmor.axis('site', units='1', coord_vals=[1, 2, 3]) + print 'ok: created site axis', saxis_id + + zaxis_id = cmor.axis( + 'hybrid_height', + units='m', + coord_vals=[1.0], + cell_bounds=[ + 0.0, + 2.0]) + print 'ok: created height axis', zaxis_id + + # Create zfactors for b and orog for hybrid height axis. + # Where do these get used, if anywhere? + bfact_id = cmor.zfactor(zaxis_id, 'b', '1', [zaxis_id], 'd', zfactor_values=[1.0], + zfactor_bounds=[0.0, 2.0]) + print 'ok: created b zfactors' + + # Create grid object to link site-dimensioned variables to (lat,long). + # Need to make CMIP6_grids the current MIP table for this to work. + table_id = cmor.load_table('CMIP6_grids.json') + gaxis_id = cmor.grid([saxis_id], site_lats, site_lons) + print 'ok: created site grid' + + # Create CMOR variable for cloud area fraction: MIP name = 'cl', STASH = + # m01s02i261*100 + table_id = cmor.load_table('CMIP6_CFsubhr.json') + var_id = cmor.variable('cl', '%', [taxis_id, gaxis_id, zaxis_id], type='f', + missing_value=-99.0, original_name='STASH m01s02i261*100') + print 'ok: created variable for "cl"' + + ofact_id = cmor.zfactor(zaxis_id, 'orog', 'm', [gaxis_id], 'd', + zfactor_values=[123.0]) + print 'ok: created orog zfactors' + # Write some data to this variable. First convert raw data to numpy arrays. + shape = (1, 3, 1) + data = numpy.array([10, 20, 30], dtype=numpy.float32) + data = data.reshape(shape) + cmor.write(var_id, data, time_vals=[1.0]) + print 'ok: wrote variable data' + + # Close CMOR. + cmor.close() diff --git a/Test/test_python_clim_bounds.py b/Test/test_python_clim_bounds.py index 19cba4c9..01f60a27 100644 --- a/Test/test_python_clim_bounds.py +++ b/Test/test_python_clim_bounds.py @@ -2,58 +2,62 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='/git/cmip5-cmor-tables/Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3) + netcdf_file_action=cmor.CMOR_REPLACE_3) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', '360_day', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - parent_experiment_rip = 'N/A', - branch_time = 0, - contact = 'brian clough') - + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + parent_experiment_rip='N/A', + branch_time=0, + contact='brian clough') + table = 'CMIP5_Oclim' cmor.load_table(table) - axes = [ {'table_entry': 'time2', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'table_entry': 'depth_coord', - 'units': 'm', - 'coord_vals': [ 500,1000.], - 'cell_bounds': [ 0.,750.,1200.]}, - {'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]}, - ] + axes = [{'table_entry': 'time2', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'table_entry': 'depth_coord', + 'units': 'm', + 'coord_vals': [500, 1000.], + 'cell_bounds': [0., 750., 1200.]}, + {'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: - print 'doing:',axis + print 'doing:', axis axis_id = cmor.axis(**axis) axis_ids.append(axis_id) for var, units, value in (('tnpeot', 'W m-2', 274),): - values = numpy.array([value,]*len(axes[1]['coord_vals']), numpy.float32) + values = numpy.array([value, ] * + len(axes[1]['coord_vals']), numpy.float32) varid = cmor.variable(var, units, axis_ids, - history = 'variable history', - missing_value = -99 + history='variable history', + missing_value=-99 ) for i in range(12): - cmor.write(varid, values, time_vals = [30*i+15], time_bnds = [ [30*i,360+30*(i+1)] ]) + cmor.write(varid, values, time_vals=[ + 30 * i + 15], time_bnds=[[30 * i, 360 + 30 * (i + 1)]]) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_clim_bounds_02.py b/Test/test_python_clim_bounds_02.py index 228cb37d..98a77031 100644 --- a/Test/test_python_clim_bounds_02.py +++ b/Test/test_python_clim_bounds_02.py @@ -2,71 +2,74 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='/git/cmip5-cmor-tables/Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3) + netcdf_file_action=cmor.CMOR_REPLACE_3) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', 'noleap', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - parent_experiment_rip = 'N/A', - branch_time = 0, - contact = 'brian clough') - + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + parent_experiment_rip='N/A', + branch_time=0, + contact='brian clough') + table = 'CMIP5_Oclim' cmor.load_table(table) - axes = [ {'table_entry': 'time2', - 'units': 'days since 1861', - 'coord_vals': [48925.5, 48955, 48984.5, 49015, 49045.5, 49076, 49106.5, 49137.5, 49168, 49198.5, 49229, 49259.5 ], - 'cell_bounds': [ [ 45625, 52591], - [ 45656, 52619,], - [ 45684, 52650,], - [ 45715, 52680,], - [ 45745, 52711,], - [45776, 52741,], - [45806, 52772,], - [45837, 52803,], - [45868, 52833,], - [45898, 52864,], - [45929, 52894,], - [45959, 52925]], - }, - {'table_entry': 'depth_coord', - 'units': 'm', - 'coord_vals': [ 500,1000.], - 'cell_bounds': [ 0.,750.,1200.]}, - {'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]}, - ] + axes = [{'table_entry': 'time2', + 'units': 'days since 1861', + 'coord_vals': [48925.5, 48955, 48984.5, 49015, 49045.5, 49076, 49106.5, 49137.5, 49168, 49198.5, 49229, 49259.5], + 'cell_bounds': [[45625, 52591], + [45656, 52619, ], + [45684, 52650, ], + [45715, 52680, ], + [45745, 52711, ], + [45776, 52741, ], + [45806, 52772, ], + [45837, 52803, ], + [45868, 52833, ], + [45898, 52864, ], + [45929, 52894, ], + [45959, 52925]], + }, + {'table_entry': 'depth_coord', + 'units': 'm', + 'coord_vals': [500, 1000.], + 'cell_bounds': [0., 750., 1200.]}, + {'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: - print 'doing:',axis + print 'doing:', axis axis_id = cmor.axis(**axis) axis_ids.append(axis_id) for var, units, value in (('tnpeot', 'W m-2', 274),): - values = numpy.array([value,]*len(axes[1]['coord_vals']), numpy.float32) + values = numpy.array([value, ] * + len(axes[1]['coord_vals']), numpy.float32) varid = cmor.variable(var, units, axis_ids, - history = 'variable history', - missing_value = -99 + history='variable history', + missing_value=-99 ) for i in range(12): cmor.write(varid, values, ntimes_passed=1) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_clim_bounds_03.py b/Test/test_python_clim_bounds_03.py index d62f335f..d48aa1b0 100644 --- a/Test/test_python_clim_bounds_03.py +++ b/Test/test_python_clim_bounds_03.py @@ -2,72 +2,77 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='/git/cmip5-cmor-tables/Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3) + netcdf_file_action=cmor.CMOR_REPLACE_3) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', 'noleap', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - parent_experiment_rip = 'N/A', - branch_time = 0, - contact = 'brian clough') - + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + parent_experiment_rip='N/A', + branch_time=0, + contact='brian clough') + table = 'CMIP5_Oclim' cmor.load_table(table) - axes = [ {'table_entry': 'time2', - 'units': 'days since 1861', - 'coord_vals': [48925.5, 48955, 48984.5, 49015, 49045.5, 49076, 49106.5, 49137.5, 49168, 49198.5, 49229, 49259.5 ], - 'cell_bounds': [ [ 45625, 52591], - [ 45656, 52619,], - [ 45684, 52650,], - [ 45715, 52680,], - [ 45745, 52711,], - [45776, 52741,], - [45806, 52772,], - [45837, 52803,], - [45868, 52833,], - [45898, 52864,], - [45929, 52894,], - [45959, 52925]], - }, - {'table_entry': 'depth_coord', - 'units': 'm', - 'coord_vals': [ 500,1000.], - 'cell_bounds': [ 0.,750.,1200.]}, - {'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]}, - ] + axes = [{'table_entry': 'time2', + 'units': 'days since 1861', + 'coord_vals': [48925.5, 48955, 48984.5, 49015, 49045.5, 49076, 49106.5, 49137.5, 49168, 49198.5, 49229, 49259.5], + 'cell_bounds': [[45625, 52591], + [45656, 52619, ], + [45684, 52650, ], + [45715, 52680, ], + [45745, 52711, ], + [45776, 52741, ], + [45806, 52772, ], + [45837, 52803, ], + [45868, 52833, ], + [45898, 52864, ], + [45929, 52894, ], + [45959, 52925]], + }, + {'table_entry': 'depth_coord', + 'units': 'm', + 'coord_vals': [500, 1000.], + 'cell_bounds': [0., 750., 1200.]}, + {'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: - print 'doing:',axis + print 'doing:', axis axis_id = cmor.axis(**axis) axis_ids.append(axis_id) for var, units, value in (('tnpeot', 'W m-2', 274),): - values = numpy.ones((len(axes[0]['coord_vals']),len(axes[1]['coord_vals'])))*value + values = numpy.ones( + (len( + axes[0]['coord_vals']), len( + axes[1]['coord_vals']))) * value varid = cmor.variable(var, units, axis_ids, - history = 'variable history', - missing_value = -99 + history='variable history', + missing_value=-99 ) print values.shape - - cmor.write(varid, values)#, ntimes_passed=1) + + cmor.write(varid, values) # , ntimes_passed=1) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_clim_bounds_04.py b/Test/test_python_clim_bounds_04.py index 5049db6b..5502b009 100644 --- a/Test/test_python_clim_bounds_04.py +++ b/Test/test_python_clim_bounds_04.py @@ -2,71 +2,78 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='/git/cmip5-cmor-tables/Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3) + netcdf_file_action=cmor.CMOR_REPLACE_3) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', 'noleap', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - parent_experiment_rip = 'N/A', - branch_time = 0, - contact = 'brian clough') - + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + parent_experiment_rip='N/A', + branch_time=0, + contact='brian clough') + table = 'CMIP5_Oclim' cmor.load_table(table) - axes = [ {'table_entry': 'time2', - 'units': 'days since 1861', - }, - {'table_entry': 'depth_coord', - 'units': 'm', - 'coord_vals': [ 500,1000.], - 'cell_bounds': [ 0.,750.,1200.]}, - {'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]}, - ] + axes = [{'table_entry': 'time2', + 'units': 'days since 1861', + }, + {'table_entry': 'depth_coord', + 'units': 'm', + 'coord_vals': [500, 1000.], + 'cell_bounds': [0., 750., 1200.]}, + {'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]}, + ] - axes2={'coord_vals': [48925.5, 48955, 48984.5, 49015, 49045.5, 49076, 49106.5, 49137.5, 49168, 49198.5, 49229, 49259.5 ], - 'cell_bounds': [ [ 45625, 52591], - [ 45656, 52619,], - [ 45684, 52650,], - [ 45715, 52680,], - [ 45745, 52711,], - [45776, 52741,], - [45806, 52772,], - [45837, 52803,], - [45868, 52833,], - [45898, 52864,], - [45929, 52894,], - [45959, 52925]],} + axes2 = {'coord_vals': [48925.5, 48955, 48984.5, 49015, 49045.5, 49076, 49106.5, 49137.5, 49168, 49198.5, 49229, 49259.5], + 'cell_bounds': [[45625, 52591], + [45656, 52619, ], + [45684, 52650, ], + [45715, 52680, ], + [45745, 52711, ], + [45776, 52741, ], + [45806, 52772, ], + [45837, 52803, ], + [45868, 52833, ], + [45898, 52864, ], + [45929, 52894, ], + [45959, 52925]], } axis_ids = list() for axis in axes: - print 'doing:',axis + print 'doing:', axis axis_id = cmor.axis(**axis) axis_ids.append(axis_id) for var, units, value in (('tnpeot', 'W m-2', 274),): - values = numpy.array([value,]*len(axes[1]['coord_vals']), numpy.float32) + values = numpy.array([value, ] * + len(axes[1]['coord_vals']), numpy.float32) varid = cmor.variable(var, units, axis_ids, - history = 'variable history', - missing_value = -99 + history='variable history', + missing_value=-99 ) for i in range(12): - cmor.write(varid, values, time_vals=axes2["coord_vals"][i],time_bnds=axes2["cell_bounds"][i]) + cmor.write( + varid, + values, + time_vals=axes2["coord_vals"][i], + time_bnds=axes2["cell_bounds"][i]) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_common.py b/Test/test_python_common.py index 2162412a..280f0dbe 100644 --- a/Test/test_python_common.py +++ b/Test/test_python_common.py @@ -1,75 +1,76 @@ import numpy # this test tries to mimic ippc_test_code.c but from python # This one is using direct C calls from python not the python around it -ntimes=2 -lon=4 -lat=3 -lev=5 -lev2=19 -varin3d=["CLOUD", "U", "T" ]; - +ntimes = 2 +lon = 4 +lat = 3 +lev = 5 +lev2 = 19 +varin3d = ["CLOUD", "U", "T"] + # /* Units appropriate to my data */ -units3d=["%", "m s-1", "K"]; - +units3d = ["%", "m s-1", "K"] + # /* Corresponding IPCC Table A1c entry (variable name) */ -entry3d=["cl","ua","ta"]; +entry3d = ["cl", "ua", "ta"] # /* My variable names for IPCC Table A1a fields */ -varin2d=[ "LATENT","TSURF","SOIL_WET","PSURF" ]; - +varin2d = ["LATENT", "TSURF", "SOIL_WET", "PSURF"] + # /* Units appropriate to my data */ -units2d=[ "W m-2","K","kg m-2","Pa"]; - -positive2d=["down"," ", " ", " "]; - +units2d = ["W m-2", "K", "kg m-2", "Pa"] + +positive2d = ["down", " ", " ", " "] + # /* Corresponding IPCC Table A1a entry (variable name) */ -entry2d=["hfls", "tas","mrsos","ps"]; +entry2d = ["hfls", "tas", "mrsos", "ps"] -def gen_irreg_grid(lon,lat): +def gen_irreg_grid(lon, lat): lon0 = 280. - lat0=0.; - delta_lon = 10.; - delta_lat = 10.; + lat0 = 0. + delta_lon = 10. + delta_lat = 10. y = numpy.arange(lat) x = numpy.arange(lon) - lon_coords = numpy.zeros((lat,lon)) - lat_coords = numpy.zeros((lat,lon)) - lon_vertices = numpy.zeros((lat,lon,4)) - lat_vertices = numpy.zeros((lat,lon,4)) - - for j in range(lat): # really porr coding i know - for i in range(lon): # getting worse i know - lon_coords[j,i] = lon0+delta_lon*(j+1+i); - lat_coords[j,i] = lat0+delta_lat*(j+1-i); - lon_vertices[j,i,0] = lon_coords[j,i]-delta_lon; - lon_vertices[j,i,1] = lon_coords[j,i]; - lon_vertices[j,i,2] = lon_coords[j,i]+delta_lon; - lon_vertices[j,i,3] = lon_coords[j,i]; -## !!$ /* vertices lat */ - lat_vertices[j,i,0] = lat_coords[j,i]; - lat_vertices[j,i,1] = lat_coords[j,i]-delta_lat; - lat_vertices[j,i,2] = lat_coords[j,i]; - lat_vertices[j,i,3] = lat_coords[j,i]+delta_lat; - return x,y,lon_coords,lat_coords,lon_vertices,lat_vertices + lon_coords = numpy.zeros((lat, lon)) + lat_coords = numpy.zeros((lat, lon)) + lon_vertices = numpy.zeros((lat, lon, 4)) + lat_vertices = numpy.zeros((lat, lon, 4)) + + for j in range(lat): # really porr coding i know + for i in range(lon): # getting worse i know + lon_coords[j, i] = lon0 + delta_lon * (j + 1 + i) + lat_coords[j, i] = lat0 + delta_lat * (j + 1 - i) + lon_vertices[j, i, 0] = lon_coords[j, i] - delta_lon + lon_vertices[j, i, 1] = lon_coords[j, i] + lon_vertices[j, i, 2] = lon_coords[j, i] + delta_lon + lon_vertices[j, i, 3] = lon_coords[j, i] +# !!$ /* vertices lat */ + lat_vertices[j, i, 0] = lat_coords[j, i] + lat_vertices[j, i, 1] = lat_coords[j, i] - delta_lat + lat_vertices[j, i, 2] = lat_coords[j, i] + lat_vertices[j, i, 3] = lat_coords[j, i] + delta_lat + return x, y, lon_coords, lat_coords, lon_vertices, lat_vertices # read_data funcs are highly unoptimzed.... -def read_coords(lon,lat,lev): + + +def read_coords(lon, lat, lev): alons = numpy.zeros(lon) - bnds_lon = numpy.zeros(2*lon) + bnds_lon = numpy.zeros(2 * lon) alats = numpy.zeros(lat) - bnds_lat = numpy.zeros(2*lat) - plevs = numpy.zeros(lev,dtype='i') + bnds_lat = numpy.zeros(2 * lat) + plevs = numpy.zeros(lev, dtype='i') for i in range(lon): - alons[i] = i*360./lon - bnds_lon[2*i] = (i - 0.5)*360./lon - bnds_lon[2*i+1] = (i + 0.5)*360./lon - + alons[i] = i * 360. / lon + bnds_lon[2 * i] = (i - 0.5) * 360. / lon + bnds_lon[2 * i + 1] = (i + 0.5) * 360. / lon + for i in range(lat): - alats[i] = (lat-i)*10 - bnds_lat[2*i] = (lat-i)*10 + 5. - bnds_lat[2*i+1] = (lat-i)*10 - 5. - + alats[i] = (lat - i) * 10 + bnds_lat[2 * i] = (lat - i) * 10 + 5. + bnds_lat[2 * i + 1] = (lat - i) * 10 - 5. plevs = numpy.array([100000., 92500., 85000., 70000., 60000., 50000., 40000., 30000., 25000., 20000., @@ -77,76 +78,80 @@ def read_coords(lon,lat,lev): return alats, alons, plevs, bnds_lat, bnds_lon + def read_time(it): time = [0] - time_bnds=[0,0] - time[0] = (it-0.5)*30.; - time_bnds[0] = (it-1)*30.; - time_bnds[1] = it*30.; + time_bnds = [0, 0] + time[0] = (it - 0.5) * 30. + time_bnds[0] = (it - 1) * 30. + time_bnds[1] = it * 30. + + time[0] = it + time_bnds[0] = it + time_bnds[1] = it + 1 + return time[0], numpy.array(time_bnds) - time[0]=it; - time_bnds[0] = it; - time_bnds[1] = it+1; - return time[0],numpy.array(time_bnds) def read_3d_input_files(it, varname, n0, n1, n2, ntimes): - - if varname=="CLOUD": - factor = 0.1; - offset = -50.; - elif varname=="U": - factor = 1. - offset = 100. - elif varname=="T": - factor = 0.5; - offset = -150.; - - field = numpy.zeros((n2,n1,n0),dtype='d') - for k in range(n2): - for j in range(n1): - for i in range(n0): - field[k,j,i] = (k*64 + j*16 + i*4 + it)*factor - offset; - return field + + if varname == "CLOUD": + factor = 0.1 + offset = -50. + elif varname == "U": + factor = 1. + offset = 100. + elif varname == "T": + factor = 0.5 + offset = -150. + + field = numpy.zeros((n2, n1, n0), dtype='d') + for k in range(n2): + for j in range(n1): + for i in range(n0): + field[k, j, i] = (k * 64 + j * 16 + i * + 4 + it) * factor - offset + return field def read_2d_input_files(it, varname, n0, n1): - if varname=="LATENT": - factor = 1.25; - offset = 100.; + if varname == "LATENT": + factor = 1.25 + offset = 100. elif varname == "TSURF": - factor = 2.0; - offset = -230.; - elif varname=="SOIL_WET": - factor = 10.; - offset = 0.; + factor = 2.0 + offset = -230. + elif varname == "SOIL_WET": + factor = 10. + offset = 0. elif varname == "PSURF": - factor = 1.; - offset = -9.7e2; + factor = 1. + offset = -9.7e2 - field = numpy.zeros((n0,n1),dtype='d') + field = numpy.zeros((n0, n1), dtype='d') for j in range(n0): for i in range(n1): - tmp = (j*16. + i*4. + it)*factor - offset; - field[j,i] = tmp; + tmp = (j * 16. + i * 4. + it) * factor - offset + field[j, i] = tmp return field -alats, alons, plevs, bnds_lat, bnds_lon = read_coords(lon,lat,lev); -Time = numpy.zeros(ntimes,dtype='d') -bnds_time = numpy.zeros(ntimes*2,dtype='d') -Time[0],bnds_time[0:2] = read_time(0) -Time[1],bnds_time[2:4] = read_time(1) +alats, alons, plevs, bnds_lat, bnds_lon = read_coords(lon, lat, lev) -zlevs = numpy.zeros(5,dtype='d') -zlevs[0]=0.1999999999999999999; -zlevs[1]= 0.3; -zlevs[2]=0.55; -zlevs[3]= 0.7; -zlevs[4] = 0.99999999; +Time = numpy.zeros(ntimes, dtype='d') +bnds_time = numpy.zeros(ntimes * 2, dtype='d') +Time[0], bnds_time[0:2] = read_time(0) +Time[1], bnds_time[2:4] = read_time(1) -zlev_bnds = numpy.zeros(6,dtype='d') +zlevs = numpy.zeros(5, dtype='d') +zlevs[0] = 0.1999999999999999999 +zlevs[1] = 0.3 +zlevs[2] = 0.55 +zlevs[3] = 0.7 +zlevs[4] = 0.99999999 + +zlev_bnds = numpy.zeros(6, dtype='d') zlev_bnds[0] = 0. zlev_bnds[1] = 0.2 zlev_bnds[2] = 0.42 @@ -154,11 +159,14 @@ def read_2d_input_files(it, varname, n0, n1): zlev_bnds[4] = 0.8 zlev_bnds[5] = 1. -regions = numpy.array(["atlantic_arctic_ocean", "indian_pacific_ocean", "pacific_ocean", "global_ocean", "sf_bay"]) - -a_coeff=numpy.array([ 0.1, 0.2, 0.3, 0.22, 0.1 ]) -b_coeff=numpy.array([ 0.0, 0.1, 0.2, 0.5, 0.8 ]) -p0= numpy.array([1.e5,]) -a_coeff_bnds=numpy.array([0.,.15, .25, .25, .16, 0.]) -b_coeff_bnds=numpy.array([0.,.05, .15, .35, .65, 1.]) - +regions = numpy.array(["atlantic_arctic_ocean", + "indian_pacific_ocean", + "pacific_ocean", + "global_ocean", + "sf_bay"]) + +a_coeff = numpy.array([0.1, 0.2, 0.3, 0.22, 0.1]) +b_coeff = numpy.array([0.0, 0.1, 0.2, 0.5, 0.8]) +p0 = numpy.array([1.e5, ]) +a_coeff_bnds = numpy.array([0., .15, .25, .25, .16, 0.]) +b_coeff_bnds = numpy.array([0., .05, .15, .35, .65, 1.]) diff --git a/Test/test_python_direct_calls.py b/Test/test_python_direct_calls.py index fd6253ab..d8f1f25f 100644 --- a/Test/test_python_direct_calls.py +++ b/Test/test_python_direct_calls.py @@ -1,91 +1,166 @@ -from test_python_common import * # common subroutines +from test_python_common import * # common subroutines import cmor._cmor import os pth = os.path.split(os.path.realpath(os.curdir)) -if pth[-1]=='Test': +if pth[-1] == 'Test': ipth = opth = '.' else: ipth = opth = 'Test' -myaxes=numpy.zeros(9,dtype='i') -myaxes2=numpy.zeros(9,dtype='i') -myvars=numpy.zeros(9,dtype='i') - -cmor._cmor.setup(ipth,cmor.CMOR_REPLACE,cmor.CMOR_NORMAL,cmor.CMOR_EXIT_ON_MAJOR,"",1); +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = numpy.zeros(9, dtype='i') +myvars = numpy.zeros(9, dtype='i') + +cmor._cmor.setup( + ipth, + cmor.CMOR_REPLACE, + cmor.CMOR_NORMAL, + cmor.CMOR_EXIT_ON_MAJOR, + "", + 1) cmor.dataset_json("Test/common_user_input.json") -#cmor.dataset_json("Test/common_user_input.json") +# cmor.dataset_json("Test/common_user_input.json") -tables=[] +tables = [] a = cmor._cmor.load_table("Tables/CMIP6_Omon.json") tables.append(a) tables.append(cmor._cmor.load_table("Tables/CMIP6_Amon.json")) -print 'Tables ids:',tables - - -axes=[] -id="time" -units="months since 1980" -myaxes[0] = cmor._cmor.axis(id,units,ntimes,Time,'d',bnds_time,2,"1 month") -id='latitude' -units="degrees_north" -interval="" -myaxes[1] = cmor._cmor.axis(id,units,lat,alats,'d',bnds_lat,2,interval) -id="longitude" -units="degrees_east" -myaxes[2] = cmor._cmor.axis(id,units,lon,alons,'d',bnds_lon,2,interval) -id="plev19" -units="Pa" +print 'Tables ids:', tables + + +axes = [] +id = "time" +units = "months since 1980" +myaxes[0] = cmor._cmor.axis( + id, + units, + ntimes, + Time, + 'd', + bnds_time, + 2, + "1 month") +id = 'latitude' +units = "degrees_north" +interval = "" +myaxes[1] = cmor._cmor.axis(id, units, lat, alats, 'd', bnds_lat, 2, interval) +id = "longitude" +units = "degrees_east" +myaxes[2] = cmor._cmor.axis(id, units, lon, alons, 'd', bnds_lon, 2, interval) +id = "plev19" +units = "Pa" print plevs.astype("d") -myaxes[3] = cmor._cmor.axis(id,units,lev2,plevs.astype("d"),'d',None,0,interval) - - -myaxes[4] = cmor._cmor.axis("alternate_hybrid_sigma","1",5,zlevs,'d',zlev_bnds,1,interval) +myaxes[3] = cmor._cmor.axis( + id, + units, + lev2, + plevs.astype("d"), + 'd', + None, + 0, + interval) + + +myaxes[4] = cmor._cmor.axis( + "alternate_hybrid_sigma", + "1", + 5, + zlevs, + 'd', + zlev_bnds, + 1, + interval) cmor.set_table(tables[0]) -myaxes[5] = cmor._cmor.axis( "basin","",4,regions,'c',None,21,interval) -id='time' -units='months since 1980' -myaxes[7] = cmor._cmor.axis(id,units,ntimes,Time,'d',bnds_time,2,"1 month") -id="latitude" -units="degrees_north" -interval="" -myaxes[8] = cmor._cmor.axis(id,units,lat,alats,'d',bnds_lat,2,interval) +myaxes[5] = cmor._cmor.axis("basin", "", 4, regions, 'c', None, 21, interval) +id = 'time' +units = 'months since 1980' +myaxes[7] = cmor._cmor.axis( + id, + units, + ntimes, + Time, + 'd', + bnds_time, + 2, + "1 month") +id = "latitude" +units = "degrees_north" +interval = "" +myaxes[8] = cmor._cmor.axis(id, units, lat, alats, 'd', bnds_lat, 2, interval) cmor._cmor.set_table(tables[1]) -dtmp = -999; -dtmp2=1.e-4; -myaxes2[0] = myaxes[0]; -myaxes2[1] = myaxes[3]; -myaxes2[2] = myaxes[1]; -myaxes2[3] = myaxes[2]; +dtmp = -999 +dtmp2 = 1.e-4 +myaxes2[0] = myaxes[0] +myaxes2[1] = myaxes[3] +myaxes2[2] = myaxes[1] +myaxes2[3] = myaxes[2] print 'ok doing the vars thing' -myvars[0] = cmor._cmor.variable(entry2d[0],units2d[0],3,myaxes,'d',None,dtmp2,positive2d[0],varin2d[0],"no history","no future") +myvars[0] = cmor._cmor.variable( + entry2d[0], + units2d[0], + 3, + myaxes, + 'd', + None, + dtmp2, + positive2d[0], + varin2d[0], + "no history", + "no future") print 'vars 2' -myvars[1] = cmor._cmor.variable(entry3d[2],units3d[2],4,myaxes2,'d',None,dtmp2,"down",varin3d[2],"no history","no future") +myvars[1] = cmor._cmor.variable( + entry3d[2], + units3d[2], + 4, + myaxes2, + 'd', + None, + dtmp2, + "down", + varin3d[2], + "no history", + "no future") print 'vars 2' -myaxes2[1] = myaxes[4]; -myvars[2] = cmor._cmor.variable(entry3d[0],units3d[0],4,myaxes2,'d',None,dtmp2,"down",varin3d[0],"no history","no future") +myaxes2[1] = myaxes[4] +myvars[2] = cmor._cmor.variable( + entry3d[0], + units3d[0], + 4, + myaxes2, + 'd', + None, + dtmp2, + "down", + varin3d[0], + "no history", + "no future") print 'vars 2' -print 'zfact',type(numpy.array(myaxes2[1])),type(myaxes2) +print 'zfact', type(numpy.array(myaxes2[1])), type(myaxes2) -myvars[3] = cmor._cmor.zfactor(int(myaxes2[1]),"p0","Pa",0,None,'d',p0,None) -print 'zfact',myaxes2[1] -myvars[3] = cmor._cmor.zfactor(int(myaxes2[1]),"b","",1,myaxes2[1],'d',b_coeff,b_coeff_bnds) -print 'zfact',myaxes2[1] -myvars[3] = cmor._cmor.zfactor(int(myaxes2[1]),"a","",1,myaxes2[1],'d',a_coeff,a_coeff_bnds) +myvars[3] = cmor._cmor.zfactor( + int(myaxes2[1]), "p0", "Pa", 0, None, 'd', p0, None) +print 'zfact', myaxes2[1] +myvars[3] = cmor._cmor.zfactor( + int(myaxes2[1]), "b", "", 1, myaxes2[1], 'd', b_coeff, b_coeff_bnds) +print 'zfact', myaxes2[1] +myvars[3] = cmor._cmor.zfactor( + int(myaxes2[1]), "a", "", 1, myaxes2[1], 'd', a_coeff, a_coeff_bnds) #/* printf("defining ap\n"); */ #/* for(i=0;i<5;i++) {a_coeff[i]*=1.e3;printf("sending acoef: %i, %lf\n",i,a_coeff[i]);} */ #/* for(i=0;i<6;i++) {a_coeff_bnds[i]*=1.e5;printf("sending acoef: %i, %lf\n",i,a_coeff_bnds[i]);} */ #/* ierr = cmor_zfactor(&myvars[3],myaxes2[1],"ap","hPa",1,&myaxes2[1],'d',&a_coeff,&a_coeff_bnds); */ print 'zfact before last' -myvars[3] = cmor._cmor.zfactor(int(myaxes2[1]),"ps","hPa",3,myaxes,'d',None,None) +myvars[3] = cmor._cmor.zfactor( + int(myaxes2[1]), "ps", "hPa", 3, myaxes, 'd', None, None) print 'zfact last' # /* ok here we decalre a variable for region axis testing */ @@ -94,14 +169,32 @@ myaxes2[1] = myaxes[5] myaxes2[2] = myaxes[8] -myvars[4] = cmor._cmor.variable("htovgyre","W",3,myaxes2,'d',None,dtmp2,positive2d[0],varin2d[0],"no history","no future") +myvars[4] = cmor._cmor.variable( + "htovgyre", + "W", + 3, + myaxes2, + 'd', + None, + dtmp2, + positive2d[0], + varin2d[0], + "no history", + "no future") cmor.set_table(tables[1]) for i in range(ntimes): - data2d = read_2d_input_files(i, varin2d[0], lat,lon) - print 'writing time',i,data2d.shape,data2d,numpy.average(data2d) - cmor._cmor.write(myvars[0],numpy.ravel(data2d),data2d.dtype.char,1,None,None,None); - -cmor._cmor.close(None,0,0) + data2d = read_2d_input_files(i, varin2d[0], lat, lon) + print 'writing time', i, data2d.shape, data2d, numpy.average(data2d) + cmor._cmor.write( + myvars[0], + numpy.ravel(data2d), + data2d.dtype.char, + 1, + None, + None, + None) + +cmor._cmor.close(None, 0, 0) diff --git a/Test/test_python_free_wrapping_issue.py b/Test/test_python_free_wrapping_issue.py index 256889fa..839945d7 100644 --- a/Test/test_python_free_wrapping_issue.py +++ b/Test/test_python_free_wrapping_issue.py @@ -6,52 +6,53 @@ import datetime import cmor -def save(opts,threeD=True): - cmor.setup(inpath=opts['table_path'], - netcdf_file_action=cmor.CMOR_REPLACE_3, - set_verbosity=cmor.CMOR_NORMAL, - exit_control=cmor.CMOR_NORMAL, - logfile=None, create_subdirectories=1) +def save(opts, threeD=True): + + cmor.setup(inpath=opts['table_path'], + netcdf_file_action=cmor.CMOR_REPLACE_3, + set_verbosity=cmor.CMOR_NORMAL, + exit_control=cmor.CMOR_NORMAL, + logfile=None, create_subdirectories=1) cmor.dataset_json("Test/common_user_input.json") # Load the CMIP tables into memory. - tables=[] + tables = [] tables.append(cmor.load_table('CMIP6_grids.json')) tables.append(cmor.load_table(opts['cmip_table'])) # Create the dimension axes # Monthly time axis - min_tvals=[] - max_tvals=[] - cmor_tName='time' - tvals=[] - axis_ids=[] - for year in range(1850,1851): - for mon in range(1,13): - tvals.append(datetime.date(year,mon,15).toordinal()-1) + min_tvals = [] + max_tvals = [] + cmor_tName = 'time' + tvals = [] + axis_ids = [] + for year in range(1850, 1851): + for mon in range(1, 13): + tvals.append(datetime.date(year, mon, 15).toordinal() - 1) # set up time values and bounds - for i,ordinaldate in enumerate(tvals): - model_date = datetime.date.fromordinal(int(ordinaldate)+1) - #min bound is first day of month - model_date=model_date.replace(day=1) - min_tvals.append(model_date.toordinal()-1) - #max_bound is first day of next month - tyr=model_date.year+model_date.month/12 - tmon=model_date.month%12+1 - model_date=model_date.replace(year=tyr,month=tmon) - max_tvals.append(model_date.toordinal()-1) - #correct date to middle of month - mid=(max_tvals[i]-min_tvals[i])/2. - tvals[i]=min_tvals[i]+mid + for i, ordinaldate in enumerate(tvals): + model_date = datetime.date.fromordinal(int(ordinaldate) + 1) + # min bound is first day of month + model_date = model_date.replace(day=1) + min_tvals.append(model_date.toordinal() - 1) + # max_bound is first day of next month + tyr = model_date.year + model_date.month / 12 + tmon = model_date.month % 12 + 1 + model_date = model_date.replace(year=tyr, month=tmon) + max_tvals.append(model_date.toordinal() - 1) + # correct date to middle of month + mid = (max_tvals[i] - min_tvals[i]) / 2. + tvals[i] = min_tvals[i] + mid tval_bounds = np.column_stack((min_tvals, max_tvals)) cmor.set_table(tables[1]) time_axis_id = cmor.axis(table_entry=cmor_tName, - units='days since 0001-01-01', length=len(tvals), - coord_vals=tvals[:], cell_bounds=tval_bounds[:], - interval=None) + units='days since 0001-01-01', length=len(tvals), + coord_vals=tvals[:], cell_bounds=tval_bounds[:], + interval=None) axis_ids.append(time_axis_id) if not threeD: @@ -80,28 +81,28 @@ def save(opts,threeD=True): [750, 300], [300, 0]]) plev_axis_id = cmor.axis(table_entry='plev19', - units='Pa', length=len(plev), - coord_vals=plev[:], cell_bounds=plev_bounds[:], - interval=None) + units='Pa', length=len(plev), + coord_vals=plev[:], cell_bounds=plev_bounds[:], + interval=None) axis_ids.append(plev_axis_id) # 1 degree resolution latitude and longitude - lat = np.linspace(-89.5,89.5,180) - lat_bounds = np.column_stack((np.linspace(-90.,89.,180.), - np.linspace(-89.,90.,180.))) + lat = np.linspace(-89.5, 89.5, 180) + lat_bounds = np.column_stack((np.linspace(-90., 89., 180.), + np.linspace(-89., 90., 180.))) lat_axis_id = cmor.axis(table_entry='latitude', - units='degrees_north', length=len(lat), - coord_vals=lat[:], cell_bounds=lat_bounds[:], - interval=None) + units='degrees_north', length=len(lat), + coord_vals=lat[:], cell_bounds=lat_bounds[:], + interval=None) axis_ids.append(lat_axis_id) - lon = np.linspace(0.5,359.5,360) - lon_bounds = np.column_stack((np.linspace(0.,359.,360.), - np.linspace(1.,360.,360.))) + lon = np.linspace(0.5, 359.5, 360) + lon_bounds = np.column_stack((np.linspace(0., 359., 360.), + np.linspace(1., 360., 360.))) lon_axis_id = cmor.axis(table_entry='longitude', - units='degrees_north', length=len(lon), - coord_vals=lon[:], cell_bounds=lon_bounds[:], - interval=None) + units='degrees_north', length=len(lon), + coord_vals=lon[:], cell_bounds=lon_bounds[:], + interval=None) axis_ids.append(lon_axis_id) # @@ -110,37 +111,45 @@ def save(opts,threeD=True): cmor.set_table(tables[1]) in_missing = float(1.e20) if threeD: - variable_id = cmor.variable(table_entry='ts', units='K', \ - axis_ids=axis_ids, type='f', missing_value=in_missing) + variable_id = cmor.variable(table_entry='ts', units='K', + axis_ids=axis_ids, type='f', missing_value=in_missing) else: - variable_id = cmor.variable(table_entry='ta', units='K', \ - axis_ids=axis_ids, type='f', missing_value=in_missing) + variable_id = cmor.variable(table_entry='ta', units='K', + axis_ids=axis_ids, type='f', missing_value=in_missing) # - # Write the data + # Write the data # if threeD: - data_vals = np.zeros((len(tvals), len(lat), len(lon)), np.float32) + 290. + data_vals = np.zeros( + (len(tvals), len(lat), len(lon)), np.float32) + 290. else: - data_vals = np.zeros((len(tvals), len(plev), len(lat), len(lon)), np.float32) + 290. + data_vals = np.zeros( + (len(tvals), + len(plev), + len(lat), + len(lon)), + np.float32) + 290. try: print 'writing...' - cmor.write(variable_id, data_vals[:], ntimes_passed=np.shape(data_vals)[0]) #assuming time is the first dimension - except Exception, e: + cmor.write(variable_id, data_vals[:], ntimes_passed=np.shape( + data_vals)[0]) # assuming time is the first dimension + except Exception as e: raise Exception("ERROR writing data!") try: path = cmor.close(variable_id, file_name=True) - except: + except BaseException: raise Exception("ERROR closing cmor file!") print path + if __name__ == "__main__": - opts={'cmip_table': 'CMIP6_Amon.json', - 'outpath': 'Test', - 'table_path': 'Tables'} + opts = {'cmip_table': 'CMIP6_Amon.json', + 'outpath': 'Test', + 'table_path': 'Tables'} - save(opts,threeD=True) - save(opts,threeD=False) + save(opts, threeD=True) + save(opts, threeD=False) diff --git a/Test/test_python_grid_and_ocn_sigma.py b/Test/test_python_grid_and_ocn_sigma.py index 38bc99a9..15171377 100644 --- a/Test/test_python_grid_and_ocn_sigma.py +++ b/Test/test_python_grid_and_ocn_sigma.py @@ -1,136 +1,163 @@ -import cmor,numpy +import cmor +import numpy import os -ntimes=2 -lon=300 -lat=100 -lev=5 +ntimes = 2 +lon = 300 +lat = 100 +lev = 5 + def read_time(it): time = [0] - time_bnds=[0,0] - time[0] = (it-0.5)*30.; - time_bnds[0] = (it-1)*30.; - time_bnds[1] = it*30.; + time_bnds = [0, 0] + time[0] = (it - 0.5) * 30. + time_bnds[0] = (it - 1) * 30. + time_bnds[1] = it * 30. + + time[0] = it + time_bnds[0] = it + time_bnds[1] = it + 1 + return time[0], numpy.array(time_bnds) - time[0]=it; - time_bnds[0] = it; - time_bnds[1] = it+1; - return time[0],numpy.array(time_bnds) -def gen_irreg_grid(lon,lat): +def gen_irreg_grid(lon, lat): lon0 = 5. - lat0=-17.5 + lat0 = -17.5 delta_lon = .1 delta_lat = .1 y = numpy.arange(lat) x = numpy.arange(lon) - lon_coords = numpy.zeros((lat,lon)) - lat_coords = numpy.zeros((lat,lon)) - lon_vertices = numpy.zeros((lat,lon,4)) - lat_vertices = numpy.zeros((lat,lon,4)) - - for j in range(lat): # really porr coding i know - for i in range(lon): # getting worse i know - lon_coords[j,i] = lon0+delta_lon*(j+1+i); - lat_coords[j,i] = lat0+delta_lat*(j+1-i); - lon_vertices[j,i,0] = lon_coords[j,i]-delta_lon; - lon_vertices[j,i,1] = lon_coords[j,i]; - lon_vertices[j,i,2] = lon_coords[j,i]+delta_lon; - lon_vertices[j,i,3] = lon_coords[j,i]; -## !!$ /* vertices lat */ - lat_vertices[j,i,0] = lat_coords[j,i]; - lat_vertices[j,i,1] = lat_coords[j,i]-delta_lat; - lat_vertices[j,i,2] = lat_coords[j,i]; - lat_vertices[j,i,3] = lat_coords[j,i]+delta_lat; - print lat_vertices.min(),'---------------------' - return x,y,lon_coords,lat_coords,lon_vertices,lat_vertices - - - - -myaxes=numpy.zeros(9,dtype='i') -myaxes2=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); + lon_coords = numpy.zeros((lat, lon)) + lat_coords = numpy.zeros((lat, lon)) + lon_vertices = numpy.zeros((lat, lon, 4)) + lat_vertices = numpy.zeros((lat, lon, 4)) + + for j in range(lat): # really porr coding i know + for i in range(lon): # getting worse i know + lon_coords[j, i] = lon0 + delta_lon * (j + 1 + i) + lat_coords[j, i] = lat0 + delta_lat * (j + 1 - i) + lon_vertices[j, i, 0] = lon_coords[j, i] - delta_lon + lon_vertices[j, i, 1] = lon_coords[j, i] + lon_vertices[j, i, 2] = lon_coords[j, i] + delta_lon + lon_vertices[j, i, 3] = lon_coords[j, i] +# !!$ /* vertices lat */ + lat_vertices[j, i, 0] = lat_coords[j, i] + lat_vertices[j, i, 1] = lat_coords[j, i] - delta_lat + lat_vertices[j, i, 2] = lat_coords[j, i] + lat_vertices[j, i, 3] = lat_coords[j, i] + delta_lat + print lat_vertices.min(), '---------------------' + return x, y, lon_coords, lat_coords, lon_vertices, lat_vertices + + +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = 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") -tables=[] +tables = [] a = cmor.load_table("CMIP6_grids.json") tables.append(a) tables.append(cmor.load_table("CMIP6_Omon.json")) -print 'Tables ids:',tables +print 'Tables ids:', tables cmor.set_table(tables[0]) -x,y,lon_coords,lat_coords,lon_vertices,lat_vertices = gen_irreg_grid(lon,lat) -print lon_vertices.shape,lat_vertices.shape,x.shape,y.shape - -myaxes[1] = cmor.axis(table_entry = 'y', - units = 'm', - coord_vals = y) -myaxes[0] = cmor.axis(table_entry = 'x', - units = 'm', - coord_vals = x) - -print 'lons:',lon_vertices.shape,lon_coords.shape -grid_id = cmor.grid(axis_ids = myaxes[:2], - latitude = lat_coords, - longitude = lon_coords, - latitude_vertices = lat_vertices, - longitude_vertices = lon_vertices) -print 'got grid_id:',grid_id +x, y, lon_coords, lat_coords, lon_vertices, lat_vertices = gen_irreg_grid( + lon, lat) +print lon_vertices.shape, lat_vertices.shape, x.shape, y.shape + +myaxes[1] = cmor.axis(table_entry='y', + units='m', + coord_vals=y) +myaxes[0] = cmor.axis(table_entry='x', + units='m', + coord_vals=x) + +print 'lons:', lon_vertices.shape, lon_coords.shape +grid_id = cmor.grid(axis_ids=myaxes[:2], + latitude=lat_coords, + longitude=lon_coords, + latitude_vertices=lat_vertices, + longitude_vertices=lon_vertices) +print 'got grid_id:', grid_id myaxes[2] = grid_id ## mapnm = 'lambert_conformal_conic' -## params = [ "standard_parallel1", -## "longitude_of_central_meridian","latitude_of_projection_origin", -## "false_easting","false_northing","standard_parallel2" ] +# params = [ "standard_parallel1", +# "longitude_of_central_meridian","latitude_of_projection_origin", +# "false_easting","false_northing","standard_parallel2" ] ## punits = ["","","","","","" ] ## pvalues = [-20.,175.,13.,8.,0.,20. ] -## cmor.set_grid_mapping(grid_id=myaxes[2], +# cmor.set_grid_mapping(grid_id=myaxes[2], ## mapping_name = mapnm, ## parameter_names = params, ## parameter_values = pvalues, -## parameter_units = punits) +# parameter_units = punits) cmor.set_table(tables[1]) -myaxes[3] = cmor.axis(table_entry = 'time', - units = 'months since 1980') +myaxes[3] = cmor.axis(table_entry='time', + units='months since 1980') # Now sets up the ocn sigma stuff -levs=-numpy.arange(lev)/float(lev+1.) -blevs=-numpy.arange(lev+1)/float(lev+1.) +levs = -numpy.arange(lev) / float(lev + 1.) +blevs = -numpy.arange(lev + 1) / float(lev + 1.) print 'Defining zlevs' -myaxes[4] = cmor.axis(table_entry='ocean_sigma',coord_vals=levs,cell_bounds=blevs,units='1') - -print 'definnig zfactor depth',myaxes[2] -depth = numpy.random.random((lon,lat))*5000. -print 'Depth:',depth.shape,depth.dtype -idpth = cmor.zfactor(zaxis_id=myaxes[4],units='m',zfactor_name='depth',axis_ids=numpy.array([myaxes[2],]),zfactor_values=depth) +myaxes[4] = cmor.axis( + table_entry='ocean_sigma', + coord_vals=levs, + cell_bounds=blevs, + units='1') + +print 'definnig zfactor depth', myaxes[2] +depth = numpy.random.random((lon, lat)) * 5000. +print 'Depth:', depth.shape, depth.dtype +idpth = cmor.zfactor(zaxis_id=myaxes[4], + units='m', + zfactor_name='depth', + axis_ids=numpy.array([myaxes[2], + ]), + zfactor_values=depth) print 'defining zfactor eta' -ieta = cmor.zfactor(zaxis_id=myaxes[4],units='m',zfactor_name='eta',axis_ids=[myaxes[2],myaxes[3]]) -print 'ieta:',ieta -pass_axes = [myaxes[4],myaxes[2],myaxes[3]] +ieta = cmor.zfactor( + zaxis_id=myaxes[4], + units='m', + zfactor_name='eta', + axis_ids=[ + myaxes[2], + myaxes[3]]) +print 'ieta:', ieta +pass_axes = [myaxes[4], myaxes[2], myaxes[3]] print 'defining variable' -myvars[0] = cmor.variable( table_entry = 'thetao', - units = 'K', - axis_ids = pass_axes, - positive = 'down' - ) -Time = numpy.zeros(ntimes,dtype='d') -bnds_time = numpy.zeros(ntimes*2,dtype='d') -Time[0],bnds_time[0:2] = read_time(0) -Time[1],bnds_time[2:4] = read_time(1) +myvars[0] = cmor.variable(table_entry='thetao', + units='K', + axis_ids=pass_axes, + positive='down' + ) +Time = numpy.zeros(ntimes, dtype='d') +bnds_time = numpy.zeros(ntimes * 2, dtype='d') +Time[0], bnds_time[0:2] = read_time(0) +Time[1], bnds_time[2:4] = read_time(1) for i in range(ntimes): - data3d = numpy.random.random((lev,lon,lat,ntimes))*40.+273.15 - eta = numpy.random.random((lon,lat,ntimes))*10000. - #print 'writing time: ',i,data3d.shape,data3d - #print Time[i],bnds_time[2*i:2*i+2] - print 'Writing time',i,'for var',data3d.shape - cmor.write(myvars[0],data3d,1,time_vals=Time[i],time_bnds=bnds_time[2*i:2*i+2]) - print 'Writing time',i,'for eta' - cmor.write(ieta,eta,1,time_vals=Time[i],time_bnds=bnds_time[2*i:2*i+2],store_with=myvars[0]) + data3d = numpy.random.random((lev, lon, lat, ntimes)) * 40. + 273.15 + eta = numpy.random.random((lon, lat, ntimes)) * 10000. + # print 'writing time: ',i,data3d.shape,data3d + # print Time[i],bnds_time[2*i:2*i+2] + print 'Writing time', i, 'for var', data3d.shape + cmor.write(myvars[0], data3d, 1, time_vals=Time[i], + time_bnds=bnds_time[2 * i:2 * i + 2]) + print 'Writing time', i, 'for eta' + cmor.write(ieta, + eta, + 1, + time_vals=Time[i], + time_bnds=bnds_time[2 * i:2 * i + 2], + store_with=myvars[0]) cmor.close() diff --git a/Test/test_python_index_coord.py b/Test/test_python_index_coord.py index 9466d9ab..9b0f112f 100644 --- a/Test/test_python_index_coord.py +++ b/Test/test_python_index_coord.py @@ -1,44 +1,66 @@ -import cmor,numpy +import cmor +import numpy -ipth="Test" +ipth = "Test" cmor.setup(inpath=ipth, set_verbosity=cmor.CMOR_NORMAL, - netcdf_file_action = cmor.CMOR_REPLACE, - logfile = None) + netcdf_file_action=cmor.CMOR_REPLACE, + logfile=None) cmor.dataset( - outpath = ipth, - experiment_id = "lgm", - institution = "PCMDI", - source = "PCMDI", - calendar = "standard", - model_id="pcmdi-09a",forcing="forcing") + outpath=ipth, + experiment_id="lgm", + institution="PCMDI", + source="PCMDI", + calendar="standard", + model_id="pcmdi-09a", forcing="forcing") cmor.load_table("Tables/CMIP6_Omon.json") nlat = 90 -dlat = 180/nlat +dlat = 180 / nlat nlon = 180 -dlon = 360./nlon +dlon = 360. / nlon nlev = 5 -lats = numpy.arange(-90+dlat/2.,90,dlat) -blats = numpy.arange(-90,90+dlat,dlat) -lons = numpy.arange(0+dlon/2.,360.,dlon) -blons = numpy.arange(0,360.+dlon,dlon) +lats = numpy.arange(-90 + dlat / 2., 90, dlat) +blats = numpy.arange(-90, 90 + dlat, dlat) +lons = numpy.arange(0 + dlon / 2., 360., dlon) +blons = numpy.arange(0, 360. + dlon, dlon) ntime = 12 -data = numpy.random.random((ntime,nlat,nlev,nlon))*5+273. +data = numpy.random.random((ntime, nlat, nlev, nlon)) * 5 + 273. -itim = cmor.axis(table_entry='time',coord_vals=numpy.arange(0,ntime,1),units='month since 2008',cell_bounds=numpy.arange(0,ntime+1,1)) -ilat = cmor.axis(table_entry='latitude',coord_vals=lats,units='degrees_north',cell_bounds=blats) -ilon = cmor.axis(table_entry='longitude',coord_vals=lons,units='degrees_east',cell_bounds=blons) -ilev = cmor.axis(table_entry='depth_coord',length=5,cell_bounds=numpy.arange(-12000,0,2000),coord_vals=numpy.arange(-10000,0,2000),units="m") +itim = cmor.axis( + table_entry='time', coord_vals=numpy.arange( + 0, ntime, 1), units='month since 2008', cell_bounds=numpy.arange( + 0, ntime + 1, 1)) +ilat = cmor.axis( + table_entry='latitude', + coord_vals=lats, + units='degrees_north', + cell_bounds=blats) +ilon = cmor.axis( + table_entry='longitude', + coord_vals=lons, + units='degrees_east', + cell_bounds=blons) +ilev = cmor.axis(table_entry='depth_coord', + length=5, + cell_bounds=numpy.arange(-12000, + 0, + 2000), + coord_vals=numpy.arange(-10000, + 0, + 2000), + units="m") -iv = cmor.variable(table_entry='thetao',axis_ids=numpy.array((itim,ilat,ilev,ilon)),units='K') +iv = cmor.variable( + table_entry='thetao', axis_ids=numpy.array( + (itim, ilat, ilev, ilon)), units='K') -cmor.write(iv,data) +cmor.write(iv, data) -f1 = cmor.close(iv,file_name=True) +f1 = cmor.close(iv, file_name=True) print f1 diff --git a/Test/test_python_jamie.py b/Test/test_python_jamie.py index 5a0de258..614494a7 100644 --- a/Test/test_python_jamie.py +++ b/Test/test_python_jamie.py @@ -1,36 +1,38 @@ import cmor + def path_test(): - cmor.setup(inpath='Tables',netcdf_file_action=cmor.CMOR_REPLACE) + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") - - table='CMIP6_Amon.json' + + table = 'CMIP6_Amon.json' cmor.load_table(table) - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - 'coord_vals': [15], - 'cell_bounds': [0, 30] - }, - {'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]}, - ] - + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + 'coord_vals': [15], + 'cell_bounds': [0, 30] + }, + {'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, [275]) - path=cmor.close(varid, file_name=True) + path = cmor.close(varid, file_name=True) print path + if __name__ == '__main__': path_test() diff --git a/Test/test_python_jamie_10.py b/Test/test_python_jamie_10.py index 5823cda0..91f1ce8a 100644 --- a/Test/test_python_jamie_10.py +++ b/Test/test_python_jamie_10.py @@ -2,50 +2,52 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE_4) + netcdf_file_action=cmor.CMOR_REPLACE_4) cmor.dataset_json("Test/common_user_input.json") - + table = 'CMIP6_Amon.json' cmor.load_table(table) - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'table_entry': 'plev19', - 'units': 'Pa', - 'coord_vals': [100000., 92500., 85000., 70000., 60000., 50000., 40000., 30000., 25000., 20000., 15000., 10000., 7000., 5000., 3000., 2000., 1000., 500., 100.]}, - {'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]}, - ] - + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'table_entry': 'plev19', + 'units': 'Pa', + 'coord_vals': [100000., 92500., 85000., 70000., 60000., 50000., 40000., 30000., 25000., 20000., 15000., 10000., 7000., 5000., 3000., 2000., 1000., 500., 100.]}, + {'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: - print 'doing:',axis + print 'doing:', axis axis_id = cmor.axis(**axis) axis_ids.append(axis_id) for var, units, value in (('ta', 'K', 274), ('ua', 'm s-1', 10)): - values = numpy.array([value,]*len(axes[1]['coord_vals']), numpy.float32) + values = numpy.array([value, ] * + len(axes[1]['coord_vals']), numpy.float32) varid = cmor.variable(var, units, axis_ids, - history = 'variable history', - missing_value = -99 + history='variable history', + missing_value=-99 ) cmor.set_variable_attribute(varid, 'cell_measures', 'BLABLABLA') - cmor.write(varid, values, time_vals = [15], time_bnds = [ [0,30] ]) + cmor.write(varid, values, time_vals=[15], time_bnds=[[0, 30]]) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_jamie_11.py b/Test/test_python_jamie_11.py deleted file mode 100644 index faededbd..00000000 --- a/Test/test_python_jamie_11.py +++ /dev/null @@ -1,156 +0,0 @@ -import cmor,numpy - -error_flag = cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_REPLACE) - -error_flag = cmor.dataset_json("Test/common_user_input.json") - - -# creates 1 degree grid -nlat=180 -nlon=360 -alats = numpy.arange(180)-89.5 -bnds_lat = numpy.arange(181)-90 -alons=numpy.arange(360)+.5 -bnds_lon=numpy.arange(361) -cmor.load_table("TestTables/CMIP6_Emon.json") -ilat = cmor.axis( - table_entry='latitude', - units='degrees_north', - length=nlat, - coord_vals=alats, - cell_bounds=bnds_lat) - -ilon = cmor.axis( - table_entry='longitude', - length=nlon, - units='degrees_east', - coord_vals=alons, - cell_bounds=bnds_lon) - -lev=1 -ntimes=12 -plevs = (numpy.arange(lev)+1)*1.E4 - - -itim = cmor.axis( - table_entry='time', - units='months since 2030-1-1', - length=ntimes, - interval='1 month') - -zlevs = numpy.array(( 0.1, )) -zlev_bnds=numpy.array(( 0.,.2, )) -table_entry='hybrid_height' -if table_entry == 'hybrid_height': - ilev = cmor.axis( - table_entry='hybrid_height', - ## table_entry='standard_sigma', - ## table_entry='standard_hybrid_sigma', - units='m', - length=lev, - coord_vals=zlevs, - cell_bounds=zlev_bnds) - - p0 = 0.5e4 -## p0 = 1.e5 -## a_coeff = (/ 0.1, 0.2, 0.3, 0.2, 0.1 /) - a_coeff = numpy.array(( 0.2, )) - b_coeff = numpy.array(( 0.0, )) - -## a_coeff_bnds=(/0.,.15, .25, .25, .15, 0./) - a_coeff_bnds=numpy.array((0.,.3,)) - b_coeff_bnds=numpy.array((0.,.05,)) - -## error_flag = cmor.zfactor( -## zaxis_id=ilev, -## zfactor_name='ptop', -## units='Pa', -## zfactor_values = p0) - - error_flag = cmor.zfactor( - zaxis_id=ilev, - zfactor_name='b', - axis_ids= numpy.array( (ilev, )), - zfactor_values = b_coeff, - zfactor_bounds = b_coeff_bnds ) - -## error_flag = cmor.zfactor( -## zaxis_id=ilev, -## zfactor_name='lev', -## axis_ids= numpy.array(( ilev, )), -## units='m', -## zfactor_values = a_coeff, -## zfactor_bounds = a_coeff_bnds ) - - data2d = numpy.random.random((180,360)).astype('f')*8000 - - zfactor_id = cmor.zfactor( - zaxis_id=ilev, - zfactor_name='orog', - axis_ids=numpy.array(( ilon, ilat )), - units='m' , - zfactor_values = data2d) -else: - print 'yep working case' - ilev = cmor.axis( - table_entry='standard_sigma', - units='1', - length=lev, - coord_vals=zlevs, - cell_bounds=zlev_bnds) - - p0 = 0.5E4 - a_coeff = numpy.array(( 0.2, 0.4, 0.6, 0.8, 0.95 )) - b_coeff = numpy.array(( 0.0, 0.1, 0.2, 0.5, 0.8 )) - - a_coeff_bnds=numpy.array((0.,.3, .5, .7, .9, 1.)) - b_coeff_bnds=numpy.array((0.,.05, .15, .35, .65, 1.)) - - error_flag = cmor.zfactor( - zaxis_id=ilev, - zfactor_name='ptop', - units='Pa', - zfactor_values = p0) - - error_flag = cmor.zfactor( - zaxis_id=ilev, - zfactor_name='sigma', - axis_ids= numpy.array(( ilev, )), - zfactor_values = a_coeff, - zfactor_bounds = a_coeff_bnds ) - - data2d = numpy.random.random((180,360)).astype('f')-97000. - - zfactor_id = cmor.zfactor( - zaxis_id=ilev, - zfactor_name='ps', - axis_ids=numpy.array(( ilon, ilat, itim )), - units='Pa') - -print "ILEV is:",ilev - -var3d_ids = cmor.variable( - table_entry='concdust', - units='kg m-3', - axis_ids=numpy.array((ilev, ilon, ilat, itim)), - missing_value=1.0e28, - original_name='cocoa is good, but concoa is better') - - - -for it in range(ntimes): - - time = numpy.array((it)) - bnds_time = numpy.array((it,it+1)) - data3d = numpy.random.random((lev,360,180)).astype('f')*40. - - error_flag = cmor.write( - var_id = var3d_ids, - data = data3d, - ntimes_passed = 1, - time_vals = time, - time_bnds = bnds_time ) - - -error_flag = cmor.close() - diff --git a/Test/test_python_jamie_12.py b/Test/test_python_jamie_12.py index 76d99031..35927ef6 100644 --- a/Test/test_python_jamie_12.py +++ b/Test/test_python_jamie_12.py @@ -3,6 +3,7 @@ import cmor import numpy + def define_axes(axes): axis_ids = list() for axis in axes: @@ -12,57 +13,59 @@ def define_axes(axes): print 'MY:cmor.axis calls complete' return axis_ids + def define_write_var(axis_ids, entry, unit, values): varid = cmor.variable(entry, unit, axis_ids, - missing_value = -99 + missing_value=-99 ) - - - cmor.write(varid, values, time_vals = [15.0], time_bnds = [0., 30.0]) - cmor.close(varid, preserve = True) - cmor.write(varid, values, time_vals = [45.0], time_bnds = [30., 60.0]) + cmor.write(varid, values, time_vals=[15.0], time_bnds=[0., 30.0]) + cmor.close(varid, preserve=True) + cmor.write(varid, values, time_vals=[45.0], time_bnds=[30., 60.0]) cmor.close() def cmor_ini(): cmor.setup(inpath='/git/cmip5-cmor-tables/Tables', - netcdf_file_action = cmor.CMOR_REPLACE) + netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") + def define_write_landcoverfrac(): cmor.load_table('Tables/CMIP6_Lmon.json') - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'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]}, - {'table_entry': 'vegtype', - 'coord_vals': ['landcover'], - 'units': '1', - }, - ] + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'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]}, + {'table_entry': 'vegtype', + 'coord_vals': ['landcover'], + 'units': '1', + }, + ] axis_ids = define_axes(axes) values = numpy.array([2.], numpy.float32) values = numpy.reshape(values, (1, 1, 1, 1)) - + define_write_var(axis_ids, 'landCoverFrac', '1', values) - + + def main(): cmor_ini() define_write_landcoverfrac() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_jamie_2.py b/Test/test_python_jamie_2.py index f69ad081..e01d4116 100644 --- a/Test/test_python_jamie_2.py +++ b/Test/test_python_jamie_2.py @@ -1,35 +1,36 @@ import cmor + def multi_call_test(): - cmor.setup(inpath='Tables',netcdf_file_action=cmor.CMOR_REPLACE) + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") - table='CMIP6_Amon.json' + table = 'CMIP6_Amon.json' cmor.load_table(table) - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'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]}, - ] - + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'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, [275], time_vals = [15], time_bnds = [ [0,30] ]) + cmor.write(varid, [275], time_vals=[15], time_bnds=[[0, 30]]) print 'First write worked as expected' try: - cmor.write(varid, [275], time_vals = [15], time_bnds = [ [0], [30] ]) - raise Exception,"We shouldn't be getting in here" - except: + cmor.write(varid, [275], time_vals=[15], time_bnds=[[0], [30]]) + raise Exception("We shouldn't be getting in here") + except BaseException: print 'Second write that should have failed did fail, good!' pass cmor.close(varid) diff --git a/Test/test_python_jamie_3.py b/Test/test_python_jamie_3.py index 92de6ac8..5f60a317 100644 --- a/Test/test_python_jamie_3.py +++ b/Test/test_python_jamie_3.py @@ -2,27 +2,28 @@ import cmor import numpy + def main(): - + missing = -99. cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE) + netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") table = 'CMIP6_Amon.json' cmor.load_table(table) - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'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]}, - ] + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'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]}, + ] values = numpy.array([missing], numpy.float32) myma = numpy.ma.masked_values(values, missing) @@ -30,12 +31,13 @@ def main(): for axis in axes: axis_id = cmor.axis(**axis) axis_ids.append(axis_id) - varid = cmor.variable('ts', 'K', axis_ids, missing_value = myma.fill_value) + varid = cmor.variable('ts', 'K', axis_ids, missing_value=myma.fill_value) - cmor.write(varid, myma, time_vals = [15], time_bnds = [ [0,30] ]) + cmor.write(varid, myma, time_vals=[15], time_bnds=[[0, 30]]) cmor.close(varid) - + + if __name__ == '__main__': main() diff --git a/Test/test_python_jamie_3hr.py b/Test/test_python_jamie_3hr.py index 762ab132..ef49c360 100644 --- a/Test/test_python_jamie_3hr.py +++ b/Test/test_python_jamie_3hr.py @@ -2,35 +2,36 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3) + netcdf_file_action=cmor.CMOR_REPLACE_3) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', '360_day', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - branch_time = 0., - contact = 'bob') - + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + branch_time=0., + contact='bob') + table = 'CMIP5_3hr' cmor.load_table(table) - axes = [ {'table_entry': 'time1', - 'units': 'hours since 2000-01-01 00:00:00', - }, - {'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]}, - ] - - values = numpy.array([1.], numpy.float32)+200 + axes = [{'table_entry': 'time1', + 'units': 'hours since 2000-01-01 00:00:00', + }, + {'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]}, + ] + + values = numpy.array([1.], numpy.float32) + 200 axis_ids = list() for axis in axes: axis_id = cmor.axis(**axis) @@ -39,13 +40,14 @@ def main(): varid = cmor.variable('tas', 'K', axis_ids, - history = 'variable history', - missing_value = -99, + history='variable history', + missing_value=-99, ) - cmor.write(varid, values, time_vals = [0.], time_bnds = [ [0,3.] ]) + cmor.write(varid, values, time_vals=[0.], time_bnds=[[0, 3.]]) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_jamie_4.py b/Test/test_python_jamie_4.py index 5b3222a7..589ddff8 100644 --- a/Test/test_python_jamie_4.py +++ b/Test/test_python_jamie_4.py @@ -2,43 +2,45 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE) + netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") table = 'CMIP6_Amon.json' cmor.load_table(table) - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'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]}, - ] + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'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) - for var, units, val in (('ts', 'K',278), ('ps', 'hPa',974.2)): + for var, units, val in (('ts', 'K', 278), ('ps', 'hPa', 974.2)): varid = cmor.variable(var, units, axis_ids, ) values = numpy.array([val], numpy.float32) - cmor.write(varid, values, time_vals = [15], time_bnds = [ [0,30] ]) + cmor.write(varid, values, time_vals=[15], time_bnds=[[0, 30]]) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_jamie_6.py b/Test/test_python_jamie_6.py index 14bb4f3e..75f83fba 100644 --- a/Test/test_python_jamie_6.py +++ b/Test/test_python_jamie_6.py @@ -1,155 +1,154 @@ -import cmor,numpy +import cmor +import numpy error_flag = cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_REPLACE) - + error_flag = cmor.dataset_json("Test/common_user_input.json") - + # creates 1 degree grid -nlat=180 -nlon=360 -alats = numpy.arange(180)-89.5 -bnds_lat = numpy.arange(181)-90 -alons=numpy.arange(360)+.5 -bnds_lon=numpy.arange(361) +nlat = 180 +nlon = 360 +alats = numpy.arange(180) - 89.5 +bnds_lat = numpy.arange(181) - 90 +alons = numpy.arange(360) + .5 +bnds_lon = numpy.arange(361) cmor.load_table("Tables/CMIP6_Amon.json") -ilat = cmor.axis( - table_entry='latitude', - units='degrees_north', - length=nlat, - coord_vals=alats, - cell_bounds=bnds_lat) - -ilon = cmor.axis( - table_entry='longitude', - length=nlon, - units='degrees_east', - coord_vals=alons, - cell_bounds=bnds_lon) - -lev=5 -ntimes=12 -plevs = (numpy.arange(lev)+1)*1.E4 - - -itim = cmor.axis( - table_entry='time', - units='months since 2030-1-1', - length=ntimes, +ilat = cmor.axis( + table_entry='latitude', + units='degrees_north', + length=nlat, + coord_vals=alats, + cell_bounds=bnds_lat) + +ilon = cmor.axis( + table_entry='longitude', + length=nlon, + units='degrees_east', + coord_vals=alons, + cell_bounds=bnds_lon) + +lev = 5 +ntimes = 12 +plevs = (numpy.arange(lev) + 1) * 1.E4 + + +itim = cmor.axis( + table_entry='time', + units='months since 2030-1-1', + length=ntimes, interval='1 month') -zlevs = numpy.array(( 0.1, 0.3, 0.55, 0.7, 0.9 )) -zlev_bnds=numpy.array(( 0.,.2, .42, .62, .8, 1. )) -table_entry='hybrid_height' +zlevs = numpy.array((0.1, 0.3, 0.55, 0.7, 0.9)) +zlev_bnds = numpy.array((0., .2, .42, .62, .8, 1.)) +table_entry = 'hybrid_height' if table_entry == 'hybrid_height': - ilev = cmor.axis( - table_entry='hybrid_height', - ## table_entry='standard_sigma', - ## table_entry='standard_hybrid_sigma', + ilev = cmor.axis( + table_entry='hybrid_height', + # table_entry='standard_sigma', + # table_entry='standard_hybrid_sigma', units='m', - length=lev, - coord_vals=zlevs, + length=lev, + coord_vals=zlevs, cell_bounds=zlev_bnds) - + p0 = 0.5e4 ## p0 = 1.e5 -## a_coeff = (/ 0.1, 0.2, 0.3, 0.2, 0.1 /) - a_coeff = numpy.array(( 0.2, 0.4, 0.6, 0.8, 0.95 )) - b_coeff = numpy.array(( 0.0, 0.1, 0.2, 0.5, 0.8 )) - -## a_coeff_bnds=(/0.,.15, .25, .25, .15, 0./) - a_coeff_bnds=numpy.array((0.,.3, .5, .7, .9, 1.)) - b_coeff_bnds=numpy.array((0.,.05, .15, .35, .65, 1.)) - -## error_flag = cmor.zfactor( -## zaxis_id=ilev, -## zfactor_name='ptop', -## units='Pa', -## zfactor_values = p0) - - error_flag = cmor.zfactor( - zaxis_id=ilev, +# a_coeff = (/ 0.1, 0.2, 0.3, 0.2, 0.1 /) + a_coeff = numpy.array((0.2, 0.4, 0.6, 0.8, 0.95)) + b_coeff = numpy.array((0.0, 0.1, 0.2, 0.5, 0.8)) + +# a_coeff_bnds=(/0.,.15, .25, .25, .15, 0./) + a_coeff_bnds = numpy.array((0., .3, .5, .7, .9, 1.)) + b_coeff_bnds = numpy.array((0., .05, .15, .35, .65, 1.)) + +# error_flag = cmor.zfactor( +# zaxis_id=ilev, +# zfactor_name='ptop', +# units='Pa', +# zfactor_values = p0) + + error_flag = cmor.zfactor( + zaxis_id=ilev, zfactor_name='b', - axis_ids= numpy.array( (ilev, )), - zfactor_values = b_coeff, - zfactor_bounds = b_coeff_bnds ) - -## error_flag = cmor.zfactor( -## zaxis_id=ilev, -## zfactor_name='lev', + axis_ids=numpy.array((ilev, )), + zfactor_values=b_coeff, + zfactor_bounds=b_coeff_bnds) + +# error_flag = cmor.zfactor( +# zaxis_id=ilev, +# zfactor_name='lev', ## axis_ids= numpy.array(( ilev, )), -## units='m', -## zfactor_values = a_coeff, -## zfactor_bounds = a_coeff_bnds ) - - data2d = numpy.random.random((180,360)).astype('f')*8000 - - zfactor_id = cmor.zfactor( - zaxis_id=ilev, - zfactor_name='orog', - axis_ids=numpy.array(( ilon, ilat )), - units='m' , - zfactor_values = data2d) +# units='m', +## zfactor_values = a_coeff, +# zfactor_bounds = a_coeff_bnds ) + + data2d = numpy.random.random((180, 360)).astype('f') * 8000 + + zfactor_id = cmor.zfactor( + zaxis_id=ilev, + zfactor_name='orog', + axis_ids=numpy.array((ilon, ilat)), + units='m', + zfactor_values=data2d) else: print 'yep working case' - ilev = cmor.axis( - table_entry='standard_sigma', + ilev = cmor.axis( + table_entry='standard_sigma', units='1', - length=lev, - coord_vals=zlevs, + length=lev, + coord_vals=zlevs, cell_bounds=zlev_bnds) - + p0 = 0.5E4 - a_coeff = numpy.array(( 0.2, 0.4, 0.6, 0.8, 0.95 )) - b_coeff = numpy.array(( 0.0, 0.1, 0.2, 0.5, 0.8 )) - - a_coeff_bnds=numpy.array((0.,.3, .5, .7, .9, 1.)) - b_coeff_bnds=numpy.array((0.,.05, .15, .35, .65, 1.)) - - error_flag = cmor.zfactor( - zaxis_id=ilev, - zfactor_name='ptop', - units='Pa', - zfactor_values = p0) - - error_flag = cmor.zfactor( - zaxis_id=ilev, - zfactor_name='sigma', - axis_ids= numpy.array(( ilev, )), - zfactor_values = a_coeff, - zfactor_bounds = a_coeff_bnds ) - - data2d = numpy.random.random((180,360)).astype('f')-97000. - - zfactor_id = cmor.zfactor( - zaxis_id=ilev, - zfactor_name='ps', - axis_ids=numpy.array(( ilon, ilat, itim )), + a_coeff = numpy.array((0.2, 0.4, 0.6, 0.8, 0.95)) + b_coeff = numpy.array((0.0, 0.1, 0.2, 0.5, 0.8)) + + a_coeff_bnds = numpy.array((0., .3, .5, .7, .9, 1.)) + b_coeff_bnds = numpy.array((0., .05, .15, .35, .65, 1.)) + + error_flag = cmor.zfactor( + zaxis_id=ilev, + zfactor_name='ptop', + units='Pa', + zfactor_values=p0) + + error_flag = cmor.zfactor( + zaxis_id=ilev, + zfactor_name='sigma', + axis_ids=numpy.array((ilev, )), + zfactor_values=a_coeff, + zfactor_bounds=a_coeff_bnds) + + data2d = numpy.random.random((180, 360)).astype('f') - 97000. + + zfactor_id = cmor.zfactor( + zaxis_id=ilev, + zfactor_name='ps', + axis_ids=numpy.array((ilon, ilat, itim)), units='Pa') -var3d_ids = cmor.variable( - table_entry='cl', - units='%', +var3d_ids = cmor.variable( + table_entry='cl', + units='%', axis_ids=numpy.array((ilev, ilon, ilat, itim)), - missing_value=1.0e28, + missing_value=1.0e28, original_name='cloud') - for it in range(ntimes): time = numpy.array((it)) - bnds_time = numpy.array((it,it+1)) - data3d = numpy.random.random((5,360,180)).astype('f')*40. - - error_flag = cmor.write( - var_id = var3d_ids, - data = data3d, - ntimes_passed = 1, - time_vals = time, - time_bnds = bnds_time ) - - -error_flag = cmor.close() + bnds_time = numpy.array((it, it + 1)) + data3d = numpy.random.random((5, 360, 180)).astype('f') * 40. + + error_flag = cmor.write( + var_id=var3d_ids, + data=data3d, + ntimes_passed=1, + time_vals=time, + time_bnds=bnds_time) + +error_flag = cmor.close() diff --git a/Test/test_python_jamie_7.py b/Test/test_python_jamie_7.py index 8b2f32f0..9ee2afcb 100644 --- a/Test/test_python_jamie_7.py +++ b/Test/test_python_jamie_7.py @@ -1,73 +1,72 @@ -import cmor,numpy +import cmor +import numpy error_flag = cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_REPLACE) - + error_flag = cmor.dataset_json("Test/common_user_input.json") - + # creates 1 degree grid -nlat=18 -nlon=36 -alats = numpy.arange(180)-89.5 -bnds_lat = numpy.arange(181)-90 -alons=numpy.arange(360)+.5 -bnds_lon=numpy.arange(361) +nlat = 18 +nlon = 36 +alats = numpy.arange(180) - 89.5 +bnds_lat = numpy.arange(181) - 90 +alons = numpy.arange(360) + .5 +bnds_lon = numpy.arange(361) cmor.load_table("Tables/CMIP6_Amon.json") -ilat = cmor.axis( - table_entry='latitude', - units='degrees_north', - length=nlat, - coord_vals=alats, - cell_bounds=bnds_lat) - -ilon = cmor.axis( - table_entry='longitude', - length=nlon, - units='degrees_east', - coord_vals=alons, - cell_bounds=bnds_lon) - -ntimes=12 +ilat = cmor.axis( + table_entry='latitude', + units='degrees_north', + length=nlat, + coord_vals=alats, + cell_bounds=bnds_lat) + +ilon = cmor.axis( + table_entry='longitude', + length=nlon, + units='degrees_east', + coord_vals=alons, + cell_bounds=bnds_lon) + +ntimes = 12 plevs = numpy.array([100000., 92500, 85000, 70000, 60000, 50000, 40000, 30000, 25000, - 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000, 999, 998, 997, 996, - 995, 994, 500, 100]) + 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000, 999, 998, 997, 996, + 995, 994, 500, 100]) -itim = cmor.axis( - table_entry='time', - units='months since 2030-1-1', - length=ntimes, +itim = cmor.axis( + table_entry='time', + units='months since 2030-1-1', + length=ntimes, interval='1 month') -ilev = cmor.axis( - table_entry='plev19', - units='Pa', - coord_vals=plevs, - cell_bounds=None) - +ilev = cmor.axis( + table_entry='plev19', + units='Pa', + coord_vals=plevs, + cell_bounds=None) + -var3d_ids = cmor.variable( - table_entry='ta', - units='K', +var3d_ids = cmor.variable( + table_entry='ta', + units='K', axis_ids=numpy.array((ilev, ilon, ilat, itim)), - missing_value=numpy.array([1.0e28,],dtype=numpy.float32)[0], + missing_value=numpy.array([1.0e28, ], dtype=numpy.float32)[0], original_name='cloud') - for it in range(ntimes): time = numpy.array((it)) - bnds_time = numpy.array((it,it+1)) - data3d = numpy.random.random((len(plevs),nlon,nlat))*30.+265. + bnds_time = numpy.array((it, it + 1)) + data3d = numpy.random.random((len(plevs), nlon, nlat)) * 30. + 265. data3d = data3d.astype('f') - error_flag = cmor.write( - var_id = var3d_ids, - data = data3d, - ntimes_passed = 1, - time_vals = time, - time_bnds = bnds_time ) + error_flag = cmor.write( + var_id=var3d_ids, + data=data3d, + ntimes_passed=1, + time_vals=time, + time_bnds=bnds_time) - -error_flag = cmor.close() +error_flag = cmor.close() diff --git a/Test/test_python_jamie_8.py b/Test/test_python_jamie_8.py index 11bb8a9f..22dad162 100644 --- a/Test/test_python_jamie_8.py +++ b/Test/test_python_jamie_8.py @@ -3,6 +3,7 @@ import cmor import numpy + def define_axes(axes): axis_ids = list() for axis in axes: @@ -12,90 +13,94 @@ def define_axes(axes): print 'cmor.axis calls complete' return axis_ids + def define_write_var(axis_ids, entry, unit, values): varid = cmor.variable(entry, unit, axis_ids, - missing_value = -99 + missing_value=-99 ) print 'cmor.variable call complete' - - cmor.write(varid, values, time_vals = [15.0], time_bnds = [0., 30.0]) + + cmor.write(varid, values, time_vals=[15.0], time_bnds=[0., 30.0]) print 'cmor.write call complete' def cmor_ini(): cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE) + netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") + def define_write_clisccp(): cmor.load_table('CMIP6_CFmon.json') - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'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]}, - {'table_entry': 'plev7c', - 'coord_vals': [90000., 74000., 62000., 50000., 37500., 24500., 9000.], - 'cell_bounds': [[100000., 80000.], [80000., 68000.], [68000., 56000.], [56000., 44000.], [44000., 31000.], [31000., 18000.], [18000., 0.]], - 'units': 'Pa', - }, - {'table_entry': 'tau', - 'coord_vals': [0.15, 0.8, 2.45, 6.5, 16.2, 41.5, 100.], - 'cell_bounds':[ [0.0, 0.3], [0.3, 1.3], [1.3, 3.6], [3.6, 9.4], [9.4, 23.0], [23.0, 60.0], [60.0, 100000]], - 'units': '1'} - ] + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'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]}, + {'table_entry': 'plev7c', + 'coord_vals': [90000., 74000., 62000., 50000., 37500., 24500., 9000.], + 'cell_bounds': [[100000., 80000.], [80000., 68000.], [68000., 56000.], [56000., 44000.], [44000., 31000.], [31000., 18000.], [18000., 0.]], + 'units': 'Pa', + }, + {'table_entry': 'tau', + 'coord_vals': [0.15, 0.8, 2.45, 6.5, 16.2, 41.5, 100.], + 'cell_bounds':[[0.0, 0.3], [0.3, 1.3], [1.3, 3.6], [3.6, 9.4], [9.4, 23.0], [23.0, 60.0], [60.0, 100000]], + 'units': '1'} + ] axis_ids = define_axes(axes) - - values = numpy.array([0.0004,]*49, numpy.float32) + values = numpy.array([0.0004, ] * 49, numpy.float32) values = numpy.reshape(values, (1, 1, 1, 7, 7)) define_write_var(axis_ids, 'clisccp', '1', values) + def define_write_landcoverfrac(): cmor.load_table('Tables/CMIP6_Lmon.json') - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'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]}, - {'table_entry': 'vegtype', - 'coord_vals': ['landcover'], - 'units': '1', - }, - ] + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'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]}, + {'table_entry': 'vegtype', + 'coord_vals': ['landcover'], + 'units': '1', + }, + ] axis_ids = define_axes(axes) values = numpy.array([2.], numpy.float32) values = numpy.reshape(values, (1, 1, 1, 1)) - + define_write_var(axis_ids, 'landCoverFrac', '1', values) - + + def main(): cmor_ini() define_write_clisccp() define_write_landcoverfrac() cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_jamie_9.py b/Test/test_python_jamie_9.py index c1898364..75fc5470 100644 --- a/Test/test_python_jamie_9.py +++ b/Test/test_python_jamie_9.py @@ -2,50 +2,52 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3) + netcdf_file_action=cmor.CMOR_REPLACE_3) cmor.dataset_json("Test/common_user_input.json") - + table = 'CMIP6_Amon.json' cmor.load_table(table) - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'table_entry': 'plev19', - 'units': 'Pa', - 'coord_vals': map(float,'100000. 92500. 85000. 70000. 60000. 50000. 40000. 30000. 25000. 20000. 15000. 10000. 7000. 5000. 3000. 2000. 1000. 500. 100.'.split(' '))}, - {'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]}, - ] - + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'table_entry': 'plev19', + 'units': 'Pa', + 'coord_vals': map(float, '100000. 92500. 85000. 70000. 60000. 50000. 40000. 30000. 25000. 20000. 15000. 10000. 7000. 5000. 3000. 2000. 1000. 500. 100.'.split(' '))}, + {'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: - print 'doing:',axis + print 'doing:', axis axis_id = cmor.axis(**axis) axis_ids.append(axis_id) - for var, units, value in (('ta', 'K', 274), ('ua', 'm s-1', 10) ): - values = numpy.array([value,]*len(axes[1]['coord_vals']), numpy.float32) + for var, units, value in (('ta', 'K', 274), ('ua', 'm s-1', 10)): + values = numpy.array([value, ] * + len(axes[1]['coord_vals']), numpy.float32) varid = cmor.variable(var, units, axis_ids, - history = 'variable history', - missing_value = -99 + history='variable history', + missing_value=-99 ) cmor.set_variable_attribute(varid, 'cell_measures', '') - cmor.write(varid, values, time_vals = [15], time_bnds = [ [0,30] ]) + cmor.write(varid, values, time_vals=[15], time_bnds=[[0, 30]]) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_jamie_site_surface.py b/Test/test_python_jamie_site_surface.py index 27fdb6dc..c18d85f9 100644 --- a/Test/test_python_jamie_site_surface.py +++ b/Test/test_python_jamie_site_surface.py @@ -1,56 +1,60 @@ import cmor import numpy + def cmor_initialisation(): cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3, - create_subdirectories = 0) + netcdf_file_action=cmor.CMOR_REPLACE_3, + create_subdirectories=0) cmor.dataset_json("Test/common_user_input.json") + def setup_data(): - axes = [ {'table_entry': 'time1', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'table_entry': 'site', - 'units': '', - 'coord_vals': [0]}, - ] + axes = [{'table_entry': 'time1', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'table_entry': 'site', + 'units': '', + 'coord_vals': [0]}, + ] values = numpy.array([215.], numpy.float32) return values, axes + def cmor_define_and_write(values, axes): table = 'CMIP6_CFsubhr.json' - tid1=cmor.load_table(table) + tid1 = cmor.load_table(table) site_axis_id = cmor.axis(**axes[1]) time_axis_id = cmor.axis(**axes[0]) table2 = 'CMIP6_grids.json' - tid2=cmor.load_table(table2) - gid = cmor.grid([site_axis_id,],latitude=numpy.array([-20,]),longitude=numpy.array([150,])) + tid2 = cmor.load_table(table2) + gid = cmor.grid([site_axis_id, ], latitude=numpy.array( + [-20, ]), longitude=numpy.array([150, ])) - - axis_ids = [time_axis_id,gid] + axis_ids = [time_axis_id, gid] cmor.set_table(tid1) varid = cmor.variable('rlut', 'W m-2', axis_ids, - history = 'variable history', - missing_value = -99, - positive = 'up' + history='variable history', + missing_value=-99, + positive='up' ) - cmor.write(varid, values, time_vals = [15]) - - + cmor.write(varid, values, time_vals=[15]) + + def main(): - + cmor_initialisation() values, axes = setup_data() cmor_define_and_write(values, axes) print cmor.close(file_name=True) - + + if __name__ == '__main__': main() diff --git a/Test/test_python_joerg_1.py b/Test/test_python_joerg_1.py index 5247c354..7854ffba 100644 --- a/Test/test_python_joerg_1.py +++ b/Test/test_python_joerg_1.py @@ -1,34 +1,35 @@ -import cmor,numpy +import cmor +import numpy error_flag = cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) - + error_flag = cmor.dataset_json("Test/common_user_input.json") # creates 1 degree grid -nlat=180 -nlon=360 -alats = numpy.arange(180)-89.5 -bnds_lat = numpy.arange(181)-90 -alons=numpy.arange(360)+.5 -bnds_lon=numpy.arange(361) +nlat = 180 +nlon = 360 +alats = numpy.arange(180) - 89.5 +bnds_lat = numpy.arange(181) - 90 +alons = numpy.arange(360) + .5 +bnds_lon = numpy.arange(361) cmor.load_table("Tables/CMIP6_Amon.json") -#cmor.load_table("Test/IPCC_table_A1") -ilat = cmor.axis( - table_entry='latitude', - units='degrees_north', - length=nlat, - coord_vals=alats, - cell_bounds=bnds_lat) - -ilon = cmor.axis( - table_entry='longitude', - length=nlon, - units='degrees_east', - coord_vals=alons, - cell_bounds=bnds_lon) - - -mlev_val= """ +# cmor.load_table("Test/IPCC_table_A1") +ilat = cmor.axis( + table_entry='latitude', + units='degrees_north', + length=nlat, + coord_vals=alats, + cell_bounds=bnds_lat) + +ilon = cmor.axis( + table_entry='longitude', + length=nlon, + units='degrees_east', + coord_vals=alons, + cell_bounds=bnds_lon) + + +mlev_val = """ 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 @@ -40,11 +41,11 @@ 0.791300 0.841100 0.886350 0.925950 0.958600 0.982650 0.996150""".split() -levs=[] +levs = [] for l in mlev_val: levs.append(float(l)) - -BS_bnds= """ + +BS_bnds = """ 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 @@ -61,32 +62,31 @@ levs_bnds.append(float(l)) -levs=numpy.array(levs) -levs_bnds=numpy.array(levs_bnds) +levs = numpy.array(levs) +levs_bnds = numpy.array(levs_bnds) nlevs = len(levs) -ntimes=12 +ntimes = 12 -itim = cmor.axis( - table_entry='time', - units='months since 2030-1-1', - length=ntimes, +itim = cmor.axis( + table_entry='time', + units='months since 2030-1-1', + length=ntimes, interval='1 month') -zlevs = numpy.array(( 0.1, 0.3, 0.55, 0.7, 0.9 )) -zlev_bnds=numpy.array(( 0.,.2, .42, .62, .8, 1. )) -table_entry='alternate_hybrid_sigma' +zlevs = numpy.array((0.1, 0.3, 0.55, 0.7, 0.9)) +zlev_bnds = numpy.array((0., .2, .42, .62, .8, 1.)) +table_entry = 'alternate_hybrid_sigma' -## for i in range(nlevs): -## print i,levs_bnds[i],levs[i],levs_bnds[i+1] -## if not (levs_bnds[i]<=levs[i]<=levs_bnds[i+1]) : -## print 'Yikes' +# for i in range(nlevs): +# print i,levs_bnds[i],levs[i],levs_bnds[i+1] +# if not (levs_bnds[i]<=levs[i]<=levs_bnds[i+1]) : +# print 'Yikes' -ilev = cmor.axis( +ilev = cmor.axis( table_entry=table_entry, units='', - length=nlevs, - coord_vals=levs, + length=nlevs, + coord_vals=levs, cell_bounds=levs_bnds) - diff --git a/Test/test_python_joerg_10.py b/Test/test_python_joerg_10.py index 398edae1..22e5cc97 100644 --- a/Test/test_python_joerg_10.py +++ b/Test/test_python_joerg_10.py @@ -1,96 +1,109 @@ -from test_python_common import * # common subroutines +from test_python_common import * # common subroutines import cmor._cmor import os pth = os.path.split(os.path.realpath(os.curdir)) -if pth[-1]=='Test': +if pth[-1] == 'Test': ipth = opth = '.' else: ipth = opth = 'Test' -myaxes=numpy.zeros(9,dtype='i') -myaxes2=numpy.zeros(9,dtype='i') -myvars=numpy.zeros(9,dtype='i') +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = numpy.zeros(9, dtype='i') +myvars = numpy.zeros(9, dtype='i') -cmor.setup(inpath=ipth,set_verbosity=cmor.CMOR_NORMAL, netcdf_file_action = cmor.CMOR_REPLACE, exit_control = cmor.CMOR_EXIT_ON_MAJOR); +cmor.setup( + inpath=ipth, + 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.set_cur_dataset_attribute("parent_experiment_rip","r1i1p1") +# cmor.set_cur_dataset_attribute("parent_experiment_rip","r1i1p1") -tables=[] +tables = [] a = cmor.load_table("Tables/CMIP6_grids.json") tables.append(a) tables.append(cmor.load_table("Tables/CMIP6_Omon.json")) -print 'Tables ids:',tables +print 'Tables ids:', tables cmor.set_table(tables[0]) -x,y,lon_coords,lat_coords,lon_vertices,lat_vertices = gen_irreg_grid(lon,lat) +x, y, lon_coords, lat_coords, lon_vertices, lat_vertices = gen_irreg_grid( + lon, lat) +myaxes[0] = cmor.axis(table_entry='y', + units='m', + coord_vals=y) +myaxes[1] = cmor.axis(table_entry='x', + units='m', + coord_vals=x) -myaxes[0] = cmor.axis(table_entry = 'y', - units = 'm', - coord_vals = y) -myaxes[1] = cmor.axis(table_entry = 'x', - units = 'm', - coord_vals = x) - -grid_id = cmor.grid(axis_ids = myaxes[:2], - latitude = lat_coords, - longitude = lon_coords, - latitude_vertices = lat_vertices, - longitude_vertices = lon_vertices) -print 'got grid_id:',grid_id +grid_id = cmor.grid(axis_ids=myaxes[:2], + latitude=lat_coords, + longitude=lon_coords, + latitude_vertices=lat_vertices, + longitude_vertices=lon_vertices) +print 'got grid_id:', grid_id myaxes[2] = grid_id ## mapnm = 'lambert_conformal_conic' -## params = [ "standard_parallel1", -## "longitude_of_central_meridian","latitude_of_projection_origin", -## "false_easting","false_northing","standard_parallel2" ] +# params = [ "standard_parallel1", +# "longitude_of_central_meridian","latitude_of_projection_origin", +# "false_easting","false_northing","standard_parallel2" ] ## punits = ["","","","","","" ] ## pvalues = [-20.,175.,13.,8.,0.,20. ] -## cmor.set_grid_mapping(grid_id=myaxes[2], +# cmor.set_grid_mapping(grid_id=myaxes[2], ## mapping_name = mapnm, ## parameter_names = params, ## parameter_values = pvalues, -## parameter_units = punits) +# parameter_units = punits) cmor.set_table(tables[1]) -myaxes[4] = cmor.axis(table_entry = "depth0m", - coord_vals=[0], - cell_bounds=[0,1], - units="m") -myaxes[3] = cmor.axis(table_entry = 'time', - units = 'months since 1980') +myaxes[4] = cmor.axis(table_entry="depth0m", + coord_vals=[0], + cell_bounds=[0, 1], + units="m") +myaxes[3] = cmor.axis(table_entry='time', + units='months since 1980') -pass_axes = [myaxes[3],myaxes[4],myaxes[2]] +pass_axes = [myaxes[3], myaxes[4], myaxes[2]] print 'ok going to cmorvar' -myvars[0] = cmor.variable( table_entry = 'calc', - units = 'mol m-3', - axis_ids = pass_axes, - original_name = 'yep', - history = 'no history', - comment = 'no future' - ) - -ntimes=2 -for i in range(0,ntimes,2): - data2d_1 = read_2d_input_files(i, varin2d[0], lat,lon) - data2d_1 = numpy.expand_dims(data2d_1,axis=0) - data2d_2 = read_2d_input_files(i+1, varin2d[0], lat,lon) - data2d_2 = numpy.expand_dims(data2d_2,axis=0) - data2d=numpy.array((data2d_1,data2d_2)) +myvars[0] = cmor.variable(table_entry='calc', + units='mol m-3', + axis_ids=pass_axes, + original_name='yep', + history='no history', + comment='no future' + ) + +ntimes = 2 +for i in range(0, ntimes, 2): + data2d_1 = read_2d_input_files(i, varin2d[0], lat, lon) + data2d_1 = numpy.expand_dims(data2d_1, axis=0) + data2d_2 = read_2d_input_files(i + 1, varin2d[0], lat, lon) + data2d_2 = numpy.expand_dims(data2d_2, axis=0) + data2d = numpy.array((data2d_1, data2d_2)) #data2d=numpy.expand_dims(data2d, axis=0) - #print data2d.shape - print 'writing time: ',i + # print data2d.shape + print 'writing time: ', i print data2d.shape print data2d - print Time[i:i+2],bnds_time[2*i:2*i+4] - cmor.write(myvars[0],data2d,2,time_vals=numpy.arange(i,i+2),time_bnds=numpy.arange(i,i+3)) + print Time[i:i + 2], bnds_time[2 * i:2 * i + 4] + cmor.write( + myvars[0], + data2d, + 2, + time_vals=numpy.arange( + i, + i + 2), + time_bnds=numpy.arange( + i, + i + 3)) cmor.close() diff --git a/Test/test_python_joerg_11.py b/Test/test_python_joerg_11.py index f79d643f..26ca4bc4 100644 --- a/Test/test_python_joerg_11.py +++ b/Test/test_python_joerg_11.py @@ -1,4 +1,4 @@ -from test_python_common import * # common subroutines +from test_python_common import * # common subroutines import cmor._cmor import os @@ -6,72 +6,77 @@ pth = os.path.split(os.path.realpath(os.curdir)) -myaxes=numpy.zeros(9,dtype='i') -myaxes2=numpy.zeros(9,dtype='i') -myvars=numpy.zeros(9,dtype='i') +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = 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.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") -tables=[] +tables = [] a = cmor.load_table("Tables/CMIP6_grids.json") tables.append(a) tables.append(cmor.load_table("Tables/CMIP6_Omon.json")) -print 'Tables ids:',tables +print 'Tables ids:', tables cmor.set_table(tables[0]) -x,y,lon_coords,lat_coords,lon_vertices,lat_vertices = gen_irreg_grid(lon,lat) +x, y, lon_coords, lat_coords, lon_vertices, lat_vertices = gen_irreg_grid( + lon, lat) +myaxes[0] = cmor.axis(table_entry='y', + units='m', + coord_vals=y) +myaxes[1] = cmor.axis(table_entry='x', + units='m', + coord_vals=x) -myaxes[0] = cmor.axis(table_entry = 'y', - units = 'm', - coord_vals = y) -myaxes[1] = cmor.axis(table_entry = 'x', - units = 'm', - coord_vals = x) - -grid_id = cmor.grid(axis_ids = myaxes[:2], - latitude = lat_coords, - longitude = lon_coords, - latitude_vertices = lat_vertices, - longitude_vertices = lon_vertices) -print 'got grid_id:',grid_id +grid_id = cmor.grid(axis_ids=myaxes[:2], + latitude=lat_coords, + longitude=lon_coords, + latitude_vertices=lat_vertices, + longitude_vertices=lon_vertices) +print 'got grid_id:', grid_id myaxes[2] = grid_id ## mapnm = 'lambert_conformal_conic' -## params = [ "standard_parallel1", -## "longitude_of_central_meridian","latitude_of_projection_origin", -## "false_easting","false_northing","standard_parallel2" ] +# params = [ "standard_parallel1", +# "longitude_of_central_meridian","latitude_of_projection_origin", +# "false_easting","false_northing","standard_parallel2" ] ## punits = ["","","","","","" ] ## pvalues = [-20.,175.,13.,8.,0.,20. ] -## cmor.set_grid_mapping(grid_id=myaxes[2], +# cmor.set_grid_mapping(grid_id=myaxes[2], ## mapping_name = mapnm, ## parameter_names = params, ## parameter_values = pvalues, -## parameter_units = punits) +# parameter_units = punits) cmor.set_table(tables[1]) -myaxes[3] = cmor.axis(table_entry = 'time', - units = 'months since 1980') -myaxes[4] = cmor.axis(table_entry = 'oline', - units = '', - coord_vals = """barents_opening bering_strait canadian_archipelago denmark_strait drake_passage english_channel pacific_equatorial_undercurrent faroe_scotland_channel florida_bahamas_strait fram_strait iceland_faroe_channel indonesian_thoughflow mozambique_channel taiwan_luzon_straits windward_passage""".split()) +myaxes[3] = cmor.axis(table_entry='time', + units='months since 1980') +myaxes[4] = cmor.axis(table_entry='oline', + units='', + coord_vals="""barents_opening bering_strait canadian_archipelago denmark_strait drake_passage english_channel pacific_equatorial_undercurrent faroe_scotland_channel florida_bahamas_strait fram_strait iceland_faroe_channel indonesian_thoughflow mozambique_channel taiwan_luzon_straits windward_passage""".split()) -pass_axes = [myaxes[3],myaxes[4]] +pass_axes = [myaxes[3], myaxes[4]] print 'ok going to cmorvar' -myvars[0] = cmor.variable( table_entry = 'mfo', - units = 'kg s-1', - axis_ids = pass_axes, - history = 'no history', - comment = 'no future' - ) +myvars[0] = cmor.variable(table_entry='mfo', + units='kg s-1', + axis_ids=pass_axes, + history='no history', + comment='no future' + ) for i in range(ntimes): - data2d = numpy.random.random((1,15)) - print 'writing time: ',i,data2d.shape,data2d - print Time[i],bnds_time[2*i:2*i+2] - cmor.write(myvars[0],data2d,1,time_vals=Time[i],time_bnds=bnds_time[2*i:2*i+2]) + data2d = numpy.random.random((1, 15)) + print 'writing time: ', i, data2d.shape, data2d + print Time[i], bnds_time[2 * i:2 * i + 2] + cmor.write(myvars[0], data2d, 1, time_vals=Time[i], + time_bnds=bnds_time[2 * i:2 * i + 2]) cmor.close() diff --git a/Test/test_python_joerg_12.py b/Test/test_python_joerg_12.py index 61e34526..84deb963 100644 --- a/Test/test_python_joerg_12.py +++ b/Test/test_python_joerg_12.py @@ -1,81 +1,86 @@ -from test_python_common import * # common subroutines +from test_python_common import * # common subroutines import cmor._cmor import os pth = os.path.split(os.path.realpath(os.curdir)) -if pth[-1]=='Test': +if pth[-1] == 'Test': ipth = opth = '.' else: ipth = opth = 'Test' -myaxes=numpy.zeros(9,dtype='i') -myaxes2=numpy.zeros(9,dtype='i') -myvars=numpy.zeros(9,dtype='i') +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = numpy.zeros(9, dtype='i') +myvars = numpy.zeros(9, dtype='i') -cmor.setup(inpath=ipth,set_verbosity=cmor.CMOR_NORMAL, netcdf_file_action = cmor.CMOR_REPLACE, exit_control = cmor.CMOR_EXIT_ON_MAJOR); +cmor.setup( + inpath=ipth, + 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") -tables=[] +tables = [] a = cmor.load_table("Tables/CMIP6_grids.json") tables.append(a) tables.append(cmor.load_table("Tables/CMIP6_Lmon.json")) -print 'Tables ids:',tables +print 'Tables ids:', tables cmor.set_table(tables[0]) -x,y,lon_coords,lat_coords,lon_vertices,lat_vertices = gen_irreg_grid(lon,lat) +x, y, lon_coords, lat_coords, lon_vertices, lat_vertices = gen_irreg_grid( + lon, lat) +myaxes[0] = cmor.axis(table_entry='y', + units='m', + coord_vals=y) +myaxes[1] = cmor.axis(table_entry='x', + units='m', + coord_vals=x) -myaxes[0] = cmor.axis(table_entry = 'y', - units = 'm', - coord_vals = y) -myaxes[1] = cmor.axis(table_entry = 'x', - units = 'm', - coord_vals = x) - -grid_id = cmor.grid(axis_ids = myaxes[:2], - latitude = lat_coords, - longitude = lon_coords, - latitude_vertices = lat_vertices, - longitude_vertices = lon_vertices) -print 'got grid_id:',grid_id +grid_id = cmor.grid(axis_ids=myaxes[:2], + latitude=lat_coords, + longitude=lon_coords, + latitude_vertices=lat_vertices, + longitude_vertices=lon_vertices) +print 'got grid_id:', grid_id myaxes[2] = grid_id ## mapnm = 'lambert_conformal_conic' -## params = [ "standard_parallel1", -## "longitude_of_central_meridian","latitude_of_projection_origin", -## "false_easting","false_northing","standard_parallel2" ] +# params = [ "standard_parallel1", +# "longitude_of_central_meridian","latitude_of_projection_origin", +# "false_easting","false_northing","standard_parallel2" ] ## punits = ["","","","","","" ] ## pvalues = [-20.,175.,13.,8.,0.,20. ] -## cmor.set_grid_mapping(grid_id=myaxes[2], +# cmor.set_grid_mapping(grid_id=myaxes[2], ## mapping_name = mapnm, ## parameter_names = params, ## parameter_values = pvalues, -## parameter_units = punits) +# parameter_units = punits) cmor.set_table(tables[1]) -myaxes[3] = cmor.axis(table_entry = 'time', - units = 'months since 1980') -myaxes[4] = cmor.axis(table_entry = 'vegtype', - units = '', - coord_vals = """grass marijuana opium""".split()) +myaxes[3] = cmor.axis(table_entry='time', + units='months since 1980') +myaxes[4] = cmor.axis(table_entry='vegtype', + units='', + coord_vals="""grass marijuana opium""".split()) -pass_axes = [myaxes[2],myaxes[3],myaxes[4]] +pass_axes = [myaxes[2], myaxes[3], myaxes[4]] print 'ok going to cmorvar' -myvars[0] = cmor.variable( table_entry = 'landCoverFrac', - units = '%', - axis_ids = pass_axes, - history = 'no history', - comment = 'no future' - ) +myvars[0] = cmor.variable(table_entry='landCoverFrac', + units='%', + axis_ids=pass_axes, + history='no history', + comment='no future' + ) for i in range(ntimes): - data2d = numpy.random.random((3,4,3)) - print 'writing time: ',i,data2d.shape,data2d - print Time[i],bnds_time[2*i:2*i+2] - cmor.write(myvars[0],data2d,1,time_vals=Time[i],time_bnds=bnds_time[2*i:2*i+2]) + data2d = numpy.random.random((3, 4, 3)) + print 'writing time: ', i, data2d.shape, data2d + print Time[i], bnds_time[2 * i:2 * i + 2] + cmor.write(myvars[0], data2d, 1, time_vals=Time[i], + time_bnds=bnds_time[2 * i:2 * i + 2]) cmor.close() diff --git a/Test/test_python_joerg_2.py b/Test/test_python_joerg_2.py index 49689d55..1c602598 100644 --- a/Test/test_python_joerg_2.py +++ b/Test/test_python_joerg_2.py @@ -3,11 +3,11 @@ import numpy -def test_mode(mode,i,suffix=''): +def test_mode(mode, i, suffix=''): cmor.setup(inpath='Tables', - netcdf_file_action = mode) + netcdf_file_action=mode) cmor.dataset_json("Test/common_user_input.json") - + table = 'CMIP6_Amon.json' cmor.load_table(table) levels = [100000., @@ -32,27 +32,27 @@ def test_mode(mode,i,suffix=''): 997, 996, 995, - 994, + 994, 500, 100] - - axes = [ {'table_entry': 'time', - 'units': 'months since 2000-01-01 00:00:00', - }, - {'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]}, - {'table_entry': 'plev19', - 'units': 'Pa', - 'coord_vals': levels}, - ] - - values = numpy.array(range(len(levels)), numpy.float32)+195 + + axes = [{'table_entry': 'time', + 'units': 'months since 2000-01-01 00:00:00', + }, + {'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]}, + {'table_entry': 'plev19', + 'units': 'Pa', + 'coord_vals': levels}, + ] + + values = numpy.array(range(len(levels)), numpy.float32) + 195 axis_ids = list() for axis in axes: axis_id = cmor.axis(**axis) @@ -62,22 +62,22 @@ def test_mode(mode,i,suffix=''): varid = cmor.variable(var, units, axis_ids, - history = 'variable history', - missing_value = -99 + history='variable history', + missing_value=-99 ) - print "Sending time bounds:",[[i,i+1]] - cmor.write(varid, values, time_vals = [i], time_bnds = [ [i,i+1] ]) + print "Sending time bounds:", [[i, i + 1]] + cmor.write(varid, values, time_vals=[i], time_bnds=[[i, i + 1]]) - fnm = cmor.close(varid,file_name=True) + fnm = cmor.close(varid, file_name=True) cmor.close() return fnm - -fnm='' + + +fnm = '' for i in range(5): - print i,fnm - if i==0: + print i, fnm + if i == 0: mode = cmor.CMOR_REPLACE else: mode = cmor.CMOR_APPEND - fnm = test_mode(cmor.CMOR_APPEND,i,fnm) - + fnm = test_mode(cmor.CMOR_APPEND, i, fnm) diff --git a/Test/test_python_joerg_3.py b/Test/test_python_joerg_3.py index b234a3dc..f2c53c01 100644 --- a/Test/test_python_joerg_3.py +++ b/Test/test_python_joerg_3.py @@ -1,48 +1,53 @@ -import cmor,numpy +import cmor +import numpy + +ntimes = 1 +nlat = 45 +nlon = 90 +nlev = 5 -ntimes=1 -nlat=45 -nlon=90 -nlev=5 def prep(mode): - error_flag = cmor.setup(inpath='Tables', netcdf_file_action=mode,logfile="Denis.LOG" ) + error_flag = cmor.setup( + inpath='Tables', + netcdf_file_action=mode, + logfile="Denis.LOG") error_flag = cmor.dataset_json("Test/common_user_input.json") -def prep_var(var,units): + +def prep_var(var, units): # creates 1 degree grid - dlat = 180/nlat - dlon = 360./nlon - alats = numpy.arange(-90+dlat/2.,90,dlat) - bnds_lat = numpy.arange(-90,90+dlat,dlat) - alons = numpy.arange(0+dlon/2.,360.,dlon)-180. - bnds_lon = numpy.arange(0,360.+dlon,dlon)-180. + dlat = 180 / nlat + dlon = 360. / nlon + alats = numpy.arange(-90 + dlat / 2., 90, dlat) + bnds_lat = numpy.arange(-90, 90 + dlat, dlat) + alons = numpy.arange(0 + dlon / 2., 360., dlon) - 180. + bnds_lon = numpy.arange(0, 360. + dlon, dlon) - 180. cmor.load_table("Tables/CMIP6_6hrLev.json") - #cmor.load_table("Test/IPCC_table_A1") - ilat = cmor.axis( - table_entry='latitude', - units='degrees_north', - length=nlat, - coord_vals=alats, - cell_bounds=bnds_lat) - - ilon = cmor.axis( - table_entry='longitude', - length=nlon, - units='degrees_east', - coord_vals=alons, - cell_bounds=bnds_lon) - - - zlevs = numpy.zeros(5,dtype='d') - zlevs[0]=0.1999999999999999999; - zlevs[1]= 0.3; - zlevs[2]=0.55; - zlevs[3]= 0.7; - zlevs[4] = 0.99999999; - - zlev_bnds = numpy.zeros(6,dtype='d') + # cmor.load_table("Test/IPCC_table_A1") + ilat = cmor.axis( + table_entry='latitude', + units='degrees_north', + length=nlat, + coord_vals=alats, + cell_bounds=bnds_lat) + + ilon = cmor.axis( + table_entry='longitude', + length=nlon, + units='degrees_east', + coord_vals=alons, + cell_bounds=bnds_lon) + + zlevs = numpy.zeros(5, dtype='d') + zlevs[0] = 0.1999999999999999999 + zlevs[1] = 0.3 + zlevs[2] = 0.55 + zlevs[3] = 0.7 + zlevs[4] = 0.99999999 + + zlev_bnds = numpy.zeros(6, dtype='d') zlev_bnds[0] = 0. zlev_bnds[1] = 0.2 zlev_bnds[2] = 0.42 @@ -50,84 +55,100 @@ def prep_var(var,units): zlev_bnds[4] = 0.8 zlev_bnds[5] = 1. - - - itim = cmor.axis( - table_entry='time1', + itim = cmor.axis( + table_entry='time1', units='days since 2010-1-1') - ilev = cmor.axis( + ilev = cmor.axis( table_entry="alternate_hybrid_sigma", units='1', - coord_vals=zlevs, + coord_vals=zlevs, cell_bounds=zlev_bnds) - - p0= numpy.array([1.e5,]) - a_coeff=numpy.array([ 0.1, 0.2, 0.3, 0.22, 0.1 ]) - b_coeff=numpy.array([ 0.0, 0.1, 0.2, 0.5, 0.8 ]) - a_coeff_bnds=numpy.array([0.,.15, .25, .25, .16, 0.]) - b_coeff_bnds=numpy.array([0.,.05, .15, .35, .65, 1.]) - + p0 = numpy.array([1.e5, ]) + a_coeff = numpy.array([0.1, 0.2, 0.3, 0.22, 0.1]) + b_coeff = numpy.array([0.0, 0.1, 0.2, 0.5, 0.8]) + a_coeff_bnds = numpy.array([0., .15, .25, .25, .16, 0.]) + b_coeff_bnds = numpy.array([0., .05, .15, .35, .65, 1.]) ierr = cmor.zfactor(zaxis_id=ilev, - zfactor_name='ap', - units='Pa', - axis_ids=[ilev,], - zfactor_values=a_coeff, - zfactor_bounds=a_coeff_bnds) - + zfactor_name='ap', + units='Pa', + axis_ids=[ilev, ], + zfactor_values=a_coeff, + zfactor_bounds=a_coeff_bnds) ierr = cmor.zfactor(zaxis_id=ilev, - zfactor_name='b', - axis_ids=[ilev,], - zfactor_values=b_coeff, - zfactor_bounds=b_coeff_bnds) - + zfactor_name='b', + axis_ids=[ilev, ], + zfactor_values=b_coeff, + zfactor_bounds=b_coeff_bnds) - ## ierr = cmor.zfactor(zaxis_id=ilev, - ## zfactor_name='p0', - ## units='Pa', - ## zfactor_values=p0) + # ierr = cmor.zfactor(zaxis_id=ilev, + # zfactor_name='p0', + # units='Pa', + # zfactor_values=p0) ips = cmor.zfactor(zaxis_id=ilev, - zfactor_name='ps', - axis_ids=[itim,ilat,ilon], - units='Pa') + zfactor_name='ps', + axis_ids=[itim, ilat, ilon], + units='Pa') + + ivar1 = cmor.variable( + var, + axis_ids=[ + itim, + ilev, + ilat, + ilon], + units=units, + missing_value=0.) + return ivar1, ips - ivar1 =cmor.variable(var,axis_ids=[itim,ilev,ilat,ilon],units=units,missing_value=0.) - return ivar1,ips for d in range(2): mode = cmor.CMOR_APPEND - if d==0: mode = cmor.CMOR_REPLACE + if d == 0: + mode = cmor.CMOR_REPLACE prep(mode) - ivar1,ips1=prep_var("ta","K") - ivar2,ips2=prep_var("hus","%") + ivar1, ips1 = prep_var("ta", "K") + ivar2, ips2 = prep_var("hus", "%") for i in range(4): - tval = [i/4.+d] - tbnd = [i/4.+d-0.125,i/4.+d+0.125] - print 'tvar',tval - print 'tbnd',tbnd - print 'writing time:',i,i/4. - data=numpy.random.random((ntimes,nlev,nlat,nlon))*30.+273 - data=data.astype("f") - cmor.write(ivar1,data,time_vals=tval,time_bnds=tbnd) - print 'wrote var 1 time:',i - data=numpy.random.random((ntimes,nlev,nlat,nlon)) - data=data.astype("f") - cmor.write(ivar2,data,time_vals=tval,time_bnds=tbnd) - print 'wrote var 2 time:',i - data=numpy.random.random((ntimes,nlat,nlon))*8.+96300. - data=data.astype("f") - cmor.write(ips1,data,store_with=ivar1,ntimes_passed=1,time_vals=tval,time_bnds=tbnd) - print 'wrote ps in var 1 time:',i - cmor.write(ips2,data,store_with=ivar2,ntimes_passed=1,time_vals=tval,time_bnds=tbnd) - print 'wrote ps in var 2 time:',i - file1=cmor.close(ivar1,True) - file2=cmor.close(ivar2,True) - print 'File1:',file1 - print 'File2:',file2 + tval = [i / 4. + d] + tbnd = [i / 4. + d - 0.125, i / 4. + d + 0.125] + print 'tvar', tval + print 'tbnd', tbnd + print 'writing time:', i, i / 4. + data = numpy.random.random((ntimes, nlev, nlat, nlon)) * 30. + 273 + data = data.astype("f") + cmor.write(ivar1, data, time_vals=tval, time_bnds=tbnd) + print 'wrote var 1 time:', i + data = numpy.random.random((ntimes, nlev, nlat, nlon)) + data = data.astype("f") + cmor.write(ivar2, data, time_vals=tval, time_bnds=tbnd) + print 'wrote var 2 time:', i + data = numpy.random.random((ntimes, nlat, nlon)) * 8. + 96300. + data = data.astype("f") + cmor.write( + ips1, + data, + store_with=ivar1, + ntimes_passed=1, + time_vals=tval, + time_bnds=tbnd) + print 'wrote ps in var 1 time:', i + cmor.write( + ips2, + data, + store_with=ivar2, + ntimes_passed=1, + time_vals=tval, + time_bnds=tbnd) + print 'wrote ps in var 2 time:', i + file1 = cmor.close(ivar1, True) + file2 = cmor.close(ivar2, True) + print 'File1:', file1 + print 'File2:', file2 cmor.close() -print cmor.close(ivar1,True) +print cmor.close(ivar1, True) cmor.close() diff --git a/Test/test_python_joerg_4.py b/Test/test_python_joerg_4.py index 99a13ee9..3a75cade 100644 --- a/Test/test_python_joerg_4.py +++ b/Test/test_python_joerg_4.py @@ -1,79 +1,77 @@ -import cmor,numpy +import cmor +import numpy error_flag = cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) - + error_flag = cmor.dataset_json("Test/common_user_input.json") # creates 1 degree grid -nlat=18 -nlon=36 -alats = numpy.arange(180)-89.5 -bnds_lat = numpy.arange(181)-90 -alons=numpy.arange(360)+.5 -bnds_lon=numpy.arange(361) +nlat = 18 +nlon = 36 +alats = numpy.arange(180) - 89.5 +bnds_lat = numpy.arange(181) - 90 +alons = numpy.arange(360) + .5 +bnds_lon = numpy.arange(361) cmor.load_table("Tables/CMIP6_Omon.json") -ilat = cmor.axis( - table_entry='latitude', - units='degrees_north', - length=nlat, - coord_vals=alats, - cell_bounds=bnds_lat) +ilat = cmor.axis( + table_entry='latitude', + units='degrees_north', + length=nlat, + coord_vals=alats, + cell_bounds=bnds_lat) -ilon = cmor.axis( - table_entry='longitude', - length=nlon, - units='degrees_east', - coord_vals=alons, - cell_bounds=bnds_lon) +ilon = cmor.axis( + table_entry='longitude', + length=nlon, + units='degrees_east', + coord_vals=alons, + cell_bounds=bnds_lon) -ntimes=12 -plevs = numpy.array([0, 17.0, 27.0, 37.0, 47.0, 57.0, 68.0, 82.0]) -plevs.sort() -plevs_bnds = numpy.array([0, 11, 22.0, 32.0, 42.0, 52.0, 62.5, 75.0, 91.0 ]) +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() -itim = cmor.axis( - table_entry='time', - units='months since 2030-1-1', - length=ntimes, +itim = cmor.axis( + table_entry='time', + units='months since 2030-1-1', + length=ntimes, interval='1 month') -ilev = cmor.axis( - table_entry='depth_coord', - units='m', - coord_vals=plevs, - cell_bounds=plevs_bnds) +ilev = cmor.axis( + table_entry='depth_coord', + units='m', + coord_vals=plevs, + cell_bounds=plevs_bnds) try: - ilev = cmor.axis( - table_entry='depth_coord', - units='m', - coord_vals=plevs, - cell_bounds=plevs_bnds) -except: + ilev = cmor.axis( + table_entry='depth_coord', + units='m', + coord_vals=plevs, + cell_bounds=plevs_bnds) +except BaseException: pass -var3d_ids = cmor.variable( - table_entry='co3', - units='mol m-3', +var3d_ids = cmor.variable( + table_entry='co3', + units='mol m-3', axis_ids=numpy.array((ilev, ilon, ilat, itim)), - missing_value=numpy.array([1.0e28,],dtype=numpy.float32)[0], + missing_value=numpy.array([1.0e28, ], dtype=numpy.float32)[0], original_name='cloud') - for it in range(ntimes): time = numpy.array((it)) - bnds_time = numpy.array((it,it+1)) - data3d = numpy.random.random((len(plevs),nlon,nlat))*30.+265. + bnds_time = numpy.array((it, it + 1)) + data3d = numpy.random.random((len(plevs), nlon, nlat)) * 30. + 265. data3d = data3d.astype('f') - error_flag = cmor.write( - var_id = var3d_ids, - data = data3d, - ntimes_passed = 1, - time_vals = time, - time_bnds = bnds_time ) + error_flag = cmor.write( + var_id=var3d_ids, + data=data3d, + ntimes_passed=1, + time_vals=time, + time_bnds=bnds_time) - -error_flag = cmor.close() +error_flag = cmor.close() diff --git a/Test/test_python_joerg_5.py b/Test/test_python_joerg_5.py index ad242d80..8a707378 100644 --- a/Test/test_python_joerg_5.py +++ b/Test/test_python_joerg_5.py @@ -1,17 +1,17 @@ -import cmor,numpy +import cmor +import numpy error_flag = cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) - + error_flag = cmor.dataset_json("Test/common_user_input.json") - + # creates 1 degree grid -nlat=18 -nlon=36 -alats = numpy.arange(180)-89.5 -bnds_lat = numpy.arange(181)-90 -alons=numpy.arange(360)+.5 -bnds_lon=numpy.arange(361) +nlat = 18 +nlon = 36 +alats = numpy.arange(180) - 89.5 +bnds_lat = numpy.arange(181) - 90 +alons = numpy.arange(360) + .5 +bnds_lon = numpy.arange(361) cmor.load_table("Tables/CMIP6_Amon.json") -error_flag = cmor.close() - +error_flag = cmor.close() diff --git a/Test/test_python_joerg_6.py b/Test/test_python_joerg_6.py index fd3eb055..a136de81 100644 --- a/Test/test_python_joerg_6.py +++ b/Test/test_python_joerg_6.py @@ -1,14 +1,17 @@ -import cmor,numpy +import cmor +import numpy error_flag = cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) - + error_flag = cmor.dataset_json("Test/common_user_input.json") cmor.load_table("CMIP6_Omon.json") -itime = cmor.axis(table_entry="time",units='months since 2010',coord_vals=numpy.array([0,1,2,3,4.]),cell_bounds=numpy.array([0,1,2,3,4,5.])) -ivar = cmor.variable(table_entry="masso",axis_ids=[itime],units='kg') +itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array( + [0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) +ivar = cmor.variable(table_entry="masso", axis_ids=[itime], units='kg') -data=numpy.random.random(5) -for i in range(0,5): - cmor.write(ivar,data[i:i])#,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1])) -error_flag = cmor.close() +data = numpy.random.random(5) +for i in range(0, 5): + # ,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1])) + cmor.write(ivar, data[i:i]) +error_flag = cmor.close() diff --git a/Test/test_python_joerg_7.py b/Test/test_python_joerg_7.py index ab5ffa91..4cb71cea 100644 --- a/Test/test_python_joerg_7.py +++ b/Test/test_python_joerg_7.py @@ -1,36 +1,45 @@ -import cmor,numpy +import cmor +import numpy error_flag = cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) - + error_flag = cmor.dataset_json("Test/common_user_input.json") - + cmor.load_table("CMIP6_Omon.json") -itime = cmor.axis(table_entry="time",units='months since 2010',coord_vals=numpy.array([0,1,2,3,4.]),cell_bounds=numpy.array([0,1,2,3,4,5.])) +itime = cmor.axis(table_entry="time", units='months since 2010', coord_vals=numpy.array( + [0, 1, 2, 3, 4.]), cell_bounds=numpy.array([0, 1, 2, 3, 4, 5.])) # creates 1 degree grid -nlat=18 -nlon=36 -alats = numpy.arange(180)-89.5 -bnds_lat = numpy.arange(181)-90 -alons=numpy.arange(360)+.5 -bnds_lon=numpy.arange(361) -ilat = cmor.axis( - table_entry='latitude', - units='degrees_north', - length=nlat, - coord_vals=alats, - cell_bounds=bnds_lat) - -ilon = cmor.axis( - table_entry='longitude', - length=nlon, - units='degrees_east', - coord_vals=alons, - cell_bounds=bnds_lon) -ivar = cmor.variable(table_entry="eparag100",axis_ids=[itime,ilat,ilon],units='mol m-2 s-1',positive="up") +nlat = 18 +nlon = 36 +alats = numpy.arange(180) - 89.5 +bnds_lat = numpy.arange(181) - 90 +alons = numpy.arange(360) + .5 +bnds_lon = numpy.arange(361) +ilat = cmor.axis( + table_entry='latitude', + units='degrees_north', + length=nlat, + coord_vals=alats, + cell_bounds=bnds_lat) -data=numpy.random.random((5,nlat,nlon)) -for i in range(0,5): - cmor.write(ivar,data[i:i])#,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1])) -error_flag = cmor.close() +ilon = cmor.axis( + table_entry='longitude', + length=nlon, + units='degrees_east', + coord_vals=alons, + cell_bounds=bnds_lon) +ivar = cmor.variable( + table_entry="eparag100", + axis_ids=[ + itime, + ilat, + ilon], + units='mol m-2 s-1', + positive="up") +data = numpy.random.random((5, nlat, nlon)) +for i in range(0, 5): + # ,time_vals=numpy.array([i,]),time_bnds=numpy.array([i,i+1])) + cmor.write(ivar, data[i:i]) +error_flag = cmor.close() diff --git a/Test/test_python_joerg_8.py b/Test/test_python_joerg_8.py index a3cd3c05..c1ab849d 100644 --- a/Test/test_python_joerg_8.py +++ b/Test/test_python_joerg_8.py @@ -1,80 +1,85 @@ -from test_python_common import * # common subroutines +from test_python_common import * # common subroutines import cmor._cmor import os pth = os.path.split(os.path.realpath(os.curdir)) -if pth[-1]=='Test': +if pth[-1] == 'Test': ipth = opth = '.' else: ipth = opth = 'Test' -myaxes=numpy.zeros(9,dtype='i') -myaxes2=numpy.zeros(9,dtype='i') -myvars=numpy.zeros(9,dtype='i') +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = 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.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") -tables=[] +tables = [] a = cmor.load_table("Tables/CMIP6_grids.json") tables.append(a) tables.append(cmor.load_table("Tables/CMIP6_Omon.json")) -print 'Tables ids:',tables +print 'Tables ids:', tables cmor.set_table(tables[0]) -x,y,lon_coords,lat_coords,lon_vertices,lat_vertices = gen_irreg_grid(lon,lat) +x, y, lon_coords, lat_coords, lon_vertices, lat_vertices = gen_irreg_grid( + lon, lat) +myaxes[0] = cmor.axis(table_entry='y', + units='m', + coord_vals=y) +myaxes[1] = cmor.axis(table_entry='x', + units='m', + coord_vals=x) -myaxes[0] = cmor.axis(table_entry = 'y', - units = 'm', - coord_vals = y) -myaxes[1] = cmor.axis(table_entry = 'x', - units = 'm', - coord_vals = x) - -grid_id = cmor.grid(axis_ids = myaxes[:2], - latitude = lat_coords, - longitude = lon_coords, - latitude_vertices = lat_vertices, - longitude_vertices = lon_vertices) -print 'got grid_id:',grid_id +grid_id = cmor.grid(axis_ids=myaxes[:2], + latitude=lat_coords, + longitude=lon_coords, + latitude_vertices=lat_vertices, + longitude_vertices=lon_vertices) +print 'got grid_id:', grid_id myaxes[2] = grid_id ## mapnm = 'lambert_conformal_conic' -## params = [ "standard_parallel1", -## "longitude_of_central_meridian","latitude_of_projection_origin", -## "false_easting","false_northing","standard_parallel2" ] +# params = [ "standard_parallel1", +# "longitude_of_central_meridian","latitude_of_projection_origin", +# "false_easting","false_northing","standard_parallel2" ] ## punits = ["","","","","","" ] ## pvalues = [-20.,175.,13.,8.,0.,20. ] -## cmor.set_grid_mapping(grid_id=myaxes[2], +# cmor.set_grid_mapping(grid_id=myaxes[2], ## mapping_name = mapnm, ## parameter_names = params, ## parameter_values = pvalues, -## parameter_units = punits) +# parameter_units = punits) cmor.set_table(tables[1]) -myaxes[3] = cmor.axis(table_entry = 'time', - units = 'months since 1980') +myaxes[3] = cmor.axis(table_entry='time', + units='months since 1980') -pass_axes = [myaxes[3],myaxes[2]] +pass_axes = [myaxes[3], myaxes[2]] print 'ok going to cmorvar' -myvars[0] = cmor.variable( table_entry = 'eparag100', - units = 'mol m-2 s-1', - axis_ids = pass_axes, - positive = 'down', - original_name = 'HFLS', - history = 'no history', - comment = 'no future' - ) +myvars[0] = cmor.variable(table_entry='eparag100', + units='mol m-2 s-1', + axis_ids=pass_axes, + positive='down', + original_name='HFLS', + history='no history', + comment='no future' + ) for i in range(ntimes): - data2d = read_2d_input_files(i, varin2d[0], lat,lon) - print 'writing time: ',i,data2d.shape,data2d - print Time[i],bnds_time[2*i:2*i+2] - cmor.write(myvars[0],data2d,1,time_vals=Time[i],time_bnds=bnds_time[2*i:2*i+2]) + data2d = read_2d_input_files(i, varin2d[0], lat, lon) + print 'writing time: ', i, data2d.shape, data2d + print Time[i], bnds_time[2 * i:2 * i + 2] + cmor.write(myvars[0], data2d, 1, time_vals=Time[i], + time_bnds=bnds_time[2 * i:2 * i + 2]) cmor.close() diff --git a/Test/test_python_joerg_9.py b/Test/test_python_joerg_9.py index 20ad9d9e..da9078bd 100644 --- a/Test/test_python_joerg_9.py +++ b/Test/test_python_joerg_9.py @@ -1,91 +1,93 @@ -import cmor,numpy,cdms2 +import cmor +import numpy +import cdms2 -f=cdms2.open("Test/GR30s_halo.nc") +f = cdms2.open("Test/GR30s_halo.nc") -nlon=f['grid_center_lat'].shape[1] -nlat=f['grid_center_lat'].shape[0] +nlon = f['grid_center_lat'].shape[1] +nlat = f['grid_center_lat'].shape[0] error_flag = cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_APPEND) - -error_flag = cmor.dataset( - outpath='Joerg', - experiment_id='DcppC2', - institution= 'GICC (Generic International Climate Center, Geneva, Switzerland)', - institute_id = "GICC", - source='GICCM1 (2002): ', - calendar='360_day', - realization=1, - contact = 'Rusty Koder (koder@middle_earth.net) ', - history='Output from archivcl_A1.nce/giccm_03_std_2xCO2_2256.', - comment='Equilibrium reached after 30-year spin-up ', - references='Model described by Koder and Tolkien ', - model_id="GICCM1", - forcing="Ant", - parent_experiment_id="lgm",branch_time=0) - -ntables=[cmor.load_table("Tables/CMIP6_grids")] + +error_flag = cmor.dataset( + outpath='Joerg', + experiment_id='DcppC2', + institution='GICC (Generic International Climate Center, Geneva, Switzerland)', + institute_id="GICC", + source='GICCM1 (2002): ', + calendar='360_day', + realization=1, + contact='Rusty Koder (koder@middle_earth.net) ', + history='Output from archivcl_A1.nce/giccm_03_std_2xCO2_2256.', + comment='Equilibrium reached after 30-year spin-up ', + references='Model described by Koder and Tolkien ', + model_id="GICCM1", + forcing="Ant", + parent_experiment_id="lgm", branch_time=0) + +ntables = [cmor.load_table("Tables/CMIP6_grids")] ntables.append(cmor.load_table("Tables/CMIP5_OImon")) cmor.set_table(ntables[0]) -axes=numpy.zeros(2,numpy.int32) - -axes[0] = cmor.axis( - table_entry = 'i_index', - length = nlon, - coord_vals = numpy.arange(0,nlon,1,numpy.float32), - units = '1') - -axes[1] = cmor.axis( - table_entry = 'j_index', - length = nlat, - coord_vals = numpy.arange(0,nlat,1,numpy.float32), - units = '1') - - -olat_val = f("grid_center_lat").filled().astype('f') -olon_val = f("grid_center_lon").filled().astype('f') +axes = numpy.zeros(2, numpy.int32) + +axes[0] = cmor.axis( + table_entry='i_index', + length=nlon, + coord_vals=numpy.arange(0, nlon, 1, numpy.float32), + units='1') + +axes[1] = cmor.axis( + table_entry='j_index', + length=nlat, + coord_vals=numpy.arange(0, nlat, 1, numpy.float32), + units='1') + + +olat_val = f("grid_center_lat").filled().astype('f') +olon_val = f("grid_center_lon").filled().astype('f') bnds_olat = f("grid_corner_lat").filled().astype('f') bnds_olon = f("grid_corner_lon").filled().astype('f') -grid_id = cmor.grid( - axis_ids = axes, - latitude = olat_val, - longitude = olon_val, - latitude_vertices = bnds_olat, - longitude_vertices = bnds_olon) +grid_id = cmor.grid( + axis_ids=axes, + latitude=olat_val, + longitude=olon_val, + latitude_vertices=bnds_olat, + longitude_vertices=bnds_olon) cmor.set_table(ntables[1]) -ntimes=12 +ntimes = 12 -tim_id = cmor.axis( table_entry="time", - units="months since 2010") +tim_id = cmor.axis(table_entry="time", + units="months since 2010") time_vals = numpy.arange(ntimes).astype('f') -bnds_time = numpy.arange(ntimes+1).astype('f') +bnds_time = numpy.arange(ntimes + 1).astype('f') -var_ids = cmor.variable( - table_entry = "sic", - units = "%", -## positive = vartabin(3,i), - axis_ids = [grid_id, tim_id ] - ) +var_ids = cmor.variable( + table_entry="sic", + units="%", + ## positive = vartabin(3,i), + axis_ids=[grid_id, tim_id] +) -fnm="" +fnm = "" for i in range(ntimes): - print 'writing time:',time_vals[i],bnds_time[i:i+2] - data = numpy.random.random((nlon,nlat)) - error_flag = cmor.write( - var_id = var_ids, - data = data, - ntimes_passed = 1, - file_suffix = fnm, - time_vals = time_vals[i], - time_bnds = bnds_time[i:i+2]) - - fnm = cmor.close(var_ids,file_name=True,preserve=True) - print 'dumped to:',fnm + print 'writing time:', time_vals[i], bnds_time[i:i + 2] + data = numpy.random.random((nlon, nlat)) + error_flag = cmor.write( + var_id=var_ids, + data=data, + ntimes_passed=1, + file_suffix=fnm, + time_vals=time_vals[i], + time_bnds=bnds_time[i:i + 2]) + + fnm = cmor.close(var_ids, file_name=True, preserve=True) + print 'dumped to:', fnm cmor.close() diff --git a/Test/test_python_joerg_tim2_clim.py b/Test/test_python_joerg_tim2_clim.py index c81037ee..94a76fa6 100644 --- a/Test/test_python_joerg_tim2_clim.py +++ b/Test/test_python_joerg_tim2_clim.py @@ -2,60 +2,61 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='/git/cmip5-cmor-tables/Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3) + netcdf_file_action=cmor.CMOR_REPLACE_3) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', '360_day', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - parent_experiment_rip = 'N/A', - branch_time = 0, - contact = 'brian clough') - + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + parent_experiment_rip='N/A', + branch_time=0, + contact='brian clough') + table = 'CMIP5_Oclim' cmor.load_table(table) - axes = [ {'table_entry': 'time2', - 'units': 'days since 1850-01-01 00:00:00', - 'coord_vals' : [15.5, 45, 74.5, 105, 135.5, 166, 196.5, 227.5, 258, 288.5, 319, 349.5], - 'cell_bounds':[0,31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365], - }, - {'table_entry': 'depth_coord', - 'units': 'm', - 'coord_vals': [5000., 3000., 2000., 1000.], - 'cell_bounds': [ 5000., 3000., 2000., 1000.,0]}, - {'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]}, - ] - + axes = [{'table_entry': 'time2', + 'units': 'days since 1850-01-01 00:00:00', + 'coord_vals': [15.5, 45, 74.5, 105, 135.5, 166, 196.5, 227.5, 258, 288.5, 319, 349.5], + 'cell_bounds': [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365], + }, + {'table_entry': 'depth_coord', + 'units': 'm', + 'coord_vals': [5000., 3000., 2000., 1000.], + 'cell_bounds': [5000., 3000., 2000., 1000., 0]}, + {'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: - print 'doing:',axis + print 'doing:', axis axis_id = cmor.axis(**axis) axis_ids.append(axis_id) for var, units, value in (('difvso', 'm2 s-1', 274.),): - values = numpy.ones(map(lambda x: len(x["coord_vals"]),axes))*value + values = numpy.ones(map(lambda x: len(x["coord_vals"]), axes)) * value varid = cmor.variable(var, units, axis_ids, - history = 'variable history', - missing_value = -99 + history='variable history', + missing_value=-99 ) cmor.write(varid, values) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_joerg_tim2_clim_02.py b/Test/test_python_joerg_tim2_clim_02.py index 130bcf01..ddc8d694 100644 --- a/Test/test_python_joerg_tim2_clim_02.py +++ b/Test/test_python_joerg_tim2_clim_02.py @@ -2,53 +2,54 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3) + netcdf_file_action=cmor.CMOR_REPLACE_3) cmor.dataset_json("Test/common_user_input.json") - + table = 'CMIP6_Oclim.json' cmor.load_table(table) - axes = [ {'table_entry': 'time2', - 'units': 'days since 1850-01-01 00:00:00', - 'coord_vals' : [15.5, 45,], - 'cell_bounds':[[0,31],[31,62]] - }, - {'table_entry': 'depth_coord', - 'units': 'm', - 'coord_vals': [5000., 3000., 2000., 1000.], - 'cell_bounds': [ 5000., 3000., 2000., 1000.,0]}, - {'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]}, - ] - + axes = [{'table_entry': 'time2', + 'units': 'days since 1850-01-01 00:00:00', + 'coord_vals': [15.5, 45, ], + 'cell_bounds':[[0, 31], [31, 62]] + }, + {'table_entry': 'depth_coord', + 'units': 'm', + 'coord_vals': [5000., 3000., 2000., 1000.], + 'cell_bounds': [5000., 3000., 2000., 1000., 0]}, + {'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: - print 'doing:',axis + print 'doing:', axis axis_id = cmor.axis(**axis) axis_ids.append(axis_id) for var, units, value in (('difvso', 'm2 s-1', 274.),): - values = numpy.ones(map(lambda x: len(x["coord_vals"]),axes))*value - values=values.astype("f") + values = numpy.ones(map(lambda x: len(x["coord_vals"]), axes)) * value + values = values.astype("f") varid = cmor.variable(var, units, axis_ids, - history = 'variable history', - missing_value = -99 + history='variable history', + missing_value=-99 ) cmor.write(varid, values) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_max_variables.py b/Test/test_python_max_variables.py index b30f7075..055fd9d8 100644 --- a/Test/test_python_max_variables.py +++ b/Test/test_python_max_variables.py @@ -1,75 +1,73 @@ -import cmor,numpy +import cmor +import numpy error_flag = cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_REPLACE) - + error_flag = cmor.dataset_json("Test/common_user_input.json") # creates 10 degree grid -nlat=18 -nlon=36 -alats = numpy.arange(180)-89.5 -bnds_lat = numpy.arange(181)-90. -alons=numpy.arange(360)+.5 -bnds_lon=numpy.arange(361) +nlat = 18 +nlon = 36 +alats = numpy.arange(180) - 89.5 +bnds_lat = numpy.arange(181) - 90. +alons = numpy.arange(360) + .5 +bnds_lon = numpy.arange(361) cmor.load_table("Tables/CMIP6_Amon.json") -ilat = cmor.axis( - table_entry='latitude', - units='degrees_north', - length=nlat, - coord_vals=alats, - cell_bounds=bnds_lat) +ilat = cmor.axis( + table_entry='latitude', + units='degrees_north', + length=nlat, + coord_vals=alats, + cell_bounds=bnds_lat) -ilon = cmor.axis( - table_entry='longitude', - length=nlon, - units='degrees_east', - coord_vals=alons, - cell_bounds=bnds_lon) +ilon = cmor.axis( + table_entry='longitude', + length=nlon, + units='degrees_east', + coord_vals=alons, + cell_bounds=bnds_lon) -ntimes=600 +ntimes = 600 plevs = numpy.array([100000., 92500, 85000, 70000, 60000, 50000, 40000, 30000, 25000, - 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000, 999, 998, 997, 996, - 995, 994, 993, 992,500,100]) + 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000, 999, 998, 997, 996, + 995, 994, 993, 992, 500, 100]) -itim = cmor.axis( - table_entry='time', - units='months since 2030-1-1', - length=ntimes, +itim = cmor.axis( + table_entry='time', + units='months since 2030-1-1', + length=ntimes, interval='1 month') -ilev = cmor.axis( - table_entry='plev19', - units='Pa', - coord_vals=plevs, - cell_bounds=None) +ilev = cmor.axis( + table_entry='plev19', + units='Pa', + coord_vals=plevs, + cell_bounds=None) - -for it in range(ntimes): +for it in range(ntimes): - var3d_ids = cmor.variable( - table_entry='ta', + var3d_ids = cmor.variable( + table_entry='ta', units='K', comment='My wise comments here', axis_ids=numpy.array((ilev, ilon, ilat, itim)), - missing_value=numpy.array([1.0e28,],dtype=numpy.float32)[0], + missing_value=numpy.array([1.0e28, ], dtype=numpy.float32)[0], original_name='cloud') time = numpy.array((it)) - bnds_time = numpy.array((it,it+1)) - data3d = numpy.random.random((len(plevs),nlon,nlat))*30.+265. + bnds_time = numpy.array((it, it + 1)) + data3d = numpy.random.random((len(plevs), nlon, nlat)) * 30. + 265. data3d = data3d.astype('f') - error_flag = cmor.write( - var_id = var3d_ids, - data = data3d, - ntimes_passed = 1, - time_vals = time, - time_bnds = bnds_time ) + error_flag = cmor.write( + var_id=var3d_ids, + data=data3d, + ntimes_passed=1, + time_vals=time, + time_bnds=bnds_time) cmor.close(var3d_ids) - - -error_flag = cmor.close() +error_flag = cmor.close() diff --git a/Test/test_python_max_variables_2.py b/Test/test_python_max_variables_2.py index 0bac817a..77e4f8c3 100644 --- a/Test/test_python_max_variables_2.py +++ b/Test/test_python_max_variables_2.py @@ -1,82 +1,81 @@ -import cmor,numpy +import cmor +import numpy error_flag = cmor.setup(inpath='Test', netcdf_file_action=cmor.CMOR_REPLACE) - + error_flag = cmor.dataset_json("Test/common_user_input.json") - + # creates 10 degree grid -nlat=18 -nlon=36 -alats = numpy.arange(180)-89.5 -bnds_lat = numpy.arange(181)-90. -alons=numpy.arange(360)+.5 -bnds_lon=numpy.arange(361) +nlat = 18 +nlon = 36 +alats = numpy.arange(180) - 89.5 +bnds_lat = numpy.arange(181) - 90. +alons = numpy.arange(360) + .5 +bnds_lon = numpy.arange(361) cmor.load_table("Tables/CMIP6_Amon.json") -ilat = cmor.axis( - table_entry='latitude', - units='degrees_north', - length=nlat, - coord_vals=alats, - cell_bounds=bnds_lat) - -ilon = cmor.axis( - table_entry='longitude', - length=nlon, - units='degrees_east', - coord_vals=alons, - cell_bounds=bnds_lon) - -ntimes=600 +ilat = cmor.axis( + table_entry='latitude', + units='degrees_north', + length=nlat, + coord_vals=alats, + cell_bounds=bnds_lat) + +ilon = cmor.axis( + table_entry='longitude', + length=nlon, + units='degrees_east', + coord_vals=alons, + cell_bounds=bnds_lon) + +ntimes = 600 plevs = numpy.array([100000., 92500, 85000, 70000, 60000, 50000, 40000, 30000, 25000, - 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000, 999, 998, 997, 996, - 995, 994, 993, 992, 500, 100]) + 20000, 15000, 10000, 7000, 5000, 3000, 2000, 1000, 999, 998, 997, 996, + 995, 994, 993, 992, 500, 100]) -itim = cmor.axis( - table_entry='time', - units='months since 2030-1-1', - length=ntimes, +itim = cmor.axis( + table_entry='time', + units='months since 2030-1-1', + length=ntimes, interval='1 month') -ilev = cmor.axis( - table_entry='plev19', - units='Pa', - coord_vals=plevs, - cell_bounds=None) +ilev = cmor.axis( + table_entry='plev19', + units='Pa', + coord_vals=plevs, + cell_bounds=None) -var3d_ids = cmor.variable( - table_entry='ta', - units='K', +var3d_ids = cmor.variable( + table_entry='ta', + units='K', axis_ids=numpy.array((ilev, ilon, ilat, itim)), - missing_value=numpy.array([1.0e28,],dtype=numpy.float32)[0], + missing_value=numpy.array([1.0e28, ], dtype=numpy.float32)[0], original_name='cloud') - + for it in range(ntimes): - + time = numpy.array((it)) - bnds_time = numpy.array((it,it+1)) - data3d = numpy.random.random((len(plevs),nlon,nlat))*30.+265. + bnds_time = numpy.array((it, it + 1)) + data3d = numpy.random.random((len(plevs), nlon, nlat)) * 30. + 265. data3d = data3d.astype('f') - error_flag = cmor.write( - var_id = var3d_ids, - data = data3d, - ntimes_passed = 1, - time_vals = time, - time_bnds = bnds_time ) - - if (it == ntimes-1) : + error_flag = cmor.write( + var_id=var3d_ids, + data=data3d, + ntimes_passed=1, + time_vals=time, + time_bnds=bnds_time) + + if (it == ntimes - 1): fnm = cmor.close(var3d_ids, True) - print it,fnm + print it, fnm else: - if (it%50)== 0: + if (it % 50) == 0: fnm = cmor.close(var3d_ids, True, True) - print it,fnm + print it, fnm else: ierr = cmor.close(var3d_ids, False, True) - -error_flag = cmor.close() - +error_flag = cmor.close() diff --git a/Test/test_python_memory_check.py b/Test/test_python_memory_check.py index df9a1584..5634d2fc 100644 --- a/Test/test_python_memory_check.py +++ b/Test/test_python_memory_check.py @@ -10,19 +10,20 @@ _proc_status = '/proc/%d/status' % os.getpid() -_scale = {'kB': 1024.0, 'mB': 1024.0*1024.0, - 'KB': 1024.0, 'MB': 1024.0*1024.0} +_scale = {'kB': 1024.0, 'mB': 1024.0 * 1024.0, + 'KB': 1024.0, 'MB': 1024.0 * 1024.0} + def _VmB(VmKey): '''Private. ''' global _proc_status, _scale - # get pseudo file /proc//status + # get pseudo file /proc//status try: t = open(_proc_status) v = t.read() t.close() - except: + except BaseException: return 0.0 # non-Linux? # get VmKey line e.g. 'VmRSS: 9999 kB\n ...' i = v.index(VmKey) @@ -50,55 +51,59 @@ def stacksize(since=0.0): ''' return _VmB('VmStk:') - since + import cmor import sys -def memory_usage(fhd,mem=0,res=0,stk=0): + +def memory_usage(fhd, mem=0, res=0, stk=0): nmem = memory() nres = resident() nstk = stacksize() - fhd.write( 'memory: %s\t%i\t\t%i\t\t%i\n' % (nmem,memory(mem), resident(res), stacksize(stk))) - return nmem,nres,nstk + fhd.write('memory: %s\t%i\t\t%i\t\t%i\n' % + (nmem, memory(mem), resident(res), stacksize(stk))) + return nmem, nres, nstk + def memory_check(): - cmor.setup(inpath='Tables',netcdf_file_action=cmor.CMOR_REPLACE) + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") - - table='CMIP6_Amon.json' + + table = 'CMIP6_Amon.json' cmor.load_table(table) tval = [] - tbounds=[] + tbounds = [] passtime = True ntimes = 1200 for time in range(ntimes): - tval.append(15 + time*30) - tbounds.append([time*30, (time + 1)*30]) + tval.append(15 + time * 30) + tbounds.append([time * 30, (time + 1) * 30]) if passtime: timdef = {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - } + 'units': 'days since 2000-01-01 00:00:00', + } else: timdef = {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - 'coord_vals' : tval, - 'cell_bounds' : tbounds, - } - - axes = [ timdef, - {'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]}, - ] - + 'units': 'days since 2000-01-01 00:00:00', + 'coord_vals': tval, + 'cell_bounds': tbounds, + } + + axes = [timdef, + {'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) @@ -108,21 +113,22 @@ def memory_check(): mem = 0 res = 0 stk = 0 - memi,resi,stki = memory_usage(sys.stdout) - + memi, resi, stki = memory_usage(sys.stdout) + for time in range(ntimes): a = [275] if passtime: - tval = [15 + time*30] - tbounds = [time*30, (time + 1)*30] - cmor.write(varid, [275], time_vals = tval, time_bnds = tbounds) + tval = [15 + time * 30] + tbounds = [time * 30, (time + 1) * 30] + cmor.write(varid, [275], time_vals=tval, time_bnds=tbounds) else: cmor.write(varid, [275]) - mem,res,stk = memory_usage(sys.stdout,mem,res,stk) + mem, res, stk = memory_usage(sys.stdout, mem, res, stk) #mem,res,stk = memory_usage(sys.stdout,memi,resi,stki) print '---' - + cmor.close(varid) + if __name__ == '__main__': memory_check() diff --git a/Test/test_python_new_tables.py b/Test/test_python_new_tables.py index 89abe71b..e62c458d 100644 --- a/Test/test_python_new_tables.py +++ b/Test/test_python_new_tables.py @@ -1,33 +1,47 @@ -import cmor,numpy +import cmor +import numpy -ipth="Tables" +ipth = "Tables" cmor.setup(inpath=ipth, set_verbosity=cmor.CMOR_NORMAL, - netcdf_file_action = cmor.CMOR_REPLACE, - logfile = None) + netcdf_file_action=cmor.CMOR_REPLACE, + logfile=None) cmor.dataset_json("Test/common_user_input.json") cmor.load_table("CMIP6_Amon.json") nlat = 90 -dlat = 180/nlat +dlat = 180 / nlat nlon = 180 -dlon = 360./nlon +dlon = 360. / nlon -lats = numpy.arange(-90+dlat/2.,90,dlat) -blats = numpy.arange(-90,90+dlat,dlat) -lons = numpy.arange(0+dlon/2.,360.,dlon) -blons = numpy.arange(0,360.+dlon,dlon) +lats = numpy.arange(-90 + dlat / 2., 90, dlat) +blats = numpy.arange(-90, 90 + dlat, dlat) +lons = numpy.arange(0 + dlon / 2., 360., dlon) +blons = numpy.arange(0, 360. + dlon, dlon) ntime = 12 -data = numpy.random.random((ntime,nlat,nlon))+280. - -itim = cmor.axis(table_entry='time',coord_vals=numpy.arange(0,ntime,1),units='month since 2008',cell_bounds=numpy.arange(0,ntime+1,1)) -ilat = cmor.axis(table_entry='latitude',coord_vals=lats,units='degrees_north',cell_bounds=blats) -ilon = cmor.axis(table_entry='longitude',coord_vals=lons,units='degrees_east',cell_bounds=blons) - -iv = cmor.variable(table_entry='tas',axis_ids=numpy.array((itim,ilat,ilon)),units='K') - -cmor.write(iv,data) +data = numpy.random.random((ntime, nlat, nlon)) + 280. + +itim = cmor.axis( + table_entry='time', coord_vals=numpy.arange( + 0, ntime, 1), units='month since 2008', cell_bounds=numpy.arange( + 0, ntime + 1, 1)) +ilat = cmor.axis( + table_entry='latitude', + coord_vals=lats, + units='degrees_north', + cell_bounds=blats) +ilon = cmor.axis( + table_entry='longitude', + coord_vals=lons, + units='degrees_east', + cell_bounds=blons) + +iv = cmor.variable( + table_entry='tas', axis_ids=numpy.array( + (itim, ilat, ilon)), units='K') + +cmor.write(iv, data) diff --git a/Test/test_python_obs4MIPs.py b/Test/test_python_obs4MIPs.py index b0b3087b..9a473b87 100644 --- a/Test/test_python_obs4MIPs.py +++ b/Test/test_python_obs4MIPs.py @@ -1,27 +1,28 @@ import cmor + def test(): - cmor.setup(inpath='Tables',netcdf_file_action=cmor.CMOR_REPLACE) + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") - table='CMIP6_Amon.json' + table = 'CMIP6_Amon.json' cmor.load_table(table) - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'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]} - ] - + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'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) @@ -29,11 +30,10 @@ def test(): varid = cmor.variable('ts', 'K', axis_ids) - cmor.write(varid, [275], time_vals = [15], time_bnds = [ [0,30] ]) + cmor.write(varid, [275], time_vals=[15], time_bnds=[[0, 30]]) cmor.close(varid) - if __name__ == '__main__': test() diff --git a/Test/test_python_open_close_cmor_multiple.py b/Test/test_python_open_close_cmor_multiple.py index 0c109e2b..3102c969 100644 --- a/Test/test_python_open_close_cmor_multiple.py +++ b/Test/test_python_open_close_cmor_multiple.py @@ -1,55 +1,107 @@ -import cmor,numpy - - - -vars ={'hfls' : ['W.m-2',25.,40.],'tas':['K',25,268.15],'clt':['%',10000.,0.],'ta':['K',25,273.15]} +import cmor +import numpy + + +vars = { + 'hfls': [ + 'W.m-2', + 25., + 40.], + 'tas': [ + 'K', + 25, + 268.15], + 'clt': [ + '%', + 10000., + 0.], + 'ta': [ + 'K', + 25, + 273.15]} nlat = 90 -dlat = 180/nlat +dlat = 180 / nlat nlon = 180 -dlon = 360./nlon +dlon = 360. / nlon nlev = 19 ntimes = 12 -lats = numpy.arange(-90+dlat/2.,90,dlat) -blats = numpy.arange(-90,90+dlat,dlat) -lons = numpy.arange(0+dlon/2.,360.,dlon) -blons = numpy.arange(0,360.+dlon,dlon) +lats = numpy.arange(-90 + dlat / 2., 90, dlat) +blats = numpy.arange(-90, 90 + dlat, dlat) +lons = numpy.arange(0 + dlon / 2., 360., dlon) +blons = numpy.arange(0, 360. + dlon, dlon) -tvars= ['hfls','tas','clt','ta'] +tvars = ['hfls', 'tas', 'clt', 'ta'] -cmor.setup(inpath='Tables',netcdf_file_action=cmor.CMOR_REPLACE) +cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") -table='CMIP6_Amon.json' +table = 'CMIP6_Amon.json' cmor.load_table(table) for var in tvars: - ilat = cmor.axis(table_entry='latitude',coord_vals=lats,cell_bounds=blats,units='degrees_north') - ilon = cmor.axis(table_entry='longitude',coord_vals=lons,cell_bounds=blons,units='degrees_east') - itim = cmor.axis(table_entry='time',coord_vals=numpy.arange(ntimes,dtype=numpy.float),cell_bounds=numpy.arange(ntimes+1,dtype=float),units='months since 2000') - ilev = cmor.axis(table_entry='plev19',coord_vals=numpy.array([1000.,925,850,700,600,500,400,300,250,200,150,100,70,50,30,20,10,5,1]),units='hPa') - - if var!='ta': - axes = [itim,ilat,ilon] - data = numpy.random.random((ntimes,nlat,nlon))*vars[var][1]+vars[var][2] + ilat = cmor.axis( + table_entry='latitude', + coord_vals=lats, + cell_bounds=blats, + units='degrees_north') + ilon = cmor.axis( + table_entry='longitude', + coord_vals=lons, + cell_bounds=blons, + units='degrees_east') + itim = cmor.axis( + table_entry='time', coord_vals=numpy.arange( + ntimes, dtype=numpy.float), cell_bounds=numpy.arange( + ntimes + 1, dtype=float), units='months since 2000') + ilev = cmor.axis(table_entry='plev19', + coord_vals=numpy.array([1000., + 925, + 850, + 700, + 600, + 500, + 400, + 300, + 250, + 200, + 150, + 100, + 70, + 50, + 30, + 20, + 10, + 5, + 1]), + units='hPa') + + if var != 'ta': + axes = [itim, ilat, ilon] + data = numpy.random.random( + (ntimes, nlat, nlon)) * vars[var][1] + vars[var][2] else: - axes=[itim,ilev,ilat,ilon] - data = numpy.random.random((ntimes,nlev,nlat,nlon))*vars[var][1]+vars[var][2] - - kw={} - if var in ['hfss','hfls']: - kw['positive']='up' - var = cmor.variable(table_entry=var,units=vars[var][0],axis_ids=axes,**kw) - - cmor.write(var,data) - path=cmor.close(var, file_name=True) - print 'Saved in:',path + axes = [itim, ilev, ilat, ilon] + data = numpy.random.random( + (ntimes, nlev, nlat, nlon)) * vars[var][1] + vars[var][2] + + kw = {} + if var in ['hfss', 'hfls']: + kw['positive'] = 'up' + var = cmor.variable( + table_entry=var, + units=vars[var][0], + axis_ids=axes, + **kw) + + cmor.write(var, data) + path = cmor.close(var, file_name=True) + print 'Saved in:', path cmor.close() - print 'hello' diff --git a/Test/test_python_polar_stereo.py b/Test/test_python_polar_stereo.py index 0cb06c3e..93afefef 100644 --- a/Test/test_python_polar_stereo.py +++ b/Test/test_python_polar_stereo.py @@ -7,78 +7,80 @@ # Create some empty arrays # ------------------------- -myaxes=numpy.zeros(9,dtype='i') -myaxes2=numpy.zeros(9,dtype='i') -myvars=numpy.zeros(9,dtype='i') +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = numpy.zeros(9, dtype='i') +myvars = numpy.zeros(9, dtype='i') # Initialize CMOR # ------------------- -cmor.setup(inpath="Tables",set_verbosity=cmor.CMOR_NORMAL, netcdf_file_action = cmor.CMOR_REPLACE_4 ); +cmor.setup( + inpath="Tables", + set_verbosity=cmor.CMOR_NORMAL, + netcdf_file_action=cmor.CMOR_REPLACE_4) cmor.dataset_json("Test/common_user_input.json") -tables=[] +tables = [] grid_table = cmor.load_table("CMIP6_grids.json") tables.append(grid_table) -t='CMIP6_fx.json' +t = 'CMIP6_fx.json' te = 'orog' -u='m' +u = 'm' tables.append(cmor.load_table("%s" % t)) -print 'Tables ids:',tables +print 'Tables ids:', tables cmor.set_table(tables[0]) -f=cdms2.open("~/Downloads/orog_GIS_LGGE_ELMER2_asmb.nc") -fg=cdms2.open("~/Downloads/Greenland_5km_v1.1.nc") -x=f['x'][:] -y=f['y'][:] -lon_coords=fg['lon'][0,:] -lat_coords=fg['lat'][0,:] +f = cdms2.open("~/Downloads/orog_GIS_LGGE_ELMER2_asmb.nc") +fg = cdms2.open("~/Downloads/Greenland_5km_v1.1.nc") +x = f['x'][:] +y = f['y'][:] +lon_coords = fg['lon'][0, :] +lat_coords = fg['lat'][0, :] +myaxes[0] = cmor.axis(table_entry='y', + units='m', + coord_vals=y) +myaxes[1] = cmor.axis(table_entry='x', + units='m', + coord_vals=x) -myaxes[0] = cmor.axis(table_entry = 'y', - units = 'm', - coord_vals = y) -myaxes[1] = cmor.axis(table_entry = 'x', - units = 'm', - coord_vals = x) +grid_id = cmor.grid(axis_ids=myaxes[:2], + latitude=lat_coords, + longitude=lon_coords) -grid_id = cmor.grid(axis_ids = myaxes[:2], - latitude = lat_coords, - longitude = lon_coords) - -print 'got grid_id:',grid_id +print 'got grid_id:', grid_id myaxes[2] = grid_id mapnm = 'polar_stereographic' -params = [ "standard_parallel", - "latitude_of_projection_origin", - "false_easting", - "false_northing", - "straight_vertical_longitude_from_pole", - "scale_factor_at_projection_origin"] - -punits = ["","","","","","" ] -pvalues = [71.,90.,0.,0.,-39., 1. ] +params = ["standard_parallel", + "latitude_of_projection_origin", + "false_easting", + "false_northing", + "straight_vertical_longitude_from_pole", + "scale_factor_at_projection_origin"] + +punits = ["", "", "", "", "", ""] +pvalues = [71., 90., 0., 0., -39., 1.] cmor.set_grid_mapping(grid_id=myaxes[2], - mapping_name = mapnm, - parameter_names = params, - parameter_values = pvalues, - parameter_units = punits) + mapping_name=mapnm, + parameter_names=params, + parameter_values=pvalues, + parameter_units=punits) cmor.set_table(tables[1]) pass_axes = [myaxes[2]] -data = f['orog'][0,:] -myvars[0] = cmor.variable( table_entry = te, - units = u, - axis_ids = pass_axes, - missing_value = data.missing, - history = '', - comment = '' - ) +data = f['orog'][0, :] +myvars[0] = cmor.variable(table_entry=te, + units=u, + axis_ids=pass_axes, + missing_value=data.missing, + history='', + comment='' + ) cmor.write(myvars[0], data) cmor.close() diff --git a/Test/test_python_region.py b/Test/test_python_region.py index 1058f889..b7d0afbb 100644 --- a/Test/test_python_region.py +++ b/Test/test_python_region.py @@ -2,30 +2,46 @@ import numpy -cmor.setup("Test",netcdf_file_action=cmor.CMOR_REPLACE) +cmor.setup("Test", netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") cmor.load_table("Tables/CMIP6_Omon.json") nlat = 90 -dlat = 180/nlat -lats = numpy.arange(-90+dlat/2.,90,dlat) -blats = numpy.arange(-90,90+dlat,dlat) - -ilat = cmor.axis(table_entry='latitude',coord_vals=lats,cell_bounds=blats,units='degrees_north') - -myregions=["atlantic_ocean", "indian_pacific_ocean", "pacific_ocean", "atlantic_arctic_ocean","global_ocean"] -nreg=len(myregions) -ireg = cmor.axis(table_entry='basin',units='1',coord_vals=myregions) +dlat = 180 / nlat +lats = numpy.arange(-90 + dlat / 2., 90, dlat) +blats = numpy.arange(-90, 90 + dlat, dlat) + +ilat = cmor.axis( + table_entry='latitude', + coord_vals=lats, + cell_bounds=blats, + units='degrees_north') + +myregions = [ + "atlantic_ocean", + "indian_pacific_ocean", + "pacific_ocean", + "atlantic_arctic_ocean", + "global_ocean"] +nreg = len(myregions) +ireg = cmor.axis(table_entry='basin', units='1', coord_vals=myregions) ntime = 12 -itim = cmor.axis(table_entry='time',units='months since 2030',interval='1 month',coord_vals = numpy.arange(ntime), cell_bounds=numpy.arange(ntime+1)) +itim = cmor.axis( + table_entry='time', + units='months since 2030', + interval='1 month', + coord_vals=numpy.arange(ntime), + cell_bounds=numpy.arange( + ntime + 1)) -var = cmor.variable(table_entry='htovgyre',units='W',axis_ids=numpy.array([itim,ireg,ilat])) +var = cmor.variable(table_entry='htovgyre', units='W', + axis_ids=numpy.array([itim, ireg, ilat])) -data = numpy.random.random((ntime,nreg,nlat))*3.E14 +data = numpy.random.random((ntime, nreg, nlat)) * 3.E14 -cmor.write(var,data) +cmor.write(var, data) cmor.close() diff --git a/Test/test_python_reverted_lats.py b/Test/test_python_reverted_lats.py index 9f636f7e..ae9f3406 100644 --- a/Test/test_python_reverted_lats.py +++ b/Test/test_python_reverted_lats.py @@ -1,62 +1,87 @@ -import cmor,numpy +import cmor +import numpy nlat = 10 -dlat = 180./nlat +dlat = 180. / nlat nlon = 20 -dlon = 360./nlon +dlon = 360. / nlon nlev = 17 ntimes = 1 -lats = numpy.arange(90-dlat/2.,-90,-dlat) -blats = numpy.arange(90,-90-dlat,-dlat) -lats2 = numpy.arange(-90+dlat/2.,90,dlat) -blats2 = numpy.arange(-90,90+dlat,dlat) -lons = numpy.arange(0+dlon/2.,360.,dlon) -blons = numpy.arange(0,360.+dlon,dlon) +lats = numpy.arange(90 - dlat / 2., -90, -dlat) +blats = numpy.arange(90, -90 - dlat, -dlat) +lats2 = numpy.arange(-90 + dlat / 2., 90, dlat) +blats2 = numpy.arange(-90, 90 + dlat, dlat) +lons = numpy.arange(0 + dlon / 2., 360., dlon) +blons = numpy.arange(0, 360. + dlon, dlon) -cmor.setup(inpath='.',netcdf_file_action=cmor.CMOR_REPLACE) +cmor.setup(inpath='.', netcdf_file_action=cmor.CMOR_REPLACE) cmor.dataset_json("Test/common_user_input.json") -table='Tables/CMIP6_Amon.json' +table = 'Tables/CMIP6_Amon.json' cmor.load_table(table) -data = lats[:,numpy.newaxis]*lons[numpy.newaxis,:] +data = lats[:, numpy.newaxis] * lons[numpy.newaxis, :] -data = ( data + 29000 ) / 750. + 233.2 +data = (data + 29000) / 750. + 233.2 -ilat = cmor.axis(table_entry='latitude',coord_vals=lats,cell_bounds=blats,units='degrees_north') -ilat2 = cmor.axis(table_entry='latitude',coord_vals=lats2,cell_bounds=blats2,units='degrees_north') -ilon = cmor.axis(table_entry='longitude',coord_vals=lons,cell_bounds=blons,units='degrees_east') -itim = cmor.axis(table_entry='time',units='months since 2010') +ilat = cmor.axis( + table_entry='latitude', + coord_vals=lats, + cell_bounds=blats, + units='degrees_north') +ilat2 = cmor.axis( + table_entry='latitude', + coord_vals=lats2, + cell_bounds=blats2, + units='degrees_north') +ilon = cmor.axis( + table_entry='longitude', + coord_vals=lons, + cell_bounds=blons, + units='degrees_east') +itim = cmor.axis(table_entry='time', units='months since 2010') -ivar = cmor.variable(table_entry='tasmin',units='K',axis_ids=[itim,ilat,ilon]) -cmor.write(ivar,data,ntimes_passed=1,time_vals=[0.],time_bnds=[0.,1.]) -fnm = cmor.close(ivar,file_name=True) +ivar = cmor.variable( + table_entry='tasmin', + units='K', + axis_ids=[ + itim, + ilat, + ilon]) +cmor.write(ivar, data, ntimes_passed=1, time_vals=[0.], time_bnds=[0., 1.]) +fnm = cmor.close(ivar, file_name=True) print '*******************************' -ivar2 = cmor.variable(table_entry='tasmin',units='K',axis_ids=[itim,ilat2,ilon]) -cmor.write(ivar2,data,ntimes_passed=1,time_vals=[1.],time_bnds=[1.,2.]) -fnm2 = cmor.close(ivar2,file_name=True) +ivar2 = cmor.variable( + table_entry='tasmin', + units='K', + axis_ids=[ + itim, + ilat2, + ilon]) +cmor.write(ivar2, data, ntimes_passed=1, time_vals=[1.], time_bnds=[1., 2.]) +fnm2 = cmor.close(ivar2, file_name=True) ## import cdms2,vcs -## x=vcs.init() -## x.portrait() +# x=vcs.init() +# x.portrait() ## import EzTemplate -## M=EzTemplate.Multi(columns=1,rows=3) -## print 'Getting templates' -## t1=M.get() -## t2=M.get() -## print 'Plotting' -## x.plot(data,t1) -## f=cdms2.open(fnm) -## s=f("tasmin") -## print 'Ok data read, shape:',s.shape -## x.plot(s,t2) -## f=cdms2.open(fnm2) -## s=f("tasmin") -## print 'Ok data read, shape:',s.shape -## x.plot(s,M.get()) - -## raw_input() +# M=EzTemplate.Multi(columns=1,rows=3) +# print 'Getting templates' +# t1=M.get() +# t2=M.get() +# print 'Plotting' +# x.plot(data,t1) +# f=cdms2.open(fnm) +# s=f("tasmin") +# print 'Ok data read, shape:',s.shape +# x.plot(s,t2) +# f=cdms2.open(fnm2) +# s=f("tasmin") +# print 'Ok data read, shape:',s.shape +# x.plot(s,M.get()) + +# raw_input() diff --git a/Test/test_python_singleton_anywhere_in_table_def.py b/Test/test_python_singleton_anywhere_in_table_def.py index 490c752c..ee8cb437 100644 --- a/Test/test_python_singleton_anywhere_in_table_def.py +++ b/Test/test_python_singleton_anywhere_in_table_def.py @@ -1,114 +1,119 @@ #!/usr/bin/env python -from test_python_common import * # common subroutines +from test_python_common import * # common subroutines import cmor._cmor import os pth = os.path.split(os.path.realpath(os.curdir)) -if pth[-1]=='Test': +if pth[-1] == 'Test': ipth = opth = '.' else: ipth = opth = 'Test' -myaxes=numpy.zeros(9,dtype='i') -myaxes2=numpy.zeros(9,dtype='i') -myvars=numpy.zeros(9,dtype='i') +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = numpy.zeros(9, dtype='i') +myvars = numpy.zeros(9, dtype='i') -cmor.setup(inpath=ipth,set_verbosity=cmor.CMOR_NORMAL, netcdf_file_action = cmor.CMOR_REPLACE, exit_control = cmor.CMOR_EXIT_ON_MAJOR); +cmor.setup( + inpath=ipth, + set_verbosity=cmor.CMOR_NORMAL, + netcdf_file_action=cmor.CMOR_REPLACE, + exit_control=cmor.CMOR_EXIT_ON_MAJOR) cmor.dataset( - outpath = opth, - experiment_id = "historical", - institution = "GICC (Generic International Climate Center, Geneva, Switzerland)", - source = "GICCM1 2002: atmosphere: GICAM3 (gicam_0_brnchT_itea_2, T63L32); ocean: MOM (mom3_ver_3.5.2, 2x3L15); sea ice: GISIM4; land: GILSM2.5", - calendar = "standard", - realization = 1, - contact = "Rusty Koder (koder@middle_earth.net)", - history = "Output from archive/giccm_03_std_2xCO2_2256.", - comment = "Equilibrium reached after 30-year spin-up after which data were output starting with nominal date of January 2030", - 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.)", + outpath=opth, + experiment_id="historical", + institution="GICC (Generic International Climate Center, Geneva, Switzerland)", + source="GICCM1 2002: atmosphere: GICAM3 (gicam_0_brnchT_itea_2, T63L32); ocean: MOM (mom3_ver_3.5.2, 2x3L15); sea ice: GISIM4; land: GILSM2.5", + calendar="standard", + realization=1, + contact="Rusty Koder (koder@middle_earth.net)", + history="Output from archive/giccm_03_std_2xCO2_2256.", + comment="Equilibrium reached after 30-year spin-up after which data were output starting with nominal date of January 2030", + 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.)", leap_year=0, leap_month=0, month_lengths=None, model_id="GICCM1", forcing="Ant, Nat", institute_id="pcmdi", - parent_experiment_id="piControlwithism",branch_time=18336.33) + parent_experiment_id="piControlwithism", branch_time=18336.33) -tables=[] +tables = [] a = cmor.load_table("/git/cmip5-cmor-tables/Tables/CMIP6_grids") tables.append(a) -t='CMIP6_Omon.json' +t = 'CMIP6_Omon.json' te = 'dissic' -u='mol m-3' -time='time' -ts='month' -tscl=1. +u = 'mol m-3' +time = 'time' +ts = 'month' +tscl = 1. -t='CMIP5_cfSites' +t = 'CMIP5_cfSites' te = 'pr' -u= 'kg m-2 s-1' -time='time1' -ts='days' -tscl=2.e-2 +u = 'kg m-2 s-1' +time = 'time1' +ts = 'days' +tscl = 2.e-2 tables.append(cmor.load_table("/git/cmip5-cmor-tables/Tables/%s" % t)) -print 'Tables ids:',tables +print 'Tables ids:', tables cmor.set_table(tables[0]) -x,y,lon_coords,lat_coords,lon_vertices,lat_vertices = gen_irreg_grid(lon,lat) +x, y, lon_coords, lat_coords, lon_vertices, lat_vertices = gen_irreg_grid( + lon, lat) +myaxes[0] = cmor.axis(table_entry='y', + units='m', + coord_vals=y) +myaxes[1] = cmor.axis(table_entry='x', + units='m', + coord_vals=x) -myaxes[0] = cmor.axis(table_entry = 'y', - units = 'm', - coord_vals = y) -myaxes[1] = cmor.axis(table_entry = 'x', - units = 'm', - coord_vals = x) - -grid_id = cmor.grid(axis_ids = myaxes[:2], - latitude = lat_coords, - longitude = lon_coords, - latitude_vertices = lat_vertices, - longitude_vertices = lon_vertices) -print 'got grid_id:',grid_id +grid_id = cmor.grid(axis_ids=myaxes[:2], + latitude=lat_coords, + longitude=lon_coords, + latitude_vertices=lat_vertices, + longitude_vertices=lon_vertices) +print 'got grid_id:', grid_id myaxes[2] = grid_id mapnm = 'lambert_conformal_conic' -params = [ "standard_parallel1", - "longitude_of_central_meridian","latitude_of_projection_origin", - "false_easting","false_northing","standard_parallel2" ] -punits = ["","","","","","" ] -pvalues = [-20.,175.,13.,8.,0.,20. ] +params = ["standard_parallel1", + "longitude_of_central_meridian", "latitude_of_projection_origin", + "false_easting", "false_northing", "standard_parallel2"] +punits = ["", "", "", "", "", ""] +pvalues = [-20., 175., 13., 8., 0., 20.] cmor.set_grid_mapping(grid_id=myaxes[2], - mapping_name = mapnm, - parameter_names = params, - parameter_values = pvalues, - parameter_units = punits) + mapping_name=mapnm, + parameter_names=params, + parameter_values=pvalues, + parameter_units=punits) cmor.set_table(tables[1]) -myaxes[3] = cmor.axis(table_entry = time, - units = '%s since 1980' % ts) +myaxes[3] = cmor.axis(table_entry=time, + units='%s since 1980' % ts) -pass_axes = [myaxes[3],myaxes[2]] +pass_axes = [myaxes[3], myaxes[2]] -myvars[0] = cmor.variable( table_entry = te, - units = u, - axis_ids = pass_axes, - history = 'no history', - comment = 'no future' - ) +myvars[0] = cmor.variable(table_entry=te, + units=u, + axis_ids=pass_axes, + history='no history', + comment='no future' + ) -ntimes=2 +ntimes = 2 for i in range(ntimes): - data2d = read_2d_input_files(i, varin2d[0], lat,lon)*1.E-6 - print 'writing time: ',i,data2d.shape#,data2d - #print Time[i],bnds_time[2*i:2*i+2] - cmor.write(myvars[0],data2d,1,time_vals=Time[i]*tscl,time_bnds=tscl*bnds_time[2*i:2*i+2]) + data2d = read_2d_input_files(i, varin2d[0], lat, lon) * 1.E-6 + print 'writing time: ', i, data2d.shape # ,data2d + # print Time[i],bnds_time[2*i:2*i+2] + cmor.write(myvars[0], data2d, 1, time_vals=Time[i] * tscl, + time_bnds=tscl * bnds_time[2 * i:2 * i + 2]) print 'wrote' cmor.close() diff --git a/Test/test_python_singleton_string.py b/Test/test_python_singleton_string.py index ec8b4c84..a9eb0272 100644 --- a/Test/test_python_singleton_string.py +++ b/Test/test_python_singleton_string.py @@ -1,97 +1,102 @@ #!/usr/bin/env python -from test_python_common import * # common subroutines +from test_python_common import * # common subroutines import cmor._cmor import os pth = os.path.split(os.path.realpath(os.curdir)) -if pth[-1]=='Test': +if pth[-1] == 'Test': ipth = opth = '.' else: ipth = opth = 'Test' -myaxes=numpy.zeros(9,dtype='i') -myaxes2=numpy.zeros(9,dtype='i') -myvars=numpy.zeros(9,dtype='i') +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = numpy.zeros(9, dtype='i') +myvars = numpy.zeros(9, dtype='i') -cmor.setup(inpath=ipth,set_verbosity=cmor.CMOR_NORMAL, netcdf_file_action = cmor.CMOR_REPLACE, exit_control = cmor.CMOR_EXIT_ON_MAJOR); +cmor.setup( + inpath=ipth, + 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") -tables=[] +tables = [] a = cmor.load_table("Tables/CMIP6_grids.json") tables.append(a) -t='CMIP6_Omon.json' +t = 'CMIP6_Omon.json' te = 'dissic' -u='mol m-3' -time='time' -ts='month' -tscl=1. +u = 'mol m-3' +time = 'time' +ts = 'month' +tscl = 1. -t='CMIP6_Lmon.json' +t = 'CMIP6_Lmon.json' te = 'baresoilFrac' -u= '' -time='time' -ts='months' -tscl=3.5e-4 +u = '' +time = 'time' +ts = 'months' +tscl = 3.5e-4 tables.append(cmor.load_table("Tables/%s" % t)) -print 'Tables ids:',tables +print 'Tables ids:', tables cmor.set_table(tables[0]) -x,y,lon_coords,lat_coords,lon_vertices,lat_vertices = gen_irreg_grid(lon,lat) +x, y, lon_coords, lat_coords, lon_vertices, lat_vertices = gen_irreg_grid( + lon, lat) +myaxes[0] = cmor.axis(table_entry='y', + units='m', + coord_vals=y) +myaxes[1] = cmor.axis(table_entry='x', + units='m', + coord_vals=x) -myaxes[0] = cmor.axis(table_entry = 'y', - units = 'm', - coord_vals = y) -myaxes[1] = cmor.axis(table_entry = 'x', - units = 'm', - coord_vals = x) - -grid_id = cmor.grid(axis_ids = myaxes[:2], - latitude = lat_coords, - longitude = lon_coords, - latitude_vertices = lat_vertices, - longitude_vertices = lon_vertices) -print 'got grid_id:',grid_id +grid_id = cmor.grid(axis_ids=myaxes[:2], + latitude=lat_coords, + longitude=lon_coords, + latitude_vertices=lat_vertices, + longitude_vertices=lon_vertices) +print 'got grid_id:', grid_id myaxes[2] = grid_id mapnm = 'lambert_conformal_conic' -params = [ "standard_parallel1", - "longitude_of_central_meridian","latitude_of_projection_origin", - "false_easting","false_northing","standard_parallel2" ] -punits = ["","","","","","" ] -pvalues = [-20.,175.,13.,8.,0.,20. ] +params = ["standard_parallel1", + "longitude_of_central_meridian", "latitude_of_projection_origin", + "false_easting", "false_northing", "standard_parallel2"] +punits = ["", "", "", "", "", ""] +pvalues = [-20., 175., 13., 8., 0., 20.] cmor.set_grid_mapping(grid_id=myaxes[2], - mapping_name = mapnm, - parameter_names = params, - parameter_values = pvalues, - parameter_units = punits) + mapping_name=mapnm, + parameter_names=params, + parameter_values=pvalues, + parameter_units=punits) cmor.set_table(tables[1]) -myaxes[3] = cmor.axis(table_entry = time, - units = '%s since 1980' % ts) +myaxes[3] = cmor.axis(table_entry=time, + units='%s since 1980' % ts) -pass_axes = [myaxes[3],myaxes[2]] +pass_axes = [myaxes[3], myaxes[2]] -myvars[0] = cmor.variable( table_entry = te, - units = u, - axis_ids = pass_axes, - history = 'no history', - comment = 'no future' - ) +myvars[0] = cmor.variable(table_entry=te, + units=u, + axis_ids=pass_axes, + history='no history', + comment='no future' + ) -ntimes=2 +ntimes = 2 for i in range(ntimes): - data2d = read_2d_input_files(i, varin2d[0], lat,lon)*1.E-6 - print 'writing time: ',i,data2d.shape#,data2d - print Time[i],bnds_time[2*i:2*i+2] - cmor.write(myvars[0],data2d,1,time_vals=Time[i],time_bnds=bnds_time[2*i:2*i+2]) + data2d = read_2d_input_files(i, varin2d[0], lat, lon) * 1.E-6 + print 'writing time: ', i, data2d.shape # ,data2d + print Time[i], bnds_time[2 * i:2 * i + 2] + cmor.write(myvars[0], data2d, 1, time_vals=Time[i], + time_bnds=bnds_time[2 * i:2 * i + 2]) print 'wrote' cmor.close() diff --git a/Test/test_python_stephanie_6hrPlev_minutes.py b/Test/test_python_stephanie_6hrPlev_minutes.py index 74d7cc3b..c2e57a4b 100644 --- a/Test/test_python_stephanie_6hrPlev_minutes.py +++ b/Test/test_python_stephanie_6hrPlev_minutes.py @@ -2,57 +2,59 @@ import cmor import numpy + def main(): - + cmor.setup(inpath='/git/cmip5-cmor-tables/Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3) + netcdf_file_action=cmor.CMOR_REPLACE_3) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', '360_day', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - parent_experiment_rip = 'N/A', - branch_time = 0, - contact = 'brian clough') - + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + parent_experiment_rip='N/A', + branch_time=0, + contact='brian clough') + table = 'CMIP5_6hrPlev' cmor.load_table(table) - axes = [ {'table_entry': 'time1', - 'units': 'hours since 2000-01-01 00:00:00', - }, - {'table_entry': 'plev3', - 'units': 'Pa', - 'coord_vals': [100000., 92500., 85000., 70000., 60000., 50000., 40000., 30000., 25000., 20000., 15000., 10000., 7000., 5000., 3000., 2000., 1000.]}, - {'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]}, - ] - + axes = [{'table_entry': 'time1', + 'units': 'hours since 2000-01-01 00:00:00', + }, + {'table_entry': 'plev3', + 'units': 'Pa', + 'coord_vals': [100000., 92500., 85000., 70000., 60000., 50000., 40000., 30000., 25000., 20000., 15000., 10000., 7000., 5000., 3000., 2000., 1000.]}, + {'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: - print 'doing:',axis + print 'doing:', axis axis_id = cmor.axis(**axis) axis_ids.append(axis_id) for var, units, value in (('ta', 'K', 274), ('ua', 'm s-1', 10)): - values = numpy.array([value,]*len(axes[1]['coord_vals']), numpy.float32) + values = numpy.array([value, ] * + len(axes[1]['coord_vals']), numpy.float32) varid = cmor.variable(var, units, axis_ids, - history = 'variable history', - missing_value = -99 + history='variable history', + missing_value=-99 ) - cmor.write(varid, values, time_vals = [0], time_bnds = [ [0,6] ]) + cmor.write(varid, values, time_vals=[0], time_bnds=[[0, 6]]) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_python_toomany_tables.py b/Test/test_python_toomany_tables.py new file mode 100644 index 00000000..6db8a6b8 --- /dev/null +++ b/Test/test_python_toomany_tables.py @@ -0,0 +1,123 @@ +# If this example is not executed from the directory containing the +# CMOR code, please first complete the following steps: +# +# 1. In any directory, create 'Tables/', 'Test/' and 'CMIP6/' directories. +# +# 2. Download +# https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_Omon.json +# and https://github.com/PCMDI/cmor/blob/master/TestTables/CMIP6_CV.json +# to the 'Tables/' directory. +# +# 3. Download +# https://github.com/PCMDI/cmor/blob/master/Test/.json +# to the 'Test/' directory. + +import cmor +import numpy +import unittest +import sys +import os +import tempfile + + +class TestCase(unittest.TestCase): + + def testCMIP6(self): + + # ------------------------------------------------------ + # Copy stdout and stderr file descriptor for cmor output + # ------------------------------------------------------ + newstdout = os.dup(1) + newstderr = os.dup(2) + # -------------- + # Create tmpfile + # -------------- + tmpfile = tempfile.mkstemp() + os.dup2(tmpfile[0], 1) + os.dup2(tmpfile[0], 2) + os.close(tmpfile[0]) + # ------------------------------------------- + # Try to call cmor with a bad institution_ID + # ------------------------------------------- + try: + cmor.setup(inpath='Tables', netcdf_file_action=cmor.CMOR_REPLACE) + cmor.dataset_json("Test/common_user_input.json") + cmor.set_cur_dataset_attribute("experiment_id", "ssp434") + cmor.set_cur_dataset_attribute( + "parent_experiment_id", "historical") + cmor.set_cur_dataset_attribute("parent_activity_id", "CMIP") + cmor.set_cur_dataset_attribute("activity_id", "ScenarioMIP") + cmor.set_cur_dataset_attribute("source_type", "AOGCM") + cmor.set_cur_dataset_attribute("sub_experiment_id", "none") + cmor.set_cur_dataset_attribute( + "parent_variant_label", "r11i123p4556f333") + cmor.set_cur_dataset_attribute("parent_source_id", "child") + cmor.set_cur_dataset_attribute("parent_mip_era", "CMIP6") + + # ------------------------------------------ + # load Omon table and create masso variable + # ------------------------------------------ + cmor.load_table("CMIP6_Omon.json") + cmor.load_table("CMIP6_Amon.json") + cmor.load_table("CMIP6_6hrPlev.json") + cmor.load_table("CMIP6_6hrPlevPt.json") + cmor.load_table("CMIP6_AERday.json") + cmor.load_table("CMIP6_AERfx.json") + cmor.load_table("CMIP6_AERhr.json") + cmor.load_table("CMIP6_AERmon.json") + cmor.load_table("CMIP6_AERmonZ.json") + cmor.load_table("CMIP6_Amon.json") + cmor.load_table("CMIP6_CFday.json") + cmor.load_table("CMIP6_CFmon.json") + cmor.load_table("CMIP6_CFsubhr.json") + cmor.load_table("CMIP6_CFsubhrOff.json") + cmor.load_table("CMIP6_day.json") + cmor.load_table("CMIP6_E1hrClimMon.json") + cmor.load_table("CMIP6_E1hr.json") + cmor.load_table("CMIP6_E3hr.json") + cmor.load_table("CMIP6_E6hrZ.json") + cmor.load_table("CMIP6_EdayZ.json") + cmor.load_table("CMIP6_Efx.json") + cmor.load_table("CMIP6_EmonZ.json") + cmor.load_table("CMIP6_Esubhr.json") + cmor.load_table("CMIP6_Eyr.json") + cmor.load_table("CMIP6_fx.json") + cmor.load_table("CMIP6_grids.json") + cmor.load_table("CMIP6_IfxAnt.json") + cmor.load_table("CMIP6_IfxGre.json") + cmor.load_table("CMIP6_ImonAnt.json") + cmor.load_table("CMIP6_ImonGre.json") + cmor.load_table("CMIP6_IyrAnt.json") + cmor.load_table("CMIP6_IyrGre.json") + cmor.load_table("CMIP6_LImon.json") + cmor.load_table("CMIP6_Lmon.json") + cmor.load_table("CMIP6_Oclim.json") + cmor.load_table("CMIP6_Oday.json") + cmor.load_table("CMIP6_Odec.json") + cmor.load_table("CMIP6_Ofx.json") + cmor.load_table("CMIP6_Omon.json") + cmor.load_table("CMIP6_Oyr.json") + cmor.load_table("CMIP6_SIday.json") + cmor.load_table("CMIP6_SImon.json") + except BaseException: + pass + os.dup2(newstdout, 1) + os.dup2(newstderr, 2) + sys.stdout = os.fdopen(newstdout, 'w', 0) + sys.stderr = os.fdopen(newstderr, 'w', 0) + f = open(tmpfile[1], 'r') + lines = f.readlines() + for line in lines: + if line.find('Error:') != -1: + self.assertIn('30', line.strip()) + break + f.close() + os.unlink(tmpfile[1]) + + def tearDown(self): + import shutil + shutil.rmtree("./CMIP6") + + +if __name__ == '__main__': + unittest.main() diff --git a/Test/test_python_user_interface_00.py b/Test/test_python_user_interface_00.py index 2233d6a1..9b7bc91a 100644 --- a/Test/test_python_user_interface_00.py +++ b/Test/test_python_user_interface_00.py @@ -1,97 +1,132 @@ -from test_python_common import * # common subroutines +from test_python_common import * # common subroutines import cmor._cmor import os pth = os.path.split(os.path.realpath(os.curdir)) -if pth[-1]=='Test': +if pth[-1] == 'Test': ipth = opth = '.' else: ipth = opth = 'Test' -myaxes=numpy.zeros(9,dtype='i') -myaxes2=numpy.zeros(9,dtype='i') -myvars=numpy.zeros(9,dtype='i') +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = 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.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.dataset_json("Test/common_user_input.json") -tables=[] +tables = [] a = cmor.load_table(os.path.join("CMIP6_Omon.json")) tables.append(a) tables.append(cmor.load_table("CMIP6_Amon.json")) -print 'Tables ids:',tables +print 'Tables ids:', tables -axes=[] -id="time" -units="months since 1980" -print 'time bounds:',bnds_time +axes = [] +id = "time" +units = "months since 1980" +print 'time bounds:', bnds_time # 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)) -myaxes[0] = cmor.axis(id,coord_vals=Time,units=units,cell_bounds=bnds_time,interval="1 month") -print 'time bounds:',bnds_time -id='latitude' -units="degrees_north" -interval="" -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="plev19" -units="Pa" -myaxes[3] = cmor.axis(id,coord_vals=plevs,units=units) - -myaxes[4] = cmor.axis("alternate_hybrid_sigma",coord_vals=zlevs,units="1",cell_bounds=zlev_bnds) +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)) +myaxes[0] = cmor.axis( + id, + coord_vals=Time, + units=units, + cell_bounds=bnds_time, + interval="1 month") +print 'time bounds:', bnds_time +id = 'latitude' +units = "degrees_north" +interval = "" +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 = "plev19" +units = "Pa" +myaxes[3] = cmor.axis(id, coord_vals=plevs, units=units) + +myaxes[4] = cmor.axis( + "alternate_hybrid_sigma", + coord_vals=zlevs, + units="1", + cell_bounds=zlev_bnds) cmor.set_table(tables[0]) -myaxes[5] = cmor.axis( "basin",coord_vals=regions,units="") -id='time' -units='months since 1980' -myaxes[7] = cmor.axis(id,coord_vals=Time,units=units,cell_bounds=bnds_time,interval="1 month") -id="latitude" -units="degrees_north" -interval="" -myaxes[8] = cmor.axis(id,coord_vals=alats,units=units,cell_bounds=bnds_lat) +myaxes[5] = cmor.axis("basin", coord_vals=regions, units="") +id = 'time' +units = 'months since 1980' +myaxes[7] = cmor.axis( + id, + coord_vals=Time, + units=units, + cell_bounds=bnds_time, + interval="1 month") +id = "latitude" +units = "degrees_north" +interval = "" +myaxes[8] = cmor.axis(id, coord_vals=alats, units=units, cell_bounds=bnds_lat) cmor.set_table(tables[1]) -dtmp = -999; -dtmp2=1.e-4; -myaxes2[0] = myaxes[0]; -myaxes2[1] = myaxes[3]; -myaxes2[2] = myaxes[1]; -myaxes2[3] = myaxes[2]; - -print 'ok doing the vars thing',positive2d[0] -myvars[0] = cmor.variable(entry2d[0],units2d[0],myaxes[:3],'d',missing_value=None,tolerance=dtmp2,positive=positive2d[0],original_name=varin2d[0],history="no history",comment="no future") +dtmp = -999 +dtmp2 = 1.e-4 +myaxes2[0] = myaxes[0] +myaxes2[1] = myaxes[3] +myaxes2[2] = myaxes[1] +myaxes2[3] = myaxes[2] + +print 'ok doing the vars thing', positive2d[0] +myvars[0] = cmor.variable(entry2d[0], + units2d[0], + myaxes[:3], + 'd', + missing_value=None, + tolerance=dtmp2, + positive=positive2d[0], + original_name=varin2d[0], + history="no history", + comment="no future") print 'vars 2' -myvars[1] = cmor.variable(entry3d[2],units3d[2],myaxes2[:4],'d',original_name = varin3d[2]) +myvars[1] = cmor.variable(entry3d[2], units3d[2], + myaxes2[:4], 'd', original_name=varin3d[2]) print 'vars 2' -myaxes2[1] = myaxes[4]; -myvars[2] = cmor.variable(entry3d[0],units3d[0],myaxes2[:4],'d',original_name = varin3d[0]) +myaxes2[1] = myaxes[4] +myvars[2] = cmor.variable(entry3d[0], units3d[0], + myaxes2[:4], 'd', original_name=varin3d[0]) print 'vars 2' -myvars[3] = cmor.zfactor(int(myaxes2[1]),"p0","Pa",None,'d',p0) -print 'zfact',myaxes2[1] -myvars[3] = cmor.zfactor(int(myaxes2[1]),"b","",myaxes2[1],'d',b_coeff,b_coeff_bnds) -print 'zfact',myaxes2[1] -myvars[3] = cmor.zfactor(int(myaxes2[1]),"a","",myaxes2[1],'d',a_coeff,a_coeff_bnds) +myvars[3] = cmor.zfactor(int(myaxes2[1]), "p0", "Pa", None, 'd', p0) +print 'zfact', myaxes2[1] +myvars[3] = cmor.zfactor(int(myaxes2[1]), "b", "", + myaxes2[1], 'd', b_coeff, b_coeff_bnds) +print 'zfact', myaxes2[1] +myvars[3] = cmor.zfactor(int(myaxes2[1]), "a", "", + myaxes2[1], 'd', a_coeff, a_coeff_bnds) #/* printf("defining ap\n"); */ #/* for(i=0;i<5;i++) {a_coeff[i]*=1.e3;printf("sending acoef: %i, %lf\n",i,a_coeff[i]);} */ #/* for(i=0;i<6;i++) {a_coeff_bnds[i]*=1.e5;printf("sending acoef: %i, %lf\n",i,a_coeff_bnds[i]);} */ #/* ierr = cmor_zfactor(&myvars[3],myaxes2[1],"ap","hPa",1,&myaxes2[1],'d',&a_coeff,&a_coeff_bnds); */ print 'zfact before last' -myvars[3] = cmor.zfactor(zaxis_id = myaxes2[1],zfactor_name = "ps",units = "hPa",axis_ids = myaxes[:3],type = 'd') +myvars[3] = cmor.zfactor(zaxis_id=myaxes2[1], + zfactor_name="ps", + units="hPa", + axis_ids=myaxes[:3], + type='d') print 'zfact last' # /* ok here we decalre a variable for region axis testing */ @@ -100,16 +135,19 @@ myaxes2[1] = myaxes[5] myaxes2[2] = myaxes[8] -myvars[4] = cmor.variable("htovgyre","W",myaxes2[:3],'d',positive=positive2d[0],original_name=varin2d[0]) +myvars[4] = cmor.variable("htovgyre", + "W", + myaxes2[:3], + 'd', + positive=positive2d[0], + original_name=varin2d[0]) cmor.set_table(tables[1]) for i in range(ntimes): - data2d = read_2d_input_files(i, varin2d[0], lat,lon) - print 'writing time: ',i,data2d.shape,data2d - cmor.write(myvars[0],data2d,1) + data2d = read_2d_input_files(i, varin2d[0], lat, lon) + print 'writing time: ', i, data2d.shape, data2d + cmor.write(myvars[0], data2d, 1) cmor.close() - - diff --git a/Test/test_python_user_interface_01.py b/Test/test_python_user_interface_01.py index 89efbc1e..f28879c9 100644 --- a/Test/test_python_user_interface_01.py +++ b/Test/test_python_user_interface_01.py @@ -1,78 +1,83 @@ -from test_python_common import * # common subroutines +from test_python_common import * # common subroutines import cmor._cmor import os pth = os.path.split(os.path.realpath(os.curdir)) -if pth[-1]=='Test': +if pth[-1] == 'Test': ipth = opth = '.' else: ipth = opth = 'Tables' -myaxes=numpy.zeros(9,dtype='i') -myaxes2=numpy.zeros(9,dtype='i') -myvars=numpy.zeros(9,dtype='i') +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = numpy.zeros(9, dtype='i') +myvars = numpy.zeros(9, dtype='i') -cmor.setup(inpath=ipth,set_verbosity=cmor.CMOR_NORMAL, netcdf_file_action = cmor.CMOR_REPLACE, exit_control = cmor.CMOR_EXIT_ON_MAJOR); +cmor.setup( + inpath=ipth, + 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") -tables=[] +tables = [] a = cmor.load_table("CMIP6_grids.json") tables.append(a) tables.append(cmor.load_table("CMIP6_Amon.json")) -print 'Tables ids:',tables +print 'Tables ids:', tables cmor.set_table(tables[0]) -x,y,lon_coords,lat_coords,lon_vertices,lat_vertices = gen_irreg_grid(lon,lat) +x, y, lon_coords, lat_coords, lon_vertices, lat_vertices = gen_irreg_grid( + lon, lat) +myaxes[0] = cmor.axis(table_entry='y', + units='m', + coord_vals=y) +myaxes[1] = cmor.axis(table_entry='x', + units='m', + coord_vals=x) -myaxes[0] = cmor.axis(table_entry = 'y', - units = 'm', - coord_vals = y) -myaxes[1] = cmor.axis(table_entry = 'x', - units = 'm', - coord_vals = x) - -grid_id = cmor.grid(axis_ids = myaxes[:2], - latitude = lat_coords, - longitude = lon_coords, - latitude_vertices = lat_vertices, - longitude_vertices = lon_vertices) -print 'got grid_id:',grid_id +grid_id = cmor.grid(axis_ids=myaxes[:2], + latitude=lat_coords, + longitude=lon_coords, + latitude_vertices=lat_vertices, + longitude_vertices=lon_vertices) +print 'got grid_id:', grid_id myaxes[2] = grid_id mapnm = 'lambert_conformal_conic' -params = [ "standard_parallel1", - "longitude_of_central_meridian","latitude_of_projection_origin", - "false_easting","false_northing","standard_parallel2" ] -punits = ["","","","","","" ] -pvalues = [-20.,175.,13.,8.,0.,20. ] +params = ["standard_parallel1", + "longitude_of_central_meridian", "latitude_of_projection_origin", + "false_easting", "false_northing", "standard_parallel2"] +punits = ["", "", "", "", "", ""] +pvalues = [-20., 175., 13., 8., 0., 20.] cmor.set_grid_mapping(grid_id=myaxes[2], - mapping_name = mapnm, - parameter_names = params, - parameter_values = pvalues, - parameter_units = punits) + mapping_name=mapnm, + parameter_names=params, + parameter_values=pvalues, + parameter_units=punits) cmor.set_table(tables[1]) -myaxes[3] = cmor.axis(table_entry = 'time', - units = 'months since 1980') - -pass_axes = [myaxes[3],myaxes[2]] -myvars[0] = cmor.variable( table_entry = 'hfls', - units = 'W m-2', - axis_ids = pass_axes, - positive = 'down', - original_name = 'HFLS', - history = 'no history', - comment = 'no future' - ) +myaxes[3] = cmor.axis(table_entry='time', + units='months since 1980') + +pass_axes = [myaxes[3], myaxes[2]] +myvars[0] = cmor.variable(table_entry='hfls', + units='W m-2', + axis_ids=pass_axes, + positive='down', + original_name='HFLS', + history='no history', + comment='no future' + ) for i in range(ntimes): - data2d = read_2d_input_files(i, varin2d[0], lat,lon) - print 'writing time: ',i,Time[i],data2d.shape,data2d - print Time[i],bnds_time[2*i:2*i+2] - cmor.write(myvars[0],data2d,1,time_vals=Time[i],time_bnds=bnds_time[2*i:2*i+2]) + data2d = read_2d_input_files(i, varin2d[0], lat, lon) + print 'writing time: ', i, Time[i], data2d.shape, data2d + print Time[i], bnds_time[2 * i:2 * i + 2] + cmor.write(myvars[0], data2d, 1, time_vals=Time[i], + time_bnds=bnds_time[2 * i:2 * i + 2]) cmor.close() diff --git a/Test/test_python_user_interface_03.py b/Test/test_python_user_interface_03.py index 4db5ce38..650eacd7 100644 --- a/Test/test_python_user_interface_03.py +++ b/Test/test_python_user_interface_03.py @@ -6,83 +6,102 @@ print 'Done importing' try: import cdms2 -except: +except BaseException: print "This test code needs cdms2 interface for i/0" import sys sys.exit() import os -dpth="data" -myaxes=numpy.zeros(9,dtype='i') -myaxes2=numpy.zeros(9,dtype='i') -myvars=numpy.zeros(9,dtype='i') +dpth = "data" +myaxes = numpy.zeros(9, dtype='i') +myaxes2 = numpy.zeros(9, dtype='i') +myvars = numpy.zeros(9, dtype='i') -def read_input(var,order=None): - f=cdms2.open(os.path.join(dpth,"%s_sample.nc" % var)) + +def read_input(var, order=None): + f = cdms2.open(os.path.join(dpth, "%s_sample.nc" % var)) ok = f(var) if order is None: s = f(var) else: - s = f(var,order=order) - s.units=f[var].units - s.id=var + s = f(var, order=order) + s.units = f[var].units + s.id = var f.close() - return s,ok + return s, ok + def prep_var(data): rk = data.rank() - axes=[] + axes = [] for i in range(rk): ax = data.getAxis(i) if ax.isLongitude(): - id=cmor.axis(table_entry='longitude',units=ax.units,coord_vals=ax[:],cell_bounds=ax.getBounds()) + id = cmor.axis( + table_entry='longitude', + units=ax.units, + coord_vals=ax[:], + cell_bounds=ax.getBounds()) elif ax.isLatitude(): - id=cmor.axis(table_entry='latitude',units=ax.units,coord_vals=ax[:],cell_bounds=ax.getBounds()) + id = cmor.axis( + table_entry='latitude', + units=ax.units, + coord_vals=ax[:], + cell_bounds=ax.getBounds()) else: - id=cmor.axis(table_entry=str(ax.id),units=ax.units,coord_vals=ax[:],cell_bounds=ax.getBounds()) - print i,'units:',ax.units, ax[0] + id = cmor.axis( + table_entry=str( + ax.id), + units=ax.units, + coord_vals=ax[:], + cell_bounds=ax.getBounds()) + print i, 'units:', ax.units, ax[0] axes.append(id) - var = cmor.variable(table_entry = data.id, - units = data.units, - axis_ids = numpy.array(axes), - missing_value = data.missing_value, - history = "rewrote by cmor via python script") + var = cmor.variable(table_entry=data.id, + units=data.units, + axis_ids=numpy.array(axes), + missing_value=data.missing_value, + history="rewrote by cmor via python script") return var - def prep_cmor(): - cmor.setup(inpath="Tables",set_verbosity=cmor.CMOR_QUIET, netcdf_file_action = cmor.CMOR_REPLACE, exit_control = cmor.CMOR_EXIT_ON_MAJOR); + cmor.setup( + inpath="Tables", + set_verbosity=cmor.CMOR_QUIET, + netcdf_file_action=cmor.CMOR_REPLACE, + exit_control=cmor.CMOR_EXIT_ON_MAJOR) cmor.dataset_json("Test/common_user_input.json") - - tables=[] + + tables = [] a = cmor.load_table("CMIP6_Omon.json") tables.append(a) tables.append(cmor.load_table("CMIP6_Amon.json")) return -for var in ['tas',]: - print 'Testing var:',var - orders = ['tyx...','txy...','ytx...','yxt...','xyt...','xty...',] +for var in ['tas', ]: + print 'Testing var:', var + orders = ['tyx...', 'txy...', 'ytx...', 'yxt...', 'xyt...', 'xty...', ] for o in orders: - print '\tordering:',o - data,data_ordered = read_input(var,order=o) + print '\tordering:', o + data, data_ordered = read_input(var, order=o) prep_cmor() print data.shape var_id = prep_var(data) df = data.filled(data.missing_value) - cmor.write(var_id,df) + 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/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" %(var,today,var) - f=cdms2.open(fn) - s=f(var) - if not numpy.allclose(s,data_ordered): - raise "Error reordering: %s"%o + 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" % ( + var, today, var) + f = cdms2.open(fn) + s = f(var) + if not numpy.allclose(s, data_ordered): + raise "Error reordering: %s" % o else: print 'order: %s, passed' % o f.close() print 'Done' -#cmor.close() +# cmor.close() print 'Finito' diff --git a/Test/test_site_ts.py b/Test/test_site_ts.py index 5dcf1182..188c3d69 100644 --- a/Test/test_site_ts.py +++ b/Test/test_site_ts.py @@ -1,29 +1,32 @@ import cmor import numpy + def cmor_initialisation(): cmor.setup(inpath='Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3, - create_subdirectories = 0) + netcdf_file_action=cmor.CMOR_REPLACE_3, + create_subdirectories=0) cmor.dataset_json("Test/common_user_input.json") + def setup_data(): - axes = [ {'table_entry': 'time1', - 'units': 'days since 2000-01-01 00:00:00', - }, - {'table_entry': 'site', - 'units': '', - 'coord_vals': [0]}, - {'table_entry': 'hybrid_height', - 'units': 'm', - 'coord_vals': range(2), - 'cell_bounds': [[x-0.5, x+0.5] for x in range(2)], - }, - ] + axes = [{'table_entry': 'time1', + 'units': 'days since 2000-01-01 00:00:00', + }, + {'table_entry': 'site', + 'units': '', + 'coord_vals': [0]}, + {'table_entry': 'hybrid_height', + 'units': 'm', + 'coord_vals': range(2), + 'cell_bounds': [[x - 0.5, x + 0.5] for x in range(2)], + }, + ] values = numpy.array([0.5, 0.5], numpy.float32) return values, axes + def cmor_define_and_write(values, axes): table = 'CMIP6_CFsubhr.json' cmor.load_table(table) @@ -34,34 +37,34 @@ def cmor_define_and_write(values, axes): axis_ids.append(axis_id) igrid = cmor.grid([axis_ids[1]], [0.], [0.]) - cmor.zfactor(axis_ids[2], 'b', axis_ids = [axis_ids[2]], - zfactor_values = range(2), - zfactor_bounds = [[x-0.5, x+0.5] for x in range(2)]) + cmor.zfactor(axis_ids[2], 'b', axis_ids=[axis_ids[2]], + zfactor_values=range(2), + zfactor_bounds=[[x - 0.5, x + 0.5] for x in range(2)]) - cmor.zfactor(axis_ids[2], 'orog', 'm', axis_ids = [igrid], - zfactor_values = [0]) + cmor.zfactor(axis_ids[2], 'orog', 'm', axis_ids=[igrid], + zfactor_values=[0]) ids_for_var = [axis_ids[0], igrid, axis_ids[2]] varid = cmor.variable('tnhus', 's-1', ids_for_var, - history = 'variable history', - missing_value = -99, + history='variable history', + missing_value=-99, ) - for time in [x * 1800./ 86400 for x in range(48)]: - cmor.write(varid, values, time_vals = [time]) + for time in [x * 1800. / 86400 for x in range(48)]: + cmor.write(varid, values, time_vals=[time]) return varid def main(): - + cmor_initialisation() values, axes = setup_data() varid = cmor_define_and_write(values, axes) - fname = cmor.close(varid, file_name = True) + fname = cmor.close(varid, file_name=True) + - if __name__ == '__main__': main() diff --git a/Test/test_sophie.f90 b/Test/test_sophie.f90 index 13335967..eb2a1a44 100644 --- a/Test/test_sophie.f90 +++ b/Test/test_sophie.f90 @@ -172,7 +172,7 @@ program testing cell_bounds=bnds_lon) ilat2 = cmor_axis( & - table='Tables/CMIP6_fx.json', & + table='Tables/CMIP6_Ofx.json', & table_entry='latitude', & units='degrees_north', & length=lat, & @@ -181,7 +181,7 @@ program testing print*, 'Test code: ok calling axis stuff lon',ilat ilon2 = cmor_axis( & - table='Tables/CMIP6_fx.json', & + table='Tables/CMIP6_Ofx.json', & table_entry='longitude', & length=lon, & units='degrees_east', & @@ -298,7 +298,7 @@ program testing DO m=1,n2d print*, 'Test code: var: ',entry2d(m) var2d_ids(m) = cmor_variable( & - table='Tables/CMIP6_fx.json', & + table='Tables/CMIP6_Ofx.json', & table_entry=entry2d(m), & units=units2d(m), & ! axis_ids=(/ ilon, ilat, itim /), & diff --git a/Test/test_time_gap_multi_write.py b/Test/test_time_gap_multi_write.py index 05e2b53a..364fcce6 100644 --- a/Test/test_time_gap_multi_write.py +++ b/Test/test_time_gap_multi_write.py @@ -1,69 +1,83 @@ import cmor import numpy + def cmor_initialisation(): cmor.setup(inpath='/git/cmip5-cmor-tables/Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3, - create_subdirectories = 0) + netcdf_file_action=cmor.CMOR_REPLACE_3, + create_subdirectories=0) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', '360_day', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - parent_experiment_rip = 'N/A', - branch_time = 0., - contact = 'bob', - outpath = 'hadju/test') + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + parent_experiment_rip='N/A', + branch_time=0., + contact='bob', + outpath='hadju/test') + def setup_data(): - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00' - }, - {'table_entry': 'latitude', - 'units': 'degrees', - 'coord_vals': [0], - 'cell_bounds': [-0.5, 0.5]}, - {'table_entry': 'longitude', - 'units': 'degrees', - 'coord_vals': [1], - 'cell_bounds': [0.5, 1.5]}, - ] + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00' + }, + {'table_entry': 'latitude', + 'units': 'degrees', + 'coord_vals': [0], + 'cell_bounds': [-0.5, 0.5]}, + {'table_entry': 'longitude', + 'units': 'degrees', + 'coord_vals': [1], + 'cell_bounds': [0.5, 1.5]}, + ] values = numpy.array([215.], numpy.float32) return values, axes + def cmor_define_and_write(values, axes): table = 'CMIP5_day' cmor.load_table(table) axis_ids = list() for axis in axes: - axis_ids.append(cmor.axis(**axis)) - + axis_ids.append(cmor.axis(**axis)) + varid = cmor.variable('rlut', 'W m-2', axis_ids, - history = 'variable history', - missing_value = -99, - positive = 'up' + history='variable history', + missing_value=-99, + positive='up' ) for time in (15, 16, 17): - cmor.write(varid, values, time_vals = [time], time_bnds = [time - 0.45, time + 0.45]) - + cmor.write( + varid, + values, + time_vals=[time], + time_bnds=[ + time - + 0.45, + time + + 0.45]) + + def version(cmor): - return '%s.%s.%s' % (cmor.CMOR_VERSION_MAJOR, - cmor.CMOR_VERSION_MINOR, - cmor.CMOR_VERSION_PATCH) - + return '%s.%s.%s' % (cmor.CMOR_VERSION_MAJOR, + cmor.CMOR_VERSION_MINOR, + cmor.CMOR_VERSION_PATCH) + + def main(): assert version(cmor) == '2.8.3' cmor_initialisation() values, axes = setup_data() cmor_define_and_write(values, axes) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_time_gap_single_write1.py b/Test/test_time_gap_single_write1.py index dc0302f9..066caf40 100644 --- a/Test/test_time_gap_single_write1.py +++ b/Test/test_time_gap_single_write1.py @@ -1,69 +1,76 @@ import cmor import numpy + def cmor_initialisation(): cmor.setup(inpath='/git/cmip5-cmor-tables/Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3, - create_subdirectories = 0) + netcdf_file_action=cmor.CMOR_REPLACE_3, + create_subdirectories=0) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', '360_day', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - parent_experiment_rip = 'N/A', - branch_time = 0., - contact = 'bob', - outpath = 'hadju/test') + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + parent_experiment_rip='N/A', + branch_time=0., + contact='bob', + outpath='hadju/test') + def setup_data(): - axes = [ {'table_entry': 'time', - 'units': 'days since 2000-01-01 00:00:00' - }, - {'table_entry': 'latitude', - 'units': 'degrees', - 'coord_vals': [0], - 'cell_bounds': [-0.5, 0.5]}, - {'table_entry': 'longitude', - 'units': 'degrees', - 'coord_vals': [1], - 'cell_bounds': [0.5, 1.5]}, - ] + axes = [{'table_entry': 'time', + 'units': 'days since 2000-01-01 00:00:00' + }, + {'table_entry': 'latitude', + 'units': 'degrees', + 'coord_vals': [0], + 'cell_bounds': [-0.5, 0.5]}, + {'table_entry': 'longitude', + 'units': 'degrees', + 'coord_vals': [1], + 'cell_bounds': [0.5, 1.5]}, + ] values = numpy.array([215., 215.], numpy.float32) return values, axes + def cmor_define_and_write(values, axes): table = 'CMIP5_day' cmor.load_table(table) axis_ids = list() for axis in axes: - axis_ids.append(cmor.axis(**axis)) - + axis_ids.append(cmor.axis(**axis)) + varid = cmor.variable('rlut', 'W m-2', axis_ids, - history = 'variable history', - missing_value = -99, - positive = 'up' + history='variable history', + missing_value=-99, + positive='up' ) time = [15, 17] - cmor.write(varid, values, time_vals = time, time_bnds = [[15 - 0.5, 15 +0.5], [17 - 0.5, 17 + 0.5]]) - + cmor.write(varid, values, time_vals=time, time_bnds=[ + [15 - 0.5, 15 + 0.5], [17 - 0.5, 17 + 0.5]]) + + def version(cmor): - return '%s.%s.%s' % (cmor.CMOR_VERSION_MAJOR, - cmor.CMOR_VERSION_MINOR, - cmor.CMOR_VERSION_PATCH) - + return '%s.%s.%s' % (cmor.CMOR_VERSION_MAJOR, + cmor.CMOR_VERSION_MINOR, + cmor.CMOR_VERSION_PATCH) + + def main(): assert version(cmor) == '2.8.3' cmor_initialisation() values, axes = setup_data() cmor_define_and_write(values, axes) cmor.close() - + + if __name__ == '__main__': main() diff --git a/Test/test_time_gap_single_write2.py b/Test/test_time_gap_single_write2.py index e00420ef..2027f647 100644 --- a/Test/test_time_gap_single_write2.py +++ b/Test/test_time_gap_single_write2.py @@ -2,69 +2,75 @@ import cmor import numpy + def cmor_initialisation(): cmor.setup(inpath='/git/cmip5-cmor-tables/Tables', - netcdf_file_action = cmor.CMOR_REPLACE_3, - create_subdirectories = 0) + netcdf_file_action=cmor.CMOR_REPLACE_3, + create_subdirectories=0) cmor.dataset('pre-industrial control', 'ukmo', 'HadCM3', '360_day', - institute_id = 'ukmo', - model_id = 'HadCM3', - history = 'some global history', - forcing = 'N/A', - parent_experiment_id = 'N/A', - parent_experiment_rip = 'N/A', - branch_time = 0., - contact = 'bob', - outpath = 'hadju/test') + institute_id='ukmo', + model_id='HadCM3', + history='some global history', + forcing='N/A', + parent_experiment_id='N/A', + parent_experiment_rip='N/A', + branch_time=0., + contact='bob', + outpath='hadju/test') + def setup_data(): - axes = [ {'table_entry': 'time1', - 'units': 'days since 2000-01-01 00:00:00' - }, - {'table_entry': 'latitude', - 'units': 'degrees', - 'coord_vals': [0], - 'cell_bounds': [-0.5, 0.5]}, - {'table_entry': 'longitude', - 'units': 'degrees', - 'coord_vals': [1], - 'cell_bounds': [0.5, 1.5]}, - ] + axes = [{'table_entry': 'time1', + 'units': 'days since 2000-01-01 00:00:00' + }, + {'table_entry': 'latitude', + 'units': 'degrees', + 'coord_vals': [0], + 'cell_bounds': [-0.5, 0.5]}, + {'table_entry': 'longitude', + 'units': 'degrees', + 'coord_vals': [1], + 'cell_bounds': [0.5, 1.5]}, + ] values = numpy.array([215., 215.], numpy.float32) return values, axes + def cmor_define_and_write(values, axes): table = 'CMIP5_3hr' cmor.load_table(table) axis_ids = list() for axis in axes: - axis_ids.append(cmor.axis(**axis)) - + axis_ids.append(cmor.axis(**axis)) + varid = cmor.variable('tas', 'K', axis_ids, - history = 'variable history', - missing_value = -99, - positive = '' + history='variable history', + missing_value=-99, + positive='' ) time = [15, 25] - cmor.write(varid, values, time_vals = time) - + cmor.write(varid, values, time_vals=time) + + def version(cmor): - return '%s.%s.%s' % (cmor.CMOR_VERSION_MAJOR, - cmor.CMOR_VERSION_MINOR, - cmor.CMOR_VERSION_PATCH) - + return '%s.%s.%s' % (cmor.CMOR_VERSION_MAJOR, + cmor.CMOR_VERSION_MINOR, + cmor.CMOR_VERSION_PATCH) + + def main(): assert version(cmor) == '2.8.3' cmor_initialisation() values, axes = setup_data() cmor_define_and_write(values, axes) cmor.close() - + + if __name__ == '__main__': main() diff --git a/TestTables/CMIP6_3hr.json b/TestTables/CMIP6_3hr.json index fcc7e694..94bb791d 100644 --- a/TestTables/CMIP6_3hr.json +++ b/TestTables/CMIP6_3hr.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table 3hr", "realm": "atmos", "frequency": "3hr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "0.125000", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "clt": { "modeling_realm": "atmos", "standard_name": "cloud_area_fraction", - "units": "1.0", - "cell_methods": "time: mean", + "units": "%", + "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.", @@ -35,7 +35,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upward_latent_heat_flux", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upward Latent Heat Flux", "comment": "", @@ -52,7 +52,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upward_sensible_heat_flux", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upward Sensible Heat Flux", "comment": "", @@ -120,7 +120,7 @@ "modeling_realm": "atmos", "standard_name": "precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Precipitation", "comment": "includes both liquid and solid phases", @@ -137,7 +137,7 @@ "modeling_realm": "atmos", "standard_name": "convective_precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -154,7 +154,7 @@ "modeling_realm": "atmos", "standard_name": "snowfall_flux", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -188,7 +188,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Downwelling Longwave Radiation", "comment": "", @@ -205,7 +205,7 @@ "modeling_realm": "atmos", "standard_name": "surface_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": "Surface Downwelling Clear-Sky Longwave Radiation", "comment": "Surface downwelling clear-sky longwave radiation", @@ -222,7 +222,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upwelling Longwave Radiation", "comment": "", @@ -239,7 +239,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Downwelling Shortwave Radiation", "comment": "surface solar irradiance for UV calculations", @@ -256,7 +256,7 @@ "modeling_realm": "atmos", "standard_name": "surface_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": "Surface Downwelling Clear-Sky Shortwave Radiation", "comment": "surface solar irradiance clear sky for UV calculations", @@ -273,7 +273,7 @@ "modeling_realm": "atmos", "standard_name": "surface_diffuse_downwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Diffuse Downwelling Shortwave Radiation", "comment": "", @@ -290,7 +290,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upwelling Shortwave Radiation", "comment": "", @@ -307,7 +307,7 @@ "modeling_realm": "atmos", "standard_name": "surface_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": "Surface Upwelling Clear-Sky Shortwave Radiation", "comment": "Surface upwelling clear-sky shortwave radiation", diff --git a/TestTables/CMIP6_6hrLev.json b/TestTables/CMIP6_6hrLev.json index 88be6cb7..1f81bbac 100644 --- a/TestTables/CMIP6_6hrLev.json +++ b/TestTables/CMIP6_6hrLev.json @@ -1,28 +1,28 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table 6hrLev", "realm": "atmos", "frequency": "6hr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "0.250000", "generic_levels": "alevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "bs550aer": { "modeling_realm": "aerosol", "standard_name": "volume_lidar_backwards_scattering_coefficient_in_air_due_to_ambient_aerosol_particles", "units": "m-1 sr-1", - "cell_methods": "time: mean", + "cell_methods": "area: mean", "cell_measures": "area: areacella", "long_name": "Aerosol backscatter coefficient", "comment": "Aerosol Backscatter @550nm @ 180 degrees, computed from extinction and lidar ratio", - "dimensions": "longitude latitude alevel time", + "dimensions": "longitude latitude alevel time1", "out_name": "bs550aer", "type": "float", "positive": "", @@ -33,13 +33,13 @@ }, "ec550aer": { "modeling_realm": "aerosol", - "standard_name": "volume_extinction_coefficient_in_air_due_to_ambient_aerosol", + "standard_name": "volume_extinction_coefficient_in_air_due_to_ambient_aerosol_particles", "units": "m-1", - "cell_methods": "time: mean", + "cell_methods": "area: mean", "cell_measures": "area: areacella", "long_name": "Aerosol extinction coefficient", "comment": "Aerosol Extinction @550nm", - "dimensions": "longitude latitude alevel time", + "dimensions": "longitude latitude alevel time1", "out_name": "ec550aer", "type": "float", "positive": "", @@ -149,23 +149,6 @@ "valid_max": "", "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", - "out_name": "zg500", - "type": "float", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" } } } diff --git a/TestTables/CMIP6_6hrPlev.json b/TestTables/CMIP6_6hrPlev.json index ef06ebce..c964d356 100644 --- a/TestTables/CMIP6_6hrPlev.json +++ b/TestTables/CMIP6_6hrPlev.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table 6hrPlev", "realm": "atmos", "frequency": "6hr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "0.250000", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "bldep": { "modeling_realm": "aerosol", "standard_name": "atmosphere_boundary_layer_thickness", "units": "m", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Boundary Layer Depth", "comment": "Boundary layer depth", @@ -35,7 +35,7 @@ "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.", @@ -52,7 +52,7 @@ "modeling_realm": "atmos", "standard_name": "specific_humidity", "units": "1.0", - "cell_methods": "area: mean (global) time: mean", + "cell_methods": "area: mean time: mean", "cell_measures": "area: areacella", "long_name": "Specific Humidity", "comment": "", @@ -69,7 +69,7 @@ "modeling_realm": "atmos", "standard_name": "precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Precipitation", "comment": "includes both liquid and solid phases", @@ -88,7 +88,7 @@ "units": "kg m-2 s-1", "cell_methods": "area: mean time: mean within hours time: maximum over hours", "cell_measures": "area: areacella", - "long_name": "Daily Maximum Hourly Precipitation Rate", + "long_name": "Maximum Hourly Precipitation Rate", "comment": "", "dimensions": "longitude latitude time", "out_name": "prhmax", @@ -103,7 +103,7 @@ "modeling_realm": "atmos", "standard_name": "air_pressure_at_sea_level", "units": "Pa", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Sea Level Pressure", "comment": "Sea Level Pressure", @@ -117,7 +117,7 @@ "ok_max_mean_abs": "" }, "rv850": { - "modeling_realm": "aerosol", + "modeling_realm": "atmos", "standard_name": "atmosphere_relative_vorticity", "units": "s-1", "cell_methods": "time: mean", @@ -141,7 +141,7 @@ "cell_measures": "area: areacella", "long_name": "Near-Surface Wind Speed", "comment": "near-surface (usually, 10 meters) wind speed.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude height10m time", "out_name": "sfcWind", "type": "real", "positive": "", @@ -150,51 +150,17 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "ta": { - "modeling_realm": "atmos", - "standard_name": "air_temperature", - "units": "K", - "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": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "tas": { "modeling_realm": "atmos", "standard_name": "air_temperature", "units": "K", "cell_methods": "time: mean", "cell_measures": "area: areacella", - "long_name": "Near-Surface Air Temperature", + "long_name": "Surface Temperature", "comment": "near-surface (usually, 2 meter) air temperature", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude height2m time", "out_name": "tas", - "type": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "ua": { - "modeling_realm": "atmos", - "standard_name": "eastward_wind", - "units": "m s-1", - "cell_methods": "time: point", - "cell_measures": "", - "long_name": "Eastward Wind", - "comment": "", - "dimensions": "longitude latitude plev3 time1", - "out_name": "ua", - "type": "real", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", @@ -205,10 +171,10 @@ "modeling_realm": "atmos", "standard_name": "eastward_wind", "units": "m s-1", - "cell_methods": "", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "Eastward Wind at 100 hPa", - "comment": "Zonal wind on the 100m", + "long_name": "Eastward Wind at 100m", + "comment": "Zonal wind at 100m height", "dimensions": "longitude latitude height100m time", "out_name": "ua100m", "type": "", @@ -224,7 +190,7 @@ "units": "m s-1", "cell_methods": "area: time: mean", "cell_measures": "area: areacella", - "long_name": "Eastward Wind", + "long_name": "Eastward Wind at 200hPa", "comment": "Zonal wind (positive eastwards) at 200hPa", "dimensions": "longitude latitude time p200", "out_name": "ua200", @@ -260,25 +226,8 @@ "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", + "dimensions": "longitude latitude height10m time", "out_name": "uas", - "type": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "va": { - "modeling_realm": "atmos", - "standard_name": "northward_wind", - "units": "m s-1", - "cell_methods": "time: point", - "cell_measures": "", - "long_name": "Northward Wind", - "comment": "", - "dimensions": "longitude latitude plev3 time1", - "out_name": "va", "type": "real", "positive": "", "valid_min": "", @@ -290,7 +239,7 @@ "modeling_realm": "atmos", "standard_name": "northward_wind", "units": "m s-1", - "cell_methods": "", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Northward Wind at 100m", "comment": "Meridional wind at 100m above the surface.", @@ -341,7 +290,7 @@ "modeling_realm": "atmos", "standard_name": "lagrangian_tendency_of_air_pressure", "units": "Pa s-1", - "cell_methods": "area: mean (global) time: mean", + "cell_methods": "area: mean time: mean", "cell_measures": "area: areacella", "long_name": "omega (=dp/dt)", "comment": "Omega (vertical velocity in pressure coordinates, positive downwards)", @@ -358,7 +307,7 @@ "modeling_realm": "atmos", "standard_name": "wind_speed_of_gust", "units": "m s-1", - "cell_methods": "", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Maximum Wind Speed of Gust at 100m", "comment": "Wind speed gust maximum at 100m above surface", @@ -372,7 +321,7 @@ "ok_max_mean_abs": "" }, "zg1000": { - "modeling_realm": "aerosol", + "modeling_realm": "atmos", "standard_name": "geopotential_height", "units": "m", "cell_methods": "time: mean", diff --git a/TestTables/CMIP6_6hrPlevPt.json b/TestTables/CMIP6_6hrPlevPt.json index 5fe7266c..ea2aa16f 100644 --- a/TestTables/CMIP6_6hrPlevPt.json +++ b/TestTables/CMIP6_6hrPlevPt.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table 6hrPlevPt", "realm": "atmos", "frequency": "6hr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "albsrfc": { @@ -116,6 +116,23 @@ "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", + "type": "", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, "hus27": { "modeling_realm": "atmos", "standard_name": "specific_humidity", @@ -170,7 +187,7 @@ "lwsffluxaero": { "modeling_realm": "atmos", "standard_name": "longwave__flux__due_to_volcanic_aerosols_at_the_surface", - "units": "W m-2 ", + "units": "W m-2", "cell_methods": "time: point", "cell_measures": "area: areacella", "long_name": "Longwave flux due to volcanic aerosols at the surface", @@ -187,7 +204,7 @@ "lwtoafluxaerocs": { "modeling_realm": "atmos", "standard_name": "longwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky", - "units": "W m-2 ", + "units": "W m-2", "cell_methods": "time: point", "cell_measures": "area: areacella", "long_name": "Longwave flux due to volcanic aerosols at TOA under clear sky", @@ -205,11 +222,11 @@ "modeling_realm": "land", "standard_name": "moisture_content_of_soil_layer", "units": "kg m-2", - "cell_methods": "time: point", + "cell_methods": "area: mean where land time: point", "cell_measures": "area: areacella", "long_name": "Water Content of Soil Layer", "comment": "The mass of water in all phases, including ice, in soil layers. Report as missing for grid cells with no land.", - "dimensions": "longitude latitude time1", + "dimensions": "longitude latitude time1 sdepth1", "out_name": "mrlsl", "type": "real", "positive": "", @@ -222,11 +239,11 @@ "modeling_realm": "land", "standard_name": "moisture_content_of_soil_layer", "units": "kg m-2", - "cell_methods": "time: point", + "cell_methods": "area: mean where land time: point", "cell_measures": "area: areacella", "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": "longitude latitude time1", + "dimensions": "longitude latitude time1 sdepth1", "out_name": "mrsos", "type": "real", "positive": "", @@ -286,6 +303,23 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, + "rv850": { + "modeling_realm": "atmos", + "standard_name": "atmosphere_relative_vorticity", + "units": "s-1", + "cell_methods": "area: mean", + "cell_measures": "area: areacella", + "long_name": "Relative Vorticity at 850 hPa", + "comment": "", + "dimensions": "longitude latitude time1 p850", + "out_name": "rv850", + "type": "float", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, "sfcWind": { "modeling_realm": "atmos", "standard_name": "wind_speed", @@ -340,7 +374,7 @@ "swsffluxaero": { "modeling_realm": "atmos", "standard_name": "shortwave__flux_due_to_volcanic_aerosols_at__the_surface", - "units": "W m-2 ", + "units": "W m-2", "cell_methods": "time: point", "cell_measures": "area: areacella", "long_name": "Shortwave heating rate due to volcanic aerosols", @@ -357,7 +391,7 @@ "swtoafluxaerocs": { "modeling_realm": "atmos", "standard_name": "shortwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky", - "units": "W m-2 ", + "units": "W m-2", "cell_methods": "time: point", "cell_measures": "area: areacella", "long_name": "Shortwave flux due to volcanic aerosols at TOA under clear sky", @@ -428,11 +462,11 @@ "units": "K", "cell_methods": "time: point", "cell_measures": "area: areacella", - "long_name": "Near-Surface Air Temperature", + "long_name": "Surface Temperature", "comment": "near-surface (usually, 2 meter) air temperature", "dimensions": "longitude latitude time1", "out_name": "tas", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", @@ -460,11 +494,11 @@ "modeling_realm": "land", "standard_name": "soil_temperature", "units": "K", - "cell_methods": "time: point", + "cell_methods": "area: mean where land time: point", "cell_measures": "area: areacella", "long_name": "Temperature of Soil", "comment": "Temperature of each soil layer. Reported as missing for grid cells with no land.", - "dimensions": "longitude latitude time1", + "dimensions": "longitude latitude time1 sdepth1", "out_name": "tsl", "type": "real", "positive": "", @@ -483,7 +517,7 @@ "comment": "", "dimensions": "longitude latitude plev3 time1", "out_name": "ua", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -515,9 +549,9 @@ "cell_measures": "area: areacella", "long_name": "Eastward Near-Surface Wind", "comment": "Eastward component of the near-surface (usually, 10 meters) wind", - "dimensions": "longitude latitude time1", + "dimensions": "longitude latitude height10m time1", "out_name": "uas", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -534,7 +568,7 @@ "comment": "", "dimensions": "longitude latitude plev3 time1", "out_name": "va", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -566,9 +600,9 @@ "cell_measures": "area: areacella", "long_name": "Northward Near-Surface Wind", "comment": "Northward component of the near surface wind", - "dimensions": "longitude latitude time1", + "dimensions": "longitude latitude height10m time1", "out_name": "vas", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -583,7 +617,7 @@ "cell_measures": "area: areacella", "long_name": "atmosphere_relative_vorticity", "comment": "Mean vorticity over 850,700,600 hPa", - "dimensions": "longitude latitude plev3 time1", + "dimensions": "longitude latitude pl700 time1", "out_name": "vortmean", "type": "", "positive": "", @@ -609,6 +643,23 @@ "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": { "modeling_realm": "atmos", "standard_name": "geopotential_height", @@ -619,7 +670,24 @@ "comment": "", "dimensions": "longitude latitude plev27 time1", "out_name": "zg27", - "type": "", + "type": "float", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, + "zg500": { + "modeling_realm": "aerosol", + "standard_name": "geopotential_height", + "units": "m", + "cell_methods": "area: mean", + "cell_measures": "area: areacella", + "long_name": "Geopotential Height at 500 hPa", + "comment": "geopotential height on the 500 hPa surface", + "dimensions": "longitude latitude time1 p500", + "out_name": "zg500", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", @@ -636,7 +704,7 @@ "comment": "", "dimensions": "longitude latitude plev7h time1", "out_name": "zg7h", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", diff --git a/TestTables/CMIP6_AERday.json b/TestTables/CMIP6_AERday.json index a1cc9a8b..61f202a8 100644 --- a/TestTables/CMIP6_AERday.json +++ b/TestTables/CMIP6_AERday.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table AERday", "realm": "aerosol", "frequency": "day", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "cod": { "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_cloud", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "cloud optical depth", "comment": "", @@ -35,7 +35,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_boundary_layer_thickness", "units": "m", - "cell_methods": "time: maximum", + "cell_methods": "area: mean time: maximum", "cell_measures": "area: areacella", "long_name": "maximum PBL height", "comment": "maximum boundary layer height during the day (add cell_methods attribute: 'time: maximum')", @@ -52,7 +52,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_boundary_layer_thickness", "units": "m", - "cell_methods": "time: minimum", + "cell_methods": "area: mean time: minimum", "cell_measures": "area: areacella", "long_name": "minimum PBL height", "comment": "minimum boundary layer height during the day (add cell_methods attribute: 'time: minimum')", @@ -69,10 +69,10 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_ambient_aerosol_particles", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "ambient aerosol optical thickness at 550 nm", - "comment": "AOD from ambient aerosols (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'", + "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", @@ -86,7 +86,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_ozone_in_air", "units": "mol mol-1", - "cell_methods": "time: maximum", + "cell_methods": "area: mean time: maximum", "cell_measures": "area: areacella", "long_name": "daily maximum O3 volume mixing ratio in lowest model layer", "comment": "", @@ -103,7 +103,7 @@ "modeling_realm": "aerosol", "standard_name": "equivalent_thickness_at_stp_of_atmosphere_ozone_content", "units": "m", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Total Column Ozone", "comment": "total ozone column in DU", @@ -120,11 +120,11 @@ "modeling_realm": "aerosol", "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 at 10 hPa", "comment": "Zonal wind on the 10 hPa surface", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude time p10", "out_name": "ua10", "type": "float", "positive": "", @@ -137,11 +137,11 @@ "modeling_realm": "aerosol", "standard_name": "geopotential_height", "units": "m", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Geopotential Height at 10 hPa", "comment": "Geopotential height on the 10 hPa surface", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude time p10", "out_name": "zg10", "type": "float", "positive": "", @@ -154,11 +154,11 @@ "modeling_realm": "aerosol", "standard_name": "geopotential_height", "units": "m", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Geopotential Height at 100 hPa", "comment": "Geopotential height on the 100 hPa surface", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude time p100", "out_name": "zg100", "type": "float", "positive": "", @@ -168,14 +168,14 @@ "ok_max_mean_abs": "" }, "zg1000": { - "modeling_realm": "aerosol", + "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", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude time p1000", "out_name": "zg1000", "type": "float", "positive": "", @@ -183,6 +183,23 @@ "valid_max": "", "ok_min_mean_abs": "", "ok_max_mean_abs": "" + }, + "zg500": { + "modeling_realm": "aerosol", + "standard_name": "geopotential_height", + "units": "m", + "cell_methods": "area: 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": "" } } } diff --git a/TestTables/CMIP6_AERhr.json b/TestTables/CMIP6_AERhr.json index a3c9acc0..aa953a38 100644 --- a/TestTables/CMIP6_AERhr.json +++ b/TestTables/CMIP6_AERhr.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table AERhr", "realm": "aerosol", "frequency": "hr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "ps": { "modeling_realm": "aerosol", "standard_name": "surface_air_pressure", "units": "Pa", - "cell_methods": "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", @@ -35,7 +35,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_nitrogen_dioxide_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "NO2 volume mixing ratio in lowest model layer", "comment": "", @@ -52,7 +52,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_ozone_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "O3 volume mixing ratio in lowest model layer", "comment": "", @@ -69,7 +69,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_pm2p5_ambient_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "PM2.5 mass mixing ratio in lowest model layer", "comment": "", @@ -83,10 +83,10 @@ "ok_max_mean_abs": "" }, "tas": { - "modeling_realm": "aerosol", + "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", "comment": "near-surface (usually, 2 meter) air temperature", diff --git a/TestTables/CMIP6_AERmon.json b/TestTables/CMIP6_AERmon.json index ab04086e..ef06a8e4 100644 --- a/TestTables/CMIP6_AERmon.json +++ b/TestTables/CMIP6_AERmon.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table AERmon", "realm": "aerosol", "frequency": "mon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "30.00000", "generic_levels": "alevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "abs550aer": { "modeling_realm": "aerosol", "standard_name": "atmosphere_absorption_optical_thickness_due_to_ambient_aerosol", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "ambient aerosol absorption optical thickness at 550 nm", "comment": "", @@ -35,7 +35,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_mass_of_air_per_unit_area", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Vertically integrated mass content of air in layer", "comment": "", @@ -50,9 +50,9 @@ }, "albs": { "modeling_realm": "aerosol", - "standard_name": "planetary_albedo", + "standard_name": "surface_albedo", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "planetary albedo", "comment": "Grid cell average albedo for all wavelengths.", @@ -69,7 +69,7 @@ "modeling_realm": "aerosol", "standard_name": "surface_albedo", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "surface albedo", "comment": "", @@ -86,7 +86,7 @@ "modeling_realm": "aerosol", "standard_name": "tracer_lifetime", "units": "yr", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Tracer age of air Northern Hemisphere", "comment": "Fixed surface layer mixing ratio over 30o-50oN (0 ppbv), uniform fixed source (at all levels) everywhere else (source is unspecified but must be constant in space and time and documented). Note that the source could be 1yr/yr, so the tracer concentration provides mean age in years. For method using linearly increasing tracer include a method attribute: 'linearly increasing tracer'For method using uniform source (1yr/yr) include a method attribute: 'uniform source'", @@ -103,7 +103,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_boundary_layer_thickness", "units": "m", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Boundary Layer Depth", "comment": "Boundary layer depth", @@ -120,7 +120,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_ethyne_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "C2H2 volume mixing ratio", "comment": "", @@ -137,7 +137,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_ethane_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "C2H6 volume mixing ratio", "comment": "", @@ -154,7 +154,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_propene_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "C3H6 volume mixing ratio", "comment": "", @@ -171,7 +171,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_propane_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "C3H8 volume mixing ratio", "comment": "", @@ -188,7 +188,7 @@ "modeling_realm": "aerosol", "standard_name": "number_concentration_of_cloud_condensation_nuclei_at_stp_in_air", "units": "m-3", - "cell_methods": "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", @@ -205,10 +205,10 @@ "modeling_realm": "aerosol", "standard_name": "number_concentration_of_cloud_liquid_water_particles_in_air", "units": "m-3", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "cloud droplet number concentration", - "comment": "Cloud Droplet Number Concentration in liquid water clouds. Question: Is this rather a 3D field?", + "comment": "Cloud Droplet Number Concentration in liquid water clouds.", "dimensions": "longitude latitude alevel time", "out_name": "cdnc", "type": "float", @@ -222,7 +222,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_acetone_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "CH3COCH3 volume mixing ratio", "comment": "", @@ -239,7 +239,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_methane_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "CH4 volume mixing ratio", "comment": "", @@ -256,7 +256,7 @@ "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", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Aqueous-phase production rate of SO4", "comment": "proposed name: tendency_of_atmosphere_mass_content_of_sulfate_dry_aerosol_due_to_aqueous_phase_net_chemical_production", @@ -273,7 +273,7 @@ "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", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Gas-phase production rate of SO4", "comment": "proposed name: tendency_of_atmosphere_mass_content_of_sulfate_dry_aerosol_due_to_gas_phase_net_chemical_production", @@ -290,7 +290,7 @@ "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": "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", @@ -307,7 +307,7 @@ "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": "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.", @@ -323,8 +323,8 @@ "cltc": { "modeling_realm": "aerosol", "standard_name": "convective_cloud_area_fraction", - "units": "1.0", - "cell_methods": "time: mean", + "units": "%", + "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.", @@ -341,7 +341,7 @@ "modeling_realm": "aerosol", "standard_name": "canopy_height", "units": "m", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "canopy height", "comment": "", @@ -358,7 +358,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_carbon_monoxide_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "CO volume mixing ratio", "comment": "", @@ -375,7 +375,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_carbon_dioxide_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "CO2 volume mixing ratio", "comment": "", @@ -392,7 +392,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_cloud", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "cloud optical depth", "comment": "", @@ -409,7 +409,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_dimethyl_sulfide_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "DMS volume mixing ratio", "comment": "", @@ -426,7 +426,7 @@ "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": "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.", @@ -443,7 +443,7 @@ "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": "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.", @@ -460,7 +460,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mass_content_of_ammonia_due_to_dry_deposition", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -477,7 +477,7 @@ "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": "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", @@ -494,7 +494,7 @@ "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": "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.", @@ -511,7 +511,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mass_content_of_ozone_due_to_dry_deposition", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -528,7 +528,7 @@ "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": "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 turbulent deposition.", @@ -545,7 +545,7 @@ "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": "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", @@ -562,7 +562,7 @@ "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": "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", @@ -579,7 +579,7 @@ "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": "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.", @@ -596,7 +596,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mass_content_of_carbon_monoxide_due_to_emission", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "total emission rate of anthropogenic co", "comment": "anthrophogenic emission of CO", @@ -613,7 +613,7 @@ "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": "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.", @@ -630,7 +630,7 @@ "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": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "total emission of anthropogenic organic aerosol", "comment": "anthropogenic part of emioa", @@ -647,7 +647,7 @@ "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": "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.", @@ -664,7 +664,7 @@ "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": "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.", @@ -681,7 +681,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mass_content_of_carbon_monoxide_due_to_emission", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -698,7 +698,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mass_content_of_dimethyl_sulfide_due_to_emission", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -715,7 +715,7 @@ "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": "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.", @@ -732,7 +732,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mass_content_of_isoprene_due_to_emission", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -749,7 +749,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_moles_of_nox_expressed_as_nitrogen", "units": "mol s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "layer-integrated lightning production of NOx", "comment": "Integrate the NOx production for lightning over model layer. proposed name: tendency_of_atmosphere_mass_content_of_nox_from_lightning", @@ -766,7 +766,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mass_content_of_ammonia_due_to_emission", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -783,7 +783,7 @@ "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": "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.", @@ -800,10 +800,10 @@ "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": "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.", + "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.", "dimensions": "longitude latitude time", "out_name": "emioa", "type": "float", @@ -817,7 +817,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mass_content_of_sulfur_dioxide_due_to_emission", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -834,7 +834,7 @@ "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": "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.", @@ -851,7 +851,7 @@ "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": "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.", @@ -868,7 +868,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mass_content_of_nmvoc_due_to_emission", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -883,9 +883,9 @@ }, "h2o": { "modeling_realm": "aerosol", - "standard_name": "mole_fraction_of_water_vapor_in_air", + "standard_name": "mass_fraction_of_water_in_air", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Water vapour volume mixing ratio", "comment": "includes all phases of water", @@ -902,7 +902,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_formaldehyde_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Formaldehyde volume mixing ratio", "comment": "", @@ -919,7 +919,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_hydrogen_chloride_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "HCl volume mixing ratio", "comment": "", @@ -936,7 +936,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_nitric_acid_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "HNO3 volume mixing ratio", "comment": "", @@ -953,7 +953,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_isoprene_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Isoprene volume mixing ratio", "comment": "", @@ -968,9 +968,9 @@ }, "jno2": { "modeling_realm": "aerosol", - "standard_name": "", + "standard_name": "photolysis_rate_of_nitrogen_dioxide", "units": "s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "photolysis rate of NO2", "comment": "", @@ -985,9 +985,9 @@ }, "lossch4": { "modeling_realm": "aerosol", - "standard_name": "tendency_of_atmosphere_moles_of_methane", - "units": "mol s-1", - "cell_methods": "time: mean", + "standard_name": "tendency_of_atmosphere_mole_concentration_of_methane_due_to_chemical_destruction", + "units": "mol m-3 s-1", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Monthly Loss of atmospheric Methane", "comment": "monthly averaged atmospheric loss", @@ -1002,9 +1002,9 @@ }, "lossco": { "modeling_realm": "aerosol", - "standard_name": "tendency_of_atmosphere_moles_of_carbon_monoxide", - "units": "mol s-1", - "cell_methods": "time: mean", + "standard_name": "tendency_of_atmosphere_of_mole_concentration_of_carbon_monoxide_due_to_chemical_destruction", + "units": "mol m-3 s-1", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Monthly Loss of atmospheric Carbon Monoxide", "comment": "monthly averaged atmospheric loss", @@ -1019,9 +1019,9 @@ }, "lossn2o": { "modeling_realm": "aerosol", - "standard_name": "tendency_of_atmosphere_moles_of_nitrous_oxide", - "units": "mol s-1", - "cell_methods": "time: mean", + "standard_name": "tendency_of_atmosphere_of_mole_concentration_of_nitrous_oxide_due_to_chemical_destruction", + "units": "mol m-3 s-1", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Monthly Loss of atmospheric Nitrous Oxide", "comment": "monthly averaged atmospheric loss", @@ -1038,7 +1038,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_mass_content_of_cloud_liquid_water", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "liquid water path", "comment": "", @@ -1051,28 +1051,11 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "mcu": { - "modeling_realm": "aerosol", - "standard_name": "atmosphere_updraft_convective_mass_flux", - "units": "kg m-2 s-1", - "cell_methods": "time: mean", - "cell_measures": "area: areacella", - "long_name": "Convective Updraft 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.", - "dimensions": "longitude latitude alevel time", - "out_name": "mcu", - "type": "float", - "positive": "up", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "mmraerh2o": { "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_water_in_ambient_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Aerosol water mass mixing ratio", "comment": "", @@ -1089,7 +1072,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_elemental_carbon_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Elemental carbon mass mixing ratio", "comment": "", @@ -1106,7 +1089,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_dust_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Dust aerosol mass mixing ratio", "comment": "", @@ -1123,7 +1106,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_ammonium_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "NH4 mass mixing ratio", "comment": "", @@ -1140,7 +1123,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_nitrate_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "NO3 aerosol mass mixing ratio", "comment": "", @@ -1157,7 +1140,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_particulate_organic_matter_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Total organic aerosol mass mixing ratio", "comment": "We recommend a scale factor of POM=1.4*OC, unless your model has more detailed info available.", @@ -1174,7 +1157,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_pm1_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "PM1.0 mass mixing ratio", "comment": "E.g. mass_fraction_of_pm1_aerosol_at_50_percent_relative_humidity_in_air. proposed name: mass_fraction_of_pm1_dry_aerosol_in_air", @@ -1191,7 +1174,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_pm10_ambient_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "PM10 mass mixing ratio", "comment": "E.g. mass_fraction_of_pm10_aerosol_at_50_percent_relative_humidity_in_air, proposed name: mass_fraction_of_pm10_dry_aerosol_in_air", @@ -1208,7 +1191,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_pm2p5_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "PM2.5 mass mixing ratio", "comment": "E.g. mass_fraction_of_pm2p5_aerosol_at_50_percent_relative_humidity_in_air, proposed_name: mass_fraction_of_pm2p5_dry_aerosol_in_air", @@ -1225,7 +1208,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_sulfate_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Aerosol sulfate mass mixing ratio", "comment": "", @@ -1242,7 +1225,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_secondary_particulate_organic_matter_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Secondary organic aerosol mass mixing ratio", "comment": "", @@ -1259,7 +1242,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_seasalt_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Sea Salt mass mixing ratio", "comment": "", @@ -1276,7 +1259,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_nitrous_oxide_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "N2O volume mixing ratio", "comment": "", @@ -1293,7 +1276,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_artificial_tracer_with_fixed_lifetime_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Artificial tracer with 50 day lifetime", "comment": "", @@ -1310,7 +1293,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_nitrogen_monoxide_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "NO volume mixing ratio", "comment": "", @@ -1327,7 +1310,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_nitrogen_dioxide_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "NO2 volume mixing ratio", "comment": "", @@ -1344,7 +1327,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_ozone_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Ozone volume mixing ratio", "comment": "", @@ -1361,7 +1344,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mole_concentration_of_ozone_due_to_chemical_destruction", "units": "mol m-3 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "O3 destruction rate", "comment": "ONLY provide the sum of the following reactions: (i) O(1D)+H2O; (ii) O3+HO2; (iii) O3+OH; (iv) O3+alkenes (isoprene, ethene,...)", @@ -1378,7 +1361,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mole_concentration_of_ozone_due_to_chemical_production", "units": "mol m-3 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "O3 production rate", "comment": "ONLY provide the sum of all the HO2/RO2 + NO reactions (as k*[HO2]*[NO])", @@ -1395,7 +1378,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_ozone_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Ozone volume mixing ratio", "comment": "Ozone tracer intended to map out strat-trop exchange (STE) of ozone.", @@ -1412,7 +1395,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_ambient_aerosol_particles", "units": "1.0", - "cell_methods": "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'", @@ -1429,10 +1412,10 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_ambient_aerosol_particles", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "ambient aerosol optical thickness at 550 nm", - "comment": "AOD from ambient aerosols (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'", + "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", @@ -1446,7 +1429,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_water_in_ambient_aerosol", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "aerosol water aod@550nm", "comment": "proposed name: atmosphere_optical_thickness_due_to_water_ambient_aerosol", @@ -1463,7 +1446,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_particulate_organic_matter_ambient_aerosol", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "bb aod@550nm", "comment": "total organic aerosol AOD due to biomass burning (excluding so4, nitrate BB components)", @@ -1480,7 +1463,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_black_carbon_ambient_aerosol", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "black carbon aod@550nm", "comment": "", @@ -1497,7 +1480,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_ambient_aerosol_particles", "units": "1.0", - "cell_methods": "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'", @@ -1514,7 +1497,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_dust_ambient_aerosol", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "dust aod@550nm", "comment": "", @@ -1531,7 +1514,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_pm1_ambient_aerosol", "units": "1.0", - "cell_methods": "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.", @@ -1548,7 +1531,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_nitrate_ambient_aerosol", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "nitrate aod@550nm", "comment": "proposed name: atmosphere_optical_thickness_due_to_nitrate_ambient_aerosol", @@ -1565,7 +1548,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_particulate_organic_matter_ambient_aerosol", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "total organic aerosol aod@550nm", "comment": "", @@ -1582,7 +1565,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_sulfate_ambient_aerosol", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "sulfate aod@550nm", "comment": "proposed name: atmosphere_optical_thickness_due_to_sulfate_ambient_aerosol", @@ -1599,7 +1582,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_particulate_organic_matter_ambient_aerosol", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "soa aod@550nm", "comment": "total organic aerosol AOD due to secondary aerosol formation", @@ -1616,7 +1599,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_seasalt_ambient_aerosol", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "sea salt aod@550nm", "comment": "", @@ -1633,7 +1616,7 @@ "modeling_realm": "aerosol", "standard_name": "atmosphere_optical_thickness_due_to_ambient_aerosol_particles", "units": "1.0", - "cell_methods": "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'", @@ -1650,7 +1633,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_hydroxyl_radical_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "OH volume mixing ratio", "comment": "", @@ -1667,7 +1650,7 @@ "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_peroxyacetyl_nitrate_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "PAN volume mixing ratio", "comment": "", @@ -1680,11 +1663,45 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, + "pfull": { + "modeling_realm": "aerosol", + "standard_name": "air_pressure", + "units": "Pa", + "cell_methods": "area: time: mean", + "cell_measures": "area: areacella", + "long_name": "Air Pressure", + "comment": "Air pressure on model levels", + "dimensions": "longitude latitude alevel time", + "out_name": "pfull", + "type": "float", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, + "phalf": { + "modeling_realm": "aerosol", + "standard_name": "air_pressure", + "units": "Pa", + "cell_methods": "area: time: mean", + "cell_measures": "area: areacella", + "long_name": "air pressure at interfaces", + "comment": "Air pressure on model half-levels", + "dimensions": "longitude latitude alevel time", + "out_name": "phalf", + "type": "float", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, "photo1d": { "modeling_realm": "aerosol", "standard_name": "photolysis_rate_of_ozone_to_1D_oxygen_atom", "units": "s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "photolysis rate of O3 to O1d", "comment": "proposed name: photolysis_rate_of_ozone_to_O1D", @@ -1701,7 +1718,7 @@ "modeling_realm": "aerosol", "standard_name": "pending_CF_name", "units": "mol m-2 s-1", - "cell_methods": "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) )", @@ -1718,7 +1735,7 @@ "modeling_realm": "aerosol", "standard_name": "tropopause_air_pressure", "units": "Pa", - "cell_methods": "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", @@ -1735,7 +1752,7 @@ "modeling_realm": "aerosol", "standard_name": "effective_radius_of_cloud_liquid_water_particle_at_liquid_water_cloud_top", "units": "m", - "cell_methods": "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 seen from", @@ -1752,7 +1769,7 @@ "modeling_realm": "aerosol", "standard_name": "toa_outgoing_longwave_flux", "units": "W m-2", - "cell_methods": "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", @@ -1769,7 +1786,7 @@ "modeling_realm": "aerosol", "standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky", "units": "W m-2", - "cell_methods": "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", @@ -1786,7 +1803,7 @@ "modeling_realm": "aerosol", "standard_name": "toa_outgoing_shortwave_flux", "units": "W m-2", - "cell_methods": "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", @@ -1803,7 +1820,7 @@ "modeling_realm": "aerosol", "standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky", "units": "W m-2", - "cell_methods": "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", @@ -1816,28 +1833,11 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "sic": { - "modeling_realm": "aerosol", - "standard_name": "sea_ice_area_fraction", - "units": "1.0", - "cell_methods": "time: mean", - "cell_measures": "area: areacella", - "long_name": "Sea Ice Area Fraction", - "comment": "fraction of grid cell covered by sea ice.", - "dimensions": "longitude latitude time", - "out_name": "sic", - "type": "float", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "so2": { "modeling_realm": "aerosol", "standard_name": "mole_fraction_of_sulfur_dioxide_in_air", "units": "mol mol-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "SO2 volume mixing ratio", "comment": "", @@ -1854,7 +1854,7 @@ "modeling_realm": "aerosol", "standard_name": "tropopause_air_temperature", "units": "K", - "cell_methods": "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", @@ -1871,7 +1871,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_air_temperature_due_to_longwave_heating", "units": "K s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Longwave heating rate", "comment": "Tendency of air temperature due to longwave radiative heating", @@ -1888,7 +1888,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_air_temperature_due_to_shortwave_heating", "units": "K s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Shortwave heating rate", "comment": "Tendency of air temperature due to shortwave radiative heating", @@ -1905,7 +1905,7 @@ "modeling_realm": "aerosol", "standard_name": "equivalent_thickness_at_stp_of_atmosphere_ozone_content", "units": "m", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Total Ozone Column", "comment": "total ozone column in DU", @@ -1922,7 +1922,7 @@ "modeling_realm": "aerosol", "standard_name": "equivalent_thickness_at_stp_of_atmosphere_ozone_content", "units": "m", - "cell_methods": "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", @@ -1939,7 +1939,7 @@ "modeling_realm": "aerosol", "standard_name": "air_temperature_at_cloud_top", "units": "K", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "air temperature at cloud top", "comment": "", @@ -1956,7 +1956,7 @@ "modeling_realm": "aerosol", "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": "", @@ -1973,7 +1973,7 @@ "modeling_realm": "aerosol", "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": "", @@ -1990,7 +1990,7 @@ "modeling_realm": "aerosol", "standard_name": "upward_air_velocity", "units": "m s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Upward Air Velocity", "comment": "", @@ -2007,7 +2007,7 @@ "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": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "wet deposition rate of black carbon aerosol mass", "comment": "", @@ -2024,7 +2024,7 @@ "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": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "wet deposition rate of dust", "comment": "", @@ -2041,7 +2041,7 @@ "modeling_realm": "aerosol", "standard_name": "tendency_of_atmosphere_mass_content_of_ammonia_due_to_wet_deposition", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "wet deposition rate of nh3", "comment": "", @@ -2058,7 +2058,7 @@ "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": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "wet deposition rate of nh4", "comment": "", @@ -2075,7 +2075,7 @@ "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": "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.", @@ -2092,7 +2092,7 @@ "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": "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.", @@ -2109,7 +2109,7 @@ "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": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "wet deposition rate of so2", "comment": "", @@ -2126,7 +2126,7 @@ "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": "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", @@ -2143,7 +2143,7 @@ "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": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "wet deposition rate of seasalt", "comment": "", @@ -2157,10 +2157,10 @@ "ok_max_mean_abs": "" }, "zg": { - "modeling_realm": "aerosol", + "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": "", @@ -2177,7 +2177,7 @@ "modeling_realm": "aerosol", "standard_name": "tropopause_altitude", "units": "m", - "cell_methods": "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 fbc1d09e..7aa0b9c5 100644 --- a/TestTables/CMIP6_AERmonZ.json +++ b/TestTables/CMIP6_AERmonZ.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table AERmonZ", "realm": "aerosol", "frequency": "mon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "bry": { @@ -67,7 +67,7 @@ }, "h2o": { "modeling_realm": "aerosol", - "standard_name": "mole_fraction_of_water_vapor_in_air", + "standard_name": "mass_fraction_of_water_in_air", "units": "1.0", "cell_methods": "longitude: mean time: mean", "cell_measures": "area: areacella", @@ -277,7 +277,7 @@ "cell_measures": "area: areacella", "long_name": "Northward heat flux due to eddies", "comment": "Zonally averaged meridional heat flux at 100 hPa as monthly means derived from daily (or higher frequency) fields.", - "dimensions": "latitude time", + "dimensions": "latitude time p100", "out_name": "vt100", "type": "float", "positive": "", @@ -287,7 +287,7 @@ "ok_max_mean_abs": "" }, "zg": { - "modeling_realm": "aerosol", + "modeling_realm": "atmos", "standard_name": "geopotential_height", "units": "m", "cell_methods": "longitude: mean time: mean", diff --git a/TestTables/CMIP6_Amon.json b/TestTables/CMIP6_Amon.json index 51ef8de2..e6756a62 100644 --- a/TestTables/CMIP6_Amon.json +++ b/TestTables/CMIP6_Amon.json @@ -1,27 +1,27 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Amon", "realm": "atmos atmosChem", "frequency": "mon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "30.00000", "generic_levels": "alevel alevhalf", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "ccb": { "modeling_realm": "atmos", "standard_name": "air_pressure_at_convective_cloud_base", "units": "Pa", - "cell_methods": "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. ", + "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.", "dimensions": "longitude latitude time", "out_name": "ccb", "type": "real", @@ -35,7 +35,7 @@ "modeling_realm": "atmos", "standard_name": "air_pressure_at_convective_cloud_top", "units": "Pa", - "cell_methods": "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.", @@ -171,7 +171,7 @@ "modeling_realm": "atmos", "standard_name": "convection_time_fraction", "units": "1.0", - "cell_methods": "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.", @@ -220,12 +220,12 @@ }, "clivi": { "modeling_realm": "atmos", - "standard_name": "atmosphere_mass_content_of_cloud_ice", + "standard_name": "atmosphere_cloud_ice_content", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Ice Water Path", - "comment": "calculate 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). This includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.", + "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", "out_name": "clivi", "type": "real", @@ -238,8 +238,8 @@ "clt": { "modeling_realm": "atmos", "standard_name": "cloud_area_fraction", - "units": "1.0", - "cell_methods": "time: mean", + "units": "%", + "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.", @@ -273,7 +273,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_cloud_condensed_water_content", "units": "kg m-2", - "cell_methods": "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.", @@ -358,7 +358,7 @@ "modeling_realm": "atmos", "standard_name": "water_evaporation_flux", "units": "kg m-2 s-1", - "cell_methods": "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)", @@ -375,7 +375,7 @@ "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": "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.", @@ -392,7 +392,7 @@ "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": "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.)", @@ -409,7 +409,7 @@ "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": "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.", @@ -443,7 +443,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upward_latent_heat_flux", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upward Latent Heat Flux", "comment": "", @@ -460,7 +460,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upward_sensible_heat_flux", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upward Sensible Heat Flux", "comment": "", @@ -698,7 +698,7 @@ "modeling_realm": "atmos", "standard_name": "precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Precipitation", "comment": "includes both liquid and solid phases", @@ -715,7 +715,7 @@ "modeling_realm": "atmos", "standard_name": "convective_precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -732,7 +732,7 @@ "modeling_realm": "atmos", "standard_name": "snowfall_flux", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -749,7 +749,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_water_vapor_content", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Water Vapor Path", "comment": "vertically integrated through the atmospheric column", @@ -766,7 +766,7 @@ "modeling_realm": "atmos", "standard_name": "surface_air_pressure", "units": "Pa", - "cell_methods": "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", @@ -783,7 +783,7 @@ "modeling_realm": "atmos", "standard_name": "air_pressure_at_sea_level", "units": "Pa", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Sea Level Pressure", "comment": "Sea Level Pressure", @@ -800,7 +800,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Downwelling Longwave Radiation", "comment": "", @@ -817,7 +817,7 @@ "modeling_realm": "atmos", "standard_name": "surface_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": "Surface Downwelling Clear-Sky Longwave Radiation", "comment": "Surface downwelling clear-sky longwave radiation", @@ -834,7 +834,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upwelling Longwave Radiation", "comment": "", @@ -851,7 +851,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_longwave_flux", "units": "W m-2", - "cell_methods": "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)", @@ -868,7 +868,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "TOA Outgoing Clear-Sky Longwave Radiation", "comment": "", @@ -885,7 +885,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Downwelling Shortwave Radiation", "comment": "surface solar irradiance for UV calculations", @@ -902,7 +902,7 @@ "modeling_realm": "atmos", "standard_name": "surface_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": "Surface Downwelling Clear-Sky Shortwave Radiation", "comment": "surface solar irradiance clear sky for UV calculations", @@ -919,7 +919,7 @@ "modeling_realm": "atmos", "standard_name": "toa_incoming_shortwave_flux", "units": "W m-2", - "cell_methods": "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", @@ -936,7 +936,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upwelling Shortwave Radiation", "comment": "", @@ -953,7 +953,7 @@ "modeling_realm": "atmos", "standard_name": "surface_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": "Surface Upwelling Clear-Sky Shortwave Radiation", "comment": "Surface upwelling clear-sky shortwave radiation", @@ -970,7 +970,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_shortwave_flux", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "TOA Outgoing Shortwave Radiation", "comment": "at the top of the atmosphere", @@ -987,7 +987,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky", "units": "W m-2", - "cell_methods": "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.", @@ -1004,7 +1004,7 @@ "modeling_realm": "atmos", "standard_name": "net_downward_radiative_flux_at_top_of_atmosphere_model", "units": "W m-2", - "cell_methods": "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 +1018,10 @@ "ok_max_mean_abs": "" }, "sbl": { - "modeling_realm": "atmos", + "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_sublimation_flux", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -1038,7 +1038,7 @@ "modeling_realm": "atmos", "standard_name": "shallow_convection_time_fraction", "units": "1.0", - "cell_methods": "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.", @@ -1140,7 +1140,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downward_eastward_stress", "units": "Pa", - "cell_methods": "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", @@ -1157,7 +1157,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downward_northward_stress", "units": "Pa", - "cell_methods": "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", @@ -1174,7 +1174,7 @@ "modeling_realm": "atmos", "standard_name": "surface_temperature", "units": "K", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Temperature", "comment": "Temperature of the lower boundary of the atmosphere", diff --git a/TestTables/CMIP6_Amon_json_hfls b/TestTables/CMIP6_Amon_json_hfls index 9dc47fe6..5f5dc064 100644 --- a/TestTables/CMIP6_Amon_json_hfls +++ b/TestTables/CMIP6_Amon_json_hfls @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.beta.38", + "data_specs_version": "10.10.18", "table_id": "Table Amon", "realm": "atmos atmosChem", "frequency": "mon", "cmor_version": "3.2", "table_date": "15 November 2016", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "30.00000", "generic_levels": "alevel alevhalf", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "axis_entry": { "plevs": { diff --git a/TestTables/CMIP6_CF3hr.json b/TestTables/CMIP6_CF3hr.json index 40bfa7f8..adb73a5b 100644 --- a/TestTables/CMIP6_CF3hr.json +++ b/TestTables/CMIP6_CF3hr.json @@ -1,53 +1,19 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table CF3hr", "realm": "atmos", "frequency": "3hr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "0.125000", "generic_levels": "alevel alevhalf", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { - "cfadDbze94": { - "modeling_realm": "atmos", - "standard_name": "histogram_of_equivalent_reflectivity_factor_over_height_above_reference_ellipsoid", - "units": "1.0", - "cell_methods": "time: point", - "cell_measures": "area: areacella", - "long_name": "CloudSat Radar Reflectivity CFAD", - "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.", - "dimensions": "location alt40 dbze time1", - "out_name": "cfadDbze94", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "cfadLidarsr532": { - "modeling_realm": "atmos", - "standard_name": "histogram_of_backscattering_ratio_over_height_above_reference_ellipsoid", - "units": "1.0", - "cell_methods": "time: point", - "cell_measures": "area: areacella", - "long_name": "CALIPSO Scattering Ratio CFAD", - "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.", - "dimensions": "location alt40 scatratio time1", - "out_name": "cfadLidarsr532", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "clc": { "modeling_realm": "atmos", "standard_name": "convective_cloud_area_fraction_in_atmosphere_layer", @@ -65,57 +31,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "clcalipso": { - "modeling_realm": "atmos", - "standard_name": "cloud_area_fraction_in_atmosphere_layer", - "units": "%", - "cell_methods": "time: point", - "cell_measures": "area: areacella", - "long_name": "CALIPSO Cloud Area Fraction", - "comment": "Percentage cloud cover at CALIPSO standard heights.", - "dimensions": "location alt40 time1", - "out_name": "clcalipso", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "clcalipso2": { - "modeling_realm": "atmos", - "standard_name": "cloud_area_fraction_in_atmosphere_layer", - "units": "%", - "cell_methods": "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", - "dimensions": "location alt40 time1", - "out_name": "clcalipso2", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "clhcalipso": { - "modeling_realm": "atmos", - "standard_name": "cloud_area_fraction_in_atmosphere_layer", - "units": "%", - "cell_methods": "time: point", - "cell_measures": "area: areacella", - "long_name": "CALIPSO High Level Cloud Fraction", - "comment": "Percentage cloud cover in layer centred on 220hPa", - "dimensions": "location time1 p220", - "out_name": "clhcalipso", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "clic": { "modeling_realm": "atmos", "standard_name": "mass_fraction_of_convective_cloud_ice_in_air", @@ -150,40 +65,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "cllcalipso": { - "modeling_realm": "atmos", - "standard_name": "cloud_area_fraction_in_atmosphere_layer", - "units": "%", - "cell_methods": "time: point", - "cell_measures": "area: areacella", - "long_name": "CALIPSO Low Level Cloud Fraction", - "comment": "Percentage cloud cover in layer centred on 840hPa", - "dimensions": "location time1 p840", - "out_name": "cllcalipso", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "clmcalipso": { - "modeling_realm": "atmos", - "standard_name": "cloud_area_fraction_in_atmosphere_layer", - "units": "%", - "cell_methods": "time: point", - "cell_measures": "area: areacella", - "long_name": "CALIPSO Mid Level Cloud Fraction", - "comment": "Percentage cloud cover in layer centred on 560hPa", - "dimensions": "location time1 p560", - "out_name": "clmcalipso", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "cls": { "modeling_realm": "atmos", "standard_name": "stratiform_cloud_area_fraction_in_atmosphere_layer", @@ -204,7 +85,7 @@ "cltc": { "modeling_realm": "atmos", "standard_name": "convective_cloud_area_fraction", - "units": "1.0", + "units": "%", "cell_methods": "time: point", "cell_measures": "area: areacella", "long_name": "Convective Cloud Fraction", @@ -218,23 +99,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "cltcalipso": { - "modeling_realm": "atmos", - "standard_name": "cloud_area_fraction", - "units": "%", - "cell_methods": "time: point", - "cell_measures": "", - "long_name": "CALIPSO Total Cloud Fraction", - "comment": "", - "dimensions": "location time1", - "out_name": "cltcalipso", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "clwc": { "modeling_realm": "atmos", "standard_name": "mass_fraction_of_convective_cloud_liquid_water_in_air", @@ -356,7 +220,7 @@ }, "h2o": { "modeling_realm": "atmos", - "standard_name": "mole_fraction_of_water_vapor_in_air", + "standard_name": "mass_fraction_of_water_in_air", "units": "1.0", "cell_methods": "time: point", "cell_measures": "area: areacella", @@ -371,57 +235,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "latitude": { - "modeling_realm": "atmos", - "standard_name": "latitude", - "units": "degrees_north", - "cell_methods": "time: point", - "cell_measures": "", - "long_name": "Latitude", - "comment": "", - "dimensions": "location time1", - "out_name": "latitude", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "longitude": { - "modeling_realm": "atmos", - "standard_name": "longitude", - "units": "degrees_east", - "cell_methods": "time: point", - "cell_measures": "", - "long_name": "Longitude", - "comment": "", - "dimensions": "location time1", - "out_name": "longitude", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "parasolRefl": { - "modeling_realm": "atmos", - "standard_name": "toa_bidirectional_reflectance", - "units": "1.0", - "cell_methods": "time: point", - "cell_measures": "area: areacella", - "long_name": "PARASOL Reflectance", - "comment": "Simulated reflectance from PARASOL as seen at the top of the atmosphere for 5 solar zenith angles. Valid only over ocean and for one viewing direction (viewing zenith angle of 30 degrees and relative azimuth angle 320 degrees).", - "dimensions": "location sza5 time1", - "out_name": "parasolRefl", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "pfull": { "modeling_realm": "atmos", "standard_name": "air_pressure", @@ -694,23 +507,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "toffset": { - "modeling_realm": "atmos", - "standard_name": "time", - "units": "day", - "cell_methods": "time: point", - "cell_measures": "", - "long_name": "Offset Time", - "comment": "The offset time should be added to the value stored in the time dimension to get the actual time. The actual time is the time (UTC) of the corresponding point in the satellite orbit used to extract the model data.", - "dimensions": "location time1", - "out_name": "toffset", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "zfull": { "modeling_realm": "atmos", "standard_name": "height_above_reference_ellipsoid", diff --git a/TestTables/CMIP6_CFday.json b/TestTables/CMIP6_CFday.json index aec74857..0a463c89 100644 --- a/TestTables/CMIP6_CFday.json +++ b/TestTables/CMIP6_CFday.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table CFday", "realm": "atmos", "frequency": "day", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "1.00000", "generic_levels": "alevel alevhalf", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "albisccp": { @@ -35,10 +35,10 @@ "modeling_realm": "atmos", "standard_name": "air_pressure_at_convective_cloud_base", "units": "Pa", - "cell_methods": "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. ", + "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.", "dimensions": "longitude latitude time", "out_name": "ccb", "type": "real", @@ -52,7 +52,7 @@ "modeling_realm": "atmos", "standard_name": "air_pressure_at_convective_cloud_top", "units": "Pa", - "cell_methods": "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.", @@ -103,7 +103,7 @@ "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 High Level Cloud Fraction", "comment": "Percentage cloud cover in layer centred on 220hPa", @@ -135,7 +135,7 @@ }, "clisccp": { "modeling_realm": "atmos", - "standard_name": "isccp_cloud_area_fraction", + "standard_name": "cloud_area_fraction_in_atmosphere_layer", "units": "%", "cell_methods": "time: mean", "cell_measures": "area: areacella", @@ -152,12 +152,12 @@ }, "clivi": { "modeling_realm": "atmos", - "standard_name": "atmosphere_mass_content_of_cloud_ice", + "standard_name": "atmosphere_cloud_ice_content", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Ice Water Path", - "comment": "calculate 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). This includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.", + "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", "out_name": "clivi", "type": "real", @@ -171,7 +171,7 @@ "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 Low Level Cloud Fraction", "comment": "Percentage cloud cover in layer centred on 840hPa", @@ -188,7 +188,7 @@ "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 Mid Level Cloud Fraction", "comment": "Percentage cloud cover in layer centred on 560hPa", @@ -205,7 +205,7 @@ "modeling_realm": "atmos", "standard_name": "cloud_area_fraction", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "CALIPSO Total Cloud Fraction", "comment": "", @@ -222,7 +222,7 @@ "modeling_realm": "atmos", "standard_name": "cloud_area_fraction", "units": "%", - "cell_methods": "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.", @@ -256,7 +256,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_cloud_condensed_water_content", "units": "kg m-2", - "cell_methods": "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.", @@ -375,7 +375,7 @@ "modeling_realm": "atmos", "standard_name": "surface_air_pressure", "units": "Pa", - "cell_methods": "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", @@ -392,7 +392,7 @@ "modeling_realm": "atmos", "standard_name": "surface_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": "Surface Downwelling Clear-Sky Longwave Radiation", "comment": "Surface downwelling clear-sky longwave radiation", @@ -409,7 +409,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "TOA Outgoing Clear-Sky Longwave Radiation", "comment": "", @@ -426,7 +426,7 @@ "modeling_realm": "atmos", "standard_name": "surface_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": "Surface Downwelling Clear-Sky Shortwave Radiation", "comment": "surface solar irradiance clear sky for UV calculations", @@ -443,7 +443,7 @@ "modeling_realm": "atmos", "standard_name": "toa_incoming_shortwave_flux", "units": "W m-2", - "cell_methods": "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", @@ -460,7 +460,7 @@ "modeling_realm": "atmos", "standard_name": "surface_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": "Surface Upwelling Clear-Sky Shortwave Radiation", "comment": "Surface upwelling clear-sky shortwave radiation", @@ -477,7 +477,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_shortwave_flux", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "TOA Outgoing Shortwave Radiation", "comment": "at the top of the atmosphere", @@ -494,7 +494,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky", "units": "W m-2", - "cell_methods": "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.", @@ -599,7 +599,7 @@ "cell_methods": "time: mean", "cell_measures": "area: areacella", "long_name": "omega (=dp/dt)", - "comment": "Omega (vertical velocity in pressure coordinates, positive downwards) at 500 hPa level; ", + "comment": "Omega (vertical velocity in pressure coordinates, positive downwards) at 500 hPa level;", "dimensions": "longitude latitude time p500", "out_name": "wap500", "type": "real", diff --git a/TestTables/CMIP6_CFmon.json b/TestTables/CMIP6_CFmon.json index b9d6cdc7..275c66d9 100644 --- a/TestTables/CMIP6_CFmon.json +++ b/TestTables/CMIP6_CFmon.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table CFmon", "realm": "atmos", "frequency": "mon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "30.00000", "generic_levels": "alevel alevhalf", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "albisccp": { @@ -118,7 +118,7 @@ }, "clisccp": { "modeling_realm": "atmos", - "standard_name": "isccp_cloud_area_fraction", + "standard_name": "cloud_area_fraction_in_atmosphere_layer", "units": "%", "cell_methods": "time: mean", "cell_measures": "area: areacella", @@ -188,7 +188,7 @@ "modeling_realm": "atmos", "standard_name": "cloud_area_fraction", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "CALIPSO Percentage Total Cloud", "comment": "", @@ -205,7 +205,7 @@ "modeling_realm": "atmos", "standard_name": "cloud_area_fraction", "units": "%", - "cell_methods": "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.", @@ -528,7 +528,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_longwave_flux", "units": "W m-2", - "cell_methods": "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", @@ -545,7 +545,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky", "units": "W m-2", - "cell_methods": "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", @@ -698,7 +698,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_shortwave_flux", "units": "W m-2", - "cell_methods": "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", @@ -715,7 +715,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky", "units": "W m-2", - "cell_methods": "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", diff --git a/TestTables/CMIP6_CFsubhr.json b/TestTables/CMIP6_CFsubhr.json index 10eb1788..95e7f6dc 100644 --- a/TestTables/CMIP6_CFsubhr.json +++ b/TestTables/CMIP6_CFsubhr.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table CFsubhr", "realm": "atmos", "frequency": "subhr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "0.017361", "generic_levels": "alevel alevhalf", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "ccb": { @@ -21,7 +21,7 @@ "cell_methods": "area: point time: point", "cell_measures": "", "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. ", + "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.", "dimensions": "site time1", "out_name": "ccb", "type": "real", @@ -101,12 +101,12 @@ }, "clivi": { "modeling_realm": "atmos", - "standard_name": "atmosphere_mass_content_of_cloud_ice", + "standard_name": "atmosphere_cloud_ice_content", "units": "kg m-2", "cell_methods": "area: point time: point", "cell_measures": "", "long_name": "Ice Water Path", - "comment": "calculate 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). This includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.", + "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": "site time1", "out_name": "clivi", "type": "real", @@ -119,7 +119,7 @@ "clt": { "modeling_realm": "atmos", "standard_name": "cloud_area_fraction", - "units": "1.0", + "units": "%", "cell_methods": "area: point time: point", "cell_measures": "", "long_name": "Total Cloud Fraction", @@ -328,7 +328,7 @@ "cell_measures": "", "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": "site time1", + "dimensions": "site time1 height2m", "out_name": "hurs", "type": "real", "positive": "", @@ -362,7 +362,7 @@ "cell_measures": "", "long_name": "Near-Surface Specific Humidity", "comment": "Near-surface (usually, 2 meter) specific humidity.", - "dimensions": "site time1", + "dimensions": "site time1 height2m", "out_name": "huss", "type": "real", "positive": "", @@ -916,7 +916,7 @@ "ok_max_mean_abs": "" }, "sbl": { - "modeling_realm": "atmos", + "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_sublimation_flux", "units": "kg m-2 s-1", "cell_methods": "area: point time: point", @@ -957,7 +957,7 @@ "cell_measures": "", "long_name": "Near-Surface Wind Speed", "comment": "near-surface (usually, 10 meters) wind speed.", - "dimensions": "site time1", + "dimensions": "site time1 height10m", "out_name": "sfcWind", "type": "real", "positive": "", @@ -991,7 +991,7 @@ "cell_measures": "", "long_name": "Near-Surface Air Temperature", "comment": "near-surface (usually, 2 meter) air temperature", - "dimensions": "site time1", + "dimensions": "site time1 height2m", "out_name": "tas", "type": "real", "positive": "", @@ -1280,7 +1280,7 @@ "cell_measures": "", "long_name": "Eastward Near-Surface Wind", "comment": "Eastward component of the near-surface (usually, 10 meters) wind", - "dimensions": "site time1", + "dimensions": "site time1 height10m", "out_name": "uas", "type": "real", "positive": "", @@ -1314,7 +1314,7 @@ "cell_measures": "", "long_name": "Northward Near-Surface Wind", "comment": "Northward component of the near surface wind", - "dimensions": "site time1", + "dimensions": "site time1 height10m", "out_name": "vas", "type": "real", "positive": "", diff --git a/TestTables/CMIP6_CFsubhrOff.json b/TestTables/CMIP6_CFsubhrOff.json index 5a21e278..39df1b40 100644 --- a/TestTables/CMIP6_CFsubhrOff.json +++ b/TestTables/CMIP6_CFsubhrOff.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table CFsubhrOff", "realm": "atmos", "frequency": "subhr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "cfadDbze94": { @@ -137,7 +137,7 @@ "modeling_realm": "atmos", "standard_name": "cloud_area_fraction", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "CALIPSO Total Cloud Fraction", "comment": "", diff --git a/TestTables/CMIP6_CV.json b/TestTables/CMIP6_CV.json index ee034595..0b0950fd 100644 --- a/TestTables/CMIP6_CV.json +++ b/TestTables/CMIP6_CV.json @@ -3,7 +3,6 @@ "required_global_attributes":[ "Conventions", "activity_id", - "branch_method", "creation_date", "data_specs_version", "experiment", @@ -31,24 +30,25 @@ "table_id", "tracking_id", "variable_id", - "variant_label", "variant_label" ], "version_metadata":{ - "note":"Register source_id CIESM", - "previous_commit":"69adcce7073f55efbb0f2c36c0e3df55451e01ef", "author":"Paul J. Durack ", - "creation_date":"Mon Feb 27 10:36:43 2017 -0800", + "creation_date":"Tue Apr 18 13:42:27 2017 -0700", "institution_id":"PCMDI", - "latest_tag_point":"3.2.1 (46; g190c79e)" + "latest_tag_point":"3.2.2 (228; g6c2998d)", + "note":"Reconfigure source_id format to reflect all model components", + "previous_commit":"800edcbe09f0a9bb907a7c3d63248ca5b2928608" }, "activity_id":[ "AerChemMIP", "C4MIP", "CFMIP", "CMIP", + "CORDEX", "DAMIP", "DCPP", + "DynVarMIP", "FAFMIP", "GMMIP", "GeoMIP", @@ -59,802 +59,733 @@ "OMIP", "PMIP", "RFMIP", + "SIMIP", "ScenarioMIP", + "VIACSAB", "VolMIP" ], "institution_id":{ - "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)", + "AWI":"Alfred Wegener Institute, Helmholtz Centre for Polar and Marine Research, Am Handelshafen 12, 27570 Bremerhaven, Germany", + "BNU":"Beijing Normal University, Beijing 100875, China", + "CAMS":"Chinese Academy of Meteorological Sciences, Beijing 100081, China", + "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)", + "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", + "EC-Earth-Consortium":"KNMI, The Netherlands; SMHI, Sweden; DMI, Denmark; AEMET, Spain; Met Eireann, Ireland; CNR-ISAC, Italy; Instituto de Meteorologia, Portugal; FMI, Finland; BSC, Spain; Centro de Geofisica, University of Lisbon, Portugal; ENEA, Italy; Geomar, Germany; Geophysical Institute, University of Bergen, Norway; ICHEC, Ireland; ICTP, Italy; IMAU, The Netherlands; IRV, Sweden; Lund University, Sweden; Meteorologiska Institutionen, Stockholms University, Sweden; Niels Bohr Institute, University of Copenhagen, Denmark; NTNU, Norway; SARA, The Netherlands; Unite ASTR, Belgium; Universiteit Utrecht, The Netherlands; Universiteit Wageningen, The Netherlands; University College Dublin, Ireland; Vrije Universiteit Amsterdam, the Netherlands; University of Helsinki, Finland; KIT, Karlsruhe, Germany; USC, University of Santiago de Compostela, Spain; Uppsala Universitet, Sweden; NLeSC, Netherlands eScience Center, The Netherlands", + "FIO-RONM":"FIO (First Institute of Oceanography, State Oceanic Administration, Qingdao 266061, China), RONM (Laboratory for Regional Oceanography and Numerical Modeling, Qingdao National Laboratory for Marine Science and Technology, Qingdao 266237, China)", + "INM":"Institute for Numerical Mathematics, Moscow 119991, Russia", + "INPE":"National Institute for Space Research, Cachoeira Paulista, SP 12630-000, Brazil", + "IPSL":"Institut Pierre Simon Laplace, Paris 75252, France", + "LASG-IAP":"Institute of Atmospheric Physics, Chinese Academy of Sciences, Beijing 100029, China", "MESSy-Consortium":"The Modular Earth Submodel System (MESSy) Consortium, represented by the Institute for Physics of the Atmosphere, Deutsches Zentrum fur Luft- und Raumfahrt (DLR), Wessling, Bavaria 82234, Germany", "MIROC":"JAMSTEC (Japan Agency for Marine-Earth Science and Technology, Kanagawa 236-0001, Japan), AORI (Atmosphere and Ocean Research Institute, The University of Tokyo, Chiba 277-8564, Japan), NIES (National Institute for Environmental Studies, Ibaraki 305-8506, Japan), and AICS (RIKEN Advanced Institute for Computational Science, Hyogo 650-0047, Japan)", "MOHC":"Met Office Hadley Centre, Fitzroy Road, Exeter, Devon, EX1 3PB, UK", - "IPSL":"Institut Pierre Simon Laplace, Paris 75252, France", - "EC-Earth-Consortium":"KNMI, The Netherlands; SMHI, Sweden; DMI, Denmark; AEMET, Spain; Met Eireann, Ireland; CNR-ISAC, Italy; Instituto de Meteorologia, Portugal; FMI, Finland; BSC, Spain; Centro de Geofisica, University of Lisbon, Portugal; ENEA, Italy; Geomar, Germany; Geophysical Institute, University of Bergen, Norway; ICHEC, Ireland; ICTP, Italy; IMAU, The Netherlands; IRV, Sweden; Lund University, Sweden; Meteorologiska Institutionen, Stockholms University, Sweden; Niels Bohr Institute, University of Copenhagen, Denmark; NTNU, Norway; SARA, The Netherlands; Unite ASTR, Belgium; Universiteit Utrecht, The Netherlands; Universiteit Wageningen, The Netherlands; University College Dublin, Ireland; Vrije Universiteit Amsterdam, the Netherlands; University of Helsinki, Finland; KIT, Karlsruhe, Germany; USC, University of Santiago de Compostela, Spain; Uppsala Universitet, Sweden; NLeSC, Netherlands eScience Center, The Netherlands", - "CMCC":"Centro Euro-Mediterraneo per i Cambiamenti Climatici, Bologna 40127, Italy", - "CSIRO-BOM":"Commonwealth Scientific and Industrial Research Organisation and Bureau of Meteorology, Melbourne, Victoria 3208, Australia", - "COLA-CFS":"Center for Ocean-Land-Atmosphere Studies, Fairfax, VA 22030, USA", "MPI-M":"Max Planck Institute for Meteorology, Hamburg 20146, Germany", - "AWI":"Alfred Wegener Institute, Helmholtz Centre for Polar and Marine Research, Am Handelshafen 12, 27570 Bremerhaven, Germany", - "NCAR":"National Center for Atmospheric Research, Boulder, CO 80307, USA", - "NIMS-KMA":"National Institute of Meteorological Sciences/Korea Meteorological Administration, Climate Research Division, Seoho-bukro 33, Seogwipo-si, Jejudo 63568, Republic of Korea", - "THU":"Department of Earth System Science, Tsinghua University, Beijing 100084, China", - "CCCR-IITM":"Centre for Climate Change Research, Indian Institute of Tropical Meteorology Pune, Maharashtra 411 008, India", - "BNU":"Beijing Normal University, Beijing 100875, China", - "NOAA-NCEP":"National Oceanic and Atmospheric Administration, National Centers for Environmental Prediction, Camp Springs, MD 20746, USA", - "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)", "MRI":"Meteorological Research Institute, Tsukuba, Ibaraki 305-0052, Japan", "NASA-GISS":"Goddard Institute for Space Studies, New York, NY 10025, USA", - "PCMDI":"Program for Climate Model Diagnosis and Intercomparison, Lawrence Livermore National Laboratory, Livermore, CA 94550, USA", + "NCAR":"National Center for Atmospheric Research, Boulder, CO 80307, 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", "NOAA-GFDL":"National Oceanic and Atmospheric Administration, Geophysical Fluid Dynamics Laboratory, Princeton, NJ 08540, USA", - "LASG-IAP":"Institute of Atmospheric Physics, Chinese Academy of Sciences, Beijing 100029, China", - "INM":"Institute for Numerical Mathematics, Moscow 119991, Russia", - "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", - "NUIST":"Nanjing University of Information Science & Technology, Nanjing, 210044, China", - "FIO-RONM":"FIO (First Institute of Oceanography, State Oceanic Administration, Qingdao 266061, China), RONM (Laboratory for Regional Oceanography and Numerical Modeling, Qingdao National Laboratory for Marine Science and Technology, Qingdao 266237, China)" + "NOAA-NCEP":"National Oceanic and Atmospheric Administration, National Centers for Environmental Prediction, Camp Springs, MD 20746, USA", + "NUIST":"Nanjing University of Information Science and Technology, Nanjing, 210044, China", + "PCMDI":"Program for Climate Model Diagnosis and Intercomparison, Lawrence Livermore National Laboratory, Livermore, CA 94550, USA", + "THU":"Department of Earth System Science, Tsinghua University, Beijing 100084, China" }, "source_id":{ - "HadGEM3-GC31-HM":{ - "label_extended":"HadGEM3-GC3.1-N512ORCA025", - "atmospheric_chemistry":"None", - "atmosphere":"MetUM-HadGEM3-GA7.1 (1024 x 768 N512; 85 levels; top level 85km)", - "ocean_biogeochemistry":"None", - "release_year":"2016", + "ACCESS-1-0":{ + "activity_participation":[ + "CMIP" + ], "cohort":[ - "" + "CMIP5" ], - "sea_ice":"CICE-HadGEM3-GSI8 (ORCA025 tripolar primarily 0.25 deg latitude/longitude)", - "label":"HadGEM3-GC31-HM", "institution_id":[ - "MOHC" + "CSIRO-BOM" ], - "land_surface":"JULES-HadGEM3-GL7.1", - "aerosol":"UKCA-GLOMAP-mode", - "source_id":"HadGEM3-GC31-HM", - "ocean":"NEMO-HadGEM3-GO6.0 (ORCA025 tripolar primarily 0.25 deg latitude/longitude; 75 levels; top grid cell 0-1m)", - "land_ice":"None" + "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" }, - "HadGEM3-GC31-HH":{ - "label_extended":"HadGEM3-GC3.1-N512ORCA12", - "atmospheric_chemistry":"None", - "atmosphere":"MetUM-HadGEM3-GA7.1 (1024 x 768 N512; 85 levels; top level 85km)", - "ocean_biogeochemistry":"None", - "release_year":"2016", - "cohort":[ + "AWI-CM-1-0":{ + "activity_participation":[ "" ], - "sea_ice":"CICE-HadGEM3-GSI8 (ORCA12 tripolar primarily 1/12 deg latitude/longitude)", - "label":"HadGEM3-GC31-HH", - "institution_id":[ - "MOHC" - ], - "land_surface":"JULES-HadGEM3-GL7.1", - "aerosol":"UKCA-GLOMAP-mode", - "source_id":"HadGEM3-GC31-HH", - "ocean":"NEMO-HadGEM3-GO6.0 (ORCA12 tripolar primarily 1/12 deg latitude/longitude; 75 levels; top grid cell 0-1m)", - "land_ice":"None" - }, - "GISS-E2-1G":{ - "label_extended":"GISS-E2.1G", - "atmospheric_chemistry":"varies with physics-version (p==1 Non-interactive, p>1 GPUCCINI)", - "atmosphere":"GISS-E2.1 (90 x 144 2x2.5; 40 levels; top level 0.1hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2016", "cohort":[ - "" + "Registered" ], - "sea_ice":"GISS SI", - "label":"GISS-E2.1G", "institution_id":[ - "NASA-GISS" + "AWI" ], - "land_surface":"GISS LSM", - "aerosol":"varies with physics-version (p==1 None, p==3 OMA, p==4 TOMAS, p==5 MATRIX) ", - "source_id":"GISS-E2-1G", - "ocean":"GISS Ocean (1 deg latitude/longitude; 32 levels; top grid cell 0-10m)", - "land_ice":"Fixed" + "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" }, - "CNRM-CM6-1-HR":{ - "label_extended":"CNRM-CM6-1-HR", - "atmospheric_chemistry":"OZL_v2", - "atmosphere":"Arpege 6.2 (Tl359; 91 levels; top level 78.4 km)", - "ocean_biogeochemistry":"None", - "release_year":"2016", - "cohort":[ + "BNU-ESM-1-1":{ + "activity_participation":[ "" ], - "sea_ice":"Gelato 6.1", - "label":"CNRM-CM6-1-HR", - "institution_id":[ - "CNRM-CERFACS" - ], - "land_surface":"Surfex 8.0c", - "aerosol":"climatological fields computed by TACTIC (v2.0)", - "source_id":"CNRM-CM6-1-HR", - "ocean":"Nemo 3.6 (eORCA025; tripolar primarily 1/4deg latitude/longitude; 75 levels; top grid cell 0-1 m)", - "land_ice":"None" - }, - "UKESM1-0-LL":{ - "label_extended":"UKESM1.0-N96ORCA1", - "atmospheric_chemistry":"UKCA-StratTrop", - "atmosphere":"MetUM-HadGEM3-GA7.1 (192 x 144 N96; 85 levels; top level 85km)", - "ocean_biogeochemistry":"MEDUSA2", - "release_year":"2017", "cohort":[ - "" + "Registered" ], - "sea_ice":"CICE-HadGEM3-GSI8 (ORCA1 tripolar primarily 1 deg latitude/longitude)", - "label":"UKESM1.0-LL", "institution_id":[ - "MOHC", - "NERC" + "BNU" ], - "land_surface":"JULES-HadGEM3-GL7.1", - "aerosol":"UKCA-GLOMAP-mode", - "source_id":"UKESM1-0-LL", - "ocean":"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)", - "land_ice":"BISICLES (only active in ISMIP experiments)" + "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" }, - "GISS-E2-1H":{ - "label_extended":"GISS-E2.1H", - "atmospheric_chemistry":"varies with physics-version (p==1 Non-interactive, p>1 GPUCCINI)", - "atmosphere":"GISS-E2.1 (90 x 144 2x2.5; 40 levels; top level 0.1hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2016", + "CAMS_CSM1-0":{ + "activity_participation":[ + "CMIP" + ], "cohort":[ - "" + "Registered" ], - "sea_ice":"GISS SI", - "label":"GISS-E2.1H", "institution_id":[ - "NASA-GISS" + "CAMS" ], - "land_surface":"GISS LSM", - "aerosol":"varies with physics-version (p==1 None, p==3 OMA, p==4 TOMAS, p==5 MATRIX) ", - "source_id":"GISS-E2-1H", - "ocean":"HYCOM Ocean (tripolar grid; ~1 deg latitude/longitude; 26 levels; top grid cell 0-10m)", - "land_ice":"Fixed" + "source_id":"CAMS_CSM1-0", + "source":"CAMS_CSM 1.0 (2016): \naerosol: none\natmos: ECHAM5_CAMS (T106; 320 x 160 longitude/latitude; 31 levels; top level 10 mb)\natmosChem: none\nland: CoLM 1.0\nlandIce: none\nocean: MOM4 (tripolar; 360 x 200 longitude/latitude, primarily 1deg latitude/longitude, down to 1/3deg within 30deg of the equatorial tropics; 50 levels; top grid cell 0-10 m)\nocnBgchem: none\nseaIce: SIS 1.0" }, - "HadGEM3-GC31-LL":{ - "label_extended":"HadGEM3-GC3.1-N96ORCA1", - "atmospheric_chemistry":"None", - "atmosphere":"MetUM-HadGEM3-GA7.1 (192 x 144 N96; 85 levels; top level 85km)", - "ocean_biogeochemistry":"None", - "release_year":"2016", - "cohort":[ + "CIESM":{ + "activity_participation":[ "" ], - "sea_ice":"CICE-HadGEM3-GSI8 (ORCA1 tripolar primarily 1 deg latitude/longitude)", - "label":"HadGEM3-GC31-LL", - "institution_id":[ - "MOHC" - ], - "land_surface":"JULES-HadGEM3-GL7.1", - "aerosol":"UKCA-GLOMAP-mode", - "source_id":"HadGEM3-GC31-LL", - "ocean":"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)", - "land_ice":"None" - }, - "EC-Earth3-Veg":{ - "label_extended":"EC-Earth 3.3 - LPJ-GUESS", - "atmospheric_chemistry":"None", - "atmosphere":"IFS cy36r4 (TL255, linearly reduced Gaussian grid equivalent to 512 x 256, 91 levels, top level: 0.01 hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2017", "cohort":[ - "" + "Registered" ], - "sea_ice":"LIM3", - "label":"EC-Earth3-Veg", "institution_id":[ - "EC-Earth-Consortium" + "THU" ], - "land_surface":"LPJ-GUESS v4", - "aerosol":"None", - "source_id":"EC-Earth3-Veg", - "ocean":"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)", - "land_ice":"None" + "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" }, - "ACCESS-1-0":{ - "label_extended":"ACCESS 1.0 (This entry is free text for users to contribute verbose information)", - "atmospheric_chemistry":"None", - "atmosphere":"HadGAM2 (r1.1; 192 x 145 N96; 38 levels; top level 39255m)", - "ocean_biogeochemistry":"None", - "release_year":"2011", + "CNRM-CM6-1":{ + "activity_participation":[ + "" + ], "cohort":[ - "CMIP5" + "Registered" ], - "sea_ice":"CICE4.1", - "label":"ACCESS 1.0", "institution_id":[ - "CSIRO-BOM" + "CNRM-CERFACS" ], - "land_surface":"MOSES2.2", - "aerosol":"CLASSIC (v1.0)", - "source_id":"ACCESS-1-0", - "ocean":"ACCESS-OM (MOM4p1; tripolar primarily 1deg latitude/longitude; 50 levels; top grid cell 0-10m)", - "land_ice":"None" + "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" }, - "NorESM2-HH":{ - "label_extended":"NorESM2-HH (high atmosphere-high ocean resolution, GHG concentration driven)", - "atmospheric_chemistry":"OsloChemSimp", - "atmosphere":"CAM-OSLO (0.25 degree resolution; 1152 x 768; 32 levels; top level 3 mb)", - "ocean_biogeochemistry":"HAMOCC", - "release_year":"2018", - "cohort":[ + "CNRM-CM6-1-HR":{ + "activity_participation":[ "" ], - "sea_ice":"CICE", - "label":"NorESM2-HH", - "institution_id":[ - "NCC" - ], - "land_surface":"CLM", - "aerosol":"OsloAero", - "source_id":"NorESM2-HH", - "ocean":"MICOM (0.25 degree resolution; 1440 x 1152; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])", - "land_ice":"CISM" - }, - "MRI-ESM2-0":{ - "label_extended":"MRI-ESM2.0", - "atmospheric_chemistry":"MRI-CCM2.1", - "atmosphere":"MRI-AGCM3.5 (320 x 160 TL159; 80 levels; top level 0.01 hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2017", "cohort":[ - "" + "Registered" ], - "sea_ice":"MRI.COM4.2", - "label":"MRI-ESM2.0", "institution_id":[ - "MRI" + "CNRM-CERFACS" ], - "land_surface":"HAL 1.0", - "aerosol":"MASINGAR mk2r4", - "source_id":"MRI-ESM2-0", - "ocean":"MRI.COM4.2 (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; 61 levels; top grid cell 0-2 m)", - "land_ice":"None" + "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" }, - "MPIESM-1-2-HR":{ - "label_extended":"dynamic vegetation and nitrogen cycle switched off", - "atmospheric_chemistry":"None", - "atmosphere":"ECHAM6.3 (spectral T127; 384 x 192 longitude/latitude; 95 levels; top level 0.01 hPa)", - "ocean_biogeochemistry":"HAMOCC", - "release_year":"2017", - "cohort":[ + "CNRM-ESM2-1":{ + "activity_participation":[ "" ], - "sea_ice":"thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model", - "label":"MPIESM1.2-HR", + "cohort":[ + "Registered" + ], "institution_id":[ - "MPI-M" + "CNRM-CERFACS" ], - "land_surface":"JSBACH3.2", - "aerosol":"None, prescribed MACv2-SP", - "source_id":"MPIESM-1-2-HR", - "ocean":"MPIOM1.63 (tripolar TP04; approximately 0.4deg latitude/longitude; 40 levels; top grid cell 0-12 m)", - "land_ice":"None/prescribed" + "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" }, - "NorESM2-LM":{ - "label_extended":"NorESM2-LM (low atmosphere-medium ocean resolution, GHG concentration driven)", - "atmospheric_chemistry":"OsloChemSimp", - "atmosphere":"CAM-OSLO (2 degree resolution; 144 x 96; 32 levels; top level 3 mb)", - "ocean_biogeochemistry":"HAMOCC", - "release_year":"2017", - "cohort":[ + "CNRM-ESM2-1-HR":{ + "activity_participation":[ "" ], - "sea_ice":"CICE", - "label":"NorESM2-LM", + "cohort":[ + "Registered" + ], "institution_id":[ - "NCC" + "CNRM-CERFACS" ], - "land_surface":"CLM", - "aerosol":"OsloAero", - "source_id":"NorESM2-LM", - "ocean":"MICOM (1 degree resolution; 360 x 384; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])", - "land_ice":"CISM" + "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" }, - "CIESM":{ - "label_extended":"Community Integrated Earth System Model", - "atmospheric_chemistry":"trop_mam4", - "atmosphere":"CIESM-AM (FV/FD, 288 x 192; 30 levels; top level 2.255 hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2017", - "cohort":[ + "EC-Earth3":{ + "activity_participation":[ "" ], - "sea_ice":"CICE4", - "label":"CIESM", + "cohort":[ + "Registered" + ], "institution_id":[ - "THU" + "EC-Earth-Consortium" ], - "land_surface":"CIESM-LM (modified CLM4.5)", - "aerosol":"MAM4", - "source_id":"CIESM", - "ocean":"CIESM-OM (FD, SCCGrid Displaced Pole, 720x560; 46 levels; top grid cell 0-6 m)", - "land_ice":"None" + "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" }, "EC-Earth3-AerChem":{ - "label_extended":"EC-Earth 3.3 - AerChem (with atmospheric aerosol and chemistry)", - "atmospheric_chemistry":"TM5 (3 deg. (long.) x 2 deg. (lat.), 34 levels, top level: 0.1 hPa", - "atmosphere":"IFS cy36r4 (TL255, linearly reduced Gaussian grid equivalent to 512 x 256, 91 levels, top level: 0.01 hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2017", - "cohort":[ + "activity_participation":[ "" ], - "sea_ice":"LIM3", - "label":"EC-Earth3-AerChem", + "cohort":[ + "Registered" + ], "institution_id":[ "EC-Earth-Consortium" ], - "land_surface":"HTESSEL (land surface scheme built in IFS)", - "aerosol":"TM5", "source_id":"EC-Earth3-AerChem", - "ocean":"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)", - "land_ice":"None" + "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" }, - "EC-Earth3-HR":{ - "label_extended":"EC-Earth 3.3 at high resolution", - "atmospheric_chemistry":"None", - "atmosphere":"IFS cy36r4 (TL511, linearly reduced Gaussian grid equivalent to 1024 x 512; 91 levels; top level 0.01 hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2017", - "cohort":[ + "EC-Earth3-CC":{ + "activity_participation":[ "" ], - "sea_ice":"LIM3", - "label":"EC-Earth3-HR", + "cohort":[ + "Registered" + ], "institution_id":[ "EC-Earth-Consortium" ], - "land_surface":"HTESSEL (land surface scheme built in IFS)", - "aerosol":"None", - "source_id":"EC-Earth3-HR", - "ocean":"NEMO3.6 (tripolar, 1442x1921; 75 levels; top grid cell 5m)", - "land_ice":"None" + "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" }, "EC-Earth3-GrIS":{ - "label_extended":"EC-Earth 3.3 Coupled with PISM for Greenland ice sheet", - "atmospheric_chemistry":"None", - "atmosphere":"IFS cy36r4 (TL255, linearly reduced Gaussian grid equivalent to 512 x 256, 91 levels, top level: 0.01 hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2017", - "cohort":[ + "activity_participation":[ "" ], - "sea_ice":"LIM3", - "label":"EC-Earth3-GrIS", + "cohort":[ + "Registered" + ], "institution_id":[ "EC-Earth-Consortium" ], - "land_surface":"HTESSEL (land surface scheme built in IFS)", - "aerosol":"None", "source_id":"EC-Earth3-GrIS", - "ocean":"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)", - "land_ice":"PISM 0.7 (5 km x 5 km, L442)" + "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" }, - "EC-Earth3-LR":{ - "label_extended":"EC-Earth 3.3 at low resolution", - "atmospheric_chemistry":"None", - "atmosphere":"IFS cy36r4 (TL159, linearly reduced Gaussian grid equivalent to 320 x 160; 62 levels; top level 5 hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2017", - "cohort":[ + "EC-Earth3-HR":{ + "activity_participation":[ "" ], - "sea_ice":"LIM3", - "label":"EC-Earth3-LR", + "cohort":[ + "Registered" + ], "institution_id":[ "EC-Earth-Consortium" ], - "land_surface":"HTESSEL (land surface scheme built in IFS)", - "aerosol":"None", - "source_id":"EC-Earth3-LR", - "ocean":"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)", - "land_ice":"None" + "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" }, - "MPIESM-1-2-LR":{ - "label_extended":"MPIESM1.2-LR", - "atmospheric_chemistry":"None", - "atmosphere":"ECHAM6.3 (spectral T63; 192 x 96 longitude/latitude; 47 levels; top level 0.01 hPa)", - "ocean_biogeochemistry":"HAMOCC", - "release_year":"2017", - "cohort":[ + "EC-Earth3-LR":{ + "activity_participation":[ "" ], - "sea_ice":"thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model", - "label":"MPIESM1.2-LR", + "cohort":[ + "Registered" + ], "institution_id":[ - "MPI-M" + "EC-Earth-Consortium" ], - "land_surface":"JSBACH3.2", - "aerosol":"None, prescribed MACv2-SP", - "source_id":"MPIESM-1-2-LR", - "ocean":"MPIOM1.63 (bipolar GR1.5; approximately 1.5deg latitude/longitude; 40 levels; top grid cell 0-12 m)", - "land_ice":"None/prescribed" + "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" }, - "AWI-CM-1-0":{ - "label_extended":"AWI-CM 1.0", - "atmospheric_chemistry":"None", - "atmosphere":"ECHAM6.3.02p4 (384 x 192 T127L95; 95 levels; top level 80000 m)", - "ocean_biogeochemistry":"None", - "release_year":"2017", - "cohort":[ + "EC-Earth3-Veg":{ + "activity_participation":[ "" ], - "sea_ice":"FESOM 1.4", - "label":"AWI-CM 1.0", + "cohort":[ + "Registered" + ], "institution_id":[ - "AWI" + "EC-Earth-Consortium" ], - "land_surface":"JSBACH 3.10", - "aerosol":"None", - "source_id":"AWI-CM-1-0", - "ocean":"FESOM 1.4 (unstructured grid in the horizontal with 830305 wet nodes; 46 levels; top grid cell 0-5 m)", - "land_ice":"None" + "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" }, - "CNRM-ESM2-1":{ - "label_extended":"CNRM-ESM2-1", - "atmospheric_chemistry":"REPROBUS-C (v2.0)", - "atmosphere":"Arpege 6.2 (Tl127; 91 levels; top level 78.4 km)", - "ocean_biogeochemistry":"Pisces 2.s", - "release_year":"2016", - "cohort":[ + "EC-Earth3-Veg-LR":{ + "activity_participation":[ "" ], - "sea_ice":"Gelato 6.1", - "label":"CNRM-ESM2-1", + "cohort":[ + "Registered" + ], "institution_id":[ - "CNRM-CERFACS" + "EC-Earth-Consortium" ], - "land_surface":"Surfex 8.0c", - "aerosol":"TACTIC (v2.0)", - "source_id":"CNRM-ESM2-1", - "ocean":"Nemo 3.6 (eORCA1; tripolar primarily 1deg latitude/longitude; 75 levels; top grid cell 0-1 m)", - "land_ice":"None" + "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" }, - "CNRM-CM6-1":{ - "label_extended":"CNRM-CM6-1", - "atmospheric_chemistry":"OZL_v2", - "atmosphere":"Arpege 6.2 (Tl127; 91 levels; top level 78.4 km)", - "ocean_biogeochemistry":"None", - "release_year":"2016", - "cohort":[ + "EMAC-2-53-AerChem":{ + "activity_participation":[ "" ], - "sea_ice":"Gelato 6.1", - "label":"CNRM-CM6-1", + "cohort":[ + "Registered" + ], "institution_id":[ - "CNRM-CERFACS" + "MESSy-Consortium" ], - "land_surface":"Surfex 8.0c", - "aerosol":"climatological fields computed by TACTIC (v2.0)", - "source_id":"CNRM-CM6-1", - "ocean":"Nemo 3.6 (eORCA1; tripolar primarily 1deg latitude/longitude; 75 levels; top grid cell 0-1 m)", - "land_ice":"None (except for some FAFMIP experiments)" + "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" }, - "MPIESM-2-LR":{ - "label_extended":"MPIESM2", - "atmospheric_chemistry":"None", - "atmosphere":"ICON-AES (icosahedral/triangles; 160 km; 47 levels; top level 80 km)", - "ocean_biogeochemistry":"HAMOCC", - "release_year":"2017", - "cohort":[ + "EMAC-2-53-Vol":{ + "activity_participation":[ "" ], - "sea_ice":"thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model", - "label":"MPIESM2", + "cohort":[ + "Registered" + ], "institution_id":[ - "MPI-M" + "MESSy-Consortium" ], - "land_surface":"JSBACH4.2", - "aerosol":"None, prescribed MACv2-SP", - "source_id":"MPIESM-2-LR", - "ocean":"ICON-OES (icosahedral/triangles; 40 km; 40 levels; top grid cell 0-12 m)", - "land_ice":"None/prescribed" + "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" }, - "BNU-ESM-1-1":{ - "label_extended":"BNU-ESM 1.1", - "atmospheric_chemistry":"None", - "atmosphere":"CAM4 (FV, 144 x 96; 26 levels; top level 2.194 mb)", - "ocean_biogeochemistry":"Dynamic ecosystem-carbon model version 1", - "release_year":"2016", + "GFDL-AM4":{ + "activity_participation":[ + "CMIP" + ], "cohort":[ - "" + "Registered" ], - "sea_ice":"CICE4.1", - "label":"BNU-ESM 1.1", "institution_id":[ - "BNU" + "NOAA-GFDL" ], - "land_surface":"CoLM version 2014 with carbon-nitrogen interactions", - "aerosol":"CAM-chem; semi-interactive", - "source_id":"BNU-ESM-1-1", - "ocean":"MOM4p1 (tripolar, 360x200, primarily 1deg latitude/longitude, down to 1/3deg within 30deg of the equatorial tropics; 50 levels; top grid cell 0-10m)", - "land_ice":"None" + "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" }, - "PCMDI-test-1-0":{ - "label_extended":"PCMDI-test 1.0 (This entry is free text for users to contribute verbose information)", - "atmospheric_chemistry":"None", - "atmosphere":"Earth1.0-gettingHotter (360x180; 50 levels; top level 0.1 mb)", - "ocean_biogeochemistry":"None", - "release_year":"1989", + "GFDL-CM4":{ + "activity_participation":[ + "CMIP", + "OMIP" + ], "cohort":[ - "CMIP6" + "Registered" ], - "sea_ice":"Declining1.0-warming", - "label":"PCMDI-test 1.0", "institution_id":[ - "PCMDI" + "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" + }, + "GFDL-ESM4":{ + "activity_participation":[ + "AerChemMIP", + "C4MIP", + "CFMIP", + "CMIP", + "DAMIP", + "DynVarMIP", + "GMMIP", + "LUMIP", + "OMIP", + "RFMIP", + "ScenarioMIP" ], - "land_surface":"Earth1.0", - "aerosol":"None", - "source_id":"PCMDI-test-1-0", - "ocean":"BlueMarble1.0-warming (360x180; 50 levels; top grid cell 0-10m)", - "land_ice":"None" - }, - "HadGEM3-GC31-MM":{ - "label_extended":"HadGEM3-GC3.1-N216ORCA025", - "atmospheric_chemistry":"None", - "atmosphere":"MetUM-HadGEM3-GA7.1 (432 x 324 N216; 85 levels; top level 85km)", - "ocean_biogeochemistry":"None", - "release_year":"2016", "cohort":[ - "" + "Registered" ], - "sea_ice":"CICE-HadGEM3-GSI8 (ORCA025 tripolar primarily 0.25 deg latitude/longitude)", - "label":"HadGEM3-GC31-MM", "institution_id":[ - "MOHC" + "NOAA-GFDL" ], - "land_surface":"JULES-HadGEM3-GL7.1", - "aerosol":"UKCA-GLOMAP-mode", - "source_id":"HadGEM3-GC31-MM", - "ocean":"NEMO-HadGEM3-GO6.0 (ORCA025 tripolar primarily 0.25 deg latitude/longitude; 75 levels; top grid cell 0-1m)", - "land_ice":"None" + "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" }, - "NorESM2-LMEC":{ - "label_extended":"NorESM2-LMEC (low atmosphere-medium ocean resolution, GHG emission driven, complex atmospheric chemistry)", - "atmospheric_chemistry":"OsloChemComp", - "atmosphere":"CAM-OSLO (2 degree resolution; 144 x 96; 32 levels; top level 3 mb)", - "ocean_biogeochemistry":"HAMOCC", - "release_year":"2017", - "cohort":[ + "GISS-E2-1G":{ + "activity_participation":[ "" ], - "sea_ice":"CICE", - "label":"NorESM2-LMEC", + "cohort":[ + "Registered" + ], "institution_id":[ - "NCC" + "NASA-GISS" ], - "land_surface":"CLM", - "aerosol":"OsloAero", - "source_id":"NorESM2-LMEC", - "ocean":"MICOM (1 degree resolution; 360 x 384; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])", - "land_ice":"CISM" + "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" }, - "NorESM2-MH":{ - "label_extended":"NorESM2-MH", - "atmospheric_chemistry":"OsloChemSimp", - "atmosphere":"CAM-OSLO (1 degree resolution; 288 x 192; 32 levels; top level 3 mb)", - "ocean_biogeochemistry":"HAMOCC", - "release_year":"2017", - "cohort":[ + "GISS-E2-1H":{ + "activity_participation":[ "" ], - "sea_ice":"CICE", - "label":"NorESM2-MH", + "cohort":[ + "Registered" + ], "institution_id":[ - "NCC" + "NASA-GISS" ], - "land_surface":"CLM", - "aerosol":"OsloAero", - "source_id":"NorESM2-MH", - "ocean":"MICOM (0.25 degree resolution; 1440 x 1152; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])", - "land_ice":"CISM" + "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" }, - "NorESM2-MM":{ - "label_extended":"NorESM2-MM (medium atmosphere-medium ocean resolution, GHG concentration driven)", - "atmospheric_chemistry":"OsloChemSimp", - "atmosphere":"CAM-OSLO (1 degree resolution; 288 x 192; 32 levels; top level 3 mb)", - "ocean_biogeochemistry":"HAMOCC", - "release_year":"2017", - "cohort":[ + "HadGEM3-GC31-HH":{ + "activity_participation":[ "" ], - "sea_ice":"CICE", - "label":"NorESM2-MM", + "cohort":[ + "Registered" + ], "institution_id":[ - "NCC" + "MOHC" ], - "land_surface":"CLM", - "aerosol":"OsloAero", - "source_id":"NorESM2-MM", - "ocean":"MICOM (1 degree resolution; 360 x 384; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])", - "land_ice":"CISM" + "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)" }, - "EC-Earth3-Veg-LR":{ - "label_extended":"EC-Earth 3.3 - LPJ-GUESS at low resolution", - "atmospheric_chemistry":"None", - "atmosphere":"IFS cy36r4 (TL159, linearly reduced Gaussian grid equivalent to 320 x 160; 62 levels; top level 5 hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2017", - "cohort":[ + "HadGEM3-GC31-HM":{ + "activity_participation":[ "" ], - "sea_ice":"LIM3", - "label":"EC-Earth3-Veg-LR", + "cohort":[ + "Registered" + ], "institution_id":[ - "EC-Earth-Consortium" + "MOHC" ], - "land_surface":"LPJ-GUESS v4", - "aerosol":"None", - "source_id":"EC-Earth3-Veg-LR", - "ocean":"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)", - "land_ice":"None" + "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)" }, - "VRESM-1-0":{ - "label_extended":"VRESM 1.0 (Variable-resolution Earth System Model 1.0)", - "atmospheric_chemistry":"None", - "atmosphere":"VCAM-1.0 (192 x 192 x 6 C192; 35 levels; top level 35km)", - "ocean_biogeochemistry":"PISCES v3.4socco", - "release_year":"2016", + "HadGEM3-GC31-LL":{ + "activity_participation":[ + "" + ], "cohort":[ + "Registered" + ], + "institution_id":[ + "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)" + }, + "HadGEM3-GC31-MM":{ + "activity_participation":[ "" ], - "sea_ice":"CSIR-ICE (visco-plastic)", - "label":"VRESM 1.0", + "cohort":[ + "Registered" + ], "institution_id":[ - "CSIR-CSIRO" + "MOHC" ], - "land_surface":"CABLE v2.2.3", - "aerosol":"Rotstayn-1.0", - "source_id":"VRESM-1-0", - "ocean":"VCOM-1.0 (192 x 192 x 6 C192; 35 levels; top grid cell 0-10m)", - "land_ice":"None" + "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)" }, - "EC-Earth3":{ - "label_extended":"EC-Earth 3.3", - "atmospheric_chemistry":"None", - "atmosphere":"IFS cy36r4 (TL255, linearly reduced Gaussian grid equivalent to 512 x 256, 91 levels, top level: 0,01 hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2017", + "IITM-ESM":{ + "activity_participation":[ + "" + ], "cohort":[ + "Registered" + ], + "institution_id":[ + "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" + }, + "MIROC-ES2H":{ + "activity_participation":[ "" ], - "sea_ice":"LIM3", - "label":"EC-Earth3", + "cohort":[ + "Registered" + ], "institution_id":[ - "EC-Earth-Consortium" + "MIROC" ], - "land_surface":"HTESSEL (land surface scheme built in IFS)", - "aerosol":"None", - "source_id":"EC-Earth3", - "ocean":"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)", - "land_ice":"None" + "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" }, - "EC-Earth3-CC":{ - "label_extended":"EC-Earth 3.3 - CC (with carbon cycle)", - "atmospheric_chemistry":"TM5 (3 deg. (long.) x 2 deg. (lat.), 34 levels, top level: 0.1 hPa", - "atmosphere":"IFS cy36r4 (TL255, linearly reduced Gaussian grid equivalent to 512 x 256, 91 levels, top level: 0.01 hPa)", - "ocean_biogeochemistry":"PISCES v2", - "release_year":"2017", + "MIROC-ES2L":{ + "activity_participation":[ + "" + ], "cohort":[ + "Registered" + ], + "institution_id":[ + "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" + }, + "MIROC6":{ + "activity_participation":[ "" ], - "sea_ice":"LIM3", - "label":"EC-Earth3-CC", + "cohort":[ + "Registered" + ], "institution_id":[ - "EC-Earth-Consortium" + "MIROC" ], - "land_surface":"LPJ-GUESS v4", - "aerosol":"None", - "source_id":"EC-Earth3-CC", - "ocean":"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)", - "land_ice":"None" + "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" }, - "CNRM-ESM2-1-HR":{ - "label_extended":"CNRM-ESM2-1-HR", - "atmospheric_chemistry":"OZL_v2", - "atmosphere":"Arpege 6.2 (Tl359; 91 levels; top level 78.4 km)", - "ocean_biogeochemistry":"Pisces 2.s", - "release_year":"2016", + "MPIESM-1-2-HR":{ + "activity_participation":[ + "" + ], "cohort":[ + "Registered" + ], + "institution_id":[ + "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" + }, + "MPIESM-1-2-LR":{ + "activity_participation":[ "" ], - "sea_ice":"Gelato 6.1", - "label":"CNRM-ESM2-1-HR", + "cohort":[ + "Registered" + ], "institution_id":[ - "CNRM-CERFACS" + "MPI-M" ], - "land_surface":"Surfex 8.0c", - "aerosol":"TACTIC (v2.0)", - "source_id":"CNRM-ESM2-1-HR", - "ocean":"Nemo 3.6 (eORCA025; tripolar primarily 1/4deg latitude/longitude; 75 levels; top grid cell 0-1 m)", - "land_ice":"None" + "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" }, - "UKESM1-0-MMh":{ - "label_extended":"UKESM1.0-N216ORCA025hybrid", - "atmospheric_chemistry":"UKCA-StratTrop (horizontal resolution degraded relative to that used for atmosphere physics)", - "atmosphere":"MetUM-HadGEM3-GA7.1 (432 x 324 N216; 85 levels; top level 85km)", - "ocean_biogeochemistry":"MEDUSA2 (horizontal resolution degraded relative to that used for ocean physics)", - "release_year":"2018", + "MPIESM-2-LR":{ + "activity_participation":[ + "" + ], "cohort":[ + "Registered" + ], + "institution_id":[ + "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" + }, + "MRI-ESM2-0":{ + "activity_participation":[ "" ], - "sea_ice":"CICE-HadGEM3-GSI8 (ORCA025 tripolar primarily 0.25 deg latitude/longitude)", - "label":"UKESM1.0-MMh", + "cohort":[ + "Registered" + ], "institution_id":[ - "MOHC", - "NERC" + "MRI" ], - "land_surface":"JULES-HadGEM3-GL7.1", - "aerosol":"UKCA-GLOMAP-mode (horizontal resolution degraded relative to that used for atmosphere physics)", - "source_id":"UKESM1-0-MMh", - "ocean":"NEMO-HadGEM3-GO6.0 (ORCA025 tripolar primarily 0.25 deg latitude/longitude; 75 levels; top grid cell 0-1m)", - "land_ice":"BISICLES (only active in ISMIP experiments)" + "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" }, - "IITM-ESM":{ - "label_extended":"IITM-ESM", - "atmospheric_chemistry":"None", - "atmosphere":"GFS (192 x 94 T62; 64 levels; top level 0.2 mb)", - "ocean_biogeochemistry":"TOPAZ", - "release_year":"2015", + "NICAM16-7S":{ + "activity_participation":[ + "" + ], "cohort":[ + "Registered" + ], + "institution_id":[ + "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" + }, + "NICAM16-8S":{ + "activity_participation":[ "" ], - "sea_ice":"SIS", - "label":"IITM-ESM", + "cohort":[ + "Registered" + ], "institution_id":[ - "CCCR-IITM" + "MIROC" ], - "land_surface":"NOAH LSM", - "aerosol":"unnamed (prescribed MAC-v2)", - "source_id":"IITM-ESM", - "ocean":"MOM4p1 (tripolar, 360x200; 50 levels; top grid cell 5m)", - "land_ice":"None" + "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" }, - "EMAC-2-53-AerChem":{ - "label_extended":"EMAC-2-53-x-AerChem", - "atmospheric_chemistry":"MECCA 3.8.x", - "atmosphere":"ECHAM5.3.02 (modified; spectral T42; 128 x 64 longitude/latitude; 90 levels; top level 0.001 hPa)", - "ocean_biogeochemistry":"None", - "release_year":"2017", + "NICAM16-9D-L78":{ + "activity_participation":[ + "" + ], "cohort":[ + "Registered" + ], + "institution_id":[ + "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" + }, + "NICAM16-9S":{ + "activity_participation":[ "" ], - "sea_ice":"thermodynamic (Semtner zero-layer) dynamic (Hibler 79) sea ice model", - "label":"EMAC-2-53-AerChem", + "cohort":[ + "Registered" + ], "institution_id":[ - "MESSy-Consortium" + "MIROC" ], - "land_surface":"same as Atmosphere", - "aerosol":"gmxe 2.2.x", - "source_id":"EMAC-2-53-AerChem", - "ocean":"MPIOM 1.3.0-beta (bipolar GR1.5; approximately 1.5deg latitude/longitude; 40 levels; top grid cell 0-12 m)", - "land_ice":"None" + "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" + }, + "NorESM2-HH":{ + "activity_participation":[ + "HighResMIP" + ], + "cohort":[ + "Registered" + ], + "institution_id":[ + "NCC" + ], + "source_id":"NorESM2-HH", + "source":"NorESM2-HH (2018): \naerosol: OsloAero\natmos: CAM-OSLO (0.25 degree resolution; 1152 x 768; 32 levels; top level 3 mb)\natmosChem: OsloChemSimp\nland: CLM\nlandIce: CISM\nocean: MICOM (0.25 degree resolution; 1440 x 1152; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])\nocnBgchem: HAMOCC\nseaIce: CICE" + }, + "NorESM2-LM":{ + "activity_participation":[ + "AerChemMIP", + "CFMIP", + "CMIP", + "DAMIP", + "DCPP", + "LUMIP", + "OMIP", + "PMIP", + "RFMIP", + "ScenarioMIP", + "VolMIP" + ], + "cohort":[ + "Registered" + ], + "institution_id":[ + "NCC" + ], + "source_id":"NorESM2-LM", + "source":"NorESM2-LM (2017): \naerosol: OsloAero\natmos: CAM-OSLO (2 degree resolution; 144 x 96; 32 levels; top level 3 mb)\natmosChem: OsloChemSimp\nland: CLM\nlandIce: CISM\nocean: MICOM (1 degree resolution; 360 x 384; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])\nocnBgchem: HAMOCC\nseaIce: CICE" }, "NorESM2-LME":{ - "label_extended":"NorESM2-LME (low atmosphere-medium ocean resolution, GHG emission driven)", - "atmospheric_chemistry":"OsloChemSimp", - "atmosphere":"CAM-OSLO (2 degree resolution; 144 x 96; 32 levels; top level 3 mb)", - "ocean_biogeochemistry":"HAMOCC", - "release_year":"2017", + "activity_participation":[ + "C4MIP", + "CMIP", + "GeoMIP", + "LUMIP", + "OMIP" + ], "cohort":[ - "" + "Registered" ], - "sea_ice":"CICE", - "label":"NorESM2-LME", "institution_id":[ "NCC" ], - "land_surface":"CLM", - "aerosol":"OsloAero", "source_id":"NorESM2-LME", - "ocean":"MICOM (1 degree resolution; 360 x 384; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])", - "land_ice":"CISM" + "source":"NorESM2-LME (2017): \naerosol: OsloAero\natmos: CAM-OSLO (2 degree resolution; 144 x 96; 32 levels; top level 3 mb)\natmosChem: OsloChemSimp\nland: CLM\nlandIce: CISM\nocean: MICOM (1 degree resolution; 360 x 384; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])\nocnBgchem: HAMOCC\nseaIce: CICE" + }, + "NorESM2-LMEC":{ + "activity_participation":[ + "AerChemMIP" + ], + "cohort":[ + "Registered" + ], + "institution_id":[ + "NCC" + ], + "source_id":"NorESM2-LMEC", + "source":"NorESM2-LMEC (2017): \naerosol: OsloAero\natmos: CAM-OSLO (2 degree resolution; 144 x 96; 32 levels; top level 3 mb)\natmosChem: OsloChemComp\nland: CLM\nlandIce: CISM\nocean: MICOM (1 degree resolution; 360 x 384; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])\nocnBgchem: HAMOCC\nseaIce: CICE" + }, + "NorESM2-MH":{ + "activity_participation":[ + "AerChemMIP", + "CFMIP", + "CMIP", + "DAMIP", + "OMIP", + "RFMIP", + "ScenarioMIP" + ], + "cohort":[ + "Registered" + ], + "institution_id":[ + "NCC" + ], + "source_id":"NorESM2-MH", + "source":"NorESM2-MH (2017): \naerosol: OsloAero\natmos: CAM-OSLO (1 degree resolution; 288 x 192; 32 levels; top level 3 mb)\natmosChem: OsloChemSimp\nland: CLM\nlandIce: CISM\nocean: MICOM (0.25 degree resolution; 1440 x 1152; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])\nocnBgchem: HAMOCC\nseaIce: CICE" + }, + "NorESM2-MM":{ + "activity_participation":[ + "AerChemMIP", + "CFMIP", + "CMIP", + "DAMIP", + "OMIP", + "RFMIP", + "ScenarioMIP" + ], + "cohort":[ + "Registered" + ], + "institution_id":[ + "NCC" + ], + "source_id":"NorESM2-MM", + "source":"NorESM2-MM (2017): \naerosol: OsloAero\natmos: CAM-OSLO (1 degree resolution; 288 x 192; 32 levels; top level 3 mb)\natmosChem: OsloChemSimp\nland: CLM\nlandIce: CISM\nocean: MICOM (1 degree resolution; 360 x 384; 70 levels; top grid cell minimum 0-2.5 m [native model uses hybrid density and generic upper-layer coordinate interpolated to z-level for contributed data])\nocnBgchem: HAMOCC\nseaIce: CICE" + }, + "PCMDI-test-1-0":{ + "activity_participation":[ + "CMIP" + ], + "cohort":[ + "Registered" + ], + "institution_id":[ + "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" + }, + "UKESM1-0-LL":{ + "activity_participation":[ + "" + ], + "cohort":[ + "Registered" + ], + "institution_id":[ + "MOHC", + "NERC" + ], + "source_id":"UKESM1-0-LL", + "source":"UKESM1.0-LL (2017): \naerosol: UKCA-GLOMAP-mode\natmos: MetUM-HadGEM3-GA7.1 (192 x 144 N96; 85 levels; top level 85km)\natmosChem: UKCA-StratTrop\nland: JULES-HadGEM3-GL7.1\nlandIce: BISICLES (only active in ISMIP experiments)\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: MEDUSA2\nseaIce: CICE-HadGEM3-GSI8 (ORCA1 tripolar primarily 1 deg latitude/longitude)" + }, + "UKESM1-0-MMh":{ + "activity_participation":[ + "" + ], + "cohort":[ + "Registered" + ], + "institution_id":[ + "MOHC", + "NERC" + ], + "source_id":"UKESM1-0-MMh", + "source":"UKESM1.0-MMh (2018): \naerosol: UKCA-GLOMAP-mode (horizontal resolution degraded relative to that used for atmosphere physics)\natmos: MetUM-HadGEM3-GA7.1 (432 x 324 N216; 85 levels; top level 85km)\natmosChem: UKCA-StratTrop (horizontal resolution degraded relative to that used for atmosphere physics)\nland: JULES-HadGEM3-GL7.1\nlandIce: BISICLES (only active in ISMIP experiments)\nocean: NEMO-HadGEM3-GO6.0 (ORCA025 tripolar primarily 0.25 deg latitude/longitude; 75 levels; top grid cell 0-1m)\nocnBgchem: MEDUSA2 (horizontal resolution degraded relative to that used for ocean physics)\nseaIce: CICE-HadGEM3-GSI8 (ORCA025 tripolar primarily 0.25 deg latitude/longitude)" + }, + "VRESM-1-0":{ + "activity_participation":[ + "" + ], + "cohort":[ + "Registered" + ], + "institution_id":[ + "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_type":[ @@ -944,23 +875,22 @@ "500 km", "5000 km" ], - "realm":[ - "aerosol", - "atmos", - "atmosChem", - "land", - "landIce", - "ocean", - "ocnBgchem", - "seaIce" - ], + "realm":{ + "aerosol":"Aerosol", + "atmos":"Atmosphere", + "atmosChem":"Atmospheric Chemistry", + "land":"Land Surface", + "landIce":"Land Ice", + "ocean":"Ocean", + "ocnBgchem":"Ocean Biogeochemistry", + "seaIce":"Sea Ice" + }, "table_id":[ "3hr", "6hrLev", "6hrPlev", "6hrPlevPt", "AERday", - "AERfx", "AERhr", "AERmon", "AERmonZ", @@ -969,7 +899,6 @@ "CFday", "CFmon", "CFsubhr", - "CFsubhrOff", "E1hr", "E1hrClimMon", "E3hr", @@ -999,5842 +928,7227 @@ "SIday", "SImon", "day", - "fx", - "grids" + "fx" ], "license":[ - [ - "CMIP6 model data produced by .* is licensed under a Creative Commons Attribution \"Share Alike\" 4.0 International License (http://creativecommons.org/licenses/by/4.0/). Use of the data must be acknowledged following guidelines found at.* Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in data files). The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law." - ] + "^CMIP6 model data produced by .* is licensed under a Creative Commons Attribution.*ShareAlike 4.0 International License (https://creativecommons.org/licenses)\\. Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment\\. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) .*\\. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose\\. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law\\.$" ], "mip_era":[ "CMIP6" ], + "sub_experiment_id":{ + "none":"none", + "s1910":"initialized near end of year 1910", + "s1950":"initialized near end of year 1950", + "s1960":"initialized near end of year 1960", + "s1961":"initialized near end of year 1961", + "s1962":"initialized near end of year 1962", + "s1963":"initialized near end of year 1963", + "s1964":"initialized near end of year 1964", + "s1965":"initialized near end of year 1965", + "s1966":"initialized near end of year 1966", + "s1967":"initialized near end of year 1967", + "s1968":"initialized near end of year 1968", + "s1969":"initialized near end of year 1969", + "s1970":"initialized near end of year 1970", + "s1971":"initialized near end of year 1971", + "s1972":"initialized near end of year 1972", + "s1973":"initialized near end of year 1973", + "s1974":"initialized near end of year 1974", + "s1975":"initialized near end of year 1975", + "s1976":"initialized near end of year 1976", + "s1977":"initialized near end of year 1977", + "s1978":"initialized near end of year 1978", + "s1979":"initialized near end of year 1979", + "s1980":"initialized near end of year 1980", + "s1981":"initialized near end of year 1981", + "s1982":"initialized near end of year 1982", + "s1983":"initialized near end of year 1983", + "s1984":"initialized near end of year 1984", + "s1985":"initialized near end of year 1985", + "s1986":"initialized near end of year 1986", + "s1987":"initialized near end of year 1987", + "s1988":"initialized near end of year 1988", + "s1989":"initialized near end of year 1989", + "s1990":"initialized near end of year 1990", + "s1991":"initialized near end of year 1991", + "s1992":"initialized near end of year 1992", + "s1993":"initialized near end of year 1993", + "s1994":"initialized near end of year 1994", + "s1995":"initialized near end of year 1995", + "s1996":"initialized near end of year 1996", + "s1997":"initialized near end of year 1997", + "s1998":"initialized near end of year 1998", + "s1999":"initialized near end of year 1999", + "s2000":"initialized near end of year 2000", + "s2001":"initialized near end of year 2001", + "s2002":"initialized near end of year 2002", + "s2003":"initialized near end of year 2003", + "s2004":"initialized near end of year 2004", + "s2005":"initialized near end of year 2005", + "s2006":"initialized near end of year 2006", + "s2007":"initialized near end of year 2007", + "s2008":"initialized near end of year 2008", + "s2009":"initialized near end of year 2009", + "s2010":"initialized near end of year 2010", + "s2011":"initialized near end of year 2011", + "s2012":"initialized near end of year 2012", + "s2013":"initialized near end of year 2013", + "s2014":"initialized near end of year 2014", + "s2015":"initialized near end of year 2015", + "s2016":"initialized near end of year 2016", + "s2017":"initialized near end of year 2017", + "s2018":"initialized near end of year 2018", + "s2019":"initialized near end of year 2019", + "s2020":"initialized near end of year 2020", + "s2021":"initialized near end of year 2021", + "s2022":"initialized near end of year 2022", + "s2023":"initialized near end of year 2023", + "s2024":"initialized near end of year 2024", + "s2025":"initialized near end of year 2025", + "s2026":"initialized near end of year 2026", + "s2027":"initialized near end of year 2027", + "s2028":"initialized near end of year 2028", + "s2029":"initialized near end of year 2029" + }, "experiment_id":{ - "ssp245-GHG":{ + "1pctCO2":{ "activity_id":[ - "DAMIP" - ], - "description":"Extension of well-mixed GHG-only run under SSP2-4.5. Models with interactive chemistry schemes should either turn off the chemistry or use a preindustrial climatology of stratospheric and tropospheric ozone in their radiation schemes", - "start_year":"2021", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "hist-GHG" - ], - "parent_activity_id":[ - "DAMIP" + "CMIP" ], - "experiment":"well-mixed GHG-only SSP2-4.5 run", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"DECK: 1pctCO2", + "end_year":"", + "experiment":"1 percent per year increase in CO2", + "experiment_id":"1pctCO2", + "min_number_yrs_per_sim":"150", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"80", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "dcppA-historical-niff":{ + "1pctCO2-4xext":{ "activity_id":[ - "DCPP" - ], - "description":"Uninitialized climate simulations as in DCPP-A2.2, but with no information from the future", - "start_year":"1960", - "end_year":"present (to 2019)", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":[ - "dcppA-assim", - "" - ], - "parent_activity_id":[ - "DCPP" + "ISMIP6" ], - "experiment":"hindcast initialized from historical climate simulation without observed forcing after initialization", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"branched from 1pctCO2 run at year 140 and run with CO2 fixed at 4x pre-industrial concentration", + "end_year":"", + "experiment":"extension from year 140 of 1pctCO2 with 4xCO2", + "experiment_id":"1pctCO2-4xext", + "min_number_yrs_per_sim":"210", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "1pctCO2" + ], "required_model_components":[ "AOGCM" ], - "tier":"4", - "min_number_yrs_per_sim":"300", - "sub_experiment_id":"of form: \"sYYYY\"" - }, - "piClim-NH3":{ - "activity_id":"AerChemMIP", - "description":"Perturbation from 1850 control using 2014 NH3 emissions", "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 ammonia emissions", - "additional_allowed_model_components":[ - "AGCM", + "sub_experiment_id":[ + "none" + ], + "tier":"1" + }, + "1pctCO2-bgc":{ + "activity_id":[ + "C4MIP" + ], + "additional_allowed_model_components":[ + "AER", "CHEM" ], + "description":"Biogeochemically-coupled specified concentration simulation in which CO2 increases at a rate of 1% per year until quadrupling", + "end_year":"", + "experiment":"biogeochemically-coupled version of 1 percent per year increasing CO2 experiment", + "experiment_id":"1pctCO2-bgc", + "min_number_yrs_per_sim":"150", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ - "AGCM", - "AER" + "AOGCM", + "BGC" ], - "tier":"3", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" - }, - "piClim-OC":{ - "activity_id":"AerChemMIP", - "description":"Perturbation from 1850 control using 2014 OC emissions", "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 organic carbon emissions", + "sub_experiment_id":[ + "none" + ], + "tier":"1" + }, + "1pctCO2-rad":{ + "activity_id":[ + "C4MIP" + ], "additional_allowed_model_components":[ - "AGCM", + "AER", "CHEM" ], + "description":"Radiatively-coupled specified concentration simulation in which CO2 increases at a rate of 1% per year until quadrupling", + "end_year":"", + "experiment":"radiatively-coupled version of 1 percent per year increasing CO2 experiment", + "experiment_id":"1pctCO2-rad", + "min_number_yrs_per_sim":"150", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ - "AGCM", - "AER" + "AOGCM", + "BGC" ], - "tier":"3", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "aqua-p4K":{ + "1pctCO2Ndep":{ "activity_id":[ - "CFMIP" + "C4MIP" ], - "description":"Extended version of CMIP5/CFMIP-2 aqua4K experiment. Aquaplanet experiment where SSTs are subject to a uniform warming of 4K", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"aquaplanet with uniform 4K SST increase", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"Fully-coupled specified concentration simulation in which CO2 increases at a rate of 1% per year until quadrupling, plus an additional scenario of anthropogenic nitrogen deposition", + "end_year":"", + "experiment":"1 percent per year increasing CO2 experiment with increasing N-deposition", + "experiment_id":"1pctCO2Ndep", + "min_number_yrs_per_sim":"150", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ - "AGCM" + "AOGCM", + "BGC" ], - "tier":"1", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "ssp434":{ + "1pctCO2Ndep-bgc":{ "activity_id":[ - "ScenarioMIP" + "C4MIP" ], - "description":"Future scenario with low radiative forcing by the end of century. Reaches about 3.4 W/m2 by 2100; fills gap in RCP forcing pathways between 4.5 and 2.6 W/m2. Concentration-driven", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Biogeochemically-coupled specified concentration simulation in which CO2 increases at a rate of 1% per year until quadrupling, plus an additional scenario of anthropogenic nitrogen deposition", + "end_year":"", + "experiment":"biogeochemically-coupled version of 1 percent per year increasing CO2 experiment with increasing N-deposition", + "experiment_id":"1pctCO2Ndep-bgc", + "min_number_yrs_per_sim":"150", "parent_activity_id":[ "CMIP" ], - "experiment":"gap-filling scenario reaching 3.4 based on SSP4", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AOGCM", + "BGC" ], - "tier":"2", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "dcppC-ipv-pos":{ + "1pctCO2to4x-withism":{ "activity_id":[ - "DCPP" + "ISMIP6" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"control", - "end_year":"", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized positive IPV anomaly pattern", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Idealized 1%/yr CO2 increase to 4xC02 over 140yrs and kept constant at 4xCO2 for an additional 200 to 400 yrs simulation that includes interactive ice sheets", + "end_year":"", + "experiment":"simulation with interactive ice sheet forced by 1 percent per year increase in CO2 to 4xCO2 (subsequently held fixed)", + "experiment_id":"1pctCO2to4x-withism", + "min_number_yrs_per_sim":"350", + "parent_activity_id":[ + "ISMIP6" + ], + "parent_experiment_id":[ + "piControl-withism" + ], "required_model_components":[ - "AOGCM" + "AOGCM", + "ISM" + ], + "start_year":"", + "sub_experiment_id":[ + "none" ], - "tier":"1", - "min_number_yrs_per_sim":"25", - "sub_experiment_id":"of form: \"sYYYY\"" + "tier":"1" }, - "dcppC-ipv-NexTrop-pos":{ + "G1":{ "activity_id":[ - "DCPP" + "GeoMIP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"", - "end_year":"", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized positive northern extratropical IPV anomaly pattern", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Beginning from a preindustrial control run, simultaneously quadruple the CO2 concentration and reduce the solar constant such that the TOA radiative flux remains within +/m0.1 W/m2", + "end_year":"", + "experiment":"abrupt quadrupling of CO2 plus reduction in total solar irradiance", + "experiment_id":"G1", + "min_number_yrs_per_sim":"100", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"", - "sub_experiment_id":"of form: \"sYYYY\"" - }, - "piClim-2xDMS":{ - "activity_id":[ - "AerChemMIP" - ], - "description":"1850 control with doubled emissions of DMS", "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with doubled emissions of DMS", - "additional_allowed_model_components":[ - "CHEM" - ], - "required_model_components":[ - "AGCM", - "AER" + "sub_experiment_id":[ + "none" ], - "tier":"3", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "tier":"1" }, - "amip-hist":{ + "G6SST1":{ "activity_id":[ - "GMMIP" + "GeoMIP" ], - "description":"Extended AMIP run that covers 1870-2014. All natural and anthropogenic historical forcings as used in CMIP6 Historical Simulation will be included. AGCM resolution as CMIP6 Historical Simulation. The HadISST data will be used", - "start_year":"1870", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"AMIP-style simulation covering the period 1870-2014", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"Time slice at 2020 (ScenarioMIP Tier 1 high forcing scenario)", + "end_year":"", + "experiment":"SSTs, forcings, and other prescribed conditions from year 2020 of SSP5-8.5", + "experiment_id":"G6SST1", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "ScenarioMIP" + ], + "parent_experiment_id":[ + "ssp585" + ], "required_model_components":[ "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"144", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "spinup-1950":{ + "G6SST2-solar":{ "activity_id":[ - "HighResMIP" + "GeoMIP" ], - "description":"Coupled integration from ocean rest state using recommended HighResMIP protocol spinup with 1950 ocean temperature and salinity, using constant 1950s forcing", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "None" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Time slice at 2100 (G6solar)", + "end_year":"", + "experiment":"SSTs from year 2020 of SSP5-8.5; forcings and other prescribed conditions from year 2100 of G6solar", + "experiment_id":"G6SST2-solar", + "min_number_yrs_per_sim":"10", "parent_activity_id":[ - "HighResMIP" + "ScenarioMIP" ], - "experiment":"coupled spinup with fixed 1950s forcings from 1950 initial conditions (with ocean at rest) to provide initial condition for control-1950 and hist-1950", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "ssp585" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piSST-4xCO2-solar":{ + "G6SST2-sulfur":{ "activity_id":[ "GeoMIP" ], - "description":"Time slice at 1850 (picontrol) for G1ext to examine radiative forcing of abrupt4xCO2", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"preindustrial control SSTs with quadrupled CO2 and solar reduction", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"Time slice at 2100 (G6sulfur)", + "end_year":"", + "experiment":"SSTs from year 2020 of SSP5-8.5; forcings and other prescribed conditions from year 2100 of G6sulfur", + "experiment_id":"G6SST2-sulfur", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "ScenarioMIP" + ], + "parent_experiment_id":[ + "ssp585" + ], "required_model_components":[ "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" - }, - "faf-all":{ - "activity_id":[ - "FAFMIP" - ], - "description":"1xCO2 experiment, parallel to piControl, forced over the ocean simultaneously by surface windstress (as in the wind experiment), net heat flux (as in the heat experiment) and net freshwater flux (as in the water experiment) anomalies obtained from the CMIP5 ensemble mean of 1pctCO2 experiments at the time of 2xCO2, using a passive tracer to prevent negative climate feedback on the heat flux applied", "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "sub_experiment_id":[ + "none" ], - "parent_activity_id":[ - "CMIP" + "tier":"2" + }, + "G6solar":{ + "activity_id":[ + "GeoMIP" ], - "experiment":"control plus perturbative surface fluxes of momentum, heat and water into ocean", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Using solar irradiance reduction, return the radiative forcing from a background of the ScenarioMIP high forcing to the ScenarioMIP middle forcing", + "end_year":"2100", + "experiment":"total solar irradiance reduction to reduce net forcing from SSP585 to SSP245", + "experiment_id":"G6solar", + "min_number_yrs_per_sim":"86", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"70", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "ism-1pctCO2to4x-self":{ + "G6sulfur":{ "activity_id":[ - "ISMIP6" + "GeoMIP" ], - "description":"Idealized 1%/yr CO2 increase to 4xC02 over 140yrs and kept constant at 4xCO2 for an additional 200 to 400 yrs simulation with ice sheets forced \"offline\" with DECK 1pctCO2 using forcing from its own AOGCM", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "ism-piControl-self" + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" ], + "description":"Using equatorial SO2 injection, return the radiative forcing from a background of the ScenarioMIP high forcing to the ScenarioMIP middle forcing", + "end_year":"2100", + "experiment":"stratospheric sulfate aerosol injection to reduce net forcing from SSP585 to SSP245", + "experiment_id":"G6sulfur", + "min_number_yrs_per_sim":"86", "parent_activity_id":[ - "ISMIP6" + "CMIP" + ], + "parent_experiment_id":[ + "historical" ], - "experiment":"offline ice sheet model forced by ISM's own AOGCM 1pctCO2to4x output", - "additional_allowed_model_components":"", "required_model_components":[ - "ISM" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"350", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "G6SST1":{ + "G7SST1-cirrus":{ "activity_id":[ "GeoMIP" ], - "description":"Time slice at 2020 (ScenarioMIP Tier 1 high forcing scenario)", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSTs, forcings, and other prescribed conditions from year 2020 of SSP5-8.5", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"Time slice at 2020 (ScenarioMIP Tier 1 high forcing scenario and cirrus thinning according to G7cirrus)", + "end_year":"", + "experiment":"SSTs from year 2020 of SSP5-8.5; forcings and other prescribed conditions from year 2020 of SSP5-8.5 and cirrus thinning", + "experiment_id":"G7SST1-cirrus", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "ScenarioMIP" + ], + "parent_experiment_id":[ + "ssp585" + ], "required_model_components":[ "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" - }, - "ism-piControl-self":{ - "activity_id":[ - "ISMIP6" - ], - "description":"Pre-industrial control simulation for \"offline\" ice sheets", "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"offline ice sheet forced by ISM's own AOGCM piControl output", - "additional_allowed_model_components":"", - "required_model_components":[ - "ISM" + "sub_experiment_id":[ + "none" ], - "tier":"1", - "min_number_yrs_per_sim":"500", - "sub_experiment_id":"None" + "tier":"2" }, - "rad-irf":{ + "G7SST2-cirrus":{ "activity_id":[ - "RFMIP" + "GeoMIP" ], - "description":"Offline radiation calculations", - "start_year":"", + "additional_allowed_model_components":[ + "AER", + "CHEM" + ], + "description":"Time slice at 2100 (ScenarioMIP Tier 1 high forcing scenario and cirrus thinning according to G7cirrus)", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"offline assessment of radiative transfer parmeterizations in clear skies", - "additional_allowed_model_components":"", + "experiment":"SSTs from year 2100 of SSP5-8.5; forcings and other prescribed conditions from year 2100 of G7cirrus", + "experiment_id":"G7SST2-cirrus", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "ScenarioMIP" + ], + "parent_experiment_id":[ + "ssp585" + ], "required_model_components":[ - "RAD" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "dcppC-pac-control":{ + "G7cirrus":{ "activity_id":[ - "DCPP" + "GeoMIP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"1950", - "end_year":"1949", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized Pacific control", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Against a background of the ScenarioMIP high forcing, reduce cirrus cloud optical depth by a constant amount", + "end_year":"2100", + "experiment":"increase cirrus ice crystal fall speed to reduce net forcing in SSP585 by 1 W m-2", + "experiment_id":"G7cirrus", + "min_number_yrs_per_sim":"86", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "piClim-histall":{ + "a4SST":{ "activity_id":[ - "RFMIP" + "CFMIP" ], - "description":"Time-varying forcing. SST and sea ice fixed at preindustrial control. Interactive vegetation", - "start_year":"1850", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"transient effective radiative forcing", "additional_allowed_model_components":[ "AER", "CHEM" ], - "required_model_components":[ - "AGCM" - ], - "tier":"2", - "min_number_yrs_per_sim":"251", - "sub_experiment_id":"None" - }, - "G1":{ - "activity_id":[ - "GeoMIP" - ], - "description":"Beginning from a preindustrial control run, simultaneously quadruple the CO2 concentration and reduce the solar constant such that the TOA radiative flux remains within +/m0.1 W/m2", - "start_year":"", + "description":"As piSST, but with monthly-varying SSTs taken from years 111-140 of each model's own abrupt4xCO2 experiment instead of from piControl. Sea-ice is unchanged from piSST", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], + "experiment":"as piSST but with SSTs from abrupt4xCO2", + "experiment_id":"a4SST", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"abrupt quadrupling of CO2 plus reduction in total solar irradiance", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "abrupt4xCO2" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "volc-long-hlN":{ + "a4SSTice":{ "activity_id":[ - "VolMIP" + "CFMIP" ], - "description":"Idealized Northern Hemisphere high-latitude eruption emitting 28.1 Tg of SO2. Experiment initialized from PiControl", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"As piSST, but with monthly-varying SSTs and sea-ice taken from years 111-140 of each model's own abrupt4xCO2 experiment instead of from piControl", + "end_year":"", + "experiment":"as piSST but with SSTs and sea ice from abrupt4xCO2", + "experiment_id":"a4SSTice", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"idealized Northern Hemisphere high-latitude eruption emitting 28.1 Tg of SO2", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "abrupt4xCO2" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"20", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "esm-hist-ext":{ + "a4SSTice-4xCO2":{ "activity_id":[ - "CMIP" + "CFMIP" ], - "description":"Extension beyond 2014 of the CMIP6 historical (CO2 emission-driven)", - "start_year":"2015", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "esm-hist" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"As a4SSTice, but CO2 is quadrupled, and the increase in CO2 is seen by both the radiation scheme and vegetation", + "end_year":"", + "experiment":"as piSST but with SSTs and sea ice from abrupt4xCO2, and 4xCO2 seen by radiation and vegetation", + "experiment_id":"a4SSTice-4xCO2", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"post-2014 all-forcing simulation with atmospheric CO2 concentration calculated", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "abrupt4xCO2" ], "required_model_components":[ - "AOGCM", - "BGC" - ], - "tier":"2", - "min_number_yrs_per_sim":"1", - "sub_experiment_id":"None" - }, - "piClim-VOC":{ - "activity_id":[ - "AerChemMIP" + "AGCM" ], - "description":"Perturbation from 1850 control using 2014 CO/VOC emissions", "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 VOC emissions", - "additional_allowed_model_components":"", - "required_model_components":[ - "AGCM", - "AER", - "CHEM" + "sub_experiment_id":[ + "none" ], - "tier":"3", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "tier":"2" }, - "faf-heat":{ + "abrupt-0p5xCO2":{ "activity_id":[ - "FAFMIP" - ], - "description":"1xCO2 experiment, parallel to piControl, forced over the ocean by surface net heat flux anomalies obtained from the CMIP5 ensemble mean of 1pctCO2 experiments at the time of 2xCO2, using a passive tracer to prevent negative climate feedback on the heat flux applied", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], - "parent_activity_id":[ - "CMIP" + "CFMIP" ], - "experiment":"control plus perturbative surface flux of heat into ocean", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Identical to the DECK abrupt-4xCO2, but at 0.5xCO2", + "end_year":"", + "experiment":"abrupt halving of CO2", + "experiment_id":"abrupt-0p5xCO2", + "min_number_yrs_per_sim":"150", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"70", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "dcppC-amv-pos":{ + "abrupt-2xCO2":{ "activity_id":[ - "DCPP" + "CFMIP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"1950 (from 1920 if possible)", - "end_year":"2015", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized positive AMV anomaly pattern", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Identical to the DECK abrupt-4xCO2, but at 2xCO2", + "end_year":"", + "experiment":"abrupt doubling of CO2", + "experiment_id":"abrupt-2xCO2", + "min_number_yrs_per_sim":"150", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"66", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "amip-lfmip-pdLC":{ + "abrupt-4xCO2":{ "activity_id":[ - "LS3MIP" + "CMIP" ], - "description":"Prescribed land conditions 1980-2014 climate; AMIP SSTs", - "start_year":"1980", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"prescribed land (from current climatology) and AMIP SSTs", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" ], - "required_model_components":[ - "AGCM" + "description":"DECK: abrupt4xCO2", + "end_year":"", + "experiment":"abrupt quadrupling of CO2", + "experiment_id":"abrupt-4xCO2", + "min_number_yrs_per_sim":"150", + "parent_activity_id":[ + "CMIP" ], - "tier":"2", - "min_number_yrs_per_sim":"121", - "sub_experiment_id":"None" - }, - "land-crop-grass":{ - "activity_id":[ - "LUMIP" + "parent_experiment_id":[ + "piControl" ], - "description":"Same as land-hist but with all new crop and pastureland treated as unmanaged grassland", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only with cropland as natural grassland", - "additional_allowed_model_components":"", "required_model_components":[ - "LAND" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "piClim-anthro":{ + "abrupt-solm4p":{ "activity_id":[ - "RFMIP" + "CFMIP" ], - "description":"As in RFMIP-ERF-PI-Cntrl but with present-day anthropogenic forcing (greenhouse gases, aerosols and land-use)", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"effective radiative forcing by present day anthropogenic agents", "additional_allowed_model_components":[ "AER", - "CHEM" - ], - "required_model_components":[ - "AGCM" - ], - "tier":"1", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" - }, - "faf-passiveheat":{ - "activity_id":[ - "FAFMIP" + "CHEM", + "BGC" ], - "description":"1xCO2 experiment, parallel to piControl, with a flux of passive tracer added at the ocean surface at the same rate as the surface net heat flux anomaly applied in the FAFMIP heat experiment", - "start_year":"", + "description":"Conceptually similar to abrupt 4xCO2 DECK experiment, except that the solar constant rather than CO2 is abruptly reduced by 4%", "end_year":"", - "sub_experiment":"None", + "experiment":"abrupt 4% decrease in solar constant", + "experiment_id":"abrupt-solm4p", + "min_number_yrs_per_sim":"150", + "parent_activity_id":[ + "CMIP" + ], "parent_experiment_id":[ "piControl" ], - "parent_activity_id":[ - "CMIP" + "required_model_components":[ + "AOGCM" + ], + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "abrupt-solp4p":{ + "activity_id":[ + "CFMIP" ], - "experiment":"control plus surface flux of passive heat tracer into ocean", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Conceptually similar to abrupt 4xCO2 DECK experiment, except that the solar constant rather than CO2 is abruptly increased by 4%", + "end_year":"", + "experiment":"abrupt 4% increase in solar constant", + "experiment_id":"abrupt-solp4p", + "min_number_yrs_per_sim":"150", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"70", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piClim-histghg":{ + "amip":{ "activity_id":[ - "RFMIP" + "CMIP" ], - "description":"Time-varying forcing by GHGs. SST and sea ice fixed at preindustrial control. Interactive vegetation", - "start_year":"1850", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"transient effective radiative forcing by greenhouse gases", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"DECK: AMIP", + "end_year":"2014", + "experiment":"AMIP", + "experiment_id":"amip", + "min_number_yrs_per_sim":"36", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"251", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "hist-1950":{ + "amip-4xCO2":{ "activity_id":[ - "HighResMIP" + "CFMIP" ], - "description":"Coupled integrations, at least one with constant 1950\"s forcing (CTL) and one or more with historic and then RCP4.5 (as in Forced_Atmos_Land, EXP)", - "start_year":"1951", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "spinup-1950" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"As CMIP5/CFMIP-2 amip4xCO2 experiment. AMIP experiment where SSTs are held at control values and the CO2 seen by the radiation scheme is quadrupled", + "end_year":"2014", + "experiment":"AMIP SSTs with 4xCO2", + "experiment_id":"amip-4xCO2", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "HighResMIP" + "no parent" ], - "experiment":"coupled historical 1950-2014", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "AGCM" + ], + "start_year":"1979", + "sub_experiment_id":[ + "none" ], - "tier":"2", - "min_number_yrs_per_sim":"64", - "sub_experiment_id":"None" + "tier":"1" }, - "dcppC-atl-spg":{ + "amip-TIP":{ "activity_id":[ - "DCPP" + "GMMIP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"", - "end_year":"", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"predictability of 1990s warming of Atlantic sub-polar gyre", "additional_allowed_model_components":[ "AER", - "CHEM", - "BGC" + "CHEM" ], - "required_model_components":[ - "AOGCM" + "description":"The topography of the TIP is modified by setting surface elevations to 500m; to understand the combined thermal and mechanical forcing of the TIP. Same model as DECK", + "end_year":"2014", + "experiment":"same as \"amip\" run, but surface elevations of the Tibetan-Iranian Plateau and Himalayas reduced to 500m", + "experiment_id":"amip-TIP", + "min_number_yrs_per_sim":"36", + "parent_activity_id":[ + "no parent" ], - "tier":"3", - "min_number_yrs_per_sim":"", - "sub_experiment_id":"of form: \"sYYYY\"" - }, - "piClim-CH4":{ - "activity_id":[ - "AerChemMIP" + "parent_experiment_id":[ + "no parent" ], - "description":"Perturbation from 1850 control using 2014 CH4 concentrations", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 methane concentrations (including chemistry)", - "additional_allowed_model_components":"", "required_model_components":[ - "AGCM", - "AER", - "CHEM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "hist-resAMO":{ + "amip-TIP-nosh":{ "activity_id":[ "GMMIP" ], - "description":"Pacemaker 20th century historical run that includes all forcing as used in CMIP6 Historical Simulation, and the observational historical SST is restored in the AMO domain (0deg-70degN, 70degW-0deg)", - "start_year":"1870", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Surface sensible heat released at the elevation above 500m over the TIP is not allowed to heat the atmosphere. Same model as DECK", + "end_year":"2014", + "experiment":"same as \"amip\" run, but sensible heat not allowed for elevations of the Tibetan-Iranian Plateau and Himalayas above 500m", + "experiment_id":"amip-TIP-nosh", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "CMIP" + "no parent" ], - "experiment":"initialized from \"historical\" run year 1870 and SSTs in the AMO domain (0deg-70degN, 70degW-0deg) restored to AMIP SSTs with historical forcings", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"144", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "hist-all-aer2":{ + "amip-a4SST-4xCO2":{ "activity_id":[ - "DAMIP" + "CFMIP" ], - "description":"Historical ALL forcing run with alternate estimates of aerosol concentrations/emissions", - "start_year":"1850", - "end_year":"2020", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Same as amip, but a patterned SST anomaly is applied on top of the monthly-varying amip SSTs. This anomaly is a monthly climatology, taken from each model's own abrupt4xCO2 run minus piControl (using the mean of years 111-140 of abrupt4xCO2, and the parallel 30-year section of piControl). CO2 is quadrupled, and the increase in CO2 is seen by both the radiation scheme and vegetation", + "end_year":"2014", + "experiment":"as AMIP but with warming pattern from abrupt4xCO2 added to SSTs and 4xCO2 seen by radiation and vegetation", + "experiment_id":"amip-a4SST-4xCO2", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "CMIP" + "no parent" ], - "experiment":"historical ALL-forcing run with alternate estimates of aerosol forcing", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"171", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piSST-4xCO2":{ + "amip-future4K":{ "activity_id":[ "CFMIP" ], - "description":"Same as piSST but CO2 is quadrupled. The increase in CO2 is seen by both the radiation scheme and vegetation", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"as piSST with radiation and vegetation seeing 4xCO2", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"As CMIP5/CFMIP-2 amipFuture experiment. AMIP experiment where SSTs are subject to a composite SST warming pattern derived from coupled models, scaled to an ice-free ocean mean of 4K", + "end_year":"2014", + "experiment":"AMIP with patterned 4K SST increase", + "experiment_id":"amip-future4K", + "min_number_yrs_per_sim":"36", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "lfmip-pdLC":{ + "amip-hist":{ "activity_id":[ - "LS3MIP" + "GMMIP" ], - "description":"Prescribed land conditions 1980-2014 climate", - "start_year":"1980", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Extended AMIP run that covers 1870-2014. All natural and anthropogenic historical forcings as used in CMIP6 Historical Simulation will be included. AGCM resolution as CMIP6 Historical Simulation. The HadISST data will be used", + "end_year":"2014", + "experiment":"AMIP-style simulation covering the period 1870-2014", + "experiment_id":"amip-hist", + "min_number_yrs_per_sim":"144", "parent_activity_id":[ - "CMIP" + "no parent" ], - "experiment":"prescribed land conditions (from current climate climatology) and initialized from \"historical\" run year 1980", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"121", - "sub_experiment_id":"None" + "start_year":"1870", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "ism-bsmb-std":{ + "amip-hld":{ "activity_id":[ - "ISMIP6" + "GMMIP" ], - "description":"Offline ice sheet simulation with synthetic oceanic dataset to explore the uncertainty in sea level due to ice sheet initialization", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"The topography of the highlands in Africa, N. America and S. America TP is modified by setting surface elevations to a certain height (500m). Same model as DECK", + "end_year":"2014", + "experiment":"same as \"amip\" run, but surface elevations of the East African Highlands in Africa, Sierra Madre in N. America and Andes in S. America reduced to 500m", + "experiment_id":"amip-hld", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "ISMIP" + "no parent" ], - "experiment":"offline ice sheet forced by initMIP synthetic oceanic experiment", - "additional_allowed_model_components":[ - "" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "ISM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "G6solar":{ + "amip-lfmip-pObs":{ "activity_id":[ - "GeoMIP" - ], - "description":"Using solar irradiance reduction, return the radiative forcing from a background of the ScenarioMIP high forcing to the ScenarioMIP middle forcing", - "start_year":"2020", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" - ], - "parent_activity_id":[ - "CMIP" + "LS3MIP" ], - "experiment":"total solar irradiance reduction to reduce net forcing from SSP585 to SSP245", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], - "required_model_components":[ - "AOGCM" - ], - "tier":"1", - "min_number_yrs_per_sim":"81", - "sub_experiment_id":"None" - }, - "highresSST-4co2":{ - "activity_id":[ - "HighResMIP" - ], - "description":"Similar to CFMIP amip-4xCO2, SSTs are held at highresSST-present values and the CO2 seen by the radiation scheme is quadrupled. Run over years 2005-2014 of highresSST-present", - "start_year":"1951", + "description":"Land-hist land conditions; AMIP SSTs", "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "highresSST-present" - ], + "experiment":"prescribed land (from pseudo-observations) and AMIP SSTs", + "experiment_id":"amip-lfmip-pObs", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "HighResMIP" + "no parent" ], - "experiment":"highresSST-present SST with 4xCO2 concentrations", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"64", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "1pctCO2Ndep-bgc":{ + "amip-lfmip-pdLC":{ "activity_id":[ - "C4MIP" + "LS3MIP" ], - "description":"Biogeochemically-coupled specified concentration simulation in which CO2 increases at a rate of 1% per year until quadrupling, plus an additional scenario of anthropogenic nitrogen deposition", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" ], + "description":"Prescribed land conditions 1980-2014 climate; AMIP SSTs", + "end_year":"2014", + "experiment":"prescribed land (from current climatology) and AMIP SSTs", + "experiment_id":"amip-lfmip-pdLC", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "CMIP" + "no parent" ], - "experiment":"biogeochemically-coupled version of 1 percent per year increasing CO2 experiment with increasing N-deposition", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM", - "BGC" + "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"150", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "control-1950":{ + "amip-lfmip-rmLC":{ "activity_id":[ - "HighResMIP" - ], - "description":"Coupled integrations, at least one with constant 1950\"s forcing (CTL) and one or more with historic and then RCP4.5 (as in Forced_Atmos_Land, EXP)", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "spinup-1950" + "LS3MIP" ], - "parent_activity_id":"", - "experiment":"coupled control with fixed 1950's forcing (HighResMIP equivalent of pre-industrial control)", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Prescribed land conditions 30yr running mean; AMIP SSTs", + "end_year":"2014", + "experiment":"prescribed land conditions (from running mean climatology) and AMIP SSTs", + "experiment_id":"amip-lfmip-rmLC", + "min_number_yrs_per_sim":"36", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "ssp370-lowNTCF":{ + "amip-lwoff":{ "activity_id":[ - "AerChemMIP" + "CFMIP" ], - "description":"Future SSP3-7.0 with reduced NTCF emissions", - "start_year":"2015", - "end_year":"2055", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"As amip experiment, but with cloud-radiative effects switched off in the LW radiation code", + "end_year":"2014", + "experiment":"AMIP experiment with longwave cloud-radiative effects off", + "experiment_id":"amip-lwoff", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "CMIP" + "no parent" ], - "experiment":"SSP3-7.0, with low NTCF emissions", - "additional_allowed_model_components":[ - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM", - "AER" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"41", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piSST-4xCO2-rad":{ + "amip-m4K":{ "activity_id":[ "CFMIP" ], - "description":"Same as piSST but CO2 as seen by the radiation scheme is quadrupled", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"as piSST with radiation-only seeing 4xCO2", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"As amip experiment but SSTs are subject to a uniform cooling of 4K", + "end_year":"2014", + "experiment":"AMIP with uniform 4K SST decrease", + "experiment_id":"amip-m4K", + "min_number_yrs_per_sim":"36", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "amip-lfmip-rmLC":{ + "amip-p4K":{ "activity_id":[ - "LS3MIP" + "CFMIP" ], - "description":"Prescribed land conditions 30yr running mean; AMIP SSTs", - "start_year":"1980", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"prescribed land conditions (from running mean climatology) and AMIP SSTs", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"As CMIP5/CFMIP-2 amip4K experiment. AMIP experiment where SSTs are subject to a uniform warming of 4K", + "end_year":"2014", + "experiment":"AMIP with uniform 4K SST increase", + "experiment_id":"amip-p4K", + "min_number_yrs_per_sim":"36", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"121", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "ssp126":{ + "amip-p4K-lwoff":{ "activity_id":[ - "ScenarioMIP" + "CFMIP" ], - "description":"Future scenario with low radiative forcing by the end of century. Following approximately RCP2.6 global forcing pathway but with new forcing based on SSP1. Concentration-driven", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"As amip-p4K experiment, but with cloud-radiative effects switched off in the LW radiation code", + "end_year":"2014", + "experiment":"AMIP experiment with uniform 4K SST increase and with longwave cloud radiative effects off", + "experiment_id":"amip-p4K-lwoff", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "CMIP" + "no parent" ], - "experiment":"update of RCP2.6 based on SSP1", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "volc-cluster-21C":{ + "amip-piForcing":{ "activity_id":[ - "VolMIP" + "CFMIP" ], - "description":"Parallel experiment to volc-cluster-ctrl, using restart files from the end of the historical simulation instead of from piControl, and boundary conditions from the 21st century SSP2-4.5 scenario experiment of ScenarioMIP", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Identical to standard AMIP experiment but from 1870-present with constant pre-industrial forcing levels (anthropogenic and natural)", + "end_year":"2014", + "experiment":"AMIP SSTs with pre-industrial anthropogenic and natural forcing", + "experiment_id":"amip-piForcing", + "min_number_yrs_per_sim":"145", "parent_activity_id":[ - "CMIP" + "no parent" ], - "experiment":"volcanic cluster experiment under 21st century SSP2-4.5 scenario", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"85", - "sub_experiment_id":"None" + "start_year":"1870", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "ism-asmb-std":{ + "aqua-4xCO2":{ "activity_id":[ - "ISMIP6" + "CFMIP" ], - "description":"Offline ice sheet simulation with synthetic atmospheric dataset to explore the uncertainty in sea level due to ice sheet initialization", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Extended version of CMIP5/CFMIP-2 aqua4xCO2 experiment. Aquaplanet experiment where SSTs are held at control values and the CO2 seen by the radiation scheme is quadrupled", + "end_year":"", + "experiment":"aquaplanet with control SST and 4xCO2", + "experiment_id":"aqua-4xCO2", + "min_number_yrs_per_sim":"10", "parent_activity_id":[ - "ISMIP" + "no parent" ], - "experiment":"offline ice sheet forced by initMIP synthetic atmospheric experiment", - "additional_allowed_model_components":[ - "" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "ISM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "highresSST-future":{ + "aqua-control":{ "activity_id":[ - "HighResMIP" - ], - "description":"Extend Forced_Atmos_land to 2050 with agreed forcings (with option to extend further to 2100)", - "start_year":"2015", - "end_year":"2050", - "sub_experiment":"None", - "parent_experiment_id":[ - "highresSST-present" - ], - "parent_activity_id":[ - "HighResMIP" + "CFMIP" ], - "experiment":"forced atmosphere experiment for 2015-2050 using SST/sea-ice derived from CMIP5 RCP8.5 simulations and a scenario as close to RCP8.5 as possible within CMIP6", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"Extended version of CMIP5/CFMIP-2 aquaControl experiment. Aquaplanet (no land) experiment with no seasonal cycle forced with specified zonally symmetric SSTs", + "end_year":"", + "experiment":"aquaplanet control", + "experiment_id":"aqua-control", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"36", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "esm-ssp585-ssp126Lu":{ + "aqua-control-lwoff":{ "activity_id":[ - "LUMIP" - ], - "description":"Additional land use policy sensitivity simulation for high radiative forcing scenario, keep all forcings the same as in C4MIP esmssp5-8.5 scenario except use SSP1-2.6 land use; emission driven", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "esm-hist" - ], - "parent_activity_id":[ - "CMIP" + "CFMIP" ], - "experiment":"emissions-driven SSP5-8.5 with SSP1-2.6 land use", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"As aqua-control experiment, but with cloud-radiative effects switched off in the LW radiation code", + "end_year":"", + "experiment":"aquaplanet control with longwave cloud radiative effects off", + "experiment_id":"aqua-control-lwoff", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ - "AOGCM", - "BGC" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "dcppA-hindcast":{ + "aqua-p4K":{ "activity_id":[ - "DCPP" + "CFMIP" ], - "description":"Decadal hindcasts begun each year from 1960 to present, or every other year at minimum", - "start_year":"1960", - "end_year":"present (to 2019)", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":[ - "dcppA-assim", - "" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Extended version of CMIP5/CFMIP-2 aqua4K experiment. Aquaplanet experiment where SSTs are subject to a uniform warming of 4K", + "end_year":"", + "experiment":"aquaplanet with uniform 4K SST increase", + "experiment_id":"aqua-p4K", + "min_number_yrs_per_sim":"10", "parent_activity_id":[ - "DCPP" + "no parent" ], - "experiment":"year 1-5 hindcast initialized based on observations and using historical forcing", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"300", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "G6SST2-sulfur":{ + "aqua-p4K-lwoff":{ "activity_id":[ - "GeoMIP" + "CFMIP" ], - "description":"Time slice at 2100 (G6sulfur)", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSTs from year 2020 of SSP5-8.5; forcings and other prescribed conditions from year 2100 of G6sulfur", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"As aqua-p4K experiment, but with cloud-radiative effects switched off in the LW radiation code", + "end_year":"", + "experiment":"aquaplanet with uniform 4K SST increase and with longwave cloud radiative effects off", + "experiment_id":"aqua-p4K-lwoff", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piClim-aer":{ + "control-1950":{ "activity_id":[ - "AerChemMIP" + "HighResMIP" ], - "description":"Perturbation from 1850 control using 2014 aerosol emissions", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but 2014 aerosol emissions", "additional_allowed_model_components":[ - "CHEM" + "AER" + ], + "description":"Coupled integrations with constant 1950\"s forcing", + "end_year":"", + "experiment":"coupled control with fixed 1950's forcing (HighResMIP equivalent of pre-industrial control)", + "experiment_id":"control-1950", + "min_number_yrs_per_sim":"100", + "parent_activity_id":[ + "HighResMIP" + ], + "parent_experiment_id":[ + "spinup-1950" ], "required_model_components":[ - "AGCM", - "AER" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "volc-pinatubo-ini":{ + "control-slab":{ "activity_id":[ "VolMIP" ], - "description":"As volc-pinatubo-full, but as decadal prediction runs. Joint experiment with DCPP, forcing input and implementation of the forcing fully comply with the VolMIP protocol", - "start_year":"2015", - "end_year":"2019", - "sub_experiment":"initialized near end of year 2014", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"Pinatubo experiment for decadal climate prediction", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"slab control run for volc-pinatubo-slab", + "end_year":"", + "experiment":"control with slab ocean", + "experiment_id":"control-slab", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ - "AOGCM" + "AGCM", + "SLAB" ], - "tier":"3", - "min_number_yrs_per_sim":"5", - "sub_experiment_id":"s2014" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "piClim-ghg":{ + "dcppA-assim":{ "activity_id":[ - "RFMIP" + "DCPP" ], - "description":"As in RFMIP-ERF-PI-Cntrl but with present-day greenhouse gases", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"effective radiative forcing by present-day greenhouse gases", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" ], - "required_model_components":[ - "AGCM" + "description":"A2.3 Assimilation runs used to generate initial conditions for hindcasts", + "end_year":"2016", + "experiment":"Assimilation run paralleling the historical simulation, which may be used to generate hindcast initial conditions", + "experiment_id":"dcppA-assim", + "min_number_yrs_per_sim":"56", + "parent_activity_id":[ + "no parent" ], - "tier":"1", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" - }, - "omip1-spunup":{ - "activity_id":[ - "OMIP" + "parent_experiment_id":[ + "no parent" ], - "description":"Same as the omipv1 experiment except that it is not initialized with observed climatologies; rather it is initialized with results from at least a 2000-year spin up of the coupled physical-biogeochemical models. Also it includes radiocarbon to evaluate deep-ocean circulation", - "start_year":"1", - "end_year":"310", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"OMIP experiment forced by Large and Yeager (CORE-2, NCEP) atmospheric data set and initialized from at least a 2000-year spin up of the coupled physical-biogeochemical model", - "additional_allowed_model_components":"", "required_model_components":[ - "OGCM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"310", - "sub_experiment_id":"None" + "start_year":"before 1961", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "histSST-1950HC":{ + "dcppA-hindcast":{ "activity_id":[ - "AerChemMIP" + "DCPP" ], - "description":"Historical WMGHG concentrations and NTCF emissions, 1950 halocarbon concentrations", - "start_year":"1950", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical SSTs and historical forcing, but with1950 halocarbon concentrations", - "additional_allowed_model_components":"", - "required_model_components":[ - "AGCM", + "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" ], - "tier":"1", - "min_number_yrs_per_sim":"65", - "sub_experiment_id":"None" + "description":"A1 (and A2.1, A3.1, and A3.2) Decadal hindcasts begun near the end of each year from 1960 to 2016, or every other year at minimum. First full hindcast year follows start year (e.g., for s1960, first full hindcast year is 1961)", + "end_year":"5 - 10 years after start year", + "experiment":"hindcast initialized based on observations and using historical forcing", + "experiment_id":"dcppA-hindcast", + "min_number_yrs_per_sim":"5", + "parent_activity_id":[ + "no parent", + "DCPP" + ], + "parent_experiment_id":[ + "no parent", + "dcppA-assim" + ], + "required_model_components":[ + "AOGCM" + ], + "start_year":"a year in the range 1960-2016", + "sub_experiment_id":[ + "s1960", + "s1961", + "s1962", + "s1963", + "s1964", + "s1965", + "s1966", + "s1967", + "s1968", + "s1969", + "s1970", + "s1971", + "s1972", + "s1973", + "s1974", + "s1975", + "s1976", + "s1977", + "s1978", + "s1979", + "s1980", + "s1981", + "s1982", + "s1983", + "s1984", + "s1985", + "s1986", + "s1987", + "s1988", + "s1989", + "s1990", + "s1991", + "s1992", + "s1993", + "s1994", + "s1995", + "s1996", + "s1997", + "s1998", + "s1999", + "s2000", + "s2001", + "s2002", + "s2003", + "s2004", + "s2005", + "s2006", + "s2007", + "s2008", + "s2009", + "s2010", + "s2011", + "s2012", + "s2013", + "s2014", + "s2015", + "s2016" + ], + "tier":"1" }, - "control-slab":{ + "dcppA-hindcast-niff":{ "activity_id":[ - "VolMIP" + "DCPP" ], - "description":"slab control run for volc-pinatubo-slab", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"control with slab ocean", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"A4.1 Decadal hindcasts begun near the end of each year from 1960 to 2016, or every other year at minimum, but with no information from the future. First full hindcast year follows start year (e.g., for s1960, first full hindcast year is 1961)", + "end_year":"5 - 10 years after start year", + "experiment":"hindcast initialized based on observations but without using knowledge of subsequent historical forcing", + "experiment_id":"dcppA-hindcast-niff", + "min_number_yrs_per_sim":"5", + "parent_activity_id":[ + "no parent", + "DCPP" + ], + "parent_experiment_id":[ + "no parent", + "dcppA-assim" + ], "required_model_components":[ - "AGCM", - "SLAB" + "AOGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"a year in the range 1960-2016", + "sub_experiment_id":[ + "s1960", + "s1961", + "s1962", + "s1963", + "s1964", + "s1965", + "s1966", + "s1967", + "s1968", + "s1969", + "s1970", + "s1971", + "s1972", + "s1973", + "s1974", + "s1975", + "s1976", + "s1977", + "s1978", + "s1979", + "s1980", + "s1981", + "s1982", + "s1983", + "s1984", + "s1985", + "s1986", + "s1987", + "s1988", + "s1989", + "s1990", + "s1991", + "s1992", + "s1993", + "s1994", + "s1995", + "s1996", + "s1997", + "s1998", + "s1999", + "s2000", + "s2001", + "s2002", + "s2003", + "s2004", + "s2005", + "s2006", + "s2007", + "s2008", + "s2009", + "s2010", + "s2011", + "s2012", + "s2013", + "s2014", + "s2015", + "s2016" + ], + "tier":"4" }, - "ssp370SST-lowAer":{ + "dcppA-historical-niff":{ "activity_id":[ - "AerChemMIP" + "DCPP" ], - "description":"Future SSP3-7.0 with reduced aerosol emissions (from ssp370-lowNTCF), prescribed SSTs", - "start_year":"2015", - "end_year":"2055", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSP3-7.0, prescribed SSTs, with low aerosol emissions", "additional_allowed_model_components":[ - "CHEM" + "AER", + "CHEM", + "BGC" + ], + "description":"A4.2 Hindcasts initialized from historical climate simulations as in DCPP-A2.2, but with no information from the future. First full hindcast year follows start year (e.g., for s1960, first full hindcast year is 1961)", + "end_year":"5 - 10 years after start year", + "experiment":"hindcast initialized from historical climate simulation but without using knowledge of subsequent historical forcing", + "experiment_id":"dcppA-historical-niff", + "min_number_yrs_per_sim":"5", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" ], "required_model_components":[ - "AGCM", - "AER" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"41", - "sub_experiment_id":"None" + "start_year":"A year in the range 1960-2016", + "sub_experiment_id":[ + "s1960", + "s1961", + "s1962", + "s1963", + "s1964", + "s1965", + "s1966", + "s1967", + "s1968", + "s1969", + "s1970", + "s1971", + "s1972", + "s1973", + "s1974", + "s1975", + "s1976", + "s1977", + "s1978", + "s1979", + "s1980", + "s1981", + "s1982", + "s1983", + "s1984", + "s1985", + "s1986", + "s1987", + "s1988", + "s1989", + "s1990", + "s1991", + "s1992", + "s1993", + "s1994", + "s1995", + "s1996", + "s1997", + "s1998", + "s1999", + "s2000", + "s2001", + "s2002", + "s2003", + "s2004", + "s2005", + "s2006", + "s2007", + "s2008", + "s2009", + "s2010", + "s2011", + "s2012", + "s2013", + "s2014", + "s2015", + "s2016" + ], + "tier":"4" }, - "ism-ssp585-std":{ + "dcppB-forecast":{ "activity_id":[ - "ISMIP6" + "DCPP" ], - "description":"Future climate ScenarioMIP SSP5-8.5 simulation using \"offline\" ice sheet models. Forcing for ice sheet model is the standard dataset based on ScenarioMIP ssp585", - "start_year":"2015", - "end_year":"2300", - "sub_experiment":"None", - "parent_experiment_id":[ - "ism-historical-std" + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" ], + "description":"B1 (and B2.1, B2.2) Ongoing decadal forecasts. First full forecast year follows start year (e.g., for s2017, first full forecast year is 2018)", + "end_year":"5 years after start year", + "experiment":"forecast initialized from observations with forcing from ssp245", + "experiment_id":"dcppB-forecast", + "min_number_yrs_per_sim":"5", "parent_activity_id":[ - "ISMIP6" + "no parent", + "DCPP" + ], + "parent_experiment_id":[ + "no parent", + "dcppA-assim" ], - "experiment":"offline ice sheet forced by ISMIP6-specified AOGCM ssp585 output", - "additional_allowed_model_components":"", "required_model_components":[ - "ISM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"85", - "sub_experiment_id":"None" + "start_year":"a year in the range 2017-2029", + "sub_experiment_id":[ + "s2017", + "s2018", + "s2019", + "s2020", + "s2021", + "s2022", + "s2023", + "s2024", + "s2025", + "s2026", + "s2027", + "s2028", + "s2029" + ], + "tier":"1" }, - "piClim-2xVOC":{ + "dcppC-amv-ExTrop-neg":{ "activity_id":[ - "AerChemMIP" + "DCPP" ], - "description":"1850 control with doubled emissions of biogenic VOCs", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with doubled emissions of biogenic VOCs", - "additional_allowed_model_components":"", - "required_model_components":[ - "AGCM", + "additional_allowed_model_components":[ "AER", - "CHEM" - ], - "tier":"3", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" - }, - "ism-lig127k-std":{ - "activity_id":[ - "ISMIP6" + "CHEM", + "BGC" ], - "description":"Last interglacial simulation of ice sheet evolution driven by PMIP lig127k", - "start_year":"", + "description":"C1.7 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"offline ice sheet forced by ISMIP6-specified AGCM last interglacial output", - "additional_allowed_model_components":"", - "required_model_components":[ - "ISM" + "experiment":"Idealized climate impact of negative extratropical AMV anomaly pattern", + "experiment_id":"dcppC-amv-ExTrop-neg", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "CMIP" ], - "tier":"3", - "min_number_yrs_per_sim":"20000", - "sub_experiment_id":"None" - }, - "ism-amip-std":{ - "activity_id":[ - "ISMIP6" + "parent_experiment_id":[ + "piControl" ], - "description":"Offline ice sheet evolution for the last few decades forced by amip", - "start_year":"1979", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"offline ice sheet forced by ISMIP6-specified AGCM AMIP output", - "additional_allowed_model_components":"", "required_model_components":[ - "ISM" + "AOGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"36", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piClim-histnat":{ + "dcppC-amv-ExTrop-pos":{ "activity_id":[ - "RFMIP" + "DCPP" ], - "description":"Time-varying forcing from volcanos, solar variability, etc. SST and sea ice fixed at preindustrial control. Interactive vegetation", - "start_year":"1850", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"transient effective radiative forcing by natural perturbations", "additional_allowed_model_components":[ "AER", - "CHEM" - ], - "required_model_components":[ - "AGCM" - ], - "tier":"2", - "min_number_yrs_per_sim":"251", - "sub_experiment_id":"None" - }, - "volc-long-eq":{ - "activity_id":[ - "VolMIP" + "CHEM", + "BGC" ], - "description":"Idealized equatorial eruption corresponding to an initial emission of 56.2 Tg of SO2. The eruption magnitude corresponds to recent estimates for the 1815 Tambora eruption (Sigl et al., 2015), the largest historical tropical eruption, which was linked to the so-called \"year without a summer\" in 1816. Experiment initialized from PiControl", - "start_year":"", + "description":"C1.7Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", "end_year":"", - "sub_experiment":"None", + "experiment":"Idealized climate impact of positive extratropical AMV anomaly pattern", + "experiment_id":"dcppC-amv-ExTrop-pos", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "CMIP" + ], "parent_experiment_id":[ "piControl" ], - "parent_activity_id":[ - "CMIP" + "required_model_components":[ + "AOGCM" + ], + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "dcppC-amv-Trop-neg":{ + "activity_id":[ + "DCPP" ], - "experiment":"idealized equatorial volcanic eruption emitting 56.2 Tg SO2", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"C1.8 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", + "end_year":"", + "experiment":"Idealized climate impact of negative tropical AMV anomaly pattern", + "experiment_id":"dcppC-amv-Trop-neg", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"20", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "lfmip-rmLC":{ + "dcppC-amv-Trop-pos":{ "activity_id":[ - "LS3MIP" - ], - "description":"Prescribed land conditions 30yr running mean", - "start_year":"1980", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" - ], - "parent_activity_id":[ - "CMIP" + "DCPP" ], - "experiment":"prescribed land conditions (from running mean climatology) and initialized from \"historical\" run year 1980", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"C1.8 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", + "end_year":"", + "experiment":"idealized positive tropical AMV anomaly pattern", + "experiment_id":"dcppC-amv-Trop-pos", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"121", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "abrupt-solp4p":{ + "dcppC-amv-neg":{ "activity_id":[ - "CFMIP" + "DCPP" ], - "description":"Conceptually similar to abrupt 4xCO2 DECK experiment, except that the solar constant rather than CO2 is abruptly increased by 4%", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" ], + "description":"C1.3 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", + "end_year":"", + "experiment":"Idealized climate impact of negative AMV anomaly pattern", + "experiment_id":"dcppC-amv-neg", + "min_number_yrs_per_sim":"10", "parent_activity_id":[ "CMIP" ], - "experiment":"abrupt 4% increase in solar constant", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"150", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "amip-p4K-lwoff":{ + "dcppC-amv-pos":{ "activity_id":[ - "CFMIP" + "DCPP" ], - "description":"As amip-p4K experiment, but with cloud-radiative effects switched off in the LW radiation code", - "start_year":"1979", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"AMIP experiment with uniform 4K SST increase and with longwave cloud radiative effects off", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"C1.2 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", + "end_year":"", + "experiment":"Idealized climate impact of positive AMV anomaly pattern", + "experiment_id":"dcppC-amv-pos", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"36", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "abrupt-0p5xCO2":{ + "dcppC-atl-control":{ "activity_id":[ - "CFMIP" + "DCPP" ], - "description":"Identical to the DECK abrupt-4xCO2, but at 0.5xCO2", - "start_year":"", + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" + ], + "description":"C1.1 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", "end_year":"", - "sub_experiment":"None", + "experiment":"Idealized Atlantic control", + "experiment_id":"dcppC-atl-control", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "CMIP" + ], "parent_experiment_id":[ "piControl" ], - "parent_activity_id":[ - "CMIP" + "required_model_components":[ + "AOGCM" + ], + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" + }, + "dcppC-atl-pacemaker":{ + "activity_id":[ + "DCPP" ], - "experiment":"abrupt halving of CO2", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"C1.11 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", + "end_year":"2014", + "experiment":"pacemaker Atlantic experiment", + "experiment_id":"dcppC-atl-pacemaker", + "min_number_yrs_per_sim":"65", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"150", - "sub_experiment_id":"None" + "start_year":"1910 or 1950", + "sub_experiment_id":[ + "s1910", + "s1950" + ], + "tier":"3" }, - "abrupt-2xCO2":{ + "dcppC-atl-spg":{ "activity_id":[ - "CFMIP" - ], - "description":"Identical to the DECK abrupt-4xCO2, but at 2xCO2", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], - "parent_activity_id":[ - "CMIP" + "DCPP" ], - "experiment":"abrupt doubling of CO2", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"C2.1 (and C2.2) Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs. First full hindcast year follows start year (e.g., for s1992, first full hindcast year is 1993)", + "end_year":"5 - 10 years after start year", + "experiment":"predictability of 1990s warming of Atlantic sub-polar gyre", + "experiment_id":"dcppC-atl-spg", + "min_number_yrs_per_sim":"5", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"150", - "sub_experiment_id":"None" + "start_year":"A year in the range 1992-1999", + "sub_experiment_id":[ + "s1992", + "s1993", + "s1994", + "s1995", + "s1996", + "s1997", + "s1998", + "s1999" + ], + "tier":"3" }, - "dcppC-hindcast-noElChichon":{ + "dcppC-forecast-addAgung":{ "activity_id":[ "DCPP" ], - "description":"Effects of volcanoes on decadal prediction and predictability of forced and internal variability components", - "start_year":"1982", - "end_year":"1982", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":[ - "dcppA-assim", - "" - ], - "parent_activity_id":[ - "DCPP" - ], - "experiment":"", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"C3.4 Effects of volcanoes on decadal prediction and predictability of forced and internal variability components. First full hindcast year is 2015", + "end_year":"5 - 10 years after start year", + "experiment":"2015 forecast with added Agung forcing", + "experiment_id":"dcppC-forecast-addAgung", + "min_number_yrs_per_sim":"5", + "parent_activity_id":[ + "no parent", + "DCPP" + ], + "parent_experiment_id":[ + "no parent", + "dcppA-assim" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"5", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"2014", + "sub_experiment_id":[ + "s2014" + ], + "tier":"3" }, - "dcppC-amv-ExTrop-neg":{ + "dcppC-forecast-addElChichon":{ "activity_id":[ "DCPP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"1993", - "end_year":"1996", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized negative extratropical AMV anomaly pattern", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"C3.5 Effects of volcanoes on decadal prediction and predictability of forced and internal variability components. First full hindcast year is 2015", + "end_year":"5 - 10 years after start year", + "experiment":"2015 forecast with added El Chichon forcing", + "experiment_id":"dcppC-forecast-addElChichon", + "min_number_yrs_per_sim":"5", + "parent_activity_id":[ + "no parent", + "DCPP" + ], + "parent_experiment_id":[ + "no parent", + "dcppA-assim" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"5", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"2014", + "sub_experiment_id":[ + "s2014" + ], + "tier":"3" }, - "hist-piAer":{ + "dcppC-forecast-addPinatubo":{ "activity_id":[ - "AerChemMIP" - ], - "description":"Historical WMGHG, halocarbon concentrations and O3 precursor emissions, 1850 aerosol precursor emissions", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], - "parent_activity_id":[ - "CMIP" + "DCPP", + "VolMIP" ], - "experiment":"historical forcing, but with pre-industrial aerosol emissions", "additional_allowed_model_components":[ + "AER", "CHEM", "BGC" ], + "description":"C3.6 Effects of volcanoes on decadal prediction and predictability of forced and internal variability components. First full hindcast year is 2015", + "end_year":"5 - 10 years after start year", + "experiment":"2015 forecast with added Pinatubo forcing", + "experiment_id":"dcppC-forecast-addPinatubo", + "min_number_yrs_per_sim":"5", + "parent_activity_id":[ + "no parent", + "DCPP" + ], + "parent_experiment_id":[ + "no parent", + "dcppA-assim" + ], "required_model_components":[ - "AOGCM", - "AER" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"2014", + "sub_experiment_id":[ + "s2014" + ], + "tier":"1" }, - "amip-TIP-nosh":{ + "dcppC-hindcast-noAgung":{ "activity_id":[ - "GMMIP" + "DCPP" ], - "description":"Surface sensible heat released at the elevation above 500m over the TIP is not allowed to heat the atmosphere. Same model as DECK", - "start_year":"1979", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"same as \"amip\" run, but sensible heat not allowed for elevations of the Tibetan-Iranian Plateau and Himalayas above 500m", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" ], - "required_model_components":[ - "AGCM" + "description":"C3.3 Effects of volcanoes on decadal prediction and predictability of forced and internal variability components. First full hindcast year is 1962", + "end_year":"5 - 10 years after start year", + "experiment":"hindcast but with only background volcanic forcing to be the same as that used in the 2015 forecast", + "experiment_id":"dcppC-hindcast-noAgung", + "min_number_yrs_per_sim":"5", + "parent_activity_id":[ + "no parent", + "DCPP" ], - "tier":"3", - "min_number_yrs_per_sim":"35", - "sub_experiment_id":"None" - }, - "piClim-N2O":{ - "activity_id":[ - "AerChemMIP" + "parent_experiment_id":[ + "no parent", + "dcppA-assim" ], - "description":"Perturbation from 1850 control using 2014 N2O concentrations", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 N2O concentrations (including chemistry)", - "additional_allowed_model_components":"", "required_model_components":[ - "AGCM", - "AER", - "CHEM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"1962", + "sub_experiment_id":[ + "s1962" + ], + "tier":"2" }, - "hist-resIPO":{ + "dcppC-hindcast-noElChichon":{ "activity_id":[ - "GMMIP" - ], - "description":"Pacemaker 20th century historical run that includes all forcing as used in CMIP6 Historical Simulation, and the observational historical SST is restored in the tropical lobe of the IPO domain (20degS-20degN, 175degE-75degW). The HadISST data will be used", - "start_year":"1870", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], - "parent_activity_id":[ - "CMIP" + "DCPP" ], - "experiment":"initialized from \"historical\" run year 1870 and SSTs in tropical lobe of the IPO domain (20degS-20degN, 175degE-75degW) restored to AMIP SSTs with historical forcings", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], - "required_model_components":[ - "AOGCM" + "description":"C3.2 Effects of volcanoes on decadal prediction and predictability of forced and internal variability components. First full hindcast year is 1982", + "end_year":"5 - 10 years after start year", + "experiment":"hindcast but with only background volcanic forcing to be the same as that used in the 2015 forecast", + "experiment_id":"dcppC-hindcast-noElChichon", + "min_number_yrs_per_sim":"5", + "parent_activity_id":[ + "no parent", + "DCPP" ], - "tier":"2", - "min_number_yrs_per_sim":"144", - "sub_experiment_id":"None" - }, - "land-hist-altStartYear":{ - "activity_id":[ - "LUMIP" + "parent_experiment_id":[ + "no parent", + "dcppA-assim" ], - "description":"Same as land-hist except starting from either 1700 (for models that typically start in 1850) or 1850 (for models that typically start in 1700)", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only alternate start year", - "additional_allowed_model_components":"", "required_model_components":[ - "LAND" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"1981", + "sub_experiment_id":[ + "s1981" + ], + "tier":"2" }, - "hist-GHG":{ + "dcppC-hindcast-noPinatubo":{ "activity_id":[ - "DAMIP" - ], - "description":"Historical well-mixed GHG-only run. Models with interactive chemistry schemes should either turn off the chemistry or use a preindustrial climatology of stratospheric and tropospheric ozone in their radiation schemes. This will ensure that ozone is fixed in all these simulations, and simulated responses in models with and without coupled chemistry are comparable", - "start_year":"1850", - "end_year":"2020", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], - "parent_activity_id":[ - "CMIP" + "DCPP" ], - "experiment":"historical well-mixed GHG-only run", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"C3.1 Effects of volcanoes on decadal prediction and predictability of forced and internal variability components. First full hindcast year is 1991", + "end_year":"5 - 10 years after start year", + "experiment":"hindcast but with only background volcanic forcing to be the same as that used in the 2015 forecast", + "experiment_id":"dcppC-hindcast-noPinatubo", + "min_number_yrs_per_sim":"5", + "parent_activity_id":[ + "no parent", + "DCPP" + ], + "parent_experiment_id":[ + "no parent", + "dcppA-assim" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"171", - "sub_experiment_id":"None" + "start_year":"1990", + "sub_experiment_id":[ + "s1990" + ], + "tier":"1" }, - "volc-pinatubo-slab":{ + "dcppC-ipv-NexTrop-neg":{ "activity_id":[ - "VolMIP" - ], - "description":"As volc-pinatubo-full, but with a slab ocean", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "control-slab" - ], - "parent_activity_id":[ - "VolMIP" + "DCPP" ], - "experiment":"Pinatubo experiment with slab ocean", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], - "required_model_components":[ - "AGCM", - "SLAB" + "description":"C1.9 and predictability of the hiatus and of similar long timescale variations of both signs", + "end_year":"", + "experiment":"idealized negative northern extratropical IPV anomaly pattern", + "experiment_id":"dcppC-ipv-NexTrop-neg", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "CMIP" ], - "tier":"3", - "min_number_yrs_per_sim":"3", - "sub_experiment_id":"None" - }, - "ssp370SST-lowCH4":{ - "activity_id":[ - "AerChemMIP" + "parent_experiment_id":[ + "piControl" ], - "description":"Future SSP3-7.0 with reduced CH4 concentrations, prescribed SSTs", - "start_year":"2015", - "end_year":"2055", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSP3-7.0, prescribed SSTs, with low methane concentrations", - "additional_allowed_model_components":"", "required_model_components":[ - "AGCM", - "AER", - "CHEM" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"41", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "amip-lwoff":{ + "dcppC-ipv-NexTrop-pos":{ "activity_id":[ - "CFMIP" + "DCPP" ], - "description":"As amip experiment, but with cloud-radiative effects switched off in the LW radiation code", - "start_year":"1979", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"AMIP experiment with longwave cloud-radiative effects off", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"C1.9 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", + "end_year":"", + "experiment":"idealized positive northern extratropical IPV anomaly pattern", + "experiment_id":"dcppC-ipv-NexTrop-pos", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"36", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "ssp245-nat":{ + "dcppC-ipv-neg":{ "activity_id":[ - "DAMIP" - ], - "description":"Extension of natural-only run under SSP2-4.5", - "start_year":"2021", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "hist-nat" - ], - "parent_activity_id":[ - "DAMIP" + "DCPP" ], - "experiment":"natural-only SSP2-4.5 run", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"C1.6 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", + "end_year":"", + "experiment":"idealized negative IPV anomaly pattern", + "experiment_id":"dcppC-ipv-neg", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"80", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "amip-m4K":{ + "dcppC-ipv-pos":{ "activity_id":[ - "CFMIP" + "DCPP" ], - "description":"As amip experiment but SSTs are subject to a uniform cooling of 4K", - "start_year":"1979", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"AMIP with uniform 4K SST decrease", "additional_allowed_model_components":[ "AER", - "CHEM" - ], - "required_model_components":[ - "AGCM" - ], - "tier":"2", - "min_number_yrs_per_sim":"36", - "sub_experiment_id":"None" - }, - "1pctCO2":{ - "activity_id":[ - "CMIP" + "CHEM", + "BGC" ], - "description":"DECK: 1pctCO2", - "start_year":"", + "description":"C1.5 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], + "experiment":"idealized positive IPV anomaly pattern", + "experiment_id":"dcppC-ipv-pos", + "min_number_yrs_per_sim":"10", "parent_activity_id":[ "CMIP" ], - "experiment":"1 percent per year increase in CO2", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"150", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "dcppC-amv-Trop-neg":{ + "dcppC-pac-control":{ "activity_id":[ "DCPP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"1992", - "end_year":"1999", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized negative tropical AMV anomaly pattern", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"C1.4 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", + "end_year":"", + "experiment":"idealized Pacific control", + "experiment_id":"dcppC-pac-control", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"5", - "sub_experiment_id":"of form: \"sYYYY\"" - }, - "piClim-spAer-aer":{ - "activity_id":[ - "RFMIP" - ], - "description":"Prescribed anthropogenic aerosol optical properties. Aerosol and ozone forcings", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"effective radiative forcing at present day with specified anthropogenic aerosol optical properties, all forcings", - "additional_allowed_model_components":"", - "required_model_components":[ - "AGCM" - ], - "tier":"2", - "min_number_yrs_per_sim":"", - "sub_experiment_id":"None" - }, - "piClim-SO2":{ - "activity_id":"AerChemMIP", - "description":"Perturbation from 1850 control using 2014 SO2 emissions", "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 SO2 emissions", - "additional_allowed_model_components":[ - "AGCM", - "CHEM" - ], - "required_model_components":[ - "AGCM", - "AER" + "sub_experiment_id":[ + "none" ], - "tier":"3", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "tier":"1" }, - "ssp370SST-lowBC":{ + "dcppC-pac-pacemaker":{ "activity_id":[ - "AerChemMIP" + "DCPP" ], - "description":"Future SSP3-7.0 with reduced black carbon emissions, prescribed SSTs", - "start_year":"2015", - "end_year":"2055", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSP3-7.0, prescribed SSTs, with low black carbon emissions", "additional_allowed_model_components":[ - "CHEM" - ], - "required_model_components":[ - "AGCM", - "AER" - ], - "tier":"2", - "min_number_yrs_per_sim":"41", - "sub_experiment_id":"None" - }, - "hist-piNTCF":{ - "activity_id":[ - "AerChemMIP" + "AER", + "CHEM", + "BGC" ], - "description":"Historical WMGHG and halocarbons concentrations, 1850 NTCF emissions", - "start_year":"1850", + "description":"C1.10 Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs. First full hindcast year is 2015", "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], + "experiment":"pacemaker Pacific experiment", + "experiment_id":"dcppC-pac-pacemaker", + "min_number_yrs_per_sim":"65", "parent_activity_id":[ "CMIP" ], - "experiment":"historical forcing, but with pre-industrial NTCF emissions", - "additional_allowed_model_components":[ - "CHEM", - "BGC" + "parent_experiment_id":[ + "historical" ], "required_model_components":[ - "AOGCM", - "AER" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"either 1910 or 1950", + "sub_experiment_id":[ + "s1910", + "s1950" + ], + "tier":"3" }, - "past1000":{ + "deforest-globe":{ "activity_id":[ - "PMIP" - ], - "description":"main forcings : trace gases, volcanoes, solar variability, land use", - "start_year":"850", - "end_year":"1849", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], - "parent_activity_id":[ - "CMIP" + "LUMIP" ], - "experiment":"last millenium", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], - "required_model_components":[ - "AOGCM" + "description":"Idealized deforestation experiment, 20 million km2 forest removed linearly over a period of 50 years, with an additional 30 years with no specified change in forest cover; all other forcings held constant", + "end_year":"", + "experiment":"idealized transient global deforestation", + "experiment_id":"deforest-globe", + "min_number_yrs_per_sim":"81", + "parent_activity_id":[ + "CMIP" ], - "tier":"1", - "min_number_yrs_per_sim":"1000", - "sub_experiment_id":"None" - }, - "land-crop-noIrrig":{ - "activity_id":[ - "LUMIP" + "parent_experiment_id":[ + "piControl" ], - "description":"Same as land-hist but with irrigated area held at 1850 levels", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only with no irrigation", - "additional_allowed_model_components":"", "required_model_components":[ - "LAND" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "ssp585":{ + "esm-hist":{ "activity_id":[ - "ScenarioMIP" + "CMIP" ], - "description":"Future scenario with high radiative forcing by the end of century. Following approximately RCP8.5 global forcing pathway but with new forcing based on SSP5. Concentration-driven", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"CMIP6 historical (CO2 emission-driven)", + "end_year":"2014", + "experiment":"all-forcing simulation of the recent past with atmospheric CO2 concentration calculated", + "experiment_id":"esm-hist", + "min_number_yrs_per_sim":"165", "parent_activity_id":[ "CMIP" ], - "experiment":"update of RCP8.5 based on SSP5", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "esm-piControl" ], "required_model_components":[ - "AOGCM" + "AOGCM", + "BGC" ], - "tier":"1", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "hist-stratO3":{ + "esm-hist-ext":{ "activity_id":[ - "DAMIP" + "CMIP" ], - "description":"Historical stratospheric-ozone-only. In models with coupled chemistry, the chemistry scheme should be turned off, and the simulated ensemble mean monthly mean 3D stratospheric ozone concentrations from the histALL simulations should be prescribed. Tropospheric ozone should be fixed at 3D long-term monthly mean piControl values, with a value of 100 ppbv ozone concentration in this piControl climatology used to separate the troposphere from the stratosphere. In models without coupled chemistry the same stratospheric ozone prescribed in histALL should be prescribed. Stratospheric ozone concentrations will be provided by CCMI", - "start_year":"1850", - "end_year":"2020", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Extension beyond 2014 of the CMIP6 historical (CO2 emission-driven)", + "end_year":"", + "experiment":"post-2014 all-forcing simulation with atmospheric CO2 concentration calculated", + "experiment_id":"esm-hist-ext", + "min_number_yrs_per_sim":"1", "parent_activity_id":[ "CMIP" ], - "experiment":"historical stratospheric-ozone-only run", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "esm-hist" ], "required_model_components":[ - "AOGCM" + "AOGCM", + "BGC" ], - "tier":"2", - "min_number_yrs_per_sim":"171", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "lig127k":{ + "esm-piControl":{ "activity_id":[ - "PMIP" + "CMIP" ], - "description":"main forcings : orbital parameters, ice-sheet, trace gases", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"last interglacial (127k)", "additional_allowed_model_components":[ "AER", - "CHEM", - "BGC" + "CHEM" ], - "required_model_components":[ - "AOGCM" + "description":"DECK: control (emission-driven)", + "end_year":"", + "experiment":"pre-industrial control simulation with CO2 concentration calculated", + "experiment_id":"esm-piControl", + "min_number_yrs_per_sim":"500", + "parent_activity_id":[ + "CMIP" ], - "tier":"1", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" - }, - "land-noShiftCultivate":{ - "activity_id":[ - "LUMIP" + "parent_experiment_id":[ + "esm-piControl-spinup" ], - "description":"Same as land-hist except shifting cultivation turned off. An additional LUC transitions dataset will be provided as a data layer within LUMIP LUH2 dataset with shifting cultivation deactivated", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only with shifting cultivation turned off", - "additional_allowed_model_components":"", "required_model_components":[ - "LAND" - ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" - }, - "ism-pdControl-std":{ - "activity_id":[ - "ISMIP6" + "AOGCM", + "BGC" ], - "description":"Present-day control simulation for \"offline\" ice sheets", "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"offline ice sheet forced by ISMIP6-specified AOGCM pdControl output", - "additional_allowed_model_components":"", - "required_model_components":[ - "ISM" + "sub_experiment_id":[ + "none" ], - "tier":"1", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" + "tier":"1" }, - "abrupt-4xCO2":{ + "esm-piControl-spinup":{ "activity_id":[ "CMIP" ], - "description":"DECK: abrupt4xCO2", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"DECK: spin-up portion of the control (emission-driven)", + "end_year":"", + "experiment":"pre-industrial control simulation with CO2 concentration calculated (spin-up)", + "experiment_id":"esm-piControl-spinup", + "min_number_yrs_per_sim":"100", "parent_activity_id":[ - "CMIP" + "no parent" ], - "experiment":"abrupt quadrupling of CO2", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "AOGCM", + "BGC" ], - "tier":"1", - "min_number_yrs_per_sim":"150", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "ssp585-over-bgc":{ + "esm-ssp585":{ "activity_id":[ "C4MIP" ], - "description":"", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "hist-bgc" - ], - "parent_activity_id":[ - "C4MIP" - ], - "experiment":"biogeochemically-coupled version of the RCP3.4-overshoot based on SSP5", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"Emissions-driven future scenario simulation", + "end_year":"2100", + "experiment":"emission-driven RCP8.5 based on SSP5", + "experiment_id":"esm-ssp585", + "min_number_yrs_per_sim":"85", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "esm-hist" + ], "required_model_components":[ "AOGCM", "BGC" ], - "tier":"2", - "min_number_yrs_per_sim":"85", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "sspxy":{ + "esm-ssp585-ssp126Lu":{ "activity_id":[ - "ScenarioMIP" + "LUMIP" ], - "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", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Additional land use policy sensitivity simulation for high radiative forcing scenario, keep all forcings the same as in C4MIP esmssp5-8.5 scenario except use SSP1-2.6 land use; emission driven", + "end_year":"2100", + "experiment":"emissions-driven SSP5-8.5 with SSP1-2.6 land use", + "experiment_id":"esm-ssp585-ssp126Lu", + "min_number_yrs_per_sim":"86", "parent_activity_id":[ "CMIP" ], - "experiment":"low-end scenario informing 1.5C goal", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "esm-hist" ], "required_model_components":[ - "AOGCM" + "AOGCM", + "BGC" ], - "tier":"2", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "faf-stress":{ + "faf-all":{ "activity_id":[ "FAFMIP" ], - "description":"1xCO2 experiment, parallel to piControl, forced over the ocean by surface windstress anomalies obtained from the CMIP5 ensemble mean of 1pctCO2 experiments at the time of 2xCO2", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], - "parent_activity_id":[ - "CMIP" - ], - "experiment":"control plus perturbative surface flux of momentum into ocean", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"1xCO2 experiment, parallel to piControl, forced over the ocean simultaneously by surface windstress (as in the wind experiment), net heat flux (as in the heat experiment) and net freshwater flux (as in the water experiment) anomalies obtained from the CMIP5 ensemble mean of 1pctCO2 experiments at the time of 2xCO2, using a passive tracer to prevent negative climate feedback on the heat flux applied", + "end_year":"", + "experiment":"control plus perturbative surface fluxes of momentum, heat and water into ocean", + "experiment_id":"faf-all", + "min_number_yrs_per_sim":"70", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"70", - "sub_experiment_id":"None" - }, - "1pctCO2to4x-withism":{ - "activity_id":[ - "ISMIP6" - ], - "description":"Idealized 1%/yr CO2 increase to 4xC02 over 140yrs and kept constant at 4xCO2 for an additional 200 to 400 yrs simulation that includes interactive ice sheets", "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl-withism" + "sub_experiment_id":[ + "none" ], - "parent_activity_id":[ - "ISMIP6" + "tier":"2" + }, + "faf-heat":{ + "activity_id":[ + "FAFMIP" ], - "experiment":"simulation with interactive ice sheet forced by 1 percent per year increase in CO2 to 4xCO2 (subsequently held fixed)", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], - "required_model_components":[ - "AOGCM", - "ISM" + "description":"1xCO2 experiment, parallel to piControl, forced over the ocean by surface net heat flux anomalies obtained from the CMIP5 ensemble mean of 1pctCO2 experiments at the time of 2xCO2, using a passive tracer to prevent negative climate feedback on the heat flux applied", + "end_year":"", + "experiment":"control plus perturbative surface flux of heat into ocean", + "experiment_id":"faf-heat", + "min_number_yrs_per_sim":"70", + "parent_activity_id":[ + "CMIP" ], - "tier":"1", - "min_number_yrs_per_sim":"350", - "sub_experiment_id":"None" - }, - "piClim-HC":{ - "activity_id":[ - "AerChemMIP" + "parent_experiment_id":[ + "piControl" ], - "description":"Perturbation from 1850 control using 2014 halocarbon concentrations", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 halocarbon concentrations (including chemistry)", - "additional_allowed_model_components":"", "required_model_components":[ - "AGCM", - "AER", - "CHEM" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "ssp370SST-ssp126Lu":{ + "faf-passiveheat":{ "activity_id":[ - "AerChemMIP" + "FAFMIP" ], - "description":"Future SSP3-7.0 with low land use change (from ssp126), prescribed SSTs", - "start_year":"2015", - "end_year":"2055", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSP3-7.0, prescribed SSTs, with SSP1-2.6 land use", "additional_allowed_model_components":[ - "CHEM" - ], - "required_model_components":[ - "AGCM", - "AER" + "AER", + "CHEM", + "BGC" ], - "tier":"1", - "min_number_yrs_per_sim":"41", - "sub_experiment_id":"None" - }, - "historical":{ - "activity_id":[ + "description":"1xCO2 experiment, parallel to piControl, with a flux of passive tracer added at the ocean surface at the same rate as the surface net heat flux anomaly applied in the FAFMIP heat experiment", + "end_year":"", + "experiment":"control plus surface flux of passive heat tracer into ocean", + "experiment_id":"faf-passiveheat", + "min_number_yrs_per_sim":"70", + "parent_activity_id":[ "CMIP" ], - "description":"CMIP6 historical", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", "parent_experiment_id":[ "piControl" ], - "parent_activity_id":[ - "CMIP" + "required_model_components":[ + "AOGCM" + ], + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "faf-stress":{ + "activity_id":[ + "FAFMIP" ], - "experiment":"all-forcing simulation of the recent past", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"1xCO2 experiment, parallel to piControl, forced over the ocean by surface windstress anomalies obtained from the CMIP5 ensemble mean of 1pctCO2 experiments at the time of 2xCO2", + "end_year":"", + "experiment":"control plus perturbative surface flux of momentum into ocean", + "experiment_id":"faf-stress", + "min_number_yrs_per_sim":"70", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "midHolocene":{ + "faf-water":{ "activity_id":[ - "PMIP" + "FAFMIP" ], - "description":"main forcings : trace gases, orbital parameters, dust", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"mid-Holocene", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"1xCO2 experiment, parallel to piControl, forced over the ocean by surface net freshwater flux anomalies obtained from the CMIP5 ensemble mean of 1pctCO2 experiments at the time of 2xCO2", + "end_year":"", + "experiment":"control plus perturbative surface flux of water into ocean", + "experiment_id":"faf-water", + "min_number_yrs_per_sim":"70", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"200", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "amip-TIP":{ + "futureSST-4xCO2-solar":{ "activity_id":[ - "GMMIP" + "GeoMIP" ], - "description":"The topography of the TIP is modified by setting surface elevations to 500m; to understand the combined thermal and mechanical forcing of the TIP. Same model as DECK", - "start_year":"1979", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"same as \"amip\" run, but surface elevations of the Tibetan-Iranian Plateau and Himalayas reduced to 500m", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"Time slice at year 100 of G1ext to examine radiative forcing of abrupt4xCO2 and G1", + "end_year":"", + "experiment":"year 100 SSTs from abrupt4xCO2 with quadrupled CO2 and solar reduction", + "experiment_id":"futureSST-4xCO2-solar", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "GeoMIP" + ], + "parent_experiment_id":[ + "G1" + ], "required_model_components":[ "AGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"35", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "land-cCO2":{ + "highres-future":{ "activity_id":[ - "LUMIP" + "HighResMIP" + ], + "additional_allowed_model_components":[ + "AER" + ], + "description":"Coupled integrations with SSP5 forcing (nearest to CMIP5 RCP8.5 (as in highresSST-future)", + "end_year":"2050", + "experiment":"coupled future 2015-2050 using a scenario as close to CMIP5 RCP8.5 as possible within CMIP6", + "experiment_id":"highres-future", + "min_number_yrs_per_sim":"36", + "parent_activity_id":[ + "HighResMIP" + ], + "parent_experiment_id":[ + "hist-1950" ], - "description":"Same as land-hist except with CO2 held constant", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only constant CO2", - "additional_allowed_model_components":"", "required_model_components":[ - "LAND" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "highresSST-LAI":{ + "highresSST-4co2":{ "activity_id":[ "HighResMIP" ], - "description":"Forced global atmosphere-land simulations as highresSST-present, but using an common LAI dataset across models", - "start_year":"1951", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "highresSST-present" + "additional_allowed_model_components":[ + "AER" ], + "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", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ "HighResMIP" ], - "experiment":"common LAI dataset within the highresSST-present experiment", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "highresSST-present" ], "required_model_components":[ "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"64", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "faf-water":{ + "highresSST-LAI":{ "activity_id":[ - "FAFMIP" + "HighResMIP" ], - "description":"1xCO2 experiment, parallel to piControl, forced over the ocean by surface net freshwater flux anomalies obtained from the CMIP5 ensemble mean of 1pctCO2 experiments at the time of 2xCO2", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER" ], + "description":"Forced global atmosphere-land simulations as highresSST-present, but using an common LAI dataset across models", + "end_year":"2014", + "experiment":"common LAI dataset within the highresSST-present experiment", + "experiment_id":"highresSST-LAI", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "CMIP" + "HighResMIP" ], - "experiment":"control plus perturbative surface flux of water into ocean", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "highresSST-present" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"70", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "ism-historical-self":{ + "highresSST-future":{ "activity_id":[ - "ISMIP6" + "HighResMIP" ], - "description":"Historical simulation using \"offline\" ice sheet models. Forcing for ice sheet model is from its own AOGCM", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "ism-piControl-self" + "additional_allowed_model_components":[ + "AER" ], + "description":"Extend highresSST-present to 2050 with agreed SSP5/RCP8.5 forcings (with option to extend further to 2100)", + "end_year":"2050", + "experiment":"forced atmosphere experiment for 2015-2050 using SST/sea-ice derived from CMIP5 RCP8.5 simulations and a scenario as close to RCP8.5 as possible within CMIP6", + "experiment_id":"highresSST-future", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "ISMIP6" + "HighResMIP" + ], + "parent_experiment_id":[ + "highresSST-present" ], - "experiment":"offline ice sheet forced by ISM's own AOGCM historical output", - "additional_allowed_model_components":"", "required_model_components":[ - "ISM" + "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "volc-pinatubo-full":{ + "highresSST-p4K":{ "activity_id":[ - "VolMIP" + "HighResMIP" ], - "description":"1991 Pinatubo forcing as used in the CMIP6 historical simulations. Requires special diagnostics of radiative and latent heating rates. A large number of ensemble members is required to address internal atmospheric variability", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER" ], + "description":"Similar to CFMIP amip-p4K, add a uniform warming of 4K to highresSST-present SSTs and run the experiment parallel to highresSST-present", + "end_year":"2014", + "experiment":"uniform 4K warming of highresSST-present SST", + "experiment_id":"highresSST-p4K", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "CMIP" + "HighResMIP" ], - "experiment":"Pinatubo experiment", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "highresSST-present" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"3", - "sub_experiment_id":"None" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "land-hist-altLu1":{ - "activity_id":"LUMIP", - "description":"Land only simulations", - "start_year":"1850 or 1700", + "highresSST-present":{ + "activity_id":[ + "HighResMIP" + ], + "additional_allowed_model_components":[ + "AER" + ], + "description":"Forced global atmosphere-land simulations using daily 1/4 degree SST and sea-ice forcings, and aerosol optical properties (not emissions) to constrain model spread", "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only alternate land-use history", - "additional_allowed_model_components":"", + "experiment":"forced atmosphere experiment for 1950-2014", + "experiment_id":"highresSST-present", + "min_number_yrs_per_sim":"65", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ - "LAND" + "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"1950", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "dcppA-assim":{ + "highresSST-smoothed":{ "activity_id":[ - "DCPP" + "HighResMIP" ], - "description":"Assimilation runs used to generate initial conditions for hindcasts if used", - "start_year":"", - "end_year":"", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"assimilation run (if available) that is used to generate initial conditions for hindcasts and which parallels the historical simulation and uses the same forcing", "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "AER" + ], + "description":"Forced global atmosphere-land simulations as highresSST-present, but using smoothed SST to investigate impact of SST variability", + "end_year":"2014", + "experiment":"smoothed SST version of highresSST-present", + "experiment_id":"highresSST-smoothed", + "min_number_yrs_per_sim":"36", + "parent_activity_id":[ + "HighResMIP" + ], + "parent_experiment_id":[ + "highresSST-present" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"1979", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "G7cirrus":{ + "hist-1950":{ "activity_id":[ - "GeoMIP" + "HighResMIP" ], - "description":"Against a background of the ScenarioMIP high forcing, reduce cirrus cloud optical depth by a constant amount", - "start_year":"2020", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "AER" ], + "description":"Coupled integrationswith historic external forcings (as in highresSST-present)", + "end_year":"2014", + "experiment":"coupled historical 1950-2014", + "experiment_id":"hist-1950", + "min_number_yrs_per_sim":"65", "parent_activity_id":[ - "CMIP" + "HighResMIP" ], - "experiment":"increase cirrus ice crystal fall speed to reduce net forcing in SSP585 by 1 W m-2", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "spinup-1950" ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"81", - "sub_experiment_id":"None" - }, - "land-hist-altLu2":{ - "activity_id":"LUMIP", - "description":"Land only simulations", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only alternate land use history", - "additional_allowed_model_components":"", - "required_model_components":[ - "LAND" + "start_year":"1950", + "sub_experiment_id":[ + "none" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "tier":"2" }, - "ssp245":{ + "hist-1950HC":{ "activity_id":[ - "ScenarioMIP" + "AerChemMIP" ], - "description":"Future scenario with medium radiative forcing by the end of century. Following approximately RCP4.5 global forcing pathway but with new forcing based on SSP2. Concentration-driven", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "BGC" ], + "description":"Historical WMGHG concentrations and NTCF emissions, 1950 halocarbon concentrations, start 1950", + "end_year":"2014", + "experiment":"historical forcing, but with1950s halocarbon concentrations; initialized in 1950", + "experiment_id":"hist-1950HC", + "min_number_yrs_per_sim":"65", "parent_activity_id":[ "CMIP" ], - "experiment":"update of RCP4.5 based on SSP2", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "historical" ], "required_model_components":[ - "AOGCM" + "AOGCM", + "AER", + "CHEM" ], - "tier":"1", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" + "start_year":"1950", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "dcppA-hindcast-niff":{ + "hist-CO2":{ "activity_id":[ - "DCPP" - ], - "description":"Decadal hindcasts begun each year from 1960 to present, or every other year at minimum, but with no information from the future", - "start_year":"1960", - "end_year":"present (to 2019)", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":[ - "dcppA-assim", - "" - ], - "parent_activity_id":[ - "DCPP" + "DAMIP" ], - "experiment":"hindcast initialized from observations without future observed forcing after initialization", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Historical CO2-only run", + "end_year":"2020", + "experiment":"historical CO2-only run", + "experiment_id":"hist-CO2", + "min_number_yrs_per_sim":"171", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"4", - "min_number_yrs_per_sim":"300", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "piControl":{ + "hist-GHG":{ "activity_id":[ - "CMIP" - ], - "description":"DECK: control", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl-spinup" - ], - "parent_activity_id":[ - "CMIP" + "DAMIP" ], - "experiment":"pre-industrial control", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Historical well-mixed GHG-only run. Models with interactive chemistry schemes should either turn off the chemistry or use a preindustrial climatology of stratospheric and tropospheric ozone in their radiation schemes. This will ensure that ozone is fixed in all these simulations, and simulated responses in models with and without coupled chemistry are comparable", + "end_year":"2020", + "experiment":"historical well-mixed GHG-only run", + "experiment_id":"hist-GHG", + "min_number_yrs_per_sim":"171", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"500", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "esm-piControl":{ + "hist-aer":{ "activity_id":[ - "CMIP" + "DAMIP" ], - "description":"DECK: control (emission-driven)", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "esm-piControl-spinup" + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" ], + "description":"Historical anthropogenic-Aerosols-only run", + "end_year":"2020", + "experiment":"historical anthropogenic aerosols-only run", + "experiment_id":"hist-aer", + "min_number_yrs_per_sim":"171", "parent_activity_id":[ "CMIP" ], - "experiment":"pre-industrial control simulation with CO2 concentration calculated", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM", - "BGC" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"500", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "piClim-control":{ + "hist-all-aer2":{ "activity_id":[ - "RFMIP", - "AerChemMIP" + "DAMIP" ], - "description":"30-year atmosphere only integration using preindustrial sea-surface temperature and sea-ice climatology. Interactive vegetation", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"effective radiative forcing in present-day", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" ], - "required_model_components":[ - "AGCM" + "description":"Historical ALL forcing run with alternate estimates of aerosol concentrations/emissions", + "end_year":"2020", + "experiment":"historical ALL-forcing run with alternate estimates of aerosol forcing", + "experiment_id":"hist-all-aer2", + "min_number_yrs_per_sim":"171", + "parent_activity_id":[ + "CMIP" ], - "tier":"1", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" - }, - "land-cClim":{ - "activity_id":[ - "LUMIP" + "parent_experiment_id":[ + "piControl" ], - "description":"Same as land-hist except with climate held constant", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only constant climate", - "additional_allowed_model_components":"", "required_model_components":[ - "LAND" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "hist-aer":{ + "hist-all-nat2":{ "activity_id":[ "DAMIP" ], - "description":"Historical anthropogenic-Aerosols-only run", - "start_year":"1850", - "end_year":"2020", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], - "parent_activity_id":[ - "CMIP" - ], - "experiment":"historical anthropogenic aerosols-only run", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Historical ALL forcing run with alternates estimate of solar and volcanic forcing", + "end_year":"2020", + "experiment":"historical ALL-forcing run with alternate estimates of natural forcing", + "experiment_id":"hist-all-nat2", + "min_number_yrs_per_sim":"171", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"171", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "ssp370-ssp126Lu":{ + "hist-bgc":{ "activity_id":[ - "LUMIP" + "C4MIP" ], - "description":"Additional land use policy sensitivity simulation for high radiative forcing scenario, keep all forcings the same as ScenarioMIP SSP3-7 (deforestation scenario), but replace land use from SSP1-2.6 (afforestation) scenario; concentration-driven", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Concentration-driven historical simulation, biogeochemically-coupled", + "end_year":"2014", + "experiment":"biogeochemically-coupled version of the simulation of the recent past with CO2 concentration prescribed", + "experiment_id":"hist-bgc", + "min_number_yrs_per_sim":"165", "parent_activity_id":[ "CMIP" ], - "experiment":"SSP3-7.0 with SSP1-2.6 land use", + "parent_experiment_id":[ + "piControl" + ], + "required_model_components":[ + "AOGCM", + "BGC" + ], + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "hist-nat":{ + "activity_id":[ + "DAMIP" + ], "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Historical natural-only run", + "end_year":"2020", + "experiment":"historical natural-only run", + "experiment_id":"hist-nat", + "min_number_yrs_per_sim":"171", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "dcppC-hindcast-noAgung":{ + "hist-noLu":{ "activity_id":[ - "DCPP" - ], - "description":"Effects of volcanoes on decadal prediction and predictability of forced and internal variability components", - "start_year":"1963", - "end_year":"1963", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":[ - "dcppA-assim", - "" - ], - "parent_activity_id":[ - "DCPP" + "LUMIP" ], - "experiment":"", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Same as CMIP6 historical but with land cover held at 1850, no human activity; concentration driven", + "end_year":"2014", + "experiment":"historical with no land-use change", + "experiment_id":"hist-noLu", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"5", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "amip-hld":{ + "hist-piAer":{ "activity_id":[ - "GMMIP" + "AerChemMIP" ], - "description":"The topography of the highlands in Africa, N. America and S. America TP is modified by setting surface elevations to a certain height (500m). Same model as DECK", - "start_year":"1979", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"same as \"amip\" run, but surface elevations of the East African Highlands in Africa, Sierra Madre in N. America and Andes in S. America reduced to 500m", "additional_allowed_model_components":[ - "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"Historical WMGHG, halocarbon concentrations and O3 precursor emissions, 1850 aerosol precursor emissions", + "end_year":"2014", + "experiment":"historical forcing, but with pre-industrial aerosol emissions", + "experiment_id":"hist-piAer", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM", + "AER" ], - "tier":"3", - "min_number_yrs_per_sim":"35", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piSST-pxK":{ + "hist-piNTCF":{ "activity_id":[ - "CFMIP" + "AerChemMIP" ], - "description":"Same as piSST, but with a spatially and temporally uniform SST anomaly applied on top of the monthly-varying piSST SSTs. The magnitude of the uniform increase is taken from each model's global, climatological annual mean SST change between abrupt4xCO2 minus piControl (using the mean of years 111-140 of abrupt4xCO2, and the parallel 30-year section of piControl)", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"as piSST with uniform SST increase with magnitude based on abrupt4xCO2 response", "additional_allowed_model_components":[ - "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"Historical WMGHG and halocarbons concentrations, 1850 NTCF emissions", + "end_year":"2014", + "experiment":"historical forcing, but with pre-industrial NTCF emissions", + "experiment_id":"hist-piNTCF", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM", + "AER" ], - "tier":"2", - "min_number_yrs_per_sim":"20", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "dcppC-ipv-neg":{ + "hist-resAMO":{ "activity_id":[ - "DCPP" + "GMMIP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"control", - "end_year":"", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized negative IPV anomaly pattern", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Pacemaker 20th century historical run that includes all forcing as used in CMIP6 Historical Simulation, and the observational historical SST is restored in the AMO domain (0deg-70degN, 70degW-0deg)", + "end_year":"2014", + "experiment":"initialized from \"historical\" run year 1870 and SSTs in the AMO domain (0deg-70degN, 70degW-0deg) restored to AMIP SSTs with historical forcings", + "experiment_id":"hist-resAMO", + "min_number_yrs_per_sim":"145", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"25", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"1870", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "amip-4xCO2":{ + "hist-resIPO":{ "activity_id":[ - "CFMIP" + "GMMIP" ], - "description":"As CMIP5/CFMIP-2 amip4xCO2 experiment. AMIP experiment where SSTs are held at control values and the CO2 seen by the radiation scheme is quadrupled", - "start_year":"1979", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"AMIP SSTs with 4xCO2", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" ], - "required_model_components":[ - "AGCM" + "description":"Pacemaker 20th century historical run that includes all forcing as used in CMIP6 Historical Simulation, and the observational historical SST is restored in the tropical lobe of the IPO domain (20degS-20degN, 175degE-75degW)", + "end_year":"2014", + "experiment":"initialized from \"historical\" run year 1870 and SSTs in tropical lobe of the IPO domain (20degS-20degN, 175degE-75degW) restored to AMIP SSTs with historical forcings", + "experiment_id":"hist-resIPO", + "min_number_yrs_per_sim":"145", + "parent_activity_id":[ + "CMIP" ], - "tier":"1", - "min_number_yrs_per_sim":"36", - "sub_experiment_id":"None" - }, - "land-noPasture":{ - "activity_id":[ - "LUMIP" + "parent_experiment_id":[ + "historical" ], - "description":"Same as land-hist but with grazing and other management on pastureland held at 1850 levels/distribution, i.e. all new pastureland is treated as unmanaged grassland (as in land-crop-grass)", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only with constant pastureland", - "additional_allowed_model_components":"", "required_model_components":[ - "LAND" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"1870", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "amip-p4K":{ + "hist-sol":{ "activity_id":[ - "CFMIP" + "DAMIP" ], - "description":"As CMIP5/CFMIP-2 amip4K experiment. AMIP experiment where SSTs are subject to a uniform warming of 4K", - "start_year":"1979", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"AMIP with uniform 4K SST increase", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"Historical solar-only transient simulation using settings from CMIP6 historical simulation but fixed GHG and ODS (1850 level)", + "end_year":"2020", + "experiment":"historical solar-only run", + "experiment_id":"hist-sol", + "min_number_yrs_per_sim":"171", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"36", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "hist-bgc":{ + "hist-spAer-aer":{ "activity_id":[ - "C4MIP" + "RFMIP" ], - "description":"Concentration-driven historical simulation, biogeochemically-coupled", - "start_year":"1850", + "additional_allowed_model_components":"", + "description":"Prescribed anthropogenic aerosol optical properties. Changes in aerosols only", "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], + "experiment":"historical simulation with specified anthropogenic aerosols, no other forcings", + "experiment_id":"hist-spAer-aer", + "min_number_yrs_per_sim":"165", "parent_activity_id":[ "CMIP" ], - "experiment":"biogeochemically-coupled version of the simulation of the recent past with CO2 concentration prescribed", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM", - "BGC" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "amip-future4K":{ + "hist-spAer-all":{ "activity_id":[ - "CFMIP" + "RFMIP" ], - "description":"As CMIP5/CFMIP-2 amipFuture experiment. AMIP experiment where SSTs are subject to a composite SST warming pattern derived from coupled models, scaled to an ice-free ocean mean of 4K", - "start_year":"1979", + "additional_allowed_model_components":"", + "description":"Prescribed anthropogenic aerosol optical properties. All forcings", "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"AMIP with patterned 4K SST increase", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "experiment":"historical simulation with specified anthropogenic aerosols", + "experiment_id":"hist-spAer-all", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"36", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "1pctCO2-bgc":{ + "hist-stratO3":{ "activity_id":[ - "C4MIP" + "DAMIP" ], - "description":"Biogeochemically-coupled specified concentration simulation in which CO2 increases at a rate of 1% per year until quadrupling", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER", + "BGC" ], + "description":"Historical stratospheric-ozone-only. In models with coupled chemistry, the chemistry scheme should be turned off, and the simulated ensemble mean monthly mean 3D stratospheric ozone concentrations from the CMIP6 historical simulations should be prescribed. Tropospheric ozone should be fixed at 3D long-term monthly mean piControl values, with a value of 100 ppbv ozone concentration in this piControl climatology used to separate the troposphere from the stratosphere. In models without coupled chemistry the same stratospheric ozone prescribed in the CMIP6 historical simulations should be prescribed. Stratospheric ozone concentrations will be provided by CCMI", + "end_year":"2020", + "experiment":"historical stratospheric-ozone-only run", + "experiment_id":"hist-stratO3", + "min_number_yrs_per_sim":"171", "parent_activity_id":[ "CMIP" ], - "experiment":"biogeochemically-coupled version of 1 percent per year increasing CO2 experiment", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM", - "BGC" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"150", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "futureSST-4xCO2-solar":{ + "hist-volc":{ "activity_id":[ - "GeoMIP" + "DAMIP" ], - "description":"Time slice at 1949 (picontrol) for G1ext to examine radiative forcing of abrupt4xCO2 and G1", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"year 100 SSTs from abrupt4xCO2 with quadrupled CO2 and solar reduction", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"Historical volcanic-only run", + "end_year":"2020", + "experiment":"historical volcanic-only run", + "experiment_id":"hist-volc", + "min_number_yrs_per_sim":"171", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "aqua-4xCO2":{ + "histSST":{ "activity_id":[ - "CFMIP" + "AerChemMIP" ], - "description":"Extended version of CMIP5/CFMIP-2 aqua4xCO2 experiment. Aquaplanet experiment where SSTs are held at control values and the CO2 seen by the radiation scheme is quadrupled", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"aquaplanet with control SST and 4xCO2", "additional_allowed_model_components":[ - "AER", "CHEM" ], + "description":"Historical transient with SSTs prescribed from historical", + "end_year":"2014", + "experiment":"historical prescribed SSTs and historical forcing", + "experiment_id":"histSST", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ - "AGCM" + "AGCM", + "AER" ], - "tier":"1", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "land-hist-princeton":{ + "histSST-1950HC":{ "activity_id":[ - "LS3MIP" + "AerChemMIP" ], - "description":"Land only simulations", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"as land-hist with Princeton forcings", "additional_allowed_model_components":"", + "description":"Historical WMGHG concentrations and NTCF emissions, 1950 halocarbon concentrations", + "end_year":"2014", + "experiment":"historical SSTs and historical forcing, but with1950 halocarbon concentrations", + "experiment_id":"histSST-1950HC", + "min_number_yrs_per_sim":"65", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ - "LAND" + "AGCM", + "AER", + "CHEM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"1950", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "volc-cluster-mill":{ + "histSST-piAer":{ "activity_id":[ - "VolMIP" + "AerChemMIP" ], - "description":"Parallel experiment to volc-cluster-ctrl but with initial conditions taken from last millennium simulation to account for the effects of a more realistic history of past natural forcing. All forcings except volcanic kept constant from year AD 1790 on", - "start_year":"1790", - "end_year":"1858", - "sub_experiment":"None", - "parent_experiment_id":[ - "past1000" + "additional_allowed_model_components":[ + "CHEM" ], + "description":"Historical WMGHG, halocarbon concentrations and tropospheric ozone precursors emissions, 1850 aerosol precursor emissions, prescribed SSTs", + "end_year":"2014", + "experiment":"historical SSTs and historical forcing, but with pre-industrial aerosol emissions", + "experiment_id":"histSST-piAer", + "min_number_yrs_per_sim":"165", "parent_activity_id":[ - "PMIP" + "no parent" ], - "experiment":"19th century volcanic cluster initialized from past1000", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "AGCM", + "AER" ], - "tier":"3", - "min_number_yrs_per_sim":"69", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piClim-NOx":{ + "histSST-piCH4":{ "activity_id":[ "AerChemMIP" ], - "description":"Perturbation from 1850 control using 2014 NOx emissions", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 NOx emissions", "additional_allowed_model_components":"", + "description":"Historical (non-CH4) WMGHG concentrations and NTCF emissions, 1850 CH4 concentrations", + "end_year":"2014", + "experiment":"historical SSTs and historical forcing, but with pre-industrial methane concentrations", + "experiment_id":"histSST-piCH4", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AGCM", "AER", "CHEM" ], - "tier":"3", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "piClim-2xss":{ + "histSST-piN2O":{ "activity_id":[ "AerChemMIP" ], - "description":"1850 control with doubled sea salt emissions", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with doubled emissions of sea salt", "additional_allowed_model_components":[ + "BGC" + ], + "description":"Historical (non-N2O) WMGHG concentrations and NTCF emissions, 1850 N2O concentrations", + "end_year":"2014", + "experiment":"historical SSTs and historical forcings, but with pre-industrial N2O concentrations", + "experiment_id":"histSST-piN2O", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "AGCM", + "AER", "CHEM" ], + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "histSST-piNTCF":{ + "activity_id":[ + "AerChemMIP" + ], + "additional_allowed_model_components":[ + "CHEM", + "BGC" + ], + "description":"Historical WMGHG concentrations and halocarbons emissions, 1850 NTCF emissions, prescribed SSTs", + "end_year":"2014", + "experiment":"historical SSTs and historical forcing, but with pre-industrial NTCF emissions", + "experiment_id":"histSST-piNTCF", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AGCM", "AER" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, "histSST-piO3":{ "activity_id":[ "AerChemMIP" ], + "additional_allowed_model_components":"", "description":"Historical WMGHG, halocarbon concentrations and aerosol precursor emissions, 1850 tropospheric ozone precursors emissions, prescribed SSTs", - "start_year":"1850", "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", "experiment":"historical SSTs and historical forcing, but with pre-industrial ozone precursor emissions", - "additional_allowed_model_components":"", + "experiment_id":"histSST-piO3", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AGCM", "AER", "CHEM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" - }, - "hist-sol":{ - "activity_id":[ - "DAMIP" - ], - "description":"Historical solar-only transient simulation using settings from CMIP6 historical simulation but fixed GHG&ODS (1850 level)", "start_year":"1850", - "end_year":"2020", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "sub_experiment_id":[ + "none" ], - "parent_activity_id":[ + "tier":"2" + }, + "historical":{ + "activity_id":[ "CMIP" ], - "experiment":"historical solar-only run", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], - "required_model_components":[ - "AOGCM" - ], - "tier":"3", - "min_number_yrs_per_sim":"171", - "sub_experiment_id":"None" - }, - "ssp126-ssp370Lu":{ - "activity_id":[ - "LUMIP" - ], - "description":"Additional land use policy sensitivity simulation for low radiative forcing scenario, keep all forcings the same as ScenarioMIP SSP1-2.6 (afforestation scenario), but replace land use from SSP3-7 (afforestation) scenario; concentration-driven", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" - ], + "description":"CMIP6 historical", + "end_year":"2014", + "experiment":"all-forcing simulation of the recent past", + "experiment_id":"historical", + "min_number_yrs_per_sim":"165", "parent_activity_id":[ "CMIP" ], - "experiment":"SSP1-2.6 with SSP3-7.0 land use", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" - }, - "amip-lfmip-pObs":{ - "activity_id":[ - "LS3MIP" - ], - "description":"Land-hist land conditions; AMIP SSTs", - "start_year":"1980", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"prescribed land (from pseudo-observations) and AMIP SSTs", - "additional_allowed_model_components":[ - "AER", - "CHEM" - ], - "required_model_components":[ - "AGCM" + "start_year":"1850", + "sub_experiment_id":[ + "none" ], - "tier":"2", - "min_number_yrs_per_sim":"121", - "sub_experiment_id":"None" + "tier":"1" }, - "piControl-spinup":{ + "historical-ext":{ "activity_id":[ "CMIP" ], - "description":"DECK: spin-up portion of the control", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial control (spin-up)", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Extension beyond 2014 of the CMIP6 historical", + "end_year":"present", + "experiment":"post-2014 all-forcing simulation", + "experiment_id":"historical-ext", + "min_number_yrs_per_sim":"1", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "ssp245-aer":{ + "historical-withism":{ "activity_id":[ - "DAMIP" - ], - "description":"Extension of aerosol-only run under SSP2-4.5", - "start_year":"2021", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "hist-aer" - ], - "parent_activity_id":[ - "DAMIP" + "ISMIP6" ], - "experiment":"aerosol-only SSP2-4.5 run", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], - "required_model_components":[ - "AOGCM" + "description":"Historical simulation that includes interactive ice sheets. Set up follows the historical experiment", + "end_year":"2014", + "experiment":"historical with interactive ice sheet", + "experiment_id":"historical-withism", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "ISMIP6" ], - "tier":"3", - "min_number_yrs_per_sim":"80", - "sub_experiment_id":"None" - }, - "piClim-spAer-histall":{ - "activity_id":[ - "RFMIP" + "parent_experiment_id":[ + "piControl-withism" ], - "description":"Prescribed anthropogenic aerosol optical properties. Aerosol and ozone forcings", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"transient effective radiative forcing with specified anthropogenic aerosol optical properties, all forcings", - "additional_allowed_model_components":"", "required_model_components":[ - "AGCM" + "AOGCM", + "ISM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "abrupt-solm4p":{ + "ism-1pctCO2to4x-self":{ "activity_id":[ - "CFMIP" + "ISMIP6" ], - "description":"Conceptually similar to abrupt 4xCO2 DECK experiment, except that the solar constant rather than CO2 is abruptly reduced by 4%", - "start_year":"", + "additional_allowed_model_components":"", + "description":"Idealized 1%/yr CO2 increase to 4xC02 over 140yrs and kept constant at 4xCO2 for an additional 200 to 400 yrs simulation with ice sheets forced \"offline\" with DECK 1pctCO2 using forcing from its own AOGCM", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], + "experiment":"offline ice sheet model forced by ISM's own AOGCM 1pctCO2to4x output", + "experiment_id":"ism-1pctCO2to4x-self", + "min_number_yrs_per_sim":"350", "parent_activity_id":[ - "CMIP" + "ISMIP6" ], - "experiment":"abrupt 4% decrease in solar constant", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "ism-piControl-self" ], "required_model_components":[ - "AGCM" + "ISM" ], - "tier":"2", - "min_number_yrs_per_sim":"150", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "dcppC-atl-pacemaker":{ + "ism-1pctCO2to4x-std":{ "activity_id":[ - "DCPP" + "ISMIP6" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"", + "additional_allowed_model_components":"", + "description":"Idealized 1%/yr CO2 increase to 4xC02 over 140yrs and kept constant at 4xCO2 for an additional 200 to 400 yrs simulation with ice sheets forced \"offline\" with DECK 1pctCO2 using a standard forcing", "end_year":"", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pacemaker atlantic experiment", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "experiment":"offline ice sheet model forced by ISMIP6-specified AOGCM 1pctCO2to4x output", + "experiment_id":"ism-1pctCO2to4x-std", + "min_number_yrs_per_sim":"350", + "parent_activity_id":[ + "ISMIP6" + ], + "parent_experiment_id":[ + "ism-pdControl-std" ], "required_model_components":[ - "AOGCM" + "ISM" ], - "tier":"3", - "min_number_yrs_per_sim":"", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "highresSST-smoothed":{ + "ism-amip-std":{ "activity_id":[ - "HighResMIP" + "ISMIP6" ], - "description":"Forced global atmosphere-land simulations as highresSST-present, but using smoothed SST to investigate impact of SST variability", - "start_year":"1951", + "additional_allowed_model_components":"", + "description":"Offline ice sheet evolution for the last few decades forced by amip", "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "highresSST-present" - ], + "experiment":"offline ice sheet forced by ISMIP6-specified AGCM AMIP output", + "experiment_id":"ism-amip-std", + "min_number_yrs_per_sim":"36", "parent_activity_id":[ - "HighResMIP" + "ISMIP6" ], - "experiment":"smoothed SST version of highresSST-present", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "ism-ctrl-std" ], "required_model_components":[ - "AGCM" + "ISM" + ], + "start_year":"1979", + "sub_experiment_id":[ + "none" ], - "tier":"1", - "min_number_yrs_per_sim":"64", - "sub_experiment_id":"None" + "tier":"3" }, - "dcppB-forecast":{ + "ism-asmb-std":{ "activity_id":[ - "DCPP" - ], - "description":"Ongoing decadal forecasts", - "start_year":"present", - "end_year":"ongoing each year", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":[ - "dcppA-assim", - "" + "ISMIP6" ], + "additional_allowed_model_components":"", + "description":"Offline ice sheet simulation with synthetic atmospheric dataset to explore the uncertainty in sea level due to ice sheet initialization", + "end_year":"", + "experiment":"offline ice sheet forced by initMIP synthetic atmospheric experiment", + "experiment_id":"ism-asmb-std", + "min_number_yrs_per_sim":"100", "parent_activity_id":[ - "DCPP" + "ISMIP6" ], - "experiment":"year 1-5 forecast initialized from observations", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "ism-ctrl-std" ], "required_model_components":[ - "AOGCM" + "ISM" ], - "tier":"1", - "min_number_yrs_per_sim":"5", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "hist-spAer-aer":{ + "ism-bsmb-std":{ "activity_id":[ - "RFMIP" - ], - "description":"Prescribed anthropogenic aerosol optical properties. Changes in aerosols only", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "ISMIP6" ], + "additional_allowed_model_components":"", + "description":"Offline ice sheet simulation with synthetic oceanic dataset to explore the uncertainty in sea level due to ice sheet initialization", + "end_year":"", + "experiment":"offline ice sheet forced by initMIP synthetic oceanic experiment", + "experiment_id":"ism-bsmb-std", + "min_number_yrs_per_sim":"100", "parent_activity_id":[ - "CMIP" + "ISMIP6" + ], + "parent_experiment_id":[ + "ism-ctrl-std" ], - "experiment":"historical simulation with specified anthropogenic aerosols, no other forcings", - "additional_allowed_model_components":"", "required_model_components":[ - "AOGCM" + "ISM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "hist-CO2":{ + "ism-ctrl-std":{ "activity_id":[ - "DAMIP" - ], - "description":"Historical CO2-only run", - "start_year":"1850", - "end_year":"2020", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "ISMIP6" ], + "additional_allowed_model_components":"", + "description":"Offline ice sheet control run for the initMIP experiment that explores the uncertainty in sea level due to ice sheet initialization", + "end_year":"", + "experiment":"offline ice sheet model initMIP control", + "experiment_id":"ism-ctrl-std", + "min_number_yrs_per_sim":"100", "parent_activity_id":[ - "CMIP" + "no parent" ], - "experiment":"historical CO2-only run", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "ISM" ], - "tier":"3", - "min_number_yrs_per_sim":"171", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "piClim-spAer-anthro":{ + "ism-historical-self":{ "activity_id":[ - "RFMIP" + "ISMIP6" + ], + "additional_allowed_model_components":"", + "description":"Historical simulation using \"offline\" ice sheet models. Forcing for ice sheet model is from its own AOGCM", + "end_year":"2014", + "experiment":"offline ice sheet forced by ISM's own AOGCM historical output", + "experiment_id":"ism-historical-self", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "ISMIP6" + ], + "parent_experiment_id":[ + "ism-piControl-self" + ], + "required_model_components":[ + "ISM" + ], + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "ism-historical-std":{ + "activity_id":[ + "ISMIP6" + ], + "additional_allowed_model_components":"", + "description":"Historical simulation using \"offline\" ice sheet models. Forcing for ice sheet model is the standard dataset based on CMIP6 AOGCM historical", + "end_year":"2014", + "experiment":"offline ice sheet forced by ISMIP6-specified AOGCM historical output", + "experiment_id":"ism-historical-std", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "ISMIP6" + ], + "parent_experiment_id":[ + "ism-pdControl-std" + ], + "required_model_components":[ + "ISM" + ], + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "ism-lig127k-std":{ + "activity_id":[ + "ISMIP6" + ], + "additional_allowed_model_components":"", + "description":"Last interglacial simulation of ice sheet evolution driven by PMIP lig127k", + "end_year":"", + "experiment":"offline ice sheet forced by ISMIP6-specified AGCM last interglacial output", + "experiment_id":"ism-lig127k-std", + "min_number_yrs_per_sim":"20000", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "ISM" + ], + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" + }, + "ism-pdControl-std":{ + "activity_id":[ + "ISMIP6" + ], + "additional_allowed_model_components":"", + "description":"Present-day control simulation for \"offline\" ice sheets", + "end_year":"", + "experiment":"offline ice sheet forced by ISMIP6-specified AOGCM pdControl output", + "experiment_id":"ism-pdControl-std", + "min_number_yrs_per_sim":"100", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "ISM" + ], + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" + }, + "ism-piControl-self":{ + "activity_id":[ + "ISMIP6" + ], + "additional_allowed_model_components":"", + "description":"Pre-industrial control simulation for \"offline\" ice sheets", + "end_year":"", + "experiment":"offline ice sheet forced by ISM's own AOGCM piControl output", + "experiment_id":"ism-piControl-self", + "min_number_yrs_per_sim":"500", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "ISM" + ], + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" + }, + "ism-ssp585-self":{ + "activity_id":[ + "ISMIP6" + ], + "additional_allowed_model_components":"", + "description":"Future climate ScenarioMIP SSP5-8.5 simulation using \"offline\" ice sheet models. Forcing for ice sheet model is from its own AOGCM", + "end_year":"2300", + "experiment":"offline ice sheet forced by ISM's own AOGCM ssp585 output", + "experiment_id":"ism-ssp585-self", + "min_number_yrs_per_sim":"85", + "parent_activity_id":[ + "ISMIP6" + ], + "parent_experiment_id":[ + "ism-historical-self" + ], + "required_model_components":[ + "ISM" + ], + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "ism-ssp585-std":{ + "activity_id":[ + "ISMIP6" + ], + "additional_allowed_model_components":"", + "description":"Future climate ScenarioMIP SSP5-8.5 simulation using \"offline\" ice sheet models. Forcing for ice sheet model is the standard dataset based on ScenarioMIP ssp585", + "end_year":"2300", + "experiment":"offline ice sheet forced by ISMIP6-specified AOGCM ssp585 output", + "experiment_id":"ism-ssp585-std", + "min_number_yrs_per_sim":"85", + "parent_activity_id":[ + "ISMIP6" + ], + "parent_experiment_id":[ + "ism-historical-std" + ], + "required_model_components":[ + "ISM" + ], + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-cCO2":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Same as land-hist except with CO2 held constant", + "end_year":"2014", + "experiment":"historical land-only constant CO2", + "experiment_id":"land-cCO2", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-cClim":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Same as land-hist except with climate held constant", + "end_year":"2014", + "experiment":"historical land-only constant climate", + "experiment_id":"land-cClim", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-crop-grass":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Same as land-hist but with all new crop and pastureland treated as unmanaged grassland", + "end_year":"2014", + "experiment":"historical land-only with cropland as natural grassland", + "experiment_id":"land-crop-grass", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-crop-noFert":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Same as land-hist but with fertilization rates and area held at 1850 levels/distribution", + "end_year":"2014", + "experiment":"historical land-only with no fertilizer", + "experiment_id":"land-crop-noFert", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-crop-noIrrig":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Same as land-hist but with irrigated area held at 1850 levels", + "end_year":"2014", + "experiment":"historical land-only with no irrigation", + "experiment_id":"land-crop-noIrrig", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-crop-noIrrigFert":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Same as land-hist except with plants in cropland area utilizing at least some form of crop management (e.g., planting and harvesting) rather than simulating cropland vegetation as a natural grassland. Irrigated area and fertilizer area/use should be held constant", + "end_year":"2014", + "experiment":"historical land-only with managed crops but with irrigation and fertilization held constant", + "experiment_id":"land-crop-noIrrigFert", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-future":{ + "activity_id":[ + "LS3MIP" + ], + "additional_allowed_model_components":"", + "description":"Land only simulations", + "end_year":"2100", + "experiment":"future land-only", + "experiment_id":"land-future", + "min_number_yrs_per_sim":"86", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-hist":{ + "activity_id":[ + "LS3MIP", + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Land only simulations", + "end_year":"2014", + "experiment":"historical land-only", + "experiment_id":"land-hist", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"1" + }, + "land-hist-altLu1":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Land only simulations", + "end_year":"2014", + "experiment":"historical land-only alternate land-use history", + "experiment_id":"land-hist-altLu1", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-hist-altLu2":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Land only simulations", + "end_year":"2014", + "experiment":"historical land-only alternate land use history", + "experiment_id":"land-hist-altLu2", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-hist-altStartYear":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Same as land-hist except starting from either 1700 (for models that typically start in 1850) or 1850 (for models that typically start in 1700)", + "end_year":"2014", + "experiment":"historical land-only alternate start year", + "experiment_id":"land-hist-altStartYear", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"1" + }, + "land-hist-cruNcep":{ + "activity_id":[ + "LS3MIP" + ], + "additional_allowed_model_components":"", + "description":"Land only simulations", + "end_year":"2014", + "experiment":"as land-hist with CRU-NCEP forcings", + "experiment_id":"land-hist-cruNcep", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-hist-princeton":{ + "activity_id":[ + "LS3MIP" + ], + "additional_allowed_model_components":"", + "description":"Land only simulations", + "end_year":"2014", + "experiment":"as land-hist with Princeton forcings", + "experiment_id":"land-hist-princeton", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-hist-wfdei":{ + "activity_id":[ + "LS3MIP" + ], + "additional_allowed_model_components":"", + "description":"Land only simulations", + "end_year":"2014", + "experiment":"as land-hist with WFDEI forcings", + "experiment_id":"land-hist-wfdei", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-noFire":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Same as land-hist but with anthropogenic ignition and suppression held to 1850 levels", + "end_year":"2014", + "experiment":"historical land-only with no human fire management", + "experiment_id":"land-noFire", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-noLu":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Same as land-hist except no land-use change", + "end_year":"2014", + "experiment":"historical land-only with no land-use change", + "experiment_id":"land-noLu", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"1" + }, + "land-noPasture":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Same as land-hist but with grazing and other management on pastureland held at 1850 levels/distribution, i.e. all new pastureland is treated as unmanaged grassland (as in land-crop-grass)", + "end_year":"2014", + "experiment":"historical land-only with constant pastureland", + "experiment_id":"land-noPasture", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-noShiftCultivate":{ + "activity_id":[ + "LUMIP" + ], + "additional_allowed_model_components":"", + "description":"Same as land-hist except shifting cultivation turned off. An additional LUC transitions dataset will be provided as a data layer within LUMIP LUH2 dataset with shifting cultivation deactivated", + "end_year":"2014", + "experiment":"historical land-only with shifting cultivation turned off", + "experiment_id":"land-noShiftCultivate", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "land-noWoodHarv":{ + "activity_id":[ + "LUMIP" ], - "description":"Prescribed anthropogenic aerosol optical properties. Anthropogenic forcings", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"effective radiative forcing at present day with specified anthropogenic aerosol optical properties, anthropogenic forcings", "additional_allowed_model_components":"", + "description":"Same as land-hist but with wood harvest maintained at 1850 amounts/areas", + "end_year":"2014", + "experiment":"historical land-only with no wood harvest", + "experiment_id":"land-noWoodHarv", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "LAND" + ], + "start_year":"1850 or 1700", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "lfmip-initLC":{ + "activity_id":[ + "LS3MIP" + ], + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" + ], + "description":"Initialized pseudo-observations land", + "end_year":"2014", + "experiment":"initialized from \"historical\" run year 1980, but with land conditions initialized from pseudo-observations", + "experiment_id":"lfmip-initLC", + "min_number_yrs_per_sim":"35", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], + "required_model_components":[ + "AOGCM" + ], + "start_year":"1980", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "lfmip-pdL-princeton":{ + "activity_id":[ + "LS3MIP" + ], + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" + ], + "description":"Prescribed land conditions 1980-2014 climate with Land-Hist-princeton", + "end_year":"2100", + "experiment":"as LFMIP-pdLC with Land-Hist-princeton", + "experiment_id":"lfmip-pdL-princeton", + "min_number_yrs_per_sim":"121", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], + "required_model_components":[ + "AOGCM" + ], + "start_year":"1980", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "lfmip-pdLC":{ + "activity_id":[ + "LS3MIP" + ], + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" + ], + "description":"Prescribed land conditions 1980-2014 climate", + "end_year":"2100", + "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" + ], + "parent_experiment_id":[ + "historical" + ], + "required_model_components":[ + "AOGCM" + ], + "start_year":"1980", + "sub_experiment_id":[ + "none" + ], + "tier":"1" + }, + "lfmip-pdLC-cruNcep":{ + "activity_id":[ + "LS3MIP" + ], + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" + ], + "description":"Prescribed land conditions 1980-2014 climate with Land-Hist-cruNcep", + "end_year":"2100", + "experiment":"as LFMIP-pdLC with Land-Hist-cruNcep", + "experiment_id":"lfmip-pdLC-cruNcep", + "min_number_yrs_per_sim":"121", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"", - "sub_experiment_id":"None" + "start_year":"1980", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "dcppC-ipv-NexTrop-neg":{ + "lfmip-pdLC-wfdei":{ "activity_id":[ - "DCPP" + "LS3MIP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"", - "end_year":"", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized negative northern extratropical IPV anomaly pattern", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Prescribed land conditions 1980-2014 climate with Land-Hist-wfdei", + "end_year":"2100", + "experiment":"as LFMIP-pdLC with Land-Hist-wfdei", + "experiment_id":"lfmip-pdLC-wfdei", + "min_number_yrs_per_sim":"121", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"1980", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "ssp370SST":{ + "lfmip-rmLC":{ "activity_id":[ - "AerChemMIP" + "LS3MIP" ], - "description":"Future SSP3-7.0, with SSTs prescribed from ssp370", - "start_year":"2015", - "end_year":"2055", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSP3-7.0, with SSTs prescribed from ssp370", "additional_allowed_model_components":[ - "CHEM" + "AER", + "CHEM", + "BGC" + ], + "description":"Prescribed land conditions 30yr running mean", + "end_year":"2100", + "experiment":"prescribed land conditions (from running mean climatology) and initialized from \"historical\" run year 1980", + "experiment_id":"lfmip-rmLC", + "min_number_yrs_per_sim":"121", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" ], "required_model_components":[ - "AGCM", - "AER" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"41", - "sub_experiment_id":"None" + "start_year":"1980", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "a4SSTice-4xCO2":{ + "lfmip-rmLC-cruNcep":{ "activity_id":[ - "CFMIP" + "LS3MIP" ], - "description":"As a4SSTice, but CO2 is quadrupled, and the increase in CO2 is seen by both the radiation scheme and vegetation", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"as piSST but with SSTs and sea ice from abrupt4xCO2, and 4xCO2 seen by radiation and vegetation", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"Prescribed land conditions 30yr running mean with Land-Hist-cruNcep", + "end_year":"2100", + "experiment":"as LFMIP-rmLC with Land-Hist-cruNcep", + "experiment_id":"lfmip-rmLC-cruNcep", + "min_number_yrs_per_sim":"121", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"1980", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "ssp460":{ + "lfmip-rmLC-princeton":{ "activity_id":[ - "ScenarioMIP" + "LS3MIP" ], - "description":"Future scenario with medium radiative forcing by the end of century. Following approximately RCP6.0 global forcing pathway but with new forcing based on SSP4. Concentration-driven", - "start_year":"2015", + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" + ], + "description":"Prescribed land conditions 30yr running mean with Land-Hist-princeton", "end_year":"2100", - "sub_experiment":"None", + "experiment":"as LFMIP-rmLC with Land-Hist-princeton", + "experiment_id":"lfmip-rmLC-princeton", + "min_number_yrs_per_sim":"121", + "parent_activity_id":[ + "CMIP" + ], "parent_experiment_id":[ "historical" ], + "required_model_components":[ + "AOGCM" + ], + "start_year":"1980", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "lfmip-rmLC-wfdei":{ + "activity_id":[ + "LS3MIP" + ], + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" + ], + "description":"Prescribed land conditions 30yr running mean with Land-Hist-wfdei", + "end_year":"2100", + "experiment":"as LFMIP-rmLC with Land-Hist-wfdei", + "experiment_id":"lfmip-rmLC-wfdei", + "min_number_yrs_per_sim":"121", "parent_activity_id":[ "CMIP" ], - "experiment":"update of RCP6.0 based on SSP4", + "parent_experiment_id":[ + "historical" + ], + "required_model_components":[ + "AOGCM" + ], + "start_year":"1980", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "lgm":{ + "activity_id":[ + "PMIP" + ], "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"main forcings: ice-sheet; trace gases, astronomical parameters, dust (forcing, or feedback if dust cycle represented in model)", + "end_year":"", + "experiment":"last glacial maximum", + "experiment_id":"lgm", + "min_number_yrs_per_sim":"100", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "histSST":{ + "lig127k":{ "activity_id":[ - "AerChemMIP" + "PMIP" ], - "description":"Historical transient with SSTs prescribed from historical", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical prescribed SSTs and historical forcing", "additional_allowed_model_components":[ - "CHEM" + "AER", + "CHEM", + "BGC" + ], + "description":"main forcings: astronomical parameters, trace gases, dust (forcing, or feedback if dust cycle represented in model)", + "end_year":"", + "experiment":"last interglacial (127k)", + "experiment_id":"lig127k", + "min_number_yrs_per_sim":"100", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AGCM", - "AER" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "land-crop-noIrrigFert":{ + "midHolocene":{ "activity_id":[ - "LUMIP" + "PMIP" + ], + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" + ], + "description":"main forcings: trace gases, orbital parameters, dust (forcing, or feedback if dust cycle represented in model)", + "end_year":"", + "experiment":"mid-Holocene", + "experiment_id":"midHolocene", + "min_number_yrs_per_sim":"200", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" ], - "description":"Same as land-hist except with plants in cropland area utilizing at least some form of crop management (e.g., planting and harvesting) rather than simulating cropland vegetation as a natural grassland. Irrigated area and fertilizer area/use should be held constant", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only with managed crops but with irrigation and fertilization held constant", - "additional_allowed_model_components":"", "required_model_components":[ - "LAND" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "piClim-lu":{ + "midPliocene-eoi400":{ "activity_id":[ - "RFMIP" + "PMIP" ], - "description":"As in RFMIP-ERF-PI-Cntrl but with present-day land use", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"effective radiative forcing by present-day land use", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"main forcings: trace gases, orography, ice-sheet", + "end_year":"", + "experiment":"mid-Pliocene warm period", + "experiment_id":"midPliocene-eoi400", + "min_number_yrs_per_sim":"100", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "volc-long-hlS":{ + "omip1":{ "activity_id":[ - "VolMIP" + "OMIP" + ], + "additional_allowed_model_components":"", + "description":"Global ocean - sea-ice coupled experiment forced with the Coordinated Ocean - ice Reference Experiments inter-annually varying atmospheric and river data sets for years 1948-2009. Initial ocean tracer fields are based on observations. All Priority=1 OMIP diagnostics are requested for all five cycles of the 62-year forcing to quantify drift. All OMIP diagnostics (Priority=1,2,3) are requested for the 5th cycle", + "end_year":"310", + "experiment":"OMIP experiment forced by Large and Yeager (CORE-2, NCEP) atmospheric data set and initialized with observed physical and biogeochemical ocean data", + "experiment_id":"omip1", + "min_number_yrs_per_sim":"310", + "parent_activity_id":[ + "no parent" ], - "description":"Idealized Southern Hemisphere high-latitude eruption emitting 28.1 Tg of SO2. Experiment initialized from PiControl", - "start_year":"", - "end_year":"", - "sub_experiment":"None", "parent_experiment_id":[ - "piControl" + "no parent" + ], + "required_model_components":[ + "OGCM" + ], + "start_year":"1", + "sub_experiment_id":[ + "none" + ], + "tier":"1" + }, + "omip1-spunup":{ + "activity_id":[ + "OMIP" ], + "additional_allowed_model_components":"", + "description":"Same as the omip1 experiment except that it is not initialized with observed climatologies; rather it is initialized with results from at least a 2000-year spin up of the coupled physical-biogeochemical models. The spin up simulations may be made with the classic online or offline approach, or with tracer-acceleration techniques or fast solvers. If an online approach is used, at the end of the 5th cycle of CORE-II forcing, the model's physical fields should be reinitialized to the values at the start of the 3rd cycle in order to avoid long-term drift in those fields and to assure that they will not diverge greatly from physical fields in the omip1 simulation. The spin up also includes radiocarbon to evaluate deep-ocean circulation", + "end_year":"", + "experiment":"OMIP experiment forced by Large and Yeager (CORE-2, NCEP) atmospheric data set and initialized from at least a 2000-year spin up of the coupled physical-biogeochemical model", + "experiment_id":"omip1-spunup", + "min_number_yrs_per_sim":"310", "parent_activity_id":[ - "CMIP" + "no parent" ], - "experiment":"Idealized Southern Hemisphere high-latitude eruption emitting 28.1 Tg of SO2", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" + ], + "required_model_components":[ + "OGCM" + ], + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "omip2":{ + "activity_id":[ + "OMIP" + ], + "additional_allowed_model_components":"", + "description":"Global ocean - sea-ice coupled experiment forced with the JRA-55do inter-annually varying atmospheric and river data sets for years 1958-2016. Initial ocean tracer fields are based on observations. All Priority=1 OMIP diagnostics are requested for all five cycles of the 59-year forcing to quantify drift. All OMIP diagnostics (Priority=1,2,3) are requested for the 5th cycle", + "end_year":"", + "experiment":"OMIP experiment forced by JRA-55do atmospheric data set and initialized with observed physical and biogeochemical ocean data", + "experiment_id":"omip2", + "min_number_yrs_per_sim":"295", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "OGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"20", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "ssp245-stratO3":{ + "omip2-spunup":{ "activity_id":[ - "DAMIP" - ], - "description":"Extension of stratospheric-ozone-only run under SSP2-4.5. In models with coupled chemistry, the chemistry scheme should be turned off, and the simulated ensemble mean monthly mean 3D stratospheric ozone concentrations from the SSP2-4.5 simulations should be prescribed. Tropospheric ozone should be fixed at 3D long-term monthly mean piControl values, with a value of 100 ppbv ozone concentration in this piControl climatology used to separate the troposphere from the stratosphere. In models without coupled chemistry the same stratospheric ozone prescribed in SSP2-4.5 should be prescribed. Stratospheric ozone concentrations will be provided by CCMI", - "start_year":"2021", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "hist-stratO3" + "OMIP" ], + "additional_allowed_model_components":"", + "description":"Same as the omip2 experiment except that it is not initialized with observed climatologies; rather it is initialized with results from at least a 2000-year spin up of the coupled physical-biogeochemical models. The spin up simulations may be made with the classic online or offline approach, or with tracer-acceleration techniques or fast solvers. If an online approach is used, at the end of the 5th cycle ofthe JRA-55do forcing, the model's physical fields should be reinitialized to the values at the start of the 3rd cycle in order to avoid long-term drift in those fields and to assure that they will not diverge greatly from physical fields in the omip2 simulation. The spin up also includes radiocarbon to evaluate deep-ocean circulation", + "end_year":"", + "experiment":"OMIP experiment forced by JRA-55do atmospheric data set and initialized from at least a 2000-year spin up of the coupled physical-biogeochemical model", + "experiment_id":"omip2-spunup", + "min_number_yrs_per_sim":"295", "parent_activity_id":[ - "DAMIP" + "no parent" ], - "experiment":"stratospheric-ozone-only SSP2-4.5 run", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AOGCM" + "OGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"80", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "ssp370":{ + "past1000":{ "activity_id":[ - "ScenarioMIP", - "AerChemMIP" - ], - "description":"Future scenario with high radiative forcing by the end of century. Reaches about 7.0 W/m2 by 2100; fills gap in RCP forcing pathways between 6.0 and 8.5 W/m2. Concentration-driven", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" - ], - "parent_activity_id":[ - "CMIP" + "PMIP" ], - "experiment":"gap-filling scenario reaching 7.0 based on SSP3", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"main forcings: trace gases, volcanoes, solar variability, land use", + "end_year":"1849", + "experiment":"last millennium", + "experiment_id":"past1000", + "min_number_yrs_per_sim":"1000", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" + "start_year":"850", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "histSST-piAer":{ + "piClim-2xDMS":{ "activity_id":[ "AerChemMIP" ], - "description":"Historical WMGHG, halocarbon concentrations and tropospheric ozone precursors emissions, 1850 aerosol precursor emissions, prescribed SSTs", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical SSTs and historical forcing, but with pre-industrial aerosol emissions", "additional_allowed_model_components":[ "CHEM" ], + "description":"1850 control with doubled emissions of DMS", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with doubled emissions of DMS", + "experiment_id":"piClim-2xDMS", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AGCM", "AER" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "land-hist":{ + "piClim-2xNOx":{ "activity_id":[ - "LS3MIP", - "LUMIP" + "AerChemMIP" ], - "description":"Land only simulations", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only", "additional_allowed_model_components":"", + "description":"1850 control with doubled emissions of lightning NOx", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with doubled production of NOx due to lightning", + "experiment_id":"piClim-2xNOx", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ - "LAND" + "AGCM", + "AER", + "CHEM" ], - "tier":"1", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "lgm":{ + "piClim-2xVOC":{ "activity_id":[ - "PMIP" + "AerChemMIP" ], - "description":"main forcings : ice-sheet; trace gases, orbital parameters dust (forcing, or feedback if dust cycle represented in model)", - "start_year":"", + "additional_allowed_model_components":"", + "description":"1850 control with doubled emissions of biogenic VOCs", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"last glacial maximum", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "experiment":"pre-industrial climatological SSTs and forcing, but with doubled emissions of biogenic VOCs", + "experiment_id":"piClim-2xVOC", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AGCM", + "AER", + "CHEM" ], - "tier":"1", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "hist-spAer-all":{ + "piClim-2xdust":{ "activity_id":[ - "RFMIP" + "AerChemMIP" ], - "description":"Prescribed anthropogenic aerosol optical properties. All forcings", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "CHEM" ], + "description":"1850 control with doubled dust emissions", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with doubled emissions of dust", + "experiment_id":"piClim-2xdust", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"historical simulation with specified anthropogenic aerosols", - "additional_allowed_model_components":"", + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ - "AOGCM" + "AGCM", + "AER" ], - "tier":"1", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "esm-ssp585":{ + "piClim-2xfire":{ "activity_id":[ - "C4MIP" + "AerChemMIP" ], - "description":"Emissions-driven future scenario simulation", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "esm-hist" + "additional_allowed_model_components":[ + "CHEM" ], + "description":"1850 control with doubled emissions of fires", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with doubled emissions from fires", + "experiment_id":"piClim-2xfire", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"emission-driven RCP8.5 based on SSP5", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM", - "BGC" + "AGCM", + "AER" ], - "tier":"1", - "min_number_yrs_per_sim":"85", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "esm-hist":{ + "piClim-2xss":{ "activity_id":[ - "CMIP" + "AerChemMIP" ], - "description":"CMIP6 historical (CO2 emission-driven)", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "esm-piControl" + "additional_allowed_model_components":[ + "CHEM" ], + "description":"1850 control with doubled sea salt emissions", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with doubled emissions of sea salt", + "experiment_id":"piClim-2xss", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"all-forcing simulation of the recent past with atmospheric CO2 concentration calculated", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM", - "BGC" + "AGCM", + "AER" ], - "tier":"1", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "midPliocene-eoi400":{ + "piClim-4xCO2":{ "activity_id":[ - "PMIP" + "RFMIP" ], - "description":"main forcings : trace gases, orography, ice-sheet", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"mid-Pliocene warm period", "additional_allowed_model_components":[ "AER", - "CHEM", - "BGC" - ], - "required_model_components":[ - "AOGCM" - ], - "tier":"1", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" - }, - "ism-1pctCO2to4x-std":{ - "activity_id":[ - "ISMIP6" + "CHEM" ], - "description":"Idealized 1%/yr CO2 increase to 4xC02 over 140yrs and kept constant at 4xCO2 for an additional 200 to 400 yrs simulation with ice sheets forced \"offline\" with DECK 1pctCO2 using a standard forcing", - "start_year":"", + "description":"As in RFMIP-ERF-PI-Cntrl but with 4xCO2", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "ism-pdControl-std" - ], + "experiment":"effective radiative forcing by 4xCO2", + "experiment_id":"piClim-4xCO2", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ - "ISMIP6" + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], - "experiment":"offline ice sheet model forced by ISMIP6-specified AOGCM 1pctCO2to4x output", - "additional_allowed_model_components":"", "required_model_components":[ - "ISM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"350", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "ssp370SST-lowNTCF":{ + "piClim-BC":{ "activity_id":[ "AerChemMIP" - ], - "description":"Future SSP3-7.0 with reduced NTCF emissions, prescribed SSTs", - "start_year":"2015", - "end_year":"2055", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSP3-7.0, prescribed SSTs, with low NTCF emissions", + ], "additional_allowed_model_components":[ - "CHEM", - "BGC" + "CHEM" + ], + "description":"Perturbation from 1850 control using 2014 BC emissions", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 black carbon emissions", + "experiment_id":"piClim-BC", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ "AGCM", "AER" ], - "tier":"1", - "min_number_yrs_per_sim":"41", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "historical-withism":{ + "piClim-CH4":{ "activity_id":[ - "ISMIP6" - ], - "description":"Historical simulation that includes interactive ice sheets. Set up follows the historical experiment", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl-withism" + "AerChemMIP" ], + "additional_allowed_model_components":"", + "description":"Perturbation from 1850 control using 2014 CH4 concentrations", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 methane concentrations (including chemistry)", + "experiment_id":"piClim-CH4", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ - "ISMIP6" + "CMIP" ], - "experiment":"historical with interactive ice sheet", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM", - "ISM" + "AGCM", + "AER", + "CHEM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "deforest-globe":{ + "piClim-HC":{ "activity_id":[ - "LUMIP" + "AerChemMIP" ], - "description":"Idealized deforestation experiment, 20 million km2 forest removed linearly over a period of 50 years, with an additional 30 years with no specified change in forest cover; all other forcings held constant", - "start_year":"1850", + "additional_allowed_model_components":"", + "description":"Perturbation from 1850 control using 2014 halocarbon concentrations", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], + "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 halocarbon concentrations (including chemistry)", + "experiment_id":"piClim-HC", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"idealized transient global deforestation", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AGCM", + "AER", + "CHEM" ], - "tier":"1", - "min_number_yrs_per_sim":"81", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "dcppC-forecast-addPinatubo":{ + "piClim-N2O":{ "activity_id":[ - "DCPP" - ], - "description":"Effects of volcanoes on decadal prediction and predictability of forced and internal variability components", - "start_year":"2015", - "end_year":"2015", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":[ - "dcppA-assim", - "" + "AerChemMIP" ], + "additional_allowed_model_components":"", + "description":"Perturbation from 1850 control using 2014 N2O concentrations", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 N2O concentrations (including chemistry)", + "experiment_id":"piClim-N2O", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ - "DCPP" + "CMIP" ], - "experiment":"2015 forecast with added Pinatubo forcing", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AGCM", + "AER", + "CHEM" ], - "tier":"1", - "min_number_yrs_per_sim":"5", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "dcppC-amv-ExTrop-pos":{ + "piClim-NH3":{ "activity_id":[ - "DCPP" + "AerChemMIP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"control", - "end_year":"", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized positive extratropical AMV anomaly pattern", "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "CHEM" + ], + "description":"Perturbation from 1850 control using 2014 NH3 emissions", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 ammonia emissions", + "experiment_id":"piClim-NH3", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AGCM", + "AER" + ], + "start_year":"", + "sub_experiment_id":[ + "none" ], - "tier":"2", - "min_number_yrs_per_sim":"25", - "sub_experiment_id":"of form: \"sYYYY\"" + "tier":"3" }, - "1pctCO2Ndep":{ + "piClim-NOx":{ "activity_id":[ - "C4MIP" + "AerChemMIP" ], - "description":"Fully-coupled specified concentration simulation in which CO2 increases at a rate of 1% per year until quadrupling, plus an additional scenario of anthropogenic nitrogen deposition", - "start_year":"", + "additional_allowed_model_components":"", + "description":"Perturbation from 1850 control using 2014 NOx emissions", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], + "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 NOx emissions", + "experiment_id":"piClim-NOx", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"1 percent per year increasing CO2 experiment with increasing N-deposition", - "additional_allowed_model_components":[ + "parent_experiment_id":[ + "piControl" + ], + "required_model_components":[ + "AGCM", "AER", "CHEM" ], - "required_model_components":[ - "AOGCM", - "BGC" + "start_year":"", + "sub_experiment_id":[ + "none" ], - "tier":"2", - "min_number_yrs_per_sim":"150", - "sub_experiment_id":"None" + "tier":"3" }, - "histSST-piN2O":{ + "piClim-NTCF":{ "activity_id":[ "AerChemMIP" ], - "description":"Historical (non-N2O) WMGHG concentrations and NTCF emissions, 1850 N2O concentrations", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical SSTs and historical forcings, but with pre-industrial N2O concentrations", "additional_allowed_model_components":[ + "CHEM", "BGC" ], + "description":"Perturbation from 1850 control using 2014 aerosol and ozone precursor emissions", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 NTCF emissions", + "experiment_id":"piClim-NTCF", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AGCM", - "AER", - "CHEM" + "AER" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "piControl-withism":{ + "piClim-O3":{ "activity_id":[ - "ISMIP6" + "AerChemMIP" ], - "description":"Pre-industrial control simulation that includes interactive ice sheets", - "start_year":"", + "additional_allowed_model_components":"", + "description":"Perturbation from 1850 control using 2014 ozone precursor emissions", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"preindustrial control with interactive ice sheet", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 ozone precursor emissions", + "experiment_id":"piClim-O3", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM", - "ISM" + "AGCM", + "AER", + "CHEM" ], - "tier":"1", - "min_number_yrs_per_sim":"500", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "aqua-control-lwoff":{ + "piClim-OC":{ "activity_id":[ - "CFMIP" + "AerChemMIP" ], - "description":"As aqua-control experiment, but with cloud-radiative effects switched off in the LW radiation code", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"aquaplanet control with longwave cloud radiative effects off", "additional_allowed_model_components":[ - "AER", "CHEM" ], + "description":"Perturbation from 1850 control using 2014 OC emissions", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 organic carbon emissions", + "experiment_id":"piClim-OC", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ - "AGCM" + "AGCM", + "AER" ], - "tier":"2", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "highres-future":{ + "piClim-SO2":{ "activity_id":[ - "HighResMIP" + "AerChemMIP" ], - "description":"Coupled integrations, at least one with constant 1950\"s forcing (CTL) and one or more with historic and then RCP4.5 (as in Forced_Atmos_Land, EXP)", - "start_year":"2015", - "end_year":"2050", - "sub_experiment":"None", - "parent_experiment_id":[ - "hist-1950" + "additional_allowed_model_components":[ + "CHEM" ], + "description":"Perturbation from 1850 control using 2014 SO2 emissions", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 SO2 emissions", + "experiment_id":"piClim-SO2", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ - "HighResMIP" + "CMIP" ], - "experiment":"coupled future 2015-2050 using a scenario as close to CMIP5 RCP8.5 as possible within CMIP6", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" + ], + "required_model_components":[ + "AGCM", + "AER" ], - "required_model_components":[ - "AOGCM" + "start_year":"", + "sub_experiment_id":[ + "none" ], - "tier":"2", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" + "tier":"3" }, - "hist-volc":{ + "piClim-VOC":{ "activity_id":[ - "DAMIP" - ], - "description":"Historical volcanic-only run", - "start_year":"1850", - "end_year":"2020", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "AerChemMIP" ], + "additional_allowed_model_components":"", + "description":"Perturbation from 1850 control using 2014 CO/VOC emissions", + "end_year":"", + "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 VOC emissions", + "experiment_id":"piClim-VOC", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"historical volcanic-only run", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AGCM", + "AER", + "CHEM" ], - "tier":"3", - "min_number_yrs_per_sim":"171", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "hist-all-nat2":{ + "piClim-aer":{ "activity_id":[ - "DAMIP" + "RFMIP", + "AerChemMIP" ], - "description":"Historical ALL forcing run with alternates estimate of solar and volcanic forcing", - "start_year":"1850", - "end_year":"2020", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"As in RFMIP-ERF-PI-Cntrl but with with present-day aerosols. Note that this experiment is considered to be tier 1 by RFMIP but tier 2 by AerChemMIP", + "end_year":"", + "experiment":"effective radiative forcing by present-day aerosols", + "experiment_id":"piClim-aer", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"historical ALL-forcing run with alternate estimates of natural forcing", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"171", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "hist-noLu":{ + "piClim-anthro":{ "activity_id":[ - "LUMIP" + "RFMIP" ], - "description":"Same as CMIP6 historical but with land cover held at 1850, no human activity; concentration driven", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"As in RFMIP-ERF-PI-Cntrl but with present-day anthropogenic forcing (greenhouse gases, aerosols and land-use)", + "end_year":"", + "experiment":"effective radiative forcing by present day anthropogenic agents", + "experiment_id":"piClim-anthro", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"historical with no land-use change", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "piClim-2xfire":{ + "piClim-control":{ "activity_id":[ + "RFMIP", "AerChemMIP" ], - "description":"1850 control with doubled emissions of fires", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with doubled emissions from fires", "additional_allowed_model_components":[ + "AER", "CHEM" ], + "description":"30-year atmosphere only integration using preindustrial sea-surface temperature and sea-ice climatology. Interactive vegetation", + "end_year":"", + "experiment":"effective radiative forcing in present-day", + "experiment_id":"piClim-control", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ - "AGCM", - "AER" + "AGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "G7SST2-cirrus":{ + "piClim-ghg":{ "activity_id":[ - "GeoMIP" + "RFMIP" ], - "description":"Time slice at 2100 (ScenarioMIP Tier 1 high forcing scenario and cirrus thinning according to G7cirrus)", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSTs from year 2100 of SSP5-8.5; forcings and other prescribed conditions from year 2100 of G7cirrus", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"As in RFMIP-ERF-PI-Cntrl but with present-day greenhouse gases", + "end_year":"", + "experiment":"effective radiative forcing by present-day greenhouse gases", + "experiment_id":"piClim-ghg", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "ism-ssp585-self":{ + "piClim-histaer":{ "activity_id":[ - "ISMIP6" + "RFMIP" ], - "description":"Future climate ScenarioMIP SSP5-8.5 simulation using \"offline\" ice sheet models. Forcing for ice sheet model is from its own AOGCM", - "start_year":"2015", - "end_year":"2300", - "sub_experiment":"None", - "parent_experiment_id":[ - "ism-historical-self" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Time-varying forcing by aerosols. SST and sea ice fixed at preindustrial control. Interactive vegetation", + "end_year":"2100", + "experiment":"transient effective radiative forcing by aerosols", + "experiment_id":"piClim-histaer", + "min_number_yrs_per_sim":"251", "parent_activity_id":[ - "ISMIP6" + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], - "experiment":"offline ice sheet forced by ISM's own AOGCM ssp585 output", - "additional_allowed_model_components":"", "required_model_components":[ - "ISM" + "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"85", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "ism-ctrl-std":{ + "piClim-histall":{ "activity_id":[ - "ISMIP6" + "RFMIP" ], - "description":"Offline ice sheet control run for the initMIP experiment that explores the uncertainty in sea level due to ice sheet initialization", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Time-varying forcing. SST and sea ice fixed at preindustrial control. Interactive vegetation", + "end_year":"2100", + "experiment":"transient effective radiative forcing", + "experiment_id":"piClim-histall", + "min_number_yrs_per_sim":"251", "parent_activity_id":[ - "ISMIP" + "CMIP" ], - "experiment":"offline ice sheet model initMIP control", - "additional_allowed_model_components":[ - "" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "ISM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "aqua-control":{ + "piClim-histghg":{ "activity_id":[ - "CFMIP" + "RFMIP" ], - "description":"Extended version of CMIP5/CFMIP-2 aquaControl experiment. Aquaplanet (no land) experiment with no seasonal cycle forced with specified zonally symmetric SSTs", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"aquaplanet control", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"Time-varying forcing by GHGs. SST and sea ice fixed at preindustrial control. Interactive vegetation", + "end_year":"2100", + "experiment":"transient effective radiative forcing by greenhouse gases", + "experiment_id":"piClim-histghg", + "min_number_yrs_per_sim":"251", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "volc-cluster-ctrl":{ + "piClim-histnat":{ "activity_id":[ - "VolMIP" + "RFMIP" ], - "description":"Early 19th century cluster of strong tropical volcanic eruptions, including the 1809 event of unknown location, the 1815 Tambora and 1835 Cosigueina eruptions. Experiment initialized from PiControl", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Time-varying forcing from volcanos, solar variability, etc. SST and sea ice fixed at preindustrial control. Interactive vegetation", + "end_year":"2100", + "experiment":"transient effective radiative forcing by natural perturbations", + "experiment_id":"piClim-histnat", + "min_number_yrs_per_sim":"251", "parent_activity_id":[ "CMIP" ], - "experiment":"19th century volcanic cluster initialized from PiControl", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" - ], - "tier":"2", - "min_number_yrs_per_sim":"50", - "sub_experiment_id":"None" - }, - "land-future":{ - "activity_id":[ - "LS3MIP" + "AGCM" ], - "description":"Land only simulations", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"future land-only", - "additional_allowed_model_components":"", - "required_model_components":[ - "LAND" + "start_year":"1850", + "sub_experiment_id":[ + "none" ], - "tier":"2", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" + "tier":"2" }, - "volc-pinatubo-strat":{ + "piClim-lu":{ "activity_id":[ - "VolMIP" + "RFMIP" + ], + "additional_allowed_model_components":[ + "AER", + "CHEM" ], - "description":"As volc-pinatubo-full, but with prescribed perturbation to the total (LW+SW) radiative heating rates", - "start_year":"", + "description":"As in RFMIP-ERF-PI-Cntrl but with present-day land use", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" - ], + "experiment":"effective radiative forcing by present-day land use", + "experiment_id":"piClim-lu", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ "CMIP" ], - "experiment":"Pinatubo experiment with partial radiative forcing, includes only stratospheric warming", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"3", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "G6sulfur":{ + "piClim-spAer-aer":{ "activity_id":[ - "GeoMIP" - ], - "description":"Using equatorial SO2 injection, return the radiative forcing from a background of the ScenarioMIP high forcing to the ScenarioMIP middle forcing", - "start_year":"2020", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "RFMIP" ], + "additional_allowed_model_components":"", + "description":"Prescribed anthropogenic aerosol optical properties. Aerosol and ozone forcings", + "end_year":"", + "experiment":"effective radiative forcing at present day with specified anthropogenic aerosol optical properties, all forcings", + "experiment_id":"piClim-spAer-aer", + "min_number_yrs_per_sim":"", "parent_activity_id":[ "CMIP" ], - "experiment":"stratospheric sulfate aerosol injection to reduce net forcing from SSP585 to SSP245", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"81", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "G6SST2-solar":{ + "piClim-spAer-anthro":{ "activity_id":[ - "GeoMIP" + "RFMIP" ], - "description":"Time slice at 2100 (G6solar)", - "start_year":"", + "additional_allowed_model_components":"", + "description":"Prescribed anthropogenic aerosol optical properties. Anthropogenic forcings", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSTs from year 2020 of SSP5-8.5; forcings and other prescribed conditions from year 2100 of G6solar", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "experiment":"effective radiative forcing at present day with specified anthropogenic aerosol optical properties, anthropogenic forcings", + "experiment_id":"piClim-spAer-anthro", + "min_number_yrs_per_sim":"", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "land-noLu":{ + "piClim-spAer-histaer":{ "activity_id":[ - "LUMIP" + "RFMIP" ], - "description":"Same as land-hist except no land-use change", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only with no land-use change", "additional_allowed_model_components":"", + "description":"Prescribed anthropogenic aerosol optical properties. Aerosol and ozone forcings", + "end_year":"2014", + "experiment":"transient effective radiative forcing with specified anthropogenic aerosol optical properties, aerosol forcing", + "experiment_id":"piClim-spAer-histaer", + "min_number_yrs_per_sim":"165", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ - "LAND" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "dcppC-forecast-addElChichon":{ + "piClim-spAer-histall":{ "activity_id":[ - "DCPP" - ], - "description":"Effects of volcanoes on decadal prediction and predictability of forced and internal variability components", - "start_year":"2015", - "end_year":"2015", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":[ - "dcppA-assim", - "" + "RFMIP" ], + "additional_allowed_model_components":"", + "description":"Prescribed anthropogenic aerosol optical properties. Aerosol and ozone forcings", + "end_year":"2014", + "experiment":"transient effective radiative forcing with specified anthropogenic aerosol optical properties, all forcings", + "experiment_id":"piClim-spAer-histall", + "min_number_yrs_per_sim":"165", "parent_activity_id":[ - "DCPP" + "CMIP" ], - "experiment":"2015 forecast with added El Chichon forcing", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"5", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"1850", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "dcppC-amv-neg":{ + "piControl":{ "activity_id":[ - "DCPP" + "CMIP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"1950", - "end_year":"1949", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized negative AMV anomaly pattern", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"DECK: control", + "end_year":"", + "experiment":"pre-industrial control", + "experiment_id":"piControl", + "min_number_yrs_per_sim":"500", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl-spinup" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "dcppC-pac-pacemaker":{ + "piControl-spinup":{ "activity_id":[ - "DCPP" + "CMIP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"", - "end_year":"", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pacemaker pacific experiment", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"DECK: spin-up portion of the control", + "end_year":"", + "experiment":"pre-industrial control (spin-up)", + "experiment_id":"piControl-spinup", + "min_number_yrs_per_sim":"100", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AOGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "ssp585-withism":{ + "piControl-withism":{ "activity_id":[ "ISMIP6" ], - "description":"Future climate from ScenarioMIP SSP5-8.5 simulation that includes interactive ice sheets. Set up follows the standard SSP5-8.5 experiment", - "start_year":"2015", - "end_year":"2300", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical-withism" - ], - "parent_activity_id":[ - "ISMIP6" - ], - "experiment":"ssp585 with interactive ice sheet", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Pre-industrial control simulation that includes interactive ice sheets", + "end_year":"", + "experiment":"preindustrial control with interactive ice sheet", + "experiment_id":"piControl-withism", + "min_number_yrs_per_sim":"500", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" + ], "required_model_components":[ "AOGCM", "ISM" ], - "tier":"2", - "min_number_yrs_per_sim":"85", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "highresSST-p4K":{ + "piSST":{ "activity_id":[ - "HighResMIP" + "CFMIP" ], - "description":"Similar to CFMIP amip-p4K, add a uniform warming of 4K to highresSST-present SSTs and run the experiment parallel to years 2005-2014 of highresSST-present", - "start_year":"1951", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "highresSST-present" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"An AGCM experiment with monthly-varying SSTs, sea-ice, atmospheric constituents and any other necessary boundary conditions (e.g. vegetation if required) taken from each model's own piControl run (using the 30 years of piControl that are parallel to years 111-140 of its abrupt4xCO2 run). Dynamic vegetation should be turned off in all the piSST set of experiments", + "end_year":"", + "experiment":"experiment forced with pre-industrial SSTs, sea ice and atmospheric constituents", + "experiment_id":"piSST", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ - "HighResMIP" + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], + "required_model_components":[ + "AGCM" + ], + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "piSST-4xCO2":{ + "activity_id":[ + "CFMIP" ], - "experiment":"uniform 4K warming of highresSST-present SST", "additional_allowed_model_components":[ "AER", "CHEM" ], + "description":"Same as piSST but CO2 is quadrupled. The increase in CO2 is seen by both the radiation scheme and vegetation", + "end_year":"", + "experiment":"as piSST with radiation and vegetation seeing 4xCO2", + "experiment_id":"piSST-4xCO2", + "min_number_yrs_per_sim":"30", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"64", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "dcppC-hindcast-noPinatubo":{ + "piSST-4xCO2-rad":{ "activity_id":[ - "DCPP" + "CFMIP" ], - "description":"Effects of volcanoes on decadal prediction and predictability of forced and internal variability components", - "start_year":"1991", - "end_year":"1991", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":[ - "dcppA-assim", - "" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], + "description":"Same as piSST but CO2 as seen by the radiation scheme is quadrupled", + "end_year":"", + "experiment":"as piSST with radiation-only seeing 4xCO2", + "experiment_id":"piSST-4xCO2-rad", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ - "DCPP" + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], + "required_model_components":[ + "AGCM" + ], + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "piSST-4xCO2-solar":{ + "activity_id":[ + "GeoMIP" ], - "experiment":"hindcast but with only background volcanic forcing", "additional_allowed_model_components":[ "AER", - "CHEM", - "BGC" + "CHEM" + ], + "description":"Time slice at 1850 (picontrol) for G1ext to examine radiative forcing of abrupt4xCO2", + "end_year":"", + "experiment":"preindustrial control SSTs with quadrupled CO2 and solar reduction", + "experiment_id":"piSST-4xCO2-solar", + "min_number_yrs_per_sim":"10", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM" + "AGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"5", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piClim-BC":{ + "piSST-pxK":{ "activity_id":[ - "AerChemMIP" + "CFMIP" ], - "description":"Perturbation from 1850 control using 2014 BC emissions", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 black carbon emissions", "additional_allowed_model_components":[ + "AER", "CHEM" ], + "description":"Same as piSST, but with a spatially and temporally uniform SST anomaly applied on top of the monthly-varying piSST SSTs. The magnitude of the uniform increase is taken from each model's global, climatological annual mean SST change between abrupt4xCO2 minus piControl (using the mean of years 111-140 of abrupt4xCO2, and the parallel 30-year section of piControl)", + "end_year":"", + "experiment":"as piSST with uniform SST increase with magnitude based on abrupt4xCO2 response", + "experiment_id":"piSST-pxK", + "min_number_yrs_per_sim":"20", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" + ], "required_model_components":[ - "AGCM", - "AER" + "AGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piClim-NTCF":{ + "rad-irf":{ "activity_id":[ - "AerChemMIP" + "RFMIP" ], - "description":"Perturbation from 1850 control using 2014 aerosol and ozone precursor emissions", - "start_year":"", + "additional_allowed_model_components":"", + "description":"Offline radiation calculations", "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 NTCF emissions", - "additional_allowed_model_components":[ - "CHEM", - "BGC" + "experiment":"offline assessment of radiative transfer parmeterizations in clear skies", + "experiment_id":"rad-irf", + "min_number_yrs_per_sim":"", + "parent_activity_id":[ + "no parent" + ], + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ - "AGCM", - "AER" + "RAD" ], - "tier":"1", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "lfmip-initLC":{ + "spinup-1950":{ "activity_id":[ - "LS3MIP" + "HighResMIP" ], - "description":"Initialized pseudo-observations land", - "start_year":"1980", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "AER" ], + "description":"Coupled integration from ocean rest state using recommended HighResMIP protocol spinup, starting from 1950 ocean temperature and salinity analysis EN4, using constant 1950s forcing. At least 30 years to satisfy near surface quasi-equilibrium", + "end_year":"", + "experiment":"coupled spinup with fixed 1950s forcings from 1950 initial conditions (with ocean at rest) to provide initial condition for control-1950 and hist-1950", + "experiment_id":"spinup-1950", + "min_number_yrs_per_sim":"30", "parent_activity_id":[ - "CMIP" + "no parent" ], - "experiment":"initialized from \"historical\" run year 1980, but with land conditions initialized from pseudo-observations", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "no parent" ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"35", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "a4SST":{ + "ssp126":{ "activity_id":[ - "CFMIP" + "ScenarioMIP" ], - "description":"As piSST, but with monthly-varying SSTs taken from years 111-140 of each model's own abrupt4xCO2 experiment instead of from piControl. Sea-ice is unchanged from piSST", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"as piSST but with SSTs from abrupt4xCO2", "additional_allowed_model_components":[ "AER", - "CHEM" - ], - "required_model_components":[ - "AGCM" + "CHEM", + "BGC" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" - }, - "ism-historical-std":{ - "activity_id":[ - "ISMIP6" + "description":"Future scenario with low radiative forcing by the end of century. Following approximately RCP2.6 global forcing pathway but with new forcing based on SSP1. Concentration-driven. As a tier 2 option, this simulation should be extended to year 2300", + "end_year":"2100 or 2300", + "experiment":"update of RCP2.6 based on SSP1", + "experiment_id":"ssp126", + "min_number_yrs_per_sim":"86", + "parent_activity_id":[ + "CMIP" ], - "description":"Historical simulation using \"offline\" ice sheet models. Forcing for ice sheet model is the standard dataset based on CMIP6 AOGCM historical", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", "parent_experiment_id":[ - "ism-pdControl-std" - ], - "parent_activity_id":[ - "ISMIP6" + "historical" ], - "experiment":"offline ice sheet forced by ISMIP6-specified AOGCM historical output", - "additional_allowed_model_components":"", "required_model_components":[ - "ISM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "dcppC-atl-control":{ + "ssp126-ssp370Lu":{ "activity_id":[ - "DCPP" + "LUMIP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"1950 (from 1920 if possible)", - "end_year":"2015", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized Atlantic control", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Additional land use policy sensitivity simulation for low radiative forcing scenario, keep all forcings the same as ScenarioMIP SSP1-2.6 (afforestation scenario), but replace land use from SSP3-7 (afforestation) scenario; concentration-driven", + "end_year":"2100", + "experiment":"SSP1-2.6 with SSP3-7.0 land use", + "experiment_id":"ssp126-ssp370Lu", + "min_number_yrs_per_sim":"86", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"66", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "highresSST-present":{ + "ssp245":{ "activity_id":[ - "HighResMIP" + "ScenarioMIP" ], - "description":"Forced global atmosphere-land simulations using daily 1/4 degree SST and sea-ice forcings, and aerosol concentrations (not emissions) to constrain model spread", - "start_year":"1951", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"forced atmosphere experiment for 1950-2014", "additional_allowed_model_components":[ "AER", - "CHEM" - ], - "required_model_components":[ - "AGCM" + "CHEM", + "BGC" ], - "tier":"1", - "min_number_yrs_per_sim":"64", - "sub_experiment_id":"None" - }, - "historical-ext":{ - "activity_id":[ + "description":"Future scenario with medium radiative forcing by the end of century. Following approximately RCP4.5 global forcing pathway but with new forcing based on SSP2. Concentration-driven", + "end_year":"2100", + "experiment":"update of RCP4.5 based on SSP2", + "experiment_id":"ssp245", + "min_number_yrs_per_sim":"86", + "parent_activity_id":[ "CMIP" ], - "description":"Extension beyond 2014 of the CMIP6 historical", - "start_year":"2015", - "end_year":"", - "sub_experiment":"None", "parent_experiment_id":[ "historical" ], - "parent_activity_id":[ - "CMIP" + "required_model_components":[ + "AOGCM" + ], + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" + }, + "ssp245-GHG":{ + "activity_id":[ + "DAMIP" ], - "experiment":"post-2014 all-forcing simulation", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Extension of well-mixed GHG-only run under SSP2-4.5. Models with interactive chemistry schemes should either turn off the chemistry or use a preindustrial climatology of stratospheric and tropospheric ozone in their radiation schemes", + "end_year":"2100", + "experiment":"well-mixed GHG-only SSP2-4.5 run", + "experiment_id":"ssp245-GHG", + "min_number_yrs_per_sim":"80", + "parent_activity_id":[ + "DAMIP" + ], + "parent_experiment_id":[ + "hist-GHG" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"1", - "sub_experiment_id":"None" + "start_year":"2021", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piSST":{ + "ssp245-aer":{ "activity_id":[ - "CFMIP" + "DAMIP" ], - "description":"An AGCM experiment with monthly-varying SSTs, sea-ice, atmospheric constituents and any other necessary boundary conditions (e.g. vegetation if required) taken from each model's own piControl run (using the 30 years of piControl that are parallel to years 111-140 of its abrupt4xCO2 run). Dynamic vegetation should be turned off in all the piSST set of experiments", - "start_year":"Year 111-140 of piControl", - "end_year":"Year 111-140 of piControl", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"experiment forced with pre-industrial SSTs, sea ice and atmospheric constituents", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" ], - "required_model_components":[ - "AGCM" + "description":"Extension of aerosol-only run under SSP2-4.5", + "end_year":"2100", + "experiment":"aerosol-only SSP2-4.5 run", + "experiment_id":"ssp245-aer", + "min_number_yrs_per_sim":"80", + "parent_activity_id":[ + "DAMIP" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" - }, - "omip1":{ - "activity_id":[ - "OMIP" + "parent_experiment_id":[ + "hist-aer" ], - "description":"Global ocean - sea-ice coupled experiment forced with the Coordinated Ocean - ice Reference Experiments inter-annually varying atmospheric and river data sets for years 1948-2009. Initial ocean tracer fields are based on observations. All Priority=1 OMIP diagnostics are requested for all five cycles of the 62-year forcing to quantify drift. All OMIP diagnostics (Priority=1,2,3) are requested for the 5th cycle", - "start_year":"1", - "end_year":"310", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"OMIP experiment forced by Large and Yeager (CORE-2, NCEP) atmospheric data set and initialized with observed physical and biogeochemical ocean data", - "additional_allowed_model_components":"", "required_model_components":[ - "OGCM" - ], - "tier":"1", - "min_number_yrs_per_sim":"310", - "sub_experiment_id":"None" - }, - "omip2":{ - "activity_id":[ - "OMIP" + "AOGCM" ], - "description":"Global ocean - sea-ice coupled experiment forced with the JRA-55 inter-annually varying atmospheric and river data sets for years 1958-2016. Initial ocean tracer fields are based on observations. All Priority=1 OMIP diagnostics are requested for all five cycles of the 59-year forcing to quantify drift. All OMIP diagnostics (Priority=1,2,3) are requested for the 5th cycle", - "start_year":"1", - "end_year":"310", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"OMIP experiment forced by JRA-55 atmospheric data set and initialized with observed physical and biogeochemical ocean data", - "additional_allowed_model_components":"", - "required_model_components":[ - "OGCM" + "start_year":"2021", + "sub_experiment_id":[ + "none" ], - "tier":"3", - "min_number_yrs_per_sim":"310", - "sub_experiment_id":"None" + "tier":"3" }, - "ssp585-bgc":{ + "ssp245-nat":{ "activity_id":[ - "C4MIP" + "DAMIP" ], - "description":"Concentration-driven future scenario simulation, biogeochemically-coupled", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "hist-bgc" + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" ], + "description":"Extension of natural-only run under SSP2-4.5", + "end_year":"2100", + "experiment":"natural-only SSP2-4.5 run", + "experiment_id":"ssp245-nat", + "min_number_yrs_per_sim":"80", "parent_activity_id":[ - "C4MIP" + "DAMIP" ], - "experiment":"biogeochemically-coupled version of the RCP8.5 based on SSP5", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "hist-nat" ], "required_model_components":[ - "AOGCM", - "BGC" + "AOGCM" + ], + "start_year":"2021", + "sub_experiment_id":[ + "none" ], - "tier":"2", - "min_number_yrs_per_sim":"85", - "sub_experiment_id":"None" + "tier":"3" }, - "amip-a4SST-4xCO2":{ + "ssp245-stratO3":{ "activity_id":[ - "CFMIP" + "DAMIP" ], - "description":"Same as amip, but a patterned SST anomaly is applied on top of the monthly-varying amip SSTs. This anomaly is a monthly climatology, taken from each model's own abrupt4xCO2 run minus piControl (using the mean of years 111-140 of abrupt4xCO2, and the parallel 30-year section of piControl). CO2 is quadrupled, and the increase in CO2 is seen by both the radiation scheme and vegetation", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"as AMIP but with warming pattern from abrupt4xCO2 added to SSTs and 4xCO2 seen by radiation and vegetation", "additional_allowed_model_components":[ "AER", - "CHEM" - ], - "required_model_components":[ - "AGCM" + "BGC" ], - "tier":"2", - "min_number_yrs_per_sim":"36", - "sub_experiment_id":"None" - }, - "hist-nat":{ - "activity_id":[ + "description":"Extension of stratospheric-ozone-only run under SSP2-4.5. In models with coupled chemistry, the chemistry scheme should be turned off, and the simulated ensemble mean monthly mean 3D stratospheric ozone concentrations from the SSP2-4.5 simulations should be prescribed. Tropospheric ozone should be fixed at 3D long-term monthly mean piControl values, with a value of 100 ppbv ozone concentration in this piControl climatology used to separate the troposphere from the stratosphere. In models without coupled chemistry the same stratospheric ozone prescribed in SSP2-4.5 should be prescribed. Stratospheric ozone concentrations will be provided by CCMI", + "end_year":"2100", + "experiment":"stratospheric-ozone-only SSP2-4.5 run", + "experiment_id":"ssp245-stratO3", + "min_number_yrs_per_sim":"80", + "parent_activity_id":[ "DAMIP" ], - "description":"Historical natural-only run", - "start_year":"1850", - "end_year":"2020", - "sub_experiment":"None", "parent_experiment_id":[ - "piControl" + "hist-stratO3" ], - "parent_activity_id":[ - "CMIP" + "required_model_components":[ + "AOGCM" + ], + "start_year":"2021", + "sub_experiment_id":[ + "none" + ], + "tier":"2" + }, + "ssp370":{ + "activity_id":[ + "ScenarioMIP", + "AerChemMIP" ], - "experiment":"historical natural-only run", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Future scenario with high radiative forcing by the end of century. Reaches about 7.0 W/m2 by 2100; fills gap in RCP forcing pathways between 6.0 and 8.5 W/m2. Concentration-driven", + "end_year":"2100", + "experiment":"gap-filling scenario reaching 7.0 based on SSP3", + "experiment_id":"ssp370", + "min_number_yrs_per_sim":"86", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"171", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "1pctCO2-rad":{ + "ssp370-lowNTCF":{ "activity_id":[ - "C4MIP" + "AerChemMIP" ], - "description":"Radiatively-coupled specified concentration simulation in which CO2 increases at a rate of 1% per year until quadrupling", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "CHEM", + "BGC" ], + "description":"Future SSP3-7.0 with reduced NTCF emissions", + "end_year":"2055", + "experiment":"SSP3-7.0, with low NTCF emissions", + "experiment_id":"ssp370-lowNTCF", + "min_number_yrs_per_sim":"41", "parent_activity_id":[ "CMIP" ], - "experiment":"radiatively-coupled version of 1 percent per year increasing CO2 experiment", - "additional_allowed_model_components":[ - "AER", - "CHEM" + "parent_experiment_id":[ + "historical" ], "required_model_components":[ "AOGCM", - "BGC" + "AER" ], - "tier":"2", - "min_number_yrs_per_sim":"150", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "land-noWoodHarv":{ + "ssp370-ssp126Lu":{ "activity_id":[ "LUMIP" ], - "description":"Same as land-hist but with wood harvest maintained at 1850 amounts/areas", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only with no wood harvest", - "additional_allowed_model_components":"", + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" + ], + "description":"Additional land use policy sensitivity simulation for high radiative forcing scenario, keep all forcings the same as ScenarioMIP SSP3-7 (deforestation scenario), but replace land use from SSP1-2.6 (afforestation) scenario; concentration-driven", + "end_year":"2100", + "experiment":"SSP3-7.0 with SSP1-2.6 land use", + "experiment_id":"ssp370-ssp126Lu", + "min_number_yrs_per_sim":"86", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ - "LAND" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "volc-pinatubo-surf":{ + "ssp370SST":{ "activity_id":[ - "VolMIP" + "AerChemMIP" ], - "description":"As volc-pinatubo-full, but with prescribed perturbation to the shortwave flux to mimic the attenuation of solar radiation by volcanic aerosols", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "piControl" + "additional_allowed_model_components":[ + "CHEM" ], + "description":"Future SSP3-7.0, with SSTs prescribed from ssp370", + "end_year":"2055", + "experiment":"SSP3-7.0, with SSTs prescribed from ssp370", + "experiment_id":"ssp370SST", + "min_number_yrs_per_sim":"41", "parent_activity_id":[ - "CMIP" + "ScenarioMIP" ], - "experiment":"Pinatubo experiment with partial radiative forcing, solar radiation scattering only", - "additional_allowed_model_components":[ - "AER", - "CHEM", - "BGC" + "parent_experiment_id":[ + "ssp370" ], "required_model_components":[ - "AOGCM" + "AGCM", + "AER" ], - "tier":"1", - "min_number_yrs_per_sim":"3", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "ssp370SST-lowO3":{ + "ssp370SST-lowAer":{ "activity_id":[ "AerChemMIP" ], - "description":"Future SSP3-7.0 with reduced ozone precursor emissions (from ssp370-lowNTCF), prescribed SSTs", - "start_year":"2015", + "additional_allowed_model_components":[ + "CHEM" + ], + "description":"Future SSP3-7.0 with reduced aerosol emissions (from ssp370-lowNTCF), prescribed SSTs", "end_year":"2055", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSP3-7.0, prescribed SSTs, with low ozone precursor emissions", - "additional_allowed_model_components":"", + "experiment":"SSP3-7.0, prescribed SSTs, with low aerosol emissions", + "experiment_id":"ssp370SST-lowAer", + "min_number_yrs_per_sim":"41", + "parent_activity_id":[ + "ScenarioMIP" + ], + "parent_experiment_id":[ + "ssp370" + ], "required_model_components":[ "AGCM", - "AER", - "CHEM" + "AER" ], - "tier":"2", - "min_number_yrs_per_sim":"41", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "a4SSTice":{ + "ssp370SST-lowBC":{ "activity_id":[ - "CFMIP" + "AerChemMIP" ], - "description":"As piSST, but with monthly-varying SSTs and sea-ice taken from years 111-140 of each model's own abrupt4xCO2 experiment instead of from piControl", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"as piSST but with SSTs and sea ice from abrupt4xCO2", "additional_allowed_model_components":[ - "AER", "CHEM" ], + "description":"Future SSP3-7.0 with reduced black carbon emissions, prescribed SSTs", + "end_year":"2055", + "experiment":"SSP3-7.0, prescribed SSTs, with low black carbon emissions", + "experiment_id":"ssp370SST-lowBC", + "min_number_yrs_per_sim":"41", + "parent_activity_id":[ + "ScenarioMIP" + ], + "parent_experiment_id":[ + "ssp370" + ], "required_model_components":[ - "AGCM" + "AGCM", + "AER" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "land-hist-cruNcep":{ + "ssp370SST-lowCH4":{ "activity_id":[ - "LS3MIP" + "AerChemMIP" ], - "description":"Land only simulations", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"as land-hist with CRU-NCEP forcings", "additional_allowed_model_components":"", + "description":"Future SSP3-7.0 with reduced CH4 concentrations, prescribed SSTs", + "end_year":"2055", + "experiment":"SSP3-7.0, prescribed SSTs, with low methane concentrations", + "experiment_id":"ssp370SST-lowCH4", + "min_number_yrs_per_sim":"41", + "parent_activity_id":[ + "ScenarioMIP" + ], + "parent_experiment_id":[ + "ssp370" + ], "required_model_components":[ - "LAND" + "AGCM", + "AER", + "CHEM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "amip-piForcing":{ + "ssp370SST-lowNTCF":{ "activity_id":[ - "CFMIP" + "AerChemMIP" ], - "description":"Identical to standard AMIP experiment but from 1870-present with constant pre-industrial forcing levels (anthropogenic and natural)", - "start_year":"1870", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"AMIP SSTs with pre-industrial anthropogenic and natural forcing", "additional_allowed_model_components":[ - "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"Future SSP3-7.0 with reduced NTCF emissions, prescribed SSTs", + "end_year":"2055", + "experiment":"SSP3-7.0, prescribed SSTs, with low NTCF emissions", + "experiment_id":"ssp370SST-lowNTCF", + "min_number_yrs_per_sim":"41", + "parent_activity_id":[ + "ScenarioMIP" + ], + "parent_experiment_id":[ + "ssp370" ], "required_model_components":[ - "AGCM" + "AGCM", + "AER" ], - "tier":"2", - "min_number_yrs_per_sim":"145", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "esm-piControl-spinup":{ + "ssp370SST-lowO3":{ "activity_id":[ - "CMIP" + "AerChemMIP" ], - "description":"DECK: spin-up portion of the control (emission-driven)", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial control simulation with CO2 concentration calculated (spin-up)", - "additional_allowed_model_components":[ + "additional_allowed_model_components":"", + "description":"Future SSP3-7.0 with reduced ozone precursor emissions (from ssp370-lowNTCF), prescribed SSTs", + "end_year":"2055", + "experiment":"SSP3-7.0, prescribed SSTs, with low ozone precursor emissions", + "experiment_id":"ssp370SST-lowO3", + "min_number_yrs_per_sim":"41", + "parent_activity_id":[ + "ScenarioMIP" + ], + "parent_experiment_id":[ + "ssp370" + ], + "required_model_components":[ + "AGCM", "AER", "CHEM" ], - "required_model_components":[ - "AOGCM", - "BGC" + "start_year":"2015", + "sub_experiment_id":[ + "none" ], - "tier":"2", - "min_number_yrs_per_sim":"100", - "sub_experiment_id":"None" + "tier":"2" }, - "piClim-2xdust":{ + "ssp370SST-ssp126Lu":{ "activity_id":[ "AerChemMIP" ], - "description":"1850 control with doubled dust emissions", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with doubled emissions of dust", "additional_allowed_model_components":[ "CHEM" ], + "description":"Future SSP3-7.0 with low land use change (from ssp126), prescribed SSTs", + "end_year":"2055", + "experiment":"SSP3-7.0, prescribed SSTs, with SSP1-2.6 land use", + "experiment_id":"ssp370SST-ssp126Lu", + "min_number_yrs_per_sim":"41", + "parent_activity_id":[ + "ScenarioMIP" + ], + "parent_experiment_id":[ + "ssp370" + ], "required_model_components":[ "AGCM", "AER" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" - }, - "dcppC-forecast-addAgung":{ - "activity_id":[ - "DCPP" - ], - "description":"Effects of volcanoes on decadal prediction and predictability of forced and internal variability components", "start_year":"2015", - "end_year":"2015", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":[ - "dcppA-assim", - "" + "sub_experiment_id":[ + "none" ], - "parent_activity_id":[ - "DCPP" + "tier":"1" + }, + "ssp434":{ + "activity_id":[ + "ScenarioMIP" ], - "experiment":"2015 forecast with added Agung forcing", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Future scenario with low radiative forcing by the end of century. Reaches about 3.4 W/m2 by 2100; fills gap in RCP forcing pathways between 4.5 and 2.6 W/m2. Concentration-driven", + "end_year":"2100", + "experiment":"gap-filling scenario reaching 3.4 based on SSP4", + "experiment_id":"ssp434", + "min_number_yrs_per_sim":"86", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ "AOGCM" ], - "tier":"3", - "min_number_yrs_per_sim":"5", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "dcppC-amv-Trop-pos":{ + "ssp460":{ "activity_id":[ - "DCPP" + "ScenarioMIP" ], - "description":"Mechanisms and predictability of the hiatus and of similar long timescale variations of both signs", - "start_year":"1992", - "end_year":"1999", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"idealized positive tropical AMV anomaly pattern", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"Future scenario with medium radiative forcing by the end of century. Following approximately RCP6.0 global forcing pathway but with new forcing based on SSP4. Concentration-driven", + "end_year":"2100", + "experiment":"update of RCP6.0 based on SSP4", + "experiment_id":"ssp460", + "min_number_yrs_per_sim":"86", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"5", - "sub_experiment_id":"of form: \"sYYYY\"" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, "ssp534-over":{ "activity_id":[ "ScenarioMIP" ], - "description":"21st century overshoot scenario relative to SSP5_34. Branches from SS5_85 at 2040 with emissions reduced to zero by 2070 and negative thereafter", - "start_year":"2015", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":[ - "ssp585" - ], - "parent_activity_id":[ - "ScenarioMIP" - ], - "experiment":"overshoot of 3.4 W/m**2 branching from ssp585 in 2040", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"21st century overshoot scenario relative to SSP5_34. Branches from SS5_85 at 2040 with emissions reduced to zero by 2070 and negative thereafter. This simulation should optionally be extended to year 2300", + "end_year":"2100 or 2300", + "experiment":"overshoot of 3.4 W/m**2 branching from ssp585 in 2040", + "experiment_id":"ssp534-over", + "min_number_yrs_per_sim":"61", + "parent_activity_id":[ + "ScenarioMIP" + ], + "parent_experiment_id":[ + "ssp585" + ], "required_model_components":[ "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"86", - "sub_experiment_id":"None" + "start_year":"2040", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "land-noFire":{ + "ssp534-over-bgc":{ "activity_id":[ - "LUMIP" + "C4MIP" ], - "description":"Same as land-hist but with anthropogenic ignition and suppression held to 1850 levels", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only with no human fire management", - "additional_allowed_model_components":"", - "required_model_components":[ - "LAND" + "additional_allowed_model_components":[ + "AER", + "CHEM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" - }, - "omip2-spunup":{ - "activity_id":[ - "OMIP" + "description":"This simulation should optionally be extended to year 2300", + "end_year":"2100 or 2300", + "experiment":"biogeochemically-coupled version of the RCP3.4-overshoot based on SSP5", + "experiment_id":"ssp534-over-bgc", + "min_number_yrs_per_sim":"85", + "parent_activity_id":[ + "C4MIP" + ], + "parent_experiment_id":[ + "hist-bgc" ], - "description":"Same as the omipv2 experiment except that it is not initialized with observed climatologies; rather it is initialized with results from at least a 2000-year spin up of the coupled physical-biogeochemical models. Also it includes radiocarbon to evaluate deep-ocean circulation", - "start_year":"1", - "end_year":"310", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"OMIP experiment forced by JRA-55 atmospheric data set and initialized from at least a 2000-year spin up of the coupled physical-biogeochemical model", - "additional_allowed_model_components":"", "required_model_components":[ - "OGCM" + "AOGCM", + "BGC" ], - "tier":"3", - "min_number_yrs_per_sim":"310", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piClim-2xNOx":{ + "ssp585":{ "activity_id":[ - "AerChemMIP" + "ScenarioMIP" ], - "description":"1850 control with doubled emissions of lightning NOx", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with doubled production of NOx due to lightning", - "additional_allowed_model_components":"", - "required_model_components":[ - "AGCM", + "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" ], - "tier":"3", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" - }, - "piClim-spAer-histaer":{ - "activity_id":[ - "RFMIP" + "description":"Future scenario with high radiative forcing by the end of century. Following approximately RCP8.5 global forcing pathway but with new forcing based on SSP5. Concentration-driven. As a tier 2 option, this simulation should be extended to year 2300", + "end_year":"2100 or 2300", + "experiment":"update of RCP8.5 based on SSP5", + "experiment_id":"ssp585", + "min_number_yrs_per_sim":"86", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" ], - "description":"Prescribed anthropogenic aerosol optical properties. Aerosol and ozone forcings", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"transient effective radiative forcing with specified anthropogenic aerosol optical properties, aerosol forcing", - "additional_allowed_model_components":"", "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "piClim-O3":{ + "ssp585-bgc":{ "activity_id":[ - "AerChemMIP" + "C4MIP" ], - "description":"Perturbation from 1850 control using 2014 ozone precursor emissions", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"pre-industrial climatological SSTs and forcing, but with 2014 ozone precursor emissions", - "additional_allowed_model_components":"", - "required_model_components":[ - "AGCM", + "additional_allowed_model_components":[ "AER", "CHEM" ], - "tier":"2", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "description":"Concentration-driven future scenario simulation, biogeochemically-coupled. This simulation should optionally be extended to year 2300", + "end_year":"2100 or 2300", + "experiment":"biogeochemically-coupled version of the RCP8.5 based on SSP5", + "experiment_id":"ssp585-bgc", + "min_number_yrs_per_sim":"85", + "parent_activity_id":[ + "C4MIP" + ], + "parent_experiment_id":[ + "hist-bgc" + ], + "required_model_components":[ + "AOGCM", + "BGC" + ], + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "histSST-piNTCF":{ + "ssp585-withism":{ "activity_id":[ - "AerChemMIP" + "ISMIP6" ], - "description":"Historical WMGHG concentrations and halocarbons emissions, 1850 NTCF emissions, prescribed SSTs", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical SSTs and historical forcing, but with pre-industrial NTCF emissions", "additional_allowed_model_components":[ + "AER", "CHEM", "BGC" ], + "description":"Future climate from ScenarioMIP SSP5-8.5 simulation that includes interactive ice sheets. Set up follows the standard SSP5-8.5 experiment", + "end_year":"2300", + "experiment":"ssp585 with interactive ice sheet", + "experiment_id":"ssp585-withism", + "min_number_yrs_per_sim":"85", + "parent_activity_id":[ + "ISMIP6" + ], + "parent_experiment_id":[ + "historical-withism" + ], "required_model_components":[ - "AGCM", - "AER" + "AOGCM", + "ISM" ], - "tier":"1", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "land-crop-noFert":{ + "sspxy":{ "activity_id":[ - "LUMIP" + "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" ], - "description":"Same as land-hist but with fertilization rates and area held at 1850 levels/distribution", - "start_year":"1850 or 1700", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical land-only with no fertilizer", - "additional_allowed_model_components":"", "required_model_components":[ - "LAND" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "histSST-piCH4":{ + "volc-cluster-21C":{ "activity_id":[ - "AerChemMIP" + "VolMIP" + ], + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" + ], + "description":"Parallel experiment to volc-cluster-ctrl, using restart files from the end of the historical simulation instead of from piControl, and boundary conditions from the 21st century SSP2-4.5 scenario experiment of ScenarioMIP", + "end_year":"2100", + "experiment":"volcanic cluster experiment under 21st century SSP2-4.5 scenario", + "experiment_id":"volc-cluster-21C", + "min_number_yrs_per_sim":"85", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "historical" ], - "description":"Historical (non-CH4) WMGHG concentrations and NTCF emissions, 1850 CH4 concentrations", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"historical SSTs and historical forcing, but with pre-industrial methane concentrations", - "additional_allowed_model_components":"", "required_model_components":[ - "AGCM", - "AER", - "CHEM" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"2015", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "aqua-p4K-lwoff":{ + "volc-cluster-ctrl":{ "activity_id":[ - "CFMIP" + "VolMIP" ], - "description":"As aqua-p4K experiment, but with cloud-radiative effects switched off in the LW radiation code", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"aquaplanet with uniform 4K SST increase and with longwave cloud radiative effects off", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"Early 19th century cluster of strong tropical volcanic eruptions, including the 1809 event of unknown location, the 1815 Tambora and 1835 Cosigueina eruptions. Experiment initialized from PiControl", + "end_year":"", + "experiment":"19th century volcanic cluster initialized from PiControl", + "experiment_id":"volc-cluster-ctrl", + "min_number_yrs_per_sim":"50", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "dcppA-historical":{ + "volc-cluster-mill":{ "activity_id":[ - "DCPP" + "VolMIP" ], - "description":"Historical and future uninitialized simulations to assess the impact of initialization", - "start_year":"1850", - "end_year":"2030", - "sub_experiment":"initialized near end of year YYYY", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"climate simulation initialized from control with forcing prescribed from the historical period and future scenario as in A1", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], - "required_model_components":[ - "AOGCM" + "description":"Parallel experiment to volc-cluster-ctrl but with initial conditions taken from last millennium simulation to account for the effects of a more realistic history of past natural forcing. All forcings except volcanic kept constant from year AD 1790 on", + "end_year":"1858", + "experiment":"19th century volcanic cluster initialized from past1000", + "experiment_id":"volc-cluster-mill", + "min_number_yrs_per_sim":"69", + "parent_activity_id":[ + "PMIP" ], - "tier":"2", - "min_number_yrs_per_sim":"170", - "sub_experiment_id":"of form: \"sYYYY\"" - }, - "land-hist-wfdei":{ - "activity_id":[ - "LS3MIP" + "parent_experiment_id":[ + "past1000" ], - "description":"Land only simulations", - "start_year":"1850", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"as land-hist with WFDEI forcings", - "additional_allowed_model_components":"", "required_model_components":[ - "LAND" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"165", - "sub_experiment_id":"None" + "start_year":"1790", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "G7SST1-cirrus":{ + "volc-long-eq":{ "activity_id":[ - "GeoMIP" + "VolMIP" ], - "description":"Time slice at 2020 (ScenarioMIP Tier 1 high forcing scenario and cirrus thinning according to G7cirrus)", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"SSTs from year 2020 of SSP5-8.5; forcings and other prescribed conditions from year 2020 of SSP5-8.5 and cirrus thinning", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"Idealized equatorial eruption corresponding to an initial emission of 56.2 Tg of SO2. The eruption magnitude corresponds to recent estimates for the 1815 Tambora eruption (Sigl et al., 2015), the largest historical tropical eruption, which was linked to the so-called \"year without a summer\" in 1816. Experiment initialized from PiControl", + "end_year":"", + "experiment":"idealized equatorial volcanic eruption emitting 56.2 Tg SO2", + "experiment_id":"volc-long-eq", + "min_number_yrs_per_sim":"20", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"10", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "piClim-histaer03":{ + "volc-long-hlN":{ "activity_id":[ - "RFMIP" + "VolMIP" ], - "description":"Time-varying forcing by aerosols. SST and sea ice fixed at preindustrial control. Interactive vegetation", - "start_year":"1850", - "end_year":"2100", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"transient effective radiative forcing by aerosols", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"Idealized Northern Hemisphere high-latitude eruption emitting 28.1 Tg of SO2. Experiment initialized from PiControl", + "end_year":"", + "experiment":"idealized Northern Hemisphere high-latitude eruption emitting 28.1 Tg of SO2", + "experiment_id":"volc-long-hlN", + "min_number_yrs_per_sim":"20", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"2", - "min_number_yrs_per_sim":"251", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"2" }, - "piClim-4xCO2":{ + "volc-long-hlS":{ "activity_id":[ - "RFMIP" + "VolMIP" ], - "description":"As in RFMIP-ERF-PI-Cntrl but with 4xCO2", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"effective radiative forcing by 4xCO2", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"Idealized Southern Hemisphere high-latitude eruption emitting 28.1 Tg of SO2. Experiment initialized from PiControl", + "end_year":"", + "experiment":"Idealized Southern Hemisphere high-latitude eruption emitting 28.1 Tg of SO2", + "experiment_id":"volc-long-hlS", + "min_number_yrs_per_sim":"20", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "hist-1950HC":{ + "volc-pinatubo-full":{ "activity_id":[ - "AerChemMIP" + "VolMIP" ], - "description":"Historical WMGHG concentrations and NTCF emissions, 1950 halocarbon concentrations, start 1950", - "start_year":"1950", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":[ - "historical" + "additional_allowed_model_components":[ + "AER", + "CHEM", + "BGC" ], + "description":"1991 Pinatubo forcing as used in the CMIP6 historical simulations. Requires special diagnostics of radiative and latent heating rates. A large number of ensemble members is required to address internal atmospheric variability", + "end_year":"", + "experiment":"Pinatubo experiment", + "experiment_id":"volc-pinatubo-full", + "min_number_yrs_per_sim":"3", "parent_activity_id":[ "CMIP" ], - "experiment":"historical forcing, but with1950s halocarbon concentrations; initialized in 1950", - "additional_allowed_model_components":[ - "BGC" + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AOGCM", - "AER", - "CHEM" - ], - "tier":"1", - "min_number_yrs_per_sim":"65", - "sub_experiment_id":"None" - }, - "1pctCO2-4xext":{ - "activity_id":[ - "ISMIP6" + "AOGCM" ], - "description":"branched from 1pctCO2 run at year 140 and run with CO2 fixed at 4x pre-industrial concentration", "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":[ - "1pctCO2" + "sub_experiment_id":[ + "none" ], - "parent_activity_id":[ - "CMIP" + "tier":"1" + }, + "volc-pinatubo-slab":{ + "activity_id":[ + "VolMIP" ], - "experiment":"extension from year 140 of 1pctCO2 with 4xCO2", "additional_allowed_model_components":[ "AER", "CHEM", "BGC" ], + "description":"As volc-pinatubo-full, but with a slab ocean", + "end_year":"", + "experiment":"Pinatubo experiment with slab ocean", + "experiment_id":"volc-pinatubo-slab", + "min_number_yrs_per_sim":"3", + "parent_activity_id":[ + "VolMIP" + ], + "parent_experiment_id":[ + "control-slab" + ], "required_model_components":[ - "AOGCM" + "AGCM", + "SLAB" ], - "tier":"1", - "min_number_yrs_per_sim":"210", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"3" }, - "piClim-aerO3":{ + "volc-pinatubo-strat":{ "activity_id":[ - "RFMIP" + "VolMIP" ], - "description":"As in RFMIP-ERF-PI-Cntrl but with with present-day aerosols and ozone", - "start_year":"", - "end_year":"", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"effective radiative forcing by present-day aerosols and ozone", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"As volc-pinatubo-full, but with prescribed perturbation to the total (LW+SW) radiative heating rates", + "end_year":"", + "experiment":"Pinatubo experiment with partial radiative forcing, includes only stratospheric warming", + "experiment_id":"volc-pinatubo-strat", + "min_number_yrs_per_sim":"3", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"30", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" }, - "amip":{ + "volc-pinatubo-surf":{ "activity_id":[ - "CMIP" + "VolMIP" ], - "description":"DECK: AMIP", - "start_year":"1979", - "end_year":"2014", - "sub_experiment":"None", - "parent_experiment_id":"", - "parent_activity_id":"", - "experiment":"AMIP", "additional_allowed_model_components":[ "AER", - "CHEM" + "CHEM", + "BGC" + ], + "description":"As volc-pinatubo-full, but with prescribed perturbation to the shortwave flux to mimic the attenuation of solar radiation by volcanic aerosols", + "end_year":"", + "experiment":"Pinatubo experiment with partial radiative forcing, solar radiation scattering only", + "experiment_id":"volc-pinatubo-surf", + "min_number_yrs_per_sim":"3", + "parent_activity_id":[ + "CMIP" + ], + "parent_experiment_id":[ + "piControl" ], "required_model_components":[ - "AGCM" + "AOGCM" ], - "tier":"1", - "min_number_yrs_per_sim":"36", - "sub_experiment_id":"None" + "start_year":"", + "sub_experiment_id":[ + "none" + ], + "tier":"1" } }, "product":[ - "output" + "model-output" ], "tracking_id":[ "hdl:21.14100/.*" @@ -6842,12 +8156,26 @@ "further_info_url":[ "http://furtherinfo.es-doc.org/[[:alpha:]]\\{1,\\}" ], + "realization_index":[ + "^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$" + ], "variant_label":[ - "^r[[:digit:]]\\{1,\\}i[[:digit:]]\\{1,\\}p[[:digit:]]\\{1,\\}f[[:digit:]]\\{1,\\}$" + "r[[:digit:]]\\{1,\\}i[[:digit:]]\\{1,\\}p[[:digit:]]\\{1,\\}f[[:digit:]]\\{1,\\}$" + ], + "data_specs_version":[ + "^[[:digit:]]\\{2,2\\}\\.[[:digit:]]\\{2,2\\}\\.[[:digit:]]\\{2,2\\}$" + ], + "Conventions":[ + "^CF-1.7 CMIP-6.0\\( UGRID-1.0\\)\\{0,\\}$" + ], + "forcing_index":[ + "^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$" + ], + "initialization_index":[ + "^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$" ], - "sub_experiment_id":[ - "^s[[:digit:]]\\{4,4\\}$", - "None" + "physics_index":[ + "^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$" ] } } \ No newline at end of file diff --git a/TestTables/CMIP6_E1hr.json b/TestTables/CMIP6_E1hr.json index b0ff7f54..e5baa944 100644 --- a/TestTables/CMIP6_E1hr.json +++ b/TestTables/CMIP6_E1hr.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table E1hr", "realm": "atmos", "frequency": "1hr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", + "product": "model-output", + "approx_interval": "0.017361", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "pr": { "modeling_realm": "atmos", "standard_name": "precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Precipitation", "comment": "includes both liquid and solid phases", @@ -35,7 +35,7 @@ "modeling_realm": "atmos", "standard_name": "convective_precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -174,7 +174,7 @@ "cell_methods": "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. ", + "comment": "Tendency of the eastward wind by parameterized nonorographic gravity waves.", "dimensions": "longitude latitude plev27 time1", "out_name": "utendnogw27", "type": "", @@ -279,7 +279,7 @@ "comment": "", "dimensions": "longitude latitude plev27 time1", "out_name": "zg27", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", diff --git a/TestTables/CMIP6_E1hrClimMon.json b/TestTables/CMIP6_E1hrClimMon.json index 5ed1ebdb..a1b1df5d 100644 --- a/TestTables/CMIP6_E1hrClimMon.json +++ b/TestTables/CMIP6_E1hrClimMon.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table E1hrClimMon", "realm": "atmos", "frequency": "1hrClimMon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", + "product": "model-output", + "approx_interval": "0.017361", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "rlut": { diff --git a/TestTables/CMIP6_E3hr.json b/TestTables/CMIP6_E3hr.json index cacaef14..f6eade40 100644 --- a/TestTables/CMIP6_E3hr.json +++ b/TestTables/CMIP6_E3hr.json @@ -1,27 +1,27 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table E3hr", "realm": "land", "frequency": "3hr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "0.125000", "generic_levels": "alevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "clivi": { "modeling_realm": "atmos", - "standard_name": "atmosphere_mass_content_of_cloud_ice", + "standard_name": "atmosphere_cloud_ice_content", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Ice Water Path", - "comment": "calculate 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). This includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.", + "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", "out_name": "clivi", "type": "", @@ -35,7 +35,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_cloud_condensed_water_content", "units": "kg m-2", - "cell_methods": "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.", @@ -65,28 +65,11 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "huss": { - "modeling_realm": "atmos", - "standard_name": "specific_humidity", - "units": "1.0", - "cell_methods": "time: mean", - "cell_measures": "area: areacella", - "long_name": "Near-Surface Specific Humidity", - "comment": "Near-surface (usually, 2 meter) specific humidity.", - "dimensions": "longitude latitude time", - "out_name": "huss", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "prcsh": { "modeling_realm": "atmos", "standard_name": "", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "shallow_conv_precipitation_flux", "comment": "Convection precipitation from shallow convection", @@ -103,13 +86,13 @@ "modeling_realm": "atmos", "standard_name": "rainfall_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "Rainfall rate", + "long_name": "Rainfall Flux where Ice Free Ocean over Sea", "comment": "", "dimensions": "longitude latitude time", "out_name": "prra", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -120,7 +103,7 @@ "modeling_realm": "atmos", "standard_name": "convective_rainfall_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Convective Rainfall rate", "comment": "", @@ -137,7 +120,7 @@ "modeling_realm": "atmos", "standard_name": "convective_snowfall_flux", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -154,7 +137,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_water_vapor_content", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Water Vapor Path", "comment": "vertically integrated through the atmospheric column", @@ -167,6 +150,23 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, + "psl": { + "modeling_realm": "atmos", + "standard_name": "air_pressure_at_sea_level", + "units": "Pa", + "cell_methods": "area: time: mean ", + "cell_measures": "area: areacella", + "long_name": "Sea Level Pressure", + "comment": "Sea Level Pressure", + "dimensions": "longitude latitude time", + "out_name": "psl", + "type": "real", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, "ra": { "modeling_realm": "land", "standard_name": "plant_respiration_carbon_flux", @@ -174,7 +174,7 @@ "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Carbon Mass Flux into Atmosphere due to Autotrophic (Plant) Respiration on Land", - "comment": "Carbon mass flux per unit area into atmosphere due to autotrophic respiration on land (respiration by producers) [see rh for heterotrophic production] ", + "comment": "Carbon mass flux per unit area into atmosphere due to autotrophic respiration on land (respiration by producers) [see rh for heterotrophic production]", "dimensions": "longitude latitude time", "out_name": "ra", "type": "real", @@ -205,7 +205,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_longwave_flux", "units": "W m-2", - "cell_methods": "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)", @@ -222,7 +222,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_longwave_flux_assuming_clear_sky", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "TOA Outgoing Clear-sky Longwave Radiation", "comment": "", @@ -239,7 +239,7 @@ "modeling_realm": "atmos", "standard_name": "toa_incoming_shortwave_flux", "units": "W m-2", - "cell_methods": "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", @@ -256,7 +256,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_shortwave_flux", "units": "W m-2", - "cell_methods": "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", @@ -269,34 +269,34 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "sfcWind": { + "rsutcs": { "modeling_realm": "atmos", - "standard_name": "wind_speed", - "units": "m s-1", - "cell_methods": "time: mean", + "standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky", + "units": "W m-2", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "Near-Surface Wind Speed", - "comment": "near-surface (usually, 10 meters) wind speed.", + "long_name": "TOA Outgoing Clear-Sky Shortwave Radiation", + "comment": "Calculated in the absence of clouds.", "dimensions": "longitude latitude time", - "out_name": "sfcWind", - "type": "real", - "positive": "", + "out_name": "rsutcs", + "type": "", + "positive": "up", "valid_min": "", "valid_max": "", "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "tas": { + "sfcWind": { "modeling_realm": "atmos", - "standard_name": "air_temperature", - "units": "K", + "standard_name": "wind_speed", + "units": "m s-1", "cell_methods": "time: mean", "cell_measures": "area: areacella", - "long_name": "Near-Surface Air Temperature", - "comment": "near-surface (usually, 2 meter) air temperature", - "dimensions": "longitude latitude time", - "out_name": "tas", - "type": "", + "long_name": "Near-Surface Wind Speed", + "comment": "near-surface (usually, 10 meters) wind speed.", + "dimensions": "longitude latitude height10m time", + "out_name": "sfcWind", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -304,16 +304,16 @@ "ok_max_mean_abs": "" }, "uas": { - "modeling_realm": "", + "modeling_realm": "atmos", "standard_name": "eastward_wind", "units": "m s-1", "cell_methods": "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", + "dimensions": "longitude latitude height10m time", "out_name": "uas", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -321,16 +321,16 @@ "ok_max_mean_abs": "" }, "vas": { - "modeling_realm": "", + "modeling_realm": "atmos", "standard_name": "northward_wind", "units": "m s-1", "cell_methods": "time: mean", "cell_measures": "area: areacella", "long_name": "Northward Near-Surface Wind", "comment": "Northward component of the near surface wind", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude height10m time", "out_name": "vas", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", diff --git a/TestTables/CMIP6_E3hrPt.json b/TestTables/CMIP6_E3hrPt.json index 4d7e13ee..d25daf1f 100644 --- a/TestTables/CMIP6_E3hrPt.json +++ b/TestTables/CMIP6_E3hrPt.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table E3hrPt", "realm": "atmos", "frequency": "3hr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", - "generic_levels": "", + "product": "model-output", + "approx_interval": "0.125000", + "generic_levels": "alevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "aerasymbnd": { @@ -122,7 +122,7 @@ "units": "1.0", "cell_methods": "time: point", "cell_measures": "area: areacella", - "long_name": "CALIPSO Scattering Ratio CFAD", + "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.", "dimensions": "longitude latitude alt40 scatratio time1", "out_name": "cfadLidarsr532", @@ -156,7 +156,7 @@ "units": "%", "cell_methods": "time: point", "cell_measures": "area: areacella", - "long_name": "CALIPSO Percentage Cloud Cover", + "long_name": "CALIPSO Cloud Fraction", "comment": "Percentage cloud cover at CALIPSO standard heights.", "dimensions": "longitude latitude alt40 time1", "out_name": "clcalipso", @@ -190,7 +190,7 @@ "units": "%", "cell_methods": "time: point", "cell_measures": "area: areacella", - "long_name": "CALIPSO High Level Cloud Fraction", + "long_name": "CALIPSO Percentage High Level Cloud", "comment": "Percentage cloud cover in layer centred on 220hPa", "dimensions": "longitude latitude time1", "out_name": "clhcalipso", @@ -203,7 +203,7 @@ }, "clisccp": { "modeling_realm": "atmos", - "standard_name": "isccp_cloud_area_fraction", + "standard_name": "cloud_area_fraction_in_atmosphere_layer", "units": "%", "cell_methods": "time: point", "cell_measures": "area: areacella", @@ -260,7 +260,7 @@ "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.", - "dimensions": "longitude latitude alt16 misrBands time1", + "dimensions": "longitude latitude alt16 tau time1", "out_name": "clmisr", "type": "", "positive": "", @@ -728,23 +728,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "rsutcs": { - "modeling_realm": "atmos", - "standard_name": "toa_outgoing_shortwave_flux_assuming_clear_sky", - "units": "W m-2", - "cell_methods": "time: point", - "cell_measures": "area: areacella", - "long_name": "TOA Outgoing Clear-Sky Shortwave Radiation", - "comment": "Calculated in the absence of clouds.", - "dimensions": "longitude latitude time1", - "out_name": "rsutcs", - "type": "", - "positive": "up", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "rsutcsbnd": { "modeling_realm": "atmos", "standard_name": "band_toa_outgoing_shortwave_flux_assuming_clear_sky", @@ -813,23 +796,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "tas": { - "modeling_realm": "atmos", - "standard_name": "air_temperature", - "units": "K", - "cell_methods": "time: point", - "cell_measures": "area: areacella", - "long_name": "Near-Surface Air Temperature", - "comment": "near-surface (usually, 2 meter) air temperature", - "dimensions": "longitude latitude time1", - "out_name": "tas", - "type": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "ts": { "modeling_realm": "atmos", "standard_name": "surface_temperature", diff --git a/TestTables/CMIP6_E6hrZ.json b/TestTables/CMIP6_E6hrZ.json index c107289f..0a33492f 100644 --- a/TestTables/CMIP6_E6hrZ.json +++ b/TestTables/CMIP6_E6hrZ.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table E6hrZ", "realm": "atmos", "frequency": "6hr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "0.250000", "generic_levels": "alevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "zmlwaero": { diff --git a/TestTables/CMIP6_Eday.json b/TestTables/CMIP6_Eday.json index f1c05132..76e91912 100644 --- a/TestTables/CMIP6_Eday.json +++ b/TestTables/CMIP6_Eday.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Eday", "realm": "aerosol", "frequency": "day", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", + "product": "model-output", + "approx_interval": "1.00000", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "agesno": { @@ -32,7 +32,7 @@ "ok_max_mean_abs": "" }, "albc": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "canopy_albedo", "units": "1.0", "cell_methods": "area: mean where land time: mean", @@ -50,7 +50,7 @@ }, "albs": { "modeling_realm": "aerosol", - "standard_name": "planetary_albedo", + "standard_name": "surface_albedo", "units": "1.0", "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", @@ -66,7 +66,7 @@ "ok_max_mean_abs": "" }, "albsn": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "snow_and_ice_albedo", "units": "1.0", "cell_methods": "area: mean where land time: mean", @@ -84,12 +84,12 @@ }, "aod550volso4": { "modeling_realm": "atmos", - "standard_name": "aerosol_optical_depth_due_to_stratospheric_volcanic_aerosols_", + "standard_name": "aerosol_optical_depth_due_to_stratospheric_volcanic_aerosols", "units": "1e-09", - "cell_methods": "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 ", + "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", "dimensions": "longitude latitude time", "out_name": "aod550volso4", "type": "", @@ -100,7 +100,7 @@ "ok_max_mean_abs": "" }, "ares": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "aerodynamic_resistance", "units": "s m-1", "cell_methods": "area: mean where land time: mean", @@ -120,7 +120,7 @@ "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": "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.", @@ -133,14 +133,48 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, + "cldnci": { + "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_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.", + "dimensions": "longitude latitude time", + "out_name": "cldnci", + "type": "", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, + "cldnvi": { + "modeling_realm": "atmos", + "standard_name": "atmosphere_number_content_of_cloud_droplets", + "units": "m-2", + "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).", + "dimensions": "longitude latitude time", + "out_name": "cldnvi", + "type": "", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, "clivic": { "modeling_realm": "atmos", "standard_name": "atmosphere_convective_cloud_ice_content", - "units": "kg m-2 ", - "cell_methods": "time: mean", + "units": "kg m-2", + "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. ", + "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.", "dimensions": "longitude latitude time", "out_name": "clivic", "type": "", @@ -153,11 +187,11 @@ "clwvic": { "modeling_realm": "atmos", "standard_name": "atmosphere_convective_cloud_condensed_water_content", - "units": "kg m-2 ", - "cell_methods": "time: mean", + "units": "kg m-2", + "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. ", + "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.", "dimensions": "longitude latitude time", "out_name": "clwvic", "type": "", @@ -168,12 +202,12 @@ "ok_max_mean_abs": "" }, "cnc": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "vegetation_area_fraction", - "units": "", + "units": "%", "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", - "long_name": "Canopy covered fraction", + "long_name": "Canopy covered area percentage", "comment": "", "dimensions": "longitude latitude time", "out_name": "cnc", @@ -184,8 +218,93 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "cw": { + "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": { + "modeling_realm": "land", "standard_name": "canopy_water_amount", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -202,7 +321,7 @@ "ok_max_mean_abs": "" }, "dcw": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "change_over_time_in_canopy_water_amount", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -219,7 +338,7 @@ "ok_max_mean_abs": "" }, "dfr": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "depth_of_frozen_soil", "units": "m", "cell_methods": "area: mean where land time: mean", @@ -236,7 +355,7 @@ "ok_max_mean_abs": "" }, "dgw": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "change_over_time_in_groundwater", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -253,7 +372,7 @@ "ok_max_mean_abs": "" }, "dmlt": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "depth_of_subsurface_melting", "units": "m", "cell_methods": "area: mean where land time: mean", @@ -270,7 +389,7 @@ "ok_max_mean_abs": "" }, "drivw": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "change_over_time_in_river_water_amount", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -287,7 +406,7 @@ "ok_max_mean_abs": "" }, "dslw": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "change_over_time_in_water_content_of_soil_layer", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -304,7 +423,7 @@ "ok_max_mean_abs": "" }, "dsn": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "change_over_time_in_surface_snow_and_ice_amount", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -321,7 +440,7 @@ "ok_max_mean_abs": "" }, "dsw": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "change_over_time_in_surface_water_amount", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -338,7 +457,7 @@ "ok_max_mean_abs": "" }, "dtes": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "change_over_time_in_thermal_energy_content_of_surface", "units": "J m-2", "cell_methods": "area: mean where land time: mean", @@ -355,7 +474,7 @@ "ok_max_mean_abs": "" }, "dtesn": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "change_over_time_in_thermal_energy_content_of_surface_snow_and_ice", "units": "J m-2", "cell_methods": "area: mean where land time: mean", @@ -372,7 +491,7 @@ "ok_max_mean_abs": "" }, "ec": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "liquid_water_evaporation_flux_from_canopy", "units": "kg m-2 s-1", "cell_methods": "area: mean where land time: mean", @@ -388,8 +507,25 @@ "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": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "liquid_water_evaporation_flux_from_open_water", "units": "kg m-2 s-1", "cell_methods": "area: mean where land time: mean", @@ -406,7 +542,7 @@ "ok_max_mean_abs": "" }, "es": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "liquid_water_evaporation_flux_from_soil", "units": "kg m-2 s-1", "cell_methods": "area: mean where land time: mean", @@ -423,7 +559,7 @@ "ok_max_mean_abs": "" }, "esn": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "liquid_water_evaporation_flux_from_surface_snow", "units": "kg m-2 s-1", "cell_methods": "area: mean where land time: mean", @@ -440,7 +576,7 @@ "ok_max_mean_abs": "" }, "et": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "surface_evapotranspiration", "units": "kg m-2 s-1", "cell_methods": "area: mean where land time: mean", @@ -456,16 +592,33 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "hfds": { - "modeling_realm": "ocean", - "standard_name": "surface_downward_heat_flux_in_sea_water", + "hfdsl": { + "modeling_realm": "atmos", + "standard_name": "surface_downward_heat_flux_in_air", "units": "W m-2", "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", - "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') .", + "long_name": "Downward Heat Flux at Land Surface", + "comment": "", "dimensions": "longitude latitude time", - "out_name": "hfds", + "out_name": "hfdsl", + "type": "", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, + "hfdsn": { + "modeling_realm": "landIce land", + "standard_name": "surface_downward_heat_flux_in_snow", + "units": "W m-2", + "cell_methods": "area: mean where land time: mean", + "cell_measures": "area: areacella", + "long_name": "Downward Heat Flux into Snow Where Land over Land", + "comment": "the net downward heat flux from the atmosphere into the snow that lies on land divided by the land area in the grid cell; reported as 0.0 for snow-free land regions or where the land fraction is 0.", + "dimensions": "longitude latitude time", + "out_name": "hfdsn", "type": "real", "positive": "down", "valid_min": "", @@ -493,7 +646,7 @@ "hfmlt": { "modeling_realm": "atmos", "standard_name": "surface_snow_and_ice_melt_heat_flux", - "units": "W m-2 ", + "units": "W m-2", "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Energy of fusion", @@ -510,7 +663,7 @@ "hfrs": { "modeling_realm": "atmos", "standard_name": "temperature_flux_due_to_rainfall_expressed_as_heat_flux_onto_snow_and_ice", - "units": "W m-2 ", + "units": "W m-2", "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Heat transferred to snowpack by rainfall", @@ -527,7 +680,7 @@ "hfsbl": { "modeling_realm": "atmos", "standard_name": "surface_snow_and_ice_sublimation_heat_flux", - "units": "W m-2 ", + "units": "W m-2", "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Energy of sublimation", @@ -545,7 +698,7 @@ "modeling_realm": "", "standard_name": "relative_humidity", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "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')", @@ -592,6 +745,23 @@ "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": { "modeling_realm": "atmos", "standard_name": "cloud_area_fraction_in_atmosphere_layer", @@ -600,7 +770,7 @@ "cell_measures": "area: areacella", "long_name": "MODIS Optical Thickness-Particle Size joint distribution, ice", "comment": "", - "dimensions": "longitude latitude plev7c tau time", + "dimensions": "longitude latitude plev7c effectRadLi|tau time", "out_name": "jpdftaureicemodis", "type": "", "positive": "", @@ -617,7 +787,7 @@ "cell_measures": "area: areacella", "long_name": "MODIS Optical Thickness-Particle Size joint distribution, liquid", "comment": "", - "dimensions": "longitude latitude plev7c tau time", + "dimensions": "longitude latitude plev7c effectRadLi|tau time", "out_name": "jpdftaureliqmodis", "type": "", "positive": "", @@ -632,7 +802,7 @@ "units": "1.0", "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", - "long_name": "leaf area index", + "long_name": "Leaf Area Index", "comment": "", "dimensions": "longitude latitude time", "out_name": "lai", @@ -647,7 +817,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_black_carbon_dry_aerosol", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Load of Black Carbon Aerosol", "comment": "", @@ -664,7 +834,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_dust_dry_aerosol", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Load of Dust", "comment": "", @@ -681,7 +851,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_ammonium_dry_aerosol", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Load of NH4", "comment": "", @@ -698,7 +868,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_nitrate_dry_aerosol", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Load of NO3", "comment": "", @@ -715,7 +885,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_particulate_organic_matter_dry_aerosol", "units": "kg m-2", - "cell_methods": "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).", @@ -732,7 +902,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_primary_particulate_organic_matter_dry_aerosol", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Load of Dry Aerosol Primary Organic Matter", "comment": "", @@ -749,7 +919,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_sulfate_dry_aerosol", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Load of SO4", "comment": "", @@ -766,7 +936,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_secondary_particulate_organic_matter_dry_aerosol", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Load of Dry Aerosol Secondary Organic Matter", "comment": "", @@ -783,7 +953,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_seasalt_dry_aerosol", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Load of Seasalt", "comment": "", @@ -803,7 +973,7 @@ "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Liquid Water Content of Snow Layer", - "comment": "where land over land: this is computed as the total mass of liquid water contained interstitially within the snow layer of the land portion of a grid cell divided by the area of the land portion of the cell.", + "comment": "The total mass of liquid water contained interstitially within the whole depth of the snow layer of the land portion of a grid cell divided by the area of the land portion of the cell.", "dimensions": "longitude latitude time", "out_name": "lwsnl", "type": "real", @@ -817,7 +987,7 @@ "modeling_realm": "ocean", "standard_name": "ocean_mixed_layer_thickness_defined_by_sigma_t", "units": "m", - "cell_methods": "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.", @@ -831,7 +1001,7 @@ "ok_max_mean_abs": "" }, "mrfsofr": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "mass_fraction_of_frozen_water_in_soil_moisture", "units": "1.0", "cell_methods": "area: mean where land time: mean", @@ -848,7 +1018,7 @@ "ok_max_mean_abs": "" }, "mrlqso": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "mass_fraction_of_unfrozen_water_in_soil_moisture", "units": "1.0", "cell_methods": "area: mean where land time: mean", @@ -899,7 +1069,7 @@ "ok_max_mean_abs": "" }, "mrrob": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "subsurface_runoff_flux", "units": "kg m-2 s-1", "cell_methods": "area: mean where land time: mean", @@ -984,7 +1154,7 @@ "ok_max_mean_abs": "" }, "mrsow": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "volume_fraction_of_condensed_water_in_soil_at_field_capacity", "units": "1.0", "cell_methods": "area: mean where land time: mean", @@ -1001,7 +1171,7 @@ "ok_max_mean_abs": "" }, "nudgincsm": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "nudging_increment_in_water_content_of_soil_layer", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -1018,7 +1188,7 @@ "ok_max_mean_abs": "" }, "nudgincswe": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "nudging_increment_in_surface_snow_and_ice_amount", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -1069,7 +1239,7 @@ "ok_max_mean_abs": "" }, "potet": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "water_potential_evapotranspiration_flux", "units": "kg m-2 s-1", "cell_methods": "area: mean where land time: mean", @@ -1089,7 +1259,7 @@ "modeling_realm": "atmos", "standard_name": "precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Precipitation over Crop Tile", "comment": "includes both liquid and solid phases", @@ -1108,7 +1278,7 @@ "units": "kg m-2 s-1", "cell_methods": "area: mean time: mean within hours time: maximum over hours", "cell_measures": "area: areacella", - "long_name": "Daily Maximum Hourly Precipitation Rate", + "long_name": "Maximum Hourly Precipitation Rate", "comment": "", "dimensions": "longitude latitude time", "out_name": "prhmax", @@ -1125,11 +1295,11 @@ "units": "kg m-2 s-1", "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", - "long_name": "Rainfall rate", + "long_name": "Rainfall Flux where Ice Free Ocean over Sea", "comment": "", "dimensions": "longitude latitude time", "out_name": "prra", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -1225,7 +1395,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_water_vapor_content", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Water Vapor Path", "comment": "vertically integrated through the atmospheric column", @@ -1239,7 +1409,7 @@ "ok_max_mean_abs": "" }, "qgwr": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "water_flux_from_soil_layer_to_groundwater", "units": "kg m-2 s-1", "cell_methods": "area: mean where land time: mean", @@ -1259,10 +1429,10 @@ "modeling_realm": "atmos", "standard_name": "effective_radius_of_convective_cloud_liquid_water_particle_at_liquid_water_cloud_top", "units": "m", - "cell_methods": "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 computing monthly mean.daily data, separated to large-scale clouds, convective clouds. If any of the cloud is from more than one process (i.e. shallow convection), please provide them separately. ", + "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 computing monthly mean.daily data, separated to large-scale clouds, convective clouds. If any of the cloud is from more than one process (i.e. shallow convection), please provide them separately.", "dimensions": "longitude latitude time", "out_name": "reffcclwtop", "type": "", @@ -1272,14 +1442,48 @@ "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": { "modeling_realm": "atmos", "standard_name": "effective_radius_of_stratiform_cloud_liquid_water_particle_at_liquid_water_cloud_top", "units": "m", - "cell_methods": "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 computing monthly mean.daily data, separated to large-scale clouds, convective clouds. If any of the cloud is from more than one process (i.e. shallow convection), please provide them separately. ", + "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 computing monthly mean.daily data, separated to large-scale clouds, convective clouds. If any of the cloud is from more than one process (i.e. shallow convection), please provide them separately.", "dimensions": "longitude latitude time", "out_name": "reffsclwtop", "type": "", @@ -1290,7 +1494,7 @@ "ok_max_mean_abs": "" }, "rivi": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "water_flux_from_upstream", "units": "m3 s-1", "cell_methods": "area: mean where land time: mean", @@ -1307,7 +1511,7 @@ "ok_max_mean_abs": "" }, "rivo": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "water_flux_to_downstream", "units": "m3 s-1", "cell_methods": "area: mean where land time: mean", @@ -1340,6 +1544,40 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, + "rsdscsdiff": { + "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_measures": "area: areacella", + "long_name": "Surface Diffuse Downwelling Clear Sky Shortwave Radiation", + "comment": "", + "dimensions": "longitude latitude time", + "out_name": "rsdscsdiff", + "type": "", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, + "rsdsdiff": { + "modeling_realm": "atmos", + "standard_name": "surface_diffuse_downwelling_shortwave_flux_in_air", + "units": "W m-2", + "cell_methods": "area: time: mean ", + "cell_measures": "area: areacella", + "long_name": "Surface Diffuse Downwelling Shortwave Radiation", + "comment": "", + "dimensions": "longitude latitude time", + "out_name": "rsdsdiff", + "type": "real", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, "rss": { "modeling_realm": "atmos", "standard_name": "surface_net_downward_shortwave_flux", @@ -1358,7 +1596,7 @@ "ok_max_mean_abs": "" }, "rzwc": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "water_content_of_root_zone", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -1384,7 +1622,7 @@ "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.", "dimensions": "longitude latitude time", "out_name": "sbl", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -1395,7 +1633,7 @@ "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": "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.", @@ -1408,17 +1646,17 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "sic": { - "modeling_realm": "atmos", - "standard_name": "sea_ice_area_fraction", - "units": "1.0", - "cell_methods": "time: mean", + "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 Area Fraction", - "comment": "fraction of grid cell covered by sea ice.", + "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": "sic", - "type": "", + "out_name": "sithick", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -1562,7 +1800,7 @@ "ok_max_mean_abs": "" }, "sw": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "surface_water_amount_assuming_no_snow", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -1579,10 +1817,10 @@ "ok_max_mean_abs": "" }, "t20d": { - "modeling_realm": "atmos", + "modeling_realm": "ocean", "standard_name": "depth_of_isosurface_of_sea_water_potential_temperature", "units": "m", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "20C isotherm depth", "comment": "", @@ -1616,7 +1854,7 @@ "modeling_realm": "atmos", "standard_name": "air_temperature", "units": "K", - "cell_methods": "", + "cell_methods": "area: time: mean", "cell_measures": "area: areacella", "long_name": "Air Temperature", "comment": "Temperature on the 500 hPa surface", @@ -1650,7 +1888,7 @@ "modeling_realm": "atmos", "standard_name": "air_temperature", "units": "K", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "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')", @@ -1667,7 +1905,7 @@ "modeling_realm": "atmos", "standard_name": "air_temperature", "units": "K", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "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')", @@ -1701,7 +1939,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downward_eastward_stress", "units": "Pa", - "cell_methods": "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", @@ -1718,7 +1956,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downward_eastward_stress_due_to_planetary_boundary_layer", "units": "Pa", - "cell_methods": "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.)", @@ -1735,7 +1973,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downward_northward_stress", "units": "Pa", - "cell_methods": "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", @@ -1752,7 +1990,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downward_northward_stress_due_to_planetary_boundary_layer", "units": "Pa", - "cell_methods": "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.)", @@ -1766,7 +2004,7 @@ "ok_max_mean_abs": "" }, "tcs": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "canopy_temperature", "units": "K", "cell_methods": "area: mean where land time: mean", @@ -1786,7 +2024,7 @@ "modeling_realm": "atmos", "standard_name": "dew_point_temperature", "units": "K", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "2m dewpoint temperature", "comment": "", @@ -1800,7 +2038,7 @@ "ok_max_mean_abs": "" }, "tgs": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "surface_temperature", "units": "K", "cell_methods": "area: mean where land time: mean", @@ -1867,8 +2105,42 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "tsnl": { + "ts": { "modeling_realm": "atmos", + "standard_name": "surface_temperature", + "units": "K", + "cell_methods": "area: time: mean ", + "cell_measures": "area: areacella", + "long_name": "Surface Temperature", + "comment": "Temperature of the lower boundary of the atmosphere", + "dimensions": "longitude latitude time", + "out_name": "ts", + "type": "real", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, + "tsl": { + "modeling_realm": "land", + "standard_name": "soil_temperature", + "units": "K", + "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.", + "dimensions": "longitude latitude sdepth time", + "out_name": "tsl", + "type": "real", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, + "tsnl": { + "modeling_realm": "land", "standard_name": "snow_temperature", "units": "K", "cell_methods": "area: mean where land time: mean", @@ -1902,7 +2174,7 @@ "ok_max_mean_abs": "" }, "tws": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "canopy_and_surface_and_subsurface_water_amount", "units": "kg m-2", "cell_methods": "area: mean where land time: mean", @@ -1941,7 +2213,7 @@ "units": "m s-1", "cell_methods": "area: time: mean", "cell_measures": "area: areacella", - "long_name": "Eastward Wind", + "long_name": "Eastward Wind at 200hPa", "comment": "Zonal wind (positive eastwards) at 200hPa", "dimensions": "longitude latitude time p200", "out_name": "ua200", @@ -2038,7 +2310,7 @@ "ok_max_mean_abs": "" }, "wtd": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "depth_of_soil_moisture_saturation", "units": "m", "cell_methods": "area: mean where land time: mean", @@ -2064,7 +2336,7 @@ "comment": "", "dimensions": "longitude latitude plev19 time", "out_name": "zg", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", @@ -2092,7 +2364,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_boundary_layer_thickness", "units": "m", - "cell_methods": "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 a41e9b41..106227c8 100644 --- a/TestTables/CMIP6_EdayZ.json +++ b/TestTables/CMIP6_EdayZ.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table EdayZ", "realm": "atmos", "frequency": "day", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", + "product": "model-output", + "approx_interval": "1.00000", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "epfy": { @@ -52,11 +52,11 @@ "modeling_realm": "atmos", "standard_name": "specific_humidity", "units": "1.0", - "cell_methods": "longitude: mean time: mean", - "cell_measures": "area: areacella", + "cell_methods": "time: mean", + "cell_measures": "", "long_name": "Specific Humidity", "comment": "", - "dimensions": "latitude plev39 time", + "dimensions": "latitude plev19 time", "out_name": "hus", "type": "", "positive": "", @@ -86,11 +86,11 @@ "modeling_realm": "atmos", "standard_name": "air_temperature", "units": "K", - "cell_methods": "longitude: mean time: mean", - "cell_measures": "area: areacella", + "cell_methods": "time: mean", + "cell_measures": "", "long_name": "Air Temperature", "comment": "Air Temperature", - "dimensions": "latitude plev39 time", + "dimensions": "latitude plev19 time", "out_name": "ta", "type": "", "positive": "", @@ -140,7 +140,7 @@ "cell_methods": "longitude: mean time: mean", "cell_measures": "area: areacella", "long_name": "u-tendency nonorographic gravity wave drag", - "comment": "Tendency of the eastward wind by parameterized nonorographic gravity waves. ", + "comment": "Tendency of the eastward wind by parameterized nonorographic gravity waves.", "dimensions": "latitude plev39 time", "out_name": "utendnogw", "type": "", @@ -157,7 +157,7 @@ "cell_methods": "longitude: mean time: mean", "cell_measures": "area: areacella", "long_name": "u-tendency orographic gravity wave drag", - "comment": "Tendency of the eastward wind by parameterized orographic gravity waves. ", + "comment": "Tendency of the eastward wind by parameterized orographic gravity waves.", "dimensions": "latitude plev39 time", "out_name": "utendogw", "type": "", @@ -205,11 +205,11 @@ "modeling_realm": "atmos", "standard_name": "northward_wind", "units": "m s-1", - "cell_methods": "longitude: mean time: mean", - "cell_measures": "area: areacella", + "cell_methods": "time: mean", + "cell_measures": "", "long_name": "Northward Wind", "comment": "", - "dimensions": "latitude plev39 time", + "dimensions": "latitude plev19 time", "out_name": "va", "type": "", "positive": "", @@ -256,13 +256,13 @@ "modeling_realm": "atmos", "standard_name": "geopotential_height", "units": "m", - "cell_methods": "longitude: mean time: mean", - "cell_measures": "area: areacella", + "cell_methods": "time: mean", + "cell_measures": "", "long_name": "Geopotential Height", "comment": "", - "dimensions": "latitude plev39 time", + "dimensions": "latitude plev19 time", "out_name": "zg", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", diff --git a/TestTables/CMIP6_Efx.json b/TestTables/CMIP6_Efx.json index bf3cb310..541e7674 100644 --- a/TestTables/CMIP6_Efx.json +++ b/TestTables/CMIP6_Efx.json @@ -1,29 +1,29 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Efx", - "realm": "atmos", + "realm": "land", "frequency": "fx", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "0.00000", "generic_levels": "alevel olevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { - "areacella": { - "modeling_realm": "", - "standard_name": "cell_area", - "units": "m2", - "cell_methods": "time: mean", + "clayfrac": { + "modeling_realm": "atmos", + "standard_name": "", + "units": "1.0", + "cell_methods": "area: mean where land", "cell_measures": "area: areacella", - "long_name": "Atmosphere Grid-Cell Area", - "comment": "For atmospheres with more than 1 mesh (e.g., staggered grids), report areas that apply to surface vertical fluxes of energy.", - "dimensions": "longitude latitude time", - "out_name": "areacella", + "long_name": "Clay Fraction", + "comment": "", + "dimensions": "longitude latitude sdepth", + "out_name": "clayfrac", "type": "", "positive": "", "valid_min": "", @@ -32,7 +32,7 @@ "ok_max_mean_abs": "" }, "fldcapacity": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "", "units": "%", "cell_methods": "area: mean where land", @@ -49,7 +49,7 @@ "ok_max_mean_abs": "" }, "ksat": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "", "units": "1e-6 m s-1", "cell_methods": "area: mean where land", @@ -65,40 +65,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "mrsofc": { - "modeling_realm": "land", - "standard_name": "soil_moisture_content_at_field_capacity", - "units": "kg m-2", - "cell_methods": "area: mean where land", - "cell_measures": "area: areacella", - "long_name": "Capacity of Soil to Store Water", - "comment": "'reported *where land*: divide the total water holding capacity of all the soil in the grid cell by the land area in the grid cell; reported as *missing* where the land fraction is 0.'", - "dimensions": "longitude latitude time", - "out_name": "mrsofc", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "orog": { - "modeling_realm": "land", - "standard_name": "surface_altitude", - "units": "m", - "cell_methods": "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.", - "dimensions": "longitude latitude time", - "out_name": "orog", - "type": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "rld": { "modeling_realm": "atmos", "standard_name": "downwelling_longwave_flux_in_air", @@ -133,25 +99,8 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "rootd": { - "modeling_realm": "land", - "standard_name": "root_depth", - "units": "m", - "cell_methods": "area: mean where land", - "cell_measures": "area: areacella", - "long_name": "Maximum Root Depth", - "comment": "report the maximum soil depth reachable by plant roots (if defined in model), i.e., the maximum soil depth from which they can extract moisture; report as *missing* where the land fraction is 0.", - "dimensions": "longitude latitude time", - "out_name": "rootd", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "rootdsl": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "", "units": "kg m-3", "cell_methods": "area: mean where land", @@ -201,16 +150,16 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "sftflf": { - "modeling_realm": "landIce", - "standard_name": "floating_ice_shelf_area_fraction", - "units": "%", - "cell_methods": "time: mean", + "sandfrac": { + "modeling_realm": "atmos", + "standard_name": "", + "units": "1.0", + "cell_methods": "area: mean where land", "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", - "out_name": "sftflf", + "long_name": "Sand Fraction", + "comment": "", + "dimensions": "longitude latitude sdepth", + "out_name": "sandfrac", "type": "", "positive": "", "valid_min": "", @@ -218,17 +167,17 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "sftgif": { - "modeling_realm": "land", - "standard_name": "land_ice_area_fraction", + "sftflf": { + "modeling_realm": "landIce", + "standard_name": "floating_ice_shelf_area_fraction", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: 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", - "out_name": "sftgif", - "type": "real", + "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", + "out_name": "sftflf", + "type": "", "positive": "", "valid_min": "", "valid_max": "", @@ -239,11 +188,11 @@ "modeling_realm": "landIce", "standard_name": "grounded_ice_sheet_area_fraction", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: 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", "out_name": "sftgrf", "type": "", "positive": "", @@ -252,16 +201,16 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "slthick": { + "siltfrac": { "modeling_realm": "atmos", "standard_name": "", - "units": "m", + "units": "1.0", "cell_methods": "area: mean where land", "cell_measures": "area: areacella", - "long_name": "Thickness of Soil Layers", + "long_name": "Silt Fraction", "comment": "", "dimensions": "longitude latitude sdepth", - "out_name": "slthick", + "out_name": "siltfrac", "type": "", "positive": "", "valid_min": "", @@ -269,33 +218,16 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "spectlower": { - "modeling_realm": "atmos", - "standard_name": "band_lower_bound", - "units": "cm-1", - "cell_methods": "", - "cell_measures": "", - "long_name": "Lower frequency bound of band", - "comment": "", - "dimensions": "spectband", - "out_name": "spectlower", - "type": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "spectupper": { - "modeling_realm": "atmos", - "standard_name": "band_upper_bound", - "units": "cm-1", - "cell_methods": "", - "cell_measures": "", - "long_name": "Upper frequency bound of band", + "slthick": { + "modeling_realm": "land", + "standard_name": "", + "units": "m", + "cell_methods": "area: mean where land", + "cell_measures": "area: areacella", + "long_name": "Thickness of Soil Layers", "comment": "", - "dimensions": "spectband", - "out_name": "spectupper", + "dimensions": "longitude latitude sdepth", + "out_name": "slthick", "type": "", "positive": "", "valid_min": "", @@ -304,7 +236,7 @@ "ok_max_mean_abs": "" }, "wilt": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "", "units": "%", "cell_methods": "area: mean where land", diff --git a/TestTables/CMIP6_Emon.json b/TestTables/CMIP6_Emon.json index a339604e..4b1833b4 100644 --- a/TestTables/CMIP6_Emon.json +++ b/TestTables/CMIP6_Emon.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.02", + "data_specs_version": "01.00.06", "table_id": "Table Emon", "realm": "atmos", "frequency": "mon", "cmor_version": "3.2", - "table_date": "08 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", - "generic_levels": "", + "product": "model-output", + "approx_interval": "30.00000", + "generic_levels": "alevel olevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "H2p": { "modeling_realm": "atmos", "standard_name": "", "units": "", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "2H in total precipitation", "comment": "Roche - LSCE", @@ -35,7 +35,7 @@ "modeling_realm": "atmos", "standard_name": "", "units": "", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "2H in solid precipitation", "comment": "Roche - LSCE", @@ -69,7 +69,7 @@ "modeling_realm": "atmos", "standard_name": "", "units": "", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "17O in total precipitation", "comment": "Roche - LSCE", @@ -86,7 +86,7 @@ "modeling_realm": "atmos", "standard_name": "", "units": "", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "17O in solid precipitation", "comment": "Roche - LSCE", @@ -120,7 +120,7 @@ "modeling_realm": "atmos", "standard_name": "", "units": "", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "18O in total precipitation", "comment": "Roche - LSCE", @@ -137,7 +137,7 @@ "modeling_realm": "atmos", "standard_name": "", "units": "", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "18O in solid precipitation", "comment": "Roche - LSCE", @@ -184,10 +184,44 @@ "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": "1", + "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", @@ -239,7 +273,7 @@ "modeling_realm": "land", "standard_name": "soil_c13_content", "units": "kg m-2", - "cell_methods": "time: mean", + "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", @@ -256,7 +290,7 @@ "modeling_realm": "land", "standard_name": "vegetation_c13_content", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Mass of 13C in Vegetation", "comment": "as specified by C4MIP", @@ -273,7 +307,7 @@ "modeling_realm": "land", "standard_name": "total_land_c14", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Mass of 14C in all terrestrial carbon pools", "comment": "as specified by C4MIP", @@ -290,7 +324,7 @@ "modeling_realm": "land", "standard_name": "litter_c14_content", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Mass of 14C in Litter Pool", "comment": "as specified by C4MIP", @@ -307,7 +341,7 @@ "modeling_realm": "land", "standard_name": "soil_c14_content", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Mass of 14C in Soil Pool", "comment": "as specified by C4MIP", @@ -324,7 +358,7 @@ "modeling_realm": "land", "standard_name": "vegetation_c14_content", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Mass of 14C in Vegetation", "comment": "as specified by C4MIP", @@ -582,7 +616,7 @@ "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Carbon mass in each model soil pool (summed over vertical levels)", - "comment": "for models with multiple soil carbon pools, report each pool here. If models also have vertical discretaisation these should be aggregated ", + "comment": "for models with multiple soil carbon pools, report each pool here. If models also have vertical discretaisation these should be aggregated", "dimensions": "longitude latitude time", "out_name": "cSoilPools", "type": "", @@ -817,7 +851,7 @@ "modeling_realm": "atmos", "standard_name": "number_concentration_of_ice_crystals_in_air_at_ice_cloud_top", "units": "m-3", - "cell_methods": "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.", @@ -834,7 +868,7 @@ "modeling_realm": "atmos", "standard_name": "number_concentration_of_cloud_liquid_water_particles_in_air_at_liquid_water_cloud_top", "units": "m-3", - "cell_methods": "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.", @@ -851,7 +885,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_number_content_of_cloud_droplets", "units": "m-2", - "cell_methods": "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).", @@ -885,9 +919,9 @@ "modeling_realm": "atmos", "standard_name": "ice_cloud_area_fraction", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "MODIS Ice Cloud Fraction", + "long_name": "MODIS Ice Cloud Area Percentage", "comment": "", "dimensions": "longitude latitude time", "out_name": "climodis", @@ -906,7 +940,7 @@ "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.", - "dimensions": "longitude latitude alt16 misrBands time", + "dimensions": "longitude latitude alt16 tau time", "out_name": "clmisr", "type": "", "positive": "", @@ -919,9 +953,9 @@ "modeling_realm": "atmos", "standard_name": "cloud_area_fraction", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "MODIS Total Cloud Fraction", + "long_name": "MODIS Total Cloud Cover Percentage", "comment": "", "dimensions": "longitude latitude time", "out_name": "cltmodis", @@ -936,7 +970,7 @@ "modeling_realm": "atmos", "standard_name": "liquid_cloud_area_fraction", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "MODIS Liquid Cloud Fraction", "comment": "", @@ -952,11 +986,11 @@ "clwvic": { "modeling_realm": "atmos", "standard_name": "atmosphere_convective_cloud_condensed_water_content", - "units": "kg m-2 ", - "cell_methods": "time: mean", + "units": "kg m-2", + "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. ", + "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.", "dimensions": "longitude latitude time", "out_name": "clwvic", "type": "", @@ -987,7 +1021,7 @@ "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", "units": "1e-06", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Atmosphere CO2", "comment": "As co2, but only at the surface", @@ -1003,8 +1037,8 @@ "columnmassflux": { "modeling_realm": "atmos", "standard_name": "atmosphere_net_upward_convective_mass_flux", - "units": "kg m-1 s-1", - "cell_methods": "time: mean", + "units": "kg m-2 s-1", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Column Integrated Mass Flux", "comment": "Column integral of (mcu-mcd)", @@ -1091,7 +1125,7 @@ "units": "%", "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", - "long_name": "Percentage Cover by C3 Crops ", + "long_name": "Percentage Cover by C3 Crops", "comment": "Percentage of entire grid cell covered by C3 crops", "dimensions": "longitude latitude time", "out_name": "cropFracC3", @@ -1106,9 +1140,9 @@ "modeling_realm": "land", "standard_name": "crop_fraction_c4", "units": "%", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "Percentage Cover by C4 Crops ", + "long_name": "Percentage Cover by C4 Crops", "comment": "Percentage of entire grid cell covered by C4 crops", "dimensions": "longitude latitude time", "out_name": "cropFracC4", @@ -1123,7 +1157,7 @@ "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": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Total Deposition Rate of Dust", "comment": "Balkanski - LSCE", @@ -1144,7 +1178,7 @@ "cell_measures": "area: areacella", "long_name": "Tendency of Eastward Wind from Numerical Artefacts", "comment": "Other sub-grid scale/numerical zonal drag excluding that already provided for the parameterized orographic and non-ororgraphic gravity waves. This would be used to calculate the total 'diabatic drag'. Contributions to this additional drag such Rayleigh friction and diffusion that can be calculated from the monthly mean wind fields should not be included, but details (e.g. coefficients) of the friction and/or diffusion used in the model should be provided separately.", - "dimensions": "longitude latitude plev23 time", + "dimensions": "longitude latitude plev19 time", "out_name": "diabdrag", "type": "", "positive": "", @@ -1155,7 +1189,7 @@ }, "dissi13c": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_dissolved_inorganic_c13_in_sea_water", + "standard_name": "mole_concentration_of_dissolved_inorganic_carbon13_in_sea_water", "units": "mol m-3", "cell_methods": "area: time: mean", "cell_measures": "area: areacello", @@ -1204,26 +1238,9 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "dmso": { - "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_dimethyl_sulfide_in_sea_water", - "units": "mol m-3", - "cell_methods": "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", - "dimensions": "longitude latitude olevel time", - "out_name": "dmso", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "ec550aer": { "modeling_realm": "aerosol", - "standard_name": "volume_extinction_coefficient_in_air_due_to_ambient_aerosol", + "standard_name": "volume_extinction_coefficient_in_air_due_to_ambient_aerosol_particles", "units": "m-1", "cell_methods": "time: mean", "cell_measures": "area: areacella", @@ -1239,10 +1256,10 @@ "ok_max_mean_abs": "" }, "evspsblpot": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "water_potential_evaporation_flux", "units": "kg m-2 s-1", - "cell_methods": "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)", @@ -1395,7 +1412,7 @@ "modeling_realm": "land", "standard_name": "asymbiontic_biological_nitrogen_fixation", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "asymbiontic biological nitrogen fixation", "comment": "as specified by C4MIP", @@ -1412,7 +1429,7 @@ "modeling_realm": "land", "standard_name": "symbiontic_biological_nitrogen_fixation", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "symbiontic biological nitrogen fixation", "comment": "as specified by C4MIP", @@ -1432,7 +1449,7 @@ "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Lateral transfer of carbon out of gridcell that eventually goes into ocean", - "comment": "leached carbon etc that goes into run off or river routing and finds its way into ocean should be reported here. ", + "comment": "leached carbon etc that goes into run off or river routing and finds its way into ocean should be reported here.", "dimensions": "longitude latitude time", "out_name": "fCLandToOcean", "type": "", @@ -1446,7 +1463,7 @@ "modeling_realm": "land", "standard_name": "deforested_biomass_due_to_anthorpogenic_land_use_change", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "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", @@ -1602,7 +1619,7 @@ "cell_methods": "area: time: mean where landuse", "cell_measures": "area: areacella", "long_name": "carbon transferred directly to atmosphere due to any land-use or land-cover change activities including deforestation or agricultural fire", - "comment": " This annual mean flux refers to the transfer of carbon directly to the atmosphere due to any land-use or land-cover change activities. Include carbon transferred due to deforestation or agricultural directly into atsmophere, and emissions form anthropogenic pools into atmosphere", + "comment": "This annual mean flux refers to the transfer of carbon directly to the atmosphere due to any land-use or land-cover change activities. Include carbon transferred due to deforestation or agricultural directly into atsmophere, and emissions form anthropogenic pools into atmosphere", "dimensions": "longitude latitude landUse time", "out_name": "fLulccAtmLut", "type": "", @@ -1619,7 +1636,7 @@ "cell_methods": "area: time: mean where landuse", "cell_measures": "area: areacella", "long_name": "carbon harvested due to land-use or land-cover change process that enters anthropogenic product pools on tile", - "comment": " This annual mean flux refers to the transfer of carbon primarily through harvesting land use into anthropogenic product pools, e.g.,deforestation or wood harvestingfrom primary or secondary lands, food harvesting on croplands, harvesting (grazing) by animals on pastures.", + "comment": "This annual mean flux refers to the transfer of carbon primarily through harvesting land use into anthropogenic product pools, e.g.,deforestation or wood harvestingfrom primary or secondary lands, food harvesting on croplands, harvesting (grazing) by animals on pastures.", "dimensions": "longitude latitude landUse time", "out_name": "fLulccProductLut", "type": "", @@ -1636,7 +1653,7 @@ "cell_methods": "area: time: mean where landuse", "cell_measures": "area: areacella", "long_name": "carbon transferred to soil or litter pools due to land-use or land-cover change processes on tile", - "comment": " This annual mean flux refers to the transfer of carbon into soil or litter pools due to any land use or land-cover change activities", + "comment": "This annual mean flux refers to the transfer of carbon into soil or litter pools due to any land use or land-cover change activities", "dimensions": "longitude latitude landUse time", "out_name": "fLulccResidueLut", "type": "", @@ -1650,9 +1667,9 @@ "modeling_realm": "land", "standard_name": "land_net_n2o_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "Total land N2O flux ", + "long_name": "Total land N2O flux", "comment": "as specified by C4MIP", "dimensions": "longitude latitude time", "out_name": "fN2O", @@ -1687,7 +1704,7 @@ "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Lateral transfer of nitrogen out of gridcell that eventually goes into ocean", - "comment": "leached nitrogen etc that goes into run off or river routing and finds its way into ocean should be reported here. ", + "comment": "leached nitrogen etc that goes into run off or river routing and finds its way into ocean should be reported here.", "dimensions": "longitude latitude time", "out_name": "fNLandToOcean", "type": "", @@ -1720,7 +1737,7 @@ "units": "kg m-2 s-1", "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", - "long_name": "Total land NOx flux ", + "long_name": "Total land NOx flux", "comment": "", "dimensions": "longitude latitude time", "out_name": "fNOx", @@ -1803,7 +1820,7 @@ "modeling_realm": "land", "standard_name": "deposition_of_oxidised_nitrogen_onto_land", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "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", @@ -1820,7 +1837,7 @@ "modeling_realm": "land", "standard_name": "deposition_of_reduced_nitrogen_onto_land", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "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", @@ -2092,7 +2109,7 @@ "modeling_realm": "land", "standard_name": "surface_upward_heat_flux_due_to_anthropogenic_energy_consumption", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "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": "", @@ -2310,7 +2327,7 @@ "ok_max_mean_abs": "" }, "fg14co2": { - "modeling_realm": "ocean", + "modeling_realm": "ocnBgchem", "standard_name": "air_sea_flux_of_14CO2", "units": "mol m-2 s-1", "cell_methods": "time: mean", @@ -2412,10 +2429,10 @@ "ok_max_mean_abs": "" }, "flashrate": { - "modeling_realm": "atmos", + "modeling_realm": "atmosChem", "standard_name": "lightning_flash_rate", "units": "km-2 s-1", - "cell_methods": "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)", @@ -2447,7 +2464,7 @@ }, "gppLut": { "modeling_realm": "land", - "standard_name": "gross_primary_land_productivity_of_carbon", + "standard_name": "gross_primary_productivity_of_biomass_expressed_as_carbon", "units": "kg m-2 s-1", "cell_methods": "area: time: mean where landuse", "cell_measures": "area: areacella", @@ -2500,7 +2517,7 @@ "modeling_realm": "land", "standard_name": "gross_primary_productivity_of_c13", "units": "kg m-2 s-1", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: 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", @@ -2517,7 +2534,7 @@ "modeling_realm": "land", "standard_name": "gross_primary_productivity_of_c14", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "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", @@ -2534,9 +2551,9 @@ "modeling_realm": "land", "standard_name": "grass_fraction_c3", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "C3 grass fraction", + "long_name": "C3 grass Area Percentage", "comment": "as specified by C4MIP", "dimensions": "longitude latitude time", "out_name": "grassFracC3", @@ -2551,9 +2568,9 @@ "modeling_realm": "land", "standard_name": "grass_fraction_c4", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "C4 grass fraction", + "long_name": "C4 grass Area Percentage", "comment": "as specified by C4MIP", "dimensions": "longitude latitude time", "out_name": "grassFracC4", @@ -2585,7 +2602,7 @@ "modeling_realm": "ocean", "standard_name": "heat_content_of_ocean_layer", "units": "m K", - "cell_methods": "", + "cell_methods": "area: time: mean", "cell_measures": "area: areacello", "long_name": "Heat content of upper 300 meters", "comment": "Used in PMIP2", @@ -2636,7 +2653,7 @@ "modeling_realm": "", "standard_name": "relative_humidity", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "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')", @@ -2704,7 +2721,7 @@ "modeling_realm": "atmos", "standard_name": "vertical_integral_eastward_wind_by_dry_static_energy", "units": "1.e6 J m-1 s-1", - "cell_methods": "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", @@ -2721,7 +2738,7 @@ "modeling_realm": "atmos", "standard_name": "vertical_integral_eastward_wind_by_total_water", "units": "kg m-1 s-1", - "cell_methods": "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", @@ -2738,7 +2755,7 @@ "modeling_realm": "atmos", "standard_name": "vertical_integral_northward_wind_by_dry_static_energy", "units": "1.e6 J m-1 s-1", - "cell_methods": "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", @@ -2755,7 +2772,7 @@ "modeling_realm": "atmos", "standard_name": "vertical_integral_northward_wind_by_total_water", "units": "kg m-1 s-1", - "cell_methods": "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", @@ -2772,7 +2789,7 @@ "modeling_realm": "land", "standard_name": "surface_downward_water_flux_due_to_irrigation", "units": "kg s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Irrigation flux including any irrigation for crops, trees, pasture, or urban lawns", "comment": "", @@ -2793,7 +2810,7 @@ "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": "", @@ -2810,7 +2827,7 @@ "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": "", @@ -2825,7 +2842,7 @@ "units": "1.0", "cell_methods": "area: time: mean where landuse", "cell_measures": "area: areacella", - "long_name": "leaf area index on land use tile", + "long_name": "Leaf Area Index on Land Use Tile", "comment": "Note that if tile does not model lai, for example, on the urban tile, then should be reported as missing value", "dimensions": "longitude latitude landUse time", "out_name": "laiLut", @@ -2840,7 +2857,7 @@ "modeling_realm": "land", "standard_name": "lateral_carbon_transfer_over_land", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "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", @@ -2857,7 +2874,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_dust_dry_aerosol", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Load of Dust", "comment": "", @@ -2874,7 +2891,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_sulfate_dry_aerosol", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Load of SO4", "comment": "", @@ -2891,7 +2908,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_mass_content_of_seasalt_dry_aerosol", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Load of Seasalt", "comment": "", @@ -2908,7 +2925,7 @@ "modeling_realm": "atmos", "standard_name": "potential_temperature_difference_between_700hPa_and_1000hPa", "units": "K", - "cell_methods": "time: mean", + "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)", @@ -2921,11 +2938,28 @@ "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": { "modeling_realm": "atmos", "standard_name": "tendency_of_all_sky_surface_longwave_flux_to_dust_ambient_aerosol_particles", "units": "W m-2", - "cell_methods": "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", @@ -2942,7 +2976,7 @@ "modeling_realm": "atmos", "standard_name": "tendency_of_clear_sky_surface_longwave_flux_to_dust_ambient_aerosol_particles", "units": "W m-2", - "cell_methods": "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", @@ -2959,7 +2993,7 @@ "modeling_realm": "atmos", "standard_name": "toa_instantaneous_longwave_forcing", "units": "W m-2", - "cell_methods": "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", @@ -2976,7 +3010,7 @@ "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": "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", @@ -2993,7 +3027,7 @@ "modeling_realm": "atmos", "standard_name": "toa_instantaneous_longwave_forcing", "units": "W m-2", - "cell_methods": "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", @@ -3044,7 +3078,7 @@ "modeling_realm": "atmos", "standard_name": "mass_fraction_of_sulfate_dry_aerosol_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Aerosol Sulfate Mass Mixing Ratio", "comment": "", @@ -3061,7 +3095,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_elemental_carbon_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Elemental carbon mass mixing ratio", "comment": "", @@ -3078,7 +3112,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_dust_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Dust aerosol mass mixing ratio", "comment": "", @@ -3095,7 +3129,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_nitrate_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "NO3 aerosol mass mixing ratio", "comment": "", @@ -3112,7 +3146,7 @@ "modeling_realm": "aerosol", "standard_name": "mass_fraction_of_seasalt_dry_aerosol_particles_in_air", "units": "kg kg-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Sea Salt mass mixing ratio", "comment": "", @@ -3129,9 +3163,9 @@ "modeling_realm": "land", "standard_name": "soil_liquid_water_content", "units": "kg m-2", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "Soil Liquid Water Content ", + "long_name": "Soil Liquid Water Content", "comment": "as specified by C4MIP", "dimensions": "longitude latitude time", "out_name": "mrlso", @@ -3148,7 +3182,7 @@ "units": "kg m-2 s-1", "cell_methods": "area: time: mean where landuse", "cell_measures": "area: areacella", - "long_name": "Total runoff from land use tile ", + "long_name": "Total runoff from land use tile", "comment": "the total runoff (including 'drainage' through the base of the soil model) leaving the land use tile portion of the grid cell", "dimensions": "longitude latitude landUse time", "out_name": "mrroLut", @@ -3177,10 +3211,10 @@ "ok_max_mean_abs": "" }, "mrsll": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "liquid_moisture_content_of_soil_layer", "units": "kg m-2", - "cell_methods": "area: time: mean", + "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", @@ -3227,23 +3261,6 @@ "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": "area: areacella", - "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": "longitude latitude sdepth time", - "out_name": "mrsos", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "mrsosLut": { "modeling_realm": "land", "standard_name": "moisture_content_of_soil_layer", @@ -3265,7 +3282,7 @@ "modeling_realm": "land", "standard_name": "total_water_storage", "units": "kg m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Total water storage in a grid cell", "comment": "as specified by C4MIP", @@ -3282,7 +3299,7 @@ "modeling_realm": "land", "standard_name": "total_land_nitrogen", "units": "kg m-2", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Total nitrogen in all terrestrial nitrogen pools", "comment": "as specified by C4MIP", @@ -3452,7 +3469,7 @@ "modeling_realm": "land", "standard_name": "nitrogen_content_of_products_of_anthropogenic_land_use_change", "units": "kg m-2", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Nitrogen Mass in Products of Land Use Change", "comment": "as specified by C4MIP", @@ -3486,7 +3503,7 @@ "modeling_realm": "land", "standard_name": "soil_nitrogen_content", "units": "kg m-2", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Nitrogen Mass in Soil Pool", "comment": "as specified by C4MIP", @@ -3520,7 +3537,7 @@ "modeling_realm": "land", "standard_name": "vegetation_nitrogen_content", "units": "kg m-2", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Nitrogen Mass in Vegetation", "comment": "as specified by C4MIP", @@ -3535,11 +3552,11 @@ }, "necbLut": { "modeling_realm": "land", - "standard_name": "", + "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: time: mean where landuse", "cell_measures": "area: areacella", - "long_name": " net rate of C accumulation (or loss) on land use tile", + "long_name": "net rate of C accumulation (or loss) on land use tile", "comment": "Computed as npp minus heterotrophic respiration minus fire minus C leaching minus harvesting/clearing. Positive rate is into the land, negative rate is from the land. Do not include fluxes from anthropogenic product pools to atmosphere", "dimensions": "longitude latitude landUse time", "out_name": "necbLut", @@ -3571,7 +3588,7 @@ "modeling_realm": "land", "standard_name": "net_atmos_to_land_C13_flux", "units": "kg m-2 s-1", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: 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", @@ -3588,7 +3605,7 @@ "modeling_realm": "land", "standard_name": "net_atmos_to_land_C14_flux", "units": "kg m-2 s-1", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: 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", @@ -3602,7 +3619,7 @@ "ok_max_mean_abs": "" }, "netAtmosLandCO2Flux": { - "modeling_realm": "atmos", + "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", @@ -3637,7 +3654,7 @@ }, "nppLut": { "modeling_realm": "land", - "standard_name": "net_primary_land_productivity_of_carbon", + "standard_name": "net_primary_productivity_of_biomass_expressed_as_carbon", "units": "kg m-2 s-1", "cell_methods": "area: time: mean where landuse", "cell_measures": "area: areacella", @@ -3739,7 +3756,7 @@ }, "o2sat": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_molecular_oxygen_in_sea_water_at_saturation", + "standard_name": "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water_at_saturation", "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", @@ -3754,23 +3771,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "o3": { - "modeling_realm": "atmos", - "standard_name": "mole_fraction_of_ozone_in_air", - "units": "mol mol-1", - "cell_methods": "time: mean", - "cell_measures": "area: areacella", - "long_name": "Ozone volume mixing ratio", - "comment": "", - "dimensions": "longitude latitude plev23 time", - "out_name": "o3", - "type": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "ocontempdiff": { "modeling_realm": "ocean", "standard_name": "tendency_of_sea_water_conservative_temperature_expressed_as_heat_content_due_to_parameterized_dianeutral_mixing", @@ -3894,7 +3894,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_optical_thickness_due_to_dust_ambient_aerosol_particles", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Optical thickness at 443 nm Dust", "comment": "Balkanski - LSCE", @@ -3907,11 +3907,28 @@ "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": { "modeling_realm": "atmos", "standard_name": "", "units": "1.0", - "cell_methods": "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", @@ -3928,7 +3945,7 @@ "modeling_realm": "atmos", "standard_name": "strat_aerosol_optical_depth", "units": "1.0", - "cell_methods": "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", @@ -3945,7 +3962,7 @@ "modeling_realm": "atmos", "standard_name": "", "units": "1.0", - "cell_methods": "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", @@ -3962,7 +3979,7 @@ "modeling_realm": "atmos", "standard_name": "atmosphere_optical_thickness_due_to_dust_ambient_aerosol_particles", "units": "1.0", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Optical thickness at 865 nm Dust", "comment": "Balkanski - LSCE", @@ -4094,6 +4111,23 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, + "orog": { + "modeling_realm": "land", + "standard_name": "surface_altitude", + "units": "m", + "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.", + "dimensions": "longitude latitude time", + "out_name": "orog", + "type": "real", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, "osaltdiff": { "modeling_realm": "ocean", "standard_name": "tendency_of_sea_water_salinity_expressed_as_salt_content_due_to_parameterized_dianeutral_mixing", @@ -4285,7 +4319,7 @@ "modeling_realm": "land", "standard_name": "total_precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Total precipitation", "comment": "as specified by C4MIP", @@ -4298,40 +4332,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "pfull": { - "modeling_realm": "atmos", - "standard_name": "air_pressure", - "units": "Pa", - "cell_methods": "time: mean", - "cell_measures": "area: areacella", - "long_name": "Pressure on Model Levels", - "comment": "Air pressure on model levels", - "dimensions": "longitude latitude alevel time", - "out_name": "pfull", - "type": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "phalf": { - "modeling_realm": "atmos", - "standard_name": "air_pressure", - "units": "Pa", - "cell_methods": "time: mean", - "cell_measures": "area: areacella", - "long_name": "Pressure on Model Half-Levels", - "comment": "Air pressure on model half-levels", - "dimensions": "longitude latitude alevel time", - "out_name": "phalf", - "type": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "ppcalc": { "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", @@ -4421,7 +4421,7 @@ "modeling_realm": "atmos", "standard_name": "precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Precipitation over Crop Tile", "comment": "includes both liquid and solid phases", @@ -4457,7 +4457,7 @@ "units": "kg m-2 s-1", "cell_methods": "area: mean time: mean within hours time: maximum over hours", "cell_measures": "area: areacella", - "long_name": "Daily Maximum Hourly Precipitation Rate", + "long_name": "Maximum Hourly Precipitation Rate", "comment": "", "dimensions": "longitude latitude time", "out_name": "prhmax", @@ -4485,6 +4485,23 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, + "ps": { + "modeling_realm": "", + "standard_name": "surface_air_pressure", + "units": "Pa", + "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": "", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, "raGrass": { "modeling_realm": "land", "standard_name": "autotrophic_respiration_of_grass", @@ -4642,7 +4659,7 @@ "modeling_realm": "land", "standard_name": "plant_respiration_c14_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "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", @@ -4863,7 +4880,7 @@ "modeling_realm": "land", "standard_name": "heterotrophic_respiration_c14_flux", "units": "kg m-2 s-1", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: 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", @@ -4880,7 +4897,7 @@ "modeling_realm": "atmos", "standard_name": "surface_net_downward_longwave_flux", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Net Longwave Surface Radiation", "comment": "Net longwave surface radiation", @@ -4931,7 +4948,7 @@ "modeling_realm": "atmos", "standard_name": "surface_diffuse_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": "Surface Diffuse Downwelling Clear Sky Shortwave Radiation", "comment": "", @@ -4948,7 +4965,7 @@ "modeling_realm": "atmos", "standard_name": "surface_diffuse_downwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Diffuse Downwelling Shortwave Radiation", "comment": "", @@ -4965,7 +4982,7 @@ "modeling_realm": "atmos", "standard_name": "surface_net_downward_shortwave_flux", "units": "W m-2", - "cell_methods": "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", @@ -4999,7 +5016,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_shortwave_flux_no_aerosol", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "TOA Outgoing Clean-Sky Shortwave Radiation", "comment": "Based on Ghan (2013, ACP)", @@ -5016,7 +5033,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_shortwave_flux_no_aerosol_assuming_clear_sky", "units": "W m-2", - "cell_methods": "time: mean", + "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)", @@ -5033,7 +5050,7 @@ "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": "Surface Concentration of Dust", "comment": "mass concentration of dust dry aerosol in air in model lowest layer", @@ -5050,7 +5067,7 @@ "modeling_realm": "atmos", "standard_name": "mass_concentration_of_sulfate_dry_aerosol_in_air", "units": "kg m-3", - "cell_methods": "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.", @@ -5067,7 +5084,7 @@ "modeling_realm": "atmos", "standard_name": "mass_concentration_of_seasalt_dry_aerosol_in_air", "units": "kg m-3", - "cell_methods": "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", @@ -5084,7 +5101,7 @@ "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": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Sedimentation Flux of dust mode coarse insoluble", "comment": "Balkanski - LSCE", @@ -5101,7 +5118,7 @@ "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": "Daily Maximum Near-Surface Wind Speed", "comment": "Daily maximum near-surface (usually, 10 meters) wind speed.", @@ -5114,17 +5131,17 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "sltnorth": { - "modeling_realm": "atmos", - "standard_name": "northward_ocean_salt_transport", - "units": "kg s-1", - "cell_methods": "time: mean", + "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": "Northward Ocean Salt Transport", - "comment": "", + "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": "sltnorth", - "type": "", + "out_name": "sithick", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -5186,7 +5203,7 @@ "modeling_realm": "atmos", "standard_name": "tendency_of_all_sky_surface_shortwave_flux_due_to_dust_ambient_aerosol_particles", "units": "W m-2", - "cell_methods": "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", @@ -5203,7 +5220,7 @@ "modeling_realm": "atmos", "standard_name": "tendency_of_clear_sky_surface_shortwave_flux_due_to_dust_ambient_aerosol_particles", "units": "W m-2", - "cell_methods": "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", @@ -5220,7 +5237,7 @@ "modeling_realm": "atmos", "standard_name": "toa_instantaneous_shortwave_forcing", "units": "W m-2", - "cell_methods": "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", @@ -5237,7 +5254,7 @@ "modeling_realm": "atmos", "standard_name": "toa_instantaneous_shortwave_forcing", "units": "W m-2", - "cell_methods": "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", @@ -5271,8 +5288,8 @@ "modeling_realm": "ocean", "standard_name": "depth_of_isosurface_of_sea_water_potential_temperature", "units": "m", - "cell_methods": "time: mean", - "cell_measures": "area: areacello", + "cell_methods": "area: time: mean ", + "cell_measures": "area: areacella", "long_name": "20C isotherm depth", "comment": "", "dimensions": "longitude latitude time", @@ -5339,7 +5356,7 @@ "modeling_realm": "atmos", "standard_name": "air_temperature", "units": "K", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "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')", @@ -5356,7 +5373,7 @@ "modeling_realm": "atmos", "standard_name": "air_temperature", "units": "K", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "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')", @@ -5373,7 +5390,7 @@ "modeling_realm": "atmos", "standard_name": "dew_point_temperature", "units": "K", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "2m dewpoint temperature", "comment": "", @@ -5387,11 +5404,11 @@ "ok_max_mean_abs": "" }, "thetaot": { - "modeling_realm": "atmos", + "modeling_realm": "ocean", "standard_name": "sea_water_potential_temperature", - "units": "K", + "units": "degC", "cell_methods": "time: mean", - "cell_measures": "area: areacella", + "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", "dimensions": "longitude latitude time", @@ -5404,9 +5421,9 @@ "ok_max_mean_abs": "" }, "thetaot2000": { - "modeling_realm": "atmos", + "modeling_realm": "ocean", "standard_name": "thetaot2000", - "units": "K", + "units": "degC", "cell_methods": "time: mean", "cell_measures": "area: areacella", "long_name": "Depth average potential temperature of upper 2000m", @@ -5421,9 +5438,9 @@ "ok_max_mean_abs": "" }, "thetaot300": { - "modeling_realm": "atmos", + "modeling_realm": "ocean", "standard_name": "thetaot300", - "units": "K", + "units": "degC", "cell_methods": "time: mean", "cell_measures": "area: areacella", "long_name": "Depth average potential temperature of upper 300m", @@ -5438,9 +5455,9 @@ "ok_max_mean_abs": "" }, "thetaot700": { - "modeling_realm": "atmos", + "modeling_realm": "ocean", "standard_name": "thetaot700", - "units": "K", + "units": "degC", "cell_methods": "time: mean", "cell_measures": "area: areacella", "long_name": "Depth average potential temperature of upper 700m", @@ -5505,23 +5522,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "tntlw": { - "modeling_realm": "atmos", - "standard_name": "tendency_of_air_temperature_due_to_longwave_heating", - "units": "K s-1", - "cell_methods": "time: mean", - "cell_measures": "area: areacella", - "long_name": "Longwave heating rate", - "comment": "Longwave heating rates", - "dimensions": "longitude latitude alevel time", - "out_name": "tntlw", - "type": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "tntmp27": { "modeling_realm": "atmos", "standard_name": "tendency_of_air_temperature_due_to_model_physics", @@ -5641,23 +5641,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "tntsw": { - "modeling_realm": "atmos", - "standard_name": "tendency_of_air_temperature_due_to_shortwave_heating", - "units": "K s-1", - "cell_methods": "time: mean", - "cell_measures": "area: areacella", - "long_name": "Shortwave heating rate", - "comment": "shortwave heating rates", - "dimensions": "longitude latitude plev23 time", - "out_name": "tntsw", - "type": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "tomint": { "modeling_realm": "ocean", "standard_name": "integral_wrt_depth_of_product_of_sea_water_density_and_prognostic_temperature", @@ -5679,7 +5662,7 @@ "modeling_realm": "land", "standard_name": "tree_fraction_broadleaf_deciduous", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Broadleaf deciduous tree fraction", "comment": "as specified by C4MIP", @@ -5713,7 +5696,7 @@ "modeling_realm": "land", "standard_name": "tree_fraction_needleleaf_deciduous", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Needleleaf deciduous tree fraction", "comment": "as specified by C4MIP", @@ -5730,7 +5713,7 @@ "modeling_realm": "land", "standard_name": "tree_fraction_needleleaf_evergreen", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Needleleaf evergreen tree fraction", "comment": "as specified by C4MIP", @@ -5794,23 +5777,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "ua": { - "modeling_realm": "atmos", - "standard_name": "eastward_wind", - "units": "m s-1", - "cell_methods": "time: mean", - "cell_measures": "area: areacella", - "long_name": "Eastward Wind", - "comment": "", - "dimensions": "longitude latitude plev7c time", - "out_name": "ua", - "type": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "ua27": { "modeling_realm": "atmos", "standard_name": "eastward_wind", @@ -5832,7 +5798,7 @@ "modeling_realm": "atmos", "standard_name": "", "units": "m2 s-1", - "cell_methods": "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", @@ -5869,8 +5835,8 @@ "cell_methods": "time: mean", "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 plev23 time", + "comment": "Tendency of the eastward wind by parameterized nonorographic gravity waves.", + "dimensions": "longitude latitude plev19 time", "out_name": "utendnogw", "type": "", "positive": "", @@ -5886,7 +5852,7 @@ "cell_methods": "time: mean", "cell_measures": "area: areacella", "long_name": "u-tendency orographic gravity wave drag", - "comment": "Tendency of the eastward wind by parameterized orographic gravity waves. ", + "comment": "Tendency of the eastward wind by parameterized orographic gravity waves.", "dimensions": "longitude latitude plev19 time", "out_name": "utendogw", "type": "", @@ -5947,7 +5913,7 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "va": { + "va27": { "modeling_realm": "atmos", "standard_name": "northward_wind", "units": "m s-1", @@ -5955,8 +5921,8 @@ "cell_measures": "area: areacella", "long_name": "Northward Wind", "comment": "", - "dimensions": "longitude latitude plev7c time", - "out_name": "va", + "dimensions": "longitude latitude plev27 time", + "out_name": "va27", "type": "", "positive": "", "valid_min": "", @@ -5964,17 +5930,17 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "va27": { + "vas": { "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": "", - "dimensions": "longitude latitude plev27 time", - "out_name": "va27", - "type": "", + "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": "", @@ -6002,7 +5968,7 @@ "modeling_realm": "land", "standard_name": "canopy_height", "units": "m", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: 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", @@ -6019,7 +5985,7 @@ "modeling_realm": "land", "standard_name": "canopy_height", "units": "m", - "cell_methods": "area: mean where land time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Vegetation height averaged over the crop fraction of a grid cell.", "comment": "as specified by C4MIP", @@ -6087,7 +6053,7 @@ "modeling_realm": "land", "standard_name": "canopy_height", "units": "m", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Vegetation height averaged over the tree fraction of a grid cell.", "comment": "as specified by C4MIP", @@ -6104,7 +6070,7 @@ "modeling_realm": "atmos", "standard_name": "", "units": "m2 s-1", - "cell_methods": "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", @@ -6240,7 +6206,7 @@ "modeling_realm": "land", "standard_name": "wetland_methane_emissions", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Grid averaged methane emissions from wetlands", "comment": "as specified by C4MIP", @@ -6291,7 +6257,7 @@ "modeling_realm": "land", "standard_name": "wetland_fraction", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Fraction of a grid cell covered by wetland.", "comment": "as specified by C4MIP", @@ -6348,7 +6314,7 @@ "comment": "", "dimensions": "longitude latitude plev27 time", "out_name": "zg27", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", diff --git a/TestTables/CMIP6_EmonZ.json b/TestTables/CMIP6_EmonZ.json index 2ccec257..748a6f19 100644 --- a/TestTables/CMIP6_EmonZ.json +++ b/TestTables/CMIP6_EmonZ.json @@ -1,28 +1,28 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table EmonZ", "realm": "atmos", "frequency": "mon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", - "generic_levels": "", + "product": "model-output", + "approx_interval": "30.00000", + "generic_levels": "alevel olevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "co2totalmass": { "modeling_realm": "atmos", "standard_name": "CO2_total_mass_in_atmos", "units": "kg", - "cell_methods": "area: mean (global) time: mean", + "cell_methods": "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", - "dimensions": "spectband time", + "dimensions": "time", "out_name": "co2totalmass", "type": "", "positive": "", @@ -99,14 +99,31 @@ "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": { - "modeling_realm": "atmos", + "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", "cell_methods": "longitude: mean time: mean", "cell_measures": "area: areacella", "long_name": "total Ox loss rate", - "comment": "total chemical loss rate for o+o1d+o3 ", + "comment": "total chemical loss rate for o+o1d+o3", "dimensions": "latitude plev39 time", "out_name": "oxloss", "type": "", @@ -117,7 +134,7 @@ "ok_max_mean_abs": "" }, "oxprod": { - "modeling_realm": "atmos", + "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", "cell_methods": "longitude: mean time: mean", @@ -134,7 +151,7 @@ "ok_max_mean_abs": "" }, "sltbasin": { - "modeling_realm": "atmos", + "modeling_realm": "ocean", "standard_name": "northward_ocean_salt_transport", "units": "kg s-1", "cell_methods": "longitude: mean (basin) time: mean", @@ -151,7 +168,7 @@ "ok_max_mean_abs": "" }, "sltnorth": { - "modeling_realm": "atmos", + "modeling_realm": "ocean", "standard_name": "northward_ocean_salt_transport", "units": "kg s-1", "cell_methods": "longitude: mean time: mean", @@ -168,7 +185,7 @@ "ok_max_mean_abs": "" }, "sltnortha": { - "modeling_realm": "atmos", + "modeling_realm": "ocean", "standard_name": "northward_ocean_salt_transport", "units": "kg s-1", "cell_methods": "longitude: mean time: mean", @@ -361,7 +378,7 @@ "cell_methods": "longitude: mean time: mean", "cell_measures": "area: areacella", "long_name": "u-tendency nonorographic gravity wave drag", - "comment": "Tendency of the eastward wind by parameterized nonorographic gravity waves. ", + "comment": "Tendency of the eastward wind by parameterized nonorographic gravity waves.", "dimensions": "latitude plev39 time", "out_name": "utendnogw", "type": "", @@ -372,7 +389,7 @@ "ok_max_mean_abs": "" }, "vmrox": { - "modeling_realm": "atmos", + "modeling_realm": "atmosChem", "standard_name": "mole_fraction_of_ozone_and_atomic_oxygen_and_1D_oxygen_atom", "units": "mol mol-1", "cell_methods": "longitude: mean time: mean", diff --git a/TestTables/CMIP6_Esubhr.json b/TestTables/CMIP6_Esubhr.json index f5cb4dc1..d78a417f 100644 --- a/TestTables/CMIP6_Esubhr.json +++ b/TestTables/CMIP6_Esubhr.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Esubhr", "realm": "atmos", "frequency": "subhr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "0.017361", "generic_levels": "alevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "bldep": { @@ -41,7 +41,7 @@ "comment": "", "dimensions": "longitude latitude time1", "out_name": "hfls", - "type": "", + "type": "real", "positive": "up", "valid_min": "", "valid_max": "", @@ -58,7 +58,7 @@ "comment": "", "dimensions": "longitude latitude time1", "out_name": "hfss", - "type": "", + "type": "real", "positive": "up", "valid_min": "", "valid_max": "", @@ -309,11 +309,11 @@ "units": "K", "cell_methods": "time: point", "cell_measures": "area: areacella", - "long_name": "Near-Surface Air Temperature", + "long_name": "Surface Temperature", "comment": "near-surface (usually, 2 meter) air temperature", "dimensions": "longitude latitude time1", "out_name": "tas", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", @@ -515,7 +515,7 @@ "cell_measures": "area: areacella", "long_name": "Eastward Wind", "comment": "", - "dimensions": "longitude latitude time1", + "dimensions": "longitude latitude alevel time1", "out_name": "ua", "type": "", "positive": "", @@ -532,7 +532,7 @@ "cell_measures": "area: areacella", "long_name": "Northward Wind", "comment": "", - "dimensions": "longitude latitude time1", + "dimensions": "longitude latitude alevel time1", "out_name": "va", "type": "", "positive": "", diff --git a/TestTables/CMIP6_Eyr.json b/TestTables/CMIP6_Eyr.json index 52a45f62..04a36ba7 100644 --- a/TestTables/CMIP6_Eyr.json +++ b/TestTables/CMIP6_Eyr.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Eyr", "realm": "land", "frequency": "yr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", - "generic_levels": "", + "product": "model-output", + "approx_interval": "365", + "generic_levels": "alevel olevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "baresoilFrac": { @@ -22,7 +22,7 @@ "cell_measures": "area: areacella", "long_name": "Bare Soil Fraction", "comment": "Percentage of entire grid cell that is covered by bare soil.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude typebare time", "out_name": "baresoilFrac", "type": "real", "positive": "", @@ -50,7 +50,7 @@ }, "cLitterLut": { "modeling_realm": "land", - "standard_name": "", + "standard_name": "litter_carbon_content", "units": "kg m-2", "cell_methods": "area: mean where landuse time: point", "cell_measures": "area: areacella", @@ -118,7 +118,7 @@ }, "cSoilLut": { "modeling_realm": "land", - "standard_name": "", + "standard_name": "soil_carbon_content", "units": "kg m-2", "cell_methods": "area: mean where landuse time: point", "cell_measures": "area: areacella", @@ -152,7 +152,7 @@ }, "cVegLut": { "modeling_realm": "land", - "standard_name": "", + "standard_name": "vegetation_carbon_content", "units": "kg m-2", "cell_methods": "area: mean where landuse time: point", "cell_measures": "area: areacella", @@ -175,7 +175,7 @@ "cell_measures": "area: areacella", "long_name": "Crop Fraction", "comment": "Percentage of entire grid cell that is covered by crop.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude typecrop time", "out_name": "cropFrac", "type": "real", "positive": "", @@ -184,27 +184,10 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "dispkexyfo": { - "modeling_realm": "ocean", - "standard_name": "ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction", - "units": "W m-2 ", - "cell_methods": "time: mean", - "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", - "out_name": "dispkexyfo", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "fracInLut": { "modeling_realm": "land", - "standard_name": "", - "units": "1", + "standard_name": "area_fraction", + "units": "%", "cell_methods": "area: mean time: sum", "cell_measures": "area: areacella", "long_name": "annual gross fraction that was transferred into this tile from other land use tiles", @@ -220,8 +203,8 @@ }, "fracLut": { "modeling_realm": "land", - "standard_name": "", - "units": "1.0", + "standard_name": "area_fraction", + "units": "%", "cell_methods": "area: mean where landuse time: point", "cell_measures": "area: areacella", "long_name": "fraction of grid cell for each land use tile", @@ -237,8 +220,8 @@ }, "fracOutLut": { "modeling_realm": "land", - "standard_name": "", - "units": "1", + "standard_name": "area_fraction", + "units": "%", "cell_methods": "area: mean time: sum", "cell_measures": "area: areacella", "long_name": "annual gross fraction of land use tile that was transferred into other land use tiles", @@ -260,7 +243,7 @@ "cell_measures": "area: areacella", "long_name": "Natural Grass Fraction", "comment": "Percentage of entire grid cell that is covered by natural grass.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude typenatgr time", "out_name": "grassFrac", "type": "real", "positive": "", @@ -273,7 +256,7 @@ "modeling_realm": "land", "standard_name": "area_fraction", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: 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.)", @@ -286,23 +269,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "rsdoabsorb": { - "modeling_realm": "ocean", - "standard_name": "net_rate_of_absorption_of_shortwave_energy_in_ocean_layer", - "units": "W m-2", - "cell_methods": "time: mean", - "cell_measures": "area: areacello volume: volcello", - "long_name": "net rate of absorption of shortwave energy in ocean layer", - "comment": "", - "dimensions": "longitude latitude olevel time", - "out_name": "rsdoabsorb", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "shrubFrac": { "modeling_realm": "land", "standard_name": "area_fraction", @@ -311,7 +277,7 @@ "cell_measures": "area: areacella", "long_name": "Shrub Fraction", "comment": "Percentage of entire grid cell that is covered by shrub.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude typeshrub time", "out_name": "shrubFrac", "type": "real", "positive": "", @@ -320,16 +286,16 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "tnkebto": { + "tnpeo": { "modeling_realm": "ocean", - "standard_name": "tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport", + "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 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.", + "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": "tnkebto", + "out_name": "tnpeo", "type": "real", "positive": "", "valid_min": "", @@ -345,7 +311,7 @@ "cell_measures": "area: areacella", "long_name": "Tree Cover Fraction", "comment": "Percentage of entire grid cell that is covered by trees.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude typetree time", "out_name": "treeFrac", "type": "real", "positive": "", @@ -355,14 +321,14 @@ "ok_max_mean_abs": "" }, "vegFrac": { - "modeling_realm": "", + "modeling_realm": "atmos", "standard_name": "total_vegetated_fraction", "units": "%", "cell_methods": "time: mean", "cell_measures": "area: areacella", "long_name": "Total vegetated fraction", "comment": "as specified by C4MIP", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude typeveg time", "out_name": "vegFrac", "type": "", "positive": "", diff --git a/TestTables/CMIP6_IfxAnt.json b/TestTables/CMIP6_IfxAnt.json index 29e2c85a..e72cbef6 100644 --- a/TestTables/CMIP6_IfxAnt.json +++ b/TestTables/CMIP6_IfxAnt.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table IfxAnt", "realm": "landIce", "frequency": "fx", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "areacellg": { @@ -21,7 +21,7 @@ "cell_methods": "area: mean", "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). ", + "comment": "Area of the target grid (not the interpolated area of the source grid).", "dimensions": "xant yant time", "out_name": "areacellg", "type": "", diff --git a/TestTables/CMIP6_IfxGre.json b/TestTables/CMIP6_IfxGre.json index d0f9c844..50954fcf 100644 --- a/TestTables/CMIP6_IfxGre.json +++ b/TestTables/CMIP6_IfxGre.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table IfxGre", "realm": "landIce", "frequency": "fx", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "areacellg": { @@ -21,7 +21,7 @@ "cell_methods": "area: mean", "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). ", + "comment": "Area of the target grid (not the interpolated area of the source grid).", "dimensions": "xgre ygre time", "out_name": "areacellg", "type": "", diff --git a/TestTables/CMIP6_ImonAnt.json b/TestTables/CMIP6_ImonAnt.json index 67e33b41..889589e0 100644 --- a/TestTables/CMIP6_ImonAnt.json +++ b/TestTables/CMIP6_ImonAnt.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table ImonAnt", "realm": "atmos", "frequency": "mon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", + "product": "model-output", + "approx_interval": "30.00", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "acabf": { "modeling_realm": "landIce", "standard_name": "land_ice_surface_specific_mass_balance_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Mass Balance flux", "comment": "Specific mass balance means the net rate at which ice is added per unit area at the land ice surface. Computed as the total surface mass balance on the land ice portion of the grid cell divided by land ice area in the grid cell. A negative value means loss of ice", @@ -35,13 +35,13 @@ "modeling_realm": "atmos", "standard_name": "surface_upward_latent_heat_flux", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Upward Latent Heat Flux", "comment": "", "dimensions": "xant yant time", "out_name": "hfls", - "type": "", + "type": "real", "positive": "up", "valid_min": "", "valid_max": "", @@ -52,13 +52,13 @@ "modeling_realm": "atmos", "standard_name": "surface_upward_sensible_heat_flux", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Upward Sensible Heat Flux", "comment": "", "dimensions": "xant yant time", "out_name": "hfss", - "type": "", + "type": "real", "positive": "up", "valid_min": "", "valid_max": "", @@ -69,7 +69,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_surface_melt_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface ice melt flux", "comment": "Loss of ice mass resulting from surface melting. Computed as the total surface melt water on the land ice portion of the grid cell divided by land ice area in the grid cell.", @@ -86,7 +86,7 @@ "modeling_realm": "landIce", "standard_name": "surface_albedo", "units": "1.0", - "cell_methods": "area: time: mean where ice_shelf", + "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", @@ -120,7 +120,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_specific_mass_balance_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "area: areacellg", "long_name": "Basal specific mass balance flux of grounded ice sheet", "comment": "Specific mass balance means the net rate at which ice is added per unit area at the land ice base. A negative value means loss of ice. Computed as the total basal mass balance on the grounded land ice portion of the grid cell divided by grounded land ice area in the grid cell. Cell_methods: area: mean where grounded_ice_sheet", @@ -137,7 +137,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_specific_mass_flux_due_to_calving", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land ice calving flux", "comment": "Loss of ice mass resulting from iceberg calving. Computed as the rate of mass loss by the ice shelf (in kg s-1) divided by the horizontal area of the ice sheet (m2) in the grid box.", @@ -154,7 +154,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_specific_mass_flux_due_to_calving_and_ice_front_melting", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land ice vertical front mass balance flux", "comment": "Total mass balance at the ice front (or vertical margin). It includes both iceberg calving and melt on vertical ice front", @@ -188,7 +188,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_temperature", "units": "K", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "area: areacellg", "long_name": "Basal temperature of grounded ice sheet", "comment": "Basal temperature that is used to force the ice sheet models, it is the temperature AT ice sheet - bedrock interface. Cell_methods: area: mean where grounded_ice_sheet", @@ -205,7 +205,7 @@ "modeling_realm": "landIce", "standard_name": "temperature_at_top_of_ice_sheet_model", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Temperature at top of ice sheet model", "comment": "Upper boundary temperature that is used to force ice sheet models. It is the temperature at the base of the snowpack models, and does not vary with seasons. Report surface temperature of ice sheet where snow thickness is zero", @@ -222,7 +222,7 @@ "modeling_realm": "atmos", "standard_name": "land_ice_runoff_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land Ice Runoff Flux", "comment": "Runoff flux over land ice is the difference between any available liquid water in the snowpack less any refreezing. Computed as the sum of rainfall and melt of snow or ice less any refreezing or water retained in the snowpack", @@ -239,13 +239,13 @@ "modeling_realm": "land", "standard_name": "surface_altitude", "units": "m", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "surface altitude", + "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.", "dimensions": "xant yant time", "out_name": "orog", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -256,13 +256,13 @@ "modeling_realm": "atmos", "standard_name": "rainfall_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "Rainfall rate over Land Ice", + "long_name": "Rainfall Flux where Ice Free Ocean over Sea over Land Ice", "comment": "", "dimensions": "xant yant time", "out_name": "prra", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -273,13 +273,13 @@ "modeling_realm": "atmos", "standard_name": "snowfall_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Snowfall Flux", "comment": "at surface; includes precipitation of all forms of water in the solid phase", "dimensions": "xant yant time", "out_name": "prsn", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -290,13 +290,13 @@ "modeling_realm": "atmos", "standard_name": "surface_downwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Downwelling Longwave Radiation", "comment": "", "dimensions": "xant yant time", "out_name": "rlds", - "type": "", + "type": "real", "positive": "down", "valid_min": "", "valid_max": "", @@ -307,13 +307,13 @@ "modeling_realm": "atmos", "standard_name": "surface_upwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Upwelling Longwave Radiation", "comment": "", "dimensions": "xant yant time", "out_name": "rlus", - "type": "", + "type": "real", "positive": "up", "valid_min": "", "valid_max": "", @@ -324,13 +324,13 @@ "modeling_realm": "atmos", "standard_name": "surface_downwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Downwelling Shortwave Radiation", "comment": "surface solar irradiance for UV calculations", "dimensions": "xant yant time", "out_name": "rsds", - "type": "", + "type": "real", "positive": "down", "valid_min": "", "valid_max": "", @@ -341,13 +341,13 @@ "modeling_realm": "atmos", "standard_name": "surface_upwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Upwelling Shortwave Radiation", "comment": "", "dimensions": "xant yant time", "out_name": "rsus", - "type": "", + "type": "real", "positive": "up", "valid_min": "", "valid_max": "", @@ -358,13 +358,13 @@ "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_sublimation_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "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.", "dimensions": "xant yant time", "out_name": "sbl", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -375,13 +375,13 @@ "modeling_realm": "landIce land", "standard_name": "surface_snow_area_fraction", "units": "%", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "Snow Area Fraction", + "long_name": "snow cover fraction", "comment": "Fraction of each grid cell that is occupied by snow that rests on land portion of cell.", "dimensions": "xant yant time", "out_name": "snc", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", @@ -392,7 +392,7 @@ "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_refreezing_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface snow and ice refreeze flux", "comment": "Mass flux of surface meltwater which refreezes within the snowpack. Computed as the total refreezing on the land ice portion of the grid cell divided by land ice area in the grid cell.", @@ -409,7 +409,7 @@ "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_melt_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface snow and ice melt flux", "comment": "Loss of snow and ice mass resulting from surface melting. Computed as the total surface melt on the land ice portion of the grid cell divided by land ice area in the grid cell.", @@ -426,7 +426,7 @@ "modeling_realm": "landIce land", "standard_name": "surface_snow_melt_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Snow Melt", "comment": "The total surface snow melt rate on the land portion of the grid cell divided by the land area in the grid cell; report as zero for snow-free land regions and missing where there is no land.", @@ -443,13 +443,13 @@ "modeling_realm": "atmos", "standard_name": "air_temperature", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "Near-Surface Air Temperature", + "long_name": "Surface Temperature", "comment": "near-surface (usually, 2 meter) air temperature", "dimensions": "xant yant time", "out_name": "tas", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", @@ -460,7 +460,7 @@ "modeling_realm": "atmos", "standard_name": "surface_temperature", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Temperature", "comment": "Temperature of the lower boundary of the atmosphere", @@ -477,7 +477,7 @@ "modeling_realm": "landIce land", "standard_name": "temperature_in_surface_snow", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Snow Internal Temperature", "comment": "This temperature is averaged over all the snow in the grid cell that rests on land or land ice. When computing the time-mean here, the time samples, weighted by the mass of snow on the land portion of the grid cell, are accumulated and then divided by the sum of the weights. Reported as missing in regions free of snow on land.", diff --git a/TestTables/CMIP6_ImonGre.json b/TestTables/CMIP6_ImonGre.json index 1e2bfb1f..6a48b92f 100644 --- a/TestTables/CMIP6_ImonGre.json +++ b/TestTables/CMIP6_ImonGre.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table ImonGre", "realm": "atmos", "frequency": "mon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", + "product": "model-output", + "approx_interval": "30.00", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "acabf": { "modeling_realm": "landIce", "standard_name": "land_ice_surface_specific_mass_balance_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Mass Balance flux", "comment": "Specific mass balance means the net rate at which ice is added per unit area at the land ice surface. Computed as the total surface mass balance on the land ice portion of the grid cell divided by land ice area in the grid cell. A negative value means loss of ice", @@ -35,13 +35,13 @@ "modeling_realm": "atmos", "standard_name": "surface_upward_latent_heat_flux", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Upward Latent Heat Flux", "comment": "", "dimensions": "xgre ygre time", "out_name": "hfls", - "type": "", + "type": "real", "positive": "up", "valid_min": "", "valid_max": "", @@ -52,13 +52,13 @@ "modeling_realm": "atmos", "standard_name": "surface_upward_sensible_heat_flux", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Upward Sensible Heat Flux", "comment": "", "dimensions": "xgre ygre time", "out_name": "hfss", - "type": "", + "type": "real", "positive": "up", "valid_min": "", "valid_max": "", @@ -69,7 +69,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_surface_melt_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface ice melt flux", "comment": "Loss of ice mass resulting from surface melting. Computed as the total surface melt water on the land ice portion of the grid cell divided by land ice area in the grid cell.", @@ -86,7 +86,7 @@ "modeling_realm": "landIce", "standard_name": "surface_albedo", "units": "1.0", - "cell_methods": "area: time: mean where ice_shelf", + "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", @@ -120,7 +120,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_specific_mass_balance_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "area: areacellg", "long_name": "Basal specific mass balance flux of grounded ice sheet", "comment": "Specific mass balance means the net rate at which ice is added per unit area at the land ice base. A negative value means loss of ice. Computed as the total basal mass balance on the grounded land ice portion of the grid cell divided by grounded land ice area in the grid cell. Cell_methods: area: mean where grounded_ice_sheet", @@ -137,7 +137,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_specific_mass_flux_due_to_calving", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land ice calving flux", "comment": "Loss of ice mass resulting from iceberg calving. Computed as the rate of mass loss by the ice shelf (in kg s-1) divided by the horizontal area of the ice sheet (m2) in the grid box.", @@ -154,7 +154,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_specific_mass_flux_due_to_calving_and_ice_front_melting", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land ice vertical front mass balance flux", "comment": "Total mass balance at the ice front (or vertical margin). It includes both iceberg calving and melt on vertical ice front", @@ -188,7 +188,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_temperature", "units": "K", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "area: areacellg", "long_name": "Basal temperature of grounded ice sheet", "comment": "Basal temperature that is used to force the ice sheet models, it is the temperature AT ice sheet - bedrock interface. Cell_methods: area: mean where grounded_ice_sheet", @@ -205,7 +205,7 @@ "modeling_realm": "landIce", "standard_name": "temperature_at_top_of_ice_sheet_model", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Temperature at top of ice sheet model", "comment": "Upper boundary temperature that is used to force ice sheet models. It is the temperature at the base of the snowpack models, and does not vary with seasons. Report surface temperature of ice sheet where snow thickness is zero", @@ -222,7 +222,7 @@ "modeling_realm": "atmos", "standard_name": "land_ice_runoff_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land Ice Runoff Flux", "comment": "Runoff flux over land ice is the difference between any available liquid water in the snowpack less any refreezing. Computed as the sum of rainfall and melt of snow or ice less any refreezing or water retained in the snowpack", @@ -239,13 +239,13 @@ "modeling_realm": "land", "standard_name": "surface_altitude", "units": "m", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "surface altitude", + "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.", "dimensions": "xgre ygre time", "out_name": "orog", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -256,13 +256,13 @@ "modeling_realm": "atmos", "standard_name": "rainfall_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "Rainfall rate over Land Ice", + "long_name": "Rainfall Flux where Ice Free Ocean over Sea over Land Ice", "comment": "", "dimensions": "xgre ygre time", "out_name": "prra", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -273,13 +273,13 @@ "modeling_realm": "atmos", "standard_name": "snowfall_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Snowfall Flux", "comment": "at surface; includes precipitation of all forms of water in the solid phase", "dimensions": "xgre ygre time", "out_name": "prsn", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -290,13 +290,13 @@ "modeling_realm": "atmos", "standard_name": "surface_downwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Downwelling Longwave Radiation", "comment": "", "dimensions": "xgre ygre time", "out_name": "rlds", - "type": "", + "type": "real", "positive": "down", "valid_min": "", "valid_max": "", @@ -307,13 +307,13 @@ "modeling_realm": "atmos", "standard_name": "surface_upwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Upwelling Longwave Radiation", "comment": "", "dimensions": "xgre ygre time", "out_name": "rlus", - "type": "", + "type": "real", "positive": "up", "valid_min": "", "valid_max": "", @@ -324,13 +324,13 @@ "modeling_realm": "atmos", "standard_name": "surface_downwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Downwelling Shortwave Radiation", "comment": "surface solar irradiance for UV calculations", "dimensions": "xgre ygre time", "out_name": "rsds", - "type": "", + "type": "real", "positive": "down", "valid_min": "", "valid_max": "", @@ -341,13 +341,13 @@ "modeling_realm": "atmos", "standard_name": "surface_upwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Upwelling Shortwave Radiation", "comment": "", "dimensions": "xgre ygre time", "out_name": "rsus", - "type": "", + "type": "real", "positive": "up", "valid_min": "", "valid_max": "", @@ -358,13 +358,13 @@ "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_sublimation_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "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.", "dimensions": "xgre ygre time", "out_name": "sbl", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -375,13 +375,13 @@ "modeling_realm": "landIce land", "standard_name": "surface_snow_area_fraction", "units": "%", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "Snow Area Fraction", + "long_name": "snow cover fraction", "comment": "Fraction of each grid cell that is occupied by snow that rests on land portion of cell.", "dimensions": "xgre ygre time", "out_name": "snc", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", @@ -392,7 +392,7 @@ "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_refreezing_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface snow and ice refreeze flux", "comment": "Mass flux of surface meltwater which refreezes within the snowpack. Computed as the total refreezing on the land ice portion of the grid cell divided by land ice area in the grid cell.", @@ -409,7 +409,7 @@ "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_melt_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface snow and ice melt flux", "comment": "Loss of snow and ice mass resulting from surface melting. Computed as the total surface melt on the land ice portion of the grid cell divided by land ice area in the grid cell.", @@ -426,7 +426,7 @@ "modeling_realm": "landIce land", "standard_name": "surface_snow_melt_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Snow Melt", "comment": "The total surface snow melt rate on the land portion of the grid cell divided by the land area in the grid cell; report as zero for snow-free land regions and missing where there is no land.", @@ -443,13 +443,13 @@ "modeling_realm": "atmos", "standard_name": "air_temperature", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "Near-Surface Air Temperature", + "long_name": "Surface Temperature", "comment": "near-surface (usually, 2 meter) air temperature", "dimensions": "xgre ygre time", "out_name": "tas", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", @@ -460,7 +460,7 @@ "modeling_realm": "atmos", "standard_name": "surface_temperature", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Temperature", "comment": "Temperature of the lower boundary of the atmosphere", @@ -477,7 +477,7 @@ "modeling_realm": "landIce land", "standard_name": "temperature_in_surface_snow", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Snow Internal Temperature", "comment": "This temperature is averaged over all the snow in the grid cell that rests on land or land ice. When computing the time-mean here, the time samples, weighted by the mass of snow on the land portion of the grid cell, are accumulated and then divided by the sum of the weights. Reported as missing in regions free of snow on land.", diff --git a/TestTables/CMIP6_IyrAnt.json b/TestTables/CMIP6_IyrAnt.json index 3b8b342f..ec87f6f1 100644 --- a/TestTables/CMIP6_IyrAnt.json +++ b/TestTables/CMIP6_IyrAnt.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table IyrAnt", "realm": "landIce", "frequency": "yr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", + "product": "model-output", + "approx_interval": "365.00", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "acabf": { "modeling_realm": "landIce", "standard_name": "land_ice_surface_specific_mass_balance_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Mass Balance flux", "comment": "Specific mass balance means the net rate at which ice is added per unit area at the land ice surface. Computed as the total surface mass balance on the land ice portion of the grid cell divided by land ice area in the grid cell. A negative value means loss of ice", @@ -52,7 +52,7 @@ "modeling_realm": "landIce", "standard_name": "upward_geothermal_heat_flux_at_ground_level", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Geothermal Heat flux beneath land ice", "comment": "Upward geothermal heat flux per unit area beneath land ice", @@ -86,7 +86,7 @@ "modeling_realm": "atmos", "standard_name": "grounded_land_ice_area", "units": "m2", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "", "long_name": "Area covered by grounded ice sheet", "comment": "Total area of the grounded ice sheets (the component of ice sheet resting over bedrock)", @@ -120,7 +120,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_specific_mass_balance_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "area: areacellg", "long_name": "Basal specific mass balance flux of grounded ice sheet", "comment": "Specific mass balance means the net rate at which ice is added per unit area at the land ice base. A negative value means loss of ice. Computed as the total basal mass balance on the grounded land ice portion of the grid cell divided by grounded land ice area in the grid cell. Cell_methods: area: mean where grounded_ice_sheet", @@ -137,7 +137,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_specific_mass_flux_due_to_calving", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land ice calving flux", "comment": "Loss of ice mass resulting from iceberg calving. Computed as the rate of mass loss by the ice shelf (in kg s-1) divided by the horizontal area of the ice sheet (m2) in the grid box.", @@ -154,7 +154,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_specific_mass_flux_due_to_calving_and_ice_front_melting", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land ice vertical front mass balance flux", "comment": "Total mass balance at the ice front (or vertical margin). It includes both iceberg calving and melt on vertical ice front", @@ -171,7 +171,7 @@ "modeling_realm": "atmos", "standard_name": "land_ice_mass", "units": "kg", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "", "long_name": "Ice sheet mass", "comment": "The ice sheet mass is computed as the volume times density", @@ -188,7 +188,7 @@ "modeling_realm": "atmos", "standard_name": "land_ice_mass_not_displacing_sea_water", "units": "kg", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "", "long_name": "Ice sheet mass that does not displace sea water", "comment": "The ice sheet mass is computed as the volume above flotation times density. Changes in land_ice_mass_not_displacing_sea_water will always result in a change in sea level, unlike changes in land_ice_mass which may not result in sea level change (such as melting of the floating ice shelves, or portion of ice that sits on bedrock below sea level)", @@ -222,7 +222,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_temperature", "units": "K", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "area: areacellg", "long_name": "Basal temperature of grounded ice sheet", "comment": "Basal temperature that is used to force the ice sheet models, it is the temperature AT ice sheet - bedrock interface. Cell_methods: area: mean where grounded_ice_sheet", @@ -239,7 +239,7 @@ "modeling_realm": "landIce", "standard_name": "temperature_at_top_of_ice_sheet_model", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Temperature at top of ice sheet model", "comment": "Upper boundary temperature that is used to force ice sheet models. It is the temperature at the base of the snowpack models, and does not vary with seasons. Report surface temperature of ice sheet where snow thickness is zero", @@ -256,7 +256,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_thickness", "units": "m", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Ice Sheet Thickness", "comment": "The thickness of the ice sheet", @@ -273,13 +273,13 @@ "modeling_realm": "land", "standard_name": "surface_altitude", "units": "m", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "surface altitude", + "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.", "dimensions": "xant yant time", "out_name": "orog", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -307,7 +307,7 @@ "modeling_realm": "land", "standard_name": "land_ice_area_fraction", "units": "%", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "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)", @@ -341,13 +341,13 @@ "modeling_realm": "landIce land", "standard_name": "surface_snow_area_fraction", "units": "%", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "Snow Area Fraction", + "long_name": "snow cover fraction", "comment": "Fraction of each grid cell that is occupied by snow that rests on land portion of cell.", "dimensions": "xant yant time", "out_name": "snc", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", @@ -358,7 +358,7 @@ "modeling_realm": "landIce", "standard_name": "magnitude_of_basal_drag_at_land_ice_base", "units": "Pa", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land Ice Basal Drag", "comment": "Magnitude of basal drag at land ice base", @@ -375,7 +375,7 @@ "modeling_realm": "atmos", "standard_name": "tendency_of_land_ice_mass_due_to_surface_mass_balance", "units": "kg s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "", "long_name": "Total surface mass balance flux", "comment": "The total surface mass balance flux over land ice is a spatial integration of the surface mass balance flux", @@ -392,7 +392,7 @@ "modeling_realm": "atmos", "standard_name": "tendency_of_land_ice_mass_due_to_basal_mass_balance", "units": "kg s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "", "long_name": "Total basal mass balance flux", "comment": "The total basal mass balance flux over land ice is a spatial integration of the basal mass balance flux", @@ -409,7 +409,7 @@ "modeling_realm": "atmos", "standard_name": "tendency_of_land_ice_mass_due_to_calving", "units": "kg s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "", "long_name": "Total calving flux", "comment": "The total calving flux over land ice is a spatial integration of the calving flux", @@ -426,7 +426,7 @@ "modeling_realm": "landIce", "standard_name": "bedrock_altitude", "units": "m", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Bedrock Altitude", "comment": "The bedrock topography beneath the land ice", @@ -443,7 +443,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_x_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "X-component of land ice basal velocity", "comment": "A velocity is a vector quantity. 'x' indicates a vector component along the grid x-axis, positive with increasing x. 'Land ice' means glaciers, ice-caps and ice-sheets resting on bedrock and also includes ice-shelves. 'basal' means the lower boundary of the land ice.", @@ -460,7 +460,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_vertical_mean_x_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "X-component of land ice vertical mean velocity", "comment": "The vertical mean land ice velocity is the average from the bedrock to the surface of the ice", @@ -477,7 +477,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_surface_x_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "X-component of land ice surface velocity", "comment": "A velocity is a vector quantity. 'x' indicates a vector component along the grid x-axis, positive with increasing x. 'Land ice' means glaciers, ice-caps and ice-sheets resting on bedrock and also includes ice-shelves. The surface called 'surface' means the lower boundary of the atmosphere.", @@ -494,7 +494,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_y_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Y-component of land ice basal velocity", "comment": "A velocity is a vector quantity. 'y' indicates a vector component along the grid y-axis, positive with increasing y. 'Land ice' means glaciers, ice-caps and ice-sheets resting on bedrock and also includes ice-shelves. 'basal' means the lower boundary of the land ice.", @@ -511,7 +511,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_vertical_mean_y_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Y-component of land ice vertical mean velocity", "comment": "The vertical mean land ice velocity is the average from the bedrock to the surface of the ice", @@ -528,7 +528,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_surface_y_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Y-component of land ice surface velocity", "comment": "A velocity is a vector quantity. 'y' indicates a vector component along the grid y-axis, positive with increasing y. 'Land ice' means glaciers, ice-caps and ice-sheets resting on bedrock and also includes ice-shelves. The surface called 'surface' means the lower boundary of the atmosphere.'", @@ -545,7 +545,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_upward_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Upward-component of land ice basal velocity", "comment": "A velocity is a vector quantity. 'Upward' indicates a vector component which is positive when directed upward (negative downward). 'basal' means the lower boundary of the atmosphere", @@ -562,7 +562,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_surface_upward_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Upward component of land ice surface velocity", "comment": "A velocity is a vector quantity. 'Upward' indicates a vector component which is positive when directed upward (negative downward). The surface called 'surface' means the lower boundary of the atmosphere", diff --git a/TestTables/CMIP6_IyrGre.json b/TestTables/CMIP6_IyrGre.json index fd98ba7a..baeb1e22 100644 --- a/TestTables/CMIP6_IyrGre.json +++ b/TestTables/CMIP6_IyrGre.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table IyrGre", "realm": "landIce", "frequency": "yr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", - "approx_interval": "", + "product": "model-output", + "approx_interval": "365.00", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "acabf": { "modeling_realm": "landIce", "standard_name": "land_ice_surface_specific_mass_balance_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Surface Mass Balance flux", "comment": "Specific mass balance means the net rate at which ice is added per unit area at the land ice surface. Computed as the total surface mass balance on the land ice portion of the grid cell divided by land ice area in the grid cell. A negative value means loss of ice", @@ -52,7 +52,7 @@ "modeling_realm": "landIce", "standard_name": "upward_geothermal_heat_flux_at_ground_level", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Geothermal Heat flux beneath land ice", "comment": "Upward geothermal heat flux per unit area beneath land ice", @@ -86,7 +86,7 @@ "modeling_realm": "atmos", "standard_name": "grounded_land_ice_area", "units": "m2", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "", "long_name": "Area covered by grounded ice sheet", "comment": "Total area of the grounded ice sheets (the component of ice sheet resting over bedrock)", @@ -120,7 +120,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_specific_mass_balance_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "area: areacellg", "long_name": "Basal specific mass balance flux of grounded ice sheet", "comment": "Specific mass balance means the net rate at which ice is added per unit area at the land ice base. A negative value means loss of ice. Computed as the total basal mass balance on the grounded land ice portion of the grid cell divided by grounded land ice area in the grid cell. Cell_methods: area: mean where grounded_ice_sheet", @@ -137,7 +137,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_specific_mass_flux_due_to_calving", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land ice calving flux", "comment": "Loss of ice mass resulting from iceberg calving. Computed as the rate of mass loss by the ice shelf (in kg s-1) divided by the horizontal area of the ice sheet (m2) in the grid box.", @@ -154,7 +154,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_specific_mass_flux_due_to_calving_and_ice_front_melting", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land ice vertical front mass balance flux", "comment": "Total mass balance at the ice front (or vertical margin). It includes both iceberg calving and melt on vertical ice front", @@ -171,7 +171,7 @@ "modeling_realm": "atmos", "standard_name": "land_ice_mass", "units": "kg", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "", "long_name": "Ice sheet mass", "comment": "The ice sheet mass is computed as the volume times density", @@ -188,7 +188,7 @@ "modeling_realm": "atmos", "standard_name": "land_ice_mass_not_displacing_sea_water", "units": "kg", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "", "long_name": "Ice sheet mass that does not displace sea water", "comment": "The ice sheet mass is computed as the volume above flotation times density. Changes in land_ice_mass_not_displacing_sea_water will always result in a change in sea level, unlike changes in land_ice_mass which may not result in sea level change (such as melting of the floating ice shelves, or portion of ice that sits on bedrock below sea level)", @@ -222,7 +222,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_temperature", "units": "K", - "cell_methods": "area: time: mean where grounded_ice_shelf (comment: mask=sfgrlf)", + "cell_methods": "area: time: mean where grounded_ice_sheet (comment: mask=sfgrlf)", "cell_measures": "area: areacellg", "long_name": "Basal temperature of grounded ice sheet", "comment": "Basal temperature that is used to force the ice sheet models, it is the temperature AT ice sheet - bedrock interface. Cell_methods: area: mean where grounded_ice_sheet", @@ -239,7 +239,7 @@ "modeling_realm": "landIce", "standard_name": "temperature_at_top_of_ice_sheet_model", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Temperature at top of ice sheet model", "comment": "Upper boundary temperature that is used to force ice sheet models. It is the temperature at the base of the snowpack models, and does not vary with seasons. Report surface temperature of ice sheet where snow thickness is zero", @@ -256,7 +256,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_thickness", "units": "m", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Ice Sheet Thickness", "comment": "The thickness of the ice sheet", @@ -273,13 +273,13 @@ "modeling_realm": "land", "standard_name": "surface_altitude", "units": "m", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "surface altitude", + "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.", "dimensions": "xgre ygre time", "out_name": "orog", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -307,7 +307,7 @@ "modeling_realm": "land", "standard_name": "land_ice_area_fraction", "units": "%", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "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)", @@ -341,13 +341,13 @@ "modeling_realm": "landIce land", "standard_name": "surface_snow_area_fraction", "units": "%", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", - "long_name": "Snow Area Fraction", + "long_name": "snow cover fraction", "comment": "Fraction of each grid cell that is occupied by snow that rests on land portion of cell.", "dimensions": "xgre ygre time", "out_name": "snc", - "type": "", + "type": "float", "positive": "", "valid_min": "", "valid_max": "", @@ -358,7 +358,7 @@ "modeling_realm": "landIce", "standard_name": "magnitude_of_basal_drag_at_land_ice_base", "units": "Pa", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Land Ice Basal Drag", "comment": "Magnitude of basal drag at land ice base", @@ -375,7 +375,7 @@ "modeling_realm": "atmos", "standard_name": "tendency_of_land_ice_mass_due_to_surface_mass_balance", "units": "kg s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "", "long_name": "Total surface mass balance flux", "comment": "The total surface mass balance flux over land ice is a spatial integration of the surface mass balance flux", @@ -392,7 +392,7 @@ "modeling_realm": "atmos", "standard_name": "tendency_of_land_ice_mass_due_to_basal_mass_balance", "units": "kg s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "", "long_name": "Total basal mass balance flux", "comment": "The total basal mass balance flux over land ice is a spatial integration of the basal mass balance flux", @@ -409,7 +409,7 @@ "modeling_realm": "atmos", "standard_name": "tendency_of_land_ice_mass_due_to_calving", "units": "kg s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "", "long_name": "Total calving flux", "comment": "The total calving flux over land ice is a spatial integration of the calving flux", @@ -426,7 +426,7 @@ "modeling_realm": "landIce", "standard_name": "bedrock_altitude", "units": "m", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Bedrock Altitude", "comment": "The bedrock topography beneath the land ice", @@ -443,7 +443,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_x_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "X-component of land ice basal velocity", "comment": "A velocity is a vector quantity. 'x' indicates a vector component along the grid x-axis, positive with increasing x. 'Land ice' means glaciers, ice-caps and ice-sheets resting on bedrock and also includes ice-shelves. 'basal' means the lower boundary of the land ice.", @@ -460,7 +460,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_vertical_mean_x_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "X-component of land ice vertical mean velocity", "comment": "The vertical mean land ice velocity is the average from the bedrock to the surface of the ice", @@ -477,7 +477,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_surface_x_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "X-component of land ice surface velocity", "comment": "A velocity is a vector quantity. 'x' indicates a vector component along the grid x-axis, positive with increasing x. 'Land ice' means glaciers, ice-caps and ice-sheets resting on bedrock and also includes ice-shelves. The surface called 'surface' means the lower boundary of the atmosphere.", @@ -494,7 +494,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_y_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Y-component of land ice basal velocity", "comment": "A velocity is a vector quantity. 'y' indicates a vector component along the grid y-axis, positive with increasing y. 'Land ice' means glaciers, ice-caps and ice-sheets resting on bedrock and also includes ice-shelves. 'basal' means the lower boundary of the land ice.", @@ -511,7 +511,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_vertical_mean_y_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Y-component of land ice vertical mean velocity", "comment": "The vertical mean land ice velocity is the average from the bedrock to the surface of the ice", @@ -528,7 +528,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_surface_y_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Y-component of land ice surface velocity", "comment": "A velocity is a vector quantity. 'y' indicates a vector component along the grid y-axis, positive with increasing y. 'Land ice' means glaciers, ice-caps and ice-sheets resting on bedrock and also includes ice-shelves. The surface called 'surface' means the lower boundary of the atmosphere.'", @@ -545,7 +545,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_basal_upward_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Upward-component of land ice basal velocity", "comment": "A velocity is a vector quantity. 'Upward' indicates a vector component which is positive when directed upward (negative downward). 'basal' means the lower boundary of the atmosphere", @@ -562,7 +562,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_surface_upward_velocity", "units": "m s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacellg", "long_name": "Upward component of land ice surface velocity", "comment": "A velocity is a vector quantity. 'Upward' indicates a vector component which is positive when directed upward (negative downward). The surface called 'surface' means the lower boundary of the atmosphere", diff --git a/TestTables/CMIP6_LImon.json b/TestTables/CMIP6_LImon.json index 25ab48c4..94ed922f 100644 --- a/TestTables/CMIP6_LImon.json +++ b/TestTables/CMIP6_LImon.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table LImon", "realm": "landIce land", "frequency": "mon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "30.00000", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "acabfIs": { "modeling_realm": "landIce", "standard_name": "land_ice_surface_specific_mass_balance_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Mass Balance flux", "comment": "Specific mass balance means the net rate at which ice is added per unit area at the land ice surface. Computed as the total surface mass balance on the land ice portion of the grid cell divided by land ice area in the grid cell. A negative value means loss of ice", @@ -69,7 +69,7 @@ "modeling_realm": "landIce", "standard_name": "surface_upward_latent_heat_flux", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Upward Latent Heat Flux", "comment": "Upward latent heat flux from the ice sheet surface", @@ -86,7 +86,7 @@ "modeling_realm": "landIce", "standard_name": "surface_upward_sensible_heat_flux", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Upward Sensible Heat Flux", "comment": "Upward sensible heat flux from the ice sheet surface", @@ -103,7 +103,7 @@ "modeling_realm": "landIce", "standard_name": "land_ice_surface_melt_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Ice Melt Flux", "comment": "Loss of ice mass resulting from surface melting. Computed as the total surface melt water on the land ice portion of the grid cell divided by land ice area in the grid cell.", @@ -120,7 +120,7 @@ "modeling_realm": "landIce", "standard_name": "surface_albedo", "units": "1.0", - "cell_methods": "area: time: mean where ice_shelf", + "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", @@ -137,7 +137,7 @@ "modeling_realm": "landIce", "standard_name": "temperature_at_top_of_ice_sheet_model", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Temperature at top of ice sheet model", "comment": "Upper boundary temperature that is used to force ice sheet models. It is the temperature at the base of the snowpack models, and does not vary with seasons. Report surface temperature of ice sheet where snow thickness is zero", @@ -157,7 +157,7 @@ "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Liquid Water Content of Snow Layer", - "comment": "where land over land: this is computed as the total mass of liquid water contained interstitially within the snow layer of the land portion of a grid cell divided by the area of the land portion of the cell.", + "comment": "The total mass of liquid water contained interstitially within the whole depth of the snow layer of the land portion of a grid cell divided by the area of the land portion of the cell.", "dimensions": "longitude latitude time", "out_name": "lwsnl", "type": "real", @@ -171,7 +171,7 @@ "modeling_realm": "landIce", "standard_name": "runoff_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Total Run-off", "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.", @@ -188,7 +188,7 @@ "modeling_realm": "landIce", "standard_name": "surface_altitude", "units": "m", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet 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.", @@ -222,7 +222,7 @@ "modeling_realm": "landIce", "standard_name": "rainfall_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Rainfall rate", "comment": "Rainfall rate over the ice sheet", @@ -239,7 +239,7 @@ "modeling_realm": "landIce", "standard_name": "snowfall_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Snowfall Flux", "comment": "at surface; includes precipitation of all forms of water in the solid phase", @@ -256,7 +256,7 @@ "modeling_realm": "landIce", "standard_name": "surface_downwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Downwelling Longwave Radiation", "comment": "", @@ -273,7 +273,7 @@ "modeling_realm": "landIce", "standard_name": "surface_upwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Upwelling Longwave Radiation", "comment": "", @@ -290,7 +290,7 @@ "modeling_realm": "landIce", "standard_name": "surface_downwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Downwelling Shortwave Radiation", "comment": "Surface solar irradiance for UV calculations", @@ -307,7 +307,7 @@ "modeling_realm": "landIce", "standard_name": "surface_upwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Upwelling Shortwave Radiation", "comment": "", @@ -321,7 +321,7 @@ "ok_max_mean_abs": "" }, "sbl": { - "modeling_realm": "landIce land", + "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_sublimation_flux", "units": "kg m-2 s-1", "cell_methods": "area: mean where land time: mean", @@ -341,7 +341,7 @@ "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_sublimation_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet 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.", @@ -375,7 +375,7 @@ "modeling_realm": "land", "standard_name": "land_ice_area_fraction", "units": "%", - "cell_methods": "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)", @@ -392,7 +392,7 @@ "modeling_realm": "landIce", "standard_name": "grounded_ice_sheet_area_fraction", "units": "%", - "cell_methods": "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", @@ -409,7 +409,7 @@ "modeling_realm": "landIce land", "standard_name": "surface_snow_area_fraction", "units": "%", - "cell_methods": "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.", @@ -426,10 +426,10 @@ "modeling_realm": "landIce", "standard_name": "surface_snow_area_fraction", "units": "%", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", - "long_name": "Ice Sheet Snow Area Fraction", - "comment": "Fraction of each grid cell that is occupied by snow that rests on land portion of cell.", + "long_name": "Ice Sheet Snow Cover Percentage", + "comment": "Percentage of each grid cell that is occupied by snow that rests on land portion of cell.", "dimensions": "longitude latitude time", "out_name": "sncIs", "type": "", @@ -460,7 +460,7 @@ "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_refreezing_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Snow and Ice Refreeze Flux", "comment": "Mass flux of surface meltwater which refreezes within the snowpack. Computed as the total refreezing on the land ice portion of the grid cell divided by land ice area in the grid cell.", @@ -477,7 +477,7 @@ "modeling_realm": "landIce", "standard_name": "surface_snow_and_ice_melt_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Snow and Ice Melt Flux", "comment": "Loss of snow and ice mass resulting from surface melting. Computed as the total surface melt on the land ice portion of the grid cell divided by land ice area in the grid cell.", @@ -511,7 +511,7 @@ "modeling_realm": "landIce", "standard_name": "surface_snow_melt_flux", "units": "kg m-2 s-1", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Snow Melt", "comment": "The total surface snow melt rate on the land portion of the grid cell divided by the land area in the grid cell; report as zero for snow-free land regions and missing where there is no land.", @@ -562,7 +562,7 @@ "modeling_realm": "landIce", "standard_name": "air_temperature", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Near-Surface Air Temperature", "comment": "near-surface (usually, 2 meter) air temperature", @@ -596,7 +596,7 @@ "modeling_realm": "landIce", "standard_name": "surface_temperature", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Surface Temperature", "comment": "Temperature of the lower boundary of the atmosphere", @@ -630,7 +630,7 @@ "modeling_realm": "landIce", "standard_name": "temperature_in_surface_snow", "units": "K", - "cell_methods": "area: time: mean where ice_shelf", + "cell_methods": "area: time: mean where ice_sheet", "cell_measures": "area: areacella", "long_name": "Ice Sheet Snow Internal Temperature", "comment": "This temperature is averaged over all the snow in the grid cell that rests on land or land ice. When computing the time-mean here, the time samples, weighted by the mass of snow on the land portion of the grid cell, are accumulated and then divided by the sum of the weights. Reported as missing in regions free of snow on land.", diff --git a/TestTables/CMIP6_Lmon.json b/TestTables/CMIP6_Lmon.json index fa3239a8..bd2fb2a2 100644 --- a/TestTables/CMIP6_Lmon.json +++ b/TestTables/CMIP6_Lmon.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Lmon", "realm": "land", "frequency": "mon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "30.00000", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "baresoilFrac": { @@ -39,7 +39,7 @@ "cell_measures": "area: areacella", "long_name": "Burnt Area Fraction", "comment": "Fraction of entire grid cell that is covered by burnt vegetation.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude time typeburnt", "out_name": "burntArea", "type": "real", "positive": "", @@ -277,7 +277,7 @@ "cell_measures": "area: areacella", "long_name": "Crop Fraction", "comment": "Percentage of entire grid cell that is covered by crop.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude time typecrop", "out_name": "cropFrac", "type": "real", "positive": "", @@ -447,7 +447,7 @@ "cell_measures": "area: areacella", "long_name": "Natural Grass Fraction", "comment": "Percentage of entire grid cell that is covered by natural grass.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude time typenatgr", "out_name": "grassFrac", "type": "real", "positive": "", @@ -685,7 +685,7 @@ "cell_measures": "area: areacella", "long_name": "Anthropogenic Pasture Fraction", "comment": "Percentage of entire grid cell that is covered by anthropogenic pasture.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude time typepasture", "out_name": "pastureFrac", "type": "real", "positive": "", @@ -752,7 +752,7 @@ "cell_methods": "area: mean where land time: mean", "cell_measures": "area: areacella", "long_name": "Carbon Mass Flux into Atmosphere due to Autotrophic (Plant) Respiration on Land", - "comment": "Carbon mass flux per unit area into atmosphere due to autotrophic respiration on land (respiration by producers) [see rh for heterotrophic production] ", + "comment": "Carbon mass flux per unit area into atmosphere due to autotrophic respiration on land (respiration by producers) [see rh for heterotrophic production]", "dimensions": "longitude latitude time", "out_name": "ra", "type": "real", @@ -766,7 +766,7 @@ "modeling_realm": "land", "standard_name": "area_fraction", "units": "%", - "cell_methods": "time: mean", + "cell_methods": "area: 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.)", @@ -804,7 +804,7 @@ "cell_measures": "area: areacella", "long_name": "Shrub Fraction", "comment": "Percentage of entire grid cell that is covered by shrub.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude time typeshrub", "out_name": "shrubFrac", "type": "real", "positive": "", @@ -838,7 +838,7 @@ "cell_measures": "area: areacella", "long_name": "Tree Cover Fraction", "comment": "Percentage of entire grid cell that is covered by trees.", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude time typetree", "out_name": "treeFrac", "type": "real", "positive": "", diff --git a/TestTables/CMIP6_Oclim.json b/TestTables/CMIP6_Oclim.json index e04c1b53..02897a00 100644 --- a/TestTables/CMIP6_Oclim.json +++ b/TestTables/CMIP6_Oclim.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Oclim", "realm": "ocean", "frequency": "monClim", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "30.00000", "generic_levels": "olevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "difmxybo": { @@ -442,7 +442,7 @@ "dispkexyfo": { "modeling_realm": "ocean", "standard_name": "ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction", - "units": "W m-2 ", + "units": "W m-2", "cell_methods": "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", @@ -459,7 +459,7 @@ "dispkexyfo2d": { "modeling_realm": "ocean", "standard_name": "ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction", - "units": "W m-2 ", + "units": "W m-2", "cell_methods": "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", @@ -563,7 +563,7 @@ "standard_name": "depth_below_geoid", "units": "m", "cell_methods": "time: mean within years time: mean over years", - "cell_measures": "area: areacello", + "cell_measures": "area: areacello volume: volcello", "long_name": "Depth Below Geoid of Ocean Layer", "comment": "Depth below geoid", "dimensions": "longitude latitude olevel time2", @@ -580,7 +580,7 @@ "standard_name": "depth_below_geoid", "units": "m", "cell_methods": "time: mean within years time: mean over years", - "cell_measures": "area: areacello", + "cell_measures": "area: areacello volume: volcello", "long_name": "Depth Below Geoid of Interfaces Between Ocean Layers", "comment": "Depth below geoid", "dimensions": "longitude latitude olevel time2", diff --git a/TestTables/CMIP6_Oday.json b/TestTables/CMIP6_Oday.json index 88e847b1..da22d8e5 100644 --- a/TestTables/CMIP6_Oday.json +++ b/TestTables/CMIP6_Oday.json @@ -1,28 +1,28 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Oday", - "realm": "ocean", + "realm": "ocnBgchem", "frequency": "day", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "1.00000", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "chlos": { "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": "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 olevel time", + "dimensions": "longitude latitude time", "out_name": "chlos", "type": "real", "positive": "", @@ -31,15 +31,32 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, + "omldamax": { + "modeling_realm": "ocean", + "standard_name": "ocean_mixed_layer_thickness_defined_by_mixing_scheme", + "units": "m", + "cell_methods": "area: mean time: maximum", + "cell_measures": "area: areacello", + "long_name": "Daily Maximum Ocean Mixed Layer Thickness Defined by Mixing Scheme", + "comment": "", + "dimensions": "longitude latitude time", + "out_name": "omldamax", + "type": "real", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, "phycos": { "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": "Sea Surface Phytoplankton Carbon Concentration", "comment": "sum of phytoplankton organic carbon component concentrations at the sea surface", - "dimensions": "longitude latitude olevel time", + "dimensions": "longitude latitude time", "out_name": "phycos", "type": "real", "positive": "", @@ -84,8 +101,8 @@ }, "tos": { "modeling_realm": "ocean", - "standard_name": "sea_surface_temperature", - "units": "degC", + "standard_name": "surface_temperature", + "units": "K", "cell_methods": "time: mean", "cell_measures": "area: areacello", "long_name": "Sea Surface Temperature", diff --git a/TestTables/CMIP6_Odec.json b/TestTables/CMIP6_Odec.json index 1f1e8916..8793ec3a 100644 --- a/TestTables/CMIP6_Odec.json +++ b/TestTables/CMIP6_Odec.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Odec", "realm": "ocean", "frequency": "dec", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "agessc": { @@ -305,8 +305,8 @@ }, "tos": { "modeling_realm": "ocean", - "standard_name": "sea_surface_temperature", - "units": "degC", + "standard_name": "surface_temperature", + "units": "K", "cell_methods": "time: mean", "cell_measures": "area: areacello", "long_name": "Sea Surface Temperature", @@ -342,7 +342,7 @@ "standard_name": "sea_water_x_velocity", "units": "m s-1", "cell_methods": "time: mean", - "cell_measures": "", + "cell_measures": "--OPT", "long_name": "Sea Water X Velocity", "comment": "Prognostic x-ward velocity component resolved by the model.", "dimensions": "longitude latitude olevel time", @@ -359,7 +359,7 @@ "standard_name": "sea_water_y_velocity", "units": "m s-1", "cell_methods": "time: mean", - "cell_measures": "", + "cell_measures": "--OPT", "long_name": "Sea Water Y Velocity", "comment": "Prognostic x-ward velocity component resolved by the model.", "dimensions": "longitude latitude olevel time", @@ -410,7 +410,7 @@ "standard_name": "upward_sea_water_velocity", "units": "m s-1", "cell_methods": "time: mean", - "cell_measures": "", + "cell_measures": "--OPT", "long_name": "Sea Water Z Velocity", "comment": "", "dimensions": "longitude latitude olevel time", diff --git a/TestTables/CMIP6_Ofx.json b/TestTables/CMIP6_Ofx.json index 96fc3a1f..1d94f516 100644 --- a/TestTables/CMIP6_Ofx.json +++ b/TestTables/CMIP6_Ofx.json @@ -1,25 +1,25 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Ofx", "realm": "ocean", "frequency": "fx", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "areacello": { "modeling_realm": "ocean", "standard_name": "cell_area", "units": "m2", - "cell_methods": "", - "cell_measures": "", + "cell_methods": "area: mean", + "cell_measures": "area: areacello", "long_name": "Ocean Grid-Cell Area", "comment": "Horizontal area of ocean grid cells", "dimensions": "longitude latitude", @@ -35,7 +35,7 @@ "modeling_realm": "ocean", "standard_name": "region", "units": "1.0", - "cell_methods": "area: point time: mean", + "cell_methods": "area: mean", "cell_measures": "area: areacello", "long_name": "Region Selection Index", "comment": "", @@ -45,21 +45,20 @@ "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": "" }, - "cpocean": { + "deptho": { "modeling_realm": "ocean", - "standard_name": "specific_heat_capacity_of_seawater", - "units": "J kg-1 K-1", - "cell_methods": "", - "cell_measures": "", - "long_name": "Sea water specific heat capacity", - "comment": "A global constant used to convert between temperature flux and heat flux, and to compute heat content of sea water.", - "dimensions": "", - "out_name": "cpocean", + "standard_name": "sea_floor_depth_below_geoid", + "units": "m", + "cell_methods": "area: mean", + "cell_measures": "area: areacello", + "long_name": "Sea Floor Depth Below Geoid", + "comment": "Ocean bathymetry. Reported here is the sea floor depth for present day relative to z=0 geoid. Reported as missing for land grid cells.", + "dimensions": "longitude latitude", + "out_name": "deptho", "type": "real", "positive": "", "valid_min": "", @@ -67,18 +66,18 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "deptho": { + "hfgeou": { "modeling_realm": "ocean", - "standard_name": "sea_floor_depth_below_geoid", - "units": "m", + "standard_name": "upward_geothermal_heat_flux_at_sea_floor", + "units": "W m-2", "cell_methods": "area: mean", "cell_measures": "area: areacello", - "long_name": "Sea Floor Depth Below Geoid", - "comment": "Ocean bathymetry. Reported here is the sea floor depth for present day relative to z=0 geoid. Reported as missing for land grid cells.", + "long_name": "Upward Geothermal Heat Flux at Sea Floor", + "comment": "", "dimensions": "longitude latitude", - "out_name": "deptho", + "out_name": "hfgeou", "type": "real", - "positive": "", + "positive": "up", "valid_min": "", "valid_max": "", "ok_min_mean_abs": "", @@ -89,7 +88,7 @@ "standard_name": "sea_water_mass_per_unit_area", "units": "kg m-2", "cell_methods": "area: mean", - "cell_measures": "", + "cell_measures": "area: areacello volume: volcello", "long_name": "Ocean Grid-Cell Mass per 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.", "dimensions": "longitude latitude olevel", @@ -101,16 +100,50 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "rhozero": { + "sftof": { "modeling_realm": "ocean", - "standard_name": "reference_sea_water_density_for_Boussinesq_approximation", - "units": "kg m-3", - "cell_methods": "", - "cell_measures": "", - "long_name": "Boussinesq reference density", - "comment": "Relevant only for Boussinesq ocean models", - "dimensions": "", - "out_name": "rhozero", + "standard_name": "sea_area_fraction", + "units": "%", + "cell_methods": "area: mean", + "cell_measures": "area: areacello", + "long_name": "Sea Area Fraction", + "comment": "This is the area fraction at the ocean surface.", + "dimensions": "longitude latitude", + "out_name": "sftof", + "type": "real", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, + "thkcello": { + "modeling_realm": "ocean", + "standard_name": "cell_thickness", + "units": "m", + "cell_methods": "area: mean", + "cell_measures": "area: areacello volume: volcello", + "long_name": "Ocean Model Cell Thickness", + "comment": "", + "dimensions": "longitude latitude olevel", + "out_name": "thkcello", + "type": "real", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, + "volcello": { + "modeling_realm": "ocean", + "standard_name": "ocean_volume", + "units": "m3", + "cell_methods": "area: mean", + "cell_measures": "area: areacello volume: volcello", + "long_name": "Ocean Grid-Cell Volume", + "comment": "grid-cell volume ca. 2000.", + "dimensions": "longitude latitude olevel", + "out_name": "volcello", "type": "real", "positive": "", "valid_min": "", diff --git a/TestTables/CMIP6_Omon.json b/TestTables/CMIP6_Omon.json index e789c86e..a2b9fe2b 100644 --- a/TestTables/CMIP6_Omon.json +++ b/TestTables/CMIP6_Omon.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Omon", "realm": "ocnBgchem", "frequency": "mon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "30.00000", - "generic_levels": "olevel olevelh", + "generic_levels": "olevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "agessc": { @@ -237,8 +237,8 @@ }, "cfc11": { "modeling_realm": "ocean", - "standard_name": "moles_of_cfc11_per_unit_mass_in_sea_water", - "units": "mol kg-1", + "standard_name": "mole_concentration_of_cfc11_in_sea_water", + "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", "long_name": "Moles Per Unit Mass of CFC-11 in sea water", @@ -254,8 +254,8 @@ }, "cfc12": { "modeling_realm": "ocean", - "standard_name": "moles_of_cfc12_per_unit_mass_in_sea_water", - "units": "mol kg-1", + "standard_name": "mole_concentration_of_cfc12_in_sea_water", + "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", "long_name": "Moles Per Unit Mass of CFC-12 in sea water", @@ -598,7 +598,7 @@ "units": "mol m-3", "cell_methods": "area: mean where sea time: mean", "cell_measures": "area: areacello volume: volcello", - "long_name": "Surface Mole Concentration of Dimethyl Sulphide in sea water", + "long_name": "Surface Mole Concentration of Carbonate Ion in Equilibrium with Pure Aragonite in sea water", "comment": "", "dimensions": "longitude latitude time", "out_name": "co3sataragos", @@ -632,7 +632,7 @@ "units": "mol m-3", "cell_methods": "area: mean where sea time: mean", "cell_measures": "area: areacello volume: volcello", - "long_name": "Surface Mole Concentration of Dimethyl Sulphide in sea water", + "long_name": "Surface Mole Concentration of Carbonate Ion in Equilibrium with Pure Calcite in sea water", "comment": "", "dimensions": "longitude latitude time", "out_name": "co3satcalcos", @@ -713,7 +713,7 @@ }, "dissi13c": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_dissolved_inorganic_c13_in_sea_water", + "standard_name": "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", @@ -747,7 +747,7 @@ }, "dissi14cabio": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_dissolved_inorganic_14carbon_in_sea_water_abiotic_component", + "standard_name": "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", @@ -915,15 +915,32 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, + "dms": { + "modeling_realm": "ocnBgchem", + "standard_name": "mole_fraction_of_dimethyl_sulfide_in_air", + "units": "mol mol-1", + "cell_methods": "area: mean where sea time: mean", + "cell_measures": "area: areacello", + "long_name": "Mole Concentration of Dimethyl Sulphide in sea water", + "comment": "", + "dimensions": "longitude latitude time depth0m", + "out_name": "dms", + "type": "real", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, "dmso": { "modeling_realm": "ocnBgchem", "standard_name": "mole_concentration_of_dimethyl_sulfide_in_sea_water", "units": "mol m-3", - "cell_methods": "area: mean where sea time: mean", - "cell_measures": "area: areacello", + "cell_methods": "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", - "dimensions": "longitude latitude time depth0m", + "dimensions": "longitude latitude olevel time", "out_name": "dmso", "type": "real", "positive": "", @@ -1716,7 +1733,7 @@ }, "graz": { "modeling_realm": "ocnBgchem", - "standard_name": "tendency_of_mole_concentration_of_organic_matter_expressed_as_carbon_in_sea_water_due_to_grazing_of_phytoplankton", + "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_measures": "area: areacello volume: volcello", @@ -2076,7 +2093,7 @@ "standard_name": "ocean_heat_x_transport", "units": "W", "cell_methods": "time: mean", - "cell_measures": "", + "cell_measures": "--OPT", "long_name": "Ocean Heat X Transport", "comment": "Contains all contributions to 'x-ward' heat transport from resolved and parameterized processes. Use Celsius for temperature scale.", "dimensions": "longitude latitude olevel time", @@ -2093,7 +2110,7 @@ "standard_name": "ocean_heat_y_transport", "units": "W", "cell_methods": "time: mean", - "cell_measures": "", + "cell_measures": "--OPT", "long_name": "Ocean Heat Y Transport", "comment": "Contains all contributions to 'y-ward' heat transport from resolved and parameterized processes. Use Celsius for temperature scale.", "dimensions": "longitude latitude olevel time", @@ -2311,7 +2328,7 @@ }, "intpoc": { "modeling_realm": "ocnBgchem", - "standard_name": "ocean_mass_content_of_particulate_organic_carbon", + "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", "cell_measures": "area: areacello", @@ -2328,7 +2345,7 @@ }, "intpp": { "modeling_realm": "ocnBgchem", - "standard_name": "net_primary_mole_productivity_of_carbon_by_phytoplankton", + "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", "cell_measures": "area: areacello", @@ -2345,7 +2362,7 @@ }, "intppcalc": { "modeling_realm": "ocnBgchem", - "standard_name": "net_primary_mole_productivity_of_carbon_by_calcareous_phytoplankton", + "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", "cell_measures": "area: areacello", @@ -2362,7 +2379,7 @@ }, "intppdiat": { "modeling_realm": "ocnBgchem", - "standard_name": "net_primary_mole_productivity_of_carbon_by_diatoms", + "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", "cell_measures": "area: areacello", @@ -2379,7 +2396,7 @@ }, "intppdiaz": { "modeling_realm": "ocnBgchem", - "standard_name": "net_primary_mole_productivity_of_carbon_by_diazotrophs", + "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", "cell_measures": "area: areacello", @@ -2396,7 +2413,7 @@ }, "intppmisc": { "modeling_realm": "ocnBgchem", - "standard_name": "net_primary_mole_productivity_of_carbon_by_miscellaneous_phytoplankton", + "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", "cell_measures": "area: areacello", @@ -2430,7 +2447,7 @@ }, "intpppico": { "modeling_realm": "ocnBgchem", - "standard_name": "net_primary_mole_productivity_of_carbon_by_picophytoplankton", + "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", "cell_measures": "area: areacello", @@ -2770,9 +2787,9 @@ }, "mlotstmax": { "modeling_realm": "ocean", - "standard_name": "", + "standard_name": "ocean_mixed_layer_thickness_defined_by_sigma_t", "units": "m", - "cell_methods": "time: maximum", + "cell_methods": "area: mean time: maximum", "cell_measures": "area: areacello", "long_name": "Maximum Ocean Mixed Layer Thickness Defined by Sigma T", "comment": "Sigma T is potential density referenced to ocean surface.", @@ -2787,9 +2804,9 @@ }, "mlotstmin": { "modeling_realm": "ocean", - "standard_name": "", + "standard_name": "ocean_mixed_layer_thickness_defined_by_sigma_t", "units": "m", - "cell_methods": "time: point", + "cell_methods": "area: mean time: minimum", "cell_measures": "area: areacello", "long_name": "Minimum Ocean Mixed Layer Thickness Defined by Sigma T", "comment": "Sigma T is potential density referenced to ocean surface.", @@ -3076,7 +3093,7 @@ }, "o2": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_molecular_oxygen_in_sea_water", + "standard_name": "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", @@ -3127,7 +3144,7 @@ }, "o2sat": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_molecular_oxygen_in_sea_water_at_saturation", + "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", "cell_measures": "area: areacello", @@ -3705,7 +3722,7 @@ }, "po4": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_phosphate_in_sea_water", + "standard_name": "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", @@ -3822,16 +3839,16 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "prlq": { - "modeling_realm": "ocean", + "prra": { + "modeling_realm": "atmos", "standard_name": "rainfall_flux", "units": "kg m-2 s-1", "cell_methods": "area: mean where ice_free_sea over sea time: mean", "cell_measures": "area: areacello", "long_name": "Rainfall Flux where Ice Free Ocean over Sea", - "comment": "computed as the total mass of liquid water falling as liquid rain into the ice-free portion of the ocean divided by the area of the ocean portion of the grid cell.", + "comment": "", "dimensions": "longitude latitude time", - "out_name": "prlq", + "out_name": "prra", "type": "real", "positive": "", "valid_min": "", @@ -3840,7 +3857,7 @@ "ok_max_mean_abs": "" }, "prsn": { - "modeling_realm": "ocean", + "modeling_realm": "atmos", "standard_name": "snowfall_flux", "units": "kg m-2 s-1", "cell_methods": "area: mean where ice_free_sea over sea time: mean", @@ -3926,8 +3943,8 @@ }, "sf6": { "modeling_realm": "ocean", - "standard_name": "moles_of_sf6_per_unit_mass_in_sea_water", - "units": "mol kg-1", + "standard_name": "mole_concentration_of_sulfur_hexafluoride_in_sea_water", + "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", "long_name": "Moles Per Unit Mass of SF6 in sea water", @@ -3977,7 +3994,7 @@ }, "si": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_silicate_in_sea_water", + "standard_name": "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", @@ -4268,8 +4285,8 @@ "modeling_realm": "ocean", "standard_name": "surface_downward_x_stress_correction", "units": "N m-2", - "cell_methods": "time: mean", - "cell_measures": "area: areacello", + "cell_methods": "area: mean where sea 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.", "dimensions": "longitude latitude time", @@ -4285,8 +4302,8 @@ "modeling_realm": "ocean", "standard_name": "surface_downward_x_stress", "units": "N m-2", - "cell_methods": "time: mean", - "cell_measures": "area: areacello", + "cell_methods": "area: mean where sea 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.", "dimensions": "longitude latitude time", @@ -4302,8 +4319,8 @@ "modeling_realm": "ocean", "standard_name": "surface_downward_y_stress_correction", "units": "N m-2", - "cell_methods": "time: mean", - "cell_measures": "area: areacello", + "cell_methods": "area: mean where sea 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.", "dimensions": "longitude latitude time", @@ -4319,8 +4336,8 @@ "modeling_realm": "ocean", "standard_name": "surface_downward_y_stress", "units": "N m-2", - "cell_methods": "time: mean", - "cell_measures": "area: areacello", + "cell_methods": "area: mean where sea 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.", "dimensions": "longitude latitude time", @@ -4402,8 +4419,8 @@ }, "tos": { "modeling_realm": "ocean", - "standard_name": "sea_surface_temperature", - "units": "degC", + "standard_name": "surface_temperature", + "units": "K", "cell_methods": "time: mean", "cell_measures": "area: areacello", "long_name": "Sea Surface Temperature", @@ -4456,7 +4473,7 @@ "standard_name": "ocean_mass_x_transport", "units": "kg s-1", "cell_methods": "time: mean", - "cell_measures": "", + "cell_measures": "--OPT", "long_name": "Ocean Mass X Transport", "comment": "X-ward mass transport from resolved and parameterized advective transport.", "dimensions": "longitude latitude olevel time", @@ -4473,7 +4490,7 @@ "standard_name": "sea_water_x_velocity", "units": "m s-1", "cell_methods": "time: mean", - "cell_measures": "", + "cell_measures": "--OPT", "long_name": "Sea Water X Velocity", "comment": "Prognostic x-ward velocity component resolved by the model.", "dimensions": "longitude latitude olevel time", @@ -4490,7 +4507,7 @@ "standard_name": "ocean_mass_y_transport", "units": "kg s-1", "cell_methods": "time: mean", - "cell_measures": "", + "cell_measures": "--OPT", "long_name": "Ocean Mass Y Transport", "comment": "Y-ward mass transport from resolved and parameterized advective transport.", "dimensions": "longitude latitude olevel time", @@ -4507,7 +4524,7 @@ "standard_name": "sea_water_y_velocity", "units": "m s-1", "cell_methods": "time: mean", - "cell_measures": "", + "cell_measures": "--OPT", "long_name": "Sea Water Y Velocity", "comment": "Prognostic x-ward velocity component resolved by the model.", "dimensions": "longitude latitude olevel time", @@ -4711,7 +4728,7 @@ "standard_name": "upward_sea_water_velocity", "units": "m s-1", "cell_methods": "time: mean", - "cell_measures": "", + "cell_measures": "--OPT", "long_name": "Sea Water Z Velocity", "comment": "", "dimensions": "longitude latitude olevel time", @@ -4744,11 +4761,11 @@ "modeling_realm": "ocean", "standard_name": "depth_below_geoid", "units": "m", - "cell_methods": "area: mean where sea time: mean", - "cell_measures": "area: areacello", + "cell_methods": "time: mean", + "cell_measures": "area: areacello volume: volcello", "long_name": "Depth Below Geoid of Interfaces Between Ocean Layers", "comment": "Depth below geoid", - "dimensions": "longitude latitude olevelh time", + "dimensions": "longitude latitude olevel time", "out_name": "zhalfo", "type": "real", "positive": "", diff --git a/TestTables/CMIP6_Omonbad.json b/TestTables/CMIP6_Omonbad.json index dd84324b..fc3a6c72 100644 --- a/TestTables/CMIP6_Omonbad.json +++ b/TestTables/CMIP6_Omonbad.json @@ -1,6 +1,6 @@ { "Header": { - "data_specs_version": "01.beta.32", + "data_specs_version": "01.00.05", "table_id": "Table Omon", "realm": "ocean", "frequency": "mon", @@ -11,7 +11,7 @@ "approx_interval": "30.00000", "generic_levels": "olevel", "mip_era": "verybad", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "axis_entry": { "alt16": { diff --git a/TestTables/CMIP6_Oyr.json b/TestTables/CMIP6_Oyr.json index a53a6cba..9154a117 100644 --- a/TestTables/CMIP6_Oyr.json +++ b/TestTables/CMIP6_Oyr.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table Oyr", "realm": "ocnBgchem", "frequency": "yr", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "365.00000", "generic_levels": "olevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "arag": { @@ -135,7 +135,7 @@ }, "bddtdisi": { "modeling_realm": "ocnBgchem", - "standard_name": "tendency_of_mole_concentration_of_dissolved_inorganic_silicate_in_sea_water_due_to_biological_processes", + "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_measures": "area: areacello volume: volcello", @@ -203,8 +203,8 @@ }, "cfc11": { "modeling_realm": "ocean", - "standard_name": "moles_of_cfc11_per_unit_mass_in_sea_water", - "units": "mol kg-1", + "standard_name": "mole_concentration_of_cfc11_in_sea_water", + "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", "long_name": "Mole Concentration of CFC-11 in sea water", @@ -220,8 +220,8 @@ }, "cfc12": { "modeling_realm": "ocean", - "standard_name": "moles_of_cfc12_per_unit_mass_in_sea_water", - "units": "mol kg-1", + "standard_name": "mole_concentration_of_cfc12_in_sea_water", + "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", "long_name": "Mole Concentration of CFC-12 in sea water", @@ -595,12 +595,12 @@ "dispkexyfo": { "modeling_realm": "ocean", "standard_name": "ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction", - "units": "W m-2 ", - "cell_methods": "time: mean", + "units": "W m-2", + "cell_methods": "area: mean where sea time: mean", "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.", - "dimensions": "longitude latitude olevel time", + "dimensions": "longitude latitude time", "out_name": "dispkexyfo", "type": "real", "positive": "", @@ -611,7 +611,7 @@ }, "dissi13c": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_dissolved_inorganic_c13_in_sea_water", + "standard_name": "mole_concentration_of_dissolved_inorganic_carbon13_in_sea_water", "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", @@ -628,7 +628,7 @@ }, "dissi14cabio": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_dissolved_inorganic_14carbon_in_sea_water_abiotic_component", + "standard_name": "mole_concentration_of_dissolved_inorganic_carbon14_in_sea_water", "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", @@ -711,16 +711,16 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "dmso": { + "dms": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_dimethyl_sulfide_in_sea_water", - "units": "mol m-3", + "standard_name": "mole_fraction_of_dimethyl_sulfide_in_air", + "units": "mol mol-1", "cell_methods": "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", + "comment": "", "dimensions": "longitude latitude olevel time", - "out_name": "dmso", + "out_name": "dms", "type": "real", "positive": "", "valid_min": "", @@ -1019,7 +1019,7 @@ }, "graz": { "modeling_realm": "ocnBgchem", - "standard_name": "tendency_of_mole_concentration_of_organic_matter_expressed_as_carbon_in_sea_water_due_to_grazing_of_phytoplankton", + "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_measures": "area: areacello volume: volcello", @@ -1070,7 +1070,7 @@ }, "o2": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_molecular_oxygen_in_sea_water", + "standard_name": "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water", "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", @@ -1087,7 +1087,7 @@ }, "o2sat": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_molecular_oxygen_in_sea_water_at_saturation", + "standard_name": "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water_at_saturation", "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", @@ -1767,7 +1767,7 @@ }, "po4": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_phosphate_in_sea_water", + "standard_name": "mole_concentration_of_dissolved_inorganic_phosphorus_in_sea_water", "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", @@ -1940,10 +1940,10 @@ "standard_name": "net_rate_of_absorption_of_shortwave_energy_in_ocean_layer", "units": "W m-2", "cell_methods": "time: mean", - "cell_measures": "area: areacello", + "cell_measures": "area: areacello volume: volcello", "long_name": "net rate of absorption of shortwave energy in ocean layer", "comment": "", - "dimensions": "longitude latitude time", + "dimensions": "longitude latitude olevel time", "out_name": "rsdoabsorb", "type": "real", "positive": "", @@ -1954,8 +1954,8 @@ }, "sf6": { "modeling_realm": "ocean", - "standard_name": "moles_of_sf6_per_unit_mass_in_sea_water", - "units": "mol kg-1", + "standard_name": "mole_concentration_of_sulfur_hexafluoride_in_sea_water", + "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", "long_name": "Mole Concentration of SF6 in sea water", @@ -1971,7 +1971,7 @@ }, "si": { "modeling_realm": "ocnBgchem", - "standard_name": "mole_concentration_of_silicate_in_sea_water", + "standard_name": "mole_concentration_of_dissolved_inorganic_silicon_in_sea_water", "units": "mol m-3", "cell_methods": "time: mean", "cell_measures": "area: areacello volume: volcello", @@ -2041,11 +2041,11 @@ "modeling_realm": "ocean", "standard_name": "tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport", "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 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 olevel time", + "dimensions": "longitude latitude time", "out_name": "tnkebto", "type": "real", "positive": "", diff --git a/TestTables/CMIP6_SIday.json b/TestTables/CMIP6_SIday.json index bedc2685..916f1810 100644 --- a/TestTables/CMIP6_SIday.json +++ b/TestTables/CMIP6_SIday.json @@ -1,30 +1,30 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table SIday", "realm": "seaIce", "frequency": "day", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "1.00000", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "siconc": { "modeling_realm": "seaIce", "standard_name": "sea_ice_area_fraction", - "units": "1.0", - "cell_methods": "time: mean", + "units": "%", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "Sea-ice area fraction", + "long_name": "Sea Ice Area Fraction", "comment": "Area fraction of grid cell covered by sea ice", "dimensions": "longitude latitude time", "out_name": "siconc", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -67,7 +67,7 @@ }, "sitemptop": { "modeling_realm": "seaIce", - "standard_name": "surface_temperature", + "standard_name": "sea_ice_surface_temperature", "units": "K", "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", "cell_measures": "area: areacella", @@ -82,31 +82,14 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "sithick": { - "modeling_realm": "seaIce", - "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": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "sitimefrac": { "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 ", + "comment": "Fraction of time steps of the averaging period during which sea ice is present (siconc >0 ) in a grid cell", "dimensions": "longitude latitude time", "out_name": "sitimefrac", "type": "", diff --git a/TestTables/CMIP6_SImon.json b/TestTables/CMIP6_SImon.json index 904fa880..6579ed91 100644 --- a/TestTables/CMIP6_SImon.json +++ b/TestTables/CMIP6_SImon.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table SImon", "realm": "seaIce", "frequency": "mon", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "30.00000", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "siage": { @@ -119,14 +119,14 @@ "siconc": { "modeling_realm": "seaIce", "standard_name": "sea_ice_area_fraction", - "units": "1.0", - "cell_methods": "time: mean", + "units": "%", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "Sea-ice area fraction", + "long_name": "Sea Ice Area Fraction", "comment": "Area fraction of grid cell covered by sea ice", "dimensions": "longitude latitude time", "out_name": "siconc", - "type": "", + "type": "real", "positive": "", "valid_min": "", "valid_max": "", @@ -137,7 +137,7 @@ "modeling_realm": "seaIce", "standard_name": "tendency_of_sea_ice_area_fraction_due_to_dynamics", "units": "s-1", - "cell_methods": "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...)", @@ -154,7 +154,7 @@ "modeling_realm": "seaIce", "standard_name": "tendency_of_sea_ice_area_fraction_due_to_thermodynamics", "units": "s-1", - "cell_methods": "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", @@ -188,7 +188,7 @@ "modeling_realm": "seaIce", "standard_name": "tendency_of_sea_ice_amount_due_to_dynamics", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -205,7 +205,7 @@ "modeling_realm": "seaIce", "standard_name": "water_evaporation_flux", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -222,10 +222,10 @@ "modeling_realm": "seaIce", "standard_name": "tendency_of_sea_ice_amount_due_to_congelation_ice_accumulation", "units": "kg m-2 s-1", - "cell_methods": "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. ", + "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.", "dimensions": "longitude latitude time", "out_name": "sidmassgrowthbot", "type": "", @@ -239,10 +239,10 @@ "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 ", + "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", "dimensions": "longitude latitude time", "out_name": "sidmassgrowthwat", "type": "", @@ -256,7 +256,7 @@ "modeling_realm": "seaIce", "standard_name": "tendency_of_sea_ice_amount_due_to_lateral_melting", "units": "kg m-2 s-1", - "cell_methods": "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)", @@ -273,7 +273,7 @@ "modeling_realm": "seaIce", "standard_name": "tendency_of_sea_ice_amount_due_to_basal_melting", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -290,7 +290,7 @@ "modeling_realm": "seaIce", "standard_name": "tendency_of_sea_ice_amount_due_to_surface_melting", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -307,7 +307,7 @@ "modeling_realm": "seaIce", "standard_name": "tendency_of_sea_ice_amount_due_to_snow_conversion", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -324,7 +324,7 @@ "modeling_realm": "seaIce", "standard_name": "tendency_of_sea_ice_amount_due_to_thermodynamics", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -459,11 +459,11 @@ "siflcondbot": { "modeling_realm": "seaIce", "standard_name": "conductive_heat_flux_at_sea_ice_bottom", - "units": "W m-2 ", + "units": "W m-2", "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", "cell_measures": "area: areacella", "long_name": "Net conductive heat fluxes in ice at the bottom", - "comment": "the net heat conduction flux at the ice base ", + "comment": "the net heat conduction flux at the ice base", "dimensions": "longitude latitude time", "out_name": "siflcondbot", "type": "", @@ -476,7 +476,7 @@ "siflcondtop": { "modeling_realm": "seaIce", "standard_name": "conductive_heat_flux_at_sea_ice_surface", - "units": "W m-2 ", + "units": "W m-2", "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", "cell_measures": "area: areacella", "long_name": "Net conductive heat flux in ice at the surface", @@ -783,7 +783,7 @@ "modeling_realm": "seaIce", "standard_name": "integral_of_sea_ice_temperature_wrt_depth_expressed_as_heat_content", "units": "J m-2", - "cell_methods": "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", @@ -799,7 +799,7 @@ "siitdconc": { "modeling_realm": "seaIce", "standard_name": "sea_ice_area_fraction_over_categories", - "units": "1.0", + "units": "%", "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", "cell_measures": "area: areacella", "long_name": "Sea-ice area fractions in thickness categories", @@ -816,8 +816,8 @@ "siitdsnconc": { "modeling_realm": "seaIce", "standard_name": "snow_area_fraction_over_categories", - "units": "1.0", - "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", + "units": "%", + "cell_methods": "area: time: mean where sea_ice (comment: mask=siitdconc)", "cell_measures": "area: areacella", "long_name": "Snow area fractions in thickness categories", "comment": "Area fraction of grid cell covered by snow in each ice-thickness category (vector with one entry for each thickness category starting from the thinnest category, netcdf file should use thickness bounds of the categories as third coordinate axis)", @@ -834,7 +834,7 @@ "modeling_realm": "seaIce", "standard_name": "snow_thickness_over_categories", "units": "m", - "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", + "cell_methods": "area: time: mean where sea_ice (comment: mask=siitdconc)", "cell_measures": "area: areacella", "long_name": "Snow thickness in thickness categories", "comment": "Actual thickness of snow in each category (NOT volume divided by grid area), (vector with one entry for each thickness category starting from the thinnest category, netcdf file should use thickness bounds of categories as third coordinate axis)", @@ -851,7 +851,7 @@ "modeling_realm": "seaIce", "standard_name": "sea_ice_thickness_over_categories", "units": "m", - "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", + "cell_methods": "area: time: mean where sea_ice (comment: mask=siitdconc)", "cell_measures": "area: areacella", "long_name": "Sea-ice thickness in thickness categories", "comment": "Actual (floe) thickness of sea ice in each category (NOT volume divided by grid area), (vector with one entry for each thickness category starting from the thinnest category, netcdf file should use thickness bounds of categories as third coordinate axis)", @@ -868,7 +868,7 @@ "modeling_realm": "seaIce", "standard_name": "sea_ice_amount", "units": "kg m-2", - "cell_methods": "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", @@ -901,12 +901,12 @@ "simpconc": { "modeling_realm": "seaIce", "standard_name": "area_fraction", - "units": "1.0", + "units": "%", "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", "cell_measures": "area: areacella", "long_name": "Meltpond area fraction", "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 time", + "dimensions": "longitude latitude typemp time", "out_name": "simpconc", "type": "", "positive": "", @@ -919,7 +919,7 @@ "modeling_realm": "seaIce", "standard_name": "surface_liquid_water_amount", "units": "kg m-2", - "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", + "cell_methods": "area: time: mean where sea_ice_melt_pond (comment: mask=simpconc)", "cell_measures": "area: areacella", "long_name": "Meltpond mass per area", "comment": "Meltpond mass per area of sea ice.", @@ -936,9 +936,9 @@ "modeling_realm": "seaIce", "standard_name": "melt_pond_refrozen_ice", "units": "m", - "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", + "cell_methods": "area: time: mean where sea_ice_melt_pond (comment: mask=simpconc)", "cell_measures": "area: areacella", - "long_name": "Thickness of refozen ice on melt pond", + "long_name": "Thickness of Refrozen Ice on Melt Pond", "comment": "Volume of refrozen ice on melt ponds divided by meltpond covered area", "dimensions": "longitude latitude time", "out_name": "simprefrozen", @@ -987,7 +987,7 @@ "modeling_realm": "seaIce", "standard_name": "thickness_of_ridged_sea_ice", "units": "m", - "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", + "cell_methods": "area: time: mean where sea_ice (comment: mask=sirdgconc)", "cell_measures": "area: areacella", "long_name": "Ridged ice thickness", "comment": "Sea Ice Ridge Height (representing mean height over the ridged area)", @@ -1021,7 +1021,7 @@ "modeling_realm": "seaIce", "standard_name": "sea_ice_salt_mass", "units": "kg m-2", - "cell_methods": "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", @@ -1054,7 +1054,7 @@ "sisnconc": { "modeling_realm": "seaIce", "standard_name": "surface_snow_area_fraction", - "units": "1.0", + "units": "%", "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", "cell_measures": "area: areacella", "long_name": "Snow area fraction", @@ -1194,7 +1194,7 @@ "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", "cell_measures": "area: areacella", "long_name": "X-component of ocean stress on sea ice", - "comment": "X-component of ocean stress on sea ice ", + "comment": "X-component of ocean stress on sea ice", "dimensions": "longitude latitude time", "out_name": "sistrxubot", "type": "", @@ -1211,7 +1211,7 @@ "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", "cell_measures": "--MODEL", "long_name": "Y-component of atmospheric stress on sea ice", - "comment": "Y-component of atmospheric stress on sea ice ", + "comment": "Y-component of atmospheric stress on sea ice", "dimensions": "longitude latitude time", "out_name": "sistrydtop", "type": "", @@ -1228,7 +1228,7 @@ "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", "cell_measures": "area: areacella", "long_name": "Y-component of ocean stress on sea ice", - "comment": "Y-component of ocean stress on sea ice ", + "comment": "Y-component of ocean stress on sea ice", "dimensions": "longitude latitude time", "out_name": "sistryubot", "type": "", @@ -1274,7 +1274,7 @@ }, "sitemptop": { "modeling_realm": "seaIce", - "standard_name": "surface_temperature", + "standard_name": "sea_ice_surface_temperature", "units": "K", "cell_methods": "area: time: mean where sea_ice (comment: mask=siconc)", "cell_measures": "area: areacella", @@ -1289,31 +1289,14 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "sithick": { - "modeling_realm": "seaIce", - "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": "", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "sitimefrac": { "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 ", + "comment": "Fraction of time steps of the averaging period during which sea ice is present (siconc >0 ) in a grid cell", "dimensions": "longitude latitude time", "out_name": "sitimefrac", "type": "", @@ -1361,7 +1344,7 @@ "modeling_realm": "seaIce", "standard_name": "sea_ice_thickness", "units": "m", - "cell_methods": "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)", @@ -1412,9 +1395,9 @@ "modeling_realm": "seaIce", "standard_name": "tendency_of_snow_mass_due_to_sea_ice_dynamics", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "snow mass change through advection by sea-ice dynamics", + "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", "dimensions": "longitude latitude time", "out_name": "sndmassdyn", @@ -1429,9 +1412,9 @@ "modeling_realm": "seaIce", "standard_name": "surface_snow_melt_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "snow mass change through melt", + "long_name": "Snow Mass Rate of Change through Melt", "comment": "the rate of change of snow mass through melt divided by grid-cell area", "dimensions": "longitude latitude time", "out_name": "sndmassmelt", @@ -1444,11 +1427,11 @@ }, "sndmasssi": { "modeling_realm": "seaIce", - "standard_name": "tendency_of_snow_mass_due_to_snow_to_ice_conversion", + "standard_name": "tendency_of_surface_snow_amount_due_to_conversion_of_snow_to_sea_ice", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "snow mass change through snow-to-ice conversion", + "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", "dimensions": "longitude latitude time", "out_name": "sndmasssi", @@ -1463,7 +1446,7 @@ "modeling_realm": "seaIce", "standard_name": "snowfall_flux", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -1480,9 +1463,9 @@ "modeling_realm": "seaIce", "standard_name": "surface_snow_sublimation_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "snow mass change through evaporation or sublimation", + "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", "dimensions": "longitude latitude time", "out_name": "sndmasssubl", @@ -1497,10 +1480,10 @@ "modeling_realm": "seaIce", "standard_name": "tendency_of_snow_mass_due_to_drifting_snow", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", - "long_name": "snow mass change through wind drift of snow", - "comment": "the rate of change of snow mass through wind drift of snow divided by grid-cell area", + "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", "dimensions": "longitude latitude time", "out_name": "sndmasswindrif", "type": "", diff --git a/TestTables/CMIP6_cf3hr_0.json b/TestTables/CMIP6_cf3hr_0.json index 518d2f5c..4d90b288 100644 --- a/TestTables/CMIP6_cf3hr_0.json +++ b/TestTables/CMIP6_cf3hr_0.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.beta.36", + "data_specs_version": "01.10.36", "table_id": "Table cf3hr", "realm": "atmos", "frequency": "3hr", "cmor_version": "3.2", "table_date": "04 October 2016", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "1.00", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "axis_entry": { "height40": { diff --git a/TestTables/CMIP6_cf3hr_1.json b/TestTables/CMIP6_cf3hr_1.json index 603e9c3e..3d3f364a 100644 --- a/TestTables/CMIP6_cf3hr_1.json +++ b/TestTables/CMIP6_cf3hr_1.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.beta.36", + "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", - "product": "output", + "product": "model-output", "approx_interval": "1.00", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "axis_entry": { "height40": { diff --git a/TestTables/CMIP6_cf3hr_2.json b/TestTables/CMIP6_cf3hr_2.json index e677afa9..dde18012 100644 --- a/TestTables/CMIP6_cf3hr_2.json +++ b/TestTables/CMIP6_cf3hr_2.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.beta.36", + "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", - "product": "output", + "product": "model-output", "approx_interval": "1.00", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "axis_entry": { "time1": { diff --git a/TestTables/CMIP6_chunking.json b/TestTables/CMIP6_chunking.json index d8fd6403..469f026e 100644 --- a/TestTables/CMIP6_chunking.json +++ b/TestTables/CMIP6_chunking.json @@ -8,7 +8,8 @@ "table_date": "24 February 2016", "realm": "atmos", "generic_levels": "alevel alevhalf", - "data_specs_version": "3.0", + "product":"model-output", + "data_specs_version": "10.10.10", "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { diff --git a/TestTables/CMIP6_coordinate.json b/TestTables/CMIP6_coordinate.json index 20b3b9b6..5c8f4c44 100644 --- a/TestTables/CMIP6_coordinate.json +++ b/TestTables/CMIP6_coordinate.json @@ -489,7 +489,7 @@ }, "effectRadIc": { "standard_name": "", - "units": "m", + "units": "micron", "axis": "", "long_name": "Effective Radius [Values to be specified]", "climatology": "", @@ -497,8 +497,28 @@ "must_have_bounds": "", "out_name": "effectRadIc", "positive": "", - "requested": "", - "requested_bounds": "", + "requested": [ + "5.", + "15.", + "25.", + "35.", + "50.", + "75." + ], + "requested_bounds": [ + "0.", + "10.", + "10.", + "20.", + "20.", + "30.", + "30.", + "40.", + "40.", + "60.", + "60.", + "90." + ], "stored_direction": "", "tolerance": "", "type": "double", @@ -511,7 +531,7 @@ }, "effectRadLi": { "standard_name": "", - "units": "m", + "units": "micron", "axis": "", "long_name": "Effective Radius [Values to be specified]", "climatology": "", @@ -519,8 +539,28 @@ "must_have_bounds": "", "out_name": "effectRadLi", "positive": "", - "requested": "", - "requested_bounds": "", + "requested": [ + "4.", + "9.", + "11.5", + "14.", + "17.5", + "25." + ], + "requested_bounds": [ + "0.", + "8.", + "8.", + "10.", + "10.", + "13.", + "13.", + "15.", + "15.", + "20.", + "20.", + "30." + ], "stored_direction": "", "tolerance": "", "type": "double", @@ -951,6 +991,50 @@ "z_factors": "", "bounds_values": "" }, + "p10": { + "standard_name": "air_pressure", + "units": "Pa", + "axis": "Z", + "long_name": "pressure", + "climatology": "", + "formula": "", + "must_have_bounds": "no", + "out_name": "plev", + "positive": "down", + "requested": "", + "requested_bounds": "", + "stored_direction": "", + "tolerance": "", + "type": "double", + "valid_max": "", + "valid_min": "", + "value": "1000.", + "z_bounds_factors": "", + "z_factors": "", + "bounds_values": "" + }, + "p100": { + "standard_name": "air_pressure", + "units": "Pa", + "axis": "Z", + "long_name": "pressure", + "climatology": "", + "formula": "", + "must_have_bounds": "no", + "out_name": "plev", + "positive": "down", + "requested": "", + "requested_bounds": "", + "stored_direction": "", + "tolerance": "", + "type": "double", + "valid_max": "", + "valid_min": "", + "value": "10000.", + "z_bounds_factors": "", + "z_factors": "", + "bounds_values": "" + }, "p1000": { "standard_name": "air_pressure", "units": "Pa", @@ -1081,7 +1165,7 @@ "value": "70000.", "z_bounds_factors": "", "z_factors": "", - "bounds_values": "" + "bounds_values": "85000.0 60000.0" }, "p840": { "standard_name": "air_pressure", @@ -1127,6 +1211,28 @@ "z_factors": "", "bounds_values": "" }, + "pl700": { + "standard_name": "air_pressure", + "units": "Pa", + "axis": "Z", + "long_name": "pressure", + "climatology": "", + "formula": "", + "must_have_bounds": "no", + "out_name": "plev", + "positive": "down", + "requested": "", + "requested_bounds": "", + "stored_direction": "", + "tolerance": "", + "type": "double", + "valid_max": "", + "valid_min": "", + "value": "70000.", + "z_bounds_factors": "", + "z_factors": "", + "bounds_values": "" + }, "plev10": { "standard_name": "air_pressure", "units": "Pa", @@ -1540,7 +1646,7 @@ "out_name": "plev", "positive": "down", "requested": [ - "925000.", + "92500.", "85000.", "70000.", "60000.", @@ -1845,8 +1951,8 @@ "bounds_values": "" }, "spectband": { - "standard_name": "wave_frequency", - "units": "s-1", + "standard_name": "sensor_band_central_radiation_wavenumber", + "units": "m-1", "axis": "", "long_name": "Spectral Frequency Band", "climatology": "", @@ -2093,6 +2199,28 @@ "z_factors": "", "bounds_values": "" }, + "typeburnt": { + "standard_name": "area_type", + "units": "", + "axis": "", + "long_name": "Burnt 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": "burnt_vegetation", + "z_bounds_factors": "", + "z_factors": "", + "bounds_values": "" + }, "typec3pft": { "standard_name": "area_type", "units": "", @@ -2137,6 +2265,94 @@ "z_factors": "", "bounds_values": "" }, + "typecrop": { + "standard_name": "area_type", + "units": "", + "axis": "", + "long_name": "Crop 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": "crops", + "z_bounds_factors": "", + "z_factors": "", + "bounds_values": "" + }, + "typemp": { + "standard_name": "area_type", + "units": "", + "axis": "", + "long_name": "Melt pond 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_melt_pond", + "z_bounds_factors": "", + "z_factors": "", + "bounds_values": "" + }, + "typenatgr": { + "standard_name": "area_type", + "units": "", + "axis": "", + "long_name": "Natural grass 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": "natural_grasses", + "z_bounds_factors": "", + "z_factors": "", + "bounds_values": "" + }, + "typepasture": { + "standard_name": "area_type", + "units": "", + "axis": "", + "long_name": "Pasture 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": "pastures", + "z_bounds_factors": "", + "z_factors": "", + "bounds_values": "" + }, "typepdec": { "standard_name": "area_type", "units": "", @@ -2225,6 +2441,72 @@ "z_factors": "", "bounds_values": "" }, + "typeshrub": { + "standard_name": "area_type", + "units": "", + "axis": "", + "long_name": "Shrub 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": "shrubs", + "z_bounds_factors": "", + "z_factors": "", + "bounds_values": "" + }, + "typetree": { + "standard_name": "area_type", + "units": "", + "axis": "", + "long_name": "Tree 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": "trees", + "z_bounds_factors": "", + "z_factors": "", + "bounds_values": "" + }, + "typeveg": { + "standard_name": "area_type", + "units": "", + "axis": "", + "long_name": "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": "vegetation", + "z_bounds_factors": "", + "z_factors": "", + "bounds_values": "" + }, "vegtype": { "standard_name": "", "units": "", diff --git a/TestTables/CMIP6_day.json b/TestTables/CMIP6_day.json index 703778a9..647a1acd 100644 --- a/TestTables/CMIP6_day.json +++ b/TestTables/CMIP6_day.json @@ -1,24 +1,24 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table day", "realm": "atmos", "frequency": "day", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "1.00000", "generic_levels": "", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "clt": { "modeling_realm": "atmos", "standard_name": "cloud_area_fraction", - "units": "1.0", - "cell_methods": "time: mean", + "units": "%", + "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.", @@ -35,7 +35,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upward_latent_heat_flux", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upward Latent Heat Flux", "comment": "", @@ -52,7 +52,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upward_sensible_heat_flux", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upward Sensible Heat Flux", "comment": "", @@ -103,7 +103,7 @@ "modeling_realm": "atmos", "standard_name": "relative_humidity", "units": "%", - "cell_methods": "time: maximum", + "cell_methods": "area: mean time: maximum", "cell_measures": "area: areacella", "long_name": "Surface Daily Maximum Relative Humidity", "comment": "", @@ -120,7 +120,7 @@ "modeling_realm": "atmos", "standard_name": "relative_humidity", "units": "%", - "cell_methods": "time: minimum", + "cell_methods": "area: mean time: minimum", "cell_measures": "area: areacella", "long_name": "Surface Daily Minimum Relative Humidity", "comment": "", @@ -201,28 +201,11 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "omldamax": { - "modeling_realm": "ocean", - "standard_name": "ocean_mixed_layer_thickness_defined_by_mixing_scheme", - "units": "m", - "cell_methods": "time: maximum", - "cell_measures": "area: areacello", - "long_name": "Daily Maximum Ocean Mixed Layer Thickness Defined by Mixing Scheme", - "comment": "", - "dimensions": "longitude latitude time", - "out_name": "omldamax", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "pr": { "modeling_realm": "atmos", "standard_name": "precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Precipitation", "comment": "includes both liquid and solid phases", @@ -239,7 +222,7 @@ "modeling_realm": "atmos", "standard_name": "convective_precipitation_flux", "units": "kg m-2 s-1", - "cell_methods": "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.", @@ -256,7 +239,7 @@ "modeling_realm": "atmos", "standard_name": "snowfall_flux", "units": "kg m-2 s-1", - "cell_methods": "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", @@ -273,7 +256,7 @@ "modeling_realm": "atmos", "standard_name": "air_pressure_at_sea_level", "units": "Pa", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Sea Level Pressure", "comment": "Sea Level Pressure", @@ -290,7 +273,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Downwelling Longwave Radiation", "comment": "", @@ -307,7 +290,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upwelling_longwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upwelling Longwave Radiation", "comment": "", @@ -324,7 +307,7 @@ "modeling_realm": "atmos", "standard_name": "toa_outgoing_longwave_flux", "units": "W m-2", - "cell_methods": "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)", @@ -341,7 +324,7 @@ "modeling_realm": "atmos", "standard_name": "surface_downwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Downwelling Shortwave Radiation", "comment": "surface solar irradiance for UV calculations", @@ -358,7 +341,7 @@ "modeling_realm": "atmos", "standard_name": "surface_upwelling_shortwave_flux_in_air", "units": "W m-2", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Upwelling Shortwave Radiation", "comment": "", @@ -392,7 +375,7 @@ "modeling_realm": "atmos", "standard_name": "wind_speed", "units": "m s-1", - "cell_methods": "time: maximum", + "cell_methods": "area: mean time: maximum", "cell_measures": "", "long_name": "Daily Maximum Near-Surface Wind Speed", "comment": "Daily maximum near-surface (usually, 10 meters) wind speed.", @@ -405,11 +388,28 @@ "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)", + "dimensions": "longitude latitude time", + "out_name": "sithick", + "type": "real", + "positive": "", + "valid_min": "", + "valid_max": "", + "ok_min_mean_abs": "", + "ok_max_mean_abs": "" + }, "snc": { "modeling_realm": "landIce land", "standard_name": "surface_snow_area_fraction", "units": "%", - "cell_methods": "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.", @@ -460,7 +460,7 @@ "modeling_realm": "atmos", "standard_name": "air_temperature", "units": "K", - "cell_methods": "time: maximum", + "cell_methods": "area: mean time: maximum", "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')", @@ -477,7 +477,7 @@ "modeling_realm": "atmos", "standard_name": "air_temperature", "units": "K", - "cell_methods": "time: minimum", + "cell_methods": "area: mean time: minimum", "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')", @@ -494,7 +494,7 @@ "modeling_realm": "land", "standard_name": "surface_temperature", "units": "K", - "cell_methods": "time: mean", + "cell_methods": "area: time: mean ", "cell_measures": "area: areacella", "long_name": "Surface Temperature Where Land or Sea Ice", "comment": "'skin' temperature of all surfaces except open ocean.", diff --git a/TestTables/CMIP6_fx.json b/TestTables/CMIP6_fx.json index 7574a729..429e8310 100644 --- a/TestTables/CMIP6_fx.json +++ b/TestTables/CMIP6_fx.json @@ -1,17 +1,17 @@ { "Header": { - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "table_id": "Table fx", "realm": "land", "frequency": "fx", "cmor_version": "3.2", - "table_date": "24 February 2017", + "table_date": "10 April 2017", "missing_value": "1e20", - "product": "output", + "product": "model-output", "approx_interval": "0.00000", "generic_levels": "olevel", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "Conventions": "CF-1.7 CMIP-6.0" }, "variable_entry": { "areacella": { @@ -31,23 +31,6 @@ "ok_min_mean_abs": "", "ok_max_mean_abs": "" }, - "hfgeou": { - "modeling_realm": "ocean", - "standard_name": "upward_geothermal_heat_flux_at_sea_floor", - "units": "W m-2", - "cell_methods": "area: mean where sea", - "cell_measures": "area: areacello", - "long_name": "Upward Geothermal Heat Flux at Sea Floor", - "comment": "", - "dimensions": "longitude latitude", - "out_name": "hfgeou", - "type": "real", - "positive": "up", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, "mrsofc": { "modeling_realm": "land", "standard_name": "soil_moisture_content_at_field_capacity", @@ -66,7 +49,7 @@ "ok_max_mean_abs": "" }, "orog": { - "modeling_realm": "atmos", + "modeling_realm": "land", "standard_name": "surface_altitude", "units": "m", "cell_methods": "area: mean", @@ -119,11 +102,11 @@ "sftlf": { "modeling_realm": "atmos", "standard_name": "land_area_fraction", - "units": "1", + "units": "%", "cell_methods": "area: mean", "cell_measures": "area: areacella", "long_name": "Land Area Fraction", - "comment": "Please express 'X_area_fraction' as the fraction of horizontal area occupied by X.", + "comment": "Please express 'X_area_fraction' as the percentage of horizontal area occupied by X.", "dimensions": "longitude latitude", "out_name": "sftlf", "type": "real", @@ -132,57 +115,6 @@ "valid_max": "", "ok_min_mean_abs": "", "ok_max_mean_abs": "" - }, - "sftof": { - "modeling_realm": "ocean", - "standard_name": "sea_area_fraction", - "units": "%", - "cell_methods": "area: mean", - "cell_measures": "area: areacello", - "long_name": "Sea Area Fraction", - "comment": "This is the area fraction at the ocean surface.", - "dimensions": "longitude latitude", - "out_name": "sftof", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "thkcello": { - "modeling_realm": "ocean", - "standard_name": "cell_thickness", - "units": "m", - "cell_methods": "time: mean", - "cell_measures": "area: areacello volume: volcello", - "long_name": "Ocean Model Cell Thickness", - "comment": "", - "dimensions": "longitude latitude olevel", - "out_name": "thkcello", - "type": "real", - "positive": "", - "valid_min": "", - "valid_max": "", - "ok_min_mean_abs": "", - "ok_max_mean_abs": "" - }, - "volcello": { - "modeling_realm": "ocean", - "standard_name": "ocean_volume", - "units": "m3", - "cell_methods": "", - "cell_measures": "area: areacello", - "long_name": "Ocean Grid-Cell Volume", - "comment": "grid-cell volume ca. 2000.", - "dimensions": "longitude latitude olevel", - "out_name": "volcello", - "type": "real", - "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 ec26a80a..19a82663 100644 --- a/TestTables/CMIP6_grids.json +++ b/TestTables/CMIP6_grids.json @@ -1,14 +1,12 @@ { "Header": { "product": "output", - "cf_version": "1.6", - "baseURL": "http://cmip-pcmdi.llnl.gov/CMIP6/dataLocation", "cmor_version": "3.2", "Conventions": "CF-1.6 CMIP-6.0", "table_id": "Table grids", - "data_specs_version": "01.00.03", + "data_specs_version": "01.00.06", "missing_value": "1e20", - "table_date": "24 February 2017" + "table_date": "10 April 2017" }, "mapping_entry": { "sample_user_mapping": { diff --git a/TestTables/python_test_table_A b/TestTables/python_test_table_A index 1cfee122..1d76101d 100644 --- a/TestTables/python_test_table_A +++ b/TestTables/python_test_table_A @@ -1,16 +1,17 @@ { "Header": { - "data_specs_version": "01.beta.38", + "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", - "product": "output", - "approx_interval": "30.00000", - "generic_levels": "alevel alevhalf", "mip_era": "CMIP6", - "Conventions": "CF-1.6 CMIP-6.0" + "product": "model-output", + "approx_interval": "30.00000", + "generic_levels": "alevel alevhalf", + "mip_era": "CMIP6", + "Conventions": "CF-1.7 CMIP-6.0" }, "axis_entry": { diff --git a/configure b/configure index 0fba93ef..e0f4643b 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.2. +# Generated by GNU Autoconf 2.69 for cmor 3.2.3. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='cmor' PACKAGE_TARNAME='cmor' -PACKAGE_VERSION='3.2.2' -PACKAGE_STRING='cmor 3.2.2' +PACKAGE_VERSION='3.2.3' +PACKAGE_STRING='cmor 3.2.3' PACKAGE_BUGREPORT='nadeau1@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.2 to adapt to many kinds of systems. +\`configure' configures cmor 3.2.3 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.2:";; + short | recursive ) echo "Configuration of cmor 3.2.3:";; 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.2 +cmor configure 3.2.3 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.2, which was +It was created by cmor $as_me 3.2.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -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.2, which was +This file was extended by cmor $as_me 3.2.3, 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.2 +cmor config.status 3.2.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 988a0f36..d8d1e6f6 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.2, nadeau1@llnl.gov) +AC_INIT(cmor, 3.2.3, nadeau1@llnl.gov) GIT_TAG=`./get_git_version.sh` diff --git a/include/cmor.h b/include/cmor.h index 6a865a73..2dcbfa76 100644 --- a/include/cmor.h +++ b/include/cmor.h @@ -3,10 +3,10 @@ #define CMOR_VERSION_MAJOR 3 #define CMOR_VERSION_MINOR 2 -#define CMOR_VERSION_PATCH 2 +#define CMOR_VERSION_PATCH 3 #define CMOR_CF_VERSION_MAJOR 1 -#define CMOR_CF_VERSION_MINOR 6 +#define CMOR_CF_VERSION_MINOR 7 #define CMOR_MAX_STRING 1024 #define CMOR_DEF_ATT_STR_LEN 256 @@ -17,7 +17,7 @@ #define CMOR_MAX_DIMENSIONS 7 #define CMOR_MAX_ATTRIBUTES 100 #define CMOR_MAX_ERRORS 10 -#define CMOR_MAX_TABLES 10 +#define CMOR_MAX_TABLES 30 #define CMOR_MAX_GRID_ATTRIBUTES 25 #define CMOR_MAX_JSON_ARRAY 50 #define CMOR_MAX_JSON_OBJECT 250 @@ -154,6 +154,8 @@ #define GLOBAL_ATT_VARIABLE_ID "variable_id" #define GLOBAL_ATT_SOURCE_ID "source_id" #define GLOBAL_ATT_SOURCE "source" +#define GLOBAL_ATT_SUB_EXPT_ID "sub_experiment_id" +#define GLOBAL_ATT_SUB_EXPT "sub_experiment" #define GLOBAL_ATT_SOURCE_TYPE "source_type" #define GLOBAL_ATT_CONVENTIONS "Conventions" #define GLOBAL_ATT_CREATION_DATE "creation_date" @@ -167,6 +169,7 @@ #define GLOBAL_ATT_REALM "realm" #define GLOBAL_ATT_TRACKING_ID "tracking_id" #define GLOBAL_ATT_VARIANT_LABEL "variant_label" +#define GLOBAL_ATT_MEMBER_ID GLOBAL_INTERNAL"member_id" #define GLOBAL_ATT_DATASPECSVERSION "data_specs_version" #define GLOBAL_ATT_FREQUENCY "frequency" #define GLOBAL_ATT_LICENSE "license" @@ -184,6 +187,17 @@ #define GLOBAL_CV_FILENAME GLOBAL_INTERNAL"control_vocabulary_file" #define GLOBAL_IS_CMIP6 GLOBAL_INTERNAL"cmip6_option" +#define NO_PARENT "no parent" +#define NONE "none" +#define BRANCH_METHOD "branch_method" +#define BRANCH_TIME_IN_CHILD "branch_time_in_child" +#define BRANCH_TIME_IN_PARENT "branch_time_in_parent" +#define PARENT_ACTIVITY_ID "parent_activity_id" +#define PARENT_EXPERIMENT_ID "parent_experiment_id" +#define PARENT_MIP_ERA "parent_mip_era" +#define PARENT_SOURCE_ID "parent_source_id" +#define PARENT_TIME_UNITS "parent_time_units" +#define PARENT_VARIANT_LABEL "parent_variant_label" #define JSON_KEY_HEADER "Header" #define JSON_KEY_EXPERIMENT "experiments" @@ -193,14 +207,14 @@ #define JSON_KEY_CV_ENTRY "CV" #define CV_KEY_REQUIRED_GBL_ATTRS "required_global_attributes" -#define CV_KEY_INSTITUTION_IDS "institution_id" -#define CV_KEY_EXPERIMENT_IDS "experiment_id" +#define CV_KEY_INSTITUTION_ID "institution_id" +#define CV_KEY_EXPERIMENT_ID "experiment_id" #define CV_KEY_SOURCE_IDS "source_id" #define CV_KEY_GRID_LABELS "grid_label" #define CV_KEY_GRID_RESOLUTION "nominal_resolution" #define CV_KEY_GRIDLABEL_GR "gr" -#define CV_KEY_SOURCE_LABEL "label" - +#define CV_KEY_SOURCE_LABEL "source" +#define CV_KEY_SUB_EXPERIMENT_ID "sub_experiment_id" #define CV_EXP_ATTR_ADDSOURCETYPE "additional_allowed_model_components" #define CV_EXP_ATTR_REQSOURCETYPE "required_model_components" @@ -208,7 +222,6 @@ #define GLOBAL_INT_ATT_PARENT_EXPT GLOBAL_INTERNAL"parent_experiment" #define GLOBAL_ATT_VERSION GLOBAL_INTERNAL"version" - #define TABLE_HEADER_VERSION "cmor_version" #define TABLE_HEADER_GENERIC_LEVS "generic_levels" #define TABLE_HEADER_CF_VERSION "cf_version" @@ -236,11 +249,14 @@ #define DIMENSION_ZLEVEL "zlevel" #define DIMENSION_OLEVEL "olevel" +#define AREA "area" +#define VOLUME "volume" #define CMIP6 "CMIP6" -#define CMOR_DEFAULT_PATH_TEMPLATE "
" -#define CMOR_DEFAULT_FILE_TEMPLATE "
" +#define CMOR_DEFAULT_PATH_TEMPLATE "
" +#define CMOR_DEFAULT_FILE_TEMPLATE "
" #define CMOR_DEFAULT_FURTHERURL_TEMPLATE "http://furtherinfo.es-doc.org/" -#define EXTERNAL_VARIABLE_REGEX "area:[[:blank:]]*([[:alpha:]]+)([[:blank:]]*volume:[[:blank:]]*([[:alpha:]]+))*" +//#define EXTERNAL_VARIABLE_REGEX "([[:alpha:]]+):[[:blank:]]*([[:alpha:]]+)[[:blank:]]*([[:alpha:]]+:[[:blank:]]*([[:alpha:]]+))*" +#define EXTERNAL_VARIABLE_REGEX "[[:alpha:]]+:[[:blank:]]*([[:alpha:]]+)([[:blank:]]*[[:alpha:]]+:[[:blank:]]*([[:alpha:]]+))*" extern int USE_NETCDF_4; extern int CMOR_MODE; @@ -249,7 +265,7 @@ extern int CMOR_VERBOSITY; extern int CMOR_NETCDF_MODE; extern int CV_ERROR; -extern int cleanup_varid; +extern int clfeanup_varid; extern int cmor_naxes; extern int cmor_nvars; diff --git a/include/cmor_func_def.h b/include/cmor_func_def.h index 849d6b12..fcab2662 100644 --- a/include/cmor_func_def.h +++ b/include/cmor_func_def.h @@ -135,6 +135,12 @@ extern int cmor_CV_checkISOTime(char *szAttribute); extern void cmor_CV_set_att(cmor_CV_def_t *CV, char *key, json_object *joValue); +extern int cmor_CV_checkFilename(cmor_CV_def_t *CV, int var_id, + char *szInTimeCalendar, + char *szInTimeUnits, + char *infile); +extern int cmor_CV_checkParentExpID(cmor_CV_def_t *CV); +extern int cmor_CV_checkSubExpID(cmor_CV_def_t *CV); extern int cmor_CV_checkExperiment( cmor_CV_def_t *CV); extern int cmor_CV_checkSourceID(cmor_CV_def_t *CV); extern int cmor_CV_checkSourceType(cmor_CV_def_t *CV, char *); diff --git a/scripts/PrePARE.py b/scripts/PrePARE.py deleted file mode 100644 index 67220e62..00000000 --- a/scripts/PrePARE.py +++ /dev/null @@ -1,325 +0,0 @@ -#!/user/bin/env python -# -*- coding: utf-8 -*- -# -# Please first complete the following steps: -# -# 1. Download -# https://github.com/PCMDI/cmip6-cmor-tables.git -# Create a soft link cmip6-cmor-tables/Tables to ./Tables in your -# working directory -# -# python CMIP6Validtor ../Tables/CMIP6_Amon.json ../CMIP6/yourfile.nc -# - -''' -Created on Fri Feb 19 11:33:52 2016 - -@author: Denis Nadeau LLNL -''' - -import cmip6_cv -import cdms2 -import argparse -import sys -import os -import json -import numpy - - -class bcolors: - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKGREEN = '\033[1;32m' - WARNING = '\033[1;34;47m' - FAIL = '\033[1;31;47m' - ENDC = '\033[0m' - BOLD = '\033[1m' - UNDERLINE = '\033[4m' - -# ========================= -# JSONAction() -# ========================= - - -class JSONAction(argparse.Action): - ''' - Check if argparse is JSON file - ''' - - 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)) - 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)) - setattr(namespace, self.dest, values) - - -# ========================= -# CDMSAction() -# ========================= -class CDMSAction(argparse.Action): - ''' - Check if argparse is CDMS file - ''' - - 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)) - f = cdms2.open(fn) - setattr(namespace, self.dest, f) - - -# ========================= -# readable_dir() -# ========================= -class readable_dir(argparse.Action): - ''' - Check if argparse is a directory. - ''' - - 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)) - 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)) - - -# ========================= -# checkCMIP6() -# ========================= -class checkCMIP6(object): - ''' - Validate if a file is CMIP6 compliant and ready for publication. - - Class need to read CMIP6 Table and Controled Vocabulary file. - - As well,the class will load the EXPERIMENT json file - - Input: - args.cmip6_table: CMIP6 table used to creat this file, - variable attributes and dimensions will be controled. - args.CV: Controled Vocabulary "json" file. - - Output: - outfile: Log file, default is stdout. - - ''' - - # ************************* - # __init__() - # ************************* - def __init__(self, args): - # ------------------------------------------------------------------- - # Initilaze arrays - # ------------------------------------------------------------------- - self.cmip6_table = args.cmip6_table - self.infile = args.infile - self.attributes = self.infile.listglobal() - self.variables = self.infile.listvariable() - if args.variable is not None: - self.var = [args.variable] - else: - # ------------------------------------------------------------------- - # find variable that contains a "history" (should only be one) - # ------------------------------------------------------------------- - self.var = [var for var in self.variables if 'history' in self.infile.listattribute(var)] - - 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" - print "! Please use the --variable option to specify your CMIP6 variable" - 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: - 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 - - - # ------------------------------------------------------------------- - # call setup() to clean all 'C' internal memory. - # ------------------------------------------------------------------- - cmip6_cv.setup(inpath="../Tables", exit_control=cmip6_cv.CMOR_NORMAL) - - # ------------------------------------------------------------------- - # 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") - - - # ------------------------------------------------------------------- - # 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()] - - # ------------------------------------------------------------------- - # 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)]]) - # ------------------------------------------------------------------- - # Load CMIP6 table into memory - # ------------------------------------------------------------------- - self.table_id = cmip6_cv.load_table(self.cmip6_table) - - def ControlVocab(self): - ''' - Check CMIP6 global attributes against Control Vocabulary file. - - 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. - 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. - ''' - cmip6_cv.check_requiredattributes(self.table_id) - cmip6_cv.check_institution(self.table_id) - cmip6_cv.check_sourceID(self.table_id) - cmip6_cv.check_experiment(self.table_id) - cmip6_cv.check_grids(self.table_id) - cmip6_cv.check_ISOTime() - cmip6_cv.check_furtherinfourl(self.table_id) - varid = cmip6_cv.setup_variable(self.var[0], 'm', 1e20) - - prepLIST = cmip6_cv.list_variable_attributes(varid) - for key in prepLIST: - if(key == "comment"): - continue - # Is this attritue in file? - if(key in self.dictVars.keys()): - # Verify that attribute value is equal to file attribute - table_value = prepLIST[key] - file_value = self.dictVars[key] - if isinstance(table_value, numpy.ndarray): - table_value = table_value[0] - if isinstance(file_value, numpy.ndarray): - file_value = file_value[0] - - if isinstance(table_value, float): - if(table_value / file_value < 1.1): - table_value = file_value - - if key == "cell_methods": - idx = file_value.find(" (interval:") - file_value = file_value[:idx] - table_value = table_value[:idx] - - file_value = str(file_value) - table_value = str(table_value) - if table_value != file_value: - print bcolors.FAIL - print "=====================================================================================" - print "You file contains \"" + key + "\":\"" + str(file_value) + "\" and" - print "CMIP6 tables requires \"" + key + "\":\"" + str(table_value) + "\"." - print "=====================================================================================" - print bcolors.ENDC - cmip6_cv.set_CV_Error() - else: - # That attribute is not in the file - table_value = prepLIST[key] - if isinstance(table_value, numpy.ndarray): - table_value = table_value[0] - if isinstance(table_value, float): - table_value = "{0:.2g}".format(table_value) - print bcolors.FAIL - print "=====================================================================================" - print "CMIP6 variable " + self.var[0] + " requires \"" + key + "\":\"" + str(table_value) + "\"." - print "=====================================================================================" - print bcolors.ENDC - cmip6_cv.set_CV_Error() - - - if(cmip6_cv.get_CV_Error()): - raise KeyboardInterrupt - print bcolors.OKGREEN - print "*************************************************************************************" - print "* This file is compliant with the CMIP6 specification and can be published in ESGF. *" - print "*************************************************************************************" - print bcolors.ENDC - - -# ========================= -# main() -# ========================= -def main(): - parser = argparse.ArgumentParser(prog='PrePARE', - description='Validate CMIP6 file ' - 'for ESGF publication.') - - parser.add_argument('--variable', - help='specify geophysical variable name') - - parser.add_argument('cmip6_table', - help='CMIP6 CMOR table (JSON file) ex: Tables/CMIP6_Amon.json', - action=JSONAction) - - parser.add_argument('infile', - help='Input CMIP6 netCDF file to Validate ex: clisccp_cfMon_DcppC22_NICAM_gn_200001-200001.nc', - action=CDMSAction) - - parser.add_argument('outfile', - nargs='?', - help='Output file (default stdout)', - type=argparse.FileType('w'), - default=sys.stdout) - - try: - args = parser.parse_args() - except argparse.ArgumentTypeError as errmsg: - print >> sys.stderr, str(errmsg) - return 1 - except SystemExit: - return 1 - - process = checkCMIP6(args) - process.ControlVocab() - -# process.checkActivities() - return(0) - - -if(__name__ == '__main__'): - try: - sys.exit(main()) - - except KeyboardInterrupt: - print bcolors.FAIL - print "!!!!!!!!!!!!!!!!!!!!!!!!!" - print "! Error: The input file is not CMIP6 compliant" - print "! Check your file or use CMOR 3.x to achieve compliance for ESGF publication." - print "!!!!!!!!!!!!!!!!!!!!!!!!!" - print bcolors.ENDC - sys.exit(-1) - except: - sys.exit(-1) diff --git a/scripts/conda_upload.sh b/scripts/conda_upload.sh new file mode 100755 index 00000000..e7d47473 --- /dev/null +++ b/scripts/conda_upload.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +PKG_NAME=cmor +USER=pcmdi +echo "Trying to upload conda" +if [ `uname` == "Linux" ]; then + OS=linux-64 + echo "Linux OS" + export PATH="$HOME/miniconda2/bin:$PATH" + conda update -y -q conda +else + echo "Mac OS" + OS=osx-64 +fi + +mkdir ~/conda-bld +conda install -q anaconda-client conda-build +conda config --set anaconda_upload no +binstar config --set verify_ssl False +export CONDA_BLD_PATH=${HOME}/conda-bld +export VERSION=`date +%Y.%m.%d` +export UVCDAT_ANONYMOUS_LOG=no +echo "Cloning recipes" +git clone git://github.com/UV-CDAT/conda-recipes +cd conda-recipes +cmorversion=`echo $1 | cut -d- -f2` +python ./prep_for_build.py -v `date +%Y.%m.%d`.${cmorversion} -b $1 +echo "Building now" +conda build -c conda-forge -c uvcdat/label/nightly -c uvcdat --numpy=1.12 cmor +anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l nightly $CONDA_BLD_PATH/$OS/$PKG_NAME-`date +%Y.%m.%d`.${cmorversion}-np112py27_0.tar.bz2 --force +conda build -c conda-forge -c uvcdat/label/nightly -c uvcdat --numpy=1.11 cmor +anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l nightly $CONDA_BLD_PATH/$OS/$PKG_NAME-`date +%Y.%m.%d`.${cmorversion}-np111py27_0.tar.bz2 --force +conda build -c conda-forge -c uvcdat/label/nightly -c uvcdat --numpy=1.10 cmor +anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l nightly $CONDA_BLD_PATH/$OS/$PKG_NAME-`date +%Y.%m.%d`.${cmorversion}-np110py27_0.tar.bz2 --force +conda build -c conda-forge -c uvcdat/label/nightly -c uvcdat --numpy=1.9 cmor +anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l nightly $CONDA_BLD_PATH/$OS/$PKG_NAME-`date +%Y.%m.%d`.${cmorversion}-np19py27_0.tar.bz2 --force + diff --git a/scripts/createCMIP6CV.py b/scripts/createCMIP6CV.py index e5c510e6..5ccb9fce 100644 --- a/scripts/createCMIP6CV.py +++ b/scripts/createCMIP6CV.py @@ -21,6 +21,7 @@ "CMIP6_table_id.json", "CMIP6_license.json", "mip_era.json", + "CMIP6_sub_experiment_id.json", "CMIP6_experiment_id.json" ] # Github repository with CMIP6 related Control Vocabulary files @@ -31,13 +32,28 @@ class readWCRP(): def __init__(self): pass + def createSource(self,myjson): + root = myjson['source_id'] + for key in root.keys(): + root[key]['source']=root[key]['label'] + ' (' + root[key]['release_year'] + '): ' + chr(10) + for realm in root[key]['model_component'].keys(): + if( root[key]['model_component'][realm]['description'].find('None') == -1): + root[key]['source'] += realm + ': ' + root[key]['source'] += root[key]['model_component'][realm]['description'] + chr(10) + root[key]['source'] = root[key]['source'].rstrip() + del root[key]['label'] + del root[key]['release_year'] + del root[key]['label_extended'] + del root[key]['model_component'] def readGit(self): Dico = OrderedDict() for file in filelist: url = githubRepo + file response = urllib.urlopen(url) print url - myjson = json.loads(response.read()) + myjson = json.loads(response.read(), object_pairs_hook=OrderedDict) + if(file == 'CMIP6_source_id.json'): + self.createSource(myjson) Dico = OrderedDict(Dico.items() + myjson.items()) finalDico = OrderedDict() @@ -49,20 +65,24 @@ def run(): gather = readWCRP() CV = gather.readGit() regexp = {} - regexp["variant_label"] = [ "^r[[:digit:]]\\{1,\\}i[[:digit:]]\\{1,\\}p[[:digit:]]\\{1,\\}f[[:digit:]]\\{1,\\}$" ] - regexp["sub_experiment_id"] = [ "^s[[:digit:]]\\{4,4\\}$", "None" ] + regexp["variant_label"] = ["r[[:digit:]]\\{1,\\}i[[:digit:]]\\{1,\\}p[[:digit:]]\\{1,\\}f[[:digit:]]\\{1,\\}$" ] + regexp["tracking_id"] = [ "hdl:21.14100/.*" ] - regexp["product"] = [ "output" ] 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["license"] = [ - "CMIP6 model data produced by .* is licensed under a Creative Commons Attribution \"Share Alike\" 4.0 International License (http://creativecommons.org/licenses/by/4.0/). Use of the data must be acknowledged following guidelines found at.* Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in data files). The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law." - ], + regexp["product"] = [ "model-output" ] + regexp["Conventions"] = [ "^CF-1.7 CMIP-6.0\\( UGRID-1.0\\)\\{0,\\}$" ] + regexp["realization_index"] = [ "^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$" ] + regexp["physics_index"] = [ "^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$" ] + regexp["forcing_index"] = [ "^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$" ] + regexp["initialization_index"] = [ "^\\[\\{0,\\}[[:digit:]]\\{1,\\}\\]\\{0,\\}$" ] + regexp["data_specs_version"] = [ "^[[:digit:]]\\{2,2\\}\\.[[:digit:]]\\{2,2\\}\\.[[:digit:]]\\{2,2\\}$" ] + regexp["license"] = [ "^CMIP6 model data produced by .* is licensed under a Creative Commons Attribution.*ShareAlike 4.0 International License (https://creativecommons.org/licenses)\\. Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment\\. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) .*\\. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose\\. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law\\.$" ] + CV['CV'] = OrderedDict(CV['CV'].items() + regexp.items()) f.write(json.dumps(CV, indent=4, separators=(',', ':'), sort_keys=False) ) - f.close() if __name__ == '__main__': diff --git a/setup.py.in b/setup.py.in index 8df555f3..5fc68908 100755 --- a/setup.py.in +++ b/setup.py.in @@ -3,6 +3,7 @@ import numpy from numpy.distutils.core import setup, Extension #from numpy.distutils.ccompiler import CCompiler import os,sys,string +from setuptools import setup, Extension include_dirs = [numpy.lib.utils.get_include(),"include","include/cdTime","include/json-c"] @@ -53,9 +54,10 @@ setup (name = "CMOR", author='Denis Nadeau, AIMS', description = "Python Interface to CMOR output library", url = "http://cmor.llnl.gov/", - packages = ['cmor', 'cmip6_cv', 'cmor.Test' ], - package_dir = {'cmor': 'Lib', 'cmip6_cv': 'LibCV', 'cmor.Test':'Test'}, - scripts=['scripts/PrePARE.py' ], + zip_safe=False, + packages = ['cmor', 'cmip6_cv', 'cmor.Test', 'cmip6_cv.PrePARE' ], + package_dir = {'cmor': 'Lib', 'cmip6_cv': 'LibCV', 'cmor.Test':'Test', 'cmip6_cv.PrePARE':'LibCV/PrePARE'}, +# scripts=['scripts/PrePARE.py' ], ext_modules = [ Extension('cmor._cmor', srcfiles, @@ -73,7 +75,10 @@ setup (name = "CMOR", define_macros = macros, extra_compile_args = [ "-DgFortran"] ), - ] + ], + entry_points = { + 'console_scripts':['PrePARE=cmip6_cv.PrePARE:main'], + } )