[gradsusr] Files for polar stereographic plotting
Davide Sacchetti
davide.sacchetti at arpal.gov.it
Fri Jan 3 03:35:31 EST 2014
On Thu, 2014-01-02 at 15:02 -0500, sim.aberson wrote:
> On 1/2/14, 8:05 AM, Davide Sacchetti wrote:
> > if you are not using PDEF then grads expects your data are on a regular
> > grid, that is, in your ex., 360x360 points.
> > If xdef is 360 grads expects that at latitude -90 you still have 360
> > longitude points.
> > The shift could arise from fortran: grads expects no extra bytes used
> > for record control, fortran uses these extra bytes, unless you specify
> > form='unformatted', recordtype='fiexed', recordsize=... in your open
> > statement.
> > Check file dimensions against xdef*ydef*nlevs*ntime*nvars*4: the size
> > should match perfectly this number, otherwise use 'options sequential'
> > in your ctl
> > it could solve
>
> xdef*ydef*nlevs*ntime*nvars*4 is 2 bytes off from what I have. When I
> added sequential to the options, it did not solve the problem.
for what I remember, using form='unformatted' fortran adds 2 or 4 bytes
for each record. Option sequential should solve: it works if your
fortran writing is like this:
do jlat=1,nlat
write(nunit) (record(ilon),ilon=1,nlon)
enddo
(then NLAT records)
aren't you using something like:
write(nunit) ((record(ilon,jlat),ilon=1,nlon),jlat=1,nlat)
(then just ONE record?)
bye bye
Davide
>
> In addition, I removed the polar point
>
> YDEF 299 LINEAR -89.9909909 0.009009
>
> and got the same result.
>
> Fortran no longer supports recordtype='fixed.' I have it writing
> sequential files.
>
> Thanks,
> Sim
>
> >
> > bye bye
> > Davide
> >
> > On Tue, 2013-12-31 at 14:45 -0500, sim.aberson wrote:
> >> I have written fortran code to output fields on a south polar
> >> stereographic grid. When I plot, the values seem to drift from their
> >> correct location as I get further into my file, so I am doing something
> >> wrong. My control file has:
> >>
> >> XDEF 360 LINEAR -180.000 1.000000
> >> YDEF 300 LINEAR -90.000 0.009009
> >>
> >> When I write the file, do I write the 360 points at -90 latitude (even
> >> though they are all the same value), or is GrADS just expecting one
> >> value there, followed by the 360 points for the next latitude. I am
> >> doing the former, but if GrADS is expecting the latter, that could
> >> account for the drift.
> >>
> >> I could not find this information in the online documentation.
> >>
> >> Thanks
> >
>
>
--
--> Attenzione cambio indirizzo: davide.sacchetti at arpal.gov.it
--
Davide Sacchetti
Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria
ARPAL Unità Tecnica Complessa di livello Regionale
V.le Brigare Partigiane 2 16121 Genova (I)
tel: +39 010 6437535 fax: +39 010 6437520
mail: davide.sacchetti at arpal.gov.it web: www.meteoliguria.it
More information about the gradsusr
mailing list