Changeset 6ecb30a in flexpart.git for src/getfields_mpi.f90


Ignore:
Timestamp:
Aug 17, 2017, 4:39:17 PM (7 years ago)
Author:
Espen Sollum ATMOS <eso@…>
Branches:
master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
Children:
5b34509
Parents:
61e07ba
Message:

Merged changes from CTBTO project

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/getfields_mpi.f90

    r78e62dc r6ecb30a  
    2020!**********************************************************************
    2121
    22 subroutine getfields(itime,nstop,memstat)
     22subroutine getfields(itime,nstop,memstat,metdata_format)
    2323!                       i     o       o
    2424!*****************************************************************************
     
    5858!    memstat=0:      no new fields to be read
    5959!         
     60!   Unified ECMWF and GFS builds                                             
     61!   Marian Harustak, 12.5.2017                                               
     62!     - Added passing of metdata_format as it was needed by called routines 
     63!         
    6064!*****************************************************************************
    6165!                                                                            *
     
    7781! tt(0:nxmax,0:nymax,nuvzmax,numwfmem)   temperature [K]                     *
    7882! ps(0:nxmax,0:nymax,numwfmem)           surface pressure [Pa]               *
     83! metdata_format     format of metdata (ecmwf/gfs)                           *
    7984!                                                                            *
    8085! Constants:                                                                 *
     
    8792  use com_mod
    8893  use mpi_mod, only: lmpreader,lmp_use_reader,lmp_sync
     94  use class_gribfile
    8995
    9096  implicit none
    9197
     98  integer :: metdata_format
    9299  integer :: indj,itime,nstop,memaux,mindread
    93100! mindread: index of where to read 3rd field
     
    204211      if (ldirect*wftime(indj+1).gt.ldirect*itime) then
    205212        if (lmpreader.or..not. lmp_use_reader) then
    206           call readwind(indj+1,mindread,uuh,vvh,wwh)
     213          if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
     214            call readwind_ecmwf(indj+1,mindread,uuh,vvh,wwh)
     215          else
     216            call readwind_gfs(indj+1,mindread,uuh,vvh,wwh)
     217          end if
    207218          call readwind_nests(indj+1,mindread,uuhn,vvhn,wwhn)
    208           call calcpar(mindread,uuh,vvh,pvh)
    209           call calcpar_nests(mindread,uuhn,vvhn,pvhn)
    210           call verttransform(mindread,uuh,vvh,wwh,pvh)
     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
     222            call verttransform_ecmwf(mindread,uuh,vvh,wwh,pvh)
     223          else
     224            call verttransform_gfs(mindread,uuh,vvh,wwh,pvh)
     225          end if
    211226          call verttransform_nests(mindread,uuhn,vvhn,wwhn,pvhn)
    212227        end if
     
    230245        memind(1)=1
    231246        if (lmpreader.or..not.lmp_use_reader) then
    232           call readwind(indj,memind(1),uuh,vvh,wwh)
     247          if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
     248            call readwind_ecmwf(indj,memind(1),uuh,vvh,wwh)
     249          else
     250            call readwind_gfs(indj,memind(1),uuh,vvh,wwh)
     251          end if
    233252          call readwind_nests(indj,memind(1),uuhn,vvhn,wwhn)
    234           call calcpar(memind(1),uuh,vvh,pvh)
    235           call calcpar_nests(memind(1),uuhn,vvhn,pvhn)
    236           call verttransform(memind(1),uuh,vvh,wwh,pvh)
     253          call calcpar(memind(1),uuh,vvh,pvh,metdata_format)
     254          call calcpar_nests(memind(1),uuhn,vvhn,pvhn,metdata_format)
     255          if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
     256            call verttransform_ecmwf(memind(1),uuh,vvh,wwh,pvh)
     257          else
     258            call verttransform_gfs(memind(1),uuh,vvh,wwh,pvh)
     259          end if
    237260          call verttransform_nests(memind(1),uuhn,vvhn,wwhn,pvhn)
    238261        end if
     
    240263        memind(2)=2
    241264        if (lmpreader.or..not.lmp_use_reader) then
    242           call readwind(indj+1,memind(2),uuh,vvh,wwh)
     265          if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
     266            call readwind_ecmwf(indj+1,memind(2),uuh,vvh,wwh)
     267          else
     268            call readwind_gfs(indj+1,memind(2),uuh,vvh,wwh)
     269          end if
    243270          call readwind_nests(indj+1,memind(2),uuhn,vvhn,wwhn)
    244           call calcpar(memind(2),uuh,vvh,pvh)
    245           call calcpar_nests(memind(2),uuhn,vvhn,pvhn)
    246           call verttransform(memind(2),uuh,vvh,wwh,pvh)
     271          call calcpar(memind(2),uuh,vvh,pvh,metdata_format)
     272          call calcpar_nests(memind(2),uuhn,vvhn,pvhn,metdata_format)
     273          if (metdata_format.eq.GRIBFILE_CENTRE_ECMWF) then
     274            call verttransform_ecmwf(memind(2),uuh,vvh,wwh,pvh)
     275          else
     276            call verttransform_gfs(memind(2),uuh,vvh,wwh,pvh)
     277          end if
    247278          call verttransform_nests(memind(2),uuhn,vvhn,wwhn,pvhn)
    248279        end if
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG