Changeset 8a65cb0 in flexpart.git for src/readcommand.f90


Ignore:
Timestamp:
Mar 2, 2015, 3:11:55 PM (9 years ago)
Author:
Espen Sollum ATMOS <espen@…>
Branches:
master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
Children:
1d207bb
Parents:
60403cd
Message:

Added code, makefile for dev branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/readcommand.f90

    rcd1f691 r8a65cb0  
    109109  nested_output, &
    110110  linit_cond, &
    111   surf_only   
     111  lnetcdfout, &
     112  surf_only, &
     113  cblflag
    112114
    113115  ! Presetting namelist command
     
    138140  nested_output=0
    139141  linit_cond=0
     142  lnetcdfout=0
    140143  surf_only=0
     144  cblflag=0
    141145
    142146  ! Open the command file and read user options
     
    226230    if (old) call skplin(3,unitcommand)
    227231    read(unitcommand,*) surf_only
     232    if (old) call skplin(3,unitcommand)  !added by mc
     233    read(unitcommand,*) cblflag          !added by mc
    228234    close(unitcommand)
    229235
     
    231237
    232238  ! write command file in namelist format to output directory if requested
    233   if (nmlout.eqv..true.) then
     239  if (nmlout.and.lroot) then
    234240    open(unitcommand,file=path(2)(1:length(2))//'COMMAND.namelist',err=1000)
    235241    write(unitcommand,nml=command)
     
    241247  ! Determine how Markov chain is formulated (for w or for w/sigw)
    242248  !***************************************************************
    243 
    244   if (ctl.ge.0.1) then
     249  if (cblflag.eq.1) then !---- added by mc to properly set parameters for CBL simulations
    245250    turbswitch=.true.
    246   else
    247     turbswitch=.false.
    248     ifine=1
    249   endif
     251    if (lsynctime>maxtl) lsynctime=maxtl  !maxtl defined in com_mod.f90
     252    if (ctl.lt.5) then
     253      print *,'WARNING: CBL flag active the ratio of TLu/dt has been set to 5'
     254      ctl=5.
     255    end if
     256    if (ifine*ctl.lt.50) then
     257      ifine=int(50./ctl)+1
     258
     259      print *,'WARNING: CBL flag active the ratio of TLW/dt was < 50, ifine has been re-set to',ifine
     260!pause
     261    endif
     262    print *,'WARNING: CBL flag active the ratio of TLW/dt is ',ctl*ifine
     263    print *,'WARNING: CBL flag active lsynctime is ',lsynctime
     264  else                    !added by mc
     265    if (ctl.ge.0.1) then
     266      turbswitch=.true.
     267    else
     268      turbswitch=.false.
     269      ifine=1
     270    endif
     271  endif                   !added by mc
    250272  fine=1./real(ifine)
    251273  ctl=1./ctl
     
    344366  endif
    345367
     368!  check for netcdf output switch (use for non-namelist input only!)
     369  if (iout.ge.8) then
     370     lnetcdfout = 1
     371     iout = iout - 8
     372! #ifndef NETCDF_OUTPUT
     373!      print*,'ERROR: netcdf output not activated during compile time but used in COMMAND file!'
     374!      print*,'Please recompile with netcdf library or use standard output format.'
     375!      stop
     376! #endif
     377  endif
     378
    346379  ! Check whether a valid option for gridded model output has been chosen
    347380  !**********************************************************************
     
    349382  if ((iout.lt.1).or.(iout.gt.5)) then
    350383    write(*,*) ' #### FLEXPART MODEL ERROR! FILE COMMAND:     #### '
    351     write(*,*) ' #### IOUT MUST BE 1, 2, 3, 4, OR 5!          #### '
     384    write(*,*) ' #### IOUT MUST BE 1, 2, 3, 4, OR 5 FOR       #### '
     385    write(*,*) ' #### STANDARD FLEXPART OUTPUT OR  9 - 13     #### '
     386    write(*,*) ' #### FOR NETCDF OUTPUT                       #### '
    352387    stop
    353388  endif
     
    361396    stop
    362397  endif
    363 
    364398
    365399
     
    444478  if ((ipout.ne.0).and.(ipout.ne.1).and.(ipout.ne.2)) then
    445479    write(*,*) ' #### FLEXPART MODEL ERROR! FILE COMMAND:     #### '
    446     write(*,*) ' #### IPOUT MUST BE 0, 1, or 2!                #### '
     480    write(*,*) ' #### IPOUT MUST BE 1, 2 OR 3!                #### '
    447481    stop
    448482  endif
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG