Changeset 1566 for trunk/NEMO/OPA_SRC/DYN/dynspg.F90
- Timestamp:
- 2009-07-31T16:34:08+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/DYN/dynspg.F90
r1528 r1566 4 4 !! Ocean dynamics: surface pressure gradient control 5 5 !!====================================================================== 6 !! History : 9.0 ! 05-12 (C. Talandier, G. Madec) Original code7 !! 9.0 ! 05-12 (V. Garnier) dyn_spg_ctl: Original code6 !! History : 1.0 ! 2005-12 (C. Talandier, G. Madec, V. Garnier) Original code 7 !! 3.2 ! 2009-07 (R. Benshila) Suppression of rigid-lid option 8 8 !!---------------------------------------------------------------------- 9 9 … … 27 27 PRIVATE 28 28 29 PUBLIC dyn_spg! routine called by step module29 PUBLIC dyn_spg ! routine called by step module 30 30 31 !! * module variables32 31 INTEGER :: nspg = 0 ! type of surface pressure gradient scheme defined from lk_dynspg_... 33 32 … … 36 35 # include "vectopt_loop_substitute.h90" 37 36 !!---------------------------------------------------------------------- 38 !! OPA 9.0 , LOCEAN-IPSL (2005)37 !! NEMO/OPA 3.2 , LODYC-IPSL (2009) 39 38 !! $Id$ 40 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 39 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 41 40 !!---------------------------------------------------------------------- 42 41 … … 47 46 !! *** ROUTINE dyn_spg *** 48 47 !! 49 !! ** Purpose : compute the lateral ocean dynamics physics. 48 !! ** Purpose : achieve the momentum time stepping by computing the 49 !! last trend, the surface pressure gradient, and performing 50 !! the Leap-Frog integration. 51 !!gm In the current version only the filtered solution provide 52 !!gm the after velocity, in the 2 other (ua,va) are still the trends 53 !! 54 !! ** Method : Three schemes: 55 !! - explicit computation : the spg is evaluated at now 56 !! - filtered computation : the Roulet & madec (2000) technique is used 57 !! - split-explicit computation: a time splitting technique is used 58 !! 59 !! N.B. : When key_esopa is used all the scheme are tested, regardless 60 !! of the physical meaning of the results. 50 61 !!---------------------------------------------------------------------- 51 INTEGER, INTENT( in ) :: kt! ocean time-step index52 INTEGER, INTENT( out ) :: kindic! solver flag62 INTEGER, INTENT(in ) :: kt ! ocean time-step index 63 INTEGER, INTENT( out) :: kindic ! solver flag 53 64 !! 54 REAL(wp) :: z2dt 65 REAL(wp) :: z2dt ! temporary scalar 55 66 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ztrdu, ztrdv ! 3D workspace 56 67 !!---------------------------------------------------------------------- 68 69 70 !!gm NOTA BENE : the dynspg_exp and dynspg_ts should be modified so that 71 !!gm they return the after velocity, not the trends (as in trazdf_imp...) 72 !!gm In this case, change/simplify dynnxt 73 74 57 75 58 76 IF( kt == nit000 ) CALL dyn_spg_ctl ! initialisation & control of options … … 65 83 SELECT CASE ( nspg ) ! compute surf. pressure gradient trend and add it to the general trend 66 84 ! 67 CASE ( 0 ) ; CALL dyn_spg_exp 68 CASE ( 1 ) ; CALL dyn_spg_ts 69 CASE ( 2 ) ; CALL dyn_spg_flt 85 CASE ( 0 ) ; CALL dyn_spg_exp( kt ) ! explicit 86 CASE ( 1 ) ; CALL dyn_spg_ts ( kt ) ! time-splitting 87 CASE ( 2 ) ; CALL dyn_spg_flt( kt, kindic ) ! filtered 70 88 ! 71 CASE ( -1 ) 72 CALL dyn_spg_exp( kt )73 CALL prt_ctl( tab3d_1=ua, clinfo1=' spg0 - Ua: ', mask1=umask, &74 &tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' )75 CALL dyn_spg_ts( kt )76 CALL prt_ctl( tab3d_1=ua, clinfo1=' spg1 - Ua: ', mask1=umask, &77 &tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' )78 CALL dyn_spg_flt( kt, kindic )79 CALL prt_ctl( tab3d_1=ua, clinfo1=' spg2 - Ua: ', mask1=umask, &80 &tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' )89 CASE ( -1 ) ! esopa: test all possibility with control print 90 CALL dyn_spg_exp( kt ) 91 CALL prt_ctl( tab3d_1=ua, clinfo1=' spg0 - Ua: ', mask1=umask, & 92 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 93 CALL dyn_spg_ts ( kt ) 94 CALL prt_ctl( tab3d_1=ua, clinfo1=' spg1 - Ua: ', mask1=umask, & 95 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 96 CALL dyn_spg_flt( kt, kindic ) 97 CALL prt_ctl( tab3d_1=ua, clinfo1=' spg2 - Ua: ', mask1=umask, & 98 & tab3d_2=va, clinfo2= ' Va: ', mask2=vmask, clinfo3='dyn' ) 81 99 END SELECT 82 100 ! 83 IF( l_trddyn ) THEN ! save the horizontal diffusivetrends for further diagnostics101 IF( l_trddyn ) THEN ! save the surface pressure gradient trends for further diagnostics 84 102 SELECT CASE ( nspg ) 85 103 CASE ( 0, 1 ) … … 106 124 !! 107 125 !! ** Purpose : Control the consistency between cpp options for 108 !! surface pressure gradient schemes126 !! surface pressure gradient schemes 109 127 !!---------------------------------------------------------------------- 110 !! * Local declarations111 128 INTEGER :: ioptio 112 129 !!---------------------------------------------------------------------- 113 130 114 ! Parameter control and print 115 ! --------------------------- 116 ! Control print 117 IF(lwp) THEN 131 IF(lwp) THEN ! Control print 118 132 WRITE(numout,*) 119 133 WRITE(numout,*) 'dyn_spg_ctl : choice of the surface pressure gradient scheme' … … 124 138 ENDIF 125 139 126 ! Control of surface pressure gradient scheme options 127 ! --------------------------------------------------- 140 ! ! Control of surface pressure gradient scheme options 128 141 ioptio = 0 129 142 IF(lk_dynspg_exp) ioptio = ioptio + 1 130 143 IF(lk_dynspg_ts ) ioptio = ioptio + 1 131 144 IF(lk_dynspg_flt) ioptio = ioptio + 1 132 145 ! 133 146 IF( ( ioptio > 1 .AND. .NOT. lk_esopa ) .OR. ioptio == 0 ) & 134 147 & CALL ctl_stop( ' Choose only one surface pressure gradient scheme with a key cpp' ) 135 148 ! 136 149 IF( lk_esopa ) nspg = -1 137 150 IF( lk_dynspg_exp) nspg = 0 138 151 IF( lk_dynspg_ts ) nspg = 1 139 152 IF( lk_dynspg_flt) nspg = 2 140 153 ! 141 154 IF( lk_esopa ) nspg = -1 142 143 IF(lwp) THEN155 ! 156 IF(lwp) THEN 144 157 WRITE(numout,*) 145 158 IF( nspg == -1 ) WRITE(numout,*) ' ESOPA test All scheme used' … … 149 162 ENDIF 150 163 151 ! Control of timestep choice 152 ! -------------------------- 164 ! ! Control of timestep choice 153 165 IF( lk_dynspg_ts .OR. lk_dynspg_exp ) THEN 154 166 IF( n_cla == 1 ) & … … 157 169 158 170 #if defined key_obc 159 ! Conservation of ocean volume (key_dynspg_flt) 160 ! --------------------------------------------- 161 IF( lk_dynspg_flt ) ln_vol_cst = .true. 171 ! ! Conservation of ocean volume (key_dynspg_flt) 172 IF( lk_dynspg_flt ) ln_vol_cst = .true. 162 173 163 ! Application of Flather's algorithm at open boundaries 164 ! ----------------------------------------------------- 165 IF( lk_dynspg_flt ) ln_obc_fla = .false. 166 IF( lk_dynspg_exp ) ln_obc_fla = .true. 167 IF( lk_dynspg_ts ) ln_obc_fla = .true. 174 ! ! Application of Flather's algorithm at open boundaries 175 IF( lk_dynspg_flt ) ln_obc_fla = .false. 176 IF( lk_dynspg_exp ) ln_obc_fla = .true. 177 IF( lk_dynspg_ts ) ln_obc_fla = .true. 168 178 #endif 169 179 ! 170 180 END SUBROUTINE dyn_spg_ctl 171 181
Note: See TracChangeset
for help on using the changeset viewer.