@@ -245,12 +245,14 @@ subroutine lilac_init2(mpicom, atm_global_index, atm_lons, atm_lats, &
245
245
write (logunit,* ) trim (subname) // " ctsm gridded component created"
246
246
end if
247
247
248
- cname = " MOSART "
249
- rof_gcomp = ESMF_GridCompCreate(name= cname, rc= rc)
250
- if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' error lilac mosart initialization' )
251
- call ESMF_LogWrite(subname// " Created " // trim (cname)// " component" , ESMF_LOGMSG_INFO)
252
- if (mytask == 0 ) then
253
- write (logunit,* ) trim (subname) // " mosart gridded component created"
248
+ if (couple_to_river) then
249
+ cname = " MOSART "
250
+ rof_gcomp = ESMF_GridCompCreate(name= cname, rc= rc)
251
+ if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' error lilac mosart initialization' )
252
+ call ESMF_LogWrite(subname// " Created " // trim (cname)// " component" , ESMF_LOGMSG_INFO)
253
+ if (mytask == 0 ) then
254
+ write (logunit,* ) trim (subname) // " mosart gridded component created"
255
+ end if
254
256
end if
255
257
256
258
cname = " Coupler from atmosphere to land"
@@ -269,20 +271,22 @@ subroutine lilac_init2(mpicom, atm_global_index, atm_lons, atm_lats, &
269
271
write (logunit,* ) trim (subname) // " coupler component (land to atmosphere) created"
270
272
end if
271
273
272
- cname = " Coupler from river to land"
273
- cpl_rof2lnd_comp = ESMF_CplCompCreate(name= cname, rc= rc)
274
- if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' error lilac cpl_r2l initialization' )
275
- call ESMF_LogWrite(subname// " Created " // trim (cname)// " component" , ESMF_LOGMSG_INFO)
276
- if (mytask == 0 ) then
277
- write (logunit,* ) trim (subname) // " coupler component (atmosphere to land) created"
278
- end if
274
+ if (couple_to_river) then
275
+ cname = " Coupler from river to land"
276
+ cpl_rof2lnd_comp = ESMF_CplCompCreate(name= cname, rc= rc)
277
+ if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' error lilac cpl_r2l initialization' )
278
+ call ESMF_LogWrite(subname// " Created " // trim (cname)// " component" , ESMF_LOGMSG_INFO)
279
+ if (mytask == 0 ) then
280
+ write (logunit,* ) trim (subname) // " coupler component (river to land) created"
281
+ end if
279
282
280
- cname = " Coupler from land to river"
281
- cpl_lnd2rof_comp = ESMF_CplCompCreate(name= cname, rc= rc)
282
- if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' error lilac cpl_l2r initialization' )
283
- call ESMF_LogWrite(subname// " Created " // trim (cname)// " component" , ESMF_LOGMSG_INFO)
284
- if (mytask == 0 ) then
285
- write (logunit,* ) trim (subname) // " coupler component (land to atmosphere) created"
283
+ cname = " Coupler from land to river"
284
+ cpl_lnd2rof_comp = ESMF_CplCompCreate(name= cname, rc= rc)
285
+ if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' error lilac cpl_l2r initialization' )
286
+ call ESMF_LogWrite(subname// " Created " // trim (cname)// " component" , ESMF_LOGMSG_INFO)
287
+ if (mytask == 0 ) then
288
+ write (logunit,* ) trim (subname) // " coupler component (land to river) created"
289
+ end if
286
290
end if
287
291
288
292
!- ------------------------------------------------------------------------
@@ -307,13 +311,15 @@ subroutine lilac_init2(mpicom, atm_global_index, atm_lons, atm_lats, &
307
311
write (logunit,* ) trim (subname) // " CTSM setservices finished"
308
312
end if
309
313
310
- ! Register section -- set services -- mosart
311
- call ESMF_GridCompSetServices(rof_gcomp, userRoutine= rof_register, userRc= user_rc, rc= rc)
312
- if (chkerr(user_rc,__LINE__,u_FILE_u)) call shr_sys_abort(' rof_gcomp register failure' )
313
- if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' rof_gcomp register failure' )
314
- call ESMF_LogWrite(subname// " MOSART SetServices finished!" , ESMF_LOGMSG_INFO)
315
- if (mytask == 0 ) then
316
- write (logunit,* ) trim (subname) // " CTSM setservices finished"
314
+ if (couple_to_river) then
315
+ ! Register section -- set services -- mosart
316
+ call ESMF_GridCompSetServices(rof_gcomp, userRoutine= rof_register, userRc= user_rc, rc= rc)
317
+ if (chkerr(user_rc,__LINE__,u_FILE_u)) call shr_sys_abort(' rof_gcomp register failure' )
318
+ if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' rof_gcomp register failure' )
319
+ call ESMF_LogWrite(subname// " MOSART SetServices finished!" , ESMF_LOGMSG_INFO)
320
+ if (mytask == 0 ) then
321
+ write (logunit,* ) trim (subname) // " CTSM setservices finished"
322
+ end if
317
323
end if
318
324
319
325
! Register section -- set services -- coupler atmosphere to land
@@ -325,13 +331,15 @@ subroutine lilac_init2(mpicom, atm_global_index, atm_lons, atm_lats, &
325
331
write (logunit,* ) trim (subname) // " coupler from atmosphere to land setservices finished"
326
332
end if
327
333
328
- ! Register section -- set services -- river to land
329
- call ESMF_CplCompSetServices(cpl_rof2lnd_comp, userRoutine= cpl_rof2lnd_register, userRc= user_rc, rc= rc)
330
- if (chkerr(user_rc,__LINE__,u_FILE_u)) call shr_sys_abort(' cpl_rof2lnd_comp register failure' )
331
- if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' cpl_rof2lnd_comp register failure' )
332
- call ESMF_LogWrite(subname// " Coupler from river to land SetServices finished!" , ESMF_LOGMSG_INFO)
333
- if (mytask == 0 ) then
334
- write (logunit,* ) trim (subname) // " coupler from river to land setservices finished"
334
+ if (couple_to_river) then
335
+ ! Register section -- set services -- river to land
336
+ call ESMF_CplCompSetServices(cpl_rof2lnd_comp, userRoutine= cpl_rof2lnd_register, userRc= user_rc, rc= rc)
337
+ if (chkerr(user_rc,__LINE__,u_FILE_u)) call shr_sys_abort(' cpl_rof2lnd_comp register failure' )
338
+ if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' cpl_rof2lnd_comp register failure' )
339
+ call ESMF_LogWrite(subname// " Coupler from river to land SetServices finished!" , ESMF_LOGMSG_INFO)
340
+ if (mytask == 0 ) then
341
+ write (logunit,* ) trim (subname) // " coupler from river to land setservices finished"
342
+ end if
335
343
end if
336
344
337
345
! Register section -- set services -- coupler land to atmosphere
@@ -343,13 +351,15 @@ subroutine lilac_init2(mpicom, atm_global_index, atm_lons, atm_lats, &
343
351
write (logunit,* ) trim (subname) // " coupler from land to atmosphere setservices finished"
344
352
end if
345
353
346
- ! Register section -- set services -- coupler land to river
347
- call ESMF_CplCompSetServices(cpl_lnd2rof_comp, userRoutine= cpl_lnd2rof_register, userRc= user_rc, rc= rc)
348
- if (chkerr(user_rc,__LINE__,u_FILE_u)) call shr_sys_abort(' cpl_lnd2rof_comp register failure' )
349
- if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' cpl_lnd2rof_comp register failure' )
350
- call ESMF_LogWrite(subname// " Coupler from land to river SetServices finished!" , ESMF_LOGMSG_INFO)
351
- if (mytask == 0 ) then
352
- write (logunit,* ) trim (subname) // " coupler from land to river setservices finished"
354
+ if (couple_to_river) then
355
+ ! Register section -- set services -- coupler land to river
356
+ call ESMF_CplCompSetServices(cpl_lnd2rof_comp, userRoutine= cpl_lnd2rof_register, userRc= user_rc, rc= rc)
357
+ if (chkerr(user_rc,__LINE__,u_FILE_u)) call shr_sys_abort(' cpl_lnd2rof_comp register failure' )
358
+ if (chkerr(rc,__LINE__,u_FILE_u)) call shr_sys_abort(' cpl_lnd2rof_comp register failure' )
359
+ call ESMF_LogWrite(subname// " Coupler from land to river SetServices finished!" , ESMF_LOGMSG_INFO)
360
+ if (mytask == 0 ) then
361
+ write (logunit,* ) trim (subname) // " coupler from land to river setservices finished"
362
+ end if
353
363
end if
354
364
355
365
!- ------------------------------------------------------------------------
0 commit comments