Changeset 5089 for branches/2015
- Timestamp:
- 2015-02-17T13:57:51+01:00 (10 years ago)
- Location:
- branches/2015/dev_r5087_NOC2_JATTR/NEMOGCM
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5087_NOC2_JATTR/NEMOGCM/CONFIG/SHARED/namelist_ref
r5029 r5089 76 76 ! = 5 North fold F-point pivot 77 77 ! = 6 cyclic East-West AND North fold F-point pivot 78 ln_use_jattr = .false. ! use (T) the file attribute: open_ocean_jstart, if present 79 ! in netcdf input files, as the start j-row for reading 78 80 / 79 81 !----------------------------------------------------------------------- -
branches/2015/dev_r5087_NOC2_JATTR/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90
r5039 r5089 149 149 & nn_bench, nn_timing 150 150 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 151 & jpizoom, jpjzoom, jperio 151 & jpizoom, jpjzoom, jperio, ln_use_jattr 152 152 !!---------------------------------------------------------------------- 153 153 cltxt = '' … … 359 359 WRITE(numout,*) ' left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 360 360 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 361 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 361 362 ENDIF 362 363 ! ! Parameter control -
branches/2015/dev_r5087_NOC2_JATTR/NEMOGCM/NEMO/OOO_SRC/nemogcm.F90
r4990 r5089 129 129 & nn_bench, nn_timing 130 130 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 131 & jpizoom, jpjzoom, jperio 131 & jpizoom, jpjzoom, jperio, ln_use_jattr 132 132 !!---------------------------------------------------------------------- 133 133 ! -
branches/2015/dev_r5087_NOC2_JATTR/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90
r4990 r5089 616 616 CALL iom_open( 'coordinates', inum ) 617 617 618 CALL iom_get( inum, jpdom_data, 'glamt', glamt )619 CALL iom_get( inum, jpdom_data, 'glamu', glamu )620 CALL iom_get( inum, jpdom_data, 'glamv', glamv )621 CALL iom_get( inum, jpdom_data, 'glamf', glamf )622 623 CALL iom_get( inum, jpdom_data, 'gphit', gphit )624 CALL iom_get( inum, jpdom_data, 'gphiu', gphiu )625 CALL iom_get( inum, jpdom_data, 'gphiv', gphiv )626 CALL iom_get( inum, jpdom_data, 'gphif', gphif )627 628 CALL iom_get( inum, jpdom_data, 'e1t', e1t )629 CALL iom_get( inum, jpdom_data, 'e1u', e1u )630 CALL iom_get( inum, jpdom_data, 'e1v', e1v )631 CALL iom_get( inum, jpdom_data, 'e1f', e1f )632 633 CALL iom_get( inum, jpdom_data, 'e2t', e2t )634 CALL iom_get( inum, jpdom_data, 'e2u', e2u )635 CALL iom_get( inum, jpdom_data, 'e2v', e2v )636 CALL iom_get( inum, jpdom_data, 'e2f', e2f )618 CALL iom_get( inum, jpdom_data, 'glamt', glamt, lrowattr=ln_use_jattr ) 619 CALL iom_get( inum, jpdom_data, 'glamu', glamu, lrowattr=ln_use_jattr ) 620 CALL iom_get( inum, jpdom_data, 'glamv', glamv, lrowattr=ln_use_jattr ) 621 CALL iom_get( inum, jpdom_data, 'glamf', glamf, lrowattr=ln_use_jattr ) 622 623 CALL iom_get( inum, jpdom_data, 'gphit', gphit, lrowattr=ln_use_jattr ) 624 CALL iom_get( inum, jpdom_data, 'gphiu', gphiu, lrowattr=ln_use_jattr ) 625 CALL iom_get( inum, jpdom_data, 'gphiv', gphiv, lrowattr=ln_use_jattr ) 626 CALL iom_get( inum, jpdom_data, 'gphif', gphif, lrowattr=ln_use_jattr ) 627 628 CALL iom_get( inum, jpdom_data, 'e1t', e1t, lrowattr=ln_use_jattr ) 629 CALL iom_get( inum, jpdom_data, 'e1u', e1u, lrowattr=ln_use_jattr ) 630 CALL iom_get( inum, jpdom_data, 'e1v', e1v, lrowattr=ln_use_jattr ) 631 CALL iom_get( inum, jpdom_data, 'e1f', e1f, lrowattr=ln_use_jattr ) 632 633 CALL iom_get( inum, jpdom_data, 'e2t', e2t, lrowattr=ln_use_jattr ) 634 CALL iom_get( inum, jpdom_data, 'e2u', e2u, lrowattr=ln_use_jattr ) 635 CALL iom_get( inum, jpdom_data, 'e2v', e2v, lrowattr=ln_use_jattr ) 636 CALL iom_get( inum, jpdom_data, 'e2f', e2f, lrowattr=ln_use_jattr ) 637 637 638 638 CALL iom_close( inum ) -
branches/2015/dev_r5087_NOC2_JATTR/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
r5040 r5089 534 534 IF( ln_zps .OR. ln_sco ) THEN ! zps or sco : read meter bathymetry 535 535 CALL iom_open ( 'bathy_meter.nc', inum ) 536 CALL iom_get ( inum, jpdom_data, 'Bathymetry', bathy ) 536 IF ( ln_isfcav ) THEN 537 CALL iom_get ( inum, jpdom_data, 'Bathymetry_isf', bathy, lrowattr=.false. ) 538 ELSE 539 CALL iom_get ( inum, jpdom_data, 'Bathymetry' , bathy, lrowattr=ln_use_jattr ) 540 END IF 537 541 CALL iom_close( inum ) 538 542 ! -
branches/2015/dev_r5087_NOC2_JATTR/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r5043 r5089 543 543 END SUBROUTINE iom_g1d 544 544 545 SUBROUTINE iom_g2d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount )545 SUBROUTINE iom_g2d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, lrowattr ) 546 546 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 547 547 INTEGER , INTENT(in ) :: kdom ! Type of domain to be read … … 551 551 INTEGER , INTENT(in ), DIMENSION(2) , OPTIONAL :: kstart ! start axis position of the reading 552 552 INTEGER , INTENT(in ), DIMENSION(2) , OPTIONAL :: kcount ! number of points in each axis 553 LOGICAL , INTENT(in ) , OPTIONAL :: lrowattr ! logical flag telling iom_get to 554 ! look for and use a file attribute 555 ! called open_ocean_jstart to set the start 556 ! value for the 2nd dimension (netcdf only) 553 557 ! 554 558 IF( kiomid > 0 ) THEN 555 559 IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom , cdvar , pv_r2d=pvar, & 556 & ktime=ktime, kstart=kstart, kcount=kcount ) 560 & ktime=ktime, kstart=kstart, kcount=kcount, & 561 & lrowattr=lrowattr ) 557 562 ENDIF 558 563 END SUBROUTINE iom_g2d 559 564 560 SUBROUTINE iom_g3d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount )565 SUBROUTINE iom_g3d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, lrowattr ) 561 566 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 562 567 INTEGER , INTENT(in ) :: kdom ! Type of domain to be read … … 566 571 INTEGER , INTENT(in ), DIMENSION(3) , OPTIONAL :: kstart ! start axis position of the reading 567 572 INTEGER , INTENT(in ), DIMENSION(3) , OPTIONAL :: kcount ! number of points in each axis 573 LOGICAL , INTENT(in ) , OPTIONAL :: lrowattr ! logical flag telling iom_get to 574 ! look for and use a file attribute 575 ! called open_ocean_jstart to set the start 576 ! value for the 2nd dimension (netcdf only) 568 577 ! 569 578 IF( kiomid > 0 ) THEN 570 579 IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom , cdvar , pv_r3d=pvar, & 571 & ktime=ktime, kstart=kstart, kcount=kcount ) 580 & ktime=ktime, kstart=kstart, kcount=kcount, & 581 & lrowattr=lrowattr ) 572 582 ENDIF 573 583 END SUBROUTINE iom_g3d … … 576 586 SUBROUTINE iom_get_123d( kiomid, kdom , cdvar , & 577 587 & pv_r1d, pv_r2d, pv_r3d, & 578 & ktime , kstart, kcount ) 588 & ktime , kstart, kcount, & 589 & lrowattr ) 579 590 !!----------------------------------------------------------------------- 580 591 !! *** ROUTINE iom_get_123d *** … … 593 604 INTEGER , DIMENSION(:) , INTENT(in ), OPTIONAL :: kstart ! start position of the reading in each axis 594 605 INTEGER , DIMENSION(:) , INTENT(in ), OPTIONAL :: kcount ! number of points to be read in each axis 606 LOGICAL , INTENT(in ), OPTIONAL :: lrowattr ! logical flag telling iom_get to 607 ! look for and use a file attribute 608 ! called open_ocean_jstart to set the start 609 ! value for the 2nd dimension (netcdf only) 595 610 ! 596 611 LOGICAL :: llnoov ! local definition to read overlap 612 LOGICAL :: luse_jattr ! local definition to read open_ocean_jstart file attribute 613 INTEGER :: jstartrow ! start point for 2nd dimension optionally set by file attribute 597 614 INTEGER :: jl ! loop on number of dimension 598 615 INTEGER :: idom ! type of domain … … 604 621 INTEGER :: ix1, ix2, iy1, iy2 ! subdomain indexes 605 622 INTEGER :: ji, jj ! loop counters 606 INTEGER :: irankpv 623 INTEGER :: irankpv ! 607 624 INTEGER :: ind1, ind2 ! substring index 608 625 INTEGER, DIMENSION(jpmax_dims) :: istart ! starting point to read for each axis … … 628 645 IF( PRESENT(kstart) .AND. (.NOT. PRESENT(kcount)) ) CALL ctl_stop(trim(clinfo), 'kstart present needs kcount present') 629 646 IF( PRESENT(kstart) .AND. idom /= jpdom_unknown ) CALL ctl_stop(trim(clinfo), 'kstart present needs kdom = jpdom_unknown') 647 648 luse_jattr = .false. 649 IF( PRESENT(lrowattr) ) THEN 650 IF( lrowattr .AND. idom /= jpdom_data ) CALL ctl_stop(trim(clinfo), 'lrowattr present and true needs kdom = jpdom_data') 651 IF( lrowattr .AND. idom == jpdom_data ) luse_jattr = .true. 652 ENDIF 653 IF( luse_jattr ) THEN 654 SELECT CASE (iom_file(kiomid)%iolib) 655 CASE (jpioipsl, jprstdimg ) 656 CALL ctl_warn(trim(clinfo), 'lrowattr present and true but this only works with netcdf (jpnf90)') 657 luse_jattr = .false. 658 CASE (jpnf90 ) 659 ! Ok 660 CASE DEFAULT 661 CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 662 END SELECT 663 ENDIF 630 664 631 665 ! Search for the variable in the data base (eventually actualize data) … … 701 735 ELSE 702 736 IF( .NOT. PRESENT(pv_r1d) ) THEN ! not a 1D array 703 IF( idom == jpdom_data ) THEN ; istart(1:2) = (/ mig(1), mjg(1) /) ! icnt(1:2) done bellow 704 ELSEIF( idom == jpdom_global ) THEN ; istart(1:2) = (/ nimpp , njmpp /) ! icnt(1:2) done bellow 737 IF( idom == jpdom_data ) THEN 738 jstartrow = 1 739 IF( luse_jattr ) THEN 740 CALL iom_getatt(kiomid, 'open_ocean_jstart', jstartrow ) ! -999 is returned if the attribute is not found 741 jstartrow = MAX(1,jstartrow) 742 ENDIF 743 istart(1:2) = (/ mig(1), mjg(1) + jstartrow - 1 /) ! icnt(1:2) done below 744 ELSEIF( idom == jpdom_global ) THEN ; istart(1:2) = (/ nimpp , njmpp /) ! icnt(1:2) done below 705 745 ENDIF 706 746 ! we do not read the overlap -> we start to read at nldi, nldj -
branches/2015/dev_r5087_NOC2_JATTR/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90
r4990 r5089 45 45 INTEGER :: inum ! temporary logical unit 46 46 INTEGER :: idir ! temporary integers 47 INTEGER :: jstartrow ! temporary integers 47 48 INTEGER :: ios ! Local integer output status for namelist read 48 49 INTEGER :: & … … 100 101 ! open the file 101 102 ! Remember that at this level in the code, mpp is not yet initialized, so 102 ! the file must be open with jpdom_unknown, and kstart amd kcount forced 103 ! the file must be open with jpdom_unknown, and kstart and kcount forced 104 jstartrow = 1 103 105 IF ( ln_zco ) THEN 104 106 CALL iom_open ( 'bathy_level.nc', inum ) ! Level bathymetry 105 CALL iom_get ( inum, jpdom_unknown, 'Bathy_level', zdta, kstart=(/jpizoom,jpjzoom/), kcount=(/jpiglo,jpjglo/) ) 107 ! Optionally use a file attribute (open_ocean_jstart) to set a start row for reading from the global file 108 ! This allows the unextended grid bathymetry to be stored in the same file as the under ice-shelf extended bathymetry 109 CALL iom_getatt(inum, 'open_ocean_jstart', jstartrow ) ! -999 is returned if the attribute is not found 110 jstartrow = MAX(1,jstartrow) 111 CALL iom_get ( inum, jpdom_unknown, 'Bathy_level', zdta, kstart=(/jpizoom,jpjzoom+jstartrow-1/), kcount=(/jpiglo,jpjglo/) ) 106 112 ELSE 107 113 CALL iom_open ( 'bathy_meter.nc', inum ) ! Meter bathy in case of partial steps 108 CALL iom_get ( inum, jpdom_unknown, 'Bathymetry' , zdta, kstart=(/jpizoom,jpjzoom/), kcount=(/jpiglo,jpjglo/) ) 114 IF ( ln_isfcav ) THEN 115 CALL iom_get ( inum, jpdom_unknown, 'Bathymetry_isf' , zdta, kstart=(/jpizoom,jpjzoom/), kcount=(/jpiglo,jpjglo/) ) 116 ELSE 117 ! Optionally use a file attribute (open_ocean_jstart) to set a start row for reading from the global file 118 ! This allows the unextended grid bathymetry to be stored in the same file as the under ice-shelf extended bathymetry 119 CALL iom_getatt(inum, 'open_ocean_jstart', jstartrow ) ! -999 is returned if the attribute is not found 120 jstartrow = MAX(1,jstartrow) 121 CALL iom_get ( inum, jpdom_unknown, 'Bathymetry' , zdta, kstart=(/jpizoom,jpjzoom+jstartrow-1/), kcount=(/jpiglo,jpjglo/) ) 122 ENDIF 109 123 ENDIF 110 124 CALL iom_close (inum) -
branches/2015/dev_r5087_NOC2_JATTR/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r4990 r5089 222 222 & nn_bench, nn_timing 223 223 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 224 & jpizoom, jpjzoom, jperio 224 & jpizoom, jpjzoom, jperio, ln_use_jattr 225 225 !!---------------------------------------------------------------------- 226 226 ! … … 261 261 nperio = 0 262 262 jperio = 0 263 ln_use_jattr = .false. 263 264 ENDIF 264 265 #endif … … 506 507 WRITE(numout,*) ' left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 507 508 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 509 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 508 510 ENDIF 509 511 ! ! Parameter control -
branches/2015/dev_r5087_NOC2_JATTR/NEMOGCM/NEMO/OPA_SRC/par_oce.F90
r4990 r5089 53 53 ! ! = 6 cyclic East-West AND North fold F-point pivot 54 54 55 ! Input file read offset 56 LOGICAL :: ln_use_jattr !: Use file global attribute: open_ocean_jstart to determine start j-row 57 ! when reading input from those netcdf files that have the 58 ! attribute defined. This is designed to enable input files associated 59 ! with the extended grids used in the under ice shelf configurations to 60 ! be used without redundant rows when the ice shelves are not in use. 61 55 62 !! Values set to pp_not_used indicates that this parameter is not used in THIS config. 56 63 !! Values set to pp_to_be_computed indicates that variables will be computed in domzgr -
branches/2015/dev_r5087_NOC2_JATTR/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r4624 r5089 161 161 & nn_bench, nn_timing 162 162 NAMELIST/namcfg/ cp_cfg, cp_cfz, jp_cfg, jpidta, jpjdta, jpkdta, jpiglo, jpjglo, & 163 & jpizoom, jpjzoom, jperio 163 & jpizoom, jpjzoom, jperio, ln_use_jattr 164 164 !!---------------------------------------------------------------------- 165 165 cltxt = '' … … 348 348 WRITE(numout,*) ' left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 349 349 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 350 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 350 351 ENDIF 351 352 ! ! Parameter control
Note: See TracChangeset
for help on using the changeset viewer.