Code Monkey home page Code Monkey logo

mt_ckd's People

Contributors

jrmascio avatar kcadyper avatar pernak18 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mt_ckd's Issues

vmrh2o used as mixing ratio with respect to dry gas density and total gas density

Summary of issue

In cntnm_progr.f90, the variable vmrh2o is referred to as a mixing ratio with respect to the total column density:

MT_CKD/src/cntnm_progr.f90

Lines 187 to 188 in f6edc93

print *,' *** For this program, vmr_h2o is taken ', &
'with respect to the total column ***'
The variable W_dry is defined consitently with this definition as:
W_dry = WTOT * (1.-VMRH2O)
However, later it is written:
WK(1) = VMRH2O * W_dry
where wk(1) is supposed to be the column density of water vapour. This implies that h2ovmr is a mixing ratio with respect to the dry column mass, but taken with the line above this suggests wk(1) = w_dry*h2ovmr = wtot*vmrh2o*(1-vmrh2o), which I think leads to an underestimation in the water column density.

Resulting errors in optical depths

This leads to problems in the LBLRTM cntnm.f90, because WTOT (the total column density) is redefined as the sum of wk entries:

DO 10 M = 1, NMOL
      WTOT = WTOT+WK(M)
10 CONTINUE

leading to it being underestimated, and lower than the value of WTOT in cntnm_progr.f90, or the value derived using the ideal gas law $p/kT \times \text{path length}$. This then affects the value of h2o_fac, which is supposed to be the total $\text{H}_2\text{O}$ column density as wk(1)/WTOT, but is now not equal to vmr_h2o because wk(1) and WTOT have both been underestimated.

This doesn't affect the coefficients in WATER.COEF because they are both divided by and multpilied through by h2o_fac at various points in the code. However, it does affect the optical depths in CNTNM.OPTDPT since these rely on the continuum coefficients being multiplied by wk(1).

Proposed solution

TL;DR, I think this can be solved by changing: WK(1) = VMRH2O * W_dry to WK(1) = VMRH2O * WTOT. Using this change, I can get agreement between optical depths calculated with WATER.COEF coefficients, those in CNTNM.OPTDPT and those derived from the netcdf file absco-ref_wv-mt-ckd.nc

recursive clone does not work

Recursive clone fails for some permissions reason.

(base) nicholas@Nicholass-Air Downloads % git clone --recursive https://github.com/AER-RC/MT_CKD.git
Cloning into 'MT_CKD'...
remote: Enumerating objects: 330, done.
remote: Counting objects: 100% (21/21), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 330 (delta 19), reused 19 (delta 19), pack-reused 309
Receiving objects: 100% (330/330), 1.03 MiB | 4.45 MiB/s, done.
Resolving deltas: 100% (111/111), done.
Submodule 'LBLRTM' (https://github.com/AER-RC/LBLRTM.git) registered for path 'LBLRTM'
Submodule 'aer_rt_utils' (https://github.com/AER-RC/aer_rt_utils.git) registered for path 'aer_rt_utils'
Cloning into '/Users/nicholas/Downloads/MT_CKD/LBLRTM'...
remote: Enumerating objects: 4376, done.        
remote: Counting objects: 100% (128/128), done.        
remote: Compressing objects: 100% (94/94), done.        
remote: Total 4376 (delta 76), reused 73 (delta 33), pack-reused 4248        
Receiving objects: 100% (4376/4376), 6.50 MiB | 5.50 MiB/s, done.
Resolving deltas: 100% (3125/3125), done.
Cloning into '/Users/nicholas/Downloads/MT_CKD/aer_rt_utils'...
remote: Enumerating objects: 15, done.        
remote: Counting objects: 100% (15/15), done.        
remote: Compressing objects: 100% (3/3), done.        
remote: Total 15 (delta 12), reused 15 (delta 12), pack-reused 0        
Receiving objects: 100% (15/15), 5.82 KiB | 5.82 MiB/s, done.
Resolving deltas: 100% (12/12), done.
Submodule path 'LBLRTM': checked out '78ab6e374bec049591a0edbd9a4d1bd65f6d7616'
Submodule 'aer_rt_utils' ([email protected]:AER-RC/aer_rt_utils.git) registered for path 'LBLRTM/aer_rt_utils'
Submodule 'cross-sections' ([email protected]:AER-RC/cross-sections.git) registered for path 'LBLRTM/cross-sections'
Cloning into '/Users/nicholas/Downloads/MT_CKD/LBLRTM/aer_rt_utils'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:AER-RC/aer_rt_utils.git' into submodule path '/Users/nicholas/Downloads/MT_CKD/LBLRTM/aer_rt_utils' failed
Failed to clone 'aer_rt_utils'. Retry scheduled
Cloning into '/Users/nicholas/Downloads/MT_CKD/LBLRTM/cross-sections'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:AER-RC/cross-sections.git' into submodule path '/Users/nicholas/Downloads/MT_CKD/LBLRTM/cross-sections' failed
Failed to clone 'cross-sections'. Retry scheduled
Cloning into '/Users/nicholas/Downloads/MT_CKD/LBLRTM/aer_rt_utils'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:AER-RC/aer_rt_utils.git' into submodule path '/Users/nicholas/Downloads/MT_CKD/LBLRTM/aer_rt_utils' failed
Failed to clone 'aer_rt_utils' a second time, aborting
Submodule path 'aer_rt_utils': checked out '13f3a75ddd98fddcf0c4414031acd0d321be8569'
fatal: Failed to recurse into submodule path 'LBLRTM'

Units error

What are the units in the outputted file WATER.COEFF? This line says that the 4th and 5th column has units of 1/(molec/cm**2). But these are not the units? I think the units of the 4th and 5th column are

1/(molecules/cm^2) * (1/amagat)

Documentation

I think the README needs improved documentation. I think it should say something like the following


MT_CKD

MT_CKD is an empirical parameterization of the "water vapor continuum" absorption. This parameterization is used in combination with other opacity sources (line absorption, Rayleigh scattering, etc.) to model how radiation passes through gases (e.g. see the LBLRTM model).

This repository contains a Fortran program which will compute MT_CKD absorption coefficients as a function of wavelength and temperature.

Building and Usage

Clone this repository, and update the submodules:

git clone https://github.com/AER-RC/MT_CKD.git
cd MT_CKD
git submodule init
git submodule update

Navigate to the build directory, and build.

cd build
make -f make_cntnm <target>

The value of <target> depends on your OS and Fortran compiler. For example, to build on MacOS with gfortran, use make -f make_cntnm osxGNUdbl. To see all options run make -f make_cntnm.

After running make, an executable is produce in the root directory of the repository.... etc [EXPLAIN HOW TO RUN].

  • EXPLAIN UNITS OF THE OUTPUT OPACITY
  • EXPLAIN HOW TO COMPUTE AN OPTICAL DEPTH WITH THE OUTPUT OPACITY

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.