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

Cloud-to-ground lightning flash frequency coupling #347

Merged
merged 6 commits into from
Apr 20, 2023

Conversation

fvitt
Copy link
Collaborator

@fvitt fvitt commented Mar 27, 2023

Description of changes

Enables passing prognostic cloud-to-ground lightning flash frequency from CAM to CTSM

Specific notes

Issues Fixed (include github issue #):
ESCOMP/CTSM#1630
ESCOMP/CAM#567

Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial)
b4b

Testing performed

ERC_D_Ln9_Vnuopc.f19_f19_mg17.QPC6.cheyenne_intel.cam-outfrq3s_cosp
SMS_D_Ln9_Vnuopc.f19_f19_mg17.FWma2000climo.cheyenne_intel.cam-outfrq9s
SMS_D_Ln9_Vnuopc_P720x1.ne30pg3_ne30pg3_mg17.FCLTHIST.cheyenne_intel.cam-outfrq9s
SMS_Ln9_Vnuopc.f19_f19.F2000climo.cheyenne_intel.cam-silhs

fvitt added 5 commits February 2, 2023 20:40
        new file:   cesm/nuopc_cap_share/shr_lightning_coupling_mod.F90
        modified:   cime_config/namelist_definition_drv_flds.xml
        modified:   mediator/esmFldsExchange_cesm_mod.F90
        modified:   mediator/fd_cesm.yaml
        modified:   cesm/nuopc_cap_share/shr_lightning_coupling_mod.F90
        modified:   cime_config/namelist_definition_drv_flds.xml
        modified:   cime_config/namelist_definition_drv_flds.xml
        modified:   mediator/esmFldsExchange_cesm_mod.F90
        modified:   mediator/fd_cesm.yaml
@fvitt fvitt requested a review from jedwards4b March 27, 2023 23:09
@fvitt fvitt assigned fvitt and unassigned fvitt Mar 27, 2023
end if
call shr_log_getLogUnit(s_logunit)
call ESMF_VMGetCurrent(vm, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please change these to use the helper routine
if (chkerr(rc,LINE,u_FILE_u)) return

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's in: use nuopc_shr_methods, only : chkerr

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

! ------------------------------------------------------------------------
! Broadcast values to all processors
! ------------------------------------------------------------------------
call shr_mpi_bcast(atm_provides_lightning_out, mpicom)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please replace this with
ESMF_VMBroadcast
you can find usage examples in, for example, shr_drydep_mod.F90

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

use shr_sys_mod , only : shr_sys_abort
use shr_log_mod , only : shr_log_getLogUnit
use shr_nl_mod , only : shr_nl_find_group_name
use shr_mpi_mod , only : shr_mpi_bcast
Copy link
Collaborator

Choose a reason for hiding this comment

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

We are deprecating shr_mpi_mod, please use ESMF_VMBroadcast instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

        modified:   cesm/nuopc_cap_share/shr_lightning_coupling_mod.F90
@fvitt fvitt requested a review from jedwards4b April 7, 2023 17:45
Copy link
Collaborator

@jedwards4b jedwards4b left a comment

Choose a reason for hiding this comment

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

one more minor change requested and this should be good to go.

@jedwards4b jedwards4b merged commit b4c3d9d into ESCOMP:main Apr 20, 2023
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.

2 participants