-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding CALIPSO-OPAQ new diagnostics and GROUND LIDAR + ATLID simulators #11
Adding CALIPSO-OPAQ new diagnostics and GROUND LIDAR + ATLID simulators #11
Conversation
When running regression test from the python script given in COSPv2.0/driver : [rguzman@loholt2 driver]$ pwd [rguzman@loholt2 driver]$ python test_cosp2Imp.py data/outputs/UKMO/cosp2_output_um.ref.nc data/outputs/UKMO/cosp2_output_um.nc “Bnds” values in outputs: cosp2_output_um.nc [55, 56] |
The Python scripts attached to this comment were used to plot all of the figures found in the documents "CF3D_betamol_SRhisto_figures.pdf" and "2D_variables_figures.pdf" attached in the two previous comments. No 2D map outputs were available so all the plots of "2D_variables_figures.pdf" are diagnoctic values as a function of the location number (153) and all the plots of "CF3D_betamol_SRhisto_figures.pdf" are mean profiles or sum of occurrences of the 153 locations. |
Hi @rodrigoguzman-lmd . Thanks for this. I've skimmed through the changes and I see some files that appear to be changed, although they don't relate to this particular change (e.g. cfmip2 namelists). Is that a mistake? |
Hi @alejandrobodas . I did not modified those files, so I don't understand why these files appear as been changed. Maybe I did something wrong at some point. All the files that I modified are listed in the document of my very first comment of this pull request. |
We need to understand this before we merge any changes to the master branch. @dustinswales do you know what's happened? |
@alejandrobodas @rodrigoguzman-lmd |
@dustinswales @alejandrobodas Should I erase that extra cfmip2 folder, commit again and push to my repo? |
Ok, I moved the files from the "cfmip2/cfmip2" extra folder to the "cfmip2" folder and also moved the files from the "cosp-interface/cosp-interface" extra folder to the "cosp-interface" folder. I'm doing a new commit and pushing to my repo. |
@rodrigoguzman-lmd I noticed that for each new Lidar platform there are new source files (COSPv2.0/src/simulator/actsim/), and new example routines to compute the optical inputs (subsample_and_optics_example/optics/cosp_optics.F90). It appears that it would be easy to generalize these into a common lidar simulator that can be configured for multiple platforms. |
@dustinswales Thank you for your comment. I have managed to merge the "atlid" and "groundlidar" simulator into one generic "lidar" simulator as you suggested. The "calipso" simulator having too many specificities (cloud phase, OPAQ variables) is still a simulator on its own. New lidar platforms can easily be defined from this new generic lidar simulator. All of the results shown in the documents/comments above are unchanged in this new version of the code. |
Hi @rodrigoguzman-lmd There are still many files that appear as modified that have no relationship with this change (e.g. cosp_errorHandling.F90, cosp_defs.h, and others). Also, .mod and object files from your local build have been added to the repository. Please can you tidy things up a bit more? |
Hi @alejandrobodas Sorry for that, I think the folder is clean now. |
Thanks @rodrigoguzman-lmd , it is much cleaner now. I only have a few more minor requests:
|
@rodrigoguzman-lmd The main change is that cosp_errorCheck has an added layer of protection to guard against spurious inputs. So for example, if the inputs provided to COSP are not consistent with the diagnostics requested, the simulator is turned off, requested diagnostics are set to fill values, and an error message is provided. You will need to update your repo with the main COSP2 repo. Luckily for you... I started implementing your diagnostics in CESM2 and did this the other day (see what I did in cosp_errorCheck of https://github.com/CFMIP/COSPv2.0/blob/lmd-newLidarDiag/src/cosp.F90). I'm sure there's a slick way in git to update a local file in your repository with a file in a remote repository. |
@alejandrobodas Thanks for your last minor comments, I have taken into account all 3 of them. What shall I do (type) in order to resolve these conflicts? I don't want to mess everything up being so close to the goal 😃 Thanks for your help! |
@rodrigoguzman-lmd To recap, I think we are really close, I may take a look at further generalizing the lidar simulators. I think we can combine them further with the use of optional arguments. |
Updated figure files after bug correction on COSP_OPAQ subroutine (file "lidar_simulator.F90"). |
@rodrigoguzman-lmd forrtl: severe (408): fort: (3): Subscript #2 of the array TMP has value 0 which is less than the lower bound of 1 I tracked this down to some logic in one of your new subroutines, cosp_opaq in https://github.com/rodrigoguzman-lmd/COSPv2.0/blob/964cb7267f7e6cd1bdcda23d99106dc01c02b18c/src/simulator/actsim/lidar_simulator.F90. First you compute some cloud masks. First, the all-cloud mask, "cldy" is being used to determine the vertical indices for the opaque cloud., whereas the opaque cloud mask should be used, "cldyopaq". I put some print statements in CESM2 to confirm this (level 1 = TOA): |
@rodrigoguzman-lmd My intention with these changes is just to make the code a bit more simple, easier to read, and (hopefully) easy to extend for future users who may want to add more lidar simulators. I removed the "_nophase" functions/modules and added optional input/outputs to the original lidar routines. The " nophase" code is really just a subset of the original lidar simulator, so there's no need in having these lines of code repeated. I adopted a more general naming convention for the lidar variables, we now have three lidar simulators... So for example, the backscatter coefficients used by the calipso lidar simulator previously weren't identified by instrument in COSP (e.g cospIN%betatot), whereas for the new lidar simulators they are (e.g. cospIN%betatot_atlid and cospIN%betatot_grLidar532). Below is a piece of the cosp input derived type to illustrate: |
@dustinswales |
@rodrigoguzman-lmd |
@rodrigoguzman-lmd |
…IO error in CESM2.
@rodrigoguzman-lmd @dustinswales |
@dustinswales @alejandrobodas |
Adding CALIPSO-OPAQ new diagnostics and GROUND LIDAR + ATLID simulators
documentation_OPAQ+GroundLidar+ATLID_COSPv2.pdf