- Timestamp:
- 2016-06-17T12:00:46+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90
r6596 r6717 6 6 !! FOR USING THIS VERSION, A PREPROCESSING TRAITMENT IS RECOMMENDED 7 7 !! FOR DEFINING BETTER CUTTING OUT. 8 !! This routine is used with a the bathymetryfile.8 !! This routine requires the presence of the "domain_cfg.nc" file. 9 9 !! In this version, the land processors are avoided and the adress 10 10 !! processor (nproc, narea,noea, ...) are calculated again. … … 32 32 !! nono : number for local neighboring processor 33 33 !! 34 !! History : 35 !! ! 94-11 (M. Guyon) Original code36 !! ! 95-04 (J. Escobar, M. Imbard)37 !! ! 98-02 (M. Guyon) FETI method38 !! ! 98-05 (M. Imbard, J. Escobar, L. Colombet ) SHMEM and MPI versions39 !! 9.0 ! 04-01 (G. Madec, J.M Molines) F90 : free form , north fold jpni > 134 !! History : ! 1994-11 (M. Guyon) Original code 35 !! OPA ! 1995-04 (J. Escobar, M. Imbard) 36 !! ! 1998-02 (M. Guyon) FETI method 37 !! ! 1998-05 (M. Imbard, J. Escobar, L. Colombet ) SHMEM and MPI versions 38 !! NEMO 1.0 ! 2004-01 (G. Madec, J.M Molines) F90 : free form , north fold jpni > 1 39 !! 4.0 ! 2016-06 (G. Madec) use domain_cfg file instead of bathymetry file 40 40 !!---------------------------------------------------------------------- 41 41 USE in_out_manager ! I/O Manager … … 65 65 ione , ionw , iose , iosw , & ! " " 66 66 ibne , ibnw , ibse , ibsw ! " " 67 INTEGER, DIMENSION(jpiglo,jpjglo) :: & 68 imask ! temporary global workspace 69 REAL(wp), DIMENSION(jpiglo,jpjglo) :: & 70 zdta, zdtaisf ! temporary data workspace 71 REAL(wp) :: zidom , zjdom ! temporary scalars 72 73 ! read namelist for ln_zco 74 NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco, ln_isfcav 75 67 INTEGER, DIMENSION(jpiglo,jpjglo) :: imask ! global workspace 68 REAL(wp), DIMENSION(jpiglo,jpjglo) :: zbot, ztop ! global workspace 69 REAL(wp) :: zidom , zjdom ! local scalars 76 70 !!---------------------------------------------------------------------- 77 !! OPA 9.0 , LOCEAN-IPSL (2005)71 !! NEMO/OPA 4.0 , NEMO Consortium (2016) 78 72 !! $Id$ 79 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt73 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 80 74 !!---------------------------------------------------------------------- 81 75 82 REWIND( numnam_ref ) ! Namelist namzgr in reference namelist : Vertical coordinate83 READ ( numnam_ref, namzgr, IOSTAT = ios, ERR = 901)84 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzgr in reference namelist', lwp )85 86 REWIND( numnam_cfg ) ! Namelist namzgr in configuration namelist : Vertical coordinate87 READ ( numnam_cfg, namzgr, IOSTAT = ios, ERR = 902 )88 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzgr in configuration namelist', lwp )89 IF(lwm) WRITE ( numond, namzgr )90 91 76 IF(lwp)WRITE(numout,*) 92 IF(lwp)WRITE(numout,*) 'mpp_init : Message Passing MPI'93 IF(lwp)WRITE(numout,*) '~~~~~~~~ '77 IF(lwp)WRITE(numout,*) 'mpp_init_2 : Message Passing MPI' 78 IF(lwp)WRITE(numout,*) '~~~~~~~~~~' 94 79 IF(lwp)WRITE(numout,*) ' ' 95 80 96 IF( jpni*jpnj < jpnij ) CALL ctl_stop( ' jpnij > jpni x jpnj impossible' )81 IF( jpni*jpnj < jpnij ) CALL ctl_stop( ' jpnij > jpni x jpnj impossible' ) 97 82 98 83 ! 0. initialisation 99 84 ! ----------------- 100 101 ! open the file 102 ! Remember that at this level in the code, mpp is not yet initialized, so 103 ! the file must be open with jpdom_unknown, and kstart and kcount forced 104 jstartrow = 1 105 IF ( ln_zco ) THEN 106 CALL iom_open ( 'bathy_level.nc', inum ) ! Level bathymetry 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=(/1,1+jstartrow-1/), kcount=(/jpiglo,jpjglo/) ) 112 ELSE 113 CALL iom_open ( 'bathy_meter.nc', inum ) ! Meter bathy in case of partial steps 114 IF ( ln_isfcav ) THEN 115 CALL iom_get( inum, jpdom_unknown, 'Bathymetry_isf' , zdta, kstart=(/1,1/), 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=(/1,1+jstartrow-1/), kcount=(/jpiglo,jpjglo/) ) 122 ENDIF 123 ENDIF 124 CALL iom_close (inum) 125 126 ! used to compute the land processor in case of not masked bathy file. 127 zdtaisf(:,:) = 0.0_wp 128 IF ( ln_isfcav ) THEN 129 CALL iom_open ( 'bathy_meter.nc', inum ) ! Meter bathy in case of partial steps 130 CALL iom_get ( inum, jpdom_unknown, 'isf_draft' , zdtaisf, kstart=(/1,1/), kcount=(/jpiglo,jpjglo/) ) 131 END IF 132 CALL iom_close (inum) 133 134 ! land/sea mask over the global domain 135 136 imask(:,:)=1 137 WHERE ( zdta(:,:) - zdtaisf(:,:) <= rn_isfhmin ) imask = 0 85 CALL iom_open( 'domain_cfg', inum ) 86 ! 87 ! ! ocean top and bottom level 88 CALL iom_get( inum, jpdom_data, 'bottom level' , zbot ) ! nb of ocean T-points 89 CALL iom_get( inum, jpdom_data, 'top level' , ztop ) ! nb of ocean T-points (ISF) 90 ! 91 CALL iom_close( inum ) 92 ! 93 ! 2D ocean mask (=1 if at least one level of the water column is ocean, =0 otherwise) 94 WHERE( zbot(:,:) - ztop(:,:) + 1 > 0 ) ; imask(:,:) = 1 95 ELSEWHERE ; imask(:,:) = 0 96 END WHERE 138 97 139 98 ! 1. Dimension arrays for subdomains … … 320 279 DO jj = 1+jprecj, ilj-jprecj 321 280 DO ji = 1+jpreci, ili-jpreci 322 IF( imask(ji+iimppt(ii,ij)-1, jj+ijmppt(ii,ij)-1) == 1) isurf = isurf+1281 IF( imask(ji+iimppt(ii,ij)-1, jj+ijmppt(ii,ij)-1) == 1) isurf = isurf+1 323 282 END DO 324 283 END DO
Note: See TracChangeset
for help on using the changeset viewer.