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