Changeset 1218 for trunk/NEMO/OPA_SRC/SBC/sbcmod.F90
- Timestamp:
- 2008-10-28T10:12:16+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/SBC/sbcmod.F90
r1172 r1218 4 4 !! Surface module : provide to the ocean its surface boundary condition 5 5 !!====================================================================== 6 !! History : 3.0 ! 2006-07 (G. Madec) Original code 6 !! History : 3.0 ! 07-2006 (G. Madec) Original code 7 !! - ! 08-2008 (S. Masson, E. .... ) coupled interface 7 8 !!---------------------------------------------------------------------- 8 9 … … 42 43 PUBLIC sbc ! routine called by step.F90 43 44 44 !! * namsbc namelist (public variables)45 LOGICAL , PUBLIC :: ln_ana = .FALSE. !: analytical boundary condition flag46 LOGICAL , PUBLIC :: ln_flx = .FALSE. !: flux formulation47 LOGICAL , PUBLIC :: ln_blk_clio = .FALSE. !: CLIO bulk formulation48 LOGICAL , PUBLIC :: ln_blk_core = .FALSE. !: CORE bulk formulation49 LOGICAL , PUBLIC :: ln_cpl = .FALSE. !: coupled formulation (overwritten by key_sbc_coupled )50 LOGICAL , PUBLIC :: ln_dm2dc = .FALSE. !: Daily mean to Diurnal Cycle short wave (qsr)51 LOGICAL , PUBLIC :: ln_rnf = .FALSE. !: runoffs / runoff mouths52 LOGICAL , PUBLIC :: ln_ssr = .FALSE. !: Sea Surface restoring on SST and/or SSS53 INTEGER , PUBLIC :: nn_ice = 0 !: flag on ice in the surface boundary condition (=0/1/2)54 INTEGER , PUBLIC :: nn_fwb = 0 !: type of FreshWater Budget control (=0/1/2)55 INTEGER :: nn_ico_cpl = 0 !: ice-ocean coupling indicator56 ! ! = 0 LIM-3 old case57 ! ! = 1 stresses computed using now ocean velocity58 ! ! = 2 combination of 0 and 1 cases59 60 45 INTEGER :: nsbc ! type of surface boundary condition (deduced from namsbc informations) 61 INTEGER :: nice ! type of ice in the surface boundary condition (deduced from namsbc informations)62 46 63 47 !! * Substitutions … … 94 78 ENDIF 95 79 96 REWIND 97 READ 80 REWIND( numnam ) ! Read Namelist namsbc 81 READ ( numnam, namsbc ) 98 82 99 83 ! overwrite namelist parameter using CPP key information 100 !!gm here no overwrite, test all option via namelist change: require more incore memory84 !!gm here no overwrite, test all option via namelist change: require more incore memory 101 85 !!gm IF( lk_sbc_cpl ) THEN ; ln_cpl = .TRUE. ; ELSE ; ln_cpl = .FALSE. ; ENDIF 102 86 IF( lk_lim2 ) nn_ice = 2 … … 109 93 ! Control print 110 94 IF(lwp) THEN 111 WRITE(numout,*) ' Namelist namsbc ( overwritten using CPP key defined)'95 WRITE(numout,*) ' Namelist namsbc (partly overwritten with CPP key setting)' 112 96 WRITE(numout,*) ' frequency update of sbc (and ice) nn_fsbc = ', nn_fsbc 113 97 WRITE(numout,*) ' Type of sbc : ' … … 115 99 WRITE(numout,*) ' flux formulation ln_flx = ', ln_flx 116 100 WRITE(numout,*) ' CLIO bulk formulation ln_blk_clio = ', ln_blk_clio 117 WRITE(numout,*) ' C OREbulk formulation ln_blk_core = ', ln_blk_core101 WRITE(numout,*) ' CLIO bulk formulation ln_blk_core = ', ln_blk_core 118 102 WRITE(numout,*) ' coupled formulation (T if key_sbc_cpl) ln_cpl = ', ln_cpl 119 103 WRITE(numout,*) ' Misc. options of sbc : ' … … 127 111 ENDIF 128 112 129 IF( .NOT. ln_rnf ) THEN ! no specific treatment in rivers mouths vicinity 130 ln_rnf_mouth = .false. 131 nkrnf = 0 132 rnfmsk(:,:) = 0.e0 133 rnfmsk_z(:) = 0.e0 134 ENDIF 135 IF( nn_ice == 0 ) fr_i(:,:) = 0.e0 ! no ice in the domain, ice fraction is always zero 136 137 ! Check consistancy !!gm mixture of real and integer : coding to be changed.... 138 139 IF( nn_ice == 2 ) THEN 140 IF( MOD( nitend - nit000 + 1, nn_fsbc) /= 0 ) THEN 141 WRITE(ctmp1,*) 'experiment length (', nitend - nit000 + 1, ') is NOT a multiple of nn_fsbc (', nn_fsbc, ')' 142 CALL ctl_stop( ctmp1, 'Impossible to do proper restart files' ) 143 ENDIF 144 IF( MOD( nstock, nn_fsbc) /= 0 ) THEN 145 WRITE(ctmp1,*) 'nstock (' , nstock , ') is NOT a multiple of nn_fsbc (', nn_fsbc, ')' 146 CALL ctl_stop( ctmp1, 'Impossible to do proper restart files' ) 147 ENDIF 148 ENDIF 149 150 IF( MOD( rday, nn_fsbc*rdt ) /= 0 ) CALL ctl_warn( 'nn_fsbc is NOT a multiple of the number of time steps in a day' ) 151 113 IF( .NOT. ln_rnf ) THEN ! no specific treatment in vicinity of river mouths 114 ln_rnf_mouth = .false. 115 nkrnf = 0 116 rnfmsk (:,:) = 0.e0 117 rnfmsk_z(:) = 0.e0 118 ENDIF 119 IF( nn_ice == 0 ) fr_i(:,:) = 0.e0 ! no ice in the domain, ice fraction is always zero 120 121 ! ! restartability 122 IF( MOD( nitend - nit000 + 1, nn_fsbc) /= 0 .OR. & 123 MOD( nstock , nn_fsbc) /= 0 ) THEN 124 WRITE(ctmp1,*) 'experiment length (', nitend - nit000 + 1, ') or nstock (', nstock, & 125 & ' is NOT a multiple of nn_fsbc (', nn_fsbc, ')' 126 CALL ctl_stop( ctmp1, 'Impossible to properly do model restart' ) 127 ENDIF 128 ! 129 IF( MOD( rday, REAL(nn_fsbc, wp) * rdt ) /= 0 ) & 130 & CALL ctl_warn( 'nn_fsbc is NOT a multiple of the number of time steps in a day' ) 131 ! 152 132 IF( nn_ice == 2 .AND. .NOT.( ln_blk_clio .OR. ln_blk_core ) ) & 153 & CALL ctl_stop( 's bc_init: sea-ice model requires a bulk formulation' )133 & CALL ctl_stop( 'sea-ice model requires a bulk formulation' ) 154 134 155 135 ! Choice of the Surface Boudary Condition (set nsbc) … … 214 194 SELECT CASE( nsbc ) ! Compute ocean surface boundary condition 215 195 ! ! (i.e. utau,vtau, qns, qsr, emp, emps) 216 CASE( 0 ) ; CALL sbc_gyre ( kt ) ! analytical formulation : GYRE configuration217 CASE( 1 ) ; CALL sbc_ana ( kt ) ! analytical formulation : uniform sbc218 CASE( 2 ) ; CALL sbc_flx ( kt ) ! flux formulation219 CASE( 3 ) ; CALL sbc_blk_clio( kt ) ! bulk formulation : CLIO for the ocean220 CASE( 4 ) ; CALL sbc_blk_core( kt ) ! bulk formulation : CORE for the ocean221 CASE( 5 ) ; CALL sbc_cpl ( kt )! coupled formulation196 CASE( 0 ) ; CALL sbc_gyre ( kt ) ! analytical formulation : GYRE configuration 197 CASE( 1 ) ; CALL sbc_ana ( kt ) ! analytical formulation : uniform sbc 198 CASE( 2 ) ; CALL sbc_flx ( kt ) ! flux formulation 199 CASE( 3 ) ; CALL sbc_blk_clio( kt ) ! bulk formulation : CLIO for the ocean 200 CASE( 4 ) ; CALL sbc_blk_core( kt ) ! bulk formulation : CORE for the ocean 201 CASE( 5 ) ; CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! coupled formulation 222 202 CASE( -1 ) 223 CALL sbc_ana ( kt ) ! ESOPA, test ALL the formulations224 CALL sbc_gyre ( kt ) 225 CALL sbc_flx ( kt ) 226 CALL sbc_blk_clio( kt ) 227 CALL sbc_blk_core( kt ) 228 CALL sbc_cpl ( kt )203 CALL sbc_ana ( kt ) ! ESOPA, test ALL the formulations 204 CALL sbc_gyre ( kt ) ! 205 CALL sbc_flx ( kt ) ! 206 CALL sbc_blk_clio( kt ) ! 207 CALL sbc_blk_core( kt ) ! 208 CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! 229 209 END SELECT 230 210 … … 234 214 !!gm IF( ln_dm2dc ) CALL sbc_dcy( kt ) ! Daily mean qsr distributed over the Diurnal Cycle 235 215 236 SELECT CASE( nn_ice ) ! Update heat and freshwater fluxes over ice-coveredareas237 CASE( 1 ) ; CALL sbc_ice_if ( kt )! Ice-cover climatology ("Ice-if" model)216 SELECT CASE( nn_ice ) ! Update heat and freshwater fluxes over sea-ice areas 217 CASE( 1 ) ; CALL sbc_ice_if ( kt ) ! Ice-cover climatology ("Ice-if" model) 238 218 ! 239 219 CASE( 2 ) ; CALL sbc_ice_lim_2( kt, nsbc ) ! LIM 2.0 ice model
Note: See TracChangeset
for help on using the changeset viewer.