diff --git a/src/drivers/mct/cime_config/namelist_definition_drv.xml b/src/drivers/mct/cime_config/namelist_definition_drv.xml index cce1a1c83ee..b87b2e7a4ae 100644 --- a/src/drivers/mct/cime_config/namelist_definition_drv.xml +++ b/src/drivers/mct/cime_config/namelist_definition_drv.xml @@ -167,6 +167,19 @@ + + logical + seq_flds + seq_cplflds_inparm + + .true. means that all fields passed to coupler are checked for NaN values + + + .false. + .true. + + + @@ -2677,7 +2690,7 @@ ccsm_pes Determines what ESMF log files (if any) are generated when - USE_ESMF_LIB is TRUE. + USE_ESMF_LIB is TRUE. ESMF_LOGKIND_SINGLE: Use a single log file, combining messages from all of the PETs. Not supported on some platforms. ESMF_LOGKIND_MULTI: Use multiple log files — one per PET. diff --git a/src/drivers/mct/main/component_mod.F90 b/src/drivers/mct/main/component_mod.F90 index dd9a813fef4..d4d9db1923a 100644 --- a/src/drivers/mct/main/component_mod.F90 +++ b/src/drivers/mct/main/component_mod.F90 @@ -32,7 +32,7 @@ module component_mod use mct_mod ! mct_ wrappers for mct lib use perf_mod use ESMF - + use seq_flds_mod, only: nan_check_component_fields implicit none #include @@ -226,9 +226,11 @@ end subroutine comp_init call t_set_prefixf(comp(1)%oneletterid//"_i:") call comp_init( EClock, comp(eci)%cdata_cc, comp(eci)%x2c_cc, comp(eci)%c2x_cc, & NLFilename=NLFilename ) - call t_drvstartf ('check_fields') - call check_fields(comp(eci), eci) - call t_drvstopf ('check_fields') + if(nan_check_component_fields) then + call t_drvstartf ('check_fields') + call check_fields(comp(eci), eci) + call t_drvstopf ('check_fields') + end If call t_unset_prefixf() if (present(seq_flds_c2x_fluxes)) then @@ -682,9 +684,11 @@ end subroutine comp_run call t_set_prefixf(comp(1)%oneletterid//":") call comp_run(EClock, comp(eci)%cdata_cc, comp(eci)%x2c_cc, comp(eci)%c2x_cc) - call t_drvstartf ('check_fields') - call check_fields(comp(eci), eci) - call t_drvstopf ('check_fields') + if(nan_check_component_fields) then + call t_drvstartf ('check_fields') + call check_fields(comp(eci), eci) + call t_drvstopf ('check_fields') + endif call t_unset_prefixf() if ((phase == 1) .and. present(seq_flds_c2x_fluxes)) then diff --git a/src/drivers/mct/shr/seq_flds_mod.F90 b/src/drivers/mct/shr/seq_flds_mod.F90 index 1e13dda0c85..6b634759d58 100644 --- a/src/drivers/mct/shr/seq_flds_mod.F90 +++ b/src/drivers/mct/shr/seq_flds_mod.F90 @@ -335,6 +335,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata) character(len=CSS) :: fldname, fldflow logical :: is_state, is_flux integer :: i,n + logical :: nan_check_component_fields ! use cases namelists logical :: flds_co2a @@ -347,7 +348,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata) namelist /seq_cplflds_inparm/ & flds_co2a, flds_co2b, flds_co2c, flds_co2_dmsa, flds_wiso, glc_nec, & - ice_ncat, seq_flds_i2o_per_cat, flds_bgc + ice_ncat, seq_flds_i2o_per_cat, flds_bgc, nan_check_component_fields ! user specified new fields integer, parameter :: nfldmax = 200 @@ -381,6 +382,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata) glc_nec = 0 ice_ncat = 1 seq_flds_i2o_per_cat = .false. + nan_check_component_fields = .false. unitn = shr_file_getUnit() write(logunit,"(A)") subname//': read seq_cplflds_inparm namelist from: '& @@ -406,6 +408,7 @@ subroutine seq_flds_set(nmlfile, ID, infodata) call shr_mpi_bcast(glc_nec , mpicom) call shr_mpi_bcast(ice_ncat , mpicom) call shr_mpi_bcast(seq_flds_i2o_per_cat, mpicom) + call shr_mpi_bcast(nan_check_component_fields, mpicom) call glc_elevclass_init(glc_nec) diff --git a/src/drivers/mct/shr/seq_infodata_mod.F90 b/src/drivers/mct/shr/seq_infodata_mod.F90 index 86fb0db3518..f15ddfa9067 100644 --- a/src/drivers/mct/shr/seq_infodata_mod.F90 +++ b/src/drivers/mct/shr/seq_infodata_mod.F90 @@ -276,11 +276,11 @@ MODULE seq_infodata_mod !=============================================================================== !BOP =========================================================================== ! -! !IROUTINE: seq_infodata_Init -- read in CCSM shared namelist +! !IROUTINE: seq_infodata_Init -- read in CIME shared namelist ! ! !DESCRIPTION: ! -! Read in input from seq_infodata_inparm namelist, output ccsm derived type for +! Read in input from seq_infodata_inparm namelist, output cime derived type for ! miscillaneous info. ! ! !INTERFACE: ------------------------------------------------------------------