NADCON5-ng  0.0.1
NADCON5 Next Generation
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 244 of file xyz2b.f.

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

Definition at line 177 of file xyz2b.f.

Referenced by xyz2b().

177 
178 *** load value into grid
179 
180  implicit double precision(a-h,o-z)
181  real*4 val,gla,glo
182  integer h(nla,nlo)
183 
184  i=idnint((gla-glamn)/dgla)+1
185  if(i.lt.1.or.i.gt.nla) then
186  iclp=iclp+1
187  return
188  endif
189  j=idnint((glo-glomn)/dglo)+1
190  if(j.lt.1.or.j.gt.nlo) then
191  iclp=iclp+1
192  return
193  endif
194  h(i,j)=ival
195 
196  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 199 of file xyz2b.f.

Referenced by xyz2b().

199 
200 *** load value into grid
201 
202  implicit double precision(a-h,o-z)
203  real*4 z(nla,nlo),val,gla,glo
204 
205  i=idnint((gla-glamn)/dgla)+1
206  if(i.lt.1.or.i.gt.nla) then
207  iclip=iclip+1
208  return
209  endif
210  j=idnint((glo-glomn)/dglo)+1
211  if(j.lt.1.or.j.gt.nlo) then
212  iclip=iclip+1
213  return
214  endif
215  z(i,j)=val
216 
217  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 220 of file xyz2b.f.

Referenced by xyz2b().

220 
221 *** write records south to north (elements are west to east)
222 
223  implicit double precision(a-h,o-z)
224  integer h(nla,nlo)
225 
226  do 1 i=1,nla
227  1 write(lout) (h(i,j),j=1,nlo)
228 
229  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 232 of file xyz2b.f.

Referenced by xyz2b().

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

+ Here is the caller graph for this function: