Changeset 389 for trunk/NEMO/OPA_SRC/opa.F90
- Timestamp:
- 2006-03-09T18:22:04+01:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/opa.F90
r367 r389 60 60 !! * Routine accessibility 61 61 PUBLIC opa_model ! called by model.F90 62 PUBLIC opa_init 62 63 !!---------------------------------------------------------------------- 63 64 !! OPA 9.0 , LOCEAN-IPSL (2005) … … 105 106 !! * Local declarations 106 107 INTEGER :: istp ! time step index 107 #if defined key_coupled108 INTEGER :: itro, istp0 ! ???109 #endif110 108 CHARACTER (len=64) :: & 111 109 cform_aaa="( /, 'AAAAAAAA', / ) " ! flag for output listing 112 CHARACTER (len=28) :: file_out 113 !!---------------------------------------------------------------------- 110 !!---------------------------------------------------------------------- 111 112 #if defined key_AGRIF 113 114 Call Agrif_Init_Grids() 115 #endif 114 116 115 116 ! Initializations 117 ! =============== 118 119 file_out = 'ocean.output' 120 121 ! open listing and namelist units 122 IF ( numout /= 0 .AND. numout /= 6 ) THEN 123 OPEN( UNIT=numout, FILE=TRIM(file_out), FORM='FORMATTED' ) 124 ENDIF 125 126 OPEN( UNIT=numnam, FILE='namelist', FORM='FORMATTED', STATUS='OLD' ) 127 128 WRITE(numout,*) 129 WRITE(numout,*) ' L O D Y C - I P S L' 130 WRITE(numout,*) ' O P A model' 131 WRITE(numout,*) ' Ocean General Circulation Model' 132 WRITE(numout,*) ' version OPA 9.0 (2005) ' 133 WRITE(numout,*) 134 WRITE(numout,*) 135 136 ! Nodes selection 137 narea = mynode() 138 narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) 139 lwp = narea == 1 140 141 ! ! ============================== ! 142 ! ! Model general initialization ! 143 ! ! ============================== ! 144 145 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA 146 147 ! Domain decomposition 148 IF( jpni*jpnj == jpnij ) THEN 149 CALL mpp_init ! standard cutting out 150 ELSE 151 CALL mpp_init2 ! eliminate land processors 152 ENDIF 153 154 CALL phy_cst ! Physical constants 155 156 CALL dom_cfg ! Domain configuration 157 158 CALL dom_init ! Domain 159 160 IF( ln_ctl ) CALL prt_ctl_init ! Print control 161 162 IF( lk_cfg_1d ) CALL fcorio_1d ! redefine Coriolis at T-point 163 164 IF( lk_obc ) CALL obc_init ! Open boundaries 165 166 IF( lk_dynspg_flt .OR. lk_dynspg_rl ) THEN 167 CALL solver_init ! Elliptic solver 168 ENDIF 169 170 CALL day( nit000 ) ! Calendar 171 172 CALL istate_init ! ocean initial state (Dynamics and tracers) 173 !!add 174 CALL eos( tb, sb, rhd, rhop ) ! before potential and in situ densities 175 176 CALL bn2( tb, sb, rn2 ) ! before Brunt-Vaisala frequency 177 178 IF( lk_zps .AND. .NOT. lk_cfg_1d ) & 179 & CALL zps_hde( nit000, tb, sb, rhd, & ! Partial steps: before Horizontal DErivative 180 gtu, gsu, gru, & ! of t, s, rd at the bottom ocean level 181 gtv, gsv, grv ) 182 183 !!add 184 185 CALL oc_fz_pt ! Surface freezing point 186 187 #if defined key_ice_lim 188 CALL ice_init ! Sea ice model 189 #endif 190 191 ! ! Ocean scheme 192 193 CALL opa_flg ! Choice of algorithms 194 195 ! ! Ocean physics 196 197 CALL tra_qsr_init ! Solar radiation penetration 198 199 CALL ldf_dyn_init ! Lateral ocean momentum physics 200 201 CALL ldf_tra_init ! Lateral ocean tracer physics 202 203 CALL zdf_init ! Vertical ocean physics 204 205 ! ! Ocean trends 206 ! Control parameters 207 IF( lk_trdtra .OR. lk_trdmld ) l_trdtra = .TRUE. 208 IF( lk_trddyn .OR. lk_trdvor ) l_trddyn = .TRUE. 209 210 IF( lk_trddyn .OR. lk_trdtra ) & 211 & CALL trd_icp_init ! active tracers and/or momentum 212 213 IF( lk_trdmld ) CALL trd_mld_init ! mixed layer 214 215 IF( lk_trdvor ) CALL trd_vor_init ! vorticity 216 217 #if defined key_passivetrc 218 CALL ini_trc ! Passive tracers 219 #endif 220 221 #if defined key_coupled 222 itro = nitend - nit000 + 1 ! Coupled 223 istp0 = NINT( rdt ) 224 CALL cpl_init( itro, nexco, istp0 ) ! Signal processing and process id exchange 225 #endif 226 227 CALL flx_fwb_init ! FreshWater Budget correction 228 229 CALL dia_ptr_init ! Poleward TRansports initialization 230 231 ! ! =============== ! 232 ! ! time stepping ! 233 ! ! =============== ! 234 235 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA 117 Call opa_init ! Initializations 236 118 237 119 IF( lk_cfg_1d ) THEN 238 CALL init_1d239 120 istp = nit000 240 121 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 122 #if defined key_AGRIF 123 CALL Agrif_Step(stp_1d) 124 #else 241 125 CALL stp_1d( istp ) 126 #endif 242 127 istp = istp + 1 243 128 END DO … … 245 130 istp = nit000 246 131 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 132 #if defined key_AGRIF 133 CALL Agrif_Step(stp) 134 #else 247 135 CALL stp( istp ) 136 #endif 248 137 istp = istp + 1 249 138 END DO … … 346 235 347 236 !!====================================================================== 237 SUBROUTINE opa_init 238 !!---------------------------------------------------------------------- 239 !! *** ROUTINE opa_init *** 240 !! 241 !! ** Purpose : initialization of the opa model 242 !! 243 !! ** Method : 244 !! 245 !! References : 246 !!---------------------------------------------------------------------- 247 !! * Local declarations 248 249 #if defined key_coupled 250 INTEGER :: itro, istp0 ! ??? 251 #endif 252 CHARACTER (len=64) :: & 253 cform_aaa="( /, 'AAAAAAAA', / ) " ! flag for output listing 254 CHARACTER (len=20) :: namelistname 255 CHARACTER (len=28) :: file_out 256 !!---------------------------------------------------------------------- 257 258 ! Initializations 259 ! =============== 260 261 file_out = 'ocean.output' 262 263 ! open listing and namelist units 264 IF ( numout /= 0 .AND. numout /= 6 ) THEN 265 CALL ctlopn(numout,file_out,'UNKNOWN', 'FORMATTED', & 266 'SEQUENTIAL',1,numout,.FALSE.,1) 267 ! OPEN( UNIT=numout, FILE=TRIM(file_out), FORM='FORMATTED' ) 268 ENDIF 269 270 namelistname = 'namelist' 271 CALL ctlopn(numnam,namelistname,'OLD', 'FORMATTED', 'SEQUENTIAL', & 272 1,numout,.FALSE.,1) 273 !!!! OPEN( UNIT=numnam, FILE='namelist', FORM='FORMATTED', STATUS='OLD' ) 274 275 WRITE(numout,*) 276 WRITE(numout,*) ' L O D Y C - I P S L' 277 WRITE(numout,*) ' O P A model' 278 WRITE(numout,*) ' Ocean General Circulation Model' 279 WRITE(numout,*) ' version OPA 9.0 (2005) ' 280 WRITE(numout,*) 281 WRITE(numout,*) 282 283 ! Nodes selection 284 narea = mynode() 285 narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) 286 lwp = narea == 1 287 288 ! ! ============================== ! 289 ! ! Model general initialization ! 290 ! ! ============================== ! 291 292 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA 293 294 ! Domain decomposition 295 IF( jpni*jpnj == jpnij ) THEN 296 CALL mpp_init ! standard cutting out 297 ELSE 298 CALL mpp_init2 ! eliminate land processors 299 ENDIF 300 301 CALL phy_cst ! Physical constants 302 303 CALL dom_cfg ! Domain configuration 304 305 CALL dom_init ! Domain 306 IF( ln_ctl ) CALL prt_ctl_init ! Print control 307 308 IF( lk_cfg_1d ) CALL fcorio_1d ! redefine Coriolis at T-point 309 310 IF( lk_obc ) CALL obc_init ! Open boundaries 311 312 IF( lk_dynspg_flt .OR. lk_dynspg_rl ) THEN 313 CALL solver_init ! Elliptic solver 314 ENDIF 315 316 CALL day( nit000 ) ! Calendar 317 318 CALL istate_init ! ocean initial state (Dynamics and tracers) 319 !!add 320 CALL eos( tb, sb, rhd, rhop ) ! before potential and in situ densities 321 322 CALL bn2( tb, sb, rn2 ) ! before Brunt-Vaisala frequency 323 324 IF( lk_zps .AND. .NOT. lk_cfg_1d ) & 325 & CALL zps_hde( nit000, tb, sb, rhd, & ! Partial steps: before Horizontal DErivative 326 gtu, gsu, gru, & ! of t, s, rd at the bottom ocean level 327 gtv, gsv, grv ) 328 329 !!add 330 331 CALL oc_fz_pt ! Surface freezing point 332 333 #if defined key_ice_lim 334 CALL ice_init ! Sea ice model 335 #endif 336 337 ! ! Ocean scheme 338 339 CALL opa_flg ! Choice of algorithms 340 341 ! ! Ocean physics 342 343 CALL tra_qsr_init ! Solar radiation penetration 344 345 CALL ldf_dyn_init ! Lateral ocean momentum physics 346 347 CALL ldf_tra_init ! Lateral ocean tracer physics 348 349 CALL zdf_init ! Vertical ocean physics 350 351 ! ! Ocean trends 352 ! Control parameters 353 IF( lk_trdtra .OR. lk_trdmld ) l_trdtra = .TRUE. 354 IF( lk_trddyn .OR. lk_trdvor ) l_trddyn = .TRUE. 355 356 IF( lk_trddyn .OR. lk_trdtra ) & 357 & CALL trd_icp_init ! active tracers and/or momentum 358 359 IF( lk_trdmld ) CALL trd_mld_init ! mixed layer 360 361 IF( lk_trdvor ) CALL trd_vor_init ! vorticity 362 363 #if defined key_passivetrc 364 CALL ini_trc ! Passive tracers 365 #endif 366 367 #if defined key_coupled 368 itro = nitend - nit000 + 1 ! Coupled 369 istp0 = NINT( rdt ) 370 CALL cpl_init( itro, nexco, istp0 ) ! Signal processing and process id exchange 371 #endif 372 373 CALL flx_fwb_init ! FreshWater Budget correction 374 375 CALL dia_ptr_init ! Poleward TRansports initialization 376 377 ! ! =============== ! 378 ! ! time stepping ! 379 ! ! =============== ! 380 381 IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA 382 383 IF( lk_cfg_1d ) THEN 384 CALL init_1d 385 ENDIF 386 END SUBROUTINE opa_init 387 !!====================================================================== 348 388 END MODULE opa
Note: See TracChangeset
for help on using the changeset viewer.