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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 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.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩成人在线| 欧美精品tushy高清| 五月天中文字幕一区二区| 久久久www成人免费无遮挡大片| 色综合中文综合网| 91官网在线观看| 国产美女精品人人做人人爽| 五月天中文字幕一区二区| 亚洲欧洲日韩综合一区二区| 久久综合色一综合色88| 欧美三级电影网站| voyeur盗摄精品| 国产一区二区三区免费播放| 日本成人在线不卡视频| 一个色妞综合视频在线观看| 中文字幕欧美日韩一区| 久久免费看少妇高潮| 91精品国产91热久久久做人人| 色综合天天综合网国产成人综合天| eeuss鲁片一区二区三区| 麻豆成人免费电影| 视频一区国产视频| 首页国产欧美久久| 亚洲va国产va欧美va观看| 亚洲精品成人精品456| 亚洲欧洲色图综合| 国产精品久久久久久户外露出| 久久九九久久九九| 久久久久久毛片| 精品福利一区二区三区免费视频| 91精品国产综合久久久久久漫画 | 久久久99精品久久| 2021中文字幕一区亚洲| 精品国产乱码久久久久久夜甘婷婷| 7777精品伊人久久久大香线蕉超级流畅 | 久久人人爽人人爽| 精品成人佐山爱一区二区| 欧美zozozo| 欧美精品一区二区三| 久久久亚洲午夜电影| 国产亚洲污的网站| 国产精品色噜噜| 亚洲私人影院在线观看| 亚洲免费在线视频一区 二区| 亚洲美女视频在线观看| 亚洲小说春色综合另类电影| 婷婷六月综合网| 久久精品99国产精品日本| 狠狠狠色丁香婷婷综合久久五月| 国产中文字幕精品| 国产成a人无v码亚洲福利| 成人a免费在线看| 91黄色免费观看| 8x8x8国产精品| 精品88久久久久88久久久| 久久九九久久九九| 亚洲人亚洲人成电影网站色| 亚洲无线码一区二区三区| 麻豆一区二区三| 国产激情偷乱视频一区二区三区| 不卡在线观看av| 欧美影院精品一区| 91麻豆精品91久久久久同性| 337p日本欧洲亚洲大胆精品| 中文在线免费一区三区高中清不卡| 亚洲欧美另类在线| 日本亚洲视频在线| 成人av一区二区三区| 欧美综合亚洲图片综合区| 欧美一区二区三区在线观看视频| 亚洲精品一区二区三区蜜桃下载| 中文字幕在线一区| 日本麻豆一区二区三区视频| 国产成人在线看| 在线观看免费视频综合| 亚洲精品一区二区三区在线观看| 国产精品成人在线观看| 琪琪久久久久日韩精品| 国产成a人无v码亚洲福利| 日韩欧美在线网站| 国产亚洲欧洲一区高清在线观看| 亚洲免费视频中文字幕| 麻豆极品一区二区三区| 色呦呦日韩精品| www国产精品av| 亚洲bt欧美bt精品| av亚洲产国偷v产偷v自拍| 欧美精品1区2区| 亚洲欧美一区二区三区极速播放 | 亚洲图片激情小说| 激情五月婷婷综合网| 91激情五月电影| 国产女主播一区| 爽好久久久欧美精品| 91在线porny国产在线看| 精品久久国产老人久久综合| 亚洲一区在线视频| 粗大黑人巨茎大战欧美成人| 日韩欧美第一区| 亚洲国产精品一区二区尤物区| 国产成人综合视频| 欧美一区二区三区白人| 亚洲天堂免费在线观看视频| 国产在线不卡一区| 欧美一级片在线看| 亚洲成人自拍网| 91性感美女视频| 日本一区二区久久| 极品尤物av久久免费看| 欧美一区二区三区小说| 一区二区不卡在线播放 | 婷婷综合久久一区二区三区| 91美女在线观看| 欧美高清在线一区| 国产激情一区二区三区桃花岛亚洲| 日韩一区二区中文字幕| 天天做天天摸天天爽国产一区| 91视频在线观看免费| 国产精品乱人伦| 成人免费观看视频| 国产精品人人做人人爽人人添| 久久99这里只有精品| 91精品国产高清一区二区三区| 五月天欧美精品| 欧美在线观看视频在线| 亚洲激情在线播放| 色综合视频在线观看| 亚洲日本乱码在线观看| 色综合久久久久综合99| 亚洲免费资源在线播放| 91麻豆国产自产在线观看| 亚洲丝袜美腿综合| 一本久久综合亚洲鲁鲁五月天 | 精品一区二区三区久久久| 制服丝袜成人动漫| 日韩精品高清不卡| 欧美不卡在线视频| 久久99国产精品尤物| ww久久中文字幕| 国产大陆亚洲精品国产| 国产精品国产自产拍高清av| 99久久久精品| 一区二区三区国产豹纹内裤在线| 欧美三级日韩三级国产三级| 午夜伦欧美伦电影理论片| 欧美日本在线看| 久久99精品久久久久| 久久久久亚洲综合| 99视频有精品| 一区二区免费看| 欧美一级理论片| 韩国在线一区二区| 亚洲国产成人在线| 91激情在线视频| 日韩av不卡在线观看| 久久久亚洲精品石原莉奈| 成人激情午夜影院| 亚洲一级在线观看| 日韩欧美成人午夜| 不卡的电影网站| 亚洲www啪成人一区二区麻豆| 欧美变态口味重另类| 国产+成+人+亚洲欧洲自线| 亚洲视频中文字幕| 91精品一区二区三区在线观看| 国产一区二区福利| 亚洲黄色尤物视频| 精品久久人人做人人爱| 99视频精品在线| 美腿丝袜亚洲色图| 国产精品动漫网站| 日韩视频一区二区在线观看| 成人av网站免费| 日本欧美一区二区三区| 国产精品视频免费看| 在线播放亚洲一区| 成人免费黄色大片| 欧美aⅴ一区二区三区视频| 国产校园另类小说区| 色婷婷久久久综合中文字幕| 日韩av在线发布| 亚洲欧美日本韩国| www国产精品av| 欧美日韩久久久一区| 国产白丝精品91爽爽久久| 亚洲综合精品自拍| 亚洲国产岛国毛片在线| 日韩一二三四区| 91国内精品野花午夜精品| 国产精品一二三区| 视频一区视频二区中文字幕| 国产精品久久久久久久裸模| 日韩精品一区二区三区在线| 日本精品一区二区三区高清 | 国产精品全国免费观看高清| 欧美精品色一区二区三区| 99热99精品| 国产精品77777| 久久99精品视频| 日精品一区二区|