Opened 15 years ago

Closed 15 years ago

#367 closed upgrade (Done)

Updated get_ngfld.F and get_ngfldr.F

Reported by: arango Owned by: arango
Priority: minor Milestone: Release ROMS/TOMS 3.3
Component: Nonlinear Version: 3.3
Keywords: Cc:

Description

Updated files get_ngfld.F and get_ngfldr.F to allow reading 3D variables with Jrec=1. The variable Jrec is used to differentiate reading between 3D and 2D arrays:

            IF ((Jrec.gt.1).or.                                         &
     &          ((Jrec.eq.1).and.(Iinfo(7,ifield,ng).gt.0))) THEN
              npts=(Iend-Istr+1)*Jrec
              CALL netcdf_get_fvar (ng, model, ncfile, Vname(1,ifield), &
     &                              A,                                  &
     &                              ncid = ncid,                        &
     &                              start = (/1,1,Trec/),               &
     &                              total = (/Iend-Istr+1,Jrec,1/))
            ELSE
              npts=Iend-Istr+1
              CALL netcdf_get_fvar (ng, model, ncfile, Vname(1,ifield), &
     &                              A,                                  &
     &                              ncid = ncid,                        &
     &                              start = (/1,Trec/),                 &
     &                              total = (/Iend-Istr+1,1/))
            END IF

Although this is not needed currently, it will be used in the future to read other fields.

Many thanks to John Warner for bringing this to my attention.

Change History (1)

comment:1 by arango, 15 years ago

Resolution: Done
Status: newclosed
Note: See TracTickets for help on using tickets.