Changeset ff050cd in flexpart.git for src_parallel/readoutgrid_nest.f90


Ignore:
Timestamp:
Aug 15, 2013, 3:23:48 PM (11 years ago)
Author:
Harald Sodemann <harald.sodemann@…>
Branches:
flexpart91_hasod
Children:
31113de
Parents:
7c1fd44
Message:

ADD: namelist input implemented for all common input files

git-svn-id: http://flexpart.flexpart.eu:8088/svn/FlexPart90/branches/flexpart91_hasod@10 ef8cc7e1-21b7-489e-abab-c1baa636049d

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src_parallel/readoutgrid_nest.f90

    r3eed2e6 rff050cd  
    5353  real,parameter :: eps=1.e-4
    5454
     55  integer :: readerror
    5556
     57  ! declare namelist
     58  namelist /outgridn/ &
     59    outlon0n,outlat0n, &
     60    numxgridn,numygridn, &
     61    dxoutn,dyoutn
     62
     63  ! helps identifying failed namelist input
     64  dxoutn=-1.0
    5665
    5766  ! Open the OUTGRID file and read output grid specifications
     
    6170       status='old',err=999)
    6271
     72  ! try namelist input
     73  read(unitoutgrid,outgridn,iostat=readerror)
    6374
    64   call skplin(5,unitoutgrid)
     75  if ((dxoutn.le.0).or.(readerror.ne.0)) then
    6576
     77    rewind(unitoutgrid)
     78    call skplin(5,unitoutgrid)
    6679
    67   ! 1.  Read horizontal grid specifications
    68   !****************************************
     80    ! 1.  Read horizontal grid specifications
     81    !****************************************
    6982
    70   call skplin(3,unitoutgrid)
    71   read(unitoutgrid,'(4x,f11.4)') outlon0n
    72   call skplin(3,unitoutgrid)
    73   read(unitoutgrid,'(4x,f11.4)') outlat0n
    74   call skplin(3,unitoutgrid)
    75   read(unitoutgrid,'(4x,i5)') numxgridn
    76   call skplin(3,unitoutgrid)
    77   read(unitoutgrid,'(4x,i5)') numygridn
    78   call skplin(3,unitoutgrid)
    79   read(unitoutgrid,'(4x,f12.5)') dxoutn
    80   call skplin(3,unitoutgrid)
    81   read(unitoutgrid,'(4x,f12.5)') dyoutn
     83    call skplin(3,unitoutgrid)
     84    read(unitoutgrid,'(4x,f11.4)') outlon0n
     85    call skplin(3,unitoutgrid)
     86    read(unitoutgrid,'(4x,f11.4)') outlat0n
     87    call skplin(3,unitoutgrid)
     88    read(unitoutgrid,'(4x,i5)') numxgridn
     89    call skplin(3,unitoutgrid)
     90    read(unitoutgrid,'(4x,i5)') numygridn
     91    call skplin(3,unitoutgrid)
     92    read(unitoutgrid,'(4x,f12.5)') dxoutn
     93    call skplin(3,unitoutgrid)
     94    read(unitoutgrid,'(4x,f12.5)') dyoutn
    8295
     96  endif
    8397
    84     allocate(orooutn(0:numxgridn-1,0:numygridn-1) &
    85          ,stat=stat)
    86     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
    87     allocate(arean(0:numxgridn-1,0:numygridn-1) &
    88          ,stat=stat)
    89     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
    90     allocate(volumen(0:numxgridn-1,0:numygridn-1,numzgrid) &
    91          ,stat=stat)
    92     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
     98  close(unitoutgrid)
     99
     100  allocate(orooutn(0:numxgridn-1,0:numygridn-1),stat=stat)
     101  if (stat.ne.0) write(*,*)'ERROR: could not allocate orooutn'
     102  allocate(arean(0:numxgridn-1,0:numygridn-1),stat=stat)
     103  if (stat.ne.0) write(*,*)'ERROR: could not allocate arean'
     104  allocate(volumen(0:numxgridn-1,0:numygridn-1,numzgrid),stat=stat)
     105  if (stat.ne.0) write(*,*)'ERROR: could not allocate volumen'
    93106
    94107  ! Check validity of output grid (shall be within model domain)
     
    110123  xoutshiftn=xlon0-outlon0n
    111124  youtshiftn=ylat0-outlat0n
    112   close(unitoutgrid)
    113125  return
    114126
    115 
    116 999   write(*,*) ' #### FLEXPART MODEL ERROR! FILE OUTGRID_NEST #### '
     127999 write(*,*) ' #### FLEXPART MODEL ERROR! FILE OUTGRID_NEST #### '
    117128  write(*,*) ' #### CANNOT BE OPENED IN THE DIRECTORY       #### '
    118129  write(*,*) ' #### xxx/flexpart/options                    #### '
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG