Ticket #238: longshift.patch

File longshift.patch, 6.6 KB (added by ahilboll, 16 months ago)
  • src/gridcheck_ecmwf.f90

    diff --git a/src/gridcheck_ecmwf.f90 b/src/gridcheck_ecmwf.f90
    index 794a9f2..2aef853 100644
    a b subroutine gridcheck_ecmwf 
    311311    xaux2=xaux2in
    312312    yaux1=yaux1in
    313313    yaux2=yaux2in
    314     if (xaux1.gt.180.) xaux1=xaux1-360.0
     314    if (xaux1.ge.180.) xaux1=xaux1-360.0
    315315    if (xaux2.gt.180.) xaux2=xaux2-360.0
    316316    if (xaux1.lt.-180.) xaux1=xaux1+360.0
    317317    if (xaux2.lt.-180.) xaux2=xaux2+360.0
    subroutine gridcheck_ecmwf 
    343343    endif
    344344    nxmin1=nx-1
    345345    nymin1=ny-1
    346     if (xlon0.gt.180.) xlon0=xlon0-360.
     346    if (xlon0.ge.180.) xlon0=xlon0-360.
    347347    xauxa=abs(yaux1+90.)
    348348    if (xglobal.and.xauxa.lt.0.001) then
    349349      sglobal=.true.               ! field contains south pole
  • src/gridcheck_gfs.f90

    diff --git a/src/gridcheck_gfs.f90 b/src/gridcheck_gfs.f90
    index 88e4b18..a73dc5f 100644
    a b subroutine gridcheck_gfs 
    245245    xaux1=-179.0                             ! 359 DEG EAST ->
    246246    xaux2=-179.0+360.-360./real(nxfield)    ! TRANSFORMED TO -179
    247247  endif                                      ! TO 180 DEG EAST
    248   if (xaux1.gt.180) xaux1=xaux1-360.0
     248  if (xaux1.ge.180) xaux1=xaux1-360.0
    249249  if (xaux2.gt.180) xaux2=xaux2-360.0
    250250  if (xaux1.lt.-180) xaux1=xaux1+360.0
    251251  if (xaux2.lt.-180) xaux2=xaux2+360.0
    subroutine gridcheck_gfs 
    279279    endif
    280280    nxmin1=nx-1
    281281    nymin1=ny-1
    282     if (xlon0.gt.180.) xlon0=xlon0-360.
     282    if (xlon0.ge.180.) xlon0=xlon0-360.
    283283    xauxa=abs(yaux1+90.)
    284284    if (xglobal.and.xauxa.lt.0.001) then
    285285      sglobal=.true.               ! field contains south pole
  • src/gridcheck_nests.f90

    diff --git a/src/gridcheck_nests.f90 b/src/gridcheck_nests.f90
    index b38c6a9..09b653b 100644
    a b subroutine gridcheck_nests 
    289289    xaux2=xaux2in
    290290    yaux1=yaux1in
    291291    yaux2=yaux2in
    292     if(xaux1.gt.180.) xaux1=xaux1-360.0
     292    if(xaux1.ge.180.) xaux1=xaux1-360.0
    293293    if(xaux2.gt.180.) xaux2=xaux2-360.0
    294294    if(xaux1.lt.-180.) xaux1=xaux1+360.0
    295295    if(xaux2.lt.-180.) xaux2=xaux2+360.0
  • src/ohreaction.f90

    diff --git a/src/ohreaction.f90 b/src/ohreaction.f90
    index b6abca1..994f266 100644
    a b subroutine ohreaction(itime,ltsample,loutnext) 
    117117
    118118    ! world coordinates
    119119    xlon=xtra1(jpart)*dx+xlon0
    120     if (xlon.gt.180) then
     120    if (xlon.ge.180) then
    121121       xlon=xlon-360
    122122    endif
    123123    ylat=ytra1(jpart)*dy+ylat0
  • src/partoutput_short.f90

    diff --git a/src/partoutput_short.f90 b/src/partoutput_short.f90
    index c0038f9..2c08b49 100644
    a b subroutine partoutput_short(itime) 
    112112  ! and for the tracer of interest, i.e. the North American one
    113113  !*****************************************************************************
    114114
    115       if (xlon.gt.180.) xlon=xlon-360.
     115      if (xlon.ge.180.) xlon=xlon-360.
    116116      if (xlon.lt.-180.) xlon=xlon+360.
    117117
    118118      numshortall=numshortall+1
  • src/partoutput_short_mpi.f90

    diff --git a/src/partoutput_short_mpi.f90 b/src/partoutput_short_mpi.f90
    index 2cc95f2..044754d 100644
    a b subroutine partoutput_short(itime) 
    119119  ! and for the tracer of interest, i.e. the North American one
    120120  !*****************************************************************************
    121121
    122       if (xlon.gt.180.) xlon=xlon-360.
     122      if (xlon.ge.180.) xlon=xlon-360.
    123123      if (xlon.lt.-180.) xlon=xlon+360.
    124124
    125125      numshortall=numshortall+1
  • src/readwind_ecmwf.f90

    diff --git a/src/readwind_ecmwf.f90 b/src/readwind_ecmwf.f90
    index 1b6bb64..f0d04a7 100644
    a b subroutine readwind_ecmwf(indj,n,uuh,vvh,wwh) 
    285285    call grib_get_real8(igrib,'latitudeOfLastGridPointInDegrees', &
    286286         yauxin,iret)
    287287    call grib_check(iret,gribFunction,gribErrorMsg)
    288     if (xauxin.gt.180.) xauxin=xauxin-360.0
     288    if (xauxin.ge.180.) xauxin=xauxin-360.0
    289289    if (xauxin.lt.-180.) xauxin=xauxin+360.0
    290290
    291291    xaux=xauxin+real(nxshift)*dx
    292292    yaux=yauxin
    293     if (xaux.gt.180.) xaux=xaux-360.0
     293    if (xaux.ge.180.) xaux=xaux-360.0
    294294    if(abs(xaux-xlon0).gt.eps) &
    295295         stop 'READWIND: LOWER LEFT LONGITUDE NOT CONSISTENT'
    296296    if(abs(yaux-ylat0).gt.eps) &
  • src/readwind_ecmwf_mpi.f90

    diff --git a/src/readwind_ecmwf_mpi.f90 b/src/readwind_ecmwf_mpi.f90
    index 4385d02..349c95f 100644
    a b subroutine readwind_ecmwf(indj,n,uuh,vvh,wwh) 
    295295    call grib_get_real8(igrib,'latitudeOfLastGridPointInDegrees', &
    296296         yauxin,iret)
    297297    call grib_check(iret,gribFunction,gribErrorMsg)
    298     if (xauxin.gt.180.) xauxin=xauxin-360.0
     298    if (xauxin.ge.180.) xauxin=xauxin-360.0
    299299    if (xauxin.lt.-180.) xauxin=xauxin+360.0
    300300
    301301    xaux=xauxin+real(nxshift)*dx
    302302    yaux=yauxin
    303     if (xaux.gt.180.) xaux=xaux-360.0
     303    if (xaux.ge.180.) xaux=xaux-360.0
    304304    if(abs(xaux-xlon0).gt.eps) &
    305305         stop 'READWIND: LOWER LEFT LONGITUDE NOT CONSISTENT'
    306306    if(abs(yaux-ylat0).gt.eps) &
  • src/readwind_nests.f90

    diff --git a/src/readwind_nests.f90 b/src/readwind_nests.f90
    index 9205bdd..9e61a7c 100644
    a b subroutine readwind_nests(indj,n,uuhn,vvhn,wwhn) 
    266266    call grib_get_real8(igrib,'latitudeOfLastGridPointInDegrees', &
    267267         yauxin,iret)
    268268    call grib_check(iret,gribFunction,gribErrorMsg)
    269     if (xauxin.gt.180.) xauxin=xauxin-360.0
     269    if (xauxin.ge.180.) xauxin=xauxin-360.0
    270270    if (xauxin.lt.-180.) xauxin=xauxin+360.0
    271271
    272272    xaux=xauxin
  • src/releaseparticles.f90

    diff --git a/src/releaseparticles.f90 b/src/releaseparticles.f90
    index e2f7a35..fd3ce46 100644
    a b subroutine releaseparticles(itime) 
    9393
    9494      xlonav=xlon0+(xpoint2(i)+xpoint1(i))/2.*dx  ! longitude needed to determine local time
    9595      if (xlonav.lt.-180.) xlonav=xlonav+360.
    96       if (xlonav.gt.180.) xlonav=xlonav-360.
     96      if (xlonav.ge.180.) xlonav=xlonav-360.
    9797      jullocal=jul+real(xlonav,kind=dp)/360._dp   ! correct approximately for time zone to obtain local time
    9898
    9999      juldiff=jullocal-julmonday
  • src/releaseparticles_mpi.f90

    diff --git a/src/releaseparticles_mpi.f90 b/src/releaseparticles_mpi.f90
    index 80bb96c..af73594 100644
    a b subroutine releaseparticles(itime) 
    109109
    110110      xlonav=xlon0+(xpoint2(i)+xpoint1(i))/2.*dx  ! longitude needed to determine local time
    111111      if (xlonav.lt.-180.) xlonav=xlonav+360.
    112       if (xlonav.gt.180.) xlonav=xlonav-360.
     112      if (xlonav.ge.180.) xlonav=xlonav-360.
    113113      jullocal=jul+real(xlonav,kind=dp)/360._dp   ! correct approximately for time zone to obtain local time
    114114
    115115      juldiff=jullocal-julmonday
hosted by ZAMG