Changeset 5902 for branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
- Timestamp:
- 2015-11-20T10:58:48+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
r5869 r5902 6 6 !! History : 1.0 ! 2005-12 (C. Talandier, G. Madec, V. Garnier) Original code 7 7 !! 3.2 ! 2009-07 (R. Benshila) Suppression of rigid-lid option 8 !!---------------------------------------------------------------------- 9 10 !!---------------------------------------------------------------------- 11 !! dyn_spg : update the dynamics trend with the lateral diffusion 12 !! dyn_spg_ctl : initialization, namelist read, and parameters control 8 !! 3.7 ! 2015-11 (J. Chanut) Suppression of filtered free surface 9 !!---------------------------------------------------------------------- 10 11 !!---------------------------------------------------------------------- 12 !! dyn_spg : update the dynamics trend with surface pressure gradient 13 !! dyn_spg_init: initialization, namelist read, and parameters control 13 14 !!---------------------------------------------------------------------- 14 15 USE oce ! ocean dynamics and tracers variables … … 18 19 USE sbc_oce ! surface boundary condition: ocean 19 20 USE sbcapr ! surface boundary condition: atmospheric pressure 20 USE dynspg_oce ! surface pressure gradient variables21 21 USE dynspg_exp ! surface pressure gradient (dyn_spg_exp routine) 22 22 USE dynspg_ts ! surface pressure gradient (dyn_spg_ts routine) 23 USE dynadv ! dynamics: vector invariant versus flux form24 23 USE sbctide 25 24 USE updtide … … 40 39 PUBLIC dyn_spg_init ! routine called by opa module 41 40 42 INTEGER :: nspg = 0 ! type of surface pressure gradient scheme defined from l k_dynspg_...41 INTEGER :: nspg = 0 ! type of surface pressure gradient scheme defined from ln_dynspg_... 43 42 44 43 !! * Substitutions … … 63 62 !!gm the after velocity, in the 2 other (ua,va) are still the trends 64 63 !! 65 !! ** Method : T hreeschemes:64 !! ** Method : Two schemes: 66 65 !! - explicit computation : the spg is evaluated at now 67 !! - filtered computation : the Roulet & madec (2000) technique is used68 66 !! - split-explicit computation: a time splitting technique is used 69 67 !! … … 99 97 100 98 IF( ln_apr_dyn & ! atmos. pressure 101 .OR. ( .NOT.l k_dynspg_ts .AND. (ln_tide_pot .AND. lk_tide) ) & ! tide potential (no time slitting)99 .OR. ( .NOT.ln_dynspg_ts .AND. (ln_tide_pot .AND. lk_tide) ) & ! tide potential (no time slitting) 102 100 .OR. nn_ice_embd == 2 ) THEN ! embedded sea-ice 103 101 ! … … 109 107 END DO 110 108 ! 111 IF( ln_apr_dyn .AND. (.NOT. l k_dynspg_ts) ) THEN !== Atmospheric pressure gradient (added later in time-split case) ==!109 IF( ln_apr_dyn .AND. (.NOT. ln_dynspg_ts) ) THEN !== Atmospheric pressure gradient (added later in time-split case) ==! 112 110 zg_2 = grav * 0.5 113 111 DO jj = 2, jpjm1 ! gradient of Patm using inverse barometer ssh … … 122 120 ! 123 121 ! !== tide potential forcing term ==! 124 IF( .NOT.l k_dynspg_ts .AND. ( ln_tide_pot .AND. lk_tide ) ) THEN ! N.B. added directly at sub-time-step in ts-case122 IF( .NOT.ln_dynspg_ts .AND. ( ln_tide_pot .AND. lk_tide ) ) THEN ! N.B. added directly at sub-time-step in ts-case 125 123 ! 126 124 CALL upd_tide( kt ) ! update tide potential … … 190 188 !! *** ROUTINE dyn_spg_init *** 191 189 !! 192 !! ** Purpose : Control the consistency between cppoptions for190 !! ** Purpose : Control the consistency between namelist options for 193 191 !! surface pressure gradient schemes 194 192 !!---------------------------------------------------------------------- 195 INTEGER :: ioptio 193 INTEGER :: ioptio, ios 194 ! 195 NAMELIST/namdyn_spg/ ln_dynspg_exp, ln_dynspg_ts 196 196 !!---------------------------------------------------------------------- 197 197 ! 198 198 IF( nn_timing == 1 ) CALL timing_start('dyn_spg_init') 199 199 ! 200 IF(lwp) THEN ! Control print 200 REWIND( numnam_ref ) ! Namelist namdyn_spg in reference namelist : Free surface 201 READ ( numnam_ref, namdyn_spg, IOSTAT = ios, ERR = 901) 202 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_spg in reference namelist', lwp ) 203 204 REWIND( numnam_cfg ) ! Namelist namdyn_spg in configuration namelist : Free surface 205 READ ( numnam_cfg, namdyn_spg, IOSTAT = ios, ERR = 902 ) 206 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_spg in configuration namelist', lwp ) 207 IF(lwm) WRITE ( numond, namdyn_spg ) 208 ! 209 IF(lwp) THEN ! Namelist print 201 210 WRITE(numout,*) 202 211 WRITE(numout,*) 'dyn_spg_init : choice of the surface pressure gradient scheme' 203 212 WRITE(numout,*) '~~~~~~~~~~~' 204 WRITE(numout,*) ' Explicit free surface lk_dynspg_exp = ', lk_dynspg_exp 205 WRITE(numout,*) ' Free surface with time splitting lk_dynspg_ts = ', lk_dynspg_ts 206 ENDIF 207 208 IF( lk_dynspg_ts ) CALL dyn_spg_ts_init( nit000 ) 209 ! (do it now, to set nn_baro, used to allocate some arrays later on) 210 ! ! allocate dyn_spg arrays 211 IF( lk_dynspg_ts ) THEN 212 IF( dynspg_oce_alloc() /= 0 ) CALL ctl_stop('STOP', 'dyn_spg_init: failed to allocate dynspg_oce arrays') 213 WRITE(numout,*) ' Explicit free surface ln_dynspg_exp = ', ln_dynspg_exp 214 WRITE(numout,*) ' Free surface with time splitting ln_dynspg_ts = ', ln_dynspg_ts 215 ENDIF 216 217 IF( ln_dynspg_ts ) THEN 218 CALL dyn_spg_ts_init( nit000 ) ! do it first, to set nn_baro, used to allocate some arrays later on 219 ! ! allocate dyn_spg arrays 213 220 IF( dyn_spg_ts_alloc() /= 0 ) CALL ctl_stop('STOP', 'dyn_spg_init: failed to allocate dynspg_ts arrays') 214 221 IF ((neuler/=0).AND.(ln_bt_fw)) CALL ts_rst( nit000, 'READ' ) … … 217 224 ! ! Control of surface pressure gradient scheme options 218 225 ioptio = 0 219 IF(l k_dynspg_exp) ioptio = ioptio + 1220 IF(l k_dynspg_ts ) ioptio = ioptio + 1226 IF(ln_dynspg_exp) ioptio = ioptio + 1 227 IF(ln_dynspg_ts ) ioptio = ioptio + 1 221 228 ! 222 229 IF( ioptio > 1 .OR. ( ioptio == 0 .AND. .NOT. lk_c1d ) ) & 223 & CALL ctl_stop( ' Choose only one surface pressure gradient scheme with a key cpp' ) 224 IF( ( lk_dynspg_ts .OR. lk_dynspg_exp ) .AND. ln_isfcav ) & 225 & CALL ctl_stop( ' dynspg_ts and dynspg_exp not tested with ice shelf cavity ' ) 226 ! 227 IF( lk_dynspg_exp) nspg = 0 228 IF( lk_dynspg_ts ) nspg = 1 229 230 & CALL ctl_stop( ' Choose only one surface pressure gradient scheme' ) 231 IF( ln_dynspg_ts .AND. ln_isfcav ) & 232 & CALL ctl_stop( ' dynspg_ts not tested with ice shelf cavity ' ) 233 ! 234 IF( ln_dynspg_exp) nspg = 0 235 IF( ln_dynspg_ts ) nspg = 1 230 236 ! 231 237 IF(lwp) THEN
Note: See TracChangeset
for help on using the changeset viewer.