[3] | 1 | MODULE opa |
---|
| 2 | !!============================================================================== |
---|
| 3 | !! *** MODULE opa *** |
---|
| 4 | !! Ocean system : OPA ocean dynamics (including on-line tracers and sea-ice) |
---|
| 5 | !!============================================================================== |
---|
| 6 | |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
| 8 | !! opa_model : solve ocean dynamics, tracer and/or sea-ice |
---|
[467] | 9 | !! opa_init : initialization of the opa model |
---|
[3] | 10 | !! opa_flg : initialisation of algorithm flag |
---|
[300] | 11 | !! opa_closefile : close remaining files |
---|
[3] | 12 | !!---------------------------------------------------------------------- |
---|
[467] | 13 | !! History : |
---|
| 14 | !! 4.0 ! 90-10 (C. Levy, G. Madec) Original code |
---|
| 15 | !! 7.0 ! 91-11 (M. Imbard, C. Levy, G. Madec) |
---|
| 16 | !! 7.1 ! 93-03 (M. Imbard, C. Levy, G. Madec, O. Marti, |
---|
| 17 | !! M. Guyon, A. Lazar, P. Delecluse, C. Perigaud, |
---|
| 18 | !! G. Caniaux, B. Colot, C. Maes ) release 7.1 |
---|
| 19 | !! ! 92-06 (L.Terray) coupling implementation |
---|
| 20 | !! ! 93-11 (M.A. Filiberti) IGLOO sea-ice |
---|
| 21 | !! 8.0 ! 96-03 (M. Imbard, C. Levy, G. Madec, O. Marti, |
---|
| 22 | !! M. Guyon, A. Lazar, P. Delecluse, L.Terray, |
---|
| 23 | !! M.A. Filiberti, J. Vialar, A.M. Treguier, |
---|
| 24 | !! M. Levy) release 8.0 |
---|
| 25 | !! 8.1 ! 97-06 (M. Imbard, G. Madec) |
---|
| 26 | !! 8.2 ! 99-11 (M. Imbard, H. Goosse) LIM sea-ice model |
---|
| 27 | !! ! 99-12 (V. Thierry, A-M. Treguier, M. Imbard, M-A. Foujols) OPEN-MP |
---|
| 28 | !! ! 00-07 (J-M Molines, M. Imbard) Open Boundary Conditions (CLIPPER) |
---|
| 29 | !! 9.0 ! 02-08 (G. Madec) F90: Free form and modules |
---|
[532] | 30 | !! " ! 04-06 (R. Redler, NEC CCRLE, Germany) add OASIS[3/4] coupled interfaces |
---|
[467] | 31 | !! " ! 04-08 (C. Talandier) New trends organization |
---|
| 32 | !! " ! 05-06 (C. Ethe) Add the 1D configuration possibility |
---|
| 33 | !! " ! 05-11 (V. Garnier) Surface pressure gradient organization |
---|
| 34 | !! " ! 06-03 (L. Debreu, C. Mazauric) Agrif implementation |
---|
| 35 | !! " ! 06-04 (G. Madec, R. Benshila) Step reorganization |
---|
| 36 | !!---------------------------------------------------------------------- |
---|
[3] | 37 | !! * Modules used |
---|
[888] | 38 | USE oce ! dynamics and tracers variables |
---|
[145] | 39 | USE cpl_oce ! ocean-atmosphere-sea ice coupled exchanges |
---|
[3] | 40 | USE dom_oce ! ocean space domain variables |
---|
[888] | 41 | USE sbc_oce ! surface boundary condition: ocean |
---|
[216] | 42 | USE trdmod_oce ! ocean variables trends |
---|
[3] | 43 | USE daymod ! calendar |
---|
| 44 | USE in_out_manager ! I/O manager |
---|
| 45 | USE lib_mpp ! distributed memory computing |
---|
| 46 | |
---|
| 47 | USE domcfg ! domain configuration (dom_cfg routine) |
---|
| 48 | USE mppini ! shared/distributed memory setting (mpp_init routine) |
---|
| 49 | USE domain ! domain initialization (dom_init routine) |
---|
| 50 | USE obc_par ! open boundary cond. parameters |
---|
| 51 | USE obcini ! open boundary cond. initialization (obc_ini routine) |
---|
| 52 | USE istate ! initial state setting (istate_init routine) |
---|
| 53 | USE eosbn2 ! equation of state (eos bn2 routine) |
---|
| 54 | USE zpshde ! partial step: hor. derivative (zps_hde routine) |
---|
| 55 | |
---|
| 56 | ! ocean physics |
---|
| 57 | USE ldfdyn ! lateral viscosity setting (ldfdyn_init routine) |
---|
| 58 | USE ldftra ! lateral diffusivity setting (ldftra_init routine) |
---|
| 59 | USE zdfini |
---|
| 60 | |
---|
| 61 | USE phycst ! physical constant (par_cst routine) |
---|
| 62 | USE ocfzpt ! ocean freezing point (oc_fz_pt routine) |
---|
[503] | 63 | USE trdmod ! momentum/tracers trends (trd_mod_init routine) |
---|
[3] | 64 | |
---|
[132] | 65 | USE diaptr ! poleward transports (dia_ptr_init routine) |
---|
[3] | 66 | |
---|
| 67 | USE step ! OPA time-stepping (stp routine) |
---|
[532] | 68 | #if defined key_oasis3 |
---|
| 69 | USE cpl_oasis3 ! OASIS3 coupling (to ECHAM5) |
---|
[599] | 70 | #elif defined key_oasis4 |
---|
[532] | 71 | USE cpl_oasis4 ! OASIS4 coupling (to ECHAM5) |
---|
| 72 | #endif |
---|
| 73 | USE dynspg_oce ! Control choice of surface pressure gradient schemes |
---|
[258] | 74 | USE prtctl ! Print control (prt_ctl_init routine) |
---|
[253] | 75 | USE ini1d ! re-initialization of u-v mask for the 1D configuration |
---|
| 76 | USE dyncor1d ! Coriolis factor at T-point |
---|
| 77 | USE step1d ! Time stepping loop for the 1D configuration |
---|
[3] | 78 | |
---|
[268] | 79 | USE initrc ! Initialization of the passive tracers |
---|
| 80 | |
---|
[3] | 81 | IMPLICIT NONE |
---|
| 82 | PRIVATE |
---|
| 83 | |
---|
[467] | 84 | !! * Module variables |
---|
| 85 | CHARACTER (len=64) :: & |
---|
| 86 | cform_aaa="( /, 'AAAAAAAA', / ) " ! flag for output listing |
---|
| 87 | |
---|
[3] | 88 | !! * Routine accessibility |
---|
| 89 | PUBLIC opa_model ! called by model.F90 |
---|
[389] | 90 | PUBLIC opa_init |
---|
[3] | 91 | !!---------------------------------------------------------------------- |
---|
[247] | 92 | !! OPA 9.0 , LOCEAN-IPSL (2005) |
---|
[888] | 93 | !! $Id$ |
---|
[467] | 94 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
[3] | 95 | !!---------------------------------------------------------------------- |
---|
| 96 | |
---|
| 97 | CONTAINS |
---|
| 98 | |
---|
| 99 | SUBROUTINE opa_model |
---|
| 100 | !!---------------------------------------------------------------------- |
---|
| 101 | !! *** ROUTINE opa *** |
---|
| 102 | !! |
---|
| 103 | !! ** Purpose : opa solves the primitive equations on an orthogonal |
---|
| 104 | !! curvilinear mesh on the sphere. |
---|
| 105 | !! |
---|
| 106 | !! ** Method : - model general initialization |
---|
| 107 | !! - launch the time-stepping (stp routine) |
---|
| 108 | !! |
---|
| 109 | !! References : |
---|
| 110 | !! Madec, Delecluse,Imbard, and Levy, 1997: reference manual. |
---|
| 111 | !! internal report, IPSL. |
---|
| 112 | !!---------------------------------------------------------------------- |
---|
| 113 | INTEGER :: istp ! time step index |
---|
[389] | 114 | !!---------------------------------------------------------------------- |
---|
| 115 | |
---|
[392] | 116 | #if defined key_agrif |
---|
[467] | 117 | CALL Agrif_Init_Grids() |
---|
[389] | 118 | #endif |
---|
| 119 | |
---|
[467] | 120 | CALL opa_init ! Initializations |
---|
[389] | 121 | |
---|
[682] | 122 | ! check that all process are still there... If some process have an error, |
---|
| 123 | ! they will never enter in step and other processes will wait until the end of the cpu time! |
---|
| 124 | IF( lk_mpp ) CALL mpp_max(nstop) |
---|
| 125 | |
---|
[899] | 126 | IF( lk_c1d ) THEN |
---|
[389] | 127 | istp = nit000 |
---|
| 128 | DO WHILE ( istp <= nitend .AND. nstop == 0 ) |
---|
[392] | 129 | #if defined key_agrif |
---|
[389] | 130 | CALL Agrif_Step(stp_1d) |
---|
| 131 | #else |
---|
| 132 | CALL stp_1d( istp ) |
---|
| 133 | #endif |
---|
| 134 | istp = istp + 1 |
---|
[682] | 135 | |
---|
| 136 | IF( lk_mpp ) CALL mpp_max(nstop) |
---|
| 137 | |
---|
[389] | 138 | END DO |
---|
| 139 | ELSE |
---|
| 140 | istp = nit000 |
---|
| 141 | DO WHILE ( istp <= nitend .AND. nstop == 0 ) |
---|
[392] | 142 | #if defined key_agrif |
---|
[389] | 143 | CALL Agrif_Step(stp) |
---|
| 144 | #else |
---|
| 145 | CALL stp( istp ) |
---|
| 146 | #endif |
---|
| 147 | istp = istp + 1 |
---|
[682] | 148 | |
---|
| 149 | IF( lk_mpp ) CALL mpp_max(nstop) |
---|
| 150 | |
---|
[389] | 151 | END DO |
---|
| 152 | ENDIF |
---|
| 153 | ! ! ========= ! |
---|
| 154 | ! ! Job end ! |
---|
| 155 | ! ! ========= ! |
---|
| 156 | |
---|
| 157 | IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA |
---|
| 158 | |
---|
[682] | 159 | IF( nstop /= 0 .AND. lwp ) THEN ! error print |
---|
| 160 | WRITE(numout,cform_err) |
---|
| 161 | WRITE(numout,*) nstop, ' error have been found' |
---|
[389] | 162 | ENDIF |
---|
| 163 | |
---|
| 164 | CALL opa_closefile |
---|
[532] | 165 | #if defined key_oasis3 || defined key_oasis4 |
---|
| 166 | call cpl_prism_finalize |
---|
| 167 | #else |
---|
[389] | 168 | IF( lk_mpp ) CALL mppstop ! Close all files (mpp) |
---|
[532] | 169 | #endif |
---|
[389] | 170 | |
---|
| 171 | END SUBROUTINE opa_model |
---|
| 172 | |
---|
| 173 | |
---|
| 174 | SUBROUTINE opa_init |
---|
| 175 | !!---------------------------------------------------------------------- |
---|
| 176 | !! *** ROUTINE opa_init *** |
---|
| 177 | !! |
---|
| 178 | !! ** Purpose : initialization of the opa model |
---|
| 179 | !! |
---|
| 180 | !!---------------------------------------------------------------------- |
---|
[3] | 181 | #if defined key_coupled |
---|
| 182 | INTEGER :: itro, istp0 ! ??? |
---|
| 183 | #endif |
---|
[532] | 184 | #if defined key_oasis3 || defined key_oasis4 |
---|
| 185 | INTEGER :: localComm |
---|
| 186 | #endif |
---|
[467] | 187 | CHARACTER (len=20) :: namelistname |
---|
| 188 | CHARACTER (len=28) :: file_out |
---|
[531] | 189 | NAMELIST/namctl/ ln_ctl, nprint, nictls, nictle, & |
---|
| 190 | & isplt , jsplt , njctls, njctle, nbench, nbit_cmp |
---|
[3] | 191 | !!---------------------------------------------------------------------- |
---|
[389] | 192 | |
---|
[3] | 193 | ! Initializations |
---|
| 194 | ! =============== |
---|
[231] | 195 | |
---|
| 196 | file_out = 'ocean.output' |
---|
[3] | 197 | |
---|
| 198 | ! open listing and namelist units |
---|
[624] | 199 | CALL ctlopn( numout, file_out, 'UNKNOWN', 'FORMATTED', & |
---|
[634] | 200 | & 'SEQUENTIAL', 1, 6, .FALSE., 1 ) |
---|
[3] | 201 | |
---|
[300] | 202 | WRITE(numout,*) |
---|
| 203 | WRITE(numout,*) ' L O D Y C - I P S L' |
---|
| 204 | WRITE(numout,*) ' O P A model' |
---|
| 205 | WRITE(numout,*) ' Ocean General Circulation Model' |
---|
| 206 | WRITE(numout,*) ' version OPA 9.0 (2005) ' |
---|
| 207 | WRITE(numout,*) |
---|
| 208 | WRITE(numout,*) |
---|
[231] | 209 | |
---|
[516] | 210 | namelistname = 'namelist' |
---|
| 211 | CALL ctlopn( numnam, namelistname, 'OLD', 'FORMATTED', 'SEQUENTIAL', & |
---|
[627] | 212 | & 1, numout, .FALSE., 1 ) |
---|
[516] | 213 | |
---|
| 214 | ! Namelist namctl : Control prints & Benchmark |
---|
| 215 | REWIND( numnam ) |
---|
| 216 | READ ( numnam, namctl ) |
---|
| 217 | |
---|
[599] | 218 | #if defined key_oasis3 || defined key_oasis4 |
---|
[532] | 219 | call cpl_prism_init(localComm) |
---|
[3] | 220 | ! Nodes selection |
---|
[532] | 221 | narea = mynode(localComm) |
---|
| 222 | #else |
---|
| 223 | ! Nodes selection |
---|
[3] | 224 | narea = mynode() |
---|
[532] | 225 | #endif |
---|
[3] | 226 | narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) |
---|
| 227 | lwp = narea == 1 |
---|
| 228 | |
---|
[516] | 229 | ! open additionnal listing |
---|
| 230 | IF( ln_ctl ) THEN |
---|
| 231 | IF( narea-1 > 0 ) THEN |
---|
| 232 | WRITE(file_out,FMT="('ocean.output_',I4.4)") narea-1 |
---|
[627] | 233 | CALL ctlopn( numout, file_out, 'UNKNOWN', 'FORMATTED', & |
---|
| 234 | & 'SEQUENTIAL', 1, numout, .FALSE., 1 ) |
---|
[516] | 235 | lwp = .TRUE. |
---|
| 236 | ! |
---|
| 237 | WRITE(numout,*) |
---|
| 238 | WRITE(numout,*) ' L O D Y C - I P S L' |
---|
| 239 | WRITE(numout,*) ' O P A model' |
---|
| 240 | WRITE(numout,*) ' Ocean General Circulation Model' |
---|
| 241 | WRITE(numout,*) ' version OPA 9.0 (2005) ' |
---|
| 242 | WRITE(numout,*) ' MPI Ocean output ' |
---|
| 243 | WRITE(numout,*) |
---|
| 244 | WRITE(numout,*) |
---|
[473] | 245 | ENDIF |
---|
| 246 | ENDIF |
---|
| 247 | |
---|
[3] | 248 | ! ! ============================== ! |
---|
| 249 | ! ! Model general initialization ! |
---|
| 250 | ! ! ============================== ! |
---|
| 251 | |
---|
| 252 | IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA |
---|
| 253 | |
---|
[531] | 254 | CALL opa_flg ! Control prints & Benchmark |
---|
| 255 | |
---|
[3] | 256 | ! Domain decomposition |
---|
| 257 | IF( jpni*jpnj == jpnij ) THEN |
---|
| 258 | CALL mpp_init ! standard cutting out |
---|
| 259 | ELSE |
---|
| 260 | CALL mpp_init2 ! eliminate land processors |
---|
| 261 | ENDIF |
---|
| 262 | |
---|
| 263 | CALL phy_cst ! Physical constants |
---|
| 264 | |
---|
| 265 | CALL dom_cfg ! Domain configuration |
---|
| 266 | |
---|
| 267 | CALL dom_init ! Domain |
---|
[467] | 268 | |
---|
[258] | 269 | IF( ln_ctl ) CALL prt_ctl_init ! Print control |
---|
| 270 | |
---|
[899] | 271 | IF( lk_c1d ) CALL fcorio_1d ! redefine Coriolis at T-point |
---|
[3] | 272 | |
---|
[253] | 273 | IF( lk_obc ) CALL obc_init ! Open boundaries |
---|
| 274 | |
---|
[413] | 275 | CALL istate_init ! ocean initial state (Dynamics and tracers) |
---|
| 276 | |
---|
[3] | 277 | CALL oc_fz_pt ! Surface freezing point |
---|
| 278 | |
---|
| 279 | ! ! Ocean physics |
---|
| 280 | |
---|
| 281 | CALL ldf_dyn_init ! Lateral ocean momentum physics |
---|
| 282 | |
---|
| 283 | CALL ldf_tra_init ! Lateral ocean tracer physics |
---|
| 284 | |
---|
| 285 | CALL zdf_init ! Vertical ocean physics |
---|
| 286 | |
---|
[503] | 287 | CALL trd_mod_init ! Mixed-layer/Vorticity/Integral constraints trends |
---|
[216] | 288 | |
---|
| 289 | |
---|
[281] | 290 | #if defined key_passivetrc |
---|
| 291 | CALL ini_trc ! Passive tracers |
---|
| 292 | #endif |
---|
| 293 | |
---|
[532] | 294 | #if defined key_coupled && ! defined key_oasis3 && ! defined key_oasis4 |
---|
[3] | 295 | itro = nitend - nit000 + 1 ! Coupled |
---|
| 296 | istp0 = NINT( rdt ) |
---|
| 297 | CALL cpl_init( itro, nexco, istp0 ) ! Signal processing and process id exchange |
---|
| 298 | #endif |
---|
| 299 | |
---|
[532] | 300 | #if defined key_oasis3 || defined key_oasis4 |
---|
| 301 | CALL cpl_prism_define |
---|
| 302 | #endif |
---|
| 303 | |
---|
[190] | 304 | CALL dia_ptr_init ! Poleward TRansports initialization |
---|
[3] | 305 | |
---|
| 306 | ! ! =============== ! |
---|
| 307 | ! ! time stepping ! |
---|
| 308 | ! ! =============== ! |
---|
| 309 | |
---|
| 310 | IF(lwp) WRITE(numout,cform_aaa) ! Flag AAAAAAA |
---|
| 311 | |
---|
[899] | 312 | IF( lk_c1d ) THEN |
---|
[253] | 313 | CALL init_1d |
---|
| 314 | ENDIF |
---|
[467] | 315 | |
---|
[389] | 316 | END SUBROUTINE opa_init |
---|
[467] | 317 | |
---|
| 318 | |
---|
| 319 | SUBROUTINE opa_flg |
---|
| 320 | !!---------------------------------------------------------------------- |
---|
| 321 | !! *** ROUTINE opa *** |
---|
| 322 | !! |
---|
| 323 | !! ** Purpose : Initialize logical flags that control the choice of |
---|
| 324 | !! some algorithm or control print |
---|
| 325 | !! |
---|
| 326 | !! ** Method : Read in namilist namflg logical flags |
---|
| 327 | !! |
---|
| 328 | !! History : |
---|
| 329 | !! 9.0 ! 03-11 (G. Madec) Original code |
---|
| 330 | !!---------------------------------------------------------------------- |
---|
| 331 | !! * Local declarations |
---|
| 332 | |
---|
[544] | 333 | NAMELIST/namflg/ ln_dynhpg_imp, nn_dynhpg_rst |
---|
[467] | 334 | !!---------------------------------------------------------------------- |
---|
| 335 | |
---|
[531] | 336 | ! Parameter control and print |
---|
| 337 | ! --------------------------- |
---|
| 338 | IF(lwp) THEN |
---|
| 339 | WRITE(numout,*) |
---|
| 340 | WRITE(numout,*) 'opa_flg: Control prints & Benchmark' |
---|
| 341 | WRITE(numout,*) '~~~~~~~ ' |
---|
| 342 | WRITE(numout,*) ' Namelist namctl' |
---|
| 343 | WRITE(numout,*) ' run control (for debugging) ln_ctl = ', ln_ctl |
---|
| 344 | WRITE(numout,*) ' level of print nprint = ', nprint |
---|
| 345 | WRITE(numout,*) ' Start i indice for SUM control nictls = ', nictls |
---|
| 346 | WRITE(numout,*) ' End i indice for SUM control nictle = ', nictle |
---|
| 347 | WRITE(numout,*) ' Start j indice for SUM control njctls = ', njctls |
---|
| 348 | WRITE(numout,*) ' End j indice for SUM control njctle = ', njctle |
---|
| 349 | WRITE(numout,*) ' number of proc. following i isplt = ', isplt |
---|
| 350 | WRITE(numout,*) ' number of proc. following j jsplt = ', jsplt |
---|
| 351 | WRITE(numout,*) ' benchmark parameter (0/1) nbench = ', nbench |
---|
| 352 | WRITE(numout,*) ' bit comparison mode (0/1) nbit_cmp = ', nbit_cmp |
---|
| 353 | ENDIF |
---|
| 354 | |
---|
| 355 | ! ... Control the sub-domain area indices for the control prints |
---|
| 356 | IF( ln_ctl ) THEN |
---|
| 357 | IF( lk_mpp ) THEN |
---|
| 358 | ! the domain is forced to the real splitted domain in MPI |
---|
| 359 | isplt = jpni ; jsplt = jpnj ; ijsplt = jpni*jpnj |
---|
| 360 | ELSE |
---|
| 361 | IF( isplt == 1 .AND. jsplt == 1 ) THEN |
---|
| 362 | CALL ctl_warn( ' - isplt & jsplt are equal to 1', & |
---|
| 363 | & ' - the print control will be done over the whole domain' ) |
---|
| 364 | ENDIF |
---|
| 365 | |
---|
| 366 | ! compute the total number of processors ijsplt |
---|
| 367 | ijsplt = isplt*jsplt |
---|
| 368 | ENDIF |
---|
| 369 | |
---|
| 370 | IF(lwp) WRITE(numout,*)' - The total number of processors over which the' |
---|
| 371 | IF(lwp) WRITE(numout,*)' print control will be done is ijsplt : ', ijsplt |
---|
| 372 | |
---|
| 373 | ! Control the indices used for the SUM control |
---|
| 374 | IF( nictls+nictle+njctls+njctle == 0 ) THEN |
---|
| 375 | ! the print control is done over the default area |
---|
| 376 | lsp_area = .FALSE. |
---|
| 377 | ELSE |
---|
| 378 | ! the print control is done over a specific area |
---|
| 379 | lsp_area = .TRUE. |
---|
| 380 | IF( nictls < 1 .OR. nictls > jpiglo ) THEN |
---|
| 381 | CALL ctl_warn( ' - nictls must be 1<=nictls>=jpiglo, it is forced to 1' ) |
---|
| 382 | nictls = 1 |
---|
| 383 | ENDIF |
---|
| 384 | |
---|
| 385 | IF( nictle < 1 .OR. nictle > jpiglo ) THEN |
---|
| 386 | CALL ctl_warn( ' - nictle must be 1<=nictle>=jpiglo, it is forced to jpiglo' ) |
---|
| 387 | nictle = jpiglo |
---|
| 388 | ENDIF |
---|
| 389 | |
---|
| 390 | IF( njctls < 1 .OR. njctls > jpjglo ) THEN |
---|
| 391 | CALL ctl_warn( ' - njctls must be 1<=njctls>=jpjglo, it is forced to 1' ) |
---|
| 392 | njctls = 1 |
---|
| 393 | ENDIF |
---|
| 394 | |
---|
| 395 | IF( njctle < 1 .OR. njctle > jpjglo ) THEN |
---|
| 396 | CALL ctl_warn( ' - njctle must be 1<=njctle>=jpjglo, it is forced to jpjglo' ) |
---|
| 397 | njctle = jpjglo |
---|
| 398 | ENDIF |
---|
| 399 | |
---|
| 400 | ENDIF ! IF( nictls+nictle+njctls+njctle == 0 ) |
---|
| 401 | ENDIF ! IF(ln_ctl) |
---|
| 402 | |
---|
| 403 | IF( nbench == 1 ) THEN |
---|
| 404 | SELECT CASE ( cp_cfg ) |
---|
| 405 | CASE ( 'gyre' ) |
---|
[532] | 406 | CALL ctl_warn( ' The Benchmark is activated ' ) |
---|
[531] | 407 | CASE DEFAULT |
---|
[532] | 408 | CALL ctl_stop( ' The Benchmark is based on the GYRE configuration: key_gyre must & |
---|
| 409 | & be used or set nbench = 0' ) |
---|
[531] | 410 | END SELECT |
---|
| 411 | ENDIF |
---|
| 412 | |
---|
[532] | 413 | IF( nbit_cmp == 1 ) THEN |
---|
| 414 | CALL ctl_warn( ' Bit comparison enabled. Single and multiple processor results must bit compare', & |
---|
| 415 | & ' WARNING: RESULTS ARE NOT PHYSICAL.' ) |
---|
| 416 | ENDIF |
---|
[531] | 417 | |
---|
| 418 | |
---|
[467] | 419 | ! Read Namelist namflg : algorithm FLaG |
---|
| 420 | ! -------------------- |
---|
| 421 | REWIND ( numnam ) |
---|
| 422 | READ ( numnam, namflg ) |
---|
| 423 | |
---|
| 424 | ! Parameter control and print |
---|
| 425 | ! --------------------------- |
---|
| 426 | IF(lwp) THEN |
---|
| 427 | WRITE(numout,*) |
---|
[531] | 428 | WRITE(numout,*) 'opa_flg : Hydrostatic pressure gradient algorithm' |
---|
[467] | 429 | WRITE(numout,*) '~~~~~~~' |
---|
| 430 | WRITE(numout,*) ' Namelist namflg : set algorithm flags' |
---|
| 431 | WRITE(numout,*) ' centered (F) or semi-implicit (T) ln_dynhpg_imp = ', ln_dynhpg_imp |
---|
| 432 | WRITE(numout,*) ' hydrostatic pressure gradient' |
---|
[544] | 433 | WRITE(numout,*) ' add dynhpg implicit variable nn_dynhpg_rst = ', nn_dynhpg_rst |
---|
| 434 | WRITE(numout,*) ' in restart ot not nn_dynhpg_rst' |
---|
[467] | 435 | ENDIF |
---|
[544] | 436 | IF( .NOT. ln_dynhpg_imp ) nn_dynhpg_rst = 0 ! force no adding dynhpg implicit variables in restart |
---|
[467] | 437 | |
---|
| 438 | END SUBROUTINE opa_flg |
---|
| 439 | |
---|
| 440 | |
---|
| 441 | SUBROUTINE opa_closefile |
---|
| 442 | !!---------------------------------------------------------------------- |
---|
| 443 | !! *** ROUTINE opa_closefile *** |
---|
| 444 | !! |
---|
| 445 | !! ** Purpose : Close the files |
---|
| 446 | !! |
---|
| 447 | !! ** Method : |
---|
| 448 | !! |
---|
| 449 | !! History : |
---|
| 450 | !! 9.0 ! 05-01 (O. Le Galloudec) Original code |
---|
| 451 | !!---------------------------------------------------------------------- |
---|
| 452 | !! * Modules used |
---|
| 453 | USE dtatem ! temperature data |
---|
| 454 | USE dtasal ! salinity data |
---|
| 455 | !!---------------------------------------------------------------------- |
---|
| 456 | |
---|
| 457 | IF ( lk_mpp ) CALL mppsync |
---|
| 458 | |
---|
| 459 | ! 1. Unit close |
---|
| 460 | ! ------------- |
---|
| 461 | |
---|
[658] | 462 | CLOSE( numnam ) ! namelist |
---|
| 463 | CLOSE( numout ) ! standard model output file |
---|
[467] | 464 | |
---|
[658] | 465 | IF(lwp) CLOSE( numstp ) ! time-step file |
---|
[467] | 466 | IF(lwp) CLOSE( numsol ) |
---|
| 467 | |
---|
| 468 | END SUBROUTINE opa_closefile |
---|
| 469 | |
---|
[3] | 470 | !!====================================================================== |
---|
| 471 | END MODULE opa |
---|