[RegCNET] Problem in output day_ATM.f

XUNQIANG BI bixq at ictp.it
Wed Jul 23 13:37:08 CEST 2008


Hi, Savita Rai:

On Wed, 23 Jul 2008, savita rai wrote:

> I am trying to average my grads output having t=120 into t=30(daily) using
> day_ATM.f.
> It's working with direct access files having iotype=1 in regcm.inusing
> output .ctl file.
> but for iotype=2 (sequential access) it's showing incorrect plots with same
> ctl file.
>
> I am trying to change the code according to sequential data access
> in day_ATM.f but
> haven't got success till now.

You're right. By default, day_???.f and mon_???.f are just work
with the direct access files. But it's quite easy to make a change
and make it work for sequential format of binary data.

The places need to be changes are as follows (take day_ATM.f as the 
example):

1. change
          open(10,file=in_fn(month),form='unformatted'
      &          ,recl=im*jn*4,access='direct')

    to
          open(10,file=in_fn(month),form='unformatted')

2. after the line of
          do nday=1,nrecord

    add one line
             read(10)             ! or read(10) IDATE
                                  !!! declare IDATE as integer

3. change the line
                   read(10,rec=nrec) b
    to
                   read(10) b

By this way, you'll get the code work with the sequential format
of data.

Hope it helps,
Xunqiang Bi




More information about the RegCNET mailing list