Closed danielphilipp closed 3 months ago
Thanks for making this PR! I'll try to take a look next week, and hopefully someone else can do so in the near future too.
in commit c02d564 "Further improvements and fixes" I basically did:
opts%rt_ir%addsolar
is True as otherwise Rayleigh scattering is removed without being included (as Martin showed).Sorry to be annoying @danielphilipp but could you make that recent commit as a separate PR? The changes you made there are distinct from the seviri ML and it would be easier to treat as two separate PRs, otherwise we risk confusion and stale code. The changes in c02d564
all look OK to me, so it should be simple to merge once a PR is made :)
You are right. I removed c02d564 because it is unrelated to SEVIRI_ML integration but I kept (3) and (4) from this commit as those are related to SEVIRI_ML. Once this PR is merged I will open a new one with the other changes from c02d564.
If you already downloaded SEVIRI_ML I would recommend to update the code with the latest version on Github because the Tensorflow-based CTP models were corrupt and are correctly working now. Theano-based CTP models were okay.
Again, a try to include external SEVIRI_ML (https://github.com/danielphilipp/seviri_ml) functionalities to the ORAC preprocessor. Functionalities are:
(1) a SEVIRI-specific CMA/CPH as from the beginning (2) a CTP estimate + variance which are written to a new preproc file (.ctp.nc), exactly similar to Gareths approach (3) a multilayer flag + multilayer probability + uncertainty, which are written to the .clf.nc file
With the preproc driver switches
USE_SEVIRI_ML_CMA_CPH
,USE_SEVIRI_ML_CTP_FG
andUSE_SEVIRI_ML_MLAY
one can turn those functionalities on or off.If desired, the external Tensorflow ANNs are called in
cloud_typing_pavolonis.F90
. I tested the external ANNs quite extensively. They work on basic Linux machines but also on large batch queue systems where MPI is used around ORAC.To compile the Fortran (and C) interfaces of SEVIRI_ML just run
seviri_ml/get_py_config.sh
to get your Python include/lib directory and the numpy include directory of your currently activated python. Then insert the Python and Numpy include directory into the seviri_ml/make.config file. Change compiler and flags if desired and run make.I added seviri_ml placeholders to the ORAC_LIB file. Open the ORAC_LIB file and insert the SEVIRI_ML directory as
SEVIRI_ML_LIB
andSEVIRI_ML_INCLUDE
. Also insert the Python library and include path toSEVIRI_ML_PYTHON_LIB
SEVIRI_ML_PYTHON_INCLUDE
(as shown byseviri_ml/get_py_config.sh
). Uncomment the last two lines in the ORAC_LIB file to actually link and include the necessary seviri_ml stuff. In theLIBS += ...
please change the -lpython3.X to the library name of your python version. (also shown byseviri_ml/get_py_config.sh
).I recommend Python 3.8 with Tensorflow 2.4.1