Skip to content
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

cam6_4_035: Generalized aerosol wet removal #1099

Merged
merged 15 commits into from
Sep 23, 2024

Conversation

fvitt
Copy link

@fvitt fvitt commented Jul 23, 2024

Closes #1098

fvitt added 3 commits July 23, 2024 10:23
        new file:   src/chemistry/aerosol/aero_convproc.F90
        new file:   src/chemistry/aerosol/aero_deposition_cam.F90
        new file:   src/chemistry/aerosol/aero_wetdep_cam.F90
        renamed:    src/chemistry/modal_aero/modal_aero_data.F90 -> src/chemistry/aerosol/modal_aero_data.F90
        deleted:    src/chemistry/modal_aero/modal_aero_convproc.F90
        modified:   bld/build-namelist
        modified:   bld/namelist_files/namelist_definition.xml
        modified:   src/chemistry/aerosol/aerosol_properties_mod.F90
        modified:   src/chemistry/aerosol/aerosol_state_mod.F90
        modified:   src/chemistry/aerosol/modal_aerosol_properties_mod.F90
        modified:   src/chemistry/aerosol/modal_aerosol_state_mod.F90
        modified:   src/chemistry/aerosol/wetdep.F90
        modified:   src/chemistry/modal_aero/aero_model.F90
        modified:   src/physics/cam/physpkg.F90
        modified:   src/physics/cam7/physpkg.F90
        modified:   src/chemistry/aerosol/aero_deposition_cam.F90
        modified:   src/chemistry/aerosol/aerosol_state_mod.F90
        modified:   src/chemistry/aerosol/modal_aerosol_state_mod.F90
        modified:   bld/namelist_files/namelist_definition.xml
@fvitt fvitt added the BFB bit for bit tag label Jul 23, 2024
@fvitt fvitt self-assigned this Jul 23, 2024
@fvitt fvitt removed the chill label Aug 5, 2024
@cacraigucar cacraigucar self-requested a review August 26, 2024 23:38
@cacraigucar cacraigucar requested review from nusbaume and removed request for cacraigucar September 4, 2024 16:44
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just had some questions and suggestions. Also I had started reviewing aero_convproc.F90 code before realizing that most of it was simply copied over from already-existing CAM code and thus not directly relevant to this PR, so please feel free to ignore those requests if they start to become a hassle. Thanks!

src/chemistry/aerosol/aero_convproc.F90 Outdated Show resolved Hide resolved
src/chemistry/aerosol/aero_convproc.F90 Outdated Show resolved Hide resolved
src/chemistry/aerosol/aero_convproc.F90 Show resolved Hide resolved
src/chemistry/aerosol/aero_convproc.F90 Outdated Show resolved Hide resolved
src/chemistry/aerosol/aero_convproc.F90 Outdated Show resolved Hide resolved
src/chemistry/aerosol/aero_wetdep_cam.F90 Outdated Show resolved Hide resolved
src/chemistry/aerosol/aero_wetdep_cam.F90 Outdated Show resolved Hide resolved
src/chemistry/aerosol/aerosol_state_mod.F90 Show resolved Hide resolved
src/chemistry/aerosol/modal_aerosol_properties_mod.F90 Outdated Show resolved Hide resolved
src/chemistry/aerosol/modal_aerosol_state_mod.F90 Outdated Show resolved Hide resolved
        modified:   src/chemistry/aerosol/aero_convproc.F90
        modified:   src/chemistry/aerosol/aero_deposition_cam.F90
        modified:   src/chemistry/aerosol/aero_wetdep_cam.F90
        modified:   src/chemistry/aerosol/modal_aerosol_state_mod.F90
        modified:   src/chemistry/aerosol/aero_convproc.F90
        modified:   src/chemistry/aerosol/aero_convproc.F90
        modified:   src/chemistry/aerosol/aero_wetdep_cam.F90
@fvitt fvitt requested a review from nusbaume September 18, 2024 15:15
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a lot better! Just a couple missed questions from the first review (and one possible missing variable).

src/chemistry/aerosol/aero_wetdep_cam.F90 Show resolved Hide resolved
src/chemistry/aerosol/modal_aerosol_properties_mod.F90 Outdated Show resolved Hide resolved
src/chemistry/aerosol/aerosol_state_mod.F90 Show resolved Hide resolved
        modified:   src/chemistry/aerosol/modal_aerosol_properties_mod.F90
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me now. Thanks!

        modified:   src/physics/carma/cam/carma_intr.F90
Copy link
Collaborator

@cacraigucar cacraigucar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a cursory review (@nusbaume did the thorough one). I had one question, but otherwise I didn't see any problems.

Comment on lines +185 to +189
allocate(newobj%sulfate_mode_ndxs_(newobj%nbins()),stat=ierr)
if( ierr /= 0 ) then
nullify(newobj)
return
end if
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this isn't new logic, and I probably have forgotten the answer. How does this allocation ultimately error out (i.e. stop the run?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the class constructor is not successful then a null object pointer is returned. The caller needs to check that the pointer is associated, like so:

       aero_props => modal_aerosol_properties()
       if (.not.associated(aero_props)) then
          call endrun(subrname//' : construction of aero_props modal_aerosol_properties object failed')
       end if

@cacraigucar cacraigucar changed the title Generalized aerosol wet removal cam6_4_035: Generalized aerosol wet removal Sep 20, 2024
@fvitt fvitt merged commit ef7617d into ESCOMP:cam_development Sep 23, 2024
2 checks passed
gold2718 pushed a commit to gold2718/CAM that referenced this pull request Oct 16, 2024
Merge pull request ESCOMP#1099 from fvitt/gen_aero_wet_rmvl

cam6_4_035: Generalized aerosol wet removal

ESCOMP commit: ef7617d
gold2718 pushed a commit to gold2718/CAM that referenced this pull request Oct 16, 2024
Merge pull request ESCOMP#1099 from fvitt/gen_aero_wet_rmvl

cam6_4_035: Generalized aerosol wet removal

ESCOMP commit: ef7617d
gold2718 pushed a commit to gold2718/CAM that referenced this pull request Nov 8, 2024
Merge pull request ESCOMP#1099 from fvitt/gen_aero_wet_rmvl

cam6_4_035: Generalized aerosol wet removal

ESCOMP commit: ef7617d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFB bit for bit tag
Projects
Status: Tag
Development

Successfully merging this pull request may close these issues.

3 participants