Changeset 10322 for NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB
- Timestamp:
- 2018-11-16T16:06:47+01:00 (5 years ago)
- Location:
- NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB/icb_oce.F90
r9950 r10322 148 148 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 149 149 !! $Id$ 150 !! Software governed by the CeCILL licen ce (./LICENSE)150 !! Software governed by the CeCILL license (see ./LICENSE) 151 151 !!---------------------------------------------------------------------- 152 152 CONTAINS -
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB/icbclv.F90
r9950 r10322 34 34 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 35 35 !! $Id$ 36 !! Software governed by the CeCILL licen ce (./LICENSE)36 !! Software governed by the CeCILL license (see ./LICENSE) 37 37 !!---------------------------------------------------------------------- 38 38 CONTAINS -
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB/icbdia.F90
r10012 r10322 92 92 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 93 93 !! $Id$ 94 !! Software governed by the CeCILL licen ce (./LICENSE)94 !! Software governed by the CeCILL license (see ./LICENSE) 95 95 !!---------------------------------------------------------------------- 96 96 CONTAINS -
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB/icbdyn.F90
r9950 r10322 27 27 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 28 28 !! $Id$ 29 !! Software governed by the CeCILL licen ce (./LICENSE)29 !! Software governed by the CeCILL license (see ./LICENSE) 30 30 !!---------------------------------------------------------------------- 31 31 CONTAINS -
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB/icbini.F90
r9950 r10322 42 42 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 43 43 !! $Id$ 44 !! Software governed by the CeCILL licen ce (./LICENSE)44 !! Software governed by the CeCILL license (see ./LICENSE) 45 45 !!---------------------------------------------------------------------- 46 46 CONTAINS -
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB/icblbc.F90
r9950 r10322 66 66 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 67 67 !! $Id$ 68 !! Software governed by the CeCILL licen ce (./LICENSE)68 !! Software governed by the CeCILL license (see ./LICENSE) 69 69 !!---------------------------------------------------------------------- 70 70 CONTAINS -
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB/icbrst.F90
r9953 r10322 47 47 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 48 48 !! $Id$ 49 !! Software governed by the CeCILL licen ce (./LICENSE)49 !! Software governed by the CeCILL license (see ./LICENSE) 50 50 !!---------------------------------------------------------------------- 51 51 CONTAINS … … 61 61 INTEGER :: idim, ivar, iatt 62 62 INTEGER :: jn, iunlim_dim, ibergs_in_file 63 INTEGER :: ii, ij,iclass63 INTEGER :: ii, ij, iclass, ibase_err, imax_icb 64 64 REAL(wp), DIMENSION(nkounts) :: zdata 65 65 LOGICAL :: ll_found_restart … … 78 78 CALL iom_open( TRIM(cl_path)//cl_filename, ncid ) 79 79 80 imax_icb = 0 80 81 IF( iom_file(ncid)%iduld .GE. 0) THEN 81 82 … … 97 98 CALL iom_get( ncid, jpdom_unknown, 'number' , zdata(:) , ktime=jn, kstart=(/1/), kcount=(/nkounts/) ) 98 99 localberg%number(:) = INT(zdata(:)) 100 imax_icb = MAX( imax_icb, INT(zdata(1)) ) 99 101 CALL iom_get( ncid, 'mass_scaling' , localberg%mass_scaling, ktime=jn ) 100 102 CALL iom_get( ncid, 'lon' , localpt%lon , ktime=jn ) … … 130 132 CALL iom_get( ncid, jpdom_unknown, 'kount' , zdata(:) ) 131 133 num_bergs(:) = INT(zdata(:)) 132 133 ! Sanity check 134 ! Close file 135 CALL iom_close( ncid ) 136 ! 137 138 ! Sanity checks 134 139 jn = icb_utl_count() 135 140 IF ( lwp .AND. nn_verbose_level >= 0 ) & … … 143 148 & ' bergs in the restart file and', jn,' bergs have been read' 144 149 ! 145 ! Finish up 146 CALL iom_close( ncid ) 150 ! Confirm that all areas have a suitable base for assigning new iceberg 151 ! numbers. This will not be the case if restarting from a collated dataset 152 ! (even if using the same processor decomposition) 153 ! 154 ibase_err = 0 155 IF( num_bergs(1) < 0 .AND. num_bergs(1) /= narea - jpnij ) THEN 156 ! If this area has never calved a new berg then the base should be 157 ! set to narea - jpnij. If it is negative but something else then 158 ! a new base will be needed to guarantee unique, future iceberg numbers 159 ibase_err = 1 160 ELSEIF( MOD( num_bergs(1) - narea , jpnij ) /= 0 ) THEN 161 ! If this area has a base which is not in the set {narea + N*jpnij} 162 ! for positive integers N then a new base will be needed to guarantee 163 ! unique, future iceberg numbers 164 ibase_err = 1 165 ENDIF 166 IF( lk_mpp ) THEN 167 CALL mpp_sum(ibase_err) 168 ENDIF 169 IF( ibase_err > 0 ) THEN 170 ! 171 ! A new base is needed. The only secure solution is to set bases such that 172 ! all future icebergs numbers will be greater than the current global maximum 173 IF( lk_mpp ) THEN 174 CALL mpp_max(imax_icb) 175 ENDIF 176 num_bergs(1) = imax_icb - jpnij + narea 177 ENDIF 147 178 ! 148 179 IF( lwp .AND. nn_verbose_level >= 0 ) WRITE(numout,'(a)') 'icebergs, icb_rst_read: completed' -
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB/icbstp.F90
r9950 r10322 48 48 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 49 49 !! $Id$ 50 !! Software governed by the CeCILL licen ce (./LICENSE)50 !! Software governed by the CeCILL license (see ./LICENSE) 51 51 !!---------------------------------------------------------------------- 52 52 CONTAINS -
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB/icbthm.F90
r10012 r10322 33 33 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 34 34 !! $Id$ 35 !! Software governed by the CeCILL licen ce (./LICENSE)35 !! Software governed by the CeCILL license (see ./LICENSE) 36 36 !!---------------------------------------------------------------------- 37 37 CONTAINS -
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB/icbtrj.F90
r9950 r10322 49 49 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 50 50 !! $Id$ 51 !! Software governed by the CeCILL licen ce (./LICENSE)51 !! Software governed by the CeCILL license (see ./LICENSE) 52 52 !!---------------------------------------------------------------------- 53 53 CONTAINS -
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/ICB/icbutl.F90
r9950 r10322 48 48 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 49 49 !! $Id$ 50 !! Software governed by the CeCILL licen ce (./LICENSE)50 !! Software governed by the CeCILL license (see ./LICENSE) 51 51 !!---------------------------------------------------------------------- 52 52 CONTAINS
Note: See TracChangeset
for help on using the changeset viewer.