亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? time_manager.f90

?? CCSM Research Tools: Community Atmosphere Model (CAM)
?? F90
?? 第 1 頁 / 共 2 頁
字號:
#include <misc.h>#include <preproc.h>module time_manager#if (defined OFFLINE) || (defined COUP_CSM)   use precision, only: r8   use ESMF_TimeMgmtMod, only: &      esmf_errhandlersettype, esmf_err_return, esmf_errprint, esmf_success, &      esmf_time, esmf_timeinit, esmf_timeget, esmf_timegetdays, &        esmf_timeincrement, esmf_timedecrement, &      esmf_date, esmf_dateinit, esmf_gregorian, esmf_no_leap, esmf_dateget, &        esmf_dateincrementsec, esmf_dateincrementday, esmf_datedecrement, &        esmf_datediff, esmf_dategetfltdayofyear, &      esmf_timemgr, esmf_timemgrinit, esmf_timemgradvance, esmf_timemgrgetnstep, &        esmf_timemgrgetstepsize, esmf_timemgrgetstartdate, esmf_timemgrgetbasedate, &        esmf_timemgrlaststep, esmf_timemgrgetcurrdate, esmf_timemgrgetprevdate, esmf_dateislater, &        esmf_timemgrrestartwrite, esmf_timemgrrestartread   use string_utils, only: to_upper#if (defined SPMD)   use spmdMod, only: mpicom, mpiint, masterproc#else   use spmdMod, only: masterproc#endif   implicit none   private   save! Public methods   public :: &      timemgr_init,             &! time manager initialization      advance_timestep,         &! increment timestep number      get_step_size,            &! return step size in seconds      get_nstep,                &! return timestep number      get_curr_date,            &! return date components at end of current timestep      get_prev_date,            &! return date components at beginning of current timestep      get_start_date,           &! return date components of the start date      get_ref_date,             &! return date components of the reference date      get_curr_time,            &! return components of elapsed time since reference date      get_curr_calday,          &! return calendar day at end of current timestep      is_first_step,            &! return true on first step of initial run      is_first_restart_step,    &! return true on first step of restart or branch run      is_end_curr_day,          &! return true on last timestep in current day      is_end_curr_month,        &! return true on last timestep in current month      is_last_step,             &! return true on last timestep      timemgr_write_restart,    &! write info to file needed to restart the time manager      timemgr_read_restart,     &! read info from file needed to restart the time manager      timemgr_restart            ! restart the time manager! Public data for namelist input   character(len=32), public :: &        calendar   = 'NO_LEAP'     ! Calendar in date calculations ('NO_LEAP' or 'GREGORIAN')   integer, parameter :: uninit_int = -999999999  !This is private to this module   integer, public :: &        dtime      = uninit_int,  &! timestep in seconds        nestep     = uninit_int,  &! final timestep (or day if negative) number        nelapse    = uninit_int,  &! number of timesteps (or days if negative) to extend a run        start_ymd  = uninit_int,  &! starting date for run in yearmmdd format        start_tod  = 0,           &! starting time of day for run in seconds        stop_ymd   = uninit_int,  &! stopping date for run in yearmmdd format        stop_tod   = 0,           &! stopping time of day for run in seconds        ref_ymd    = uninit_int,  &! reference date for time coordinate in yearmmdd format        ref_tod    = 0             ! reference time of day for time coordinate in seconds   ! Private module data   type(esmf_timemgr) :: tm_id          ! time manager ID   integer ::&                      ! Data required to restart time manager:      rst_type      = uninit_int,  &! calendar type      rst_nstep     = uninit_int,  &! current step number      rst_step_days = uninit_int,  &! days component of timestep size      rst_step_sec  = uninit_int,  &! seconds component of timestep size      rst_start_ymd = uninit_int,  &! start date      rst_start_tod = uninit_int,  &! start time of day      rst_stop_ymd  = uninit_int,  &! stop date      rst_stop_tod  = uninit_int,  &! stop time of day      rst_ref_ymd   = uninit_int,  &! reference date      rst_ref_tod   = uninit_int,  &! reference time of day      rst_curr_ymd  = uninit_int,  &! current date      rst_curr_tod  = uninit_int    ! current time of day   logical :: first_restart_step = .false.  ! true for first step of a restart or branch run!=========================================================================================contains!=========================================================================================subroutine timemgr_init()! Initialize the ESMF time manager.!! NOTE - This assumes that the namelist variables ! have been set before this routine is called.     implicit none! Local variables   character(len=*), parameter :: sub = 'timemgr_init'   character(len=len(calendar)) :: cal   integer :: rc                 ! return code   integer :: cal_type           ! calendar type   type(esmf_time) :: step_size   ! timestep size   type(esmf_date) :: start_date  ! start date for run   type(esmf_date) :: stop_date   ! stop date for run   type(esmf_date) :: ref_date    ! reference date for time coordinate! Some backwards compatibility stuff:   type(esmf_time) :: diff   integer :: ntspday, ndays, nsecs   logical :: islater!-----------------------------------------------------------------------------------------! Initialize error handling.   call esmf_errhandlersettype(esmf_err_return)! Initialize calendar type.   cal = to_upper(calendar)   if ( trim(cal) == 'NO_LEAP' ) then      cal_type = esmf_no_leap   else if ( trim(cal) == 'GREGORIAN' ) then      cal_type = esmf_gregorian   else      write(6,*)sub,': unrecognized calendar specified: ',calendar      call endrun   end if! Initialize timestep size.   if ( dtime == uninit_int ) then      write(6,*)sub,': dtime must be specified in namelist'      call endrun   end if   if ( mod(86400,dtime) /=0 ) then      write(6,*)sub,': timestep must divide evenly into 1 day'      call endrun   end if   step_size = esmf_timeinit(0, dtime, rc)   call chkrc(rc, sub//': error return from esmf_timeinit: setting step_size')! Initialize start date.   if ( start_ymd == uninit_int ) then      write(6,*)sub,': start_ymd must be specified in namelist'      call endrun   end if   if ( start_tod == uninit_int ) then      write(6,*)sub,': start_tod must be specified in namelist'      call endrun   end if   start_date = esmf_dateinit(cal_type, start_ymd, start_tod, rc)   call chkrc(rc, sub//': error return from esmf_dateinit: setting start_date')! Initialize reference date for time coordinate.   if ( ref_ymd /= uninit_int ) then      ref_date = esmf_dateinit(cal_type, ref_ymd, ref_tod, rc)   else      ref_date = esmf_dateinit(start_date, rc)   end if   call chkrc(rc, sub//': error return from esmf_dateinit: setting ref_date')! Initialize stop date.   if ( stop_ymd /= uninit_int ) then      stop_date = esmf_dateinit(cal_type, stop_ymd, stop_tod, rc)   else if ( nestep /= uninit_int ) then      if ( nestep >= 0 ) then         stop_date = esmf_dateincrementsec(start_date, dtime*nestep, rc)      else         stop_date = esmf_dateincrementday(start_date, -nestep, rc)      end if   else if ( nelapse /= uninit_int ) then      if ( nelapse >= 0 ) then         stop_date = esmf_dateincrementsec(start_date, dtime*nelapse, rc)      else         stop_date = esmf_dateincrementday(start_date, -nelapse, rc)      end if   else      write(6,*)sub,': Must specify one of stop_ymd, nestep, or nelapse'      call endrun   end if   call chkrc(rc, sub//': error return setting stop_date')! Initialize a time manager.   tm_id = esmf_timemgrinit(step_size, start_date, stop_date, ref_date, rc)   call chkrc(rc, sub//': error return from esmf_timemgrinit')! Calculation of ending timestep number (nestep) assumes a constant stepsize.   ntspday = 86400/dtime   diff = esmf_timeinit()   call esmf_datediff(start_date, stop_date, diff, islater, rc)   call chkrc(rc, sub//': error return from esmf_datediff calculating nestep')   call esmf_timeget(diff, ndays, nsecs, rc)   call chkrc(rc, sub//': error return from esmf_timeget calculating nestep')   nestep = ntspday*ndays + nsecs/dtime   if ( mod(nsecs,dtime) /= 0 ) nestep = nestep + 1! Print configuration summary to log file (stdout).   if (masterproc) then      call timemgr_print()   end ifend subroutine timemgr_init!=========================================================================================subroutine timemgr_restart()! Restart the ESMF time manager.!! NOTE - Assumptions:! 1) The namelist variables have been set before this routine is called.!    The stop date is the only thing that can be changed by the user on a restart.! 2) Restart data have been read on the master process before this routine is called.!    (timemgr_read_restart called from control/restart.F90::read_restart)   implicit none! Local variables   character(len=*), parameter :: sub = 'timemgr_restart'   integer :: rc                 ! return code   type(esmf_date) :: start_date  ! start date for run   type(esmf_date) :: stop_date   ! stop date for run   type(esmf_date) :: curr_date   ! date of data in restart file   logical :: islater   integer :: ymd, tod   integer :: ier                !error code! Some backwards compatibility stuff:   type(esmf_time) :: diff   integer :: ntspday, ndays, nsecs!-----------------------------------------------------------------------------------------#if ( defined SPMD )    call mpi_bcast(rst_type,      1, mpiint, 0, mpicom, ier)   call mpi_bcast(rst_nstep,     1, mpiint, 0, mpicom, ier)   call mpi_bcast(rst_step_days, 1, mpiint, 0, mpicom, ier)   call mpi_bcast(rst_step_sec,  1, mpiint, 0, mpicom, ier)   call mpi_bcast(rst_start_ymd, 1, mpiint, 0, mpicom, ier)   call mpi_bcast(rst_start_tod, 1, mpiint, 0, mpicom, ier)   call mpi_bcast(rst_stop_ymd,  1, mpiint, 0, mpicom, ier)   call mpi_bcast(rst_stop_tod,  1, mpiint, 0, mpicom, ier)   call mpi_bcast(rst_ref_ymd,   1, mpiint, 0, mpicom, ier)   call mpi_bcast(rst_ref_tod,   1, mpiint, 0, mpicom, ier)   call mpi_bcast(rst_curr_ymd,  1, mpiint, 0, mpicom, ier)   call mpi_bcast(rst_curr_tod,  1, mpiint, 0, mpicom, ier)#endif! Initialize error handling.   call esmf_errhandlersettype(esmf_err_return)! Initialize calendar type.   if ( rst_type == esmf_no_leap ) then      calendar = 'NO_LEAP'   else if ( rst_type == esmf_gregorian ) then      calendar = 'GREGORIAN'   else      write(6,*)sub,': unrecognized calendar type in restart file: ',rst_type      call endrun   end if! Initialize the timestep.   dtime = rst_step_days*86400 + rst_step_sec! Initialize start date.   start_date = esmf_dateinit(rst_type, rst_start_ymd, rst_start_tod, rc)   call chkrc(rc, sub//': error return from esmf_dateinit: setting start_date')! Initialize current date.   curr_date = esmf_dateinit(rst_type, rst_curr_ymd, rst_curr_tod, rc)   call chkrc(rc, sub//': error return from esmf_dateinit: setting curr_date')! Initialize stop date.   if ( stop_ymd /= uninit_int ) then      stop_date = esmf_dateinit(rst_type, stop_ymd, stop_tod, rc)   else if ( nestep /= uninit_int ) then      if ( nestep >= 0 ) then         stop_date = esmf_dateincrementsec(start_date, dtime*nestep, rc)      else         stop_date = esmf_dateincrementday(start_date, -nestep, rc)      end if   else if ( nelapse /= uninit_int ) then      if ( nelapse >= 0 ) then         stop_date = esmf_dateincrementsec(curr_date, dtime*nelapse, rc)      else         stop_date = esmf_dateincrementday(curr_date, -nelapse, rc)      end if   else      stop_date = esmf_dateinit(rst_type, rst_stop_ymd, rst_stop_tod, rc)   end if   call chkrc(rc, sub//': error return setting stop_date')! Check that stop date is later than current date.   call esmf_dateislater(curr_date, stop_date, islater, rc)   call chkrc(rc, sub//': error return from esmf_dateislater: comparing start and stop dates')   if ( .not. islater ) then      write(6,*)sub,': stop date must be specified later than current date: '      call esmf_dateget(curr_date, ymd, tod)      write(6,*)' Current date (ymd tod): ', ymd, tod      call esmf_dateget(stop_date, ymd, tod)      write(6,*)' Stop date (ymd tod): ', ymd, tod      call endrun   end if   call esmf_dateget(stop_date, rst_stop_ymd, rst_stop_tod)! Restart a time manager.   tm_id = esmf_timemgrrestartread(rst_type, rst_nstep, rst_step_days, rst_step_sec, rst_start_ymd, &                                  rst_start_tod, rst_stop_ymd, rst_stop_tod, rst_ref_ymd, rst_ref_tod, &                                  rst_curr_ymd, rst_curr_tod, rc)   call chkrc(rc, sub//': error return from esmf_timemgrrestartread')! Advance the timestep.  Data from the restart file corresponds to the! last timestep of the previous run.   call advance_timestep()!  Set flag that this is the first timestep of the restart run.   first_restart_step = .true.! Set variables from "comtim.h interface" for backwards compatibility.! Calculation of ending timestep number (nestep) assumes a constant stepsize.   ntspday = 86400/dtime   diff = esmf_timeinit()   call esmf_datediff(start_date, stop_date, diff, islater, rc)   call chkrc(rc, sub//': error return from esmf_datediff calculating nestep')   call esmf_timeget(diff, ndays, nsecs, rc)   call chkrc(rc, sub//': error return from esmf_timeget calculating nestep')   nestep = ntspday*ndays + nsecs/dtime   if ( mod(nsecs,dtime) /= 0 ) nestep = nestep + 1! Print configuration summary to log file (stdout).   if (masterproc) then      call timemgr_print()   end ifend subroutine timemgr_restart!=========================================================================================subroutine timemgr_print()   implicit none! Local variables   character(len=*), parameter :: sub = 'timemgr_print'   integer :: rc   integer :: day, sec, ymd, tod   character(len=32) :: cal     ! Calendar to use in date calculations.   integer ::&                  ! Data required to restart time manager:        type      = uninit_int,  &! calendar type        nstep     = uninit_int,  &! current step number        step_days = uninit_int,  &! days component of timestep size        step_sec  = uninit_int,  &! seconds component of timestep size        start_ymd = uninit_int,  &! start date        start_tod = uninit_int,  &! start time of day        stop_ymd  = uninit_int,  &! stop date        stop_tod  = uninit_int,  &! stop time of day        ref_ymd   = uninit_int,  &! reference date        ref_tod   = uninit_int,  &! reference time of day        curr_ymd  = uninit_int,  &! current date        curr_tod  = uninit_int    ! current time of day!-----------------------------------------------------------------------------------------   call esmf_timemgrrestartwrite(tm_id, type, nstep, step_days, step_sec, &                                start_ymd, start_tod, stop_ymd, stop_tod, ref_ymd, &                                ref_tod, curr_ymd, curr_tod, rc)   call chkrc(rc, sub//': error return from esmf_timemgrrestartwrite')   write(6,*)' ********** Time Manager Configuration **********'   if ( type == esmf_no_leap ) then      cal = 'NO_LEAP'   else if ( type == esmf_gregorian ) then      cal = 'GREGORIAN'   end if   write(6,*)' Calendar type:            ',trim(cal)   write(6,*)' Timestep size (seconds):  ', (step_days*86400 + step_sec)   write(6,*)' Start date (ymd tod):     ', start_ymd, start_tod   write(6,*)' Stop date (ymd tod):      ', stop_ymd, stop_tod   write(6,*)' Reference date (ymd tod): ', ref_ymd, ref_tod   write(6,*)' Current step number:      ', nstep   write(6,*)' Ending step number:       ', nestep   write(6,*)' Current date (ymd tod):   ', curr_ymd, curr_tod   write(6,*)' ************************************************'end subroutine timemgr_print!=========================================================================================subroutine advance_timestep()! Increment the timestep number.   implicit none   ! Local variables   character(len=*), parameter :: sub = 'advance_timestep'   integer :: rc!-----------------------------------------------------------------------------------------   call esmf_timemgradvance(tm_id, rc)   call chkrc(rc, sub//': error return from esmf_timemgradvance')! Set first step flag off.   first_restart_step = .false.end subroutine advance_timestep!=========================================================================================function get_step_size()! Return the step size in seconds.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月婷婷色综合| 91福利在线看| 成人av影院在线| 色婷婷亚洲精品| 色94色欧美sute亚洲线路一久| 99久久精品国产精品久久| 91香蕉视频mp4| 欧美日韩国产免费一区二区| 欧美伊人久久大香线蕉综合69| 色综合久久中文综合久久牛| 色综合久久久久网| 欧美日韩夫妻久久| 欧美视频在线一区二区三区 | 国产大片一区二区| 国产成人在线色| 欧美伊人精品成人久久综合97| 欧美猛男男办公室激情| 国产亚洲一区字幕| 亚洲一区在线观看免费| 国产高清亚洲一区| 欧美三级三级三级| 国产精品区一区二区三| 午夜精品久久久久久久蜜桃app| 婷婷成人激情在线网| 国产成人午夜精品影院观看视频 | 1024国产精品| 国产在线播精品第三| 91免费国产在线| 精品久久久久久综合日本欧美| 成人免费在线观看入口| 国产一区二区女| 欧美久久一二区| 日韩伦理av电影| 国产黄色精品视频| 日韩亚洲欧美中文三级| 亚洲韩国精品一区| 91丨九色丨黑人外教| 国产精品伦一区二区三级视频| 人人精品人人爱| 日韩丝袜情趣美女图片| 亚洲成人动漫av| 4438x亚洲最大成人网| 一区二区三区在线观看视频| 91丨国产丨九色丨pron| 国产午夜精品久久久久久久| 日韩成人dvd| 欧美一区午夜精品| 热久久久久久久| 精品欧美一区二区久久| 久久精品国产精品亚洲综合| 日韩欧美国产一区二区在线播放| 免费观看一级特黄欧美大片| 欧美久久一区二区| 日韩综合小视频| 4438x成人网最大色成网站| 日本色综合中文字幕| 91精品国产综合久久久久久久| 五月综合激情婷婷六月色窝| 在线观看视频一区| 免费在线一区观看| 久久精品在线观看| 色综合久久66| 美女视频黄免费的久久 | 色综合色综合色综合色综合色综合| 亚洲欧洲日产国产综合网| 欧美日韩精品一区二区三区| 青娱乐精品视频在线| 国产精品国产三级国产a| 91国产成人在线| 丝袜诱惑亚洲看片| 亚洲精品一区在线观看| 波多野结衣亚洲一区| 亚洲成人激情社区| 国产精品色婷婷| 欧美另类变人与禽xxxxx| 成人综合在线视频| 日本va欧美va瓶| 一区二区三区91| 国产欧美视频在线观看| 欧美久久一二三四区| 成人永久看片免费视频天堂| 日韩高清一级片| 国产精品久久夜| 欧美大片在线观看一区二区| 不卡的av电影在线观看| 九一九一国产精品| 香蕉成人伊视频在线观看| 国产精品女主播在线观看| 在线成人免费观看| 91久久精品一区二区二区| 福利电影一区二区| 国产揄拍国内精品对白| 青青国产91久久久久久| 亚洲综合成人在线| 一区二区三区国产精品| 国产精品区一区二区三区| 久久久激情视频| 欧美国产日韩在线观看| 日韩一级黄色片| 日韩三级中文字幕| 欧美一级高清大全免费观看| 欧美精品日韩精品| 7777精品伊人久久久大香线蕉完整版| 91美女视频网站| 日本电影亚洲天堂一区| 色综合天天综合给合国产| 97se狠狠狠综合亚洲狠狠| 91色九色蝌蚪| 欧美日韩一二区| 日韩美女视频在线| 久久亚洲欧美国产精品乐播| 久久久久久久久岛国免费| 日本一区二区高清| 中日韩免费视频中文字幕| 国产精品午夜久久| 中文字幕佐山爱一区二区免费| 亚洲激情第一区| 蜜桃一区二区三区在线观看| 国产精品影视天天线| 成人一区在线观看| 欧美日韩久久久久久| 精品久久久久久久一区二区蜜臀| 久久久久久久网| 一区二区三区日韩欧美| 美国欧美日韩国产在线播放| 国产凹凸在线观看一区二区| 在线免费亚洲电影| 欧美不卡一区二区三区四区| 欧美激情中文不卡| 午夜视频一区在线观看| 国产精品夜夜嗨| 欧美精品三级日韩久久| 中文字幕亚洲区| 狠狠色丁香久久婷婷综合丁香| 成人精品视频网站| 欧美mv日韩mv国产网站app| 亚洲日穴在线视频| 国产高清视频一区| 日韩天堂在线观看| 亚洲国产精品一区二区www在线 | 亚洲欧美韩国综合色| 极品少妇一区二区| 在线观看91精品国产入口| 国产欧美一区二区在线观看| 免费欧美高清视频| 欧美日韩国产色站一区二区三区| 国产精品久久久久久久久免费桃花 | 免费在线观看视频一区| 在线观看日韩一区| 亚洲精品中文在线影院| 99久久精品情趣| 国产精品免费人成网站| 成人sese在线| 亚洲欧美偷拍另类a∨色屁股| 国产一区二区三区四区五区入口| 在线不卡中文字幕| 香蕉乱码成人久久天堂爱免费| 日本丶国产丶欧美色综合| 亚洲一区免费观看| 51久久夜色精品国产麻豆| 亚洲国产精品视频| 7777精品伊人久久久大香线蕉完整版| 亚洲亚洲精品在线观看| 欧美三级蜜桃2在线观看| 亚洲h动漫在线| 欧美一区二区视频在线观看2020 | 欧美精品久久久久久久多人混战| 亚洲图片欧美视频| 精品国产91乱码一区二区三区 | 国产精品乱人伦中文| 99riav久久精品riav| 亚洲成人7777| 久久色中文字幕| 一本高清dvd不卡在线观看| 亚洲一区二区三区免费视频| 欧美va亚洲va国产综合| 不卡电影一区二区三区| 亚洲最大成人综合| 久久―日本道色综合久久| 日本高清成人免费播放| 蜜臀av一区二区| 国产精品精品国产色婷婷| 欧美色图一区二区三区| 蜜臀av性久久久久av蜜臀妖精| 国产精品色呦呦| 欧美一区二区三区在线电影| 成人午夜在线播放| 日韩国产精品久久| 亚洲色图欧美在线| 日韩精品一区在线观看| 日本电影欧美片| 国产99久久久精品| 奇米色一区二区| 一区二区三区日韩| 成人欧美一区二区三区小说| 精品国产一区二区亚洲人成毛片 | 国产日韩v精品一区二区| 欧美日本国产视频| 色狠狠色狠狠综合| 大尺度一区二区|