@@ -431,7 +431,7 @@ subroutine InitializeP0(gcomp, importState, exportState, clock, rc)
431431 if (ChkErr(rc,__LINE__,u_FILE_u)) return
432432 if (isPresent .and. isSet) then
433433 if (trim (value) .eq. ' .true.' ) restart_eor = .true.
434- end if
434+ endif
435435
436436 if (localPet == 0 ) call cap_profiling(" mom" , " InitializeP0" , " E" )
437437
@@ -506,7 +506,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
506506
507507 if (localPet == 0 ) call cap_profiling(" mom" , " InitializeAdvertise" , " B" )
508508
509- if (write_runtimelog) timeiads = MPI_Wtime()
509+ if (write_runtimelog) timeiads = MPI_Wtime()
510510
511511 call ESMF_LogWrite(subname// ' enter' , ESMF_LOGMSG_INFO)
512512
@@ -571,7 +571,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
571571
572572 if (cesm_coupled) then
573573 ! Multiinstance logfile name needs a correction
574- if (len_trim (inst_suffix) > 0 ) then
574+ if (len_trim (inst_suffix) > 0 ) then
575575 n = index (logfile, ' .' )
576576 logfile = logfile(1 :n-1 )// trim (inst_suffix)// logfile(n:)
577577 endif
@@ -660,7 +660,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
660660 if (is_root_pe()) then
661661 write (stdout,* ) ' ice_ncat = ' , Ice_ocean_boundary% ice_ncat
662662 endif
663- end if
663+ endif
664664
665665 if (is_root_pe()) then
666666 write (stdout,* ) subname// ' start time: y,m,d-' ,year,month,day,' h,m,s=' ,hour,minute,second
@@ -945,7 +945,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
945945 call NUOPC_Advertise(exportState, standardName= fldsFrOcn(n)% stdname, name= fldsFrOcn(n)% shortname, rc= rc)
946946 if (ChkErr(rc,__LINE__,u_FILE_u)) return
947947 enddo
948- if (write_runtimelog .and. is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time ' , MPI_Wtime()- timeiads
948+ if (write_runtimelog .and. is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time ' , MPI_Wtime()- timeiads
949949
950950 if (localPet == 0 ) call cap_profiling(" mom" , " InitializeAdvertise" , " E" )
951951
@@ -1044,7 +1044,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
10441044
10451045 if (localPet == 0 ) call cap_profiling(" mom" , " InitializeRealize" , " B" )
10461046
1047- if (write_runtimelog) timeirls = MPI_Wtime()
1047+ if (write_runtimelog) timeirls = MPI_Wtime()
10481048
10491049 call shr_log_setLogUnit (stdout)
10501050
@@ -1253,7 +1253,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
12531253 do n = 1 ,numOwnedElements
12541254 lonMesh(n) = ownedElemCoords(2 * n-1 )
12551255 latMesh(n) = ownedElemCoords(2 * n)
1256- end do
1256+ enddo
12571257
12581258 elemMaskArray = ESMF_ArrayCreate(Distgrid, maskMesh, rc= rc)
12591259 if (ChkErr(rc,__LINE__,u_FILE_u)) return
@@ -1270,8 +1270,8 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
12701270 mask(n) = ocean_grid% mask2dT(ig,jg)
12711271 lon(n) = ocean_grid% geolonT(ig,jg)
12721272 lat(n) = ocean_grid% geolatT(ig,jg)
1273- end do
1274- end do
1273+ enddo
1274+ enddo
12751275
12761276 eps_omesh = get_eps_omesh(ocean_state)
12771277 do n = 1 ,lsize
@@ -1297,7 +1297,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
12971297 write (err_msg, frmt)n,maskMesh(n),mask(n)
12981298 call MOM_error(FATAL, err_msg)
12991299 endif
1300- end do
1300+ enddo
13011301
13021302 ! realize the import and export fields using the mesh
13031303 call MOM_RealizeFields(importState, fldsToOcn_num, fldsToOcn, " Ocn import" , &
@@ -1342,8 +1342,8 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
13421342 mod2med_areacor(k) = model_areas(k) / mesh_areas(k)
13431343 med2mod_areacor(k) = mesh_areas(k) / model_areas(k)
13441344 endif
1345- end do
1346- end do
1345+ enddo
1346+ enddo
13471347 deallocate (mesh_areas)
13481348 deallocate (model_areas)
13491349
@@ -1621,7 +1621,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
16211621 if (use_cdeps_inline) then
16221622 call mom_inline_init(gcomp, clock, eMesh, localPet, rc= rc)
16231623 if (ChkErr(rc,__LINE__,u_FILE_u)) return
1624- end if
1624+ endif
16251625
16261626 !- --------------------------------
16271627 ! write out diagnostics
@@ -1632,7 +1632,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
16321632 ! if (ChkErr(rc,__LINE__,u_FILE_u)) return
16331633
16341634 timere = 0 .
1635- if (write_runtimelog .and. is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time ' , MPI_Wtime()- timeirls
1635+ if (write_runtimelog .and. is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time ' , MPI_Wtime()- timeirls
16361636
16371637 if (localPet == 0 ) call cap_profiling(" mom" , " InitializeRealize" , " E" )
16381638
@@ -1669,7 +1669,7 @@ subroutine DataInitialize(gcomp, rc)
16691669
16701670 if (localPet == 0 ) call cap_profiling(" mom" , " DataInitialize" , " B" )
16711671
1672- if (write_runtimelog) timedis = MPI_Wtime()
1672+ if (write_runtimelog) timedis = MPI_Wtime()
16731673
16741674 ! query the Component for its clock, importState and exportState
16751675 call ESMF_GridCompGet(gcomp, clock= clock, importState= importState, exportState= exportState, rc= rc)
@@ -1731,7 +1731,7 @@ subroutine DataInitialize(gcomp, rc)
17311731 enddo
17321732 endif
17331733
1734- if (write_runtimelog .and. is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time ' , MPI_Wtime()- timedis
1734+ if (write_runtimelog .and. is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time ' , MPI_Wtime()- timedis
17351735
17361736 if (localPet == 0 ) call cap_profiling(" mom" , " DataInitialize" , " E" )
17371737
@@ -1793,10 +1793,10 @@ subroutine ModelAdvance(gcomp, rc)
17931793
17941794 if (localPet == 0 ) call cap_profiling(" mom" , " ModelAdvance" , " B" )
17951795
1796- if (profile_memory) call ESMF_VMLogMemInfo(" Entering MOM Model_ADVANCE: " )
1797- if (write_runtimelog) then
1796+ if (profile_memory) call ESMF_VMLogMemInfo(" Entering MOM Model_ADVANCE: " )
1797+ if (write_runtimelog) then
17981798 timers = MPI_Wtime()
1799- if (timere> 0 . .and. is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time since last time step ' ,timers- timere
1799+ if (timere> 0 . .and. is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time since last time step ' ,timers- timere
18001800 endif
18011801
18021802 call shr_log_setLogUnit (stdout)
@@ -1911,7 +1911,7 @@ subroutine ModelAdvance(gcomp, rc)
19111911 if (use_cdeps_inline) then
19121912 call mom_inline_run(clock, ocean_public, ocean_grid, ice_ocean_boundary, dbug, rc= rc)
19131913 if (ChkErr(rc,__LINE__,u_FILE_u)) return
1914- end if
1914+ endif
19151915
19161916 !- --------------
19171917 ! Update MOM6
@@ -1956,7 +1956,7 @@ subroutine ModelAdvance(gcomp, rc)
19561956 ! turn off the alarm
19571957 call ESMF_AlarmRingerOff(restart_alarm, rc= rc )
19581958 if (ChkErr(rc,__LINE__,u_FILE_u)) return
1959- end if
1959+ endif
19601960
19611961 write_restart_eor = .false.
19621962 if (restart_eor) then
@@ -1966,8 +1966,8 @@ subroutine ModelAdvance(gcomp, rc)
19661966 ! turn off the alarm
19671967 call ESMF_AlarmRingerOff(stop_alarm, rc= rc )
19681968 if (ChkErr(rc,__LINE__,u_FILE_u)) return
1969- end if
1970- end if
1969+ endif
1970+ endif
19711971
19721972#ifndef CESMCOUPLED
19731973 call is_restart_fh(clock, restartfh_info, write_restartfh)
@@ -2071,12 +2071,12 @@ subroutine ModelAdvance(gcomp, rc)
20712071 enddo
20722072 endif
20732073
2074- if (write_runtimelog) then
2074+ if (write_runtimelog) then
20752075 timere = MPI_Wtime()
2076- if (is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time ' , timere- timers
2076+ if (is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time ' , timere- timers
20772077 endif
20782078
2079- if (profile_memory) call ESMF_VMLogMemInfo(" Leaving MOM Model_ADVANCE: " )
2079+ if (profile_memory) call ESMF_VMLogMemInfo(" Leaving MOM Model_ADVANCE: " )
20802080
20812081 if (localPet == 0 ) call cap_profiling(" mom" , " ModelAdvance" , " E" )
20822082
@@ -2299,7 +2299,7 @@ subroutine ocean_model_finalize(gcomp, rc)
22992299 write (stdout,* ) ' MOM: --- finalize called ---'
23002300 endif
23012301 rc = ESMF_SUCCESS
2302- if (write_runtimelog) timefs = MPI_Wtime()
2302+ if (write_runtimelog) timefs = MPI_Wtime()
23032303
23042304 call ESMF_GridCompGetInternalState(gcomp, ocean_internalstate, rc)
23052305 if (ChkErr(rc,__LINE__,u_FILE_u)) return
@@ -2334,7 +2334,7 @@ subroutine ocean_model_finalize(gcomp, rc)
23342334 call outputlog_run(clock, .true. , rc= rc)
23352335 if (ChkErr(rc,__LINE__,u_FILE_u)) return
23362336
2337- if (write_runtimelog .and. is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time ' , MPI_Wtime()- timefs
2337+ if (write_runtimelog .and. is_root_pe()) write (stdout,* ) ' In ' ,trim (subname),' time ' , MPI_Wtime()- timefs
23382338
23392339 if (localPet == 0 ) call cap_profiling(" mom" , " ocean_model_finalize" , " E" )
23402340
0 commit comments