Skip to content

Commit CRTMv3 configuration (backward compatible with 2.4)#19

Merged
karpob merged 54 commits into
masterfrom
feature/prepCRTMv3
Jun 4, 2025
Merged

Commit CRTMv3 configuration (backward compatible with 2.4)#19
karpob merged 54 commits into
masterfrom
feature/prepCRTMv3

Conversation

@karpob
Copy link
Copy Markdown
Collaborator

@karpob karpob commented May 8, 2025

Description

Adds CRTMv3 capability while maintaining 2.4 compatibility. Also modernizes setup removing deprecated (or soon to be deprecated) "python setup.py install" method in favor of "pip install . " method. Adds helper scripts to install CRTMv3 + pyCRTM, along with dependencies using miniconda.

Also resolves #17 fixing issues related to setuptools version changes, along with f2py issues. This is done by replacing f2py executable which has bug related to passing preprocessor directives with "python -m numpy.f2py" which passes preprocessor directives correctly.

Issue(s) addressed

Resolves #17

Dependencies

List the other PRs that this PR is dependent on:

  • none

Impact

Expected impact on downstream repositories:
None

Checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have run the unit tests before creating the PR

karpob and others added 30 commits June 29, 2023 16:12
…_library_path load, throw breadcrumbs to user to set dyld_library_path, because you that is a no-no to do automatically.
…only build option vs distutil) bug that ignores any directive flags for #ifdef. Force the issue by putting it into f90flags.
@karpob
Copy link
Copy Markdown
Collaborator Author

karpob commented May 21, 2025

Ok, sorry. Final Answer. There was some stuff with 2.x that "worked", but I thought it would be best to clean it up too avoid questions in make_it_so.sh

@karpob
Copy link
Copy Markdown
Collaborator Author

karpob commented May 27, 2025

Added a fix for #21 along with adding some options to make_it_so.sh, along with using wget in place of git as under some circumstances, I was getting some strange behavior under for miniconda.

@chengdang
Copy link
Copy Markdown

chengdang commented May 27, 2025

With this branch, I encountered consistent Kernel crash for visible sensors, for example, if set sensor_id = 'v.abi_g18'in example test_atms.ipynb, Kernel crashed after executing crtmOb.loadInst():

crtmOb.loadInst()

The Kernel crashed while executing code in the current cell or a previous cell. 
Please review the code in the cell(s) to identify a possible cause of the failure. 
Click [here](https://aka.ms/vscodeJupyterKernelCrash) for more info. 
View Jupyter [log](command:jupyter.viewOutput) for further details.

I've added a few print statements in function loadInst, the function itself is running fine, the Kernel crashed after executing the last line. I tried both binary and nc files, Kernal crashed regardless of file format. So far I only seen this with visible sensors. Not sure why.

@karpob
Copy link
Copy Markdown
Collaborator Author

karpob commented May 27, 2025

I do. Well, I think I do, as I can duplicate the error, but it dies after the call to run_direct. The coefficient linking only grabs ODPS, not ODAS, so the SpcCoeffs are there, but not the TauCoeffs. If you do the equivalent in test_atms.py you'll get:

Inquire_AlgorithmID_nc4(FAILURE) : File /Users/bkarpowi/github/crtm_20250505/pycrtm/ext/crtm_coefficients/v.abi_g18.TauCoeff.nc not found.
 CRTM_Load_TauCoeff(FAILURE) : cannot obtain transmittance algorithm ID from file /Users/bkarpowi/github/crtm_20250505/pycrtm/ext/crtm_coefficients/v.abi_g18.TauCoeff.nc
 CRTM_Init(FAILURE) : Error loading TauCoeff data
 Error Initializing CRTM

I can add a check to the linking to search each SpcCoeff to find a TauCoeff pair, if it's missing.

@karpob
Copy link
Copy Markdown
Collaborator Author

karpob commented May 27, 2025

image

@karpob
Copy link
Copy Markdown
Collaborator Author

karpob commented May 27, 2025

The last push should fix the missing visible Tau files.

@chengdang
Copy link
Copy Markdown

chengdang commented May 28, 2025

It's working now. Thanks for fixing the "1001" case!

@karpob
Copy link
Copy Markdown
Collaborator Author

karpob commented May 29, 2025

I think I've updated just about anything I could find that would be a loose end. So hopefully, that's the last commit on this PR. I think I have merge capability, but will hold off for a few days just in case someone finds something else (which seems to be more frequent that usual).

@karpob karpob closed this Jun 4, 2025
@karpob karpob reopened this Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

weird scikit builld problem with python versions >3.11

3 participants