@@ -37,11 +37,11 @@ module cdeps_dglc_comp
37
37
#endif
38
38
use dshr_methods_mod , only : dshr_state_diagnose, chkerr, memcheck
39
39
use dshr_strdata_mod , only : shr_strdata_type, shr_strdata_advance, shr_strdata_init_from_config
40
- use dshr_mod , only : dshr_model_initphase, dshr_init, dshr_mesh_init, dshr_alarm_init
40
+ use dshr_mod , only : dshr_model_initphase, dshr_init, dshr_mesh_init
41
41
use dshr_mod , only : dshr_state_setscalar, dshr_set_runclock, dshr_check_restart_alarm
42
42
use dshr_dfield_mod , only : dfield_type, dshr_dfield_add, dshr_dfield_copy
43
43
use dshr_fldlist_mod , only : fldlist_type, dshr_fldlist_realize
44
- use nuopc_shr_methods, only : shr_get_rpointer_name
44
+ use nuopc_shr_methods, only : shr_get_rpointer_name, alarmInit
45
45
! Datamode specialized modules
46
46
use dglc_datamode_noevolve_mod, only : dglc_datamode_noevolve_advertise
47
47
use dglc_datamode_noevolve_mod, only : dglc_datamode_noevolve_init_pointers
@@ -736,18 +736,18 @@ subroutine ModelSetRunClock(gcomp, rc)
736
736
if (ChkErr(rc,__LINE__,u_FILE_u)) return
737
737
738
738
if (trim (glc_avg_period) == ' hour' ) then
739
- call dshr_alarm_init (mclock, valid_alarm, ' nhours' , opt_n= 1 , alarmname= ' alarm_valid_inputs' , rc= rc)
739
+ call alarmInit (mclock, valid_alarm, ' nhours' , opt_n= 1 , alarmname= ' alarm_valid_inputs' , rc= rc)
740
740
if (ChkErr(rc,__LINE__,u_FILE_u)) return
741
741
else if (trim (glc_avg_period) == ' day' ) then
742
- call dshr_alarm_init (mclock, valid_alarm, ' ndays' , opt_n= 1 , alarmname= ' alarm_valid_inputs' , rc= rc)
742
+ call alarmInit (mclock, valid_alarm, ' ndays' , opt_n= 1 , alarmname= ' alarm_valid_inputs' , rc= rc)
743
743
if (ChkErr(rc,__LINE__,u_FILE_u)) return
744
744
else if (trim (glc_avg_period) == ' yearly' ) then
745
- call dshr_alarm_init (mclock, valid_alarm, ' yearly' , alarmname= ' alarm_valid_inputs' , rc= rc)
745
+ call alarmInit (mclock, valid_alarm, ' yearly' , alarmname= ' alarm_valid_inputs' , rc= rc)
746
746
if (ChkErr(rc,__LINE__,u_FILE_u)) return
747
747
else if (trim (glc_avg_period) == ' glc_coupling_period' ) then
748
748
call ESMF_TimeIntervalGet(mtimestep, s= dtime, rc= rc)
749
749
if (ChkErr(rc,__LINE__,u_FILE_u)) return
750
- call dshr_alarm_init (mclock, valid_alarm, ' nseconds' , opt_n= dtime, alarmname= ' alarm_valid_inputs' , rc= rc)
750
+ call alarmInit (mclock, valid_alarm, ' nseconds' , opt_n= dtime, alarmname= ' alarm_valid_inputs' , rc= rc)
751
751
if (ChkErr(rc,__LINE__,u_FILE_u)) return
752
752
else
753
753
call ESMF_LogWrite(trim (subname)// " : ERROR glc_avg_period = " // trim (glc_avg_period)// " not supported" , &
@@ -760,55 +760,55 @@ subroutine ModelSetRunClock(gcomp, rc)
760
760
if (ChkErr(rc,__LINE__,u_FILE_u)) return
761
761
762
762
!- ---------------
763
- ! Restart alarm
763
+ ! Stop alarm
764
764
!- ---------------
765
- call ESMF_LogWrite(subname// ' setting restart alarm for dglc' , ESMF_LOGMSG_INFO)
766
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
767
-
768
- call NUOPC_CompAttributeGet(gcomp, name= " restart_option" , value= restart_option, rc= rc)
765
+ call ESMF_LogWrite(subname// ' setting stop alarm for dglc' , ESMF_LOGMSG_INFO)
766
+ call NUOPC_CompAttributeGet(gcomp, name= " stop_option" , value= stop_option, rc= rc)
769
767
if (ChkErr(rc,__LINE__,u_FILE_u)) return
770
768
771
- call NUOPC_CompAttributeGet(gcomp, name= " restart_n " , value= cvalue, rc= rc)
769
+ call NUOPC_CompAttributeGet(gcomp, name= " stop_n " , value= cvalue, rc= rc)
772
770
if (ChkErr(rc,__LINE__,u_FILE_u)) return
773
- read (cvalue,* ) restart_n
771
+ read (cvalue,* ) stop_n
774
772
775
- call NUOPC_CompAttributeGet(gcomp, name= " restart_ymd " , value= cvalue, rc= rc)
773
+ call NUOPC_CompAttributeGet(gcomp, name= " stop_ymd " , value= cvalue, rc= rc)
776
774
if (ChkErr(rc,__LINE__,u_FILE_u)) return
777
- read (cvalue,* ) restart_ymd
775
+ read (cvalue,* ) stop_ymd
778
776
779
- call dshr_alarm_init (mclock, restart_alarm, restart_option , &
780
- opt_n = restart_n , &
781
- opt_ymd = restart_ymd , &
777
+ call alarmInit (mclock, stop_alarm, stop_option , &
778
+ opt_n = stop_n , &
779
+ opt_ymd = stop_ymd , &
782
780
RefTime = mcurrTime, &
783
- alarmname = ' alarm_restart ' , rc= rc)
781
+ alarmname = ' alarm_stop ' , rc= rc)
784
782
if (ChkErr(rc,__LINE__,u_FILE_u)) return
785
783
786
- call ESMF_AlarmSet(restart_alarm , clock= mclock, rc= rc)
784
+ call ESMF_AlarmSet(stop_alarm , clock= mclock, rc= rc)
787
785
if (ChkErr(rc,__LINE__,u_FILE_u)) return
788
786
789
787
!- ---------------
790
- ! Stop alarm
788
+ ! Restart alarm
791
789
!- ---------------
792
- call ESMF_LogWrite(subname// ' setting stop alarm for dglc' , ESMF_LOGMSG_INFO)
793
- call NUOPC_CompAttributeGet(gcomp, name= " stop_option" , value= stop_option, rc= rc)
790
+ call ESMF_LogWrite(subname// ' setting restart alarm for dglc' , ESMF_LOGMSG_INFO)
794
791
if (ChkErr(rc,__LINE__,u_FILE_u)) return
795
792
796
- call NUOPC_CompAttributeGet(gcomp, name= " stop_n " , value= cvalue , rc= rc)
793
+ call NUOPC_CompAttributeGet(gcomp, name= " restart_option " , value= restart_option , rc= rc)
797
794
if (ChkErr(rc,__LINE__,u_FILE_u)) return
798
- read (cvalue,* ) stop_n
799
795
800
- call NUOPC_CompAttributeGet(gcomp, name= " stop_ymd " , value= cvalue, rc= rc)
796
+ call NUOPC_CompAttributeGet(gcomp, name= " restart_n " , value= cvalue, rc= rc)
801
797
if (ChkErr(rc,__LINE__,u_FILE_u)) return
802
- read (cvalue,* ) stop_ymd
798
+ read (cvalue,* ) restart_n
803
799
804
- call dshr_alarm_init(mclock, stop_alarm, stop_option, &
805
- opt_n = stop_n, &
806
- opt_ymd = stop_ymd, &
800
+ call NUOPC_CompAttributeGet(gcomp, name= " restart_ymd" , value= cvalue, rc= rc)
801
+ if (ChkErr(rc,__LINE__,u_FILE_u)) return
802
+ read (cvalue,* ) restart_ymd
803
+
804
+ call alarmInit(mclock, restart_alarm, restart_option, &
805
+ opt_n = restart_n, &
806
+ opt_ymd = restart_ymd, &
807
807
RefTime = mcurrTime, &
808
- alarmname = ' alarm_stop ' , rc= rc)
808
+ alarmname = ' alarm_restart ' , rc= rc)
809
809
if (ChkErr(rc,__LINE__,u_FILE_u)) return
810
810
811
- call ESMF_AlarmSet(stop_alarm , clock= mclock, rc= rc)
811
+ call ESMF_AlarmSet(restart_alarm , clock= mclock, rc= rc)
812
812
if (ChkErr(rc,__LINE__,u_FILE_u)) return
813
813
814
814
end if
0 commit comments