@@ -35,7 +35,6 @@ module nuopc_shr_methods
35
35
public :: state_setscalar
36
36
public :: state_diagnose
37
37
public :: alarmInit
38
- public :: get_minimum_timestep
39
38
public :: chkerr
40
39
41
40
private :: timeInit
@@ -759,122 +758,6 @@ subroutine timeInit( Time, ymd, cal, tod, rc)
759
758
760
759
end subroutine timeInit
761
760
762
- ! ===============================================================================
763
-
764
- integer function get_minimum_timestep (gcomp , rc )
765
- ! Get the minimum timestep interval in seconds based on the nuopc.config variables *_cpl_dt,
766
- ! if none of these variables are defined this routine will throw an error
767
- type (ESMF_GridComp), intent (in ) :: gcomp
768
- integer , intent (out ) :: rc
769
-
770
- character (len= CS) :: cvalue
771
- integer :: atm_cpl_dt ! Atmosphere coupling interval
772
- integer :: lnd_cpl_dt ! Land coupling interval
773
- integer :: ice_cpl_dt ! Sea-Ice coupling interval
774
- integer :: ocn_cpl_dt ! Ocean coupling interval
775
- integer :: glc_cpl_dt ! Glc coupling interval
776
- integer :: rof_cpl_dt ! Runoff coupling interval
777
- integer :: wav_cpl_dt ! Wav coupling interval
778
- logical :: is_present, is_set ! determine if these variables are used
779
- integer :: esp_cpl_dt ! Esp coupling interval
780
-
781
- !- --------------------------------------------------------------------------
782
- ! Determine driver clock timestep
783
- !- --------------------------------------------------------------------------
784
- get_minimum_timestep = huge (1 )
785
-
786
- call NUOPC_CompAttributeGet(gcomp, name= " atm_cpl_dt" , isPresent= is_present, isSet= is_set, rc= rc)
787
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
788
-
789
- if (is_present .and. is_set) then
790
- call NUOPC_CompAttributeGet(gcomp, name= " atm_cpl_dt" , value= cvalue, rc= rc)
791
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
792
- read (cvalue,* ) atm_cpl_dt
793
- get_minimum_timestep = min (atm_cpl_dt, get_minimum_timestep)
794
- endif
795
-
796
- call NUOPC_CompAttributeGet(gcomp, name= " lnd_cpl_dt" , isPresent= is_present, isSet= is_set, rc= rc)
797
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
798
-
799
- if (is_present .and. is_set) then
800
- call NUOPC_CompAttributeGet(gcomp, name= " lnd_cpl_dt" , value= cvalue, rc= rc)
801
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
802
- read (cvalue,* ) lnd_cpl_dt
803
- get_minimum_timestep = min (lnd_cpl_dt, get_minimum_timestep)
804
- endif
805
-
806
- call NUOPC_CompAttributeGet(gcomp, name= " ice_cpl_dt" , isPresent= is_present, isSet= is_set, rc= rc)
807
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
808
-
809
- if (is_present .and. is_set) then
810
- call NUOPC_CompAttributeGet(gcomp, name= " ice_cpl_dt" , value= cvalue, rc= rc)
811
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
812
- read (cvalue,* ) ice_cpl_dt
813
- get_minimum_timestep = min (ice_cpl_dt, get_minimum_timestep)
814
- endif
815
-
816
- call NUOPC_CompAttributeGet(gcomp, name= " ocn_cpl_dt" , isPresent= is_present, isSet= is_set, rc= rc)
817
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
818
-
819
- if (is_present .and. is_set) then
820
- call NUOPC_CompAttributeGet(gcomp, name= " ocn_cpl_dt" , value= cvalue, rc= rc)
821
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
822
- read (cvalue,* ) ocn_cpl_dt
823
- get_minimum_timestep = min (ocn_cpl_dt, get_minimum_timestep)
824
- endif
825
-
826
- call NUOPC_CompAttributeGet(gcomp, name= " glc_cpl_dt" , isPresent= is_present, isSet= is_set, rc= rc)
827
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
828
-
829
- if (is_present .and. is_set) then
830
- call NUOPC_CompAttributeGet(gcomp, name= " glc_cpl_dt" , value= cvalue, rc= rc)
831
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
832
- read (cvalue,* ) glc_cpl_dt
833
- get_minimum_timestep = min (glc_cpl_dt, get_minimum_timestep)
834
- endif
835
-
836
- call NUOPC_CompAttributeGet(gcomp, name= " rof_cpl_dt" , isPresent= is_present, isSet= is_set, rc= rc)
837
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
838
-
839
- if (is_present .and. is_set) then
840
- call NUOPC_CompAttributeGet(gcomp, name= " rof_cpl_dt" , value= cvalue, rc= rc)
841
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
842
- read (cvalue,* ) rof_cpl_dt
843
- get_minimum_timestep = min (rof_cpl_dt, get_minimum_timestep)
844
- endif
845
-
846
- call NUOPC_CompAttributeGet(gcomp, name= " wav_cpl_dt" , isPresent= is_present, isSet= is_set, rc= rc)
847
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
848
-
849
- if (is_present .and. is_set) then
850
- call NUOPC_CompAttributeGet(gcomp, name= " wav_cpl_dt" , value= cvalue, rc= rc)
851
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
852
- read (cvalue,* ) wav_cpl_dt
853
- get_minimum_timestep = min (wav_cpl_dt, get_minimum_timestep)
854
- endif
855
-
856
- call NUOPC_CompAttributeGet(gcomp, name= " esp_cpl_dt" , isPresent= is_present, isSet= is_set, rc= rc)
857
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
858
-
859
- if (is_present .and. is_set) then
860
- call NUOPC_CompAttributeGet(gcomp, name= " esp_cpl_dt" , value= cvalue, rc= rc)
861
- if (ChkErr(rc,__LINE__,u_FILE_u)) return
862
- read (cvalue,* ) esp_cpl_dt
863
- get_minimum_timestep = min (esp_cpl_dt, get_minimum_timestep)
864
- endif
865
- if (get_minimum_timestep == huge (1 )) then
866
- call ESMF_LogWrite(' minimum_timestep_error: this option is not supported ' , ESMF_LOGMSG_ERROR)
867
- rc = ESMF_FAILURE
868
- return
869
- endif
870
- if (get_minimum_timestep <= 0 ) then
871
- print * ,__FILE__,__LINE__,atm_cpl_dt, lnd_cpl_dt, ocn_cpl_dt, ice_cpl_dt, glc_cpl_dt, rof_cpl_dt, wav_cpl_dt
872
- call ESMF_LogWrite(' minimum_timestep_error ERROR ' , ESMF_LOGMSG_ERROR)
873
- rc = ESMF_FAILURE
874
- return
875
- endif
876
- end function get_minimum_timestep
877
-
878
761
! ===============================================================================
879
762
880
763
logical function chkerr (rc , line , file )
0 commit comments