- Timestamp:
- 2015-07-23T18:05:51+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5107_restart_func_and_date/NEMOGCM/NEMO/LIM_SRC_3/limhdf.F90
r5500 r5630 13 13 !!---------------------------------------------------------------------- 14 14 !! lim_hdf : diffusion trend on sea-ice variable 15 !! lim_hdf_init : initialisation of diffusion trend on sea-ice variable 15 16 !!---------------------------------------------------------------------- 16 17 USE dom_oce ! ocean domain … … 26 27 PRIVATE 27 28 28 PUBLIC lim_hdf ! called by lim_trp 29 PUBLIC lim_hdf ! called by lim_trp 30 PUBLIC lim_hdf_init ! called by sbc_lim_init 29 31 30 32 LOGICAL :: linit = .TRUE. ! initialization flag (set to flase after the 1st call) 33 INTEGER :: nn_convfrq !: convergence check frequency of the Crant-Nicholson scheme 31 34 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: efact ! metric coefficient 32 35 … … 121 124 CALL lbc_lnk( zrlx, 'T', 1. ) ! lateral boundary condition 122 125 ! 123 zconv = 0._wp ! convergence test 124 DO jj = 2, jpjm1 125 DO ji = fs_2, fs_jpim1 126 zconv = MAX( zconv, ABS( zrlx(ji,jj) - ptab(ji,jj) ) ) 127 END DO 128 END DO 129 IF( lk_mpp ) CALL mpp_max( zconv ) ! max over the global domain 126 IF ( MOD( iter, nn_convfrq ) == 0 ) THEN ! convergence test every nn_convfrq iterations (perf. optimization) 127 zconv = 0._wp 128 DO jj = 2, jpjm1 129 DO ji = fs_2, fs_jpim1 130 zconv = MAX( zconv, ABS( zrlx(ji,jj) - ptab(ji,jj) ) ) 131 END DO 132 END DO 133 IF( lk_mpp ) CALL mpp_max( zconv ) ! max over the global domain 134 ENDIF 130 135 ! 131 136 ptab(:,:) = zrlx(:,:) … … 162 167 END SUBROUTINE lim_hdf 163 168 169 170 SUBROUTINE lim_hdf_init 171 !!------------------------------------------------------------------- 172 !! *** ROUTINE lim_hdf_init *** 173 !! 174 !! ** Purpose : Initialisation of horizontal diffusion of sea-ice 175 !! 176 !! ** Method : Read the namicehdf namelist 177 !! 178 !! ** input : Namelist namicehdf 179 !!------------------------------------------------------------------- 180 INTEGER :: ios ! Local integer output status for namelist read 181 NAMELIST/namicehdf/ nn_convfrq 182 !!------------------------------------------------------------------- 183 ! 184 IF(lwp) THEN 185 WRITE(numout,*) 186 WRITE(numout,*) 'lim_hdf : Ice horizontal diffusion' 187 WRITE(numout,*) '~~~~~~~' 188 ENDIF 189 ! 190 REWIND( numnam_ice_ref ) ! Namelist namicehdf in reference namelist : Ice horizontal diffusion 191 READ ( numnam_ice_ref, namicehdf, IOSTAT = ios, ERR = 901) 192 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicehdf in reference namelist', lwp ) 193 194 REWIND( numnam_ice_cfg ) ! Namelist namicehdf in configuration namelist : Ice horizontal diffusion 195 READ ( numnam_ice_cfg, namicehdf, IOSTAT = ios, ERR = 902 ) 196 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicehdf in configuration namelist', lwp ) 197 IF(lwm) WRITE ( numoni, namicehdf ) 198 ! 199 IF(lwp) THEN ! control print 200 WRITE(numout,*) 201 WRITE(numout,*)' Namelist of ice parameters for ice horizontal diffusion computation ' 202 WRITE(numout,*)' convergence check frequency of the Crant-Nicholson scheme nn_convfrq = ', nn_convfrq 203 ENDIF 204 ! 205 END SUBROUTINE lim_hdf_init 164 206 #else 165 207 !!---------------------------------------------------------------------- 166 208 !! Default option Dummy module NO LIM sea-ice model 167 209 !!---------------------------------------------------------------------- 168 CONTAINS169 SUBROUTINE lim_hdf ! Empty routine170 END SUBROUTINE lim_hdf171 210 #endif 172 211
Note: See TracChangeset
for help on using the changeset viewer.