Changes between Version 1 and Version 2 of ticket/1472_NOC2_JATTR
- Timestamp:
- 2015-02-17T13:53:58+01:00 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ticket/1472_NOC2_JATTR
v1 v2 157 157 + LOGICAL , INTENT(in ) , OPTIONAL :: lrowattr ! logical flag telling iom_get to 158 158 + ! look for and use a file attribute 159 + ! called open_ocean_ startjto set the start159 + ! called open_ocean_jstart to set the start 160 160 + ! value for the 2nd dimension (netcdf only) 161 161 ! … … 179 179 + LOGICAL , INTENT(in ) , OPTIONAL :: lrowattr ! logical flag telling iom_get to 180 180 + ! look for and use a file attribute 181 + ! called open_ocean_ startjto set the start181 + ! called open_ocean_jstart to set the start 182 182 + ! value for the 2nd dimension (netcdf only) 183 183 ! … … 205 205 + LOGICAL , INTENT(in ), OPTIONAL :: lrowattr ! logical flag telling iom_get to 206 206 + ! look for and use a file attribute 207 + ! called open_ocean_ startjto set the start207 + ! called open_ocean_jstart to set the start 208 208 + ! value for the 2nd dimension (netcdf only) 209 209 ! 210 210 LOGICAL :: llnoov ! local definition to read overlap 211 + LOGICAL :: luse_jattr ! local definition to read open_ocean_ startjfile attribute211 + LOGICAL :: luse_jattr ! local definition to read open_ocean_jstart file attribute 212 212 + INTEGER :: jstartrow ! start point for 2nd dimension optionally set by file attribute 213 213 INTEGER :: jl ! loop on number of dimension … … 256 256 + jstartrow = 1 257 257 + IF( luse_jattr ) THEN 258 + CALL iom_getatt(kiomid, 'open_ocean_ startj', jstartrow ) ! -999 is returned if the attribute is not found258 + CALL iom_getatt(kiomid, 'open_ocean_jstart', jstartrow ) ! -999 is returned if the attribute is not found 259 259 + jstartrow = MAX(1,jstartrow) 260 260 + ENDIF … … 286 286 CALL iom_open ( 'bathy_level.nc', inum ) ! Level bathymetry 287 287 - CALL iom_get ( inum, jpdom_unknown, 'Bathy_level', zdta, kstart=(/jpizoom,jpjzoom/), kcount=(/jpiglo,jpjglo/) ) 288 + ! Optionally use a file attribute (open_ocean_ startj) to set a start row for reading from the global file288 + ! Optionally use a file attribute (open_ocean_jstart) to set a start row for reading from the global file 289 289 + ! This allows the unextended grid bathymetry to be stored in the same file as the under ice-shelf extended bathymetry 290 + CALL iom_getatt(inum, 'open_ocean_ startj', jstartrow ) ! -999 is returned if the attribute is not found290 + CALL iom_getatt(inum, 'open_ocean_jstart', jstartrow ) ! -999 is returned if the attribute is not found 291 291 + jstartrow = MAX(1,jstartrow) 292 292 + CALL iom_get ( inum, jpdom_unknown, 'Bathy_level', zdta, kstart=(/jpizoom,jpjzoom+jstartrow-1/), kcount=(/jpiglo,jpjglo/) ) … … 297 297 + CALL iom_get ( inum, jpdom_unknown, 'Bathymetry_isf' , zdta, kstart=(/jpizoom,jpjzoom/), kcount=(/jpiglo,jpjglo/) ) 298 298 + ELSE 299 + ! Optionally use a file attribute (open_ocean_ startj) to set a start row for reading from the global file299 + ! Optionally use a file attribute (open_ocean_jstart) to set a start row for reading from the global file 300 300 + ! This allows the unextended grid bathymetry to be stored in the same file as the under ice-shelf extended bathymetry 301 + CALL iom_getatt(inum, 'open_ocean_ startj', jstartrow ) ! -999 is returned if the attribute is not found301 + CALL iom_getatt(inum, 'open_ocean_jstart', jstartrow ) ! -999 is returned if the attribute is not found 302 302 + jstartrow = MAX(1,jstartrow) 303 303 + CALL iom_get ( inum, jpdom_unknown, 'Bathymetry' , zdta, kstart=(/jpizoom,jpjzoom+jstartrow-1/), kcount=(/jpiglo,jpjglo/) )