@@ -268,6 +268,7 @@ subroutine HCOI_Chunk_Init()
268
268
use cam_logfile, only: iulog
269
269
use spmd_utils, only: masterproc, mpicom, masterprocid
270
270
use spmd_utils, only: npes, iam
271
+ use perf_mod, only: t_startf, t_stopf
271
272
272
273
use mpi, only: MPI_INTEGER
273
274
use ESMF, only: ESMF_VM, ESMF_VMGetCurrent, ESMF_VMGet
@@ -358,11 +359,13 @@ subroutine HCOI_Chunk_Init()
358
359
359
360
!- ----------------------------------------------------------------------
360
361
362
+ call t_startf(' HCOI_Chunk_Init' )
363
+
361
364
if (masterproc) then
362
365
write (iulog,* ) " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
363
366
write (iulog,* ) " HEMCO: Harmonized Emissions Component"
364
367
write (iulog,* ) " https://doi.org/10.5194/gmd-14-5487-2021 (Lin et al., 2021)"
365
- write (iulog,* ) " HEMCO_CESM interface version 1.2.2 "
368
+ write (iulog,* ) " HEMCO_CESM interface version 1.3.0 "
366
369
write (iulog,* ) " You are using HEMCO version " , ADJUSTL (HCO_VERSION)
367
370
write (iulog,* ) " ROOT: " , HcoRoot
368
371
write (iulog,* ) " Config File: " , HcoConfigFile
@@ -837,6 +840,7 @@ subroutine HCOI_Chunk_Init()
837
840
! 4) configuration file initializes ReadList
838
841
! 5) universal scale factor for each HEMCO species (Hco_ScaleInit)
839
842
!- ----------------------------------------------------------------------
843
+ call t_startf(' HCO_HCOX_Init' )
840
844
call HCO_Init(HcoState, HMRC)
841
845
if (masterproc .and. HMRC /= HCO_SUCCESS) then
842
846
write (iulog,* ) " ******************************************"
@@ -861,6 +865,7 @@ subroutine HCOI_Chunk_Init()
861
865
ASSERT_(HMRC== HCO_SUCCESS)
862
866
863
867
if (masterproc) write (iulog,* ) " > HEMCO extensions initialized successfully!"
868
+ call t_stopf(' HCO_HCOX_Init' )
864
869
865
870
!- ----------------------------------------------------------------------
866
871
! Additional exports: Verify if additional diagnostic quantities
@@ -1051,6 +1056,8 @@ subroutine HCOI_Chunk_Init()
1051
1056
write (iulog,* ) " > HEMCO additional exports for CESM2-GC initialized!"
1052
1057
endif
1053
1058
endif
1059
+
1060
+ call t_stopf(' HCOI_Chunk_Init' )
1054
1061
end subroutine HCOI_Chunk_Init
1055
1062
! EOC
1056
1063
!- -----------------------------------------------------------------------------
@@ -1140,6 +1147,9 @@ subroutine HCOI_Chunk_Run(cam_in, phys_state, pbuf2d, phase)
1140
1147
use cam_logfile, only: iulog
1141
1148
use spmd_utils, only: masterproc, mpicom, masterprocid, iam
1142
1149
1150
+ ! Performance timers
1151
+ use perf_mod, only: t_startf, t_stopf
1152
+
1143
1153
! ESMF
1144
1154
use ESMF, only: ESMF_GridCompRun
1145
1155
@@ -1164,6 +1174,8 @@ subroutine HCOI_Chunk_Run(cam_in, phys_state, pbuf2d, phase)
1164
1174
1165
1175
logical , save :: FIRST = .true.
1166
1176
1177
+ call t_startf(' HCOI_Chunk_Run' )
1178
+
1167
1179
if (masterproc) then
1168
1180
write (iulog,* ) " HEMCO_CESM: Running HCOI_Chunk_Run phase" , phase
1169
1181
endif
@@ -1201,20 +1213,26 @@ subroutine HCOI_Chunk_Run(cam_in, phys_state, pbuf2d, phase)
1201
1213
! hco_pbuf2d => pbuf2d
1202
1214
1203
1215
! Set fields from CAM state before run
1216
+ call t_startf(' HCO_CAM_GetBefore_HCOI' )
1204
1217
call CAM_GetBefore_HCOI(cam_in, phys_state, pbuf2d, phase, &
1205
1218
HcoState, ExtState)
1219
+ call t_stopf(' HCO_CAM_GetBefore_HCOI' )
1206
1220
1207
1221
! Run the gridded component.
1222
+ call t_startf(' HCO_GridCompRun' )
1208
1223
call ESMF_GridCompRun(HCO_GridComp, rc= RC)! importState=HCO_GridCompState, &
1209
1224
! exportState=HCO_GridCompState, &
1210
1225
! rc=RC)
1226
+ call t_stopf(' HCO_GridCompRun' )
1211
1227
1212
1228
ASSERT_(RC== ESMF_SUCCESS)
1213
1229
endif
1214
1230
1215
1231
if (masterproc) then
1216
1232
write (iulog,* ) " HEMCO_CESM: Leaving HCOI_Chunk_Run"
1217
1233
endif
1234
+
1235
+ call t_stopf(' HCOI_Chunk_Run' )
1218
1236
end subroutine HCOI_Chunk_Run
1219
1237
! EOC
1220
1238
!- -----------------------------------------------------------------------------
@@ -1265,27 +1283,30 @@ subroutine HCO_GC_Run(GC, IMPORT, EXPORT, Clock, RC)
1265
1283
!
1266
1284
! !USES:
1267
1285
!
1268
- use cam_logfile, only: iulog
1269
- use spmd_utils, only: masterproc, iam
1286
+ use cam_logfile, only: iulog
1287
+ use spmd_utils, only: masterproc, iam
1288
+
1289
+ ! Performance timers
1290
+ use perf_mod, only: t_startf, t_stopf
1270
1291
1271
1292
! HEMCO
1272
- use HCO_Interface_Common, only: GetHcoVal, GetHcoDiagn
1273
- use HCO_Clock_Mod, only: HcoClock_Set, HcoClock_Get
1274
- use HCO_Clock_Mod, only: HcoClock_EmissionsDone
1275
- use HCO_Diagn_Mod, only: HcoDiagn_AutoUpdate
1276
- use HCO_Driver_Mod, only: HCO_Run
1277
- use HCO_EmisList_Mod, only: Hco_GetPtr
1278
- use HCO_Calc_Mod, only: Hco_EvalFld
1279
- use HCO_FluxArr_Mod, only: HCO_FluxArrReset
1280
- use HCO_GeoTools_Mod, only: HCO_CalcVertGrid, HCO_SetPBLm
1281
-
1282
- use HCO_State_Mod, only: HCO_GetHcoId
1293
+ use HCO_Interface_Common, only: GetHcoVal, GetHcoDiagn
1294
+ use HCO_Clock_Mod, only: HcoClock_Set, HcoClock_Get
1295
+ use HCO_Clock_Mod, only: HcoClock_EmissionsDone
1296
+ use HCO_Diagn_Mod, only: HcoDiagn_AutoUpdate
1297
+ use HCO_Driver_Mod, only: HCO_Run
1298
+ use HCO_EmisList_Mod, only: Hco_GetPtr
1299
+ use HCO_Calc_Mod, only: Hco_EvalFld
1300
+ use HCO_FluxArr_Mod, only: HCO_FluxArrReset
1301
+ use HCO_GeoTools_Mod, only: HCO_CalcVertGrid, HCO_SetPBLm
1302
+
1303
+ use HCO_State_Mod, only: HCO_GetHcoId
1283
1304
1284
1305
! HEMCO Extensions
1285
- use HCOX_Driver_Mod, only : HCOX_Run
1306
+ use HCOX_Driver_Mod, only : HCOX_Run
1286
1307
1287
1308
! Physical constants
1288
- use physconst, only : mwdry
1309
+ use physconst, only : mwdry
1289
1310
1290
1311
! Necessary imported properties for physics calculations
1291
1312
use hco_cam_convert_state_mod, only: State_HCO_PSFC, State_HCO_TK, State_HCO_PBLH, State_CAM_chmDMS
@@ -1553,6 +1574,8 @@ subroutine HCO_GC_Run(GC, IMPORT, EXPORT, Clock, RC)
1553
1574
! Run HEMCO!
1554
1575
!- ----------------------------------------------------------------------
1555
1576
1577
+ call t_startf(' HCO_HCOX_Run' )
1578
+
1556
1579
! Run HCO core module
1557
1580
! Pass phase as argument. Phase 1 will update the emissions list,
1558
1581
! phase 2 will calculate the emissions. Emissions will be written into
@@ -1611,6 +1634,8 @@ subroutine HCO_GC_Run(GC, IMPORT, EXPORT, Clock, RC)
1611
1634
1612
1635
if (masterproc .and. nCalls < 10 ) write (iulog,* ) " HEMCO_CESM: HCOX_Run"
1613
1636
1637
+ call t_stopf(' HCO_HCOX_Run' )
1638
+
1614
1639
!- ----------------------------------------------------------------------
1615
1640
! Update "autofill" diagnostics.
1616
1641
! Update all 'AutoFill' diagnostics. This makes sure that all
0 commit comments