⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 controlmod.f90

📁 CCSM Research Tools: Community Atmosphere Model (CAM)
💻 F90
📖 第 1 页 / 共 3 页
字号:
#include <misc.h>#include <preproc.h>module controlMod  use precision  use clm_varpar        !parameter statements   use clm_varctl        !run control variables   use histFileMod       !history file variables  use spmdMod           !spmd routines and variables  implicit none  save! Namelist variables only used locally  integer :: hist_ndens                         !output density of netcdf history files  logical :: mkfsurdat                          !true => make surface data from raw data  character(len=256) :: rpntpath                !full UNIX pathname of restart pointer file  character(len=  7) :: runtyp(4)               !run type  character(len  =8) :: hist_fldaux1(maxalflds) !fields for first  auxillary history file  character(len  =8) :: hist_fldaux2(maxalflds) !fields for second auxillary history file#if (defined COUP_CSM)  integer :: csm_dtime  !value passed to coupler on initialization set to namelist input                         !consistency check done later that restart file gives same value#endif!=======================================================================CONTAINS!=======================================================================  subroutine control_init (cam_caseid , cam_ctitle, cam_irad , cam_nsrest, &                           cam_crtinic, cam_nhtfrq, cam_mfilt, cam_irt )!----------------------------------------------------------------------- ! ! Purpose: ! initialize run control variables ! ! Method: ! When running in cam mode, the base calendar info, nstep, nestep, ! nsrest, and time step are input to the land model from CAM. ! The values in the clmexp namelist are not used. The minimum ! namelist parameters are:!    o fsurdat!    o finidat!    o fpftcon ! When running in offline or csm mode, the minimum namelist parameters are:!    o nsrest!    o nestep or nelapse!    o fsurdat!    o finidat!    o dtime! ! Author: Mariana Vertenstein! !-----------------------------------------------------------------------! $Id: controlMod.F90,v 1.9.2.8.6.1 2002/05/13 19:25:03 erik Exp $!-----------------------------------------------------------------------#if (defined OFFLINE) || (defined COUP_CSM)  use time_manager, only : calendar, dtime, nestep, nelapse, start_ymd, &                           start_tod, stop_ymd, stop_tod, ref_ymd, ref_tod#else  use time_manager, only : get_step_size#endif! ------------------------ includes ------------------------------------    include 'netcdf.inc'! ----------------------------------------------------------------------! ------------------------ arguments -----------------------------------    character(len=*), optional, intent(in) :: cam_caseid    !cam caseid    character(len=*), optional, intent(in) :: cam_ctitle    !cam title    integer         , optional, intent(in) :: cam_irad      !cam radiation frequency    integer         , optional, intent(in) :: cam_nsrest    !cam run type    character(len=*), optional, intent(in) :: cam_crtinic   !cam initial dataset frequency    integer         , optional, intent(in) :: cam_nhtfrq    !cam history write freq for tape 1    integer         , optional, intent(in) :: cam_mfilt     !cam number of files per tape for tape 1    integer         , optional, intent(in) :: cam_irt       !cam mss retention time! ----------------------------------------------------------------------! ------------------------ local variables -----------------------------    character(len=256) :: homedir   !full UNIX filepath name of home directory    character(len=256) :: logid     !logid part of file path name    character(len=256) :: cap       !upper case logid    character(len=  1) :: ctmp      !character temporary    integer :: i,j,n                !loop indices    integer :: iundef               !integer undefined value    real(r8):: rundef               !real undefined value    integer :: ierr                 !error code! -----------------------------------------------------------------#if (defined COUP_CAM)! The following can be read in but are overwritten with values from the! cam time_manager module - consequently they are only declared as local ! variables here    integer :: dtime      ! timestep in seconds    integer :: nestep     ! final timestep (or day if negative) number    integer :: nelapse    ! number of timesteps (or days if negative) to extend a run    integer :: start_ymd  ! starting date for run in yearmmdd format    integer :: start_tod  ! starting time of day for run in seconds    integer :: stop_ymd   ! stopping date for run in yearmmdd format    integer :: stop_tod   ! stopping time of day for run in seconds    integer :: ref_ymd    ! reference date for time coordinate in yearmmdd format    integer :: ref_tod    ! reference time of day for time coordinate in seconds    character(len=32) :: calendar ! Calendar in date calculations ('NO_LEAP' or 'GREGORIAN')#endif    ! ----------------------------------------------------------------------! ------------------------ namelist variables --------------------------    namelist /clmexp/  &         ctitle, caseid, nsrest,  &         calendar, dtime, nelapse, nestep, start_ymd, start_tod,  &         stop_ymd, stop_tod, ref_ymd, ref_tod, &         nrevsn, rpntpath, hist_ndens, hist_dov2xy, &         hist_nhtfrq, hist_mfilt, hist_fldadd, &         hist_chntyp, hist_fldaux1, hist_fldaux2, hist_crtinic, &         archive_dir, mss_wpass, mss_irt, &         finidat, fsurdat, fpftcon, frivinp_rtm, offline_atmdir, &         mksrf_fvegtyp, mksrf_fsoitex, mksrf_fsoicol, mksrf_flanwat, &         mksrf_fglacier, mksrf_furban, mksrf_flai, mksrf_offline_fgrid, &         mksrf_offline_edgen, mksrf_offline_edgee, mksrf_offline_edges, &         mksrf_offline_edgew, mksrf_offline_fnavyoro, &         conchk, irad, wrtdia, csm_doflxave, rtm_nsteps          ! === define run =======================!!    o caseid     = 32 character case name!    o ctitle     = 80 character case title!    o nsrest     = integer flag. 0: initial run. 1: restart: 3: branch!! === model time =======================!!    o dtime      = real model time step (s)!    o calendar   = Calendar to use in date calculations. !                  'no_leap' (default) or 'gregorian'!    o start_ymd  = Starting date for run encoded in yearmmdd format.  !                   Default value is read from initial conditions file.!    o start_tod  = Starting time of day for run in seconds since 0Z.  !                   Default value is read from initial conditions file.!    o stop_ymd   = Stopping date for run encoded in yearmmdd format.  !                   No default.!    o stop_tod   = Stopping time of day for run in seconds since 0Z.  !                   Default: 0.!    o nelapse    = nnn, Specify the ending time for the run as an interval!                   starting at the current time in either timesteps!                   (if positive) or days (if negative).!                   Either nestep or (stop_ymd,stop_tod) take precedence.!    o nestep     = nnnn, Specify the ending time for the run as an interval!                   starting at (start_ymd,start_tod) in either timesteps!                   (if positive) or days (if negative).!                   (stop_ymd,stop_tod) takes precedence if set.!    o ref_ymd    = Reference date for time coordinate encoded in yearmmdd format.!                   Default value is start_ymd.!    o ref_tod    = Reference time of day for time coordinate in seconds since 0Z.!                   Default value is start_tod.!! === input data ===!!    o finidat         = 256 character initial conditions file name!    o fsurdat         = 256 character surface data file name!    o fpftcon         = 256 character data file with PFT physiological constants!    o frivinp_rtm     = 256 character input data file for rtm!    o nrevsn          = 256 character restart file name for use with branch run!! === offline forcing data ===!!    o offline_atmdir  = 256 character directory for input atm data files (can be Mass Store)!! === input data when making surface data [fsurdat] ===!!    o mksrf_offline_fgrid   = offline - land grid dataset to use instead of generating grid !    o mksrf_offline_fnavyoro= offline - 20 min navy orography dataset!    o mksrf_offline_edgen   = offline - northern edge of grid (degrees): >  -90 and <= 90!    o mksrf_offline_edgee   = offline - eastern edge of grid (degrees) : see following notes!    o mksrf_offline_edges   = offline - southern edge of grid (degrees): >= -90 and <  90!    o mksrf_offline_edgew   = offline - western edge of grid (degrees) : see following notes!    o mksrf_fvegtyp         = 256 character vegetation type data file name!    o mksrf_fsoitex         = 256 character soil texture data file name!    o mksrf_fsoicol         = 256 character soil color data file name!    o mksrf_flanwat         = 256 character inland water data file name!    o mksrf_furban          = 256 character urban data file name!    o mksrf_fglacier        = 256 character glacier data file name!    o mksrf_flai            = 256 character lai data file file name!! === history and restart files ===!!    o hist_ndens    = integer, can have value of 1 (nc_double) or 2 (nf_float) !    o hist_dov2xy   = true if want grid-average history field (false = vector)!    o hist_nhtfrq   = integer history interval (+ = iterations,  - = hours, 0=monthly ave)!    o hist_mfilt    = integer number of time samples per history file!    o hist_fldadd   = 8 character name of fields to change to active !    o hist_chntyp   = paired 8 character field name and field type. !                      OVERRIDES default settings in routine histlst(e.g., 'TV','maximum')!    o hist_fldaux1  = 8 character name of fields for first  auxillary history file!    o hist_fldaux2  = 8 character name of fields for second auxillary history file!    o hist_crtinic  = 8 character frequency to generate initial dataset!                      can be set to 'MONTHLY', 'YEARLY' or 'NONE'.!    o rpntpath      = 256 character full UNIX pathname of the local restart pointer !                      file. This file must exist when the model is restarted. This !                      file is overwritten and updated every time new restart data !                      files are output. !! === long term archiving =====!!    o archive_dir = 256 character long term archive directory (can be MSS directory)!    o mss_irt     = integer mass store retention period (days)!    o mss_wpass   = 8 character mass store write password for output data sets!! === model physics ===!!    o conchk     = true if want error energy and water conservation checks!    o irad       = integer solar radiation frequency (+ = iteration. - = hour)!    o wrtdia     = true if want output written!    o csm_doflxave = true => flux averaging is to be performed (only used for csm mode)!! === rtm control variables ===!!    o rtm_nsteps  = if > 1, average rtm over rtm_nsteps time steps  !! ----------------------------------------------------------------------    if (masterproc) then                 write(6,*) 'Attempting to initialize run control settings .....'    endif    runtyp(0 + 1) = 'initial'    runtyp(1 + 1) = 'restart'    runtyp(3 + 1) = 'branch '    iundef = -9999999    rundef = -9999999.! ----------------------------------------------------------------------! Default values! ----------------------------------------------------------------------! control variables    caseid  = ' '    ctitle  = ' '    nsrest  = iundef! initial data    fsurdat = ' '    finidat = ' '    fpftcon = ' '    frivinp_rtm = ' '    nrevsn  = ' '! offline mode    offline_atmdir   = ' '! surface generation     mksrf_offline_fgrid    = ' '    mksrf_offline_fnavyoro = ' '    mksrf_offline_edgen    =   90.    mksrf_offline_edgee    =  180.    mksrf_offline_edges    =  -90.    mksrf_offline_edgew    = -180.    mksrf_fvegtyp  = ' '    mksrf_fsoitex  = ' '    mksrf_fsoicol  = ' '    mksrf_flanwat  = ' '    mksrf_furban   = ' '    mksrf_fglacier = ' '    mksrf_flai     = ' '! long term archive settings    archive_dir = ' '

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -