- Timestamp:
- 2010-11-13T14:08:12+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/step_c1d.F90
r2287 r2382 13 13 !! stp_c1d : NEMO system time-stepping in c1d case 14 14 !!---------------------------------------------------------------------- 15 USE oce ! ocean dynamics and tracers variables 16 USE dom_oce ! ocean space and time domain variables 17 USE zdf_oce ! ocean vertical physics variables 18 USE in_out_manager ! I/O manager 19 USE iom ! 20 USE lbclnk 21 22 USE daymod ! calendar (day routine) 23 24 USE dtatem ! ocean temperature data (dta_tem routine) 25 USE dtasal ! ocean salinity data (dta_sal routine) 26 USE sbcmod ! surface boundary condition (sbc routine) 27 USE sbcrnf ! surface boundary condition: runoff variables 28 29 USE trcstp ! passive tracer time-stepping (trc_stp routine) 30 31 USE traqsr ! solar radiation penetration (tra_qsr routine) 32 USE trasbc ! surface boundary condition (tra_sbc routine) 33 ! zdfkpp ! KPP non-local tracer fluxes (tra_kpp routine) 34 USE trazdf ! vertical mixing (tra_zdf routine) 35 USE tranxt ! time-stepping (tra_nxt routine) 36 USE tranpc ! non-penetrative convection (tra_npc routine) 37 38 USE eosbn2 ! equation of state (eos_bn2 routine) 39 15 USE step_oce ! time stepping definition modules 16 #if defined key_top 17 USE trcstp ! passive tracer time-stepping (trc_stp routine) 18 #endif 40 19 USE dyncor_c1d ! Coriolis term (c1d case) (dyn_cor_1d ) 41 USE dynzdf ! vertical diffusion (dyn_zdf routine)42 20 USE dynnxt_c1d ! time-stepping (dyn_nxt routine) 43 21 USE diawri_c1d ! write outputs (dia_wri_c1d routine) 44 45 USE zdfbfr ! bottom friction (zdf_bfr routine)46 USE zdftke ! TKE vertical mixing (zdf_tke routine)47 USE zdfkpp ! KPP vertical mixing (zdf_kpp routine)48 USE zdfddm ! double diffusion mixing (zdf_ddm routine)49 USE zdfevd ! enhanced vertical diffusion (zdf_evd routine)50 USE zdfric ! Richardson vertical mixing (zdf_ric routine)51 USE zdfmxl ! Mixed-layer depth (zdf_mxl routine)52 53 54 USE diawri ! Standard run outputs (dia_wri routine)55 56 USE stpctl ! time stepping control (stp_ctl routine)57 USE restart ! ocean restart (rst_wri routine)58 USE prtctl ! Print control (prt_ctl routine)59 22 60 23 IMPLICIT NONE … … 69 32 !! NEMO/C1D 3.3 , NEMO Consortium (2010) 70 33 !! $Id$ 71 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)34 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 72 35 !!---------------------------------------------------------------------- 73 74 36 CONTAINS 75 37 … … 96 58 !! --------------------------------------------------------------------- 97 59 98 indic = 1 ! reset to no error condition 99 100 CALL day( kstp ) ! Calendar 101 102 CALL rst_opn( kstp ) ! Open the restart file 60 indic = 0 ! reset to no error condition 61 IF( kstp /= nit000 ) CALL day( kstp ) ! Calendar (day was already called at nit000 in day_init) 62 CALL iom_setkt( kstp ) ! say to iom that we are at time step kstp 103 63 104 64 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 105 65 ! Update data, open boundaries, surface boundary condition (including sea-ice) 106 66 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 107 108 67 IF( lk_dtatem ) CALL dta_tem( kstp ) ! update 3D temperature data 109 68 IF( lk_dtasal ) CALL dta_sal( kstp ) ! update 3D salinity data 110 111 69 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) 112 70 113 IF( ninist == 1 ) THEN ! Output the initial state and forcings 114 CALL dia_wri_state( 'output.init', kstp ) ; ninist = 0 71 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 72 ! Ocean physics update (ua, va, ta, sa used as workspace) 73 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 74 CALL bn2( tsb, rn2b ) ! before Brunt-Vaisala frequency 75 CALL bn2( tsn, rn2 ) ! now Brunt-Vaisala frequency 76 ! VERTICAL PHYSICS 77 CALL zdf_bfr( kstp ) ! bottom friction 78 ! ! Vertical eddy viscosity and diffusivity coefficients 79 IF( lk_zdfric ) CALL zdf_ric( kstp ) ! Richardson number dependent Kz 80 IF( lk_zdftke ) CALL zdf_tke( kstp ) ! TKE closure scheme for Kz 81 IF( lk_zdfgls ) CALL zdf_gls( kstp ) ! GLS closure scheme for Kz 82 IF( lk_zdfkpp ) CALL zdf_kpp( kstp ) ! KPP closure scheme for Kz 83 IF( lk_zdfcst ) THEN ! Constant Kz (reset avt, avm[uv] to the background value) 84 avt (:,:,:) = rn_avt0 * tmask(:,:,:) 85 avmu(:,:,:) = rn_avm0 * umask(:,:,:) 86 avmv(:,:,:) = rn_avm0 * vmask(:,:,:) 115 87 ENDIF 116 88 89 IF( ln_rnf_mouth ) THEN ! increase diffusivity at rivers mouths 90 DO jk = 2, nkrnf ; avt(:,:,jk) = avt(:,:,jk) + 2.e0 * rn_avt_rnf * rnfmsk(:,:) ; END DO 91 ENDIF 92 IF( ln_zdfevd ) CALL zdf_evd( kstp ) ! enhanced vertical eddy diffusivity 93 94 IF( lk_zdftmx ) CALL zdf_tmx( kstp ) ! tidal vertical mixing 95 96 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp ) & 97 & CALL zdf_ddm( kstp ) ! double diffusive mixing 98 99 CALL zdf_mxl( kstp ) ! mixed layer depth 100 101 ! write tke information in the restart file 102 IF( lrst_oce .AND. lk_zdftke ) CALL tke_rst( kstp, 'WRITE' ) 103 ! write gls information in the restart file 104 IF( lrst_oce .AND. lk_zdfgls ) CALL gls_rst( kstp, 'WRITE' ) 117 105 118 106 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 119 ! Ocean physics update107 ! diagnostics and outputs (ua, va, ta, sa used as workspace) 120 108 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 121 !----------------------------------------------------------------------- 122 ! VERTICAL PHYSICS 123 !----------------------------------------------------------------------- 124 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 125 !----------------------------------------------------------------------- 126 127 CALL bn2( tb, sb, rn2 ) ! before Brunt-Vaisala frequency 128 129 ! ! Vertical eddy viscosity and diffusivity coefficients 130 IF( lk_zdfric ) CALL zdf_ric( kstp ) ! Richardson number dependent Kz 131 IF( lk_zdftke ) CALL zdf_tke( kstp ) ! TKE closure scheme for Kz 132 IF( lk_zdfkpp ) CALL zdf_kpp( kstp ) ! KPP closure scheme for Kz 133 IF( lk_zdfcst ) THEN ! Constant Kz (reset avt, avm to the background value) 134 avt (:,:,:) = avt0 * tmask(:,:,:) 135 avmu(:,:,:) = avm0 * umask(:,:,:) 136 avmv(:,:,:) = avm0 * vmask(:,:,:) 137 ENDIF 138 139 IF( ln_rnf_mouth ) THEN ! increase diffusivity at rivers mouths 140 DO jk = 2, nkrnf ; avt(:,:,jk) = avt(:,:,jk) + 2.e0 * rn_avt_rnf * rnfmsk(:,:) ; END DO 141 ENDIF 142 IF( ln_zdfevd ) CALL zdf_evd( kstp ) ! enhanced vertical eddy diffusivity 143 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp ) & 144 & CALL zdf_ddm( kstp ) ! double diffusive mixing 145 CALL zdf_bfr( kstp ) ! bottom friction 146 CALL zdf_mxl( kstp ) ! mixed layer depth 109 CALL dia_wri_c1d( kstp, indic ) ! ocean model: outputs 147 110 148 111 #if defined key_top … … 150 113 ! Passive Tracer Model 151 114 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 152 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 153 !----------------------------------------------------------------------- 154 CALL trc_stp( kstp, indic ) ! time-stepping 115 CALL trc_stp( kstp, indic ) ! time-stepping 155 116 #endif 156 117 157 118 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 158 ! Active tracers 119 ! Active tracers (ua, va used as workspace) 159 120 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 160 ! N.B. ua, va arrays are used as workspace in this section161 !-----------------------------------------------------------------------162 121 tsa(:,:,:,:) = 0.e0 ! set tracer trends to zero 163 122 164 123 CALL tra_sbc ( kstp ) ! surface boundary condition 165 124 IF( ln_traqsr ) CALL tra_qsr ( kstp ) ! penetrative solar radiation qsr 166 IF( lk_zdfkpp )CALL tra_kpp ( kstp ) ! KPP non-local tracer fluxes125 IF( lk_zdfkpp ) CALL tra_kpp ( kstp ) ! KPP non-local tracer fluxes 167 126 CALL tra_zdf ( kstp ) ! vertical mixing 168 127 CALL tra_nxt ( kstp ) ! tracer fields at next time step 169 128 IF( ln_zdfnpc ) CALL tra_npc ( kstp ) ! applied non penetrative convective adjustment on (t,s) 170 CALL eos( tsb, rhd, rhop ) ! now (swap=before) in situ density for dynhpg module 129 CALL eos( tsb, rhd, rhop ) ! now (swap=before) in situ density for dynhpg module 130 CALL tra_unswap ! udate T & S 3D arrays (to be suppressed) 171 131 172 132 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 173 ! Dynamics 133 ! Dynamics (ta, sa used as workspace) 174 134 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 175 ! N.B. ta, sa arrays are used as workspace in this section176 !-----------------------------------------------------------------------177 135 ua(:,:,:) = 0.e0 ! set dynamics trends to zero 178 136 va(:,:,:) = 0.e0 … … 188 146 IF( kstp == nit000 ) CALL iom_close( numror ) ! close input ocean restart file 189 147 IF( lrst_oce ) CALL rst_write ( kstp ) ! write output ocean restart file 190 191 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>192 ! diagnostics and outputs193 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<194 ! N.B. ua, va, ta, sa arrays are used as workspace in this section195 !-----------------------------------------------------------------------196 197 IF( nstop == 0 ) CALL dia_wri_c1d( kstp, indic ) ! ocean model: outputs198 148 ! 199 149 END SUBROUTINE stp_c1d
Note: See TracChangeset
for help on using the changeset viewer.