NCAR / icar

The Intermediate Complexity Atmospheric Research model (ICAR)
MIT License
72 stars 53 forks source link

HICAR PR#2 -- Microphysics options #157

Closed d-reynolds closed 1 year ago

d-reynolds commented 1 year ago

TYPE: New feature/enhancement

KEYWORDS: Microphysics, vertical winds, ISHMAEL, Morrison

SOURCE: Dylan Reynolds, SLF

DESCRIPTION OF CHANGES: Adds back in the Morrison MP scheme, and adds the new ISHMAEL MP scheme. One part of facilitating these changes is separating out the calculation of w_real from the diagnostic update and making it a module procedure of the wind module. This way, vertical motion can be updated at each MP timestep, since it should be supplied to the MP modules. This last bit has been changed for the MP, Morrison, and Thompson MP schemes, where the vertical motion supplied to the MP schemes is changed from w_grid to w_real, as the modules expect. Lastly, prognostic variables for the ISHMAEL scheme have been added to domain object, and all prognostic MP variables (mass, number, and aspect ratio concentrations) have been added as namelist options so that they can be forced by output of other ICAR simulations. This allows for the nesting of runs, since all MP information should be provided as input. The outputting of ISHMAEL's aspect ratio concentrations will be included in the larger I/O update which is coming very soon.

Important Note: When debugging, I have found that the ISHMAEL MP scheme fails when using debugompslow with the gnu compiler. Otherwise it works no problem. I have just chalked this up to some compiler issue and moved ahead, since it is a novel MP scheme and has an issue only in this one case.

TESTS CONDUCTED: 1 day of precipitation over Swiss Alps

gutmann commented 1 year ago

ISHMAEL MP scheme fails when using debugompslow with the gnu

What happens when it fails? it could be that gnu is better at catching an array out of bounds or uninitialized array that might be a real problem.

scrasmussen commented 1 year ago

Note: this PR depends on #156. The changes there will get this PR passing the CI tests.

gutmann commented 1 year ago

@scrasmussen can you take a look, this is still failing after merging #156 with

At line 2231 of file objects/options_obj.f90 (unit = 10, file = 'icar_options.nml')
Fortran runtime error: End of file

Error termination. Backtrace:
#0  0x7f7fcd732700 in ???
#1  0x7f7fcd733259 in ???
#2  0x7f7fcd733f3f in ???
#3  0x7f7fcd967a9b in ???
#4  0x7f7fcd968cc4 in ???
#5  0x7f7fcd96b859 in ???
#6  0x7f7fcd96bb01 in ???
#7  0x[55](https://github.com/NCAR/icar/actions/runs/3647195678/jobs/6159134891#step:6:56)67d9ae9611 in __options_interface.options_implementation_MOD_time_parameters_namelist
    at objects/options_obj.f90:2231
#8  0x5[56](https://github.com/NCAR/icar/actions/runs/3647195678/jobs/6159134891#step:6:57)7d9b0181c in __options_interface_MOD_init
    at objects/options_obj.f90:64
#9  0x5567d9acdf93 in __initialization_MOD_init_model
    at main/init.f90:70
#10  0x5567da70f721 in icar
    at main/driver.f90:[64](https://github.com/NCAR/icar/actions/runs/3647195678/jobs/6159134891#step:6:65)
#11  0x5567da711db2 in main
    at main/driver.f90:22
scrasmussen commented 1 year ago

@scrasmussen can you take a look, this is still failing after merging #156 with

At line 2231 of file objects/options_obj.f90 (unit = 10, file = 'icar_options.nml')
Fortran runtime error: End of file

Error termination. Backtrace:
#0  0x7f7fcd732700 in ???
#1  0x7f7fcd733259 in ???
#2  0x7f7fcd733f3f in ???
#3  0x7f7fcd967a9b in ???
#4  0x7f7fcd968cc4 in ???
#5  0x7f7fcd96b859 in ???
#6  0x7f7fcd96bb01 in ???
#7  0x[55](https://github.com/NCAR/icar/actions/runs/3647195678/jobs/6159134891#step:6:56)67d9ae9611 in __options_interface.options_implementation_MOD_time_parameters_namelist
  at objects/options_obj.f90:2231
#8  0x5[56](https://github.com/NCAR/icar/actions/runs/3647195678/jobs/6159134891#step:6:57)7d9b0181c in __options_interface_MOD_init
  at objects/options_obj.f90:64
#9  0x5567d9acdf93 in __initialization_MOD_init_model
  at main/init.f90:70
#10  0x5567da70f721 in icar
  at main/driver.f90:[64](https://github.com/NCAR/icar/actions/runs/3647195678/jobs/6159134891#step:6:65)
#11  0x5567da711db2 in main
  at main/driver.f90:22

Sure thing! I'll take a look at it

scrasmussen commented 1 year ago

@gutmann I brought in the updates to the hicar branch and things seem good to merge now. I also ran this on the gen_ideal_test.py with four images and it ran to completion.