Changeset 5930 for trunk/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
- Timestamp:
- 2015-11-26T17:07:10+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
r5836 r5930 35 35 USE dtauvd ! data: U & V current (dta_uvd routine) 36 36 USE domvvl ! varying vertical mesh 37 USE dynspg_oce ! pressure gradient schemes38 USE dynspg_flt ! filtered free surface39 USE sol_oce ! ocean solver variables40 37 ! 41 38 USE in_out_manager ! I/O manager … … 133 130 ENDIF 134 131 ! 135 IF( lk_agrif ) THEN ! read free surface arrays in restart file136 IF( ln_rstart ) THEN137 IF( lk_dynspg_flt ) THEN ! read or initialize the following fields138 ! ! gcx, gcxb for agrif_opa_init139 IF( sol_oce_alloc() > 0 ) CALL ctl_stop('agrif sol_oce_alloc: allocation of arrays failed')140 CALL flt_rst( nit000, 'READ' )141 ENDIF142 ENDIF ! explicit case not coded yet with AGRIF143 ENDIF144 !145 132 ! 146 133 ! Initialize "now" and "before" barotropic velocities: … … 445 432 !! p=integral [ rau*g dz ] 446 433 !!---------------------------------------------------------------------- 447 USE dynspg ! surface pressure gradient (dyn_spg routine)448 434 USE divhor ! hor. divergence (div_hor routine) 449 435 USE lbclnk ! ocean lateral boundary condition (or mpp link) 450 436 ! 451 437 INTEGER :: ji, jj, jk ! dummy loop indices 452 INTEGER :: indic ! ???453 438 REAL(wp) :: zmsv, zphv, zmsu, zphu, zalfg ! temporary scalars 454 439 REAL(wp), POINTER, DIMENSION(:,:,:) :: zprn … … 517 502 vb(:,:,:) = vn(:,:,:) 518 503 519 ! WARNING !!!!!520 ! after initializing u and v, we need to calculate the initial streamfunction bsf.521 ! Otherwise, only the trend will be computed and the model will blow up (inconsistency).522 ! to do that, we call dyn_spg with a special trick:523 ! we fill ua and va with the velocities divided by dt, and the streamfunction will be brought to the524 ! right value assuming the velocities have been set up in one time step.525 ! we then set bsfd to zero (first guess for next step is d(psi)/dt = 0.)526 ! sets up s false trend to calculate the barotropic streamfunction.527 528 ua(:,:,:) = ub(:,:,:) / rdt529 va(:,:,:) = vb(:,:,:) / rdt530 531 ! calls dyn_spg. we assume euler time step, starting from rest.532 indic = 0533 CALL dyn_spg( nit000, indic ) ! surface pressure gradient534 !535 ! the new velocity is ua*rdt536 !537 CALL lbc_lnk( ua, 'U', -1. )538 CALL lbc_lnk( va, 'V', -1. )539 540 ub(:,:,:) = ua(:,:,:) * rdt541 vb(:,:,:) = va(:,:,:) * rdt542 ua(:,:,:) = 0.e0543 va(:,:,:) = 0.e0544 un(:,:,:) = ub(:,:,:)545 vn(:,:,:) = vb(:,:,:)546 504 ! 547 505 !!gm Check here call to div_hor should not be necessary
Note: See TracChangeset
for help on using the changeset viewer.