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

📄 controlmod.f90

📁 CCSM Research Tools: Community Atmosphere Model (CAM)
💻 F90
📖 第 1 页 / 共 3 页
字号:
    mss_irt = 0    mss_wpass = ' '    ! history file variables    hist_ndens  = 1	    hist_dov2xy(1) = .true.    hist_dov2xy(2:maxhist) = .true.    hist_nhtfrq(1) = -24    hist_nhtfrq(2:maxhist) = iundef    hist_mfilt(1) = 1    hist_mfilt(2:maxhist)  = iundef    hist_fldadd(:) = ' '    hist_chntyp(:,:) = ' '    hist_fldaux1(:) = ' '    hist_fldaux2(:) = ' '    hist_crtinic = 'YEARLY'    rpntpath = 'not_specified' ! other namelist variables    irad = -1    conchk = .true.    wrtdia = .false.    csm_doflxave = .true.! RTM control variables #if (defined RTM)    rtm_nsteps = (3600*3)/dtime ! 3 hours#endif! ----------------------------------------------------------------------! Read namelist from standard input. Override if coupled to CAM! ----------------------------------------------------------------------    if (masterproc) then       read(5, clmexp, iostat=ierr)       if (ierr /= 0) then          if (masterproc) then             write(6,*)'error: namelist input resulted in error code ',ierr          endif          call endrun       endif    endif#if (defined COUP_CAM)    caseid  = cam_caseid    ctitle  = cam_ctitle     irad    = cam_irad    nsrest  = cam_nsrest    hist_crtinic  = cam_crtinic#if (defined PERGRO)        hist_nhtfrq(1) = -48#else    hist_nhtfrq(1) = cam_nhtfrq#endif    hist_mfilt(1) = cam_mfilt    mss_irt = cam_irt    #endif#if (defined OFFLINE)     if (fsurdat == ' ') then       if (mksrf_offline_fnavyoro /= ' ' .and. mksrf_offline_fgrid /= ' ') then          if (masterproc) then             write(6,*) 'cannot set both MKSRF_OFFLINE_FNAVYORO and MKSRF_OFFLINE_FGRID'          endif          call endrun       endif       if (mksrf_offline_fgrid /= ' ') then  ! must have global grid (overwrite namelist values)          mksrf_offline_edgen =   90.          mksrf_offline_edgee =  180.          mksrf_offline_edges =  -90.          mksrf_offline_edgew = -180.       endif    endif#endif!if archive directory not input in namelist - set default from caseid    if (archive_dir == ' ') then       logid  = ' '       call getenv ('LOGNAME', logid)       if (logid(1:1) == ' ') then          write (6,*) 'error: logname not defined'          call endrun       end if       cap = ' '       do i = 1, len_trim(logid)          cap(i:i) = logid(i:i)          ctmp = cap(i:i)          if (ichar(logid(i:i))>=97 .and. ichar(logid(i:i))<=122) then             cap(i:i) = char(ichar(ctmp) - 32)          endif       end do       archive_dir = '/' // trim(cap) // '/csm/' // trim(caseid) // '/lnd'     end if       #if (defined SPMD)    call control_spmd()#endif! ----------------------------------------------------------------------! Define run ! ----------------------------------------------------------------------! Determine run type    if (nsrest == iundef) then       if (masterproc) write(6,*) 'error: must set nsrest'       call endrun    end if! ----------------------------------------------------------------------! Surface data! ----------------------------------------------------------------------    if (fsurdat == ' ') then       mkfsurdat = .true.    else       mkfsurdat = .false.    endif    if (mkfsurdat) then       if (mksrf_fvegtyp  == ' ' .or. &           mksrf_fsoitex  == ' ' .or. &           mksrf_fsoicol  == ' ' .or. &           mksrf_flanwat  == ' ' .or. &           mksrf_furban   == ' ' .or. &           mksrf_fglacier == ' ' .or. &           mksrf_flai     == ' ') then          if (masterproc) then             write(6,*) 'error: need to set data file name'             write(6,*)'mksrf_fvegtyp = ',mksrf_fvegtyp             write(6,*)'mksrf_fsoitex = ',mksrf_fsoitex             write(6,*)'mksrf_fsoicol = ',mksrf_fsoicol             write(6,*)'mksrf_flanwat = ',mksrf_flanwat             write(6,*)'mksrf_furban  = ',mksrf_furban             write(6,*)'mksrf_fglacier= ',mksrf_fglacier             write(6,*)'mksrf_flai    = ',mksrf_flai          endif          call endrun       end if       if (nsrest > 0) then          if (masterproc) then             write(6,*) 'error: can not make surface data ', &                  'during a continuation run'          endif          call endrun       end if       if (finidat /= ' ') then          if (masterproc) then             write(6,*) 'error: can not make surface data ', &                  'when finidat is already specified'             write(6,*) 'set finidat to empty string in namelist'           endif          call endrun       end if           end if#if (defined OFFLINE)! ----------------------------------------------------------------------! Offline data! ----------------------------------------------------------------------    if (masterproc .and. offline_atmdir == ' ') then        if (masterproc) then          write(6,*)'error: atmos  input data file must be specified'       endif       call endrun    endif#endif! ----------------------------------------------------------------------! Model physics! ----------------------------------------------------------------------#if (defined COUP_CAM)!time manager initialization done in cam code    dtime = get_step_size() #elif (defined COUP_CSM)!upon restart dtime not read in from restart file until after!initial information sent to coupler - need to set it to namelist!value here and do consistency check in routine restrd.    csm_dtime = dtime#endif    if (irad < 0) irad = nint(-irad*3600./dtime)#if (defined COUP_CSM)    if (csm_doflxave .and. irad ==1 ) then       if (masterproc) then          write(6,*)'error: irad must be greater that one if', &            ' flux averaging option is enabled'       endif       call endrun    endif#endif! ----------------------------------------------------------------------! History and restart files ! ----------------------------------------------------------------------    mss_irt = min(mss_irt,1825)    fldaux(:,:) = ' '    if (maxhist-1 > 3) then       if (masterproc) write(6,*) 'CLM_CTLI error: must create additional fldaux'       call endrun    end if    do j = 1, maxhist-1       do i = 1, maxalflds          if (j == 1) fldaux(i,j) = hist_fldaux1(i)          if (j == 2) fldaux(i,j) = hist_fldaux2(i)       end do    end do    nhist = 0    do j = 1, maxhist-1       do i = 1, maxalflds          if (fldaux(i,j) /= ' ') nhist = j       end do    end do    nhist = nhist + 1    do i = 1, nhist       if (hist_mfilt(i) == iundef ) then          if (masterproc) then             write(6,*)'error: must set hist_mfilt for file ',i          endif          call endrun       end if       if (hist_nhtfrq(i) == iundef) then          if (masterproc) then             write(6,*)'error: must set hist_nhtfrq for file ',i          endif          call endrun       else if (hist_nhtfrq(i) < 0) then          hist_nhtfrq(i) = nint(-hist_nhtfrq(i)*SHR_CONST_CDAY/(24.*dtime))       endif    end do    if (hist_ndens == 1) then       ncprec = nf_double    else if (hist_ndens == 2) then       ncprec = nf_float    else       if (masterproc) then          write(6,*)'error: history tape hist_ndens must be 1 or 2'       endif       call endrun    end if    if (rpntpath == 'not_specified') then       call getenv ('HOME', homedir)       rpntpath = trim(homedir)//'/lnd.'//trim(caseid)//'.rpointer'    endif    do i = 1, nhist       if (hist_nhtfrq(i)==0) then          hist_mfilt(i) = 1       endif    end do    if (nsrest == 0) nrevsn = ' '    if (nsrest == 1) nrevsn = 'set by restart pointer file file'    if (nsrest == 3 .and. nrevsn == ' ') then       if (masterproc) write(6,*) 'error: need to set restart data file name'        call endrun    end if    if (trim(hist_crtinic) /= 'MONTHLY' .and. trim(hist_crtinic) /= 'YEARLY') then        hist_crtinic = 'NONE'    endif

⌨️ 快捷键说明

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