Changeset c0884a8 in flexpart.git for src/getfields_mpi.f90


Ignore:
Timestamp:
Jul 20, 2018, 2:40:39 PM (6 years ago)
Author:
pesei <petra seibert at univie ac at>
Branches:
univie
Children:
7ca2ef4
Parents:
f251e57
Message:

replace CTBTO code for checking type of GRIB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/getfields_mpi.f90

    r20963b1 rc0884a8  
    2020!**********************************************************************
    2121
    22 subroutine getfields(itime,nstop,memstat,metdata_format)
     22subroutine getfields(itime,nstop,memstat,id_centre)
    2323!                       i     o       o
    2424!*****************************************************************************
     
    6060!   Unified ECMWF and GFS builds                                             
    6161!   Marian Harustak, 12.5.2017                                               
    62 !     - Added passing of metdata_format as it was needed by called routines 
    63 !         
    64 !*****************************************************************************
     62!     - Added passing of id_centre as it was needed by called routines 
     63!                                                                           
     64!  Petra Seibert, 2018-06-26: simplified version met data format detection 
     65!                                                                           !*****************************************************************************
    6566!                                                                            *
    6667! Variables:                                                                 *
     
    8182! tt(0:nxmax,0:nymax,nuvzmax,numwfmem)   temperature [K]                     *
    8283! ps(0:nxmax,0:nymax,numwfmem)           surface pressure [Pa]               *
    83 ! metdata_format     format of metdata (ecmwf/gfs)                           *
     84! id_centre            format of metdata (ecmwf/gfs)                           *
    8485!                                                                            *
    8586! Constants:                                                                 *
     
    9293  use com_mod
    9394  use mpi_mod, only: lmpreader,lmp_use_reader,lmp_sync
    94   use class_gribfile
     95  use check_gribfile_mod
    9596
    9697  implicit none
    9798
    98   integer :: metdata_format
     99  integer :: id_centre
    99100  integer :: indj,itime,nstop,memaux,mindread
    100101! mindread: index of where to read 3rd field
     
    211212      if (ldirect*wftime(indj+1).gt.ldirect*itime) then
    212213        if (lmpreader.or..not. lmp_use_reader) then
    213           if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
     214          if (id_centre.eq.icg_id_ecmwf) then
    214215            call readwind_ecmwf(indj+1,mindread,uuh,vvh,wwh)
    215216          else
     
    217218          end if
    218219          call readwind_nests(indj+1,mindread,uuhn,vvhn,wwhn)
    219           call calcpar(mindread,uuh,vvh,pvh,metdata_format)
    220           call calcpar_nests(mindread,uuhn,vvhn,pvhn,metdata_format)
    221           if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
     220          call calcpar(mindread,uuh,vvh,pvh,id_centre)
     221          call calcpar_nests(mindread,uuhn,vvhn,pvhn,id_centre)
     222          if (id_centre.eq.icg_id_ecmwf) then
    222223            call verttransform_ecmwf(mindread,uuh,vvh,wwh,pvh)
    223224          else
     
    249250        memind(1)=1
    250251        if (lmpreader.or..not.lmp_use_reader) then
    251           if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
     252          if (id_centre.eq.icg_id_ecmwf) then
    252253            call readwind_ecmwf(indj,memind(1),uuh,vvh,wwh)
    253254          else
     
    255256          end if
    256257          call readwind_nests(indj,memind(1),uuhn,vvhn,wwhn)
    257           call calcpar(memind(1),uuh,vvh,pvh,metdata_format)
    258           call calcpar_nests(memind(1),uuhn,vvhn,pvhn,metdata_format)
    259           if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
     258          call calcpar(memind(1),uuh,vvh,pvh,id_centre)
     259          call calcpar_nests(memind(1),uuhn,vvhn,pvhn,id_centre)
     260          if (id_centre.eq.icg_id_ecmwf) then
    260261            call verttransform_ecmwf(memind(1),uuh,vvh,wwh,pvh)
    261262          else
     
    267268        memind(2)=2
    268269        if (lmpreader.or..not.lmp_use_reader) then
    269           if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
     270          if (id_centre.eq.icg_id_ecmwf) then
    270271            call readwind_ecmwf(indj+1,memind(2),uuh,vvh,wwh)
    271272          else
     
    273274          end if
    274275          call readwind_nests(indj+1,memind(2),uuhn,vvhn,wwhn)
    275           call calcpar(memind(2),uuh,vvh,pvh,metdata_format)
    276           call calcpar_nests(memind(2),uuhn,vvhn,pvhn,metdata_format)
    277           if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
     276          call calcpar(memind(2),uuh,vvh,pvh,id_centre)
     277          call calcpar_nests(memind(2),uuhn,vvhn,pvhn,id_centre)
     278          if (id_centre.eq.icg_id_ecmwf) then
    278279            call verttransform_ecmwf(memind(2),uuh,vvh,wwh,pvh)
    279280          else
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG