Changeset 5989 for branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90
- Timestamp:
- 2015-12-03T09:10:32+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2014/dev_r4650_UKMO10_Tidally_Meaned_Diagnostics/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90
r5260 r5989 18 18 USE c1d ! 1D configuration 19 19 USE domcfg ! domain configuration (dom_cfg routine) 20 USE domain ! domain initialization 21 USE istate ! initial state setting (istate_init routine)20 USE domain ! domain initialization from coordinate & bathymetry (dom_init routine) 21 USE domrea ! domain initialization from mesh_mask (dom_init routine) 22 22 USE eosbn2 ! equation of state (eos bn2 routine) 23 23 ! ! ocean physics … … 26 26 USE traqsr ! solar radiation penetration (tra_qsr_init routine) 27 27 USE trabbl ! bottom boundary layer (tra_bbl_init routine) 28 USE traldf ! lateral physics (tra_ldf_init routine) 28 29 USE zdfini ! vertical physics: initialization 29 30 USE sbcmod ! surface boundary condition (sbc_init routine) … … 34 35 USE trcstp ! passive tracer time-stepping (trc_stp routine) 35 36 USE dtadyn ! Lecture and interpolation of the dynamical fields 36 USE stpctl ! time stepping control (stp_ctl routine)37 37 ! ! I/O & MPP 38 38 USE iom ! I/O library … … 95 95 istp = nit000 96 96 ! 97 CALL iom_init( "nemo") ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS)97 CALL iom_init( cxios_context ) ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS) 98 98 ! 99 99 DO WHILE ( istp <= nitend .AND. nstop == 0 ) ! time stepping … … 108 108 END DO 109 109 #if defined key_iomput 110 CALL iom_context_finalize( "nemo") ! needed for XIOS+AGRIF110 CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF 111 111 #endif 112 112 … … 143 143 INTEGER :: ilocal_comm ! local integer 144 144 INTEGER :: ios 145 LOGICAL :: llexist 145 146 CHARACTER(len=80), DIMENSION(16) :: cltxt 146 147 !! … … 152 153 !!---------------------------------------------------------------------- 153 154 cltxt = '' 155 cxios_context = 'nemo' 154 156 ! 155 157 ! ! Open reference namelist and configuration namelist files … … 181 183 ! !--------------------------------------------! 182 184 #if defined key_iomput 183 CALL xios_initialize( " nemo",return_comm=ilocal_comm )184 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection185 CALL xios_initialize( "for_xios_mpi_id",return_comm=ilocal_comm ) 186 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop, ilocal_comm ) ! Nodes selection 185 187 #else 186 188 ilocal_comm = 0 187 narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop ) ! Nodes selection (control print return in cltxt)189 narea = mynode( cltxt, 'output.namelist.dyn', numnam_ref, numnam_cfg, numond , nstop ) ! Nodes selection (control print return in cltxt) 188 190 #endif 189 191 … … 268 270 IF( lk_c1d ) CALL c1d_init ! 1D column configuration 269 271 CALL dom_cfg ! Domain configuration 270 CALL dom_init ! Domain 272 ! 273 INQUIRE( FILE='coordinates.nc', EXIST = llexist ) ! Check if coordinate file exist 274 ! 275 IF( llexist ) THEN ; CALL dom_init ! compute the grid from coordinates and bathymetry 276 ELSE ; CALL dom_rea ! read grid from the meskmask 277 ENDIF 271 278 CALL istate_init ! ocean initial state (Dynamics and tracers) 272 279 … … 275 282 IF( ln_ctl ) CALL prt_ctl_init ! Print control 276 283 277 ! ! Ocean physics278 284 CALL sbc_init ! Forcings : surface module 279 #if ! defined key_degrad 285 280 286 CALL ldf_tra_init ! Lateral ocean tracer physics 281 #endif 282 IF( lk_ldfslp ) CALL ldf_slp_init ! slope oflateral mixing283 284 ! ! Active tracers 287 CALL ldf_eiv_init ! Eddy induced velocity param 288 CALL tra_ldf_init ! lateral mixing 289 IF( l_ldfslp ) CALL ldf_slp_init ! slope of lateral mixing 290 285 291 CALL tra_qsr_init ! penetrative solar radiation qsr 286 292 IF( lk_trabbl ) CALL tra_bbl_init ! advective (and/or diffusive) bottom boundary layer scheme 287 293 288 CALL trc_nam_run ! Needed to get restart parameters for passive tracers 289 IF( ln_rsttr ) THEN 290 neuler = 1 ! Set time-step indicator at nit000 (leap-frog) 291 CALL trc_rst_cal( nit000, 'READ' ) ! calendar 292 ELSE 293 neuler = 0 ! Set time-step indicator at nit000 (euler) 294 CALL day_init ! set calendar 295 ENDIF 296 ! ! Dynamics 294 CALL trc_nam_run ! Needed to get restart parameters for passive tracers 295 CALL trc_rst_cal( nit000, 'READ' ) ! calendar 297 296 CALL dta_dyn_init ! Initialization for the dynamics 298 297 299 ! ! Passive tracers300 298 CALL trc_init ! Passive tracers initialization 301 ! 302 ! Initialise diaptr as some variables are used in if statements later (in 303 ! various advection and diffusion routines. 304 CALL dia_ptr_init 305 ! 306 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA 299 CALL dia_ptr_init ! Initialise diaptr as some variables are used 300 ! ! in various advection and diffusion routines 301 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA 307 302 ! 308 303 IF( nn_timing == 1 ) CALL timing_stop( 'nemo_init') … … 450 445 USE dom_oce, ONLY: dom_oce_alloc 451 446 USE zdf_oce, ONLY: zdf_oce_alloc 452 USE ldftra_oce, ONLY: ldftra_oce_alloc453 447 USE trc_oce, ONLY: trc_oce_alloc 454 448 ! … … 459 453 ierr = ierr + dia_wri_alloc () 460 454 ierr = ierr + dom_oce_alloc () ! ocean domain 461 ierr = ierr + ldftra_oce_alloc() ! ocean lateral physics : tracers462 455 ierr = ierr + zdf_oce_alloc () ! ocean vertical physics 463 456 ! … … 659 652 END SUBROUTINE nemo_northcomms 660 653 #endif 654 655 SUBROUTINE istate_init 656 !!---------------------------------------------------------------------- 657 !! *** ROUTINE istate_init *** 658 !! 659 !! ** Purpose : Initialization to zero of the dynamics and tracers. 660 !!---------------------------------------------------------------------- 661 ! 662 ! now fields ! after fields ! 663 un (:,:,:) = 0._wp ; ua(:,:,:) = 0._wp ! 664 vn (:,:,:) = 0._wp ; va(:,:,:) = 0._wp ! 665 wn (:,:,:) = 0._wp ! ! 666 hdivn(:,:,:) = 0._wp ! ! 667 tsn (:,:,:,:) = 0._wp ! ! 668 ! 669 rhd (:,:,:) = 0.e0 670 rhop (:,:,:) = 0.e0 671 rn2 (:,:,:) = 0.e0 672 ! 673 END SUBROUTINE istate_init 674 675 SUBROUTINE stp_ctl( kt, kindic ) 676 !!---------------------------------------------------------------------- 677 !! *** ROUTINE stp_ctl *** 678 !! 679 !! ** Purpose : Control the run 680 !! 681 !! ** Method : - Save the time step in numstp 682 !! 683 !! ** Actions : 'time.step' file containing the last ocean time-step 684 !!---------------------------------------------------------------------- 685 INTEGER, INTENT(in ) :: kt ! ocean time-step index 686 INTEGER, INTENT(inout) :: kindic ! indicator of solver convergence 687 !!---------------------------------------------------------------------- 688 ! 689 IF( kt == nit000 .AND. lwp ) THEN 690 WRITE(numout,*) 691 WRITE(numout,*) 'stp_ctl : time-stepping control' 692 WRITE(numout,*) '~~~~~~~' 693 ! open time.step file 694 CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 695 ENDIF 696 ! 697 IF(lwp) WRITE ( numstp, '(1x, i8)' ) kt !* save the current time step in numstp 698 IF(lwp) REWIND( numstp ) ! -------------------------- 699 ! 700 END SUBROUTINE stp_ctl 661 701 !!====================================================================== 662 702 END MODULE nemogcm
Note: See TracChangeset
for help on using the changeset viewer.