igmk / pamtra

Passive and Active Microwave TRAnsfer model
GNU General Public License v3.0
19 stars 16 forks source link

Adding cloud water in simple_passive.ipynb example #46

Closed ephraims28 closed 1 year ago

ephraims28 commented 1 year ago

Hi Jan and Davide, Thank you so much for helping me get PAMTRA set up! I don’t think I ever told you what project I’m working on and how I plan to use PAMTRA, which is something you might be curious about. I’d also like any feedback you have regarding our planned use of PAMTRA. I also have a question at the end.

Im a PhD student at the University of Miami working on the CAESAR campaign (https://www.eol.ucar.edu/field_projects/caesar) and my advisor is Dr. Paquita Zuidema

For operations, we are planning to use PAMTRA to train a retrieval algorithm to get liquid water path, ice water path and water vapor path from aircraft observations. We plan to probably use either a WRF simulation, or output from the AROME Arctic model (2.5km). I see in importer.py that there is already functionality for WRF, I’d have to make a function for the AROME Arctic which I can share back with you if that’s what we use. This use of PAMTRA seems similar to “acloud-mirac_vs_icon-pamtra.ipynb”.

For a research question, we are thinking of also doing an experiment similar to Cadeddu 2017 which looked at the importance of scattering of drizzle, but this time looking at the importance of scattering off cloud ice/snow. We’d be inputting soundings to PAMTRA and varying the amount of cloud liquid, cloud ice, and snow.

I already created a function in core.py to import NetCDF radiosonde soundings from ARM into PAMTRA, and successfully ran a mirrored version of your simple_passive.ipynb using my own soundings. I’m now at the point where I’m trying to add cloud liquid to see how the brightness temperatures respond. For, simplicity/generality, my question will be phrased for doing this to the simple_passive.ipynb instead of asking questions about my custom code. Why when I change readPamtraProfile in core.py from

self.p["hydro_q"][xx,yy,zz,hh] = dataLine.pop(0) , when there is no cloud liquid, to self.p["hydro_q"][xx,yy,zz,hh] = 0.05

, an unrealistically high cloud liquid content, why is there no change in brightness temperatures? Are there more parameters I need to change?

DaveOri commented 1 year ago

Hi again, thank you again for your interest in pamtra. 4 general comments and 1 very specific to this issue follows:

  1. No need to address directly people here. Anyone can write in this space. You might receive help from anyone, also other users like you.
  2. Thanks for explaining the goals of your project. Again, there is no need of doing that in the issue-tracker. If you want to reach the pamtra developers for scientific discussion you might want to consider alternative means of communication (i.e. email).
  3. If you wish to contribute to pamtra. I suggest following the classical path: fork->develop->push->pull_request
  4. core.py does not seem to be the best place to implement some high-level functionalities like an importer. That should be done with a function for the importer.py module. The core.py implements the core pyPamtra object and some legacy functionalities from older stages of pamtra development

Finally, your actual issue: I do not have enough information to provide help. The best way to obtain help is to provide a minimal functioning script that can reproduce your issue, this script should come along with an explanation of what you expect and the results you get. My suggestion is to go back to a functioning example and build from there without changing the codebase. You can look at pamtra_create_RT4_files.py example to understand how the .createProfile(**pamData) function works and construct accordingly your pamData dictionary to be imported. You can also have a look how this is used in the already implemented importers in the importer.py module.

If you do this, someone can try to reproduce your issue and provide feedback and help.

Davide

ephraims28 commented 1 year ago

Ok, that gives me a good starting point. I'll try implementing my function in importer.py instead of core.py and use createProfile.

ephraims28 commented 1 year ago

Resolved