├── .codecov.yml ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE.md └── workflows │ ├── python-package.yml │ ├── release_climt.yml │ ├── release_climt_windows.yml │ └── windows-package.yml ├── .gitignore ├── .travis.yml ├── AUTHORS.rst ├── CONTRIBUTING.rst ├── HISTORY.rst ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.rst ├── appveyor.yml ├── climt ├── __init__.py ├── _components │ ├── __init__.py │ ├── _berger_solar_insolation.pyx │ ├── berger_solar_insolation.py │ ├── bucket_hydrology │ │ ├── __init__.py │ │ └── component.py │ ├── dcmip │ │ ├── DCMIP-TestCaseDocument_v1.7.pdf │ │ ├── __init__.py │ │ ├── _dcmip.pyx │ │ └── component.py │ ├── dry_convection │ │ ├── __init__.py │ │ └── component.py │ ├── emanuel │ │ ├── __init__.py │ │ ├── _emanuel_convection.pyx │ │ ├── component.py │ │ ├── convect_history.pdf │ │ ├── essentials.txt │ │ └── reference.pdf │ ├── grid_scale_condensation.py │ ├── held_suarez.py │ ├── instellation │ │ ├── __init__.py │ │ └── component.py │ ├── radiation.py │ ├── rrtmg │ │ ├── __init__.py │ │ ├── lw │ │ │ ├── __init__.py │ │ │ ├── _rrtmg_lw.pyx │ │ │ └── component.py │ │ ├── rrtmg_common.py │ │ └── sw │ │ │ ├── README │ │ │ ├── __init__.py │ │ │ ├── _rrtmg_sw.pyx │ │ │ └── component.py │ ├── second_best │ │ ├── BEST-Description.pdf │ │ └── __init__.py │ ├── simple_physics │ │ ├── __init__.py │ │ ├── _simple_physics.pyx │ │ └── component.py │ ├── slab_surface.py │ └── surface_ice.py ├── _core │ ├── __init__.py │ ├── constants.py │ ├── initialization.py │ └── util.py ├── _data │ ├── __init__.py │ └── ozone_profile.npy └── _lib │ ├── Darwin │ └── .temp │ ├── Linux │ └── .temp │ ├── Makefile │ ├── Windows │ └── .temp │ ├── dcmip │ ├── Makefile │ ├── dcmip_initial_conditions_test_1_2_3_v5.f90 │ ├── dcmip_initial_conditions_test_4_v3.f90 │ └── dcmip_initial_conditions_test_5_v1.f90 │ ├── emanuel │ ├── Makefile │ └── convect43c.f90 │ ├── rrtmg_lw │ ├── Makefile │ ├── mcica_random_numbers.f90 │ ├── mcica_subcol_gen_lw.f90 │ ├── parkind.f90 │ ├── parrrtm.f90 │ ├── rrlw_cld.f90 │ ├── rrlw_con.f90 │ ├── rrlw_kg01.f90 │ ├── rrlw_kg02.f90 │ ├── rrlw_kg03.f90 │ ├── rrlw_kg04.f90 │ ├── rrlw_kg05.f90 │ ├── rrlw_kg06.f90 │ ├── rrlw_kg07.f90 │ ├── rrlw_kg08.f90 │ ├── rrlw_kg09.f90 │ ├── rrlw_kg10.f90 │ ├── rrlw_kg11.f90 │ ├── rrlw_kg12.f90 │ ├── rrlw_kg13.f90 │ ├── rrlw_kg14.f90 │ ├── rrlw_kg15.f90 │ ├── rrlw_kg16.f90 │ ├── rrlw_ncpar.f90 │ ├── rrlw_ref.f90 │ ├── rrlw_tbl.f90 │ ├── rrlw_vsn.f90 │ ├── rrlw_wvn.f90 │ ├── rrtmg_lw_c_binder.f90 │ ├── rrtmg_lw_cldprmc.f90 │ ├── rrtmg_lw_cldprop.f90 │ ├── rrtmg_lw_init.f90 │ ├── rrtmg_lw_k_g.f90 │ ├── rrtmg_lw_rad.f90 │ ├── rrtmg_lw_rad.nomcica.f90 │ ├── rrtmg_lw_read_nc.f90 │ ├── rrtmg_lw_rtrn.f90 │ ├── rrtmg_lw_rtrnmc.f90 │ ├── rrtmg_lw_rtrnmr.f90 │ ├── rrtmg_lw_setcoef.f90 │ ├── rrtmg_lw_taumol.f90 │ └── setup.py │ ├── rrtmg_sw │ ├── Makefile │ ├── README │ ├── mcica_random_numbers.f90 │ ├── mcica_subcol_gen_sw.f90 │ ├── parkind.f90 │ ├── parrrsw.f90 │ ├── rrsw_aer.f90 │ ├── rrsw_cld.f90 │ ├── rrsw_con.f90 │ ├── rrsw_kg16.f90 │ ├── rrsw_kg17.f90 │ ├── rrsw_kg18.f90 │ ├── rrsw_kg19.f90 │ ├── rrsw_kg20.f90 │ ├── rrsw_kg21.f90 │ ├── rrsw_kg22.f90 │ ├── rrsw_kg23.f90 │ ├── rrsw_kg24.f90 │ ├── rrsw_kg25.f90 │ ├── rrsw_kg26.f90 │ ├── rrsw_kg27.f90 │ ├── rrsw_kg28.f90 │ ├── rrsw_kg29.f90 │ ├── rrsw_ncpar.f90 │ ├── rrsw_ref.f90 │ ├── rrsw_tbl.f90 │ ├── rrsw_vsn.f90 │ ├── rrsw_wvn.f90 │ ├── rrtmg_sw_c_binder.f90 │ ├── rrtmg_sw_cldprmc.f90 │ ├── rrtmg_sw_cldprop.f90 │ ├── rrtmg_sw_init.f90 │ ├── rrtmg_sw_k_g.f90 │ ├── rrtmg_sw_rad.f90 │ ├── rrtmg_sw_rad.nomcica.f90 │ ├── rrtmg_sw_reftra.f90 │ ├── rrtmg_sw_setcoef.f90 │ ├── rrtmg_sw_spcvmc.f90 │ ├── rrtmg_sw_spcvrt.f90 │ ├── rrtmg_sw_taumol.f90 │ ├── rrtmg_sw_vrtqdr.f90 │ └── setup.py │ └── simple_physics │ ├── Makefile │ ├── simple_physics_custom.f90 │ └── simple_physics_v5_1.f90 ├── climt_release_checks.txt ├── docs ├── .ipynb_checkpoints │ └── Description_of_SecondBEST-checkpoint.ipynb ├── Description_of_SecondBEST.ipynb ├── Implicit_Scheme_Derivation.ipynb ├── Makefile ├── authors.rst ├── climt.rst ├── climt_logo.jpg ├── component_manual.rst ├── component_types.rst ├── components.rst ├── conf.py ├── configuration.rst ├── contributing.rst ├── history.rst ├── ice_cloud_optical_depth.png ├── index.rst ├── initialisation.rst ├── installation.rst ├── interaction.rst ├── introduction.rst ├── liquid_cloud_optical_depth.png ├── make.bat ├── memory_management.rst ├── modules.rst ├── naming.rst ├── quickstart.rst ├── readme.rst ├── realistic.rst ├── rrtmg_clouds.rst └── utilities.rst ├── examples ├── baroclinic_wave.py ├── column_code_with_slab.py ├── full_radiation_gcm_energy_balanced.py ├── full_radiation_with_insolation_gcm.py ├── gmd_aquaplanet.py ├── gmd_radiative_convective.py ├── grey_gcm.py ├── grey_gcm_energy_balanced.py ├── held_suarez.py ├── ice_sheet.py ├── molecule_density_profiles ├── molecule_profiles.npz ├── ozone_profile.npy ├── radiative_equilibrium.py ├── radiative_equilibrium_rrtmg.py ├── radiative_equilibrium_rrtmg_realistic_profiles.py ├── radiative_heating_rrtmg_clouds.py ├── simple_physics_example.py ├── thermodynamic_profiles ├── thermodynamic_profiles.npz └── zenith_angle.py ├── readthedocs.yml ├── requirements_dev.txt ├── setup.cfg ├── setup.py ├── tests ├── __init__.py ├── cached_component_output │ ├── TestBergerSolarInsolation-3d-0.cache │ ├── TestBergerSolarInsolation-column-0.cache │ ├── TestBucketHydrology-3d-0.cache │ ├── TestBucketHydrology-3d-1.cache │ ├── TestBucketHydrology-column-0.cache │ ├── TestBucketHydrology-column-1.cache │ ├── TestDcmip-3d-0.cache │ ├── TestDcmip-column-0.cache │ ├── TestDryConvection-3d-0.cache │ ├── TestDryConvection-3d-1.cache │ ├── TestDryConvection-column-0.cache │ ├── TestDryConvection-column-1.cache │ ├── TestEmanuel-3d-0.cache │ ├── TestEmanuel-3d-1.cache │ ├── TestEmanuel-3d_stepping-0.cache │ ├── TestEmanuel-3d_stepping-1.cache │ ├── TestEmanuel-column-0.cache │ ├── TestEmanuel-column-1.cache │ ├── TestEmanuel-column_stepping-0.cache │ ├── TestEmanuel-column_stepping-1.cache │ ├── TestFrierson06LongwaveOpticalDepth-3d-0.cache │ ├── TestFrierson06LongwaveOpticalDepth-column-0.cache │ ├── TestFullMoistGFSDycoreWithPhysics-3d-0.cache │ ├── TestFullMoistGFSDycoreWithPhysics-3d-1.cache │ ├── TestGFSDycore-3d-0.cache │ ├── TestGFSDycore-3d-1.cache │ ├── TestGFSDycoreWithDcmipInitialConditions-3d-0.cache │ ├── TestGFSDycoreWithDcmipInitialConditions-3d-1.cache │ ├── TestGFSDycoreWithGrayLongwaveRadiation-3d-0.cache │ ├── TestGFSDycoreWithGrayLongwaveRadiation-3d-1.cache │ ├── TestGFSDycoreWithHeldSuarez-3d-0.cache │ ├── TestGFSDycoreWithHeldSuarez-3d-1.cache │ ├── TestGFSDycoreWithImplicitTendency-3d-0.cache │ ├── TestGFSDycoreWithImplicitTendency-3d-1.cache │ ├── TestGFSDycoreWithRRTMGLongwave-3d-0.cache │ ├── TestGFSDycoreWithRRTMGLongwave-3d-1.cache │ ├── TestGrayLongwaveRadiation-3d-0.cache │ ├── TestGrayLongwaveRadiation-3d-1.cache │ ├── TestGrayLongwaveRadiation-3d_stepping-0.cache │ ├── TestGrayLongwaveRadiation-3d_stepping-1.cache │ ├── TestGrayLongwaveRadiation-column-0.cache │ ├── TestGrayLongwaveRadiation-column-1.cache │ ├── TestGrayLongwaveRadiation-column_stepping-0.cache │ ├── TestGrayLongwaveRadiation-column_stepping-1.cache │ ├── TestGridScaleCondensation-3d-0.cache │ ├── TestGridScaleCondensation-3d-1.cache │ ├── TestGridScaleCondensation-column-0.cache │ ├── TestGridScaleCondensation-column-1.cache │ ├── TestHeldSuarez-3d-0.cache │ ├── TestHeldSuarez-3d-1.cache │ ├── TestHeldSuarez-3d_stepping-0.cache │ ├── TestHeldSuarez-3d_stepping-1.cache │ ├── TestHeldSuarez-column-0.cache │ ├── TestHeldSuarez-column-1.cache │ ├── TestHeldSuarez-column_stepping-0.cache │ ├── TestHeldSuarez-column_stepping-1.cache │ ├── TestIceSheet-3d-0.cache │ ├── TestIceSheet-3d-1.cache │ ├── TestIceSheet-column-0.cache │ ├── TestIceSheet-column-1.cache │ ├── TestIceSheetLand-3d-0.cache │ ├── TestIceSheetLand-3d-1.cache │ ├── TestIceSheetLand-column-0.cache │ ├── TestIceSheetLand-column-1.cache │ ├── TestInstellation-3d-0.cache │ ├── TestInstellation-column-0.cache │ ├── TestRRTMGLongwave-3d-0.cache │ ├── TestRRTMGLongwave-3d-1.cache │ ├── TestRRTMGLongwave-3d_stepping-0.cache │ ├── TestRRTMGLongwave-3d_stepping-1.cache │ ├── TestRRTMGLongwave-column-0.cache │ ├── TestRRTMGLongwave-column-1.cache │ ├── TestRRTMGLongwave-column_stepping-0.cache │ ├── TestRRTMGLongwave-column_stepping-1.cache │ ├── TestRRTMGLongwaveMCICA-3d-0.cache │ ├── TestRRTMGLongwaveMCICA-3d-1.cache │ ├── TestRRTMGLongwaveMCICA-3d_stepping-0.cache │ ├── TestRRTMGLongwaveMCICA-3d_stepping-1.cache │ ├── TestRRTMGLongwaveMCICA-column-0.cache │ ├── TestRRTMGLongwaveMCICA-column-1.cache │ ├── TestRRTMGLongwaveMCICA-column_stepping-0.cache │ ├── TestRRTMGLongwaveMCICA-column_stepping-1.cache │ ├── TestRRTMGLongwaveWithClouds-3d-0.cache │ ├── TestRRTMGLongwaveWithClouds-3d-1.cache │ ├── TestRRTMGLongwaveWithClouds-3d_stepping-0.cache │ ├── TestRRTMGLongwaveWithClouds-3d_stepping-1.cache │ ├── TestRRTMGLongwaveWithClouds-column-0.cache │ ├── TestRRTMGLongwaveWithClouds-column-1.cache │ ├── TestRRTMGLongwaveWithClouds-column_stepping-0.cache │ ├── TestRRTMGLongwaveWithClouds-column_stepping-1.cache │ ├── TestRRTMGLongwaveWithExternalInterfaceTemperature-3d-0.cache │ ├── TestRRTMGLongwaveWithExternalInterfaceTemperature-3d-1.cache │ ├── TestRRTMGLongwaveWithExternalInterfaceTemperature-3d_stepping-0.cache │ ├── TestRRTMGLongwaveWithExternalInterfaceTemperature-3d_stepping-1.cache │ ├── TestRRTMGLongwaveWithExternalInterfaceTemperature-column-0.cache │ ├── TestRRTMGLongwaveWithExternalInterfaceTemperature-column-1.cache │ ├── TestRRTMGLongwaveWithExternalInterfaceTemperature-column_stepping-0.cache │ ├── TestRRTMGLongwaveWithExternalInterfaceTemperature-column_stepping-1.cache │ ├── TestRRTMGShortwave-3d-0.cache │ ├── TestRRTMGShortwave-3d-1.cache │ ├── TestRRTMGShortwave-3d_stepping-0.cache │ ├── TestRRTMGShortwave-3d_stepping-1.cache │ ├── TestRRTMGShortwave-column-0.cache │ ├── TestRRTMGShortwave-column-1.cache │ ├── TestRRTMGShortwave-column_stepping-0.cache │ ├── TestRRTMGShortwave-column_stepping-1.cache │ ├── TestRRTMGShortwaveMCICA-3d-0.cache │ ├── TestRRTMGShortwaveMCICA-3d-1.cache │ ├── TestRRTMGShortwaveMCICA-3d_stepping-0.cache │ ├── TestRRTMGShortwaveMCICA-3d_stepping-1.cache │ ├── TestRRTMGShortwaveMCICA-column-0.cache │ ├── TestRRTMGShortwaveMCICA-column-1.cache │ ├── TestRRTMGShortwaveMCICA-column_stepping-0.cache │ ├── TestRRTMGShortwaveMCICA-column_stepping-1.cache │ ├── TestSimplePhysics-3d-0.cache │ ├── TestSimplePhysics-3d-1.cache │ ├── TestSimplePhysics-column-0.cache │ ├── TestSimplePhysics-column-1.cache │ ├── TestSimplePhysicsImplicitPrognostic-3d-0.cache │ ├── TestSimplePhysicsImplicitPrognostic-3d-1.cache │ ├── TestSimplePhysicsImplicitPrognostic-3d_stepping-0.cache │ ├── TestSimplePhysicsImplicitPrognostic-3d_stepping-1.cache │ ├── TestSimplePhysicsImplicitPrognostic-column-0.cache │ ├── TestSimplePhysicsImplicitPrognostic-column-1.cache │ ├── TestSimplePhysicsImplicitPrognostic-column_stepping-0.cache │ ├── TestSimplePhysicsImplicitPrognostic-column_stepping-1.cache │ ├── TestSlabSurface-3d-0.cache │ ├── TestSlabSurface-3d-1.cache │ ├── TestSlabSurface-3d_stepping-0.cache │ ├── TestSlabSurface-3d_stepping-1.cache │ ├── TestSlabSurface-column-0.cache │ ├── TestSlabSurface-column-1.cache │ ├── TestSlabSurface-column_stepping-0.cache │ └── TestSlabSurface-column_stepping-1.cache ├── test_bucket_hydrology.py ├── test_components.py ├── test_conservation.py ├── test_initialization.py └── test_utils.py ├── tox.ini └── travis_pypi_setup.py /.codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "climt/**/setup.py" 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 4 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | charset = utf-8 11 | end_of_line = lf 12 | 13 | [*.bat] 14 | indent_style = tab 15 | end_of_line = crlf 16 | 17 | [LICENSE] 18 | insert_final_newline = false 19 | 20 | [Makefile] 21 | indent_style = tab 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | * CliMT version: 2 | * Python version: 3 | * Operating System: 4 | 5 | ### Description 6 | 7 | Describe what you were trying to get done. 8 | Tell us what happened, what went wrong, and what you expected to happen. 9 | 10 | ### What I Did 11 | 12 | ``` 13 | Paste the command(s) you ran and the output. 14 | If there was a crash, please include the traceback here. 15 | ``` 16 | -------------------------------------------------------------------------------- /.github/workflows/python-package.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install Python dependencies, run tests and lint with a variety of Python versions 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions 3 | 4 | name: Python package 5 | 6 | on: 7 | push: 8 | branches: [ master, without-dycore ] 9 | pull_request: 10 | branches: [ master, develop ] 11 | 12 | jobs: 13 | build: 14 | runs-on: ${{ matrix.os }} 15 | strategy: 16 | matrix: 17 | os: [ubuntu-20.04, macos-11] 18 | python-version: [py37, py38, py39, py310] 19 | steps: 20 | - uses: actions/checkout@v2 21 | - name: Set up Python 37 22 | if: ${{ matrix.python-version == 'py37' }} 23 | uses: actions/setup-python@v2 24 | with: 25 | python-version: "3.7" 26 | - name: Set up Python 38 27 | if: ${{ matrix.python-version == 'py38' }} 28 | uses: actions/setup-python@v2 29 | with: 30 | python-version: "3.8" 31 | - name: Set up Python 39 32 | if: ${{ matrix.python-version == 'py39' }} 33 | uses: actions/setup-python@v2 34 | with: 35 | python-version: "3.9" 36 | - name: Set up Python 310 37 | if: ${{ matrix.python-version == 'py310' }} 38 | uses: actions/setup-python@v2 39 | with: 40 | python-version: "3.10" 41 | 42 | - name: Install dependencies 43 | run: | 44 | python -m pip install --upgrade pip 45 | python -m pip install wheel tox 46 | if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi 47 | - name: Lint with flake8 48 | run: | 49 | # stop the build if there are Python syntax errors or undefined names 50 | flake8 --ignore=E501,E226,W504,W605 climt/ --count --show-source --statistics 51 | - name: Build climt 52 | run: | 53 | if [ "$RUNNER_OS" == "Linux" ]; then 54 | gfortran --version 55 | CLIMT_ARCH=Linux tox -e ${{ matrix.python-version }} 56 | elif [ "$RUNNER_OS" == "macOS" ]; then 57 | # which gcc #/usr/bin/gcc 58 | # which gfortran 59 | CLIMT_ARCH=Darwin tox -e ${{ matrix.python-version }} 60 | else 61 | echo "$RUNNER_OS not supported" 62 | exit 1 63 | fi 64 | shell: bash 65 | -------------------------------------------------------------------------------- /.github/workflows/release_climt_windows.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install compilers and packges on windows platform 2 | 3 | name: windows package 4 | 5 | on: 6 | release: 7 | types: [published] 8 | 9 | jobs: 10 | windows_package: 11 | runs-on: windows-2019 12 | defaults: 13 | run: 14 | shell: bash -l {0} 15 | strategy: 16 | matrix: 17 | python-version: ["3.6","3.7", "3.8"] 18 | steps: 19 | - uses: actions/checkout@v2 20 | - uses: conda-incubator/setup-miniconda@v2 21 | with: 22 | auto-update-conda: true 23 | python-version: ${{ matrix.python-version }} 24 | - shell: bash -l {0} 25 | run: | 26 | export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ 27 | export CLIMT_OPT_FLAGS=-fno-asynchronous-unwind-tables 28 | conda activate test 29 | which python 30 | conda install -c msys2 m2w64-gcc m2w64-gcc-fortran m2w64-winpthreads-git m2w64-openblas 31 | conda install libpython 32 | which gcc 33 | which gfortran 34 | cp $COMPILER_PATH/x86_64-w64-mingw32-gcc-ar.exe $COMPILER_PATH/x86_64-w64-mingw32-ar.exe 35 | printf '[build]\r\ncompiler=mingw32\r\n' > $HOME/pydistutils.cfg 36 | ls $HOME; cat $HOME/pydistutils.cfg 37 | python -m pip install -r requirements_dev.txt 38 | touch libmsvcr140.dll 39 | cp /c/Miniconda/envs/test/Library/bin/vcruntime140.dll /c/Miniconda/envs/test/Library/bin/msvcr140.dll 40 | ls -l 41 | python setup.py develop 42 | py.test -v 43 | 44 | - if: ${{ matrix.python-version == '3.6' }} 45 | run: | 46 | export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ 47 | python setup.py sdist 48 | 49 | - if: ${{ github.event_name == 'release' }} 50 | env: 51 | TWINE_USERNAME: __token__ 52 | TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} 53 | run: | 54 | export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ 55 | export CLIMT_OPT_FLAGS=-fno-asynchronous-unwind-tables 56 | python setup.py bdist_wheel 57 | python -m pip install twine 58 | twine upload dist/* 59 | -------------------------------------------------------------------------------- /.github/workflows/windows-package.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install compilers and packges on windows platform 2 | 3 | name: windows package 4 | 5 | on: 6 | push: 7 | branches: [ master, without-dycore ] 8 | pull_request: 9 | branches: [ master ] 10 | 11 | jobs: 12 | windows_package: 13 | runs-on: windows-2019 14 | defaults: 15 | run: 16 | shell: bash -l {0} 17 | strategy: 18 | matrix: 19 | python-version: ["3.7"] 20 | steps: 21 | - uses: actions/checkout@v2 22 | - uses: conda-incubator/setup-miniconda@v2 23 | with: 24 | auto-update-conda: true 25 | python-version: ${{ matrix.python-version }} 26 | - shell: bash -l {0} 27 | run: | 28 | export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ 29 | export CLIMT_OPT_FLAGS=-fno-asynchronous-unwind-tables 30 | conda activate test 31 | which python 32 | conda install -c msys2 m2w64-gcc m2w64-gcc-fortran m2w64-winpthreads-git m2w64-openblas 33 | conda install libpython 34 | which gcc 35 | which gfortran 36 | cp $COMPILER_PATH/x86_64-w64-mingw32-gcc-ar.exe $COMPILER_PATH/x86_64-w64-mingw32-ar.exe 37 | printf '[build]\r\ncompiler=mingw32\r\n' > $HOME/pydistutils.cfg 38 | ls $HOME; cat $HOME/pydistutils.cfg 39 | python -m pip install -r requirements_dev.txt 40 | touch libmsvcr140.dll 41 | cp /c/Miniconda/envs/test/Library/bin/vcruntime140.dll /c/Miniconda/envs/test/Library/bin/msvcr140.dll 42 | ls -l 43 | python setup.py develop 44 | py.test -v 45 | 46 | - if: ${{ github.event_name == 'release' }} 47 | env: 48 | TWINE_USERNAME: __token__ 49 | TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} 50 | run: | 51 | export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ 52 | export CLIMT_OPT_FLAGS=-fno-asynchronous-unwind-tables 53 | python setup.py bdist_wheel 54 | python setup.py sdist 55 | python -m pip install twine 56 | twine upload dist/* 57 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IDE config 2 | .idea/ 3 | 4 | # Byte-compiled / optimized / DLL files 5 | __pycache__/ 6 | *.py[cod] 7 | *$py.class 8 | 9 | # C extensions 10 | *.so 11 | *.c 12 | 13 | # Fortran modules 14 | *.mod 15 | *.o 16 | *.a 17 | 18 | # Vim files 19 | *.swp 20 | 21 | # Distribution / packaging 22 | .Python 23 | env/ 24 | build/ 25 | develop-eggs/ 26 | dist/ 27 | downloads/ 28 | eggs/ 29 | .eggs/ 30 | lib/ 31 | lib64/ 32 | parts/ 33 | sdist/ 34 | var/ 35 | *.egg-info/ 36 | .installed.cfg 37 | *.egg 38 | 39 | # PyInstaller 40 | # Usually these files are written by a python script from a template 41 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 42 | *.manifest 43 | *.spec 44 | 45 | # Installer logs 46 | pip-log.txt 47 | pip-delete-this-directory.txt 48 | 49 | # Unit test / coverage reports 50 | htmlcov/ 51 | .tox/ 52 | .coverage 53 | .coverage.* 54 | .cache 55 | nosetests.xml 56 | coverage.xml 57 | *,cover 58 | .hypothesis/ 59 | 60 | # Translations 61 | *.mo 62 | *.pot 63 | 64 | # Django stuff: 65 | *.log 66 | 67 | # Sphinx documentation 68 | docs/_build/ 69 | 70 | # PyBuilder 71 | target/ 72 | 73 | # pyenv python configuration file 74 | .python-version 75 | 76 | .vscode/ -------------------------------------------------------------------------------- /AUTHORS.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Credits 3 | ======= 4 | 5 | Original Creator 6 | ---------------- 7 | 8 | * Rodrigo Caballero 9 | 10 | Development Lead 11 | ---------------- 12 | 13 | * Joy Monteiro 14 | 15 | Contributors 16 | ------------ 17 | 18 | * Jeremy McGibbon 19 | * Sergey Kosukhin 20 | * Sally Dacie 21 | * Raymond Pierrehumbert 22 | * Dargan Frierson 23 | * Jonathan Mitchell 24 | * Suhas D L 25 | * Abel Shibu 26 | * Monali Vadje 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | BSD License 3 | 4 | Copyright (c) 2016, Rodrigo Caballero 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, this 14 | list of conditions and the following disclaimer in the documentation and/or 15 | other materials provided with the distribution. 16 | 17 | * Neither the name of the copyright holder nor the names of its 18 | contributors may be used to endorse or promote products derived from this 19 | software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 25 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 28 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 29 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 30 | OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | 2 | include AUTHORS.rst 3 | 4 | include CONTRIBUTING.rst 5 | include HISTORY.rst 6 | include LICENSE 7 | include README.rst 8 | recursive-include climt/_lib * 9 | recursive-include climt/_data * *.npy 10 | recursive-include tests * 11 | recursive-include climt *.py *.so *.dylib *.pyd 12 | 13 | prune climt/_lib/lib 14 | prune climt/_lib/share 15 | prune climt/_lib/include 16 | prune climt/_lib/bin 17 | prune climt/_lib/Open* 18 | prune climt/_lib/fftw* 19 | prune climt/_lib/shtns* 20 | exclude climt/_lib/.configured* 21 | exclude climt/_lib/log 22 | 23 | recursive-exclude climt *.pyc *.mod *.o *.c *.a 24 | recursive-exclude * __pycache__ 25 | prune tests/__pycache__ 26 | 27 | recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif 28 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean clean-test clean-pyc clean-build docs help 2 | .DEFAULT_GOAL := help 3 | define BROWSER_PYSCRIPT 4 | import os, webbrowser, sys 5 | try: 6 | from urllib import pathname2url 7 | except: 8 | from urllib.request import pathname2url 9 | 10 | webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) 11 | endef 12 | export BROWSER_PYSCRIPT 13 | 14 | define PRINT_HELP_PYSCRIPT 15 | import re, sys 16 | 17 | for line in sys.stdin: 18 | match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) 19 | if match: 20 | target, help = match.groups() 21 | print("%-20s %s" % (target, help)) 22 | endef 23 | export PRINT_HELP_PYSCRIPT 24 | BROWSER := python -c "$$BROWSER_PYSCRIPT" 25 | 26 | help: 27 | @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) 28 | 29 | clean: clean-build clean-pyc clean-test clean-libs ## remove all build, test, coverage and Python artifacts 30 | 31 | 32 | clean-build: ## remove build artifacts 33 | rm -fr build/ 34 | rm -fr dist/ 35 | rm -fr .eggs/ 36 | find . -name '*.egg-info' -exec rm -fr {} + 37 | find . -name '*.egg' -exec rm -f {} + 38 | 39 | clean-pyc: ## remove Python file artifacts 40 | find . -name '*.pyc' -exec rm -f {} + 41 | find . -name '*.pyo' -exec rm -f {} + 42 | find . -name '*~' -exec rm -f {} + 43 | find . -name '__pycache__' -exec rm -fr {} + 44 | 45 | clean-cython: ## remove Cython generated files 46 | find . -name '*.so' -exec rm -f {} + 47 | cd climt/_components; find . -name '*.c' -exec rm -f {} +; cd ../.. 48 | 49 | clean-libs: ## remove compiled libraries in _lib 50 | cd climt/_lib; make clean; make clean_libs; cd ../.. 51 | 52 | clean-test: ## remove test and coverage artifacts 53 | rm -fr .tox/ 54 | rm -f .coverage 55 | rm -fr htmlcov/ 56 | 57 | lint: ## check style with flake8 58 | flake8 climt tests 59 | 60 | test: ## run tests quickly with the default Python 61 | NUMBA_DISABLE_JIT=1 62 | py.test 63 | NUMBA_DISABLE_JIT=0 64 | 65 | 66 | test-all: ## run tests on every Python version with tox 67 | tox 68 | 69 | coverage: ## check code coverage quickly with the default Python 70 | coverage run --source climt -m pytest 71 | 72 | coverage report -m 73 | coverage html 74 | $(BROWSER) htmlcov/index.html 75 | 76 | docs: ## generate Sphinx HTML documentation, including API docs 77 | rm -f docs/climt.rst 78 | rm -f docs/modules.rst 79 | sphinx-apidoc -o docs/ climt 80 | $(MAKE) -C docs clean 81 | $(MAKE) -C docs html 82 | $(BROWSER) docs/_build/html/index.html 83 | 84 | servedocs: docs ## compile the docs watching for changes 85 | watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D . 86 | 87 | release: clean ## package and upload a release 88 | python setup.py sdist upload 89 | python setup.py bdist_wheel upload 90 | 91 | dist: clean ## builds source and wheel package 92 | python setup.py sdist 93 | python setup.py bdist_wheel 94 | ls -l dist 95 | 96 | install: clean ## install the package to the active Python's site-packages 97 | python setup.py install 98 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 0.9.1.{build} 2 | 3 | environment: 4 | matrix: 5 | - PYTHON_VERSION: "3.6" 6 | MINICONDA: "C:\\Miniconda36-x64" 7 | - PYTHON_VERSION: "3.7" 8 | MINICONDA: "C:\\Miniconda37-x64" 9 | 10 | platform: 11 | - x64 12 | 13 | matrix: 14 | fast_finish: true 15 | 16 | cache: 17 | - C:\projects\climt\climt\_lib\Windows -> .appveyor.yml 18 | - C:\Users\appveyor\AppData\Local\pip\ -> requirements_dev.txt 19 | 20 | install: 21 | - set PYTHON_NAME=python%PYTHON_VERSION% 22 | - set COMPILER_PATH=%MINICONDA%\\envs\\%PYTHON_NAME%\\Library\\mingw-w64\\bin\\ 23 | - set PATH=%COMPILER_PATH%;C:\msys64\usr\bin\;%MINICONDA%\Scripts;%PATH% 24 | - conda config --set always_yes yes --set changeps1 no 25 | - conda create -q --name %PYTHON_NAME% python=%PYTHON_VERSION% 26 | - activate %PYTHON_NAME% 27 | # - conda update -q conda 28 | - conda install -c msys2 m2w64-gcc m2w64-gcc-fortran m2w64-winpthreads-git m2w64-openblas 29 | - bash -c "which x86_64-w64-mingw32-gcc.exe" 30 | - bash -c "ls -l $COMPILER_PATH" 31 | - bash -c "echo $PATH" 32 | - bash -c "printf '[build]\r\ncompiler=mingw32\r\n' > $HOME/pydistutils.cfg" 33 | - bash -c "ls $HOME; cat $HOME/pydistutils.cfg" 34 | - bash -c "gcc --version" 35 | - bash -c "gfortran --version" 36 | - bash -c "x86_64-w64-mingw32-gfortran.exe --version" 37 | - bash -c "x86_64-w64-mingw32-gcc.exe --version" 38 | - bash -c "which make" 39 | - bash -c "ls -l /c/projects/climt/climt/_lib/Windows" 40 | - bash -c "cp $COMPILER_PATH/x86_64-w64-mingw32-gcc-ar.exe $COMPILER_PATH/x86_64-w64-mingw32-ar.exe" 41 | - conda install numpy==1.15.2 scipy>=0.18.1 cython>=0.25 42 | - conda install pandas 43 | - conda install libpython 44 | - python -m pip install -r requirements_dev.txt 45 | - conda upgrade pip setuptools wheel 46 | # - set COMPILER_PATH=C:\\msys64\\mingw64\\bin\\ 47 | 48 | build_script: 49 | - bash -c "cd /c/projects/climt/; python setup.py develop" 50 | # - bash -c "cd /c/projects/climt/; python setup.py build --compiler=mingw32" 51 | 52 | test_script: 53 | # - conda install pytest 54 | - bash -c "cd /c/projects/climt; py.test -v" 55 | # - bash -c "cd /c/projects/climt; find . |grep _components" 56 | 57 | after_test: 58 | # This step builds your wheels. 59 | - python.exe setup.py bdist_wheel 60 | 61 | # artifacts: 62 | # bdist_wheel puts your built wheel in the dist directory 63 | # - path: dist\*.whl 64 | 65 | on_success: 66 | # You can use this step to upload your artifacts to a public website. 67 | # See Appveyor's documentation for more details. Or you can simply 68 | # access your wheels from the Appveyor "artifacts" tab for your build. 69 | - python -m pip install -U twine 70 | - bash -c "cd /c/projects/climt; if [[ $APPVEYOR_REPO_TAG == true ]]; then python -m twine upload dist/*.whl; fi" 71 | -------------------------------------------------------------------------------- /climt/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import sympl 3 | 4 | from ._core import ( 5 | get_default_state, get_grid, mass_to_volume_mixing_ratio, 6 | get_interface_values, numpy_version_of, 7 | bolton_q_sat, bolton_dqsat_dT, calculate_q_sat, 8 | list_available_constants, set_constants_from_dict) 9 | 10 | from ._components import ( 11 | Frierson06LongwaveOpticalDepth, GrayLongwaveRadiation, HeldSuarez, 12 | GridScaleCondensation, BergerSolarInsolation, SimplePhysics, RRTMGLongwave, 13 | RRTMGShortwave, 14 | EmanuelConvection, SlabSurface, 15 | DcmipInitialConditions, IceSheet, Instellation, DryConvectiveAdjustment, BucketHydrology) 16 | 17 | 18 | sympl.set_constant('top_of_model_pressure', 20., 'Pa') 19 | 20 | __all__ = ( 21 | get_default_state, get_grid, mass_to_volume_mixing_ratio, numpy_version_of, 22 | get_interface_values, list_available_constants, 23 | set_constants_from_dict, 24 | bolton_q_sat, bolton_dqsat_dT, calculate_q_sat, 25 | Frierson06LongwaveOpticalDepth, GrayLongwaveRadiation, HeldSuarez, 26 | GridScaleCondensation, BergerSolarInsolation, SimplePhysics, RRTMGLongwave, 27 | RRTMGShortwave, 28 | EmanuelConvection, SlabSurface, DcmipInitialConditions, 29 | IceSheet, Instellation, DryConvectiveAdjustment, BucketHydrology) 30 | 31 | __version__ = '0.17.13' 32 | -------------------------------------------------------------------------------- /climt/_components/__init__.py: -------------------------------------------------------------------------------- 1 | from .radiation import Frierson06LongwaveOpticalDepth, GrayLongwaveRadiation 2 | from .held_suarez import HeldSuarez 3 | from .grid_scale_condensation import GridScaleCondensation 4 | from .berger_solar_insolation import BergerSolarInsolation 5 | from .simple_physics import SimplePhysics 6 | from .rrtmg import RRTMGLongwave, RRTMGShortwave 7 | from .emanuel import EmanuelConvection 8 | from .slab_surface import SlabSurface 9 | from .surface_ice import IceSheet 10 | from .dcmip import DcmipInitialConditions 11 | from .instellation import Instellation 12 | from .dry_convection import DryConvectiveAdjustment 13 | from .bucket_hydrology import BucketHydrology 14 | 15 | __all__ = ( 16 | Frierson06LongwaveOpticalDepth, GrayLongwaveRadiation, 17 | HeldSuarez, GridScaleCondensation, BergerSolarInsolation, SimplePhysics, 18 | RRTMGLongwave, RRTMGShortwave, EmanuelConvection, SlabSurface, 19 | DcmipInitialConditions, IceSheet, 20 | Instellation, DryConvectiveAdjustment, BucketHydrology) 21 | -------------------------------------------------------------------------------- /climt/_components/bucket_hydrology/__init__.py: -------------------------------------------------------------------------------- 1 | from .component import BucketHydrology 2 | 3 | __all__ = (BucketHydrology) 4 | -------------------------------------------------------------------------------- /climt/_components/dcmip/DCMIP-TestCaseDocument_v1.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/climt/_components/dcmip/DCMIP-TestCaseDocument_v1.7.pdf -------------------------------------------------------------------------------- /climt/_components/dcmip/__init__.py: -------------------------------------------------------------------------------- 1 | from .component import DcmipInitialConditions 2 | 3 | __all__ = (DcmipInitialConditions) 4 | -------------------------------------------------------------------------------- /climt/_components/dry_convection/__init__.py: -------------------------------------------------------------------------------- 1 | from .component import DryConvectiveAdjustment 2 | 3 | __all__ = (DryConvectiveAdjustment) 4 | -------------------------------------------------------------------------------- /climt/_components/emanuel/__init__.py: -------------------------------------------------------------------------------- 1 | from .component import EmanuelConvection 2 | 3 | __all__ = (EmanuelConvection) 4 | -------------------------------------------------------------------------------- /climt/_components/emanuel/convect_history.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/climt/_components/emanuel/convect_history.pdf -------------------------------------------------------------------------------- /climt/_components/emanuel/reference.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/climt/_components/emanuel/reference.pdf -------------------------------------------------------------------------------- /climt/_components/instellation/__init__.py: -------------------------------------------------------------------------------- 1 | from .component import Instellation 2 | 3 | __all__ = (Instellation) 4 | -------------------------------------------------------------------------------- /climt/_components/rrtmg/__init__.py: -------------------------------------------------------------------------------- 1 | from .lw import RRTMGLongwave 2 | from .sw import RRTMGShortwave 3 | 4 | __all__ = (RRTMGLongwave, RRTMGShortwave) 5 | -------------------------------------------------------------------------------- /climt/_components/rrtmg/lw/__init__.py: -------------------------------------------------------------------------------- 1 | from .component import RRTMGLongwave 2 | 3 | __all__ = (RRTMGLongwave) 4 | -------------------------------------------------------------------------------- /climt/_components/rrtmg/rrtmg_common.py: -------------------------------------------------------------------------------- 1 | """ 2 | Dictionary mapping input options of RRTMG radiative 3 | components to integers accepted by the RRTMG fortran 4 | code 5 | """ 6 | rrtmg_cloud_overlap_method_dict = { 7 | 'clear_only': 0, 8 | 'random': 1, 9 | 'maximum_random': 2, 10 | 'maximum': 3 11 | } 12 | 13 | """ 14 | Dictionary mapping input options of RRTMG radiative 15 | components to integers accepted by the RRTMG fortran 16 | code 17 | """ 18 | rrtmg_cloud_props_dict = { 19 | 'direct_input': 0, 20 | 'single_cloud_type': 1, 21 | 'liquid_and_ice_clouds': 2 22 | } 23 | 24 | """ 25 | Dictionary mapping input options of RRTMG radiative 26 | components to integers accepted by the RRTMG fortran 27 | code 28 | """ 29 | rrtmg_cloud_ice_props_dict = { 30 | 'ebert_curry_one': 0, 31 | 'ebert_curry_two': 1, 32 | 'key_streamer_manual': 2, 33 | 'fu': 3 34 | } 35 | 36 | """ 37 | Dictionary mapping input options of RRTMG radiative 38 | components to integers accepted by the RRTMG fortran 39 | code 40 | """ 41 | rrtmg_cloud_liquid_props_dict = { 42 | 'radius_independent_absorption': 0, 43 | 'radius_dependent_absorption': 1 44 | } 45 | 46 | """ 47 | Dictionary mapping input options of RRTMG radiative 48 | components to integers accepted by the RRTMG fortran 49 | code 50 | """ 51 | rrtmg_aerosol_input_dict = { 52 | 'no_aerosol': 0, 53 | 'ecmwf': 6, 54 | 'all_aerosol_properties': 10 55 | } 56 | 57 | """ 58 | Dictionary mapping input options of RRTMG radiative 59 | components to integers accepted by the RRTMG fortran 60 | code 61 | """ 62 | rrtmg_random_number_dict = { 63 | 'kissvec': 0, 64 | 'mersenne_twister': 1 65 | } 66 | -------------------------------------------------------------------------------- /climt/_components/rrtmg/sw/__init__.py: -------------------------------------------------------------------------------- 1 | from .component import RRTMGShortwave 2 | 3 | __all__ = (RRTMGShortwave) 4 | -------------------------------------------------------------------------------- /climt/_components/second_best/BEST-Description.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/climt/_components/second_best/BEST-Description.pdf -------------------------------------------------------------------------------- /climt/_components/second_best/__init__.py: -------------------------------------------------------------------------------- 1 | from .component import SecondBEST 2 | 3 | __all__ = (SecondBEST) 4 | -------------------------------------------------------------------------------- /climt/_components/simple_physics/__init__.py: -------------------------------------------------------------------------------- 1 | from .component import SimplePhysics 2 | 3 | __all__ = (SimplePhysics) 4 | -------------------------------------------------------------------------------- /climt/_core/__init__.py: -------------------------------------------------------------------------------- 1 | from sympl import (set_constant, get_constant, reset_constants) 2 | 3 | from .util import ( 4 | mass_to_volume_mixing_ratio, 5 | get_interface_values, numpy_version_of, 6 | bolton_q_sat, bolton_dqsat_dT, calculate_q_sat, 7 | ensure_contiguous_state 8 | ) 9 | from .initialization import get_default_state, get_grid 10 | from .constants import ( 11 | list_available_constants, set_constants_from_dict 12 | ) 13 | 14 | __all__ = ( 15 | mass_to_volume_mixing_ratio, get_default_state, get_grid, 16 | get_interface_values, 17 | bolton_q_sat, bolton_dqsat_dT, calculate_q_sat, numpy_version_of, 18 | set_constant, get_constant, reset_constants, 19 | list_available_constants, set_constants_from_dict, 20 | ensure_contiguous_state, 21 | ) 22 | -------------------------------------------------------------------------------- /climt/_core/constants.py: -------------------------------------------------------------------------------- 1 | from sympl import set_constant, get_constants_string 2 | 3 | 4 | def list_available_constants(): 5 | """ 6 | Prints all the constants currently registered with sympl. 7 | """ 8 | print(get_constants_string()) 9 | 10 | 11 | def set_constants_from_dict(constant_descriptions): 12 | """ 13 | Modify/Add constants in the library. 14 | 15 | Args: 16 | 17 | constant_descriptions (dict): 18 | Dictionary containing the description of the constants. 19 | The key should be the name of the constant, and the value 20 | should be a dictionary containing the following keys: 21 | 22 | * value (float): 23 | The value assigned. 24 | 25 | * units (string): 26 | The units of the value, e.g, m/s, J/kg. 27 | 28 | """ 29 | 30 | for name in constant_descriptions.keys(): 31 | 32 | value = constant_descriptions[name]['value'] 33 | units = constant_descriptions[name]['units'] 34 | 35 | set_constant(name, value, units) 36 | -------------------------------------------------------------------------------- /climt/_data/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = () 2 | -------------------------------------------------------------------------------- /climt/_data/ozone_profile.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/climt/_data/ozone_profile.npy -------------------------------------------------------------------------------- /climt/_lib/Darwin/.temp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/climt/_lib/Darwin/.temp -------------------------------------------------------------------------------- /climt/_lib/Linux/.temp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/climt/_lib/Linux/.temp -------------------------------------------------------------------------------- /climt/_lib/Makefile: -------------------------------------------------------------------------------- 1 | FFTW_DIR = fftw-3.3.6-pl2 2 | SHT_DIR = shtns-2.7-r557 3 | BLAS_DIR = OpenBLAS-0.2.19 4 | SIM_PHYS_DIR = simple_physics 5 | EMAN_DIR = emanuel 6 | RRTMG_LW_DIR = rrtmg_lw 7 | RRTMG_SW_DIR = rrtmg_sw 8 | DCMIP_DIR=dcmip 9 | 10 | FFTW_GZ = fftw-3.3.6-pl2.tar.gz 11 | SHT_GZ = shtns-2.7-r557.tar.gz 12 | BLAS_GZ = OpenBLAS-0.2.19.tar.gz 13 | 14 | BASE_DIR = $(PWD) 15 | 16 | CLIMT_FFTW_FLAGS = --enable-openmp --enable-avx --enable-avx2 17 | 18 | LIB_DIR= $(BASE_DIR)/$(CLIMT_ARCH)/ 19 | CLIMT_CFLAGS = "-I$(BASE_DIR) -L$(LIB_DIR) $(CFLAGS)" 20 | LDFLAGS = "-L$(LIB_DIR)" 21 | 22 | 23 | ifeq ($(CLIMT_ARCH),Windows) 24 | BASE_DIR = $(subst \,/,$(PWD)) 25 | LIB_DIR= $(BASE_DIR)/$(CLIMT_ARCH)/ 26 | CLIMT_FFTW_FLAGS = --with-our-malloc --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --enable-static --with-g77-wrappers --with-windows-f77-mangling --enable-sse2 --enable-avx 27 | endif 28 | 29 | 30 | all: simple_physics_lib emanuel_lib rrtmg_lw_lib rrtmg_sw_lib libdcmip 31 | 32 | # Simple Physics Configuration 33 | 34 | simple_physics_lib: $(CLIMT_ARCH)/libsimple_physics.a 35 | 36 | $(CLIMT_ARCH)/libsimple_physics.a: $(SIM_PHYS_DIR)/*.f90 37 | cd $(SIM_PHYS_DIR); make; cp libsimple_physics.a $(LIB_DIR); touch ../../_components/simple_physics/_simple_physics.pyx 38 | 39 | # Emanuel Convection Configuration 40 | 41 | emanuel_lib: $(CLIMT_ARCH)/libemanuel.a 42 | 43 | $(CLIMT_ARCH)/libemanuel.a: $(EMAN_DIR)/*.f90 44 | cd $(EMAN_DIR); make; cp libemanuel.a $(LIB_DIR); touch ../../_components/emanuel/_emanuel_convection.pyx 45 | 46 | # RRTMG LW Configuration 47 | 48 | rrtmg_lw_lib: $(CLIMT_ARCH)/librrtmg_lw.a 49 | 50 | $(CLIMT_ARCH)/librrtmg_lw.a: $(RRTMG_LW_DIR)/*.f90 51 | cd $(RRTMG_LW_DIR); make; cp librrtmg_lw.a $(LIB_DIR); touch ../../_components/rrtmg/lw/_rrtmg_lw.pyx 52 | 53 | # RRTMG SW Configuration 54 | 55 | rrtmg_sw_lib: $(CLIMT_ARCH)/librrtmg_sw.a 56 | 57 | $(CLIMT_ARCH)/librrtmg_sw.a: $(RRTMG_SW_DIR)/*.f90 58 | cd $(RRTMG_SW_DIR); make; cp librrtmg_sw.a $(LIB_DIR); touch ../../_components/rrtmg/sw/_rrtmg_sw.pyx 59 | 60 | # DCMIP Configuration 61 | 62 | libdcmip: $(CLIMT_ARCH)/libdcmip.a 63 | 64 | $(CLIMT_ARCH)/libdcmip.a: $(DCMIP_DIR)/*.f90 65 | cd $(DCMIP_DIR); make; cp libdcmip.a $(LIB_DIR); touch ../../_components/dcmip/_dcmip.pyx 66 | 67 | 68 | 69 | clean: 70 | if [ -d $(FFTW_DIR) ]; then rm -Rf $(FFTW_DIR); fi 71 | if [ -d $(SHT_DIR) ]; then rm -Rf $(SHT_DIR); fi 72 | if [ -d $(BLAS_DIR) ]; then rm -Rf $(BLAS_DIR); fi 73 | cd $(SIM_PHYS_DIR); make clean 74 | cd $(EMAN_DIR); make clean 75 | cd $(RRTMG_LW_DIR); make clean 76 | cd $(RRTMG_SW_DIR); make clean 77 | cd $(DCMIP_DIR); make clean 78 | 79 | clean_libs: 80 | if [ -d include ]; then rm -Rf include; fi 81 | if [ -d share ]; then rm -Rf share; fi 82 | if [ -d bin ]; then rm -Rf bin; fi 83 | if [ -d lib ]; then rm -Rf lib; fi 84 | rm $(LIB_DIR)/*.a 85 | rm $(LIB_DIR)/.conf* 86 | -------------------------------------------------------------------------------- /climt/_lib/Windows/.temp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/climt/_lib/Windows/.temp -------------------------------------------------------------------------------- /climt/_lib/dcmip/Makefile: -------------------------------------------------------------------------------- 1 | # Build simple physics library 2 | 3 | 4 | all: libdcmip 5 | 6 | libdcmip: test4.o test5.o 7 | ar rcs libdcmip.a test4.o test5.o 8 | 9 | test4.o: dcmip_initial_conditions_test_4_v3.f90 10 | $(FC) $(FFLAGS) -O3 dcmip_initial_conditions_test_4_v3.f90 -c -o test4.o 11 | 12 | test5.o: dcmip_initial_conditions_test_5_v1.f90 13 | $(FC) $(FFLAGS) -O3 dcmip_initial_conditions_test_5_v1.f90 -c -o test5.o 14 | clean: 15 | rm -f test4.o test5.o *.mod *genmod* libdcmip.a 16 | -------------------------------------------------------------------------------- /climt/_lib/emanuel/Makefile: -------------------------------------------------------------------------------- 1 | # Build emanuel convection library 2 | 3 | 4 | all: lib_emanuel 5 | 6 | lib_emanuel: emanuel.o 7 | ar rcs libemanuel.a emanuel.o 8 | 9 | emanuel.o: convect43c.f90 10 | $(FC) $(FFLAGS) -O3 convect43c.f90 -c -o emanuel.o 11 | 12 | clean: 13 | rm -f emanuel.o *.mod *genmod* libemanuel.a 14 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/Makefile: -------------------------------------------------------------------------------- 1 | # Build RRTMG LW library 2 | 3 | .SUFFIXES: .f90 .o 4 | 5 | OBJS = parkind.o\ 6 | parrrtm.o\ 7 | rrlw_cld.o\ 8 | rrlw_con.o\ 9 | rrlw_kg01.o\ 10 | rrlw_kg02.o\ 11 | rrlw_kg03.o\ 12 | rrlw_kg04.o\ 13 | rrlw_kg05.o\ 14 | rrlw_kg06.o\ 15 | rrlw_kg07.o\ 16 | rrlw_kg08.o\ 17 | rrlw_kg09.o\ 18 | rrlw_kg10.o\ 19 | rrlw_kg11.o\ 20 | rrlw_kg12.o\ 21 | rrlw_kg13.o\ 22 | rrlw_kg14.o\ 23 | rrlw_kg15.o\ 24 | rrlw_kg16.o\ 25 | rrlw_ncpar.o\ 26 | rrlw_ref.o\ 27 | rrlw_tbl.o\ 28 | rrlw_vsn.o\ 29 | rrlw_wvn.o\ 30 | rrtmg_lw_cldprop.o\ 31 | rrtmg_lw_cldprmc.o\ 32 | rrtmg_lw_rtrn.o\ 33 | rrtmg_lw_rtrnmr.o\ 34 | rrtmg_lw_rtrnmc.o\ 35 | rrtmg_lw_setcoef.o\ 36 | rrtmg_lw_taumol.o\ 37 | rrtmg_lw_rad.nomcica.o\ 38 | mcica_random_numbers.o\ 39 | rrtmg_lw_init.o\ 40 | mcica_subcol_gen_lw.o\ 41 | rrtmg_lw_rad.o\ 42 | rrtmg_lw_c_binder.o 43 | 44 | OBJ_K_TABLES = rrtmg_lw_k_g.o 45 | 46 | all: lib_rrtmglw 47 | 48 | lib_rrtmglw: $(OBJS) $(OBJ_K_TABLES) 49 | ar rcs librrtmg_lw.a $(OBJS) $(OBJ_K_TABLES) 50 | 51 | rrtmg_lw_k_g.o: rrtmg_lw_k_g.f90 52 | $(FC) $(FFLAGS) -O0 $< -c -o $@ 53 | 54 | %.o: %.mod 55 | 56 | .f90.o: 57 | $(FC) $(FFLAGS) -O3 $< -c -o $@ 58 | 59 | clean: 60 | rm -f $(OBJS) $(OBJ_K_TABLES) *.mod *genmod* librrtmg_lw.a 61 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/parkind.f90: -------------------------------------------------------------------------------- 1 | module parkind 2 | 3 | use iso_c_binding 4 | implicit none 5 | save 6 | 7 | !------------------------------------------------------------------ 8 | ! rrtmg kinds 9 | ! Define integer and real kinds for various types. 10 | ! 11 | ! Initial version: MJIacono, AER, jun2006 12 | ! Revised: MJIacono, AER, aug2008 13 | !------------------------------------------------------------------ 14 | 15 | ! 16 | ! integer kinds 17 | ! ------------- 18 | ! 19 | integer, parameter :: kind_ib = selected_int_kind(13) ! 8 byte integer 20 | integer, parameter :: kind_im = selected_int_kind(6) ! 4 byte integer 21 | integer, parameter :: kind_in = kind(1) ! native integer 22 | 23 | ! 24 | ! real kinds 25 | ! ---------- 26 | ! 27 | !integer, parameter :: kind_rb = selected_real_kind(12) ! 8 byte real 28 | integer, parameter :: kind_rb = c_double ! 8 byte real 29 | integer, parameter :: kind_rm = selected_real_kind(6) ! 4 byte real 30 | integer, parameter :: kind_rn = kind(1.0) ! native real 31 | 32 | end module parkind 33 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_cld.f90: -------------------------------------------------------------------------------- 1 | module rrlw_cld 2 | 3 | use parkind, only : rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !------------------------------------------------------------------ 9 | ! rrtmg_lw cloud property coefficients 10 | 11 | ! Revised: MJIacono, AER, jun2006 12 | ! Revised: MJIacono, AER, aug2008 13 | !------------------------------------------------------------------ 14 | 15 | ! name type purpose 16 | ! ----- : ---- : ---------------------------------------------- 17 | ! abscld1: real : 18 | ! absice0: real : 19 | ! absice1: real : 20 | ! absice2: real : 21 | ! absice3: real : 22 | ! absliq0: real : 23 | ! absliq1: real : 24 | !------------------------------------------------------------------ 25 | 26 | real(kind=rb) :: abscld1 27 | real(kind=rb) , dimension(2) :: absice0 28 | real(kind=rb) , dimension(2,5) :: absice1 29 | real(kind=rb) , dimension(43,16) :: absice2 30 | real(kind=rb) , dimension(46,16) :: absice3 31 | real(kind=rb) :: absliq0 32 | real(kind=rb) , dimension(58,16) :: absliq1 33 | 34 | end module rrlw_cld 35 | 36 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_con.f90: -------------------------------------------------------------------------------- 1 | module rrlw_con 2 | 3 | !use parkind, only : rb => kind_rb 4 | !JOY use c_double from iso_c_binding 5 | !instead of kind_rb 6 | use iso_c_binding 7 | 8 | implicit none 9 | save 10 | 11 | !------------------------------------------------------------------ 12 | ! rrtmg_lw constants 13 | 14 | ! Initial version: MJIacono, AER, jun2006 15 | ! Revised: MJIacono, AER, aug2008 16 | !------------------------------------------------------------------ 17 | 18 | ! name type purpose 19 | ! ----- : ---- : ---------------------------------------------- 20 | ! fluxfac: real : radiance to flux conversion factor 21 | ! heatfac: real : flux to heating rate conversion factor 22 | !oneminus: real : 1.-1.e-6 23 | ! pi : real : pi 24 | ! grav : real : acceleration of gravity 25 | ! planck : real : planck constant 26 | ! boltz : real : boltzmann constant 27 | ! clight : real : speed of light 28 | ! avogad : real : avogadro constant 29 | ! alosmt : real : loschmidt constant 30 | ! gascon : real : molar gas constant 31 | ! radcn1 : real : first radiation constant 32 | ! radcn2 : real : second radiation constant 33 | ! sbcnst : real : stefan-boltzmann constant 34 | ! secdy : real : seconds per day 35 | !------------------------------------------------------------------ 36 | 37 | real(kind=c_double) :: fluxfac, heatfac 38 | real(kind=c_double) :: oneminus, pi, grav 39 | real(kind=c_double) :: planck, boltz, clight 40 | real(kind=c_double) :: avogad, alosmt, gascon 41 | real(kind=c_double) :: radcn1, radcn2 42 | real(kind=c_double) :: sbcnst, secdy 43 | 44 | contains 45 | 46 | subroutine set_rrtm_constants(py_pi, py_grav, py_planck, & 47 | py_boltz, py_clight, py_avogad, py_alosmt, & 48 | py_gascon, py_sbcnst,& 49 | py_secdy)bind(c, name='rrtmg_set_constants') 50 | 51 | real(kind=c_double) :: py_pi, py_grav, py_planck 52 | real(kind=c_double) :: py_boltz, py_clight, py_avogad 53 | real(kind=c_double) :: py_alosmt, py_gascon, py_sbcnst 54 | real(kind=c_double) :: py_secdy 55 | 56 | pi = py_pi 57 | grav = py_grav 58 | planck = py_planck 59 | boltz = py_boltz 60 | clight = py_clight 61 | avogad = py_avogad 62 | alosmt = py_alosmt 63 | gascon = py_gascon 64 | 65 | radcn1 = 2.*planck*clight*clight*1.e-07 66 | radcn2 = planck*clight/boltz 67 | 68 | sbcnst = py_sbcnst 69 | secdy = py_secdy 70 | 71 | end subroutine set_rrtm_constants 72 | 73 | end module rrlw_con 74 | 75 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg01.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg01 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 1 10 | ! band 1: 10-250 cm-1 (low - h2o; high - h2o) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | !fracrefbo: real 21 | ! kao : real 22 | ! kbo : real 23 | ! kao_mn2 : real 24 | ! kbo_mn2 : real 25 | ! selfrefo: real 26 | ! forrefo : real 27 | !----------------------------------------------------------------- 28 | 29 | integer(kind=im), parameter :: no1 = 16 30 | 31 | real(kind=rb) :: fracrefao(no1) , fracrefbo(no1) 32 | real(kind=rb) :: kao(5,13,no1) 33 | real(kind=rb) :: kbo(5,13:59,no1) 34 | real(kind=rb) :: kao_mn2(19,no1) , kbo_mn2(19,no1) 35 | real(kind=rb) :: selfrefo(10,no1), forrefo(4,no1) 36 | 37 | !----------------------------------------------------------------- 38 | ! rrtmg_lw COMBINED abs. coefficients for interval 1 39 | ! band 1: 10-250 cm-1 (low - h2o; high - h2o) 40 | ! 41 | ! Initial version: JJMorcrette, ECMWF, jul1998 42 | ! Revised: MJIacono, AER, jun2006 43 | ! Revised: MJIacono, AER, aug2008 44 | !----------------------------------------------------------------- 45 | ! 46 | ! name type purpose 47 | ! ---- : ---- : --------------------------------------------- 48 | !fracrefa : real 49 | !fracrefb : real 50 | ! ka : real 51 | ! kb : real 52 | ! absa : real 53 | ! absb : real 54 | ! ka_mn2 : real 55 | ! kb_mn2 : real 56 | ! selfref : real 57 | ! forref : real 58 | !----------------------------------------------------------------- 59 | 60 | integer(kind=im), parameter :: ng1 = 10 61 | 62 | real(kind=rb) :: fracrefa(ng1) , fracrefb(ng1) 63 | real(kind=rb) :: ka(5,13,ng1) , absa(65,ng1) 64 | real(kind=rb) :: kb(5,13:59,ng1), absb(235,ng1) 65 | real(kind=rb) :: ka_mn2(19,ng1) , kb_mn2(19,ng1) 66 | real(kind=rb) :: selfref(10,ng1), forref(4,ng1) 67 | 68 | equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1)) 69 | 70 | end module rrlw_kg01 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg02.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg02 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 2 10 | ! band 2: 250-500 cm-1 (low - h2o; high - h2o) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | !fracrefbo: real 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !----------------------------------------------------------------- 26 | 27 | integer(kind=im), parameter :: no2 = 16 28 | 29 | real(kind=rb) :: fracrefao(no2) , fracrefbo(no2) 30 | real(kind=rb) :: kao(5,13,no2) 31 | real(kind=rb) :: kbo(5,13:59,no2) 32 | real(kind=rb) :: selfrefo(10,no2) , forrefo(4,no2) 33 | 34 | !----------------------------------------------------------------- 35 | ! rrtmg_lw COMBINED abs. coefficients for interval 2 36 | ! band 2: 250-500 cm-1 (low - h2o; high - h2o) 37 | ! 38 | ! Initial version: JJMorcrette, ECMWF, jul1998 39 | ! Revised: MJIacono, AER, jun2006 40 | ! Revised: MJIacono, AER, aug2008 41 | !----------------------------------------------------------------- 42 | ! 43 | ! name type purpose 44 | ! ---- : ---- : --------------------------------------------- 45 | !fracrefa : real 46 | !fracrefb : real 47 | ! ka : real 48 | ! kb : real 49 | ! absa : real 50 | ! absb : real 51 | ! selfref : real 52 | ! forref : real 53 | ! 54 | ! refparam: real 55 | !----------------------------------------------------------------- 56 | 57 | integer(kind=im), parameter :: ng2 = 12 58 | 59 | real(kind=rb) :: fracrefa(ng2) , fracrefb(ng2) 60 | real(kind=rb) :: ka(5,13,ng2) , absa(65,ng2) 61 | real(kind=rb) :: kb(5,13:59,ng2), absb(235,ng2) 62 | real(kind=rb) :: selfref(10,ng2), forref(4,ng2) 63 | 64 | real(kind=rb) :: refparam(13) 65 | 66 | equivalence (ka(1,1,1),absa(1,1)),(kb(1,13,1),absb(1,1)) 67 | 68 | end module rrlw_kg02 69 | 70 | 71 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg03.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg03 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 3 10 | ! band 3: 500-630 cm-1 (low - h2o,co2; high - h2o,co2) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | !fracrefbo: real 21 | ! kao : real 22 | ! kbo : real 23 | ! kao_mn2o: real 24 | ! kbo_mn2o: real 25 | ! selfrefo: real 26 | ! forrefo : real 27 | !----------------------------------------------------------------- 28 | 29 | integer(kind=im), parameter :: no3 = 16 30 | 31 | real(kind=rb) :: fracrefao(no3,9) ,fracrefbo(no3,5) 32 | real(kind=rb) :: kao(9,5,13,no3) 33 | real(kind=rb) :: kbo(5,5,13:59,no3) 34 | real(kind=rb) :: kao_mn2o(9,19,no3), kbo_mn2o(5,19,no3) 35 | real(kind=rb) :: selfrefo(10,no3) 36 | real(kind=rb) :: forrefo(4,no3) 37 | 38 | !----------------------------------------------------------------- 39 | ! rrtmg_lw COMBINED abs. coefficients for interval 3 40 | ! band 3: 500-630 cm-1 (low - h2o,co2; high - h2o,co2) 41 | ! 42 | ! Initial version: JJMorcrette, ECMWF, jul1998 43 | ! Revised: MJIacono, AER, jun2006 44 | ! Revised: MJIacono, AER, aug2008 45 | !----------------------------------------------------------------- 46 | ! 47 | ! name type purpose 48 | ! ---- : ---- : --------------------------------------------- 49 | !fracrefa : real 50 | !fracrefb : real 51 | ! ka : real 52 | ! kb : real 53 | ! ka_mn2o : real 54 | ! kb_mn2o : real 55 | ! selfref : real 56 | ! forref : real 57 | ! 58 | ! absa : real 59 | ! absb : real 60 | !----------------------------------------------------------------- 61 | 62 | integer(kind=im), parameter :: ng3 = 16 63 | 64 | real(kind=rb) :: fracrefa(ng3,9) ,fracrefb(ng3,5) 65 | real(kind=rb) :: ka(9,5,13,ng3) ,absa(585,ng3) 66 | real(kind=rb) :: kb(5,5,13:59,ng3),absb(1175,ng3) 67 | real(kind=rb) :: ka_mn2o(9,19,ng3), kb_mn2o(5,19,ng3) 68 | real(kind=rb) :: selfref(10,ng3) 69 | real(kind=rb) :: forref(4,ng3) 70 | 71 | equivalence (ka(1,1,1,1),absa(1,1)),(kb(1,1,13,1),absb(1,1)) 72 | 73 | end module rrlw_kg03 74 | 75 | 76 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg04.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg04 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 4 10 | ! band 4: 630-700 cm-1 (low - h2o,co2; high - o3,co2) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | !fracrefbo: real 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !----------------------------------------------------------------- 26 | 27 | integer(kind=im), parameter :: no4 = 16 28 | 29 | real(kind=rb) :: fracrefao(no4,9) ,fracrefbo(no4,5) 30 | real(kind=rb) :: kao(9,5,13,no4) 31 | real(kind=rb) :: kbo(5,5,13:59,no4) 32 | real(kind=rb) :: selfrefo(10,no4) ,forrefo(4,no4) 33 | 34 | !----------------------------------------------------------------- 35 | ! rrtmg_lw COMBINED abs. coefficients for interval 4 36 | ! band 4: 630-700 cm-1 (low - h2o,co2; high - o3,co2) 37 | ! 38 | ! Initial version: JJMorcrette, ECMWF, jul1998 39 | ! Revised: MJIacono, AER, jun2006 40 | ! Revised: MJIacono, AER, aug2008 41 | !----------------------------------------------------------------- 42 | ! 43 | ! name type purpose 44 | ! ---- : ---- : --------------------------------------------- 45 | ! absa : real 46 | ! absb : real 47 | !fracrefa : real 48 | !fracrefb : real 49 | ! ka : real 50 | ! kb : real 51 | ! selfref : real 52 | ! forref : real 53 | !----------------------------------------------------------------- 54 | 55 | integer(kind=im), parameter :: ng4 = 14 56 | 57 | real(kind=rb) :: fracrefa(ng4,9) ,fracrefb(ng4,5) 58 | real(kind=rb) :: ka(9,5,13,ng4) ,absa(585,ng4) 59 | real(kind=rb) :: kb(5,5,13:59,ng4),absb(1175,ng4) 60 | real(kind=rb) :: selfref(10,ng4) ,forref(4,ng4) 61 | 62 | equivalence (ka(1,1,1,1),absa(1,1)),(kb(1,1,13,1),absb(1,1)) 63 | 64 | end module rrlw_kg04 65 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg05.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg05 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 5 10 | ! band 5: 700-820 cm-1 (low - h2o,co2; high - o3,co2) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | !fracrefbo: real 21 | ! kao : real 22 | ! kbo : real 23 | ! kao_mo3 : real 24 | ! selfrefo: real 25 | ! forrefo : real 26 | ! ccl4o : real 27 | !----------------------------------------------------------------- 28 | 29 | integer(kind=im), parameter :: no5 = 16 30 | 31 | real(kind=rb) :: fracrefao(no5,9) ,fracrefbo(no5,5) 32 | real(kind=rb) :: kao(9,5,13,no5) 33 | real(kind=rb) :: kbo(5,5,13:59,no5) 34 | real(kind=rb) :: kao_mo3(9,19,no5) 35 | real(kind=rb) :: selfrefo(10,no5) 36 | real(kind=rb) :: forrefo(4,no5) 37 | real(kind=rb) :: ccl4o(no5) 38 | 39 | !----------------------------------------------------------------- 40 | ! rrtmg_lw COMBINED abs. coefficients for interval 5 41 | ! band 5: 700-820 cm-1 (low - h2o,co2; high - o3,co2) 42 | ! 43 | ! Initial version: JJMorcrette, ECMWF, jul1998 44 | ! Revised: MJIacono, AER, jun2006 45 | ! Revised: MJIacono, AER, aug2008 46 | !----------------------------------------------------------------- 47 | ! 48 | ! name type purpose 49 | ! ---- : ---- : --------------------------------------------- 50 | !fracrefa : real 51 | !fracrefb : real 52 | ! ka : real 53 | ! kb : real 54 | ! ka_mo3 : real 55 | ! selfref : real 56 | ! forref : real 57 | ! ccl4 : real 58 | ! 59 | ! absa : real 60 | ! absb : real 61 | !----------------------------------------------------------------- 62 | 63 | integer(kind=im), parameter :: ng5 = 16 64 | 65 | real(kind=rb) :: fracrefa(ng5,9) ,fracrefb(ng5,5) 66 | real(kind=rb) :: ka(9,5,13,ng5) ,absa(585,ng5) 67 | real(kind=rb) :: kb(5,5,13:59,ng5),absb(1175,ng5) 68 | real(kind=rb) :: ka_mo3(9,19,ng5) 69 | real(kind=rb) :: selfref(10,ng5) 70 | real(kind=rb) :: forref(4,ng5) 71 | real(kind=rb) :: ccl4(ng5) 72 | 73 | equivalence (ka(1,1,1,1),absa(1,1)),(kb(1,1,13,1),absb(1,1)) 74 | 75 | end module rrlw_kg05 76 | 77 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg06.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg06 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 6 10 | ! band 6: 820-980 cm-1 (low - h2o; high - nothing) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | ! kao : real 21 | ! kao_mco2: real 22 | ! selfrefo: real 23 | ! forrefo : real 24 | !cfc11adjo: real 25 | ! cfc12o : real 26 | !----------------------------------------------------------------- 27 | 28 | integer(kind=im), parameter :: no6 = 16 29 | 30 | real(kind=rb) , dimension(no6) :: fracrefao 31 | real(kind=rb) :: kao(5,13,no6) 32 | real(kind=rb) :: kao_mco2(19,no6) 33 | real(kind=rb) :: selfrefo(10,no6) 34 | real(kind=rb) :: forrefo(4,no6) 35 | 36 | real(kind=rb) , dimension(no6) :: cfc11adjo 37 | real(kind=rb) , dimension(no6) :: cfc12o 38 | 39 | !----------------------------------------------------------------- 40 | ! rrtmg_lw COMBINED abs. coefficients for interval 6 41 | ! band 6: 820-980 cm-1 (low - h2o; high - nothing) 42 | ! 43 | ! Initial version: JJMorcrette, ECMWF, jul1998 44 | ! Revised: MJIacono, AER, jun2006 45 | ! Revised: MJIacono, AER, aug2008 46 | !----------------------------------------------------------------- 47 | ! 48 | ! name type purpose 49 | ! ---- : ---- : --------------------------------------------- 50 | !fracrefa : real 51 | ! ka : real 52 | ! ka_mco2 : real 53 | ! selfref : real 54 | ! forref : real 55 | !cfc11adj : real 56 | ! cfc12 : real 57 | ! 58 | ! absa : real 59 | !----------------------------------------------------------------- 60 | 61 | integer(kind=im), parameter :: ng6 = 8 62 | 63 | real(kind=rb) , dimension(ng6) :: fracrefa 64 | real(kind=rb) :: ka(5,13,ng6),absa(65,ng6) 65 | real(kind=rb) :: ka_mco2(19,ng6) 66 | real(kind=rb) :: selfref(10,ng6) 67 | real(kind=rb) :: forref(4,ng6) 68 | 69 | real(kind=rb) , dimension(ng6) :: cfc11adj 70 | real(kind=rb) , dimension(ng6) :: cfc12 71 | 72 | equivalence (ka(1,1,1),absa(1,1)) 73 | 74 | end module rrlw_kg06 75 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg07.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg07 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 7 10 | ! band 7: 980-1080 cm-1 (low - h2o,o3; high - o3) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | !fracrefbo: real 21 | ! kao : real 22 | ! kbo : real 23 | ! kao_mco2: real 24 | ! kbo_mco2: real 25 | ! selfrefo: real 26 | ! forrefo : real 27 | !----------------------------------------------------------------- 28 | 29 | integer(kind=im), parameter :: no7 = 16 30 | 31 | real(kind=rb) , dimension(no7) :: fracrefbo 32 | real(kind=rb) :: fracrefao(no7,9) 33 | real(kind=rb) :: kao(9,5,13,no7) 34 | real(kind=rb) :: kbo(5,13:59,no7) 35 | real(kind=rb) :: kao_mco2(9,19,no7) 36 | real(kind=rb) :: kbo_mco2(19,no7) 37 | real(kind=rb) :: selfrefo(10,no7) 38 | real(kind=rb) :: forrefo(4,no7) 39 | 40 | !----------------------------------------------------------------- 41 | ! rrtmg_lw COMBINED abs. coefficients for interval 7 42 | ! band 7: 980-1080 cm-1 (low - h2o,o3; high - o3) 43 | ! 44 | ! Initial version: JJMorcrette, ECMWF, jul1998 45 | ! Revised: MJIacono, AER, jun2006 46 | ! Revised: MJIacono, AER, aug2008 47 | !----------------------------------------------------------------- 48 | ! 49 | ! name type purpose 50 | ! ---- : ---- : --------------------------------------------- 51 | !fracrefa : real 52 | !fracrefb : real 53 | ! ka : real 54 | ! kb : real 55 | ! ka_mco2 : real 56 | ! kb_mco2 : real 57 | ! selfref : real 58 | ! forref : real 59 | ! 60 | ! absa : real 61 | !----------------------------------------------------------------- 62 | 63 | integer(kind=im), parameter :: ng7 = 12 64 | 65 | real(kind=rb) , dimension(ng7) :: fracrefb 66 | real(kind=rb) :: fracrefa(ng7,9) 67 | real(kind=rb) :: ka(9,5,13,ng7) ,absa(585,ng7) 68 | real(kind=rb) :: kb(5,13:59,ng7),absb(235,ng7) 69 | real(kind=rb) :: ka_mco2(9,19,ng7) 70 | real(kind=rb) :: kb_mco2(19,ng7) 71 | real(kind=rb) :: selfref(10,ng7) 72 | real(kind=rb) :: forref(4,ng7) 73 | 74 | equivalence (ka(1,1,1,1),absa(1,1)),(kb(1,13,1),absb(1,1)) 75 | 76 | end module rrlw_kg07 77 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg09.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg09 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 9 10 | ! band 9: 1180-1390 cm-1 (low - h2o,ch4; high - ch4) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | !fracrefbo: real 21 | ! kao : real 22 | ! kbo : real 23 | ! kao_mn2o: real 24 | ! kbo_mn2o: real 25 | ! selfrefo: real 26 | ! forrefo : real 27 | !----------------------------------------------------------------- 28 | 29 | integer(kind=im), parameter :: no9 = 16 30 | 31 | real(kind=rb) , dimension(no9) :: fracrefbo 32 | 33 | real(kind=rb) :: fracrefao(no9,9) 34 | real(kind=rb) :: kao(9,5,13,no9) 35 | real(kind=rb) :: kbo(5,13:59,no9) 36 | real(kind=rb) :: kao_mn2o(9,19,no9) 37 | real(kind=rb) :: kbo_mn2o(19,no9) 38 | real(kind=rb) :: selfrefo(10,no9) 39 | real(kind=rb) :: forrefo(4,no9) 40 | 41 | !----------------------------------------------------------------- 42 | ! rrtmg_lw COMBINED abs. coefficients for interval 9 43 | ! band 9: 1180-1390 cm-1 (low - h2o,ch4; high - ch4) 44 | ! 45 | ! Initial version: JJMorcrette, ECMWF, jul1998 46 | ! Revised: MJIacono, AER, jun2006 47 | ! Revised: MJIacono, AER, aug2008 48 | !----------------------------------------------------------------- 49 | ! 50 | ! name type purpose 51 | ! ---- : ---- : --------------------------------------------- 52 | !fracrefa : real 53 | !fracrefb : real 54 | ! ka : real 55 | ! kb : real 56 | ! ka_mn2o : real 57 | ! kb_mn2o : real 58 | ! selfref : real 59 | ! forref : real 60 | ! 61 | ! absa : real 62 | ! absb : real 63 | !----------------------------------------------------------------- 64 | 65 | integer(kind=im), parameter :: ng9 = 12 66 | 67 | real(kind=rb) , dimension(ng9) :: fracrefb 68 | real(kind=rb) :: fracrefa(ng9,9) 69 | real(kind=rb) :: ka(9,5,13,ng9) ,absa(585,ng9) 70 | real(kind=rb) :: kb(5,13:59,ng9) ,absb(235,ng9) 71 | real(kind=rb) :: ka_mn2o(9,19,ng9) 72 | real(kind=rb) :: kb_mn2o(19,ng9) 73 | real(kind=rb) :: selfref(10,ng9) 74 | real(kind=rb) :: forref(4,ng9) 75 | 76 | equivalence (ka(1,1,1,1),absa(1,1)),(kb(1,13,1),absb(1,1)) 77 | 78 | end module rrlw_kg09 79 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg10.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg10 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 10 10 | ! band 10: 1390-1480 cm-1 (low - h2o; high - h2o) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | !fracrefbo: real 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !----------------------------------------------------------------- 26 | 27 | integer(kind=im), parameter :: no10 = 16 28 | 29 | real(kind=rb) , dimension(no10) :: fracrefao 30 | real(kind=rb) , dimension(no10) :: fracrefbo 31 | 32 | real(kind=rb) :: kao(5,13,no10) 33 | real(kind=rb) :: kbo(5,13:59,no10) 34 | real(kind=rb) :: selfrefo(10,no10) 35 | real(kind=rb) :: forrefo(4,no10) 36 | 37 | !----------------------------------------------------------------- 38 | ! rrtmg_lw COMBINED abs. coefficients for interval 10 39 | ! band 10: 1390-1480 cm-1 (low - h2o; high - h2o) 40 | ! 41 | ! Initial version: JJMorcrette, ECMWF, jul1998 42 | ! Revised: MJIacono, AER, jun2006 43 | ! Revised: MJIacono, AER, aug2008 44 | !----------------------------------------------------------------- 45 | ! 46 | ! name type purpose 47 | ! ---- : ---- : --------------------------------------------- 48 | !fracrefao: real 49 | !fracrefbo: real 50 | ! kao : real 51 | ! kbo : real 52 | ! selfref : real 53 | ! forref : real 54 | ! 55 | ! absa : real 56 | ! absb : real 57 | !----------------------------------------------------------------- 58 | 59 | integer(kind=im), parameter :: ng10 = 6 60 | 61 | real(kind=rb) , dimension(ng10) :: fracrefa 62 | real(kind=rb) , dimension(ng10) :: fracrefb 63 | 64 | real(kind=rb) :: ka(5,13,ng10) , absa(65,ng10) 65 | real(kind=rb) :: kb(5,13:59,ng10), absb(235,ng10) 66 | real(kind=rb) :: selfref(10,ng10) 67 | real(kind=rb) :: forref(4,ng10) 68 | 69 | equivalence (ka(1,1,1),absa(1,1)),(kb(1,13,1),absb(1,1)) 70 | 71 | end module rrlw_kg10 72 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg11.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg11 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 11 10 | ! band 11: 1480-1800 cm-1 (low - h2o; high - h2o) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | !fracrefbo: real 21 | ! kao : real 22 | ! kbo : real 23 | ! kao_mo2 : real 24 | ! kbo_mo2 : real 25 | ! selfrefo: real 26 | ! forrefo : real 27 | !----------------------------------------------------------------- 28 | 29 | integer(kind=im), parameter :: no11 = 16 30 | 31 | real(kind=rb) , dimension(no11) :: fracrefao 32 | real(kind=rb) , dimension(no11) :: fracrefbo 33 | 34 | real(kind=rb) :: kao(5,13,no11) 35 | real(kind=rb) :: kbo(5,13:59,no11) 36 | real(kind=rb) :: kao_mo2(19,no11) 37 | real(kind=rb) :: kbo_mo2(19,no11) 38 | real(kind=rb) :: selfrefo(10,no11) 39 | real(kind=rb) :: forrefo(4,no11) 40 | 41 | !----------------------------------------------------------------- 42 | ! rrtmg_lw COMBINED abs. coefficients for interval 11 43 | ! band 11: 1480-1800 cm-1 (low - h2o; high - h2o) 44 | ! 45 | ! Initial version: JJMorcrette, ECMWF, jul1998 46 | ! Revised: MJIacono, AER, jun2006 47 | ! Revised: MJIacono, AER, aug2008 48 | !----------------------------------------------------------------- 49 | ! 50 | ! name type purpose 51 | ! ---- : ---- : --------------------------------------------- 52 | !fracrefa : real 53 | !fracrefb : real 54 | ! ka : real 55 | ! kb : real 56 | ! ka_mo2 : real 57 | ! kb_mo2 : real 58 | ! selfref : real 59 | ! forref : real 60 | ! 61 | ! absa : real 62 | ! absb : real 63 | !----------------------------------------------------------------- 64 | 65 | integer(kind=im), parameter :: ng11 = 8 66 | 67 | real(kind=rb) , dimension(ng11) :: fracrefa 68 | real(kind=rb) , dimension(ng11) :: fracrefb 69 | 70 | real(kind=rb) :: ka(5,13,ng11) , absa(65,ng11) 71 | real(kind=rb) :: kb(5,13:59,ng11), absb(235,ng11) 72 | real(kind=rb) :: ka_mo2(19,ng11) 73 | real(kind=rb) :: kb_mo2(19,ng11) 74 | real(kind=rb) :: selfref(10,ng11) 75 | real(kind=rb) :: forref(4,ng11) 76 | 77 | equivalence (ka(1,1,1),absa(1,1)),(kb(1,13,1),absb(1,1)) 78 | 79 | end module rrlw_kg11 80 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg12.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg12 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 12 10 | ! band 12: 1800-2080 cm-1 (low - h2o,co2; high - nothing) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | ! kao : real 21 | ! selfrefo: real 22 | ! forrefo : real 23 | !----------------------------------------------------------------- 24 | 25 | integer(kind=im), parameter :: no12 = 16 26 | 27 | real(kind=rb) :: fracrefao(no12,9) 28 | real(kind=rb) :: kao(9,5,13,no12) 29 | real(kind=rb) :: selfrefo(10,no12) 30 | real(kind=rb) :: forrefo(4,no12) 31 | 32 | !----------------------------------------------------------------- 33 | ! rrtmg_lw COMBINED abs. coefficients for interval 12 34 | ! band 12: 1800-2080 cm-1 (low - h2o,co2; high - nothing) 35 | ! 36 | ! Initial version: JJMorcrette, ECMWF, jul1998 37 | ! Revised: MJIacono, AER, jun2006 38 | ! Revised: MJIacono, AER, aug2008 39 | !----------------------------------------------------------------- 40 | ! 41 | ! name type purpose 42 | ! ---- : ---- : --------------------------------------------- 43 | !fracrefa : real 44 | ! ka : real 45 | ! selfref : real 46 | ! forref : real 47 | ! 48 | ! absa : real 49 | !----------------------------------------------------------------- 50 | 51 | integer(kind=im), parameter :: ng12 = 8 52 | 53 | real(kind=rb) :: fracrefa(ng12,9) 54 | real(kind=rb) :: ka(9,5,13,ng12) ,absa(585,ng12) 55 | real(kind=rb) :: selfref(10,ng12) 56 | real(kind=rb) :: forref(4,ng12) 57 | 58 | equivalence (ka(1,1,1,1),absa(1,1)) 59 | 60 | end module rrlw_kg12 61 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg13.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg13 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 13 10 | ! band 13: 2080-2250 cm-1 (low - h2o,n2o; high - nothing) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | ! kao : real 21 | ! kao_mco2: real 22 | ! kao_mco : real 23 | ! kbo_mo3 : real 24 | ! selfrefo: real 25 | ! forrefo : real 26 | !----------------------------------------------------------------- 27 | 28 | integer(kind=im), parameter :: no13 = 16 29 | 30 | real(kind=rb) , dimension(no13) :: fracrefbo 31 | 32 | real(kind=rb) :: fracrefao(no13,9) 33 | real(kind=rb) :: kao(9,5,13,no13) 34 | real(kind=rb) :: kao_mco2(9,19,no13) 35 | real(kind=rb) :: kao_mco(9,19,no13) 36 | real(kind=rb) :: kbo_mo3(19,no13) 37 | real(kind=rb) :: selfrefo(10,no13) 38 | real(kind=rb) :: forrefo(4,no13) 39 | 40 | !----------------------------------------------------------------- 41 | ! rrtmg_lw COMBINED abs. coefficients for interval 13 42 | ! band 13: 2080-2250 cm-1 (low - h2o,n2o; high - nothing) 43 | ! 44 | ! Initial version: JJMorcrette, ECMWF, jul1998 45 | ! Revised: MJIacono, AER, jun2006 46 | ! Revised: MJIacono, AER, aug2008 47 | !----------------------------------------------------------------- 48 | ! 49 | ! name type purpose 50 | ! ---- : ---- : --------------------------------------------- 51 | !fracrefa : real 52 | ! ka : real 53 | ! ka_mco2 : real 54 | ! ka_mco : real 55 | ! kb_mo3 : real 56 | ! selfref : real 57 | ! forref : real 58 | ! 59 | ! absa : real 60 | !----------------------------------------------------------------- 61 | 62 | integer(kind=im), parameter :: ng13 = 4 63 | 64 | real(kind=rb) , dimension(ng13) :: fracrefb 65 | 66 | real(kind=rb) :: fracrefa(ng13,9) 67 | real(kind=rb) :: ka(9,5,13,ng13) ,absa(585,ng13) 68 | real(kind=rb) :: ka_mco2(9,19,ng13) 69 | real(kind=rb) :: ka_mco(9,19,ng13) 70 | real(kind=rb) :: kb_mo3(19,ng13) 71 | real(kind=rb) :: selfref(10,ng13) 72 | real(kind=rb) :: forref(4,ng13) 73 | 74 | equivalence (ka(1,1,1,1),absa(1,1)) 75 | 76 | end module rrlw_kg13 77 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg14.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg14 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 14 10 | ! band 14: 2250-2380 cm-1 (low - co2; high - co2) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | !fracrefbo: real 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !----------------------------------------------------------------- 26 | 27 | integer(kind=im), parameter :: no14 = 16 28 | 29 | real(kind=rb) , dimension(no14) :: fracrefao 30 | real(kind=rb) , dimension(no14) :: fracrefbo 31 | 32 | real(kind=rb) :: kao(5,13,no14) 33 | real(kind=rb) :: kbo(5,13:59,no14) 34 | real(kind=rb) :: selfrefo(10,no14) 35 | real(kind=rb) :: forrefo(4,no14) 36 | 37 | !----------------------------------------------------------------- 38 | ! rrtmg_lw COMBINED abs. coefficients for interval 14 39 | ! band 14: 2250-2380 cm-1 (low - co2; high - co2) 40 | ! 41 | ! Initial version: JJMorcrette, ECMWF, jul1998 42 | ! Revised: MJIacono, AER, jun2006 43 | ! Revised: MJIacono, AER, aug2008 44 | !----------------------------------------------------------------- 45 | ! 46 | ! name type purpose 47 | ! ---- : ---- : --------------------------------------------- 48 | !fracrefa : real 49 | !fracrefb : real 50 | ! ka : real 51 | ! kb : real 52 | ! selfref : real 53 | ! forref : real 54 | ! 55 | ! absa : real 56 | ! absb : real 57 | !----------------------------------------------------------------- 58 | 59 | integer(kind=im), parameter :: ng14 = 2 60 | 61 | real(kind=rb) , dimension(ng14) :: fracrefa 62 | real(kind=rb) , dimension(ng14) :: fracrefb 63 | 64 | real(kind=rb) :: ka(5,13,ng14) ,absa(65,ng14) 65 | real(kind=rb) :: kb(5,13:59,ng14),absb(235,ng14) 66 | real(kind=rb) :: selfref(10,ng14) 67 | real(kind=rb) :: forref(4,ng14) 68 | 69 | equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1)) 70 | 71 | end module rrlw_kg14 72 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg15.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg15 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 15 10 | ! band 15: 2380-2600 cm-1 (low - n2o,co2; high - nothing) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | ! kao : real 21 | ! kao_mn2 : real 22 | ! selfrefo: real 23 | ! forrefo : real 24 | !----------------------------------------------------------------- 25 | 26 | integer(kind=im), parameter :: no15 = 16 27 | 28 | real(kind=rb) :: fracrefao(no15,9) 29 | real(kind=rb) :: kao(9,5,13,no15) 30 | real(kind=rb) :: kao_mn2(9,19,no15) 31 | real(kind=rb) :: selfrefo(10,no15) 32 | real(kind=rb) :: forrefo(4,no15) 33 | 34 | 35 | !----------------------------------------------------------------- 36 | ! rrtmg_lw COMBINED abs. coefficients for interval 15 37 | ! band 15: 2380-2600 cm-1 (low - n2o,co2; high - nothing) 38 | ! 39 | ! Initial version: JJMorcrette, ECMWF, jul1998 40 | ! Revised: MJIacono, AER, jun2006 41 | ! Revised: MJIacono, AER, aug2008 42 | !----------------------------------------------------------------- 43 | ! 44 | ! name type purpose 45 | ! ---- : ---- : --------------------------------------------- 46 | !fracrefa : real 47 | ! ka : real 48 | ! ka_mn2 : real 49 | ! selfref : real 50 | ! forref : real 51 | ! 52 | ! absa : real 53 | !----------------------------------------------------------------- 54 | 55 | integer(kind=im), parameter :: ng15 = 2 56 | 57 | real(kind=rb) :: fracrefa(ng15,9) 58 | real(kind=rb) :: ka(9,5,13,ng15) ,absa(585,ng15) 59 | real(kind=rb) :: ka_mn2(9,19,ng15) 60 | real(kind=rb) :: selfref(10,ng15) 61 | real(kind=rb) :: forref(4,ng15) 62 | 63 | equivalence (ka(1,1,1,1),absa(1,1)) 64 | 65 | end module rrlw_kg15 66 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_kg16.f90: -------------------------------------------------------------------------------- 1 | module rrlw_kg16 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !----------------------------------------------------------------- 9 | ! rrtmg_lw ORIGINAL abs. coefficients for interval 16 10 | ! band 16: 2600-3000 cm-1 (low - h2o,ch4; high - nothing) 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !----------------------------------------------------------------- 16 | ! 17 | ! name type purpose 18 | ! ---- : ---- : --------------------------------------------- 19 | !fracrefao: real 20 | ! kao : real 21 | ! kbo : real 22 | ! selfrefo: real 23 | ! forrefo : real 24 | !----------------------------------------------------------------- 25 | 26 | integer(kind=im), parameter :: no16 = 16 27 | 28 | real(kind=rb) , dimension(no16) :: fracrefbo 29 | 30 | real(kind=rb) :: fracrefao(no16,9) 31 | real(kind=rb) :: kao(9,5,13,no16) 32 | real(kind=rb) :: kbo(5,13:59,no16) 33 | real(kind=rb) :: selfrefo(10,no16) 34 | real(kind=rb) :: forrefo(4,no16) 35 | 36 | !----------------------------------------------------------------- 37 | ! rrtmg_lw COMBINED abs. coefficients for interval 16 38 | ! band 16: 2600-3000 cm-1 (low - h2o,ch4; high - nothing) 39 | ! 40 | ! Initial version: JJMorcrette, ECMWF, jul1998 41 | ! Revised: MJIacono, AER, jun2006 42 | ! Revised: MJIacono, AER, aug2008 43 | !----------------------------------------------------------------- 44 | ! 45 | ! name type purpose 46 | ! ---- : ---- : --------------------------------------------- 47 | !fracrefa : real 48 | ! ka : real 49 | ! kb : real 50 | ! selfref : real 51 | ! forref : real 52 | ! 53 | ! absa : real 54 | ! absb : real 55 | !----------------------------------------------------------------- 56 | 57 | integer(kind=im), parameter :: ng16 = 2 58 | 59 | real(kind=rb) , dimension(ng16) :: fracrefb 60 | 61 | real(kind=rb) :: fracrefa(ng16,9) 62 | real(kind=rb) :: ka(9,5,13,ng16) ,absa(585,ng16) 63 | real(kind=rb) :: kb(5,13:59,ng16), absb(235,ng16) 64 | real(kind=rb) :: selfref(10,ng16) 65 | real(kind=rb) :: forref(4,ng16) 66 | 67 | equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1)) 68 | 69 | end module rrlw_kg16 70 | 71 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_ncpar.f90: -------------------------------------------------------------------------------- 1 | module rrlw_ncpar 2 | use parkind ,only : im => kind_im, rb => kind_rb 3 | 4 | implicit none 5 | save 6 | 7 | real(kind=rb), parameter :: cpdair = 1003.5 ! Specific heat capacity of dry air 8 | ! at constant pressure at 273 K 9 | ! (J kg-1 K-1) 10 | 11 | 12 | integer(kind=im), parameter :: maxAbsorberNameLength = 5, & 13 | Absorber = 12 14 | character(len = maxAbsorberNameLength), dimension(Absorber), parameter :: & 15 | AbsorberNames = (/ & 16 | 'N2 ', & 17 | 'CCL4 ', & 18 | 'CFC11', & 19 | 'CFC12', & 20 | 'CFC22', & 21 | 'H2O ', & 22 | 'CO2 ', & 23 | 'O3 ', & 24 | 'N2O ', & 25 | 'CO ', & 26 | 'CH4 ', & 27 | 'O2 ' /) 28 | 29 | integer(kind=im), dimension(40) :: status 30 | integer(kind=im) :: i 31 | integer(kind=im), parameter :: keylower = 9, & 32 | keyupper = 5, & 33 | Tdiff = 5, & 34 | ps = 59, & 35 | plower = 13, & 36 | pupper = 47, & 37 | Tself = 10, & 38 | Tforeign = 4, & 39 | pforeign = 4, & 40 | T = 19, & 41 | Tplanck = 181, & 42 | band = 16, & 43 | GPoint = 16, & 44 | GPointSet = 2 45 | 46 | contains 47 | 48 | subroutine getAbsorberIndex(AbsorberName,AbsorberIndex) 49 | character(len = *), intent(in) :: AbsorberName 50 | integer(kind=im), intent(out) :: AbsorberIndex 51 | 52 | integer(kind=im) :: m 53 | 54 | AbsorberIndex = -1 55 | do m = 1, Absorber 56 | if (trim(AbsorberNames(m)) == trim(AbsorberName)) then 57 | AbsorberIndex = m 58 | end if 59 | end do 60 | 61 | if (AbsorberIndex == -1) then 62 | print*, "Absorber name index lookup failed." 63 | end if 64 | end subroutine getAbsorberIndex 65 | 66 | end module rrlw_ncpar 67 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_ref.f90: -------------------------------------------------------------------------------- 1 | module rrlw_ref 2 | 3 | use parkind, only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !------------------------------------------------------------------ 9 | ! rrtmg_lw reference atmosphere 10 | ! Based on standard mid-latitude summer profile 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !------------------------------------------------------------------ 16 | 17 | ! name type purpose 18 | ! ----- : ---- : ---------------------------------------------- 19 | ! pref : real : Reference pressure levels 20 | ! preflog: real : Reference pressure levels, ln(pref) 21 | ! tref : real : Reference temperature levels for MLS profile 22 | ! chi_mls: real : 23 | !------------------------------------------------------------------ 24 | 25 | real(kind=rb) , dimension(59) :: pref 26 | real(kind=rb) , dimension(59) :: preflog 27 | real(kind=rb) , dimension(59) :: tref 28 | real(kind=rb) :: chi_mls(7,59) 29 | 30 | end module rrlw_ref 31 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_tbl.f90: -------------------------------------------------------------------------------- 1 | module rrlw_tbl 2 | 3 | use parkind, only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !------------------------------------------------------------------ 9 | ! rrtmg_lw exponential lookup table arrays 10 | 11 | ! Initial version: JJMorcrette, ECMWF, jul1998 12 | ! Revised: MJIacono, AER, Jun 2006 13 | ! Revised: MJIacono, AER, Aug 2007 14 | ! Revised: MJIacono, AER, Aug 2008 15 | !------------------------------------------------------------------ 16 | 17 | ! name type purpose 18 | ! ----- : ---- : ---------------------------------------------- 19 | ! ntbl : integer: Lookup table dimension 20 | ! tblint : real : Lookup table conversion factor 21 | ! tau_tbl: real : Clear-sky optical depth (used in cloudy radiative 22 | ! transfer) 23 | ! exp_tbl: real : Transmittance lookup table 24 | ! tfn_tbl: real : Tau transition function; i.e. the transition of 25 | ! the Planck function from that for the mean layer 26 | ! temperature to that for the layer boundary 27 | ! temperature as a function of optical depth. 28 | ! The "linear in tau" method is used to make 29 | ! the table. 30 | ! pade : real : Pade constant 31 | ! bpade : real : Inverse of Pade constant 32 | !------------------------------------------------------------------ 33 | 34 | integer(kind=im), parameter :: ntbl = 10000 35 | 36 | real(kind=rb), parameter :: tblint = 10000.0_rb 37 | 38 | real(kind=rb) , dimension(0:ntbl) :: tau_tbl 39 | real(kind=rb) , dimension(0:ntbl) :: exp_tbl 40 | real(kind=rb) , dimension(0:ntbl) :: tfn_tbl 41 | 42 | real(kind=rb), parameter :: pade = 0.278_rb 43 | real(kind=rb) :: bpade 44 | 45 | end module rrlw_tbl 46 | 47 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_lw/rrlw_vsn.f90: -------------------------------------------------------------------------------- 1 | module rrlw_vsn 2 | 3 | implicit none 4 | save 5 | 6 | !------------------------------------------------------------------ 7 | ! rrtmg_lw version information 8 | 9 | ! Initial version: JJMorcrette, ECMWF, jul1998 10 | ! Revised: MJIacono, AER, jun2006 11 | ! Revised: MJIacono, AER, aug2008 12 | !------------------------------------------------------------------ 13 | 14 | ! name type purpose 15 | ! ----- : ---- : ---------------------------------------------- 16 | !hnamrtm :character: 17 | !hnamini :character: 18 | !hnamcld :character: 19 | !hnamclc :character: 20 | !hnamrtr :character: 21 | !hnamrtx :character: 22 | !hnamrtc :character: 23 | !hnamset :character: 24 | !hnamtau :character: 25 | !hnamatm :character: 26 | !hnamutl :character: 27 | !hnamext :character: 28 | !hnamkg :character: 29 | ! 30 | ! hvrrtm :character: 31 | ! hvrini :character: 32 | ! hvrcld :character: 33 | ! hvrclc :character: 34 | ! hvrrtr :character: 35 | ! hvrrtx :character: 36 | ! hvrrtc :character: 37 | ! hvrset :character: 38 | ! hvrtau :character: 39 | ! hvratm :character: 40 | ! hvrutl :character: 41 | ! hvrext :character: 42 | ! hvrkg :character: 43 | !------------------------------------------------------------------ 44 | 45 | character*18 hvrrtm,hvrini,hvrcld,hvrclc,hvrrtr,hvrrtx, & 46 | hvrrtc,hvrset,hvrtau,hvratm,hvrutl,hvrext 47 | character*20 hnamrtm,hnamini,hnamcld,hnamclc,hnamrtr,hnamrtx, & 48 | hnamrtc,hnamset,hnamtau,hnamatm,hnamutl,hnamext 49 | 50 | character*18 hvrkg 51 | character*20 hnamkg 52 | 53 | end module rrlw_vsn 54 | 55 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/Makefile: -------------------------------------------------------------------------------- 1 | # Build RRTMG LW library 2 | 3 | .SUFFIXES: .f90 .o 4 | 5 | OBJS = parkind.o\ 6 | parrrsw.o\ 7 | rrsw_cld.o\ 8 | rrsw_con.o\ 9 | rrsw_kg16.o\ 10 | rrsw_kg17.o\ 11 | rrsw_kg18.o\ 12 | rrsw_kg19.o\ 13 | rrsw_kg20.o\ 14 | rrsw_kg21.o\ 15 | rrsw_kg22.o\ 16 | rrsw_kg23.o\ 17 | rrsw_kg24.o\ 18 | rrsw_kg25.o\ 19 | rrsw_kg26.o\ 20 | rrsw_kg27.o\ 21 | rrsw_kg28.o\ 22 | rrsw_kg29.o\ 23 | rrsw_ncpar.o\ 24 | rrsw_ref.o\ 25 | rrsw_tbl.o\ 26 | rrsw_vsn.o\ 27 | rrsw_aer.o\ 28 | rrsw_wvn.o\ 29 | rrtmg_sw_cldprop.o\ 30 | rrtmg_sw_cldprmc.o\ 31 | rrtmg_sw_taumol.o\ 32 | rrtmg_sw_vrtqdr.o\ 33 | rrtmg_sw_reftra.o\ 34 | rrtmg_sw_spcvmc.o\ 35 | rrtmg_sw_setcoef.o\ 36 | rrtmg_sw_spcvrt.o\ 37 | rrtmg_sw_rad.nomcica.o\ 38 | mcica_random_numbers.o\ 39 | rrtmg_sw_init.o\ 40 | mcica_subcol_gen_sw.o\ 41 | rrtmg_sw_rad.o\ 42 | rrtmg_sw_c_binder.o 43 | 44 | OBJ_K_TABLES = rrtmg_sw_k_g.o 45 | 46 | all: lib_rrtmgsw 47 | 48 | lib_rrtmgsw: $(OBJS) $(OBJ_K_TABLES) 49 | ar rcs librrtmg_sw.a $(OBJS) $(OBJ_K_TABLES) 50 | 51 | rrtmg_sw_k_g.o: rrtmg_sw_k_g.f90 52 | $(FC) $(FFLAGS) -O0 $< -c -o $@ 53 | 54 | .f90.o: 55 | $(FC) $(FFLAGS) -O3 $< -c -o $@ 56 | 57 | clean: 58 | rm -f $(OBJS) $(OBJ_K_TABLES) *.mod *genmod* librrtmg_sw.a 59 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/parkind.f90: -------------------------------------------------------------------------------- 1 | module parkind 2 | 3 | !JOY 4 | use iso_c_binding 5 | implicit none 6 | save 7 | 8 | !------------------------------------------------------------------ 9 | ! rrtmg kinds 10 | ! Define integer and real kinds for various types. 11 | ! 12 | ! Initial version: MJIacono, AER, jun2006 13 | ! Revised: MJIacono, AER, aug2008 14 | !------------------------------------------------------------------ 15 | 16 | ! 17 | ! integer kinds 18 | ! ------------- 19 | ! 20 | integer, parameter :: kind_ib = selected_int_kind(13) ! 8 byte integer 21 | integer, parameter :: kind_im = selected_int_kind(6) ! 4 byte integer 22 | integer, parameter :: kind_in = kind(1) ! native integer 23 | 24 | ! 25 | ! real kinds 26 | ! ---------- 27 | ! 28 | !JOYinteger, parameter :: kind_rb = selected_real_kind(12) ! 8 byte real 29 | integer, parameter :: kind_rb = c_double ! 8 byte real 30 | integer, parameter :: kind_rm = selected_real_kind(6) ! 4 byte real 31 | integer, parameter :: kind_rn = kind(1.0) ! native real 32 | 33 | end module parkind 34 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_aer.f90: -------------------------------------------------------------------------------- 1 | module rrsw_aer 2 | 3 | use parkind, only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : nbndsw, naerec 5 | 6 | implicit none 7 | save 8 | 9 | !------------------------------------------------------------------ 10 | ! rrtmg_sw aerosol optical properties 11 | ! 12 | ! Data derived from six ECMWF aerosol types and defined for 13 | ! the rrtmg_sw spectral intervals 14 | ! 15 | ! Initial: J.-J. Morcrette, ECMWF, mar2003 16 | ! Revised: MJIacono, AER, jul2006 17 | ! Revised: MJIacono, AER, aug2008 18 | !------------------------------------------------------------------ 19 | ! 20 | !-- The six ECMWF aerosol types are respectively: 21 | ! 22 | ! 1/ continental average 2/ maritime 23 | ! 3/ desert 4/ urban 24 | ! 5/ volcanic active 6/ stratospheric background 25 | ! 26 | ! computed from Hess and Koepke (con, mar, des, urb) 27 | ! from Bonnel et al. (vol, str) 28 | ! 29 | ! rrtmg_sw 14 spectral intervals (microns): 30 | ! 3.846 - 3.077 31 | ! 3.077 - 2.500 32 | ! 2.500 - 2.150 33 | ! 2.150 - 1.942 34 | ! 1.942 - 1.626 35 | ! 1.626 - 1.299 36 | ! 1.299 - 1.242 37 | ! 1.242 - 0.7782 38 | ! 0.7782- 0.6250 39 | ! 0.6250- 0.4415 40 | ! 0.4415- 0.3448 41 | ! 0.3448- 0.2632 42 | ! 0.2632- 0.2000 43 | ! 12.195 - 3.846 44 | ! 45 | !------------------------------------------------------------------ 46 | ! 47 | ! name type purpose 48 | ! ----- : ---- : ---------------------------------------------- 49 | ! rsrtaua : real : ratio of average optical thickness in 50 | ! spectral band to that at 0.55 micron 51 | ! rsrpiza : real : average single scattering albedo (unitless) 52 | ! rsrasya : real : average asymmetry parameter (unitless) 53 | !------------------------------------------------------------------ 54 | 55 | real(kind=rb) :: rsrtaua(nbndsw,naerec) 56 | real(kind=rb) :: rsrpiza(nbndsw,naerec) 57 | real(kind=rb) :: rsrasya(nbndsw,naerec) 58 | 59 | end module rrsw_aer 60 | 61 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_cld.f90: -------------------------------------------------------------------------------- 1 | module rrsw_cld 2 | 3 | use parkind, only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !------------------------------------------------------------------ 9 | ! rrtmg_sw cloud property coefficients 10 | ! 11 | ! Initial: J.-J. Morcrette, ECMWF, oct1999 12 | ! Revised: J. Delamere/MJIacono, AER, aug2005 13 | ! Revised: MJIacono, AER, nov2005 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, dec2013: Updated xxxliq1 look-up tables 17 | !------------------------------------------------------------------ 18 | ! 19 | ! name type purpose 20 | ! ----- : ---- : ---------------------------------------------- 21 | ! xxxliq1 : real : optical properties (extinction coefficient, single 22 | ! scattering albedo, assymetry factor) based on 23 | ! Hu & Stamnes, j. clim., 6, 728-742, 1993. Derived 24 | ! from Mie scattering calculations at higher spectral 25 | ! resolution than Hu & Stamnes. Used in CIRC (Continuous 26 | ! Intercomparison of Radiation Codes) project. 27 | ! xxxice2 : real : optical properties (extinction coefficient, single 28 | ! scattering albedo, assymetry factor) from streamer v3.0, 29 | ! Key, streamer user's guide, cooperative institude 30 | ! for meteorological studies, 95 pp., 2001. 31 | ! xxxice3 : real : optical properties (extinction coefficient, single 32 | ! scattering albedo, assymetry factor) from 33 | ! Fu, j. clim., 9, 1996. 34 | ! xbari : real : optical property coefficients for five spectral 35 | ! intervals (2857-4000, 4000-5263, 5263-7692, 7692-14285, 36 | ! and 14285-40000 wavenumbers) following 37 | ! Ebert and Curry, jgr, 97, 3831-3836, 1992. 38 | !------------------------------------------------------------------ 39 | 40 | real(kind=rb) :: extliq1(58,16:29), ssaliq1(58,16:29), asyliq1(58,16:29) 41 | real(kind=rb) :: extice2(43,16:29), ssaice2(43,16:29), asyice2(43,16:29) 42 | real(kind=rb) :: extice3(46,16:29), ssaice3(46,16:29), asyice3(46,16:29) 43 | real(kind=rb) :: fdlice3(46,16:29) 44 | real(kind=rb) :: abari(5),bbari(5),cbari(5),dbari(5),ebari(5),fbari(5) 45 | 46 | end module rrsw_cld 47 | 48 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_con.f90: -------------------------------------------------------------------------------- 1 | module rrsw_con 2 | 3 | use parkind, only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !------------------------------------------------------------------ 9 | ! rrtmg_sw constants 10 | 11 | ! Initial version: MJIacono, AER, jun2006 12 | ! Revised: MJIacono, AER, aug2008 13 | !------------------------------------------------------------------ 14 | 15 | ! name type purpose 16 | ! ----- : ---- : ---------------------------------------------- 17 | ! fluxfac: real : radiance to flux conversion factor 18 | ! heatfac: real : flux to heating rate conversion factor 19 | !oneminus: real : 1.-1.e-6 20 | ! pi : real : pi 21 | ! grav : real : acceleration of gravity 22 | ! planck : real : planck constant 23 | ! boltz : real : boltzmann constant 24 | ! clight : real : speed of light 25 | ! avogad : real : avogadro constant 26 | ! alosmt : real : loschmidt constant 27 | ! gascon : real : molar gas constant 28 | ! radcn1 : real : first radiation constant 29 | ! radcn2 : real : second radiation constant 30 | ! sbcnst : real : stefan-boltzmann constant 31 | ! secdy : real : seconds per day 32 | !------------------------------------------------------------------ 33 | 34 | real(kind=rb) :: fluxfac, heatfac 35 | real(kind=rb) :: oneminus, pi, grav 36 | real(kind=rb) :: planck, boltz, clight 37 | real(kind=rb) :: avogad, alosmt, gascon 38 | real(kind=rb) :: radcn1, radcn2 39 | real(kind=rb) :: sbcnst, secdy 40 | 41 | end module rrsw_con 42 | 43 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg16.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg16 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng16 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 16 11 | ! band 16: 2600-3250 cm-1 (low - h2o,ch4; high - ch4) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !sfluxrefo: real 26 | !irradnceo: real 27 | !facbrghto: real 28 | !snsptdrko: real 29 | !----------------------------------------------------------------- 30 | 31 | integer(kind=im), parameter :: no16 = 16 32 | 33 | real(kind=rb) :: kao(9,5,13,no16) 34 | real(kind=rb) :: kbo(5,13:59,no16) 35 | real(kind=rb) :: selfrefo(10,no16), forrefo(3,no16) 36 | real(kind=rb) :: sfluxrefo(no16) 37 | real(kind=rb) :: irradnceo(no16) 38 | real(kind=rb) :: facbrghto(no16),snsptdrko(no16) 39 | 40 | real(kind=rb) :: rayl 41 | 42 | !----------------------------------------------------------------- 43 | ! rrtmg_sw COMBINED abs. coefficients for interval 16 44 | ! band 16: 2600-3250 cm-1 (low - h2o,ch4; high - ch4) 45 | ! 46 | ! Initial version: JJMorcrette, ECMWF, oct1999 47 | ! Revised: MJIacono, AER, jul2006 48 | ! Revised: MJIacono, AER, aug2008 49 | ! Revised: MJIacono, AER, nov2015, solar variability 50 | !----------------------------------------------------------------- 51 | ! 52 | ! name type purpose 53 | ! ---- : ---- : --------------------------------------------- 54 | ! ka : real 55 | ! kb : real 56 | ! absa : real 57 | ! absb : real 58 | ! selfref : real 59 | ! forref : real 60 | ! sfluxref: real 61 | ! irradnce: real 62 | ! facbrght: real 63 | ! snsptdrk: real 64 | !----------------------------------------------------------------- 65 | 66 | real(kind=rb) :: ka(9,5,13,ng16) , absa(585,ng16) 67 | real(kind=rb) :: kb(5,13:59,ng16), absb(235,ng16) 68 | real(kind=rb) :: selfref(10,ng16), forref(3,ng16) 69 | real(kind=rb) :: sfluxref(ng16) 70 | real(kind=rb) :: irradnce(ng16) 71 | real(kind=rb) :: facbrght(ng16),snsptdrk(ng16) 72 | 73 | equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1)) 74 | 75 | end module rrsw_kg16 76 | 77 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg17.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg17 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng17 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 17 11 | ! band 17: 3250-4000 cm-1 (low - h2o,co2; high - h2o,co2) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !sfluxrefo: real 26 | !irradnceo: real 27 | !facbrghto: real 28 | !snsptdrko: real 29 | !----------------------------------------------------------------- 30 | 31 | integer(kind=im), parameter :: no17 = 16 32 | 33 | real(kind=rb) :: kao(9,5,13,no17) 34 | real(kind=rb) :: kbo(5,5,13:59,no17) 35 | real(kind=rb) :: selfrefo(10,no17), forrefo(4,no17) 36 | real(kind=rb) :: sfluxrefo(no17,5) 37 | real(kind=rb) :: irradnceo(no17,5) 38 | real(kind=rb) :: facbrghto(no17,5),snsptdrko(no17,5) 39 | 40 | real(kind=rb) :: rayl 41 | 42 | !----------------------------------------------------------------- 43 | ! rrtmg_sw COMBINED abs. coefficients for interval 17 44 | ! band 17: 3250-4000 cm-1 (low - h2o,co2; high - h2o,co2) 45 | ! 46 | ! Initial version: JJMorcrette, ECMWF, oct1999 47 | ! Revised: MJIacono, AER, jul2006 48 | ! Revised: MJIacono, AER, aug2008 49 | ! Revised: MJIacono, AER, nov2015, solar variability 50 | !----------------------------------------------------------------- 51 | ! 52 | ! name type purpose 53 | ! ---- : ---- : --------------------------------------------- 54 | ! ka : real 55 | ! kb : real 56 | ! absa : real 57 | ! absb : real 58 | ! selfref : real 59 | ! forref : real 60 | ! sfluxref: real 61 | ! irradnce: real 62 | ! facbrght: real 63 | ! snsptdrk: real 64 | !----------------------------------------------------------------- 65 | 66 | real(kind=rb) :: ka(9,5,13,ng17) , absa(585,ng17) 67 | real(kind=rb) :: kb(5,5,13:59,ng17), absb(1175,ng17) 68 | real(kind=rb) :: selfref(10,ng17), forref(4,ng17) 69 | real(kind=rb) :: sfluxref(ng17,5) 70 | real(kind=rb) :: irradnce(ng17,5) 71 | real(kind=rb) :: facbrght(ng17,5),snsptdrk(ng17,5) 72 | 73 | equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,1,13,1),absb(1,1)) 74 | 75 | end module rrsw_kg17 76 | 77 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg18.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg18 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng18 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 18 11 | ! band 18: 4000-4650 cm-1 (low - h2o,ch4; high - ch4) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !sfluxrefo: real 26 | !irradnceo: real 27 | !facbrghto: real 28 | !snsptdrko: real 29 | !----------------------------------------------------------------- 30 | 31 | integer(kind=im), parameter :: no18 = 16 32 | 33 | real(kind=rb) :: kao(9,5,13,no18) 34 | real(kind=rb) :: kbo(5,13:59,no18) 35 | real(kind=rb) :: selfrefo(10,no18), forrefo(3,no18) 36 | real(kind=rb) :: sfluxrefo(no18,9) 37 | real(kind=rb) :: irradnceo(no18,9) 38 | real(kind=rb) :: facbrghto(no18,9),snsptdrko(no18,9) 39 | 40 | real(kind=rb) :: rayl 41 | 42 | !----------------------------------------------------------------- 43 | ! rrtmg_sw COMBINED abs. coefficients for interval 18 44 | ! band 18: 4000-4650 cm-1 (low - h2o,ch4; high - ch4) 45 | ! 46 | ! Initial version: JJMorcrette, ECMWF, oct1999 47 | ! Revised: MJIacono, AER, jul2006 48 | ! Revised: MJIacono, AER, aug2008 49 | ! Revised: MJIacono, AER, nov2015, solar variability 50 | !----------------------------------------------------------------- 51 | ! 52 | ! name type purpose 53 | ! ---- : ---- : --------------------------------------------- 54 | ! ka : real 55 | ! kb : real 56 | ! absa : real 57 | ! absb : real 58 | ! selfref : real 59 | ! forref : real 60 | ! sfluxref: real 61 | ! irradnce: real 62 | ! facbrght: real 63 | ! snsptdrk: real 64 | !----------------------------------------------------------------- 65 | 66 | real(kind=rb) :: ka(9,5,13,ng18), absa(585,ng18) 67 | real(kind=rb) :: kb(5,13:59,ng18), absb(235,ng18) 68 | real(kind=rb) :: selfref(10,ng18), forref(3,ng18) 69 | real(kind=rb) :: sfluxref(ng18,9) 70 | real(kind=rb) :: irradnce(ng18,9) 71 | real(kind=rb) :: facbrght(ng18,9),snsptdrk(ng18,9) 72 | 73 | equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1)) 74 | 75 | end module rrsw_kg18 76 | 77 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg19.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg19 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng19 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 19 11 | ! band 19: 4650-5150 cm-1 (low - h2o,co2; high - co2) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !sfluxrefo: real 26 | !irradnceo: real 27 | !facbrghto: real 28 | !snsptdrko: real 29 | !----------------------------------------------------------------- 30 | 31 | integer(kind=im), parameter :: no19 = 16 32 | 33 | real(kind=rb) :: kao(9,5,13,no19) 34 | real(kind=rb) :: kbo(5,13:59,no19) 35 | real(kind=rb) :: selfrefo(10,no19), forrefo(3,no19) 36 | real(kind=rb) :: sfluxrefo(no19,9) 37 | real(kind=rb) :: irradnceo(no19,9) 38 | real(kind=rb) :: facbrghto(no19,9),snsptdrko(no19,9) 39 | 40 | real(kind=rb) :: rayl 41 | 42 | !----------------------------------------------------------------- 43 | ! rrtmg_sw COMBINED abs. coefficients for interval 19 44 | ! band 19: 4650-5150 cm-1 (low - h2o,co2; high - co2) 45 | ! 46 | ! Initial version: JJMorcrette, ECMWF, oct1999 47 | ! Revised: MJIacono, AER, jul2006 48 | ! Revised: MJIacono, AER, aug2008 49 | ! Revised: MJIacono, AER, nov2015, solar variability 50 | !----------------------------------------------------------------- 51 | ! 52 | ! name type purpose 53 | ! ---- : ---- : --------------------------------------------- 54 | ! ka : real 55 | ! kb : real 56 | ! absa : real 57 | ! absb : real 58 | ! selfref : real 59 | ! forref : real 60 | ! sfluxref: real 61 | ! irradnce: real 62 | ! facbrght: real 63 | ! snsptdrk: real 64 | !----------------------------------------------------------------- 65 | 66 | real(kind=rb) :: ka(9,5,13,ng19), absa(585,ng19) 67 | real(kind=rb) :: kb(5,13:59,ng19), absb(235,ng19) 68 | real(kind=rb) :: selfref(10,ng19), forref(3,ng19) 69 | real(kind=rb) :: sfluxref(ng19,9) 70 | real(kind=rb) :: irradnce(ng19,9) 71 | real(kind=rb) :: facbrght(ng19,9),snsptdrk(ng19,9) 72 | 73 | equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1)) 74 | 75 | end module rrsw_kg19 76 | 77 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg20.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg20 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng20 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 20 11 | ! band 20: 5150-6150 cm-1 (low - h2o; high - h2o) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !sfluxrefo: real 26 | !irradnceo: real 27 | !facbrghto: real 28 | !snsptdrko: real 29 | ! absch4o : real 30 | !----------------------------------------------------------------- 31 | 32 | integer(kind=im), parameter :: no20 = 16 33 | 34 | real(kind=rb) :: kao(5,13,no20) 35 | real(kind=rb) :: kbo(5,13:59,no20) 36 | real(kind=rb) :: selfrefo(10,no20), forrefo(4,no20) 37 | real(kind=rb) :: sfluxrefo(no20) 38 | real(kind=rb) :: irradnceo(no20) 39 | real(kind=rb) :: facbrghto(no20),snsptdrko(no20) 40 | real(kind=rb) :: absch4o(no20) 41 | 42 | real(kind=rb) :: rayl 43 | 44 | !----------------------------------------------------------------- 45 | ! rrtmg_sw COMBINED abs. coefficients for interval 20 46 | ! band 20: 5150-6150 cm-1 (low - h2o; high - h2o) 47 | ! 48 | ! Initial version: JJMorcrette, ECMWF, oct1999 49 | ! Revised: MJIacono, AER, jul2006 50 | ! Revised: MJIacono, AER, aug2008 51 | ! Revised: MJIacono, AER, nov2015, solar variability 52 | !----------------------------------------------------------------- 53 | ! 54 | ! name type purpose 55 | ! ---- : ---- : --------------------------------------------- 56 | ! ka : real 57 | ! kb : real 58 | ! absa : real 59 | ! absb : real 60 | ! selfref : real 61 | ! forref : real 62 | ! sfluxref: real 63 | ! irradnce: real 64 | ! facbrght: real 65 | ! snsptdrk: real 66 | ! absch4 : real 67 | !----------------------------------------------------------------- 68 | 69 | real(kind=rb) :: ka(5,13,ng20), absa(65,ng20) 70 | real(kind=rb) :: kb(5,13:59,ng20), absb(235,ng20) 71 | real(kind=rb) :: selfref(10,ng20), forref(4,ng20) 72 | real(kind=rb) :: sfluxref(ng20) 73 | real(kind=rb) :: irradnce(ng20) 74 | real(kind=rb) :: facbrght(ng20),snsptdrk(ng20) 75 | real(kind=rb) :: absch4(ng20) 76 | 77 | equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1)) 78 | 79 | end module rrsw_kg20 80 | 81 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg21.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg21 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng21 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 21 11 | ! band 21: 6150-7700 cm-1 (low - h2o,co2; high - h2o,co2) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !sfluxrefo: real 26 | !irradnceo: real 27 | !facbrghto: real 28 | !snsptdrko: real 29 | !----------------------------------------------------------------- 30 | 31 | integer(kind=im), parameter :: no21 = 16 32 | 33 | real(kind=rb) :: kao(9,5,13,no21) 34 | real(kind=rb) :: kbo(5,5,13:59,no21) 35 | real(kind=rb) :: selfrefo(10,no21), forrefo(4,no21) 36 | real(kind=rb) :: sfluxrefo(no21,9) 37 | real(kind=rb) :: irradnceo(no21,9) 38 | real(kind=rb) :: facbrghto(no21,9),snsptdrko(no21,9) 39 | 40 | real(kind=rb) :: rayl 41 | 42 | !----------------------------------------------------------------- 43 | ! rrtmg_sw COMBINED abs. coefficients for interval 21 44 | ! band 21: 6150-7700 cm-1 (low - h2o,co2; high - h2o,co2) 45 | ! 46 | ! Initial version: JJMorcrette, ECMWF, oct1999 47 | ! Revised: MJIacono, AER, jul2006 48 | ! Revised: MJIacono, AER, aug2008 49 | ! Revised: MJIacono, AER, nov2015, solar variability 50 | !----------------------------------------------------------------- 51 | ! 52 | ! name type purpose 53 | ! ---- : ---- : --------------------------------------------- 54 | ! ka : real 55 | ! kb : real 56 | ! absa : real 57 | ! absb : real 58 | ! selfref : real 59 | ! forref : real 60 | ! sfluxref: real 61 | ! irradnce: real 62 | ! facbrght: real 63 | ! snsptdrk: real 64 | !----------------------------------------------------------------- 65 | 66 | real(kind=rb) :: ka(9,5,13,ng21), absa(585,ng21) 67 | real(kind=rb) :: kb(5,5,13:59,ng21), absb(1175,ng21) 68 | real(kind=rb) :: selfref(10,ng21), forref(4,ng21) 69 | real(kind=rb) :: sfluxref(ng21,9) 70 | real(kind=rb) :: irradnce(ng21,9) 71 | real(kind=rb) :: facbrght(ng21,9),snsptdrk(ng21,9) 72 | 73 | equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,1,13,1),absb(1,1)) 74 | 75 | end module rrsw_kg21 76 | 77 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg22.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg22 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng22 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 22 11 | ! band 22: 7700-8050 cm-1 (low - h2o,o2; high - o2) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !sfluxrefo: real 26 | !irradnceo: real 27 | !facbrghto: real 28 | !snsptdrko: real 29 | !----------------------------------------------------------------- 30 | 31 | integer(kind=im), parameter :: no22 = 16 32 | 33 | real(kind=rb) :: kao(9,5,13,no22) 34 | real(kind=rb) :: kbo(5,13:59,no22) 35 | real(kind=rb) :: selfrefo(10,no22), forrefo(3,no22) 36 | real(kind=rb) :: sfluxrefo(no22,9) 37 | real(kind=rb) :: irradnceo(no22,9) 38 | real(kind=rb) :: facbrghto(no22,9),snsptdrko(no22,9) 39 | 40 | real(kind=rb) :: rayl 41 | 42 | !----------------------------------------------------------------- 43 | ! rrtmg_sw COMBINED abs. coefficients for interval 22 44 | ! band 22: 7700-8050 cm-1 (low - h2o,o2; high - o2) 45 | ! 46 | ! Initial version: JJMorcrette, ECMWF, oct1999 47 | ! Revised: MJIacono, AER, jul2006 48 | ! Revised: MJIacono, AER, aug2008 49 | ! Revised: MJIacono, AER, nov2015, solar variability 50 | !----------------------------------------------------------------- 51 | ! 52 | ! name type purpose 53 | ! ---- : ---- : --------------------------------------------- 54 | ! ka : real 55 | ! kb : real 56 | ! absa : real 57 | ! absb : real 58 | ! selfref : real 59 | ! forref : real 60 | ! sfluxref: real 61 | ! irradnce: real 62 | ! facbrght: real 63 | ! snsptdrk: real 64 | !----------------------------------------------------------------- 65 | 66 | real(kind=rb) :: ka(9,5,13,ng22), absa(585,ng22) 67 | real(kind=rb) :: kb(5,13:59,ng22), absb(235,ng22) 68 | real(kind=rb) :: selfref(10,ng22), forref(3,ng22) 69 | real(kind=rb) :: sfluxref(ng22,9) 70 | real(kind=rb) :: irradnce(ng22,9) 71 | real(kind=rb) :: facbrght(ng22,9),snsptdrk(ng22,9) 72 | 73 | equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1)) 74 | 75 | end module rrsw_kg22 76 | 77 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg23.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg23 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng23 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 23 11 | ! band 23: 8050-12850 cm-1 (low - h2o; high - nothing) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !sfluxrefo: real 26 | !irradnceo: real 27 | !facbrghto: real 28 | !snsptdrko: real 29 | !----------------------------------------------------------------- 30 | 31 | integer(kind=im), parameter :: no23 = 16 32 | 33 | real(kind=rb) :: kao(5,13,no23) 34 | real(kind=rb) :: selfrefo(10,no23), forrefo(3,no23) 35 | real(kind=rb) :: sfluxrefo(no23) 36 | real(kind=rb) :: irradnceo(no23) 37 | real(kind=rb) :: facbrghto(no23),snsptdrko(no23) 38 | real(kind=rb) :: raylo(no23) 39 | 40 | !----------------------------------------------------------------- 41 | ! rrtmg_sw COMBINED abs. coefficients for interval 23 42 | ! band 23: 8050-12850 cm-1 (low - h2o; high - nothing) 43 | ! 44 | ! Initial version: JJMorcrette, ECMWF, oct1999 45 | ! Revised: MJIacono, AER, jul2006 46 | ! Revised: MJIacono, AER, aug2008 47 | ! Revised: MJIacono, AER, nov2015, solar variability 48 | !----------------------------------------------------------------- 49 | ! 50 | ! name type purpose 51 | ! ---- : ---- : --------------------------------------------- 52 | ! ka : real 53 | ! kb : real 54 | ! absa : real 55 | ! absb : real 56 | ! selfref : real 57 | ! forref : real 58 | ! sfluxref: real 59 | ! irradnce: real 60 | ! facbrght: real 61 | ! snsptdrk: real 62 | !----------------------------------------------------------------- 63 | 64 | real(kind=rb) :: ka(5,13,ng23), absa(65,ng23) 65 | real(kind=rb) :: selfref(10,ng23), forref(3,ng23) 66 | real(kind=rb) :: sfluxref(ng23), rayl(ng23) 67 | real(kind=rb) :: irradnce(ng23) 68 | real(kind=rb) :: facbrght(ng23),snsptdrk(ng23) 69 | 70 | equivalence (ka(1,1,1),absa(1,1)) 71 | 72 | end module rrsw_kg23 73 | 74 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg25.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg25 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng25 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 25 11 | ! band 25: 16000-22650 cm-1 (low - h2o; high - nothing) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | !sfluxrefo: real 23 | !irradnceo: real 24 | !facbrghto: real 25 | !snsptdrko: real 26 | ! abso3ao : real 27 | ! abso3bo : real 28 | ! raylo : real 29 | !----------------------------------------------------------------- 30 | 31 | integer(kind=im), parameter :: no25 = 16 32 | 33 | real(kind=rb) :: kao(5,13,no25) 34 | real(kind=rb) :: sfluxrefo(no25) 35 | real(kind=rb) :: irradnceo(no25) 36 | real(kind=rb) :: facbrghto(no25),snsptdrko(no25) 37 | real(kind=rb) :: abso3ao(no25), abso3bo(no25) 38 | real(kind=rb) :: raylo(no25) 39 | 40 | !----------------------------------------------------------------- 41 | ! rrtmg_sw COMBINED abs. coefficients for interval 25 42 | ! band 25: 16000-22650 cm-1 (low - h2o; high - nothing) 43 | ! 44 | ! Initial version: JJMorcrette, ECMWF, oct1999 45 | ! Revised: MJIacono, AER, jul2006 46 | ! Revised: MJIacono, AER, aug2008 47 | ! Revised: MJIacono, AER, nov2015, solar variability 48 | !----------------------------------------------------------------- 49 | ! 50 | ! name type purpose 51 | ! ---- : ---- : --------------------------------------------- 52 | ! ka : real 53 | ! absa : real 54 | ! sfluxref: real 55 | ! irradnce: real 56 | ! facbrght: real 57 | ! snsptdrk: real 58 | ! abso3a : real 59 | ! abso3b : real 60 | ! rayl : real 61 | !----------------------------------------------------------------- 62 | 63 | real(kind=rb) :: ka(5,13,ng25), absa(65,ng25) 64 | real(kind=rb) :: sfluxref(ng25) 65 | real(kind=rb) :: irradnce(ng25) 66 | real(kind=rb) :: facbrght(ng25),snsptdrk(ng25) 67 | real(kind=rb) :: abso3a(ng25), abso3b(ng25) 68 | real(kind=rb) :: rayl(ng25) 69 | 70 | equivalence (ka(1,1,1),absa(1,1)) 71 | 72 | end module rrsw_kg25 73 | 74 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg26.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg26 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng26 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 26 11 | ! band 26: 22650-29000 cm-1 (low - nothing; high - nothing) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | !sfluxrefo: real 22 | !irradnceo: real 23 | !facbrghto: real 24 | !snsptdrko: real 25 | ! raylo : real 26 | !----------------------------------------------------------------- 27 | 28 | integer(kind=im), parameter :: no26 = 16 29 | 30 | real(kind=rb) :: sfluxrefo(no26) 31 | real(kind=rb) :: irradnceo(no26) 32 | real(kind=rb) :: facbrghto(no26),snsptdrko(no26) 33 | real(kind=rb) :: raylo(no26) 34 | 35 | !----------------------------------------------------------------- 36 | ! rrtmg_sw COMBINED abs. coefficients for interval 26 37 | ! band 26: 22650-29000 cm-1 (low - nothing; high - nothing) 38 | ! 39 | ! Initial version: JJMorcrette, ECMWF, oct1999 40 | ! Revised: MJIacono, AER, jul2006 41 | ! Revised: MJIacono, AER, aug2008 42 | ! Revised: MJIacono, AER, nov2015, solar variability 43 | !----------------------------------------------------------------- 44 | ! 45 | ! name type purpose 46 | ! ---- : ---- : --------------------------------------------- 47 | ! sfluxref: real 48 | ! irradnce: real 49 | ! facbrght: real 50 | ! snsptdrk: real 51 | ! rayl : real 52 | !----------------------------------------------------------------- 53 | 54 | real(kind=rb) :: sfluxref(ng26) 55 | real(kind=rb) :: irradnce(ng26) 56 | real(kind=rb) :: facbrght(ng26),snsptdrk(ng26) 57 | real(kind=rb) :: rayl(ng26) 58 | 59 | end module rrsw_kg26 60 | 61 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg27.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg27 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng27 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 27 11 | ! band 27: 29000-38000 cm-1 (low - o3; high - o3) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | ! kbo : real 23 | !sfluxrefo: real 24 | !irradnceo: real 25 | !facbrghto: real 26 | !snsptdrko: real 27 | ! raylo : real 28 | !----------------------------------------------------------------- 29 | 30 | integer(kind=im), parameter :: no27 = 16 31 | 32 | real(kind=rb) :: kao(5,13,no27) 33 | real(kind=rb) :: kbo(5,13:59,no27) 34 | real(kind=rb) :: sfluxrefo(no27) 35 | real(kind=rb) :: irradnceo(no27) 36 | real(kind=rb) :: facbrghto(no27),snsptdrko(no27) 37 | real(kind=rb) :: raylo(no27) 38 | 39 | !----------------------------------------------------------------- 40 | ! rrtmg_sw COMBINED abs. coefficients for interval 27 41 | ! band 27: 29000-38000 cm-1 (low - o3; high - o3) 42 | ! 43 | ! Initial version: JJMorcrette, ECMWF, oct1999 44 | ! Revised: MJIacono, AER, jul2006 45 | ! Revised: MJIacono, AER, aug2008 46 | ! Revised: MJIacono, AER, nov2015, solar variability 47 | !----------------------------------------------------------------- 48 | ! 49 | ! name type purpose 50 | ! ---- : ---- : --------------------------------------------- 51 | ! ka : real 52 | ! kb : real 53 | ! absa : real 54 | ! absb : real 55 | ! sfluxref: real 56 | ! irradnce: real 57 | ! facbrght: real 58 | ! snsptdrk: real 59 | ! rayl : real 60 | !----------------------------------------------------------------- 61 | 62 | real(kind=rb) :: ka(5,13,ng27), absa(65,ng27) 63 | real(kind=rb) :: kb(5,13:59,ng27), absb(235,ng27) 64 | real(kind=rb) :: sfluxref(ng27) 65 | real(kind=rb) :: irradnce(ng27) 66 | real(kind=rb) :: facbrght(ng27),snsptdrk(ng27) 67 | real(kind=rb) :: rayl(ng27) 68 | 69 | equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1)) 70 | 71 | end module rrsw_kg27 72 | 73 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg28.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg28 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng28 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 28 11 | ! band 28: 38000-50000 cm-1 (low - o3, o2; high - o3, o2) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | ! kbo : real 23 | !sfluxrefo: real 24 | !irradnceo: real 25 | !facbrghto: real 26 | !snsptdrko: real 27 | !----------------------------------------------------------------- 28 | 29 | integer(kind=im), parameter :: no28 = 16 30 | 31 | real(kind=rb) :: kao(9,5,13,no28) 32 | real(kind=rb) :: kbo(5,5,13:59,no28) 33 | real(kind=rb) :: sfluxrefo(no28,5) 34 | real(kind=rb) :: irradnceo(no28,5) 35 | real(kind=rb) :: facbrghto(no28,5),snsptdrko(no28,5) 36 | 37 | real(kind=rb) :: rayl 38 | 39 | !----------------------------------------------------------------- 40 | ! rrtmg_sw COMBINED abs. coefficients for interval 28 41 | ! band 28: 38000-50000 cm-1 (low - o3, o2; high - o3, o2) 42 | ! 43 | ! Initial version: JJMorcrette, ECMWF, oct1999 44 | ! Revised: MJIacono, AER, jul2006 45 | ! Revised: MJIacono, AER, aug2008 46 | ! Revised: MJIacono, AER, nov2015, solar variability 47 | !----------------------------------------------------------------- 48 | ! 49 | ! name type purpose 50 | ! ---- : ---- : --------------------------------------------- 51 | ! ka : real 52 | ! kb : real 53 | ! sfluxref: real 54 | ! irradnce: real 55 | ! facbrght: real 56 | ! snsptdrk: real 57 | !----------------------------------------------------------------- 58 | 59 | real(kind=rb) :: ka(9,5,13,ng28), absa(585,ng28) 60 | real(kind=rb) :: kb(5,5,13:59,ng28), absb(1175,ng28) 61 | real(kind=rb) :: sfluxref(ng28,5) 62 | real(kind=rb) :: irradnce(ng28,5) 63 | real(kind=rb) :: facbrght(ng28,5),snsptdrk(ng28,5) 64 | 65 | equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,1,13,1),absb(1,1)) 66 | 67 | end module rrsw_kg28 68 | 69 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_kg29.f90: -------------------------------------------------------------------------------- 1 | module rrsw_kg29 2 | 3 | use parkind ,only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : ng29 5 | 6 | implicit none 7 | save 8 | 9 | !----------------------------------------------------------------- 10 | ! rrtmg_sw ORIGINAL abs. coefficients for interval 29 11 | ! band 29: 820-2600 cm-1 (low - h2o; high - co2) 12 | ! 13 | ! Initial version: JJMorcrette, ECMWF, oct1999 14 | ! Revised: MJIacono, AER, jul2006 15 | ! Revised: MJIacono, AER, aug2008 16 | ! Revised: MJIacono, AER, nov2015, solar variability 17 | !----------------------------------------------------------------- 18 | ! 19 | ! name type purpose 20 | ! ---- : ---- : --------------------------------------------- 21 | ! kao : real 22 | ! kbo : real 23 | ! selfrefo: real 24 | ! forrefo : real 25 | !sfluxrefo: real 26 | !irradnceo: real 27 | !facbrghto: real 28 | !snsptdrko: real 29 | ! absh2oo : real 30 | ! absco2o : real 31 | !----------------------------------------------------------------- 32 | 33 | integer(kind=im), parameter :: no29 = 16 34 | 35 | real(kind=rb) :: kao(5,13,no29) 36 | real(kind=rb) :: kbo(5,13:59,no29) 37 | real(kind=rb) :: selfrefo(10,no29), forrefo(4,no29) 38 | real(kind=rb) :: sfluxrefo(no29) 39 | real(kind=rb) :: irradnceo(no29) 40 | real(kind=rb) :: facbrghto(no29),snsptdrko(no29) 41 | real(kind=rb) :: absh2oo(no29), absco2o(no29) 42 | 43 | real(kind=rb) :: rayl 44 | 45 | !----------------------------------------------------------------- 46 | ! rrtmg_sw COMBINED abs. coefficients for interval 29 47 | ! band 29: 820-2600 cm-1 (low - h2o; high - co2) 48 | ! 49 | ! Initial version: JJMorcrette, ECMWF, oct1999 50 | ! Revised: MJIacono, AER, jul2006 51 | ! Revised: MJIacono, AER, aug2008 52 | ! Revised: MJIacono, AER, nov2015, solar variability 53 | !----------------------------------------------------------------- 54 | ! 55 | ! name type purpose 56 | ! ---- : ---- : --------------------------------------------- 57 | ! ka : real 58 | ! kb : real 59 | ! selfref : real 60 | ! forref : real 61 | ! sfluxref: real 62 | ! irradnce: real 63 | ! facbrght: real 64 | ! snsptdrk: real 65 | ! absh2o : real 66 | ! absco2 : real 67 | !----------------------------------------------------------------- 68 | 69 | real(kind=rb) :: ka(5,13,ng29), absa(65,ng29) 70 | real(kind=rb) :: kb(5,13:59,ng29), absb(235,ng29) 71 | real(kind=rb) :: selfref(10,ng29), forref(4,ng29) 72 | real(kind=rb) :: sfluxref(ng29) 73 | real(kind=rb) :: irradnce(ng29) 74 | real(kind=rb) :: facbrght(ng29),snsptdrk(ng29) 75 | real(kind=rb) :: absh2o(ng29), absco2(ng29) 76 | 77 | equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1)) 78 | 79 | end module rrsw_kg29 80 | 81 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_ref.f90: -------------------------------------------------------------------------------- 1 | module rrsw_ref 2 | 3 | use parkind, only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !------------------------------------------------------------------ 9 | ! rrtmg_sw reference atmosphere 10 | ! Based on standard mid-latitude summer profile 11 | ! 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jun2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !------------------------------------------------------------------ 16 | 17 | ! name type purpose 18 | ! ----- : ---- : ---------------------------------------------- 19 | ! pref : real : Reference pressure levels 20 | ! preflog: real : Reference pressure levels, ln(pref) 21 | ! tref : real : Reference temperature levels for MLS profile 22 | !------------------------------------------------------------------ 23 | 24 | real(kind=rb) , dimension(59) :: pref 25 | real(kind=rb) , dimension(59) :: preflog 26 | real(kind=rb) , dimension(59) :: tref 27 | 28 | end module rrsw_ref 29 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_tbl.f90: -------------------------------------------------------------------------------- 1 | module rrsw_tbl 2 | 3 | use parkind, only : im => kind_im, rb => kind_rb 4 | 5 | implicit none 6 | save 7 | 8 | !------------------------------------------------------------------ 9 | ! rrtmg_sw lookup table arrays 10 | 11 | ! Initial version: MJIacono, AER, may2007 12 | ! Revised: MJIacono, AER, aug2007 13 | ! Revised: MJIacono, AER, aug2008 14 | !------------------------------------------------------------------ 15 | 16 | ! name type purpose 17 | ! ----- : ---- : ---------------------------------------------- 18 | ! ntbl : integer: Lookup table dimension 19 | ! tblint : real : Lookup table conversion factor 20 | ! tau_tbl: real : Clear-sky optical depth 21 | ! exp_tbl: real : Exponential lookup table for transmittance 22 | ! od_lo : real : Value of tau below which expansion is used 23 | ! : in place of lookup table 24 | ! pade : real : Pade approximation constant 25 | ! bpade : real : Inverse of Pade constant 26 | !------------------------------------------------------------------ 27 | 28 | integer(kind=im), parameter :: ntbl = 10000 29 | 30 | real(kind=rb), parameter :: tblint = 10000.0_rb 31 | 32 | real(kind=rb), parameter :: od_lo = 0.06_rb 33 | 34 | real(kind=rb) :: tau_tbl 35 | real(kind=rb) , dimension(0:ntbl) :: exp_tbl 36 | 37 | real(kind=rb), parameter :: pade = 0.278_rb 38 | real(kind=rb) :: bpade 39 | 40 | end module rrsw_tbl 41 | 42 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_vsn.f90: -------------------------------------------------------------------------------- 1 | module rrsw_vsn 2 | 3 | implicit none 4 | save 5 | 6 | !------------------------------------------------------------------ 7 | ! rrtmg_sw version information 8 | 9 | ! Initial version: JJMorcrette, ECMWF, jul1998 10 | ! Revised: MJIacono, AER, jul2006 11 | ! Revised: MJIacono, AER, aug2008 12 | !------------------------------------------------------------------ 13 | 14 | ! name type purpose 15 | ! ----- : ---- : ---------------------------------------------- 16 | !hnamrtm :character: 17 | !hnamini :character: 18 | !hnamcld :character: 19 | !hnamclc :character: 20 | !hnamrft :character: 21 | !hnamspv :character: 22 | !hnamspc :character: 23 | !hnamset :character: 24 | !hnamtau :character: 25 | !hnamvqd :character: 26 | !hnamatm :character: 27 | !hnamutl :character: 28 | !hnamext :character: 29 | !hnamkg :character: 30 | ! 31 | ! hvrrtm :character: 32 | ! hvrini :character: 33 | ! hvrcld :character: 34 | ! hvrclc :character: 35 | ! hvrrft :character: 36 | ! hvrspv :character: 37 | ! hvrspc :character: 38 | ! hvrset :character: 39 | ! hvrtau :character: 40 | ! hvrvqd :character: 41 | ! hvratm :character: 42 | ! hvrutl :character: 43 | ! hvrext :character: 44 | ! hvrkg :character: 45 | !------------------------------------------------------------------ 46 | 47 | character*18 hvrrtm,hvrini,hvrcld,hvrclc,hvrrft,hvrspv, & 48 | hvrspc,hvrset,hvrtau,hvrvqd,hvratm,hvrutl,hvrext 49 | character*20 hnamrtm,hnamini,hnamcld,hnamclc,hnamrft,hnamspv, & 50 | hnamspc,hnamset,hnamtau,hnamvqd,hnamatm,hnamutl,hnamext 51 | 52 | character*18 hvrkg 53 | character*20 hnamkg 54 | 55 | end module rrsw_vsn 56 | 57 | -------------------------------------------------------------------------------- /climt/_lib/rrtmg_sw/rrsw_wvn.f90: -------------------------------------------------------------------------------- 1 | module rrsw_wvn 2 | 3 | use parkind, only : im => kind_im, rb => kind_rb 4 | use parrrsw, only : nbndsw, mg, ngptsw, jpb1, jpb2 5 | 6 | implicit none 7 | save 8 | 9 | !------------------------------------------------------------------ 10 | ! rrtmg_sw spectral information 11 | 12 | ! Initial version: JJMorcrette, ECMWF, jul1998 13 | ! Revised: MJIacono, AER, jul2006 14 | ! Revised: MJIacono, AER, aug2008 15 | !------------------------------------------------------------------ 16 | 17 | ! name type purpose 18 | ! ----- : ---- : ---------------------------------------------- 19 | ! ng : integer: Number of original g-intervals in each spectral band 20 | ! nspa : integer: 21 | ! nspb : integer: 22 | !wavenum1: real : Spectral band lower boundary in wavenumbers 23 | !wavenum2: real : Spectral band upper boundary in wavenumbers 24 | ! delwave: real : Spectral band width in wavenumbers 25 | ! 26 | ! ngc : integer: The number of new g-intervals in each band 27 | ! ngs : integer: The cumulative sum of new g-intervals for each band 28 | ! ngm : integer: The index of each new g-interval relative to the 29 | ! original 16 g-intervals in each band 30 | ! ngn : integer: The number of original g-intervals that are 31 | ! combined to make each new g-intervals in each band 32 | ! ngb : integer: The band index for each new g-interval 33 | ! wt : real : RRTM weights for the original 16 g-intervals 34 | ! rwgt : real : Weights for combining original 16 g-intervals 35 | ! (224 total) into reduced set of g-intervals 36 | ! (112 total) 37 | !------------------------------------------------------------------ 38 | 39 | integer(kind=im) :: ng(jpb1:jpb2) 40 | integer(kind=im) :: nspa(jpb1:jpb2) 41 | integer(kind=im) :: nspb(jpb1:jpb2) 42 | 43 | real(kind=rb) :: wavenum1(jpb1:jpb2) 44 | real(kind=rb) :: wavenum2(jpb1:jpb2) 45 | real(kind=rb) :: delwave(jpb1:jpb2) 46 | 47 | integer(kind=im) :: ngc(nbndsw) 48 | integer(kind=im) :: ngs(nbndsw) 49 | integer(kind=im) :: ngn(ngptsw) 50 | integer(kind=im) :: ngb(ngptsw) 51 | integer(kind=im) :: ngm(nbndsw*mg) 52 | 53 | real(kind=rb) :: wt(mg) 54 | real(kind=rb) :: rwgt(nbndsw*mg) 55 | 56 | end module rrsw_wvn 57 | -------------------------------------------------------------------------------- /climt/_lib/simple_physics/Makefile: -------------------------------------------------------------------------------- 1 | # Build simple physics library 2 | 3 | 4 | all: lib_simple_physics 5 | 6 | lib_simple_physics: simple_physics_custom.o 7 | ar rcs libsimple_physics.a simple_physics_custom.o 8 | 9 | simple_physics_custom.o: simple_physics_custom.f90 10 | $(FC) $(FFLAGS) -O3 simple_physics_custom.f90 -c -o simple_physics_custom.o 11 | 12 | clean: 13 | rm -f simple_physics_custom.o *.mod *genmod* libsimple_physics.a 14 | -------------------------------------------------------------------------------- /climt_release_checks.txt: -------------------------------------------------------------------------------- 1 | * ensure HISTORY is up to date 2 | * run bumpversion 3 | * create sdist and run twine check on it to ensure things are ok 4 | * push commit to github 5 | * manually tag new version 6 | -------------------------------------------------------------------------------- /docs/authors.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../AUTHORS.rst 2 | -------------------------------------------------------------------------------- /docs/climt.rst: -------------------------------------------------------------------------------- 1 | climt package 2 | ============= 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: climt 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /docs/climt_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/docs/climt_logo.jpg -------------------------------------------------------------------------------- /docs/component_manual.rst: -------------------------------------------------------------------------------- 1 | Component Manual 2 | ================ 3 | 4 | .. toctree:: 5 | rrtmg_clouds 6 | -------------------------------------------------------------------------------- /docs/component_types.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | Component Types 3 | =============== 4 | 5 | Deriving from Sympl_, most components in climt are either :py:class:`TendencyComponent`, 6 | :py:class:`DiagnosticComponent`, :py:class:`ImplicitTendencyComponent` 7 | or :py:class:`Stepper`. 8 | 9 | * :py:class:`TendencyComponent` takes the model state as input and returns tendencies and optional 10 | diagnostics. A radiation component is a good example of such components: any radiation component 11 | returns the heating rate of each layer of the atmosphere (in :math:`degK/s`) 12 | * :py:class:`DiagnosticComponent` takes the model state as input and returns some other diagnostic 13 | quantities. An example would be a component that takes the model state and returns the optical 14 | depth. 15 | * :py:class:`Stepper` takes the model state, and returns new values for some some quantities 16 | in the model state. A dynamical core is a good example, which returns new values of winds, 17 | temperature and pressure. 18 | * :py:class:`ImplicitTendencyComponent` takes the model state and outputs tendencies (like a :py:class:`TendencyComponent`) 19 | but require the model timestep (like a :py:class:`Stepper`) for various reasons, including to ensure 20 | that a vertical CFL_ criterion is met. 21 | 22 | 23 | You can read more about this schema of model components in Sympl's 24 | documentation_. 25 | 26 | .. _Sympl: http://sympl.readthedocs.io 27 | .. _documentation: http://sympl.readthedocs.io/en/latest/computation.html 28 | .. _CFL: https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition 29 | -------------------------------------------------------------------------------- /docs/components.rst: -------------------------------------------------------------------------------- 1 | .. _component_list: 2 | .. currentmodule:: climt 3 | 4 | ========== 5 | Components 6 | ========== 7 | 8 | This page documents the different components available through climt. 9 | 10 | 11 | Radiation 12 | --------- 13 | 14 | .. autosummary:: 15 | :toctree: generated/ 16 | 17 | RRTMGLongwave 18 | RRTMGLongwave.__call__ 19 | 20 | RRTMGShortwave 21 | RRTMGShortwave.__call__ 22 | 23 | GrayLongwaveRadiation 24 | GrayLongwaveRadiation.__call__ 25 | 26 | Frierson06LongwaveOpticalDepth 27 | Frierson06LongwaveOpticalDepth.__call__ 28 | 29 | Instellation 30 | Instellation.__call__ 31 | 32 | Convection 33 | ---------- 34 | 35 | .. autosummary:: 36 | :toctree: generated/ 37 | 38 | EmanuelConvection 39 | EmanuelConvection.__call__ 40 | 41 | DryConvectiveAdjustment 42 | DryConvectiveAdjustment.__call__ 43 | 44 | Surface Processes 45 | ----------------- 46 | 47 | .. autosummary:: 48 | :toctree: generated/ 49 | 50 | SimplePhysics 51 | SimplePhysics.__call__ 52 | 53 | SlabSurface 54 | SlabSurface.__call__ 55 | 56 | BucketHydrology 57 | BucketHydrology.__call__ 58 | 59 | Ice and Snow 60 | ------------ 61 | 62 | .. autosummary:: 63 | :toctree: generated/ 64 | 65 | IceSheet 66 | IceSheet.__call__ 67 | 68 | Test Cases 69 | ----------- 70 | 71 | .. autosummary:: 72 | :toctree: generated/ 73 | 74 | HeldSuarez 75 | HeldSuarez.__call__ 76 | 77 | DcmipInitialConditions 78 | DcmipInitialConditions.__call__ 79 | -------------------------------------------------------------------------------- /docs/contributing.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../CONTRIBUTING.rst 2 | -------------------------------------------------------------------------------- /docs/history.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../HISTORY.rst 2 | -------------------------------------------------------------------------------- /docs/ice_cloud_optical_depth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/docs/ice_cloud_optical_depth.png -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | Welcome to climt's documentation! 2 | ================================= 3 | 4 | .. figure:: climt_logo.jpg 5 | :width: 1024px 6 | :height: 1024px 7 | :scale: 50% 8 | :alt: climt logo 9 | :align: center 10 | 11 | 12 | climt (Climate Modelling and Diagnostics Toolkit) is a Python based library which provides a 13 | modular and intuitive approach to writing numerical models of the climate system. climt provides 14 | state-of-the art components and an easy-to-use interface to allow writing research quality models 15 | without the hassle of modifying Fortran code. 16 | 17 | The modular nature of climt allows re-use of model code, allowing users to build progressively 18 | complicated models without having to rewrite the same code at each level of complexity. 19 | 20 | climt uses `sympl`_ for its modelling infrastructure, making climt components and model scripts highly readable 21 | and self-documenting. 22 | 23 | .. _sympl: 24 | https://sympl.readthedocs.io 25 | 26 | Contents: 27 | 28 | .. toctree:: 29 | :maxdepth: 2 30 | 31 | introduction 32 | installation 33 | quickstart 34 | interaction 35 | realistic 36 | component_types 37 | configuration 38 | components 39 | component_manual 40 | initialisation 41 | utilities 42 | contributing 43 | authors 44 | history 45 | 46 | Indices and tables 47 | ================== 48 | 49 | * :ref:`genindex` 50 | * :ref:`modindex` 51 | * :ref:`search` 52 | -------------------------------------------------------------------------------- /docs/initialisation.rst: -------------------------------------------------------------------------------- 1 | .. currentmodule:: climt 2 | 3 | =============== 4 | Initialisation 5 | =============== 6 | 7 | .. autosummary:: 8 | :toctree: generated/ 9 | 10 | get_default_state 11 | get_grid 12 | -------------------------------------------------------------------------------- /docs/introduction.rst: -------------------------------------------------------------------------------- 1 | .. highlight:: python 2 | 3 | ============= 4 | Introduction 5 | ============= 6 | 7 | climt (pronounced *klimt*) is an attempt to build a climate modelling 8 | infrastructure that is easy to use, easy to understand and easy to learn. 9 | 10 | Most climate model components are written in fortran for performance reasons. 11 | For that very reason, it is difficult to change model configurations and 12 | behaviour easily, which is something scientists tend to do all the time during 13 | their research. The earth-science community is converging towards Python as the 14 | language of choice for data analysis tasks, thanks to Python's flexibility and 15 | emphasis on clean, readable code. climt aims to use Python for climate modelling 16 | for these very reasons -- clearly documented components, self documenting 17 | model scripts, and a flexible configuration system will make climate modelling more 18 | reproducible and make the learning curve less steep. 19 | 20 | climt is aimed at a wide spectrum of users -- from students who are curious to learn 21 | about the climate system to researchers who want state-of-the-art components. climt 22 | aims to provide multiple levels of abstraction which will allow the user to tradeoff 23 | ease of use vs. flexibility, depending on their particular needs and experience in 24 | modelling and Python programming. 25 | -------------------------------------------------------------------------------- /docs/liquid_cloud_optical_depth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/docs/liquid_cloud_optical_depth.png -------------------------------------------------------------------------------- /docs/modules.rst: -------------------------------------------------------------------------------- 1 | climt 2 | ===== 3 | 4 | .. toctree:: 5 | :maxdepth: 4 6 | 7 | climt 8 | -------------------------------------------------------------------------------- /docs/naming.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | Naming Quantities 3 | ================= 4 | 5 | * Any quantity that is on vertical interface levels should be 6 | named using the form "_on_interface_levels", while quantities 7 | on mid levels should not have anything appended to the variable name. 8 | Quantities that do not specify "_on_interface_levels" are assumed to be on 9 | mid levels. 10 | This must be in the name rather than as an attribute so that the same 11 | coordinate may be present on both half and full levels (with different names). 12 | -------------------------------------------------------------------------------- /docs/quickstart.rst: -------------------------------------------------------------------------------- 1 | .. highlight:: python 2 | 3 | =========== 4 | Quickstart 5 | =========== 6 | 7 | Let us start with a simple climt model which is not very useful, 8 | but helps illustrate how to use climt: 9 | 10 | .. ipython:: python 11 | 12 | import climt 13 | 14 | # Create some components 15 | radiation = climt.GrayLongwaveRadiation() 16 | 17 | surface = climt.SlabSurface() 18 | 19 | # Get a state dictionary filled with required quantities 20 | # for the components to run 21 | state = climt.get_default_state([radiation, surface]) 22 | 23 | # Run components 24 | tendencies, diagnostics = radiation(state) 25 | 26 | # See output 27 | tendencies.keys() 28 | tendencies['air_temperature'] 29 | 30 | Here, all the essential aspects of creating and running a model 31 | in climt are present: 32 | 33 | * Import the :code:`climt` package 34 | 35 | * Create one or many components 36 | 37 | * Create a state dictionary using :code:`get_default_state` 38 | 39 | * Run the components 40 | 41 | * Do something with the output 42 | 43 | Variables :code:`radiation` and :code:`surface` are two components that we 44 | create. All climt components take a lot of optional arguments: However, by 45 | design, the default options (which are used if you don't specify any arguments) 46 | are meant to be scientifically meaningful. 47 | 48 | The variables :code:`state`, :code:`tendencies` and 49 | :code:`diagnostics` are dictionaries which contain quantities 50 | which act either as inputs **to** components or outputs **from** components. 51 | 52 | The function :code:`get_default_state()`, if called only with a list of components, 53 | will provide a set of quantities which represent 54 | a single column of the atmosphere. These default values may or may not be 55 | meaningful in your context, so it is best to see what they are and change them 56 | according to your needs. 57 | 58 | .. note:: 59 | The square brackets are required in the call to :code:`get_default_state`, even 60 | if it is one component: :code:`climt.get_default_state([radiation])` is the 61 | correct syntax. 62 | 63 | Building more sophisticated models and running them is merely an extended version 64 | of the above simple example. climt makes heavy use of `Sympl`_, and knowledge of 65 | Sympl is necessary to use climt to its full capabilities. So, do go through Sympl's 66 | docs! 67 | 68 | .. _Sympl: http://sympl.readthedocs.io 69 | -------------------------------------------------------------------------------- /docs/readme.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../README.rst 2 | -------------------------------------------------------------------------------- /docs/utilities.rst: -------------------------------------------------------------------------------- 1 | .. _utility_functions: 2 | .. currentmodule:: climt 3 | 4 | General Utilities 5 | ================== 6 | This documents some utility functions available in :mod:`climt`. 7 | Most of the constants functionality is inherited from :mod:`sympl`. 8 | 9 | Constants 10 | ---------- 11 | 12 | .. autosummary:: 13 | :toctree: generated/ 14 | 15 | list_available_constants 16 | set_constants_from_dict 17 | 18 | Miscellaneous 19 | -------------- 20 | 21 | .. autosummary:: 22 | :toctree: generated/ 23 | 24 | mass_to_volume_mixing_ratio 25 | get_interface_values 26 | 27 | 28 | -------------------------------------------------------------------------------- /examples/baroclinic_wave.py: -------------------------------------------------------------------------------- 1 | import climt 2 | from sympl import PlotFunctionMonitor, set_constant 3 | from datetime import timedelta 4 | import matplotlib.pyplot as plt 5 | 6 | 7 | def plot_function(fig, state): 8 | 9 | ax = fig.add_subplot(1, 1, 1) 10 | CS = ax.contourf(state['longitude'], state['latitude'], 11 | state['surface_air_pressure'].to_units('mbar')) 12 | plt.colorbar(CS) 13 | ax.set_title('Surface Pressure at: '+str(state['time'])) 14 | 15 | 16 | monitor = PlotFunctionMonitor(plot_function) 17 | 18 | set_constant('reference_air_pressure', value=1e5, units='Pa') 19 | dycore = climt.GFSDynamicalCore() 20 | dcmip = climt.DcmipInitialConditions(add_perturbation=True) 21 | 22 | grid = climt.get_grid(nx=128, ny=64, nz=20) 23 | 24 | my_state = climt.get_default_state([dycore], grid_state=grid) 25 | 26 | timestep = timedelta(minutes=10) 27 | 28 | out = dcmip(my_state) 29 | 30 | my_state.update(out) 31 | 32 | for i in range(1000): 33 | diag, output = dycore(my_state, timestep) 34 | monitor.store(my_state) 35 | my_state.update(output) 36 | my_state['time'] += timestep 37 | -------------------------------------------------------------------------------- /examples/full_radiation_with_insolation_gcm.py: -------------------------------------------------------------------------------- 1 | import climt 2 | from sympl import ( 3 | PlotFunctionMonitor, 4 | TimeDifferencingWrapper, UpdateFrequencyWrapper, 5 | ) 6 | import numpy as np 7 | from datetime import timedelta 8 | 9 | 10 | def plot_function(fig, state): 11 | 12 | ax = fig.add_subplot(2, 2, 1) 13 | state['surface_temperature'].plot.contourf( 14 | ax=ax, levels=16, robust=True) 15 | ax.set_title('Surface Temperature') 16 | 17 | ax = fig.add_subplot(2, 2, 3) 18 | state['eastward_wind'].mean(dim='lon').plot.contourf( 19 | ax=ax, levels=16, robust=True) 20 | ax.set_title('Zonal Wind') 21 | 22 | ax = fig.add_subplot(2, 2, 2) 23 | state['air_temperature_tendency_from_convection'].transpose().mean( 24 | dim='lon').plot.contourf( 25 | ax=ax, levels=16, robust=True) 26 | ax.set_title('Conv. Heating Rate') 27 | 28 | ax = fig.add_subplot(2, 2, 4) 29 | state['air_temperature'].mean(dim='lon').plot.contourf( 30 | ax=ax, levels=16) 31 | ax.set_title('Temperature') 32 | 33 | fig.tight_layout() 34 | 35 | 36 | # Create plotting object 37 | monitor = PlotFunctionMonitor(plot_function) 38 | 39 | climt.set_constants_from_dict({ 40 | 'stellar_irradiance': {'value': 1200, 'units': 'W m^-2'}}) 41 | 42 | model_time_step = timedelta(seconds=600) 43 | # Create components 44 | 45 | 46 | convection = climt.EmanuelConvection() 47 | simple_physics = TimeDifferencingWrapper(climt.SimplePhysics()) 48 | 49 | constant_duration = 6 50 | 51 | radiation_lw = UpdateFrequencyWrapper( 52 | climt.RRTMGLongwave(), constant_duration*model_time_step) 53 | 54 | radiation_sw = UpdateFrequencyWrapper( 55 | climt.RRTMGShortwave(), constant_duration*model_time_step) 56 | 57 | slab_surface = climt.SlabSurface() 58 | insolation = climt.Instellation() 59 | 60 | dycore = climt.GFSDynamicalCore( 61 | [simple_physics, slab_surface, radiation_sw, 62 | radiation_lw, convection], 63 | number_of_damped_levels=5 64 | ) 65 | grid = climt.get_grid(nx=128, ny=62) 66 | 67 | # Create model state 68 | my_state = climt.get_default_state([dycore], grid_state=grid) 69 | 70 | # Set initial/boundary conditions 71 | latitudes = my_state['latitude'].values 72 | longitudes = my_state['longitude'].values 73 | 74 | zenith_angle = np.radians(latitudes) 75 | surface_shape = [len(longitudes), len(latitudes)] 76 | 77 | my_state['zenith_angle'].values = zenith_angle 78 | my_state['eastward_wind'].values[:] = np.random.randn( 79 | *my_state['eastward_wind'].shape) 80 | my_state['ocean_mixed_layer_thickness'].values[:] = 1 81 | 82 | surf_temp_profile = 290 - (40*np.sin(zenith_angle)**2) 83 | my_state['surface_temperature'].values = surf_temp_profile 84 | 85 | for i in range(1500*24*6): 86 | diagnostics = insolation(my_state) 87 | my_state.update(diagnostics) 88 | diag, my_state = dycore(my_state, model_time_step) 89 | my_state.update(diag) 90 | my_state['time'] += model_time_step 91 | 92 | if i % 6 == 0: 93 | monitor.store(my_state) 94 | 95 | print(my_state['time']) 96 | -------------------------------------------------------------------------------- /examples/grey_gcm.py: -------------------------------------------------------------------------------- 1 | import climt 2 | from sympl import ( 3 | PlotFunctionMonitor, 4 | TimeDifferencingWrapper, 5 | DataArray 6 | ) 7 | import numpy as np 8 | from datetime import timedelta 9 | 10 | 11 | def plot_function(fig, state): 12 | 13 | ax = fig.add_subplot(2, 2, 1) 14 | state['specific_humidity'].mean( 15 | dim='lon').plot.contourf( 16 | ax=ax, levels=16, robust=True) 17 | ax.set_title('Specific Humidity') 18 | 19 | ax = fig.add_subplot(2, 2, 3) 20 | state['eastward_wind'].mean(dim='lon').plot.contourf( 21 | ax=ax, levels=16, robust=True) 22 | ax.set_title('Zonal Wind') 23 | 24 | ax = fig.add_subplot(2, 2, 2) 25 | state['air_temperature_tendency_from_convection'].transpose().mean( 26 | dim='lon').plot.contourf( 27 | ax=ax, levels=16, robust=True) 28 | ax.set_title('Conv. Heating Rate') 29 | 30 | ax = fig.add_subplot(2, 2, 4) 31 | state['air_temperature'].mean(dim='lon').plot.contourf( 32 | ax=ax, levels=16) 33 | ax.set_title('Temperature') 34 | 35 | fig.tight_layout() 36 | 37 | 38 | # Create plotting object 39 | monitor = PlotFunctionMonitor(plot_function) 40 | 41 | climt.set_constants_from_dict({ 42 | 'stellar_irradiance': {'value': 200, 'units': 'W m^-2'}}) 43 | 44 | model_time_step = timedelta(seconds=600) 45 | 46 | # Create components 47 | convection = climt.EmanuelConvection() 48 | simple_physics = TimeDifferencingWrapper(climt.SimplePhysics()) 49 | 50 | radiation = climt.GrayLongwaveRadiation() 51 | 52 | dycore = climt.GFSDynamicalCore( 53 | [simple_physics, radiation, 54 | convection], number_of_damped_levels=5 55 | ) 56 | grid = climt.get_grid(nx=128, ny=62) 57 | 58 | # Create model state 59 | my_state = climt.get_default_state([dycore], grid_state=grid) 60 | 61 | # Set initial/boundary conditions 62 | latitudes = my_state['latitude'].values 63 | longitudes = my_state['longitude'].values 64 | surface_shape = latitudes.shape 65 | 66 | temperature_equator = 300 67 | temperature_pole = 240 68 | 69 | temperature_profile = temperature_equator - ( 70 | (temperature_equator - temperature_pole)*( 71 | np.sin(np.radians(latitudes))**2)) 72 | 73 | my_state['surface_temperature'] = DataArray( 74 | temperature_profile*np.ones(surface_shape), 75 | dims=['lat', 'lon'], attrs={'units': 'degK'}) 76 | my_state['eastward_wind'].values[:] = np.random.randn( 77 | *my_state['eastward_wind'].shape) 78 | 79 | for i in range(1500*24*6): 80 | diag, my_state = dycore(my_state, model_time_step) 81 | my_state.update(diag) 82 | my_state['time'] += model_time_step 83 | 84 | if i % 6 == 0: 85 | monitor.store(my_state) 86 | 87 | print(my_state['time']) 88 | -------------------------------------------------------------------------------- /examples/grey_gcm_energy_balanced.py: -------------------------------------------------------------------------------- 1 | import climt 2 | from sympl import ( 3 | PlotFunctionMonitor, 4 | TimeDifferencingWrapper, 5 | ) 6 | import numpy as np 7 | from datetime import timedelta 8 | 9 | 10 | def plot_function(fig, state): 11 | 12 | ax = fig.add_subplot(2, 2, 1) 13 | state['surface_temperature'].plot.contourf( 14 | ax=ax, levels=16, robust=True) 15 | ax.set_title('Surface Temperature') 16 | 17 | ax = fig.add_subplot(2, 2, 3) 18 | state['eastward_wind'].mean(dim='lon').plot.contourf( 19 | ax=ax, levels=16, robust=True) 20 | ax.set_title('Zonal Wind') 21 | 22 | ax = fig.add_subplot(2, 2, 2) 23 | state['air_temperature_tendency_from_convection'].transpose().mean( 24 | dim='lon').plot.contourf( 25 | ax=ax, levels=16, robust=True) 26 | ax.set_title('Conv. Heating Rate') 27 | 28 | ax = fig.add_subplot(2, 2, 4) 29 | state['air_temperature'].mean(dim='lon').plot.contourf( 30 | ax=ax, levels=16) 31 | ax.set_title('Temperature') 32 | 33 | fig.tight_layout() 34 | 35 | 36 | # Create plotting object 37 | monitor = PlotFunctionMonitor(plot_function) 38 | 39 | climt.set_constants_from_dict({ 40 | 'stellar_irradiance': {'value': 200, 'units': 'W m^-2'}}) 41 | 42 | model_time_step = timedelta(seconds=600) 43 | 44 | # Create components 45 | convection = climt.EmanuelConvection() 46 | simple_physics = TimeDifferencingWrapper(climt.SimplePhysics()) 47 | 48 | radiation = climt.GrayLongwaveRadiation() 49 | slab_surface = climt.SlabSurface() 50 | 51 | dycore = climt.GFSDynamicalCore( 52 | [simple_physics, radiation, slab_surface, 53 | convection], number_of_damped_levels=5 54 | ) 55 | grid = climt.get_grid(nx=128, ny=62) 56 | 57 | # Create model state 58 | my_state = climt.get_default_state([dycore], grid_state=grid) 59 | 60 | # Set initial/boundary conditions 61 | latitudes = my_state['latitude'].values 62 | longitudes = my_state['longitude'].values 63 | 64 | surface_shape = latitudes.shape 65 | 66 | # Set initial/boundary conditions 67 | sw_flux_equator = 300 68 | sw_flux_pole = 0 69 | 70 | sw_flux_profile = sw_flux_equator - ( 71 | (sw_flux_equator - sw_flux_pole)*(np.sin(np.radians(latitudes))**2)) 72 | 73 | my_state['downwelling_shortwave_flux_in_air'].values[:] = sw_flux_profile[np.newaxis, :] 74 | my_state['surface_temperature'].values[:] = 290. 75 | my_state['ocean_mixed_layer_thickness'].values[:] = 5 76 | 77 | my_state['eastward_wind'].values[:] = np.random.randn( 78 | *my_state['eastward_wind'].shape) 79 | 80 | 81 | for i in range(1500*24*6): 82 | diag, my_state = dycore(my_state, model_time_step) 83 | my_state.update(diag) 84 | my_state['time'] += model_time_step 85 | 86 | if i % 6 == 0: 87 | monitor.store(my_state) 88 | 89 | print(my_state['time']) 90 | -------------------------------------------------------------------------------- /examples/held_suarez.py: -------------------------------------------------------------------------------- 1 | import climt 2 | from sympl import PlotFunctionMonitor 3 | import numpy as np 4 | import matplotlib.pyplot as plt 5 | from datetime import timedelta 6 | 7 | 8 | def plot_function(fig, state): 9 | 10 | fig.set_size_inches(10, 5) 11 | 12 | ax = fig.add_subplot(1, 2, 1) 13 | state['air_temperature'].mean(dim='lon').plot.contourf( 14 | ax=ax, levels=16) 15 | ax.set_title('Temperature') 16 | 17 | ax = fig.add_subplot(1, 2, 2) 18 | state['eastward_wind'].mean(dim='lon').plot.contourf( 19 | ax=ax, levels=16) 20 | ax.set_title('Zonal Wind') 21 | 22 | plt.suptitle('Time: '+str(state['time'])) 23 | 24 | 25 | model_time_step = timedelta(seconds=600) 26 | monitor = PlotFunctionMonitor(plot_function) 27 | 28 | grid = climt.get_grid(nx=128, ny=62) 29 | 30 | held_suarez = climt.HeldSuarez() 31 | dycore = climt.GFSDynamicalCore([held_suarez]) 32 | my_state = climt.get_default_state([dycore], grid_state=grid) 33 | 34 | my_state['eastward_wind'].values[:] = np.random.randn(*my_state['eastward_wind'].shape) 35 | 36 | for i in range(10000): 37 | diag, output = dycore(my_state, model_time_step) 38 | if (my_state['time'].hour % 2 == 0 and 39 | my_state['time'].minute == 0): 40 | print('max. zonal wind: ', np.amax(my_state['eastward_wind'].values)) 41 | monitor.store(my_state) 42 | my_state.update(output) 43 | my_state['time'] += model_time_step 44 | -------------------------------------------------------------------------------- /examples/ice_sheet.py: -------------------------------------------------------------------------------- 1 | import climt 2 | from datetime import timedelta 3 | from sympl import PlotFunctionMonitor 4 | 5 | 6 | ice = climt.IceSheet(maximum_snow_ice_height=30.) 7 | 8 | state = climt.get_default_state([ice]) 9 | state['area_type'].values[:] = 'sea_ice' 10 | state['sea_ice_thickness'].values[:] = 5. 11 | state['surface_snow_thickness'].values[:] = 4. 12 | state['surface_temperature'].values[:] = 260. 13 | state['surface_upward_sensible_heat_flux'].values[:] = -0.5 14 | 15 | 16 | def plot_function(fig, model_state): 17 | ax = fig.add_subplot(1, 1, 1) 18 | ax.plot(model_state['snow_and_ice_temperature'].values.squeeze(), 19 | model_state['height_on_ice_interface_levels'].values.squeeze(), 'o-') 20 | ax.set_title('Evolution of Temperature in Ice-Snow layers') 21 | ice_thickness = state['sea_ice_thickness'].values.item() 22 | ax.axhline(ice_thickness, linestyle='--', label='ice-snow interface') 23 | ax.set_ylabel('model levels') 24 | ax.set_xlabel('Kelvin') 25 | ax.set_xlim(270, 273.5) 26 | ax.legend() 27 | 28 | 29 | monitor = PlotFunctionMonitor(plot_function) 30 | 31 | for i in range(3000): 32 | diag, out = ice(state, timedelta(minutes=100)) 33 | print('Surface Temperature: ', out['surface_temperature'].values.item()) 34 | print('Sea Ice thickness: ', state['sea_ice_thickness'].values.item()) 35 | print('--------------------------') 36 | state.update(diag) 37 | state.update(out) 38 | monitor.store(state) 39 | -------------------------------------------------------------------------------- /examples/molecule_profiles.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/examples/molecule_profiles.npz -------------------------------------------------------------------------------- /examples/ozone_profile.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/examples/ozone_profile.npy -------------------------------------------------------------------------------- /examples/radiative_equilibrium.py: -------------------------------------------------------------------------------- 1 | from sympl import ( 2 | AdamsBashforth, PlotFunctionMonitor) 3 | from climt import ( 4 | Frierson06LongwaveOpticalDepth, GrayLongwaveRadiation, 5 | get_default_state) 6 | from datetime import timedelta 7 | 8 | 9 | def plot_function(fig, state): 10 | ax = fig.add_subplot(1, 1, 1) 11 | ax.plot( 12 | state['air_temperature'].values.flatten(), 13 | state['air_pressure'].values.flatten(), '-o') 14 | ax.axes.invert_yaxis() 15 | ax.set_yscale('log') 16 | ax.set_ylim(1e5, 100.) 17 | ax.set_xlabel('Kelvin') 18 | ax.set_ylabel('Pa') 19 | ax.set_title('Radiative equilibrium in a Grey Gas atmosphere') 20 | ax.grid() 21 | 22 | 23 | monitor = PlotFunctionMonitor(plot_function) 24 | diagnostic = Frierson06LongwaveOpticalDepth() 25 | radiation = GrayLongwaveRadiation() 26 | time_stepper = AdamsBashforth([radiation]) 27 | timestep = timedelta(hours=4) 28 | 29 | state = get_default_state([radiation, diagnostic]) 30 | 31 | for i in range(6*7*4*10): 32 | state.update(diagnostic(state)) 33 | diagnostics, new_state = time_stepper(state, timestep) 34 | state.update(diagnostics) 35 | if i % 5 == 0: 36 | monitor.store(state) 37 | state.update(new_state) 38 | -------------------------------------------------------------------------------- /examples/radiative_equilibrium_rrtmg.py: -------------------------------------------------------------------------------- 1 | from sympl import ( 2 | AdamsBashforth, PlotFunctionMonitor) 3 | from climt import RRTMGShortwave, RRTMGLongwave, get_default_state, get_grid 4 | from datetime import timedelta 5 | import matplotlib.pyplot as plt 6 | 7 | 8 | def plot_function(fig, state): 9 | ax = fig.add_subplot(1, 2, 1) 10 | ax.plot( 11 | state['air_temperature_tendency_from_shortwave'].values.flatten(), 12 | state['air_pressure'].values.flatten()/100, '-o', label='SW') 13 | ax.axes.invert_yaxis() 14 | ax.plot( 15 | state['air_temperature_tendency_from_longwave'].values.flatten(), 16 | state['air_pressure'].values.flatten()/100, '-o', label='LW') 17 | ax.axes.invert_yaxis() 18 | ax.set_title('Heating Rates') 19 | ax.grid() 20 | ax.set_xlabel('K/day') 21 | ax.set_ylabel('millibar') 22 | ax.legend() 23 | 24 | ax.set_yscale('log') 25 | ax.set_ylim(1e3, 10.) 26 | ax = fig.add_subplot(1, 2, 2) 27 | ax.plot( 28 | state['air_temperature'].values.flatten(), 29 | state['air_pressure'].values.flatten()/100, '-o') 30 | ax.axes.invert_yaxis() 31 | 32 | ax.set_yscale('log') 33 | ax.set_ylim(1e3, 10.) 34 | ax.set_title('Temperature') 35 | ax.grid() 36 | ax.set_xlabel('K') 37 | ax.set_yticklabels([]) 38 | 39 | plt.suptitle('Radiative Eq. with RRTMG') 40 | 41 | 42 | monitor = PlotFunctionMonitor(plot_function) 43 | rad_sw = RRTMGShortwave() 44 | rad_lw = RRTMGLongwave() 45 | time_stepper = AdamsBashforth([rad_sw, rad_lw]) 46 | timestep = timedelta(hours=3) 47 | 48 | grid = get_grid(nx=1, ny=1, nz=30) 49 | state = get_default_state([rad_sw, rad_lw], grid_state=grid) 50 | 51 | for i in range(100000): 52 | 53 | diagnostics, new_state = time_stepper(state, timestep) 54 | state.update(diagnostics) 55 | if i % 2 == 0: 56 | monitor.store(state) 57 | state = new_state 58 | -------------------------------------------------------------------------------- /examples/radiative_equilibrium_rrtmg_realistic_profiles.py: -------------------------------------------------------------------------------- 1 | from sympl import ( 2 | AdamsBashforth, PlotFunctionMonitor) 3 | from climt import RRTMGShortwave, RRTMGLongwave, get_default_state, get_grid 4 | import numpy as np 5 | from datetime import timedelta 6 | import matplotlib.pyplot as plt 7 | 8 | 9 | def plot_function(fig, state): 10 | ax = fig.add_subplot(1, 2, 1) 11 | ax.plot( 12 | state['air_temperature_tendency_from_shortwave'].values.flatten(), 13 | state['air_pressure'].values.flatten()/100, '-o', label='SW') 14 | ax.axes.invert_yaxis() 15 | ax.plot( 16 | state['air_temperature_tendency_from_longwave'].values.flatten(), 17 | state['air_pressure'].values.flatten()/100, '-o', label='LW') 18 | ax.axes.invert_yaxis() 19 | ax.set_title('Heating Rates') 20 | ax.grid() 21 | ax.set_xlabel('K/day') 22 | ax.set_ylabel('millibar') 23 | ax.legend() 24 | 25 | ax.set_yscale('log') 26 | ax.set_ylim(1e3, 10.) 27 | ax = fig.add_subplot(1, 2, 2) 28 | ax.plot( 29 | state['air_temperature'].values.flatten(), 30 | state['air_pressure'].values.flatten()/100, '-o') 31 | ax.axes.invert_yaxis() 32 | 33 | ax.set_yscale('log') 34 | ax.set_ylim(1e3, 10.) 35 | ax.set_title('Temperature') 36 | ax.grid() 37 | ax.set_xlabel('K') 38 | ax.set_yticklabels([]) 39 | 40 | plt.suptitle('Radiative Eq. with RRTMG') 41 | 42 | 43 | monitor = PlotFunctionMonitor(plot_function) 44 | rad_sw = RRTMGShortwave() 45 | rad_lw = RRTMGLongwave() 46 | time_stepper = AdamsBashforth([rad_sw, rad_lw]) 47 | timestep = timedelta(hours=3) 48 | 49 | grid = get_grid(nx=1, ny=1, nz=60) 50 | state = get_default_state([rad_sw, rad_lw], grid_state=grid) 51 | 52 | tp_profiles = np.load('thermodynamic_profiles.npz') 53 | mol_profiles = np.load('molecule_profiles.npz') 54 | 55 | state['air_pressure'].values[:] = tp_profiles['air_pressure'][:, np.newaxis, np.newaxis] 56 | state['air_temperature'].values[:] = tp_profiles['air_temperature'][:, np.newaxis, np.newaxis] 57 | state['air_pressure_on_interface_levels'].values[:] = tp_profiles['interface_pressures'][:, np.newaxis, np.newaxis] 58 | 59 | state['specific_humidity'].values[:] = mol_profiles['specific_humidity'][:, np.newaxis, np.newaxis]*1e-3 60 | state['mole_fraction_of_carbon_dioxide_in_air'].values[:] = mol_profiles['carbon_dioxide'][:, np.newaxis, np.newaxis] 61 | state['mole_fraction_of_ozone_in_air'].values[:] = mol_profiles['ozone'][:, np.newaxis, np.newaxis] 62 | 63 | 64 | for i in range(100000): 65 | 66 | diagnostics, new_state = time_stepper(state, timestep) 67 | state.update(diagnostics) 68 | if i % 2 == 0: 69 | monitor.store(state) 70 | state = new_state 71 | -------------------------------------------------------------------------------- /examples/radiative_heating_rrtmg_clouds.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | from matplotlib import rcParams 4 | from climt import RRTMGShortwave, RRTMGLongwave, get_default_state 5 | from sympl import get_constant 6 | 7 | prop_cycle = rcParams['axes.prop_cycle'] 8 | colors = prop_cycle.by_key()['color'] 9 | 10 | rad_sw = RRTMGShortwave(mcica=True) 11 | state_sw = get_default_state([rad_sw]) 12 | 13 | rad_lw = RRTMGLongwave(mcica=True) 14 | state_lw = get_default_state([rad_lw]) 15 | 16 | p = state_lw['air_pressure'][:] 17 | p_interface = state_lw['air_pressure_on_interface_levels'][:] 18 | T = state_lw['air_temperature'][:] 19 | R = get_constant('gas_constant_of_dry_air', 'J kg^-1 K^-1') 20 | g = get_constant('gravitational_acceleration', 'm s^-2') 21 | density = p / (R * T) 22 | dz = - np.diff(p_interface, axis=0) / (density * g) # [m] 23 | z = np.cumsum(dz) * 10**-3 # [km] 24 | ice_density = 0.5 * 10**-3 # [kg m^-3] 25 | cloud_base = 10 # [km] 26 | cloud_top = 15 # [km] 27 | cloud_loc = np.where((z > cloud_base) & (z < cloud_top)) 28 | i = 0 29 | for area_fraction in np.arange(0, 1.1, 0.25): 30 | mass_ice_array = area_fraction * ice_density * dz 31 | for state in state_sw, state_lw: 32 | state['mass_content_of_cloud_ice_in_atmosphere_layer'][:] = mass_ice_array 33 | state['cloud_area_fraction_in_atmosphere_layer'][cloud_loc] = area_fraction 34 | sw_heating = rad_sw(state_sw)[1]['air_temperature_tendency_from_shortwave'] 35 | lw_output = rad_lw(state_lw) 36 | lw_heating = lw_output[1]['air_temperature_tendency_from_longwave'] 37 | if i == 0: 38 | label_sw = f'shortwave heating, area fraction {int(area_fraction*100)} %' 39 | label_lw = 'longwave cooling' 40 | else: 41 | label_sw = f'area fraction: {int(area_fraction*100)} %' 42 | label_lw = '' 43 | plt.plot(sw_heating.squeeze(), z.squeeze(), label=label_sw, c=colors[i]) 44 | plt.plot(lw_heating.squeeze(), z.squeeze(), ls='--', label=label_lw, c=colors[i]) 45 | i += 1 46 | plt.axhspan(cloud_base, cloud_top, color='gray', alpha=0.5, label='cloud location') 47 | plt.ylabel('Altitude [km]') 48 | plt.xlabel('Heating rate [K/day]') 49 | plt.legend() 50 | plt.show() 51 | -------------------------------------------------------------------------------- /examples/simple_physics_example.py: -------------------------------------------------------------------------------- 1 | from sympl import PlotFunctionMonitor 2 | from climt import SimplePhysics, get_default_state 3 | from datetime import timedelta 4 | 5 | 6 | def plot_function(fig, state): 7 | ax = fig.add_subplot(1, 1, 1) 8 | ax.plot( 9 | state['specific_humidity'].values.flatten(), 10 | state['air_pressure'].values.flatten(), '-o') 11 | ax.axes.invert_yaxis() 12 | ax.set_ylim(1e5, 100.) 13 | ax.set_xlabel('kg/kg') 14 | ax.set_ylabel('Pa') 15 | ax.set_title('Specific Humidity') 16 | 17 | 18 | monitor = PlotFunctionMonitor(plot_function) 19 | simple_physics = SimplePhysics() 20 | state = get_default_state([simple_physics]) 21 | state['eastward_wind'].values[:] = 10. 22 | timestep = timedelta(hours=1) 23 | 24 | for i in range(600): 25 | 26 | diagnostics, new_state = simple_physics(state, timestep) 27 | print('SH Flux:', diagnostics['surface_upward_sensible_heat_flux'].values.item()) 28 | print('LH Flux:', diagnostics['surface_upward_latent_heat_flux'].values.item()) 29 | state.update(diagnostics) 30 | monitor.store(state) 31 | state.update(new_state) 32 | -------------------------------------------------------------------------------- /examples/thermodynamic_profiles.npz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/examples/thermodynamic_profiles.npz -------------------------------------------------------------------------------- /examples/zenith_angle.py: -------------------------------------------------------------------------------- 1 | import climt 2 | from sympl import PlotFunctionMonitor 3 | from datetime import timedelta 4 | 5 | 6 | def plot_function(fig, state): 7 | 8 | ax = fig.add_subplot(1, 1, 1) 9 | ax.contourf(state['longitude'], state['latitude'], 10 | state['zenith_angle']) 11 | ax.set_xlabel('Longitude') 12 | ax.set_ylabel('Latitude') 13 | 14 | fig.suptitle('Zenith Angle at time: '+str(state['time'])) 15 | 16 | 17 | monitor = PlotFunctionMonitor(plot_function) 18 | 19 | instellation = climt.Instellation() 20 | 21 | state = climt.get_default_state([instellation], 22 | grid_state=climt.get_grid(nx=100, ny=100, 23 | latitude_grid='regular')) 24 | 25 | time_step = timedelta(hours=6) 26 | 27 | for i in range(8000): 28 | diag = instellation(state) 29 | state.update(diag) 30 | monitor.store(state) 31 | state['time'] += time_step 32 | -------------------------------------------------------------------------------- /readthedocs.yml: -------------------------------------------------------------------------------- 1 | build: 2 | image: latest 3 | 4 | python: 5 | version: 3.6 6 | setup_py_install: true 7 | -------------------------------------------------------------------------------- /requirements_dev.txt: -------------------------------------------------------------------------------- 1 | pip>=8.1.2 2 | bumpversion>=0.5.3 3 | wheel>=0.29.0 4 | watchdog>=0.8.3 5 | flake8>=2.6.0 6 | tox>=2.3.1 7 | coverage>=4.1 8 | Sphinx>=1.5.1 9 | cryptography>=1.6 10 | PyYAML>=3.11 11 | pytest>=2.9.2 12 | pytest-cov>=2.4.0 13 | mock>=2.0.0 14 | xarray>=0.8.2 15 | scipy>=0.18.1 16 | numpy>=1.16.0 17 | cython>=0.25 18 | ipython>=5.3.0 19 | coveralls 20 | sympl==0.4.1 21 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 0.17.13 3 | commit = True 4 | tag = False 5 | 6 | [bumpversion:file:setup.py] 7 | search = version='{current_version}' 8 | replace = version='{new_version}' 9 | 10 | [bumpversion:file:climt/__init__.py] 11 | search = __version__ = '{current_version}' 12 | replace = __version__ = '{new_version}' 13 | 14 | [flake8] 15 | exclude = docs,build,climt/_lib 16 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /tests/cached_component_output/TestBergerSolarInsolation-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestBergerSolarInsolation-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestBergerSolarInsolation-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestBergerSolarInsolation-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestBucketHydrology-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestBucketHydrology-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestBucketHydrology-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestBucketHydrology-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestBucketHydrology-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestBucketHydrology-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestBucketHydrology-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestBucketHydrology-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestDcmip-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestDcmip-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestDcmip-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestDcmip-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestDryConvection-3d-0.cache: -------------------------------------------------------------------------------- 1 | CDF -------------------------------------------------------------------------------- /tests/cached_component_output/TestDryConvection-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestDryConvection-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestDryConvection-column-0.cache: -------------------------------------------------------------------------------- 1 | CDF -------------------------------------------------------------------------------- /tests/cached_component_output/TestDryConvection-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestDryConvection-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestEmanuel-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestEmanuel-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestEmanuel-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestEmanuel-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestEmanuel-3d_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestEmanuel-3d_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestEmanuel-3d_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestEmanuel-3d_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestEmanuel-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestEmanuel-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestEmanuel-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestEmanuel-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestEmanuel-column_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestEmanuel-column_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestEmanuel-column_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestEmanuel-column_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestFrierson06LongwaveOpticalDepth-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestFrierson06LongwaveOpticalDepth-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestFrierson06LongwaveOpticalDepth-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestFrierson06LongwaveOpticalDepth-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestFullMoistGFSDycoreWithPhysics-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestFullMoistGFSDycoreWithPhysics-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestFullMoistGFSDycoreWithPhysics-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestFullMoistGFSDycoreWithPhysics-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycore-3d-0.cache: -------------------------------------------------------------------------------- 1 | CDF -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycore-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGFSDycore-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycoreWithDcmipInitialConditions-3d-0.cache: -------------------------------------------------------------------------------- 1 | CDF -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycoreWithDcmipInitialConditions-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGFSDycoreWithDcmipInitialConditions-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycoreWithGrayLongwaveRadiation-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGFSDycoreWithGrayLongwaveRadiation-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycoreWithGrayLongwaveRadiation-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGFSDycoreWithGrayLongwaveRadiation-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycoreWithHeldSuarez-3d-0.cache: -------------------------------------------------------------------------------- 1 | CDF -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycoreWithHeldSuarez-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGFSDycoreWithHeldSuarez-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycoreWithImplicitTendency-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGFSDycoreWithImplicitTendency-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycoreWithImplicitTendency-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGFSDycoreWithImplicitTendency-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycoreWithRRTMGLongwave-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGFSDycoreWithRRTMGLongwave-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGFSDycoreWithRRTMGLongwave-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGFSDycoreWithRRTMGLongwave-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGrayLongwaveRadiation-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGrayLongwaveRadiation-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGrayLongwaveRadiation-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGrayLongwaveRadiation-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGrayLongwaveRadiation-3d_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGrayLongwaveRadiation-3d_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGrayLongwaveRadiation-3d_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGrayLongwaveRadiation-3d_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGrayLongwaveRadiation-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGrayLongwaveRadiation-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGrayLongwaveRadiation-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGrayLongwaveRadiation-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGrayLongwaveRadiation-column_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGrayLongwaveRadiation-column_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGrayLongwaveRadiation-column_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGrayLongwaveRadiation-column_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGridScaleCondensation-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGridScaleCondensation-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGridScaleCondensation-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGridScaleCondensation-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGridScaleCondensation-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGridScaleCondensation-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestGridScaleCondensation-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestGridScaleCondensation-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestHeldSuarez-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestHeldSuarez-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestHeldSuarez-3d-1.cache: -------------------------------------------------------------------------------- 1 | CDF -------------------------------------------------------------------------------- /tests/cached_component_output/TestHeldSuarez-3d_stepping-0.cache: -------------------------------------------------------------------------------- 1 | CDF -------------------------------------------------------------------------------- /tests/cached_component_output/TestHeldSuarez-3d_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestHeldSuarez-3d_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestHeldSuarez-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestHeldSuarez-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestHeldSuarez-column-1.cache: -------------------------------------------------------------------------------- 1 | CDF -------------------------------------------------------------------------------- /tests/cached_component_output/TestHeldSuarez-column_stepping-0.cache: -------------------------------------------------------------------------------- 1 | CDF -------------------------------------------------------------------------------- /tests/cached_component_output/TestHeldSuarez-column_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestHeldSuarez-column_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestIceSheet-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestIceSheet-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestIceSheet-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestIceSheet-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestIceSheet-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestIceSheet-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestIceSheet-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestIceSheet-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestIceSheetLand-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestIceSheetLand-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestIceSheetLand-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestIceSheetLand-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestIceSheetLand-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestIceSheetLand-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestIceSheetLand-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestIceSheetLand-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestInstellation-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestInstellation-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestInstellation-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestInstellation-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwave-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwave-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwave-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwave-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwave-3d_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwave-3d_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwave-3d_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwave-3d_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwave-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwave-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwave-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwave-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwave-column_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwave-column_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwave-column_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwave-column_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveMCICA-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveMCICA-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveMCICA-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveMCICA-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveMCICA-3d_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveMCICA-3d_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveMCICA-3d_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveMCICA-3d_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveMCICA-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveMCICA-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveMCICA-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveMCICA-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveMCICA-column_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveMCICA-column_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveMCICA-column_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveMCICA-column_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithClouds-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithClouds-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithClouds-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithClouds-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithClouds-3d_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithClouds-3d_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithClouds-3d_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithClouds-3d_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithClouds-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithClouds-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithClouds-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithClouds-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithClouds-column_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithClouds-column_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithClouds-column_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithClouds-column_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-3d_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-3d_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-3d_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-3d_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-column_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-column_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-column_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGLongwaveWithExternalInterfaceTemperature-column_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwave-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwave-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwave-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwave-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwave-3d_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwave-3d_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwave-3d_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwave-3d_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwave-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwave-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwave-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwave-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwave-column_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwave-column_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwave-column_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwave-column_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwaveMCICA-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwaveMCICA-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwaveMCICA-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwaveMCICA-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwaveMCICA-3d_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwaveMCICA-3d_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwaveMCICA-3d_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwaveMCICA-3d_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwaveMCICA-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwaveMCICA-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwaveMCICA-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwaveMCICA-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwaveMCICA-column_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwaveMCICA-column_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestRRTMGShortwaveMCICA-column_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestRRTMGShortwaveMCICA-column_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysics-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysics-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysics-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysics-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysics-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysics-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysics-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysics-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-3d_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-3d_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-3d_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-3d_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-column_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-column_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-column_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSimplePhysicsImplicitPrognostic-column_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSlabSurface-3d-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSlabSurface-3d-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSlabSurface-3d-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSlabSurface-3d-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSlabSurface-3d_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSlabSurface-3d_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSlabSurface-3d_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSlabSurface-3d_stepping-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSlabSurface-column-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSlabSurface-column-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSlabSurface-column-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSlabSurface-column-1.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSlabSurface-column_stepping-0.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSlabSurface-column_stepping-0.cache -------------------------------------------------------------------------------- /tests/cached_component_output/TestSlabSurface-column_stepping-1.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CliMT/climt/24779757f5e7529c8a0a1e7ec1e21c55b8447693/tests/cached_component_output/TestSlabSurface-column_stepping-1.cache -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | skipsdist=True 3 | envlist = py27, py34, py35, flake8, cov 4 | 5 | [testenv:flake8] 6 | basepython=python 7 | deps = 8 | -r{toxinidir}/requirements_dev.txt 9 | commands=flake8 climt 10 | 11 | [flake8] 12 | ; Ignoring line lengths and requirement of space around arithmetic operators 13 | ignore = E501,E226,W504,W605 14 | 15 | [testenv] 16 | # passenv = CC FC 17 | PYTHONPATH = {toxinidir}:{toxinidir}/climt 18 | deps = 19 | -r{toxinidir}/requirements_dev.txt 20 | commands = 21 | pip install -U pip 22 | python setup.py develop 23 | python setup.py build_ext --inplace 24 | py.test --basetemp={envtmpdir} -v 25 | 26 | [testenv:cov] 27 | # necessary to make cov find the .coverage file 28 | # see http://blog.ionelmc.ro/2014/05/25/python-packaging/ 29 | passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH 30 | commands = 31 | pip install codecov 32 | python setup.py develop 33 | python setup.py build_ext --inplace 34 | py.test --cov=climt 35 | codecov --token=bf3cc931-f345-4a8f-b4d9-fe636bad4a38 36 | deps = 37 | -r{toxinidir}/requirements_dev.txt 38 | 39 | ; If you want to make tox run the tests with the same versions, create a 40 | ; requirements.txt with the pinned versions and uncomment the following lines: 41 | ; deps = 42 | ; -r{toxinidir}/requirements.txt 43 | --------------------------------------------------------------------------------