Changeset 14053 for NEMO/trunk/src/OCE/IOM
- Timestamp:
- 2020-12-03T14:48:38+01:00 (4 years ago)
- Location:
- NEMO/trunk/src/OCE/IOM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/IOM/iom.F90
r14039 r14053 174 174 CALL set_grid( "V", glamv, gphiv, .FALSE., .FALSE. ) 175 175 CALL set_grid( "W", glamt, gphit, .FALSE., .FALSE. ) 176 CALL set_grid( "F", glamf, gphif, .FALSE., .FALSE. ) 176 177 CALL set_grid_znl( gphit ) 177 178 ! … … 180 181 CALL iom_set_domain_attr("grid_U", area = real( e1e2u(Nis0:Nie0, Njs0:Nje0), dp)) 181 182 CALL iom_set_domain_attr("grid_V", area = real( e1e2v(Nis0:Nie0, Njs0:Nje0), dp)) 182 CALL iom_set_domain_attr("grid_W", area = real( e1e2t(Nis0:Nie0, Njs0:Nje0), dp)) 183 CALL iom_set_domain_attr("grid_W", area = REAL( e1e2t(Nis0:Nie0, Njs0:Nje0), dp)) 184 CALL iom_set_domain_attr("grid_F", area = real( e1e2f(Nis0:Nie0, Njs0:Nje0), dp)) 183 185 CALL set_grid_bounds( "T", glamf, gphif, glamt, gphit ) 184 186 CALL set_grid_bounds( "U", glamv, gphiv, glamu, gphiu ) 185 187 CALL set_grid_bounds( "V", glamu, gphiu, glamv, gphiv ) 186 188 CALL set_grid_bounds( "W", glamf, gphif, glamt, gphit ) 189 CALL set_grid_bounds( "F", glamt, gphit, glamf, gphif ) 187 190 ENDIF 188 191 ENDIF … … 191 194 CALL dom_grid_crs ! Save the parent grid information & Switch to coarse grid domain 192 195 ! 193 CALL set_grid( "T", glamt_crs, gphit_crs, .FALSE., .FALSE. ) 194 CALL set_grid( "U", glamu_crs, gphiu_crs, .FALSE., .FALSE. ) 195 CALL set_grid( "V", glamv_crs, gphiv_crs, .FALSE., .FALSE. ) 196 CALL set_grid( "W", glamt_crs, gphit_crs, .FALSE., .FALSE. ) 196 CALL set_grid( "T", glamt_crs, gphit_crs, .FALSE., .FALSE. ) 197 CALL set_grid( "U", glamu_crs, gphiu_crs, .FALSE., .FALSE. ) 198 CALL set_grid( "V", glamv_crs, gphiv_crs, .FALSE., .FALSE. ) 199 CALL set_grid( "W", glamt_crs, gphit_crs, .FALSE., .FALSE. ) 197 200 CALL set_grid_znl( gphit_crs ) 198 201 ! … … 217 220 CALL iom_set_axis_attr( "depthv", paxis = gdept_1d ) 218 221 CALL iom_set_axis_attr( "depthw", paxis = gdepw_1d ) 222 CALL iom_set_axis_attr( "depthf", paxis = gdept_1d ) 219 223 220 224 ! ABL … … 238 242 CALL iom_set_axis_attr( "depthv", bounds=zw_bnds ) 239 243 CALL iom_set_axis_attr( "depthw", bounds=zt_bnds ) 244 CALL iom_set_axis_attr( "depthf", bounds=zw_bnds ) 240 245 241 246 ! ABL -
NEMO/trunk/src/OCE/IOM/restart.F90
r13970 r14053 11 11 !! 3.7 ! 2014-01 (G. Madec) suppression of curl and hdiv from the restart 12 12 !! - ! 2014-12 (G. Madec) remove KPP scheme 13 !! 4.1 ! 2020-11 (S. Techene, G. Madec) move ssh initiatlisation in DYN/sshwzv:ssh_init_rst 13 14 !!---------------------------------------------------------------------- 14 15 … … 139 140 !! ** Method : Write in numrow when kt == nitrst in NetCDF 140 141 !! file, save fields which are necessary for restart 142 !! 143 !! NB: ssh is written here (rst_write) 144 !! but is read or set in DYN/sshwzv:shh_init_rst 141 145 !!---------------------------------------------------------------------- 142 146 INTEGER, INTENT(in) :: kt ! ocean time-step … … 233 237 !! *** ROUTINE rst_read *** 234 238 !! 235 !! ** Purpose : Read files for NetCDF restart 236 !! 237 !! ** Method : Read in restart.nc file fields which are necessary for restart 239 !! ** Purpose : Read velocity and T-S fields in the restart file 240 !! 241 !! ** Method : Read in restart.nc fields which are necessary for restart 242 !! 243 !! NB: restart file openned in DOM/domain.F90:dom_init 244 !! before field in restart tested in DOM/domain.F90:dom_init 245 !! (sshb) 246 !! 247 !! NB: ssh is read or set in DYN/sshwzv:shh_init_rst 248 !! but is written in IOM/restart:rst_write 238 249 !!---------------------------------------------------------------------- 239 250 INTEGER, INTENT(in) :: Kbb, Kmm ! ocean time level indices 240 REAL(wp) :: zrdt241 251 INTEGER :: jk 242 252 REAL(wp), DIMENSION(jpi, jpj, jpk) :: w3d 243 253 !!---------------------------------------------------------------------- 244 245 CALL rst_read_open ! open restart for reading (if not already opened) 246 247 ! Check dynamics and tracer time-step consistency and force Euler restart if changed 248 IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 ) THEN 249 CALL iom_get( numror, 'rdt', zrdt ) 250 IF( zrdt /= rn_Dt ) THEN 251 IF(lwp) WRITE( numout,*) 252 IF(lwp) WRITE( numout,*) 'rst_read: rdt not equal to the read one' 253 IF(lwp) WRITE( numout,*) 254 IF(lwp) WRITE( numout,*) ' ==>>> forced euler first time-step' 255 l_1st_euler = .TRUE. 256 ENDIF 257 ENDIF 258 254 ! 259 255 IF(.NOT.lrxios ) CALL iom_delay_rst( 'READ', 'OCE', numror ) ! read only ocean delayed global communication variables 260 261 ! Diurnal DSST262 IF( ln_diurnal ) CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst )256 ! 257 ! !* Diurnal DSST 258 IF( ln_diurnal ) CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst ) 263 259 IF ( ln_diurnal_only ) THEN 264 260 IF(lwp) WRITE( numout, * ) & … … 269 265 RETURN 270 266 ENDIF 271 272 IF( iom_varid( numror, 'ub', ldstop = .FALSE. ) > 0 ) THEN 273 ! before fields 267 ! 268 ! !* Read Kmm fields 269 IF(lwp) WRITE(numout,*) ' Kmm u, v and T-S fields read in the restart file' 270 CALL iom_get( numror, jpdom_auto, 'un' , uu(:,:,: ,Kmm), cd_type = 'U', psgn = -1._wp ) 271 CALL iom_get( numror, jpdom_auto, 'vn' , vv(:,:,: ,Kmm), cd_type = 'V', psgn = -1._wp ) 272 CALL iom_get( numror, jpdom_auto, 'tn' , ts(:,:,:,jp_tem,Kmm) ) 273 CALL iom_get( numror, jpdom_auto, 'sn' , ts(:,:,:,jp_sal,Kmm) ) 274 ! 275 IF( l_1st_euler ) THEN !* Euler restart 276 IF(lwp) WRITE(numout,*) ' Kbb u, v and T-S fields set to Kmm values' 277 ts(:,:,:,:,Kbb) = ts(:,:,:,:,Kmm) ! all before fields set to now values 278 uu(:,:,: ,Kbb) = uu(:,:,: ,Kmm) 279 vv(:,:,: ,Kbb) = vv(:,:,: ,Kmm) 280 ELSE !* Leap frog restart 281 IF(lwp) WRITE(numout,*) ' Kbb u, v and T-S fields read in the restart file' 274 282 CALL iom_get( numror, jpdom_auto, 'ub' , uu(:,:,: ,Kbb), cd_type = 'U', psgn = -1._wp ) 275 283 CALL iom_get( numror, jpdom_auto, 'vb' , vv(:,:,: ,Kbb), cd_type = 'V', psgn = -1._wp ) 276 284 CALL iom_get( numror, jpdom_auto, 'tb' , ts(:,:,:,jp_tem,Kbb) ) 277 285 CALL iom_get( numror, jpdom_auto, 'sb' , ts(:,:,:,jp_sal,Kbb) ) 278 CALL iom_get( numror, jpdom_auto, 'sshb' ,ssh(:,: ,Kbb) ) 279 ELSE 280 l_1st_euler = .TRUE. ! before field not found, forced euler 1st time-step 281 ENDIF 282 ! 283 ! now fields 284 CALL iom_get( numror, jpdom_auto, 'un' , uu(:,:,: ,Kmm), cd_type = 'U', psgn = -1._wp ) 285 CALL iom_get( numror, jpdom_auto, 'vn' , vv(:,:,: ,Kmm), cd_type = 'V', psgn = -1._wp ) 286 CALL iom_get( numror, jpdom_auto, 'tn' , ts(:,:,:,jp_tem,Kmm) ) 287 CALL iom_get( numror, jpdom_auto, 'sn' , ts(:,:,:,jp_sal,Kmm) ) 288 CALL iom_get( numror, jpdom_auto, 'sshn' ,ssh(:,: ,Kmm) ) 286 ENDIF 287 ! 289 288 IF( iom_varid( numror, 'rhop', ldstop = .FALSE. ) > 0 ) THEN 290 289 CALL iom_get( numror, jpdom_auto, 'rhop' , rhop ) ! now potential density … … 293 292 ENDIF 294 293 ! 295 IF( l_1st_euler ) THEN ! Euler restart296 ts (:,:,:,:,Kbb) = ts (:,:,:,:,Kmm) ! all before fields set to now values297 uu (:,:,: ,Kbb) = uu (:,:,: ,Kmm)298 vv (:,:,: ,Kbb) = vv (:,:,: ,Kmm)299 ssh (:,: ,Kbb) = ssh (:,: ,Kmm)300 ENDIF301 !302 294 END SUBROUTINE rst_read 303 295
Note: See TracChangeset
for help on using the changeset viewer.