You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-41Lines changed: 41 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Bryan M. Karpowicz, Ph.D. - USRA/GESTAR/NASA 610.1 Global Modeling and Assimilation Office, with Contributions from Patrick Stegmann, Dr.-Ing. - JCSDA
4
4
5
-
This is a basic python interface to CRTM v2.4.0.
5
+
This is a basic python interface to CRTM v2.4.x or CRTMv3.
6
6
7
7
The user interface is designed to be very similar to the python RTTOV interface. So, the user sets profiles, passes them to an object for a desired sensor, runs either the forward model/K-matrix, and pulls the brightness temperature/Jacobian/transmission/emissivity out of the object.
8
8
@@ -14,57 +14,47 @@ This `README` has 4 parts:
14
14
3. Importing -- how to use this library in a project.
15
15
4. Using the interface -- HOWTO/run through on how to use this interface
- For the novice that doesn't care about where or how this installs, look at the crtm-bundle and run kickstart_pyCRTM.sh Otherwise...
22
-
- Dependencies CRTM, h5py, numpy and scikit-build (install those first, if you don't have them). Note crtm must be built with the static option (`ecbuild --static`)
23
-
- Configuration
24
-
First modify `setup.cfg` to point to the crtm install location (path underneath should contain `lib/libcrtm.a`).
21
+
For a quicker install experience users may choose to install using the `make_it_so.sh` which will install conda along with the required packages in a miniconda environment `pycrtm`. There are four options `apple_silicon` for Macs with an M2/M3/M4/M? processor, `apple_intel` to install miniconda for Macs with an intel processor, `linux` for all other linux systems, `skip_install` which will skip installing miniconda and attempt to overwrite a `pycrtm` miniconda environment, `skip_create` which will use an existing miniconda pycrtm environment, and `skip_crtm_download` which will skip downloading CRTMv3 in addition to skipping the creation of a miniconda environment. Users are cautioned to look over the script to make sure it will not overwrite existing installs, or fill up your home directory, if space is limited. For example if your system does not have a python install and you a starting from scratch on an M4 Mac simply type:
25
22
```
26
-
[Setup]
27
-
# Specify the location of the crtm install (ecbuild install ONLY)
In the example above the coefficients will be included with the pycrtm install. To change this, set `coef_with_install` and set `path` to the location where you would like crtm coefficients stored. If you already have a directory with coefficients, you can set `download` and `coef_with_install` to False, and set `path` to that location. The pycrtm configuration will then point to the location in `path`.
42
-
43
-
- Installation
44
-
There are two recommended ways to install. The first, if the user has full write access to their python distribution, it may be installed globally using:
25
+
The script will install miniconda3, CRTMv3, pyCRTM, and run the `test_atms.py` script to verify pyCRTM is working. If you already have miniconda on your machine you can simply run `skip_install` which will just install a pycrtm miniconda environment, CRTMv3, pyCRTM and run the `test_atms.py` script to verify pyCRTM has been installed and is functioning properly. Once installed a user may use the new `pycrtm` conda environment by typing:
45
26
```
46
-
python3 setup.py install
27
+
conda activate pycrtm
47
28
```
48
-
This will take some time as it will download coefficients, move them around, compile the pycrtm module, and link against th crtm library.
49
29
50
-
The second, if the user doesn't have full write access to their python distribution is to first build a wheel, and install using pip:
51
-
```
52
-
python3 setup.py bdist_wheel
53
-
```
54
-
This will take some time as it will download coefficients, move them around, compile the pycrtm module, and link against the crtm library. Once the wheel has been built, it may be installed locally using pip:
30
+
If that doesn't suit your taste, read on for a more step-by-step approach.
31
+
32
+
- Dependencies CRTM, h5py, numpy and scikit-build (install those first, if you don't have them).
33
+
- Configuration
34
+
First modify `setup.cfg` to point to the crtm install location (path underneath should contain one of the following: `lib/libcrtm.a`,`lib64/libcrtm.a`, `lib/libcrtm.so`, or `lib64/libcrtm.so`).
paired with appending `/discover/nobackup/projects/gmao/obsdev/bkarpowi/pythonModules/`to the `PYTHONPATH` environment variable in your .bashrc or .cshrc.
59
-
60
-
For Bash this is:
46
+
Next, pycrtm must have a location where all desired coefficients are expanded in a flat directory. In the configuration above, the installer will create `path_used` and populate it with symbolic links to all available coefficients in `source_path.` If `link_from_source_to_path_used` is set to `False`, `source_path` will be ignored and it is assumed the user has placed coefficients in `path_used` and pyCRTM will search for coefficients in this directory.
47
+
- Installation
48
+
If the user has full write access to their python distribution, it may be installed globally using:
Optionally, you may supply "-v" for a more verbose output while it is installing. Either way, this will take some time as it will symlink coefficients downloaded when you install CRTM, compile the pycrtm module, and link against th crtm library.
57
+
68
58
69
59
Compiler options are handled autmoatically through cmake. On HPC systems this means loading the right set of modules. For example, if you would like pycrtm compiled with intel, you would load the same intel modules you used to build crtm.
70
60
@@ -91,6 +81,17 @@ The following scripts will run CRTM without aerosols or clouds:
91
81
For those Jupyter notebook fans, there is even Jupyter notebook example simulating ATMS:
92
82
*`$PWD/testCases/test_atms.ipynb`
93
83
84
+
Additonal More Advanced Examples:
85
+
*`$PWD/testCases/test_atms_jacobian.py` Provides cloud jacobians (provide --plot command line argument to generate plot)
86
+
*`$PWD/testCases/test_atms_subset_cloudnames.py` Provides example of using a channel subset, along with Cloud type names.
87
+
*`$PWD/testCases/test_atms_subset.py` Provides exmaple using a channel subset.
88
+
*`$PWD/testCases/test_cris_jacobian.py` Provides cloud/aerosol jacobians (provide --plot command line argument to generate plot)
89
+
*`$PWD/testCases/test_cris_subset.py` Provides exmaple using a channel subset.
90
+
91
+
Active Sensor Examples (Available with CRTMv3.1.x)
92
+
*`$PWD/testCases/test_cloudsat.py` tests forward model of active sensor (provide --plot for plot of reflectivity/attenuated reflectivity)
93
+
*`$PWD/testCases/test_cloudsat_jacobian.py` tests cloud jacobians (provide --plot for cloud jacobian plot, --attenuated for attenuated reflectivity, otherwise jacobians of reflectivity are plotted.
94
+
94
95
## 3. Importing
95
96
96
97
```Python
@@ -108,7 +109,6 @@ Once initialized, the user will need to provide values for the desired profiles
0 commit comments