diff --git a/src/gridcheck_ecmwf.f90 b/src/gridcheck_ecmwf.f90
index 794a9f2..2aef853 100644
a
|
b
|
subroutine gridcheck_ecmwf |
311 | 311 | xaux2=xaux2in |
312 | 312 | yaux1=yaux1in |
313 | 313 | yaux2=yaux2in |
314 | | if (xaux1.gt.180.) xaux1=xaux1-360.0 |
| 314 | if (xaux1.ge.180.) xaux1=xaux1-360.0 |
315 | 315 | if (xaux2.gt.180.) xaux2=xaux2-360.0 |
316 | 316 | if (xaux1.lt.-180.) xaux1=xaux1+360.0 |
317 | 317 | if (xaux2.lt.-180.) xaux2=xaux2+360.0 |
… |
… |
subroutine gridcheck_ecmwf |
343 | 343 | endif |
344 | 344 | nxmin1=nx-1 |
345 | 345 | nymin1=ny-1 |
346 | | if (xlon0.gt.180.) xlon0=xlon0-360. |
| 346 | if (xlon0.ge.180.) xlon0=xlon0-360. |
347 | 347 | xauxa=abs(yaux1+90.) |
348 | 348 | if (xglobal.and.xauxa.lt.0.001) then |
349 | 349 | sglobal=.true. ! field contains south pole |
diff --git a/src/gridcheck_gfs.f90 b/src/gridcheck_gfs.f90
index 88e4b18..a73dc5f 100644
a
|
b
|
subroutine gridcheck_gfs |
245 | 245 | xaux1=-179.0 ! 359 DEG EAST -> |
246 | 246 | xaux2=-179.0+360.-360./real(nxfield) ! TRANSFORMED TO -179 |
247 | 247 | endif ! TO 180 DEG EAST |
248 | | if (xaux1.gt.180) xaux1=xaux1-360.0 |
| 248 | if (xaux1.ge.180) xaux1=xaux1-360.0 |
249 | 249 | if (xaux2.gt.180) xaux2=xaux2-360.0 |
250 | 250 | if (xaux1.lt.-180) xaux1=xaux1+360.0 |
251 | 251 | if (xaux2.lt.-180) xaux2=xaux2+360.0 |
… |
… |
subroutine gridcheck_gfs |
279 | 279 | endif |
280 | 280 | nxmin1=nx-1 |
281 | 281 | nymin1=ny-1 |
282 | | if (xlon0.gt.180.) xlon0=xlon0-360. |
| 282 | if (xlon0.ge.180.) xlon0=xlon0-360. |
283 | 283 | xauxa=abs(yaux1+90.) |
284 | 284 | if (xglobal.and.xauxa.lt.0.001) then |
285 | 285 | sglobal=.true. ! field contains south pole |
diff --git a/src/gridcheck_nests.f90 b/src/gridcheck_nests.f90
index b38c6a9..09b653b 100644
a
|
b
|
subroutine gridcheck_nests |
289 | 289 | xaux2=xaux2in |
290 | 290 | yaux1=yaux1in |
291 | 291 | yaux2=yaux2in |
292 | | if(xaux1.gt.180.) xaux1=xaux1-360.0 |
| 292 | if(xaux1.ge.180.) xaux1=xaux1-360.0 |
293 | 293 | if(xaux2.gt.180.) xaux2=xaux2-360.0 |
294 | 294 | if(xaux1.lt.-180.) xaux1=xaux1+360.0 |
295 | 295 | if(xaux2.lt.-180.) xaux2=xaux2+360.0 |
diff --git a/src/ohreaction.f90 b/src/ohreaction.f90
index b6abca1..994f266 100644
a
|
b
|
subroutine ohreaction(itime,ltsample,loutnext) |
117 | 117 | |
118 | 118 | ! world coordinates |
119 | 119 | xlon=xtra1(jpart)*dx+xlon0 |
120 | | if (xlon.gt.180) then |
| 120 | if (xlon.ge.180) then |
121 | 121 | xlon=xlon-360 |
122 | 122 | endif |
123 | 123 | ylat=ytra1(jpart)*dy+ylat0 |
diff --git a/src/partoutput_short.f90 b/src/partoutput_short.f90
index c0038f9..2c08b49 100644
a
|
b
|
subroutine partoutput_short(itime) |
112 | 112 | ! and for the tracer of interest, i.e. the North American one |
113 | 113 | !***************************************************************************** |
114 | 114 | |
115 | | if (xlon.gt.180.) xlon=xlon-360. |
| 115 | if (xlon.ge.180.) xlon=xlon-360. |
116 | 116 | if (xlon.lt.-180.) xlon=xlon+360. |
117 | 117 | |
118 | 118 | numshortall=numshortall+1 |
diff --git a/src/partoutput_short_mpi.f90 b/src/partoutput_short_mpi.f90
index 2cc95f2..044754d 100644
a
|
b
|
subroutine partoutput_short(itime) |
119 | 119 | ! and for the tracer of interest, i.e. the North American one |
120 | 120 | !***************************************************************************** |
121 | 121 | |
122 | | if (xlon.gt.180.) xlon=xlon-360. |
| 122 | if (xlon.ge.180.) xlon=xlon-360. |
123 | 123 | if (xlon.lt.-180.) xlon=xlon+360. |
124 | 124 | |
125 | 125 | numshortall=numshortall+1 |
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) |
285 | 285 | call grib_get_real8(igrib,'latitudeOfLastGridPointInDegrees', & |
286 | 286 | yauxin,iret) |
287 | 287 | call grib_check(iret,gribFunction,gribErrorMsg) |
288 | | if (xauxin.gt.180.) xauxin=xauxin-360.0 |
| 288 | if (xauxin.ge.180.) xauxin=xauxin-360.0 |
289 | 289 | if (xauxin.lt.-180.) xauxin=xauxin+360.0 |
290 | 290 | |
291 | 291 | xaux=xauxin+real(nxshift)*dx |
292 | 292 | yaux=yauxin |
293 | | if (xaux.gt.180.) xaux=xaux-360.0 |
| 293 | if (xaux.ge.180.) xaux=xaux-360.0 |
294 | 294 | if(abs(xaux-xlon0).gt.eps) & |
295 | 295 | stop 'READWIND: LOWER LEFT LONGITUDE NOT CONSISTENT' |
296 | 296 | if(abs(yaux-ylat0).gt.eps) & |
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) |
295 | 295 | call grib_get_real8(igrib,'latitudeOfLastGridPointInDegrees', & |
296 | 296 | yauxin,iret) |
297 | 297 | call grib_check(iret,gribFunction,gribErrorMsg) |
298 | | if (xauxin.gt.180.) xauxin=xauxin-360.0 |
| 298 | if (xauxin.ge.180.) xauxin=xauxin-360.0 |
299 | 299 | if (xauxin.lt.-180.) xauxin=xauxin+360.0 |
300 | 300 | |
301 | 301 | xaux=xauxin+real(nxshift)*dx |
302 | 302 | yaux=yauxin |
303 | | if (xaux.gt.180.) xaux=xaux-360.0 |
| 303 | if (xaux.ge.180.) xaux=xaux-360.0 |
304 | 304 | if(abs(xaux-xlon0).gt.eps) & |
305 | 305 | stop 'READWIND: LOWER LEFT LONGITUDE NOT CONSISTENT' |
306 | 306 | if(abs(yaux-ylat0).gt.eps) & |
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) |
266 | 266 | call grib_get_real8(igrib,'latitudeOfLastGridPointInDegrees', & |
267 | 267 | yauxin,iret) |
268 | 268 | call grib_check(iret,gribFunction,gribErrorMsg) |
269 | | if (xauxin.gt.180.) xauxin=xauxin-360.0 |
| 269 | if (xauxin.ge.180.) xauxin=xauxin-360.0 |
270 | 270 | if (xauxin.lt.-180.) xauxin=xauxin+360.0 |
271 | 271 | |
272 | 272 | xaux=xauxin |
diff --git a/src/releaseparticles.f90 b/src/releaseparticles.f90
index e2f7a35..fd3ce46 100644
a
|
b
|
subroutine releaseparticles(itime) |
93 | 93 | |
94 | 94 | xlonav=xlon0+(xpoint2(i)+xpoint1(i))/2.*dx ! longitude needed to determine local time |
95 | 95 | if (xlonav.lt.-180.) xlonav=xlonav+360. |
96 | | if (xlonav.gt.180.) xlonav=xlonav-360. |
| 96 | if (xlonav.ge.180.) xlonav=xlonav-360. |
97 | 97 | jullocal=jul+real(xlonav,kind=dp)/360._dp ! correct approximately for time zone to obtain local time |
98 | 98 | |
99 | 99 | juldiff=jullocal-julmonday |
diff --git a/src/releaseparticles_mpi.f90 b/src/releaseparticles_mpi.f90
index 80bb96c..af73594 100644
a
|
b
|
subroutine releaseparticles(itime) |
109 | 109 | |
110 | 110 | xlonav=xlon0+(xpoint2(i)+xpoint1(i))/2.*dx ! longitude needed to determine local time |
111 | 111 | if (xlonav.lt.-180.) xlonav=xlonav+360. |
112 | | if (xlonav.gt.180.) xlonav=xlonav-360. |
| 112 | if (xlonav.ge.180.) xlonav=xlonav-360. |
113 | 113 | jullocal=jul+real(xlonav,kind=dp)/360._dp ! correct approximately for time zone to obtain local time |
114 | 114 | |
115 | 115 | juldiff=jullocal-julmonday |