NADCON5-ng  0.0.2
NADCON5 Next Generation Documentation
xyz2b.f File Reference

Go to the source code of this file.

Functions/Subroutines

program xyz2b
 Part of the NADCON5 NADCON5 Core Library , Converts GMT *.grd to a *.b NADCON style grid file. More...
 
subroutine put1 (ival, gla, glo, h, nla, nlo, glamn, dgla, glomn, dglo, iclp)
 
subroutine put2 (val, gla, glo, z, nla, nlo, glamn, dgla, glomn, dglo, iclip)
 
subroutine w1 (lout, h, nla, nlo, glamn, dgla, glomn, dglo)
 
subroutine w2 (lout, z, nla, nlo, glamn, dgla, glomn, dglo)
 
logical function makpos (glon)
 

Function/Subroutine Documentation

logical function makpos (   glon)

Definition at line 248 of file xyz2b.f.

248 
249 *** insure longitude is positive (single precision)
250 
251  makpos=.false.
252 
253  1 if(glon.lt.0.d0) then
254  glon=glon+360.d0
255  makpos=.true.
256  go to 1
257  endif
258 
259  2 if(glon.ge.360.d0) then
260  glon=glon-360.d0
261  go to 2
262  endif
263 
264  return
logical function makpos(glon)
Definition: xyz2b.f:248
subroutine put1 (   ival,
real*4  gla,
real*4  glo,
integer, dimension(nla,nlo)  h,
  nla,
  nlo,
  glamn,
  dgla,
  glomn,
  dglo,
  iclp 
)

Definition at line 181 of file xyz2b.f.

Referenced by xyz2b().

181 
182 *** load value into grid
183 
184  implicit double precision(a-h,o-z)
185  real*4 val,gla,glo
186  integer h(nla,nlo)
187 
188  i=idnint((gla-glamn)/dgla)+1
189  if(i.lt.1.or.i.gt.nla) then
190  iclp=iclp+1
191  return
192  endif
193  j=idnint((glo-glomn)/dglo)+1
194  if(j.lt.1.or.j.gt.nlo) then
195  iclp=iclp+1
196  return
197  endif
198  h(i,j)=ival
199 
200  return

+ Here is the caller graph for this function:

subroutine put2 ( real*4  val,
real*4  gla,
real*4  glo,
real*4, dimension(nla,nlo)  z,
  nla,
  nlo,
  glamn,
  dgla,
  glomn,
  dglo,
  iclip 
)

Definition at line 203 of file xyz2b.f.

Referenced by xyz2b().

203 
204 *** load value into grid
205 
206  implicit double precision(a-h,o-z)
207  real*4 z(nla,nlo),val,gla,glo
208 
209  i=idnint((gla-glamn)/dgla)+1
210  if(i.lt.1.or.i.gt.nla) then
211  iclip=iclip+1
212  return
213  endif
214  j=idnint((glo-glomn)/dglo)+1
215  if(j.lt.1.or.j.gt.nlo) then
216  iclip=iclip+1
217  return
218  endif
219  z(i,j)=val
220 
221  return

+ Here is the caller graph for this function:

subroutine w1 (   lout,
integer, dimension(nla,nlo)  h,
  nla,
  nlo,
  glamn,
  dgla,
  glomn,
  dglo 
)

Definition at line 224 of file xyz2b.f.

Referenced by xyz2b().

224 
225 *** write records south to north (elements are west to east)
226 
227  implicit double precision(a-h,o-z)
228  integer h(nla,nlo)
229 
230  do 1 i=1,nla
231  1 write(lout) (h(i,j),j=1,nlo)
232 
233  return

+ Here is the caller graph for this function:

subroutine w2 (   lout,
real*4, dimension(nla,nlo)  z,
  nla,
  nlo,
  glamn,
  dgla,
  glomn,
  dglo 
)

Definition at line 236 of file xyz2b.f.

Referenced by xyz2b().

236 
237 *** write records south to north (elements are west to east)
238 
239  implicit double precision(a-h,o-z)
240  real*4 z(nla,nlo)
241 
242  do 1 i=1,nla
243  1 write(lout) (z(i,j),j=1,nlo)
244 
245  return

+ Here is the caller graph for this function: