Changeset 12377 for NEMO/trunk/src/OCE/SBC/sbc_oce.F90
- Timestamp:
- 2020-02-12T15:39:06+01:00 (4 years ago)
- Location:
- NEMO/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk
- Property svn:externals
-
old new 3 3 ^/utils/build/mk@HEAD mk 4 4 ^/utils/tools@HEAD tools 5 ^/vendors/AGRIF/dev @HEAD ext/AGRIF5 ^/vendors/AGRIF/dev_r11615_ENHANCE-04_namelists_as_internalfiles_agrif@HEAD ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL
-
- Property svn:externals
-
NEMO/trunk/src/OCE/SBC/sbc_oce.F90
r12132 r12377 2 2 !!====================================================================== 3 3 !! *** MODULE sbc_oce *** 4 !! Surface module : variables defined in core memory 4 !! Surface module : variables defined in core memory 5 5 !!====================================================================== 6 6 !! History : 3.0 ! 2006-06 (G. Madec) Original code … … 9 9 !! - ! 2010-11 (G. Madec) ice-ocean stress always computed at each ocean time-step 10 10 !! 3.3 ! 2010-10 (J. Chanut, C. Bricaud) add the surface pressure forcing 11 !! 4.0 ! 2012-05 (C. Rousset) add attenuation coef for use in ice model 11 !! 4.0 ! 2012-05 (C. Rousset) add attenuation coef for use in ice model 12 12 !! 4.0 ! 2016-06 (L. Brodeau) new unified bulk routine (based on AeroBulk) 13 !! 4.0 ! 2019-03 (F. Lemarié, G. Samson) add compatibility with ABL mode 13 14 !!---------------------------------------------------------------------- 14 15 … … 26 27 PUBLIC sbc_oce_alloc ! routine called in sbcmod.F90 27 28 PUBLIC sbc_tau2wnd ! routine called in several sbc modules 28 29 29 30 !!---------------------------------------------------------------------- 30 31 !! Namelist for the Ocean Surface Boundary Condition … … 34 35 LOGICAL , PUBLIC :: ln_flx !: flux formulation 35 36 LOGICAL , PUBLIC :: ln_blk !: bulk formulation 37 LOGICAL , PUBLIC :: ln_abl !: Atmospheric boundary layer model 36 38 #if defined key_oasis3 37 39 LOGICAL , PUBLIC :: lk_oasis = .TRUE. !: OASIS used … … 43 45 LOGICAL , PUBLIC :: ln_dm2dc !: Daily mean to Diurnal Cycle short wave (qsr) 44 46 LOGICAL , PUBLIC :: ln_rnf !: runoffs / runoff mouths 45 LOGICAL , PUBLIC :: ln_isf !: ice shelf melting 46 LOGICAL , PUBLIC :: ln_ssr !: Sea Surface restoring on SST and/or SSS 47 LOGICAL , PUBLIC :: ln_ssr !: Sea Surface restoring on SST and/or SSS 47 48 LOGICAL , PUBLIC :: ln_apr_dyn !: Atmospheric pressure forcing used on dynamics (ocean & ice) 48 49 INTEGER , PUBLIC :: nn_ice !: flag for ice in the surface boundary condition (=0/1/2/3) … … 50 51 ! !: =F levitating ice (no presure effect) with mass and salt exchanges 51 52 ! !: =T embedded sea-ice (pressure effect + mass and salt exchanges) 52 INTEGER , PUBLIC :: nn_components !: flag for sbc module (including sea-ice) coupling mode (see component definition below) 53 INTEGER , PUBLIC :: nn_fwb !: FreshWater Budget: 54 ! !: = 0 unchecked 53 INTEGER , PUBLIC :: nn_components !: flag for sbc module (including sea-ice) coupling mode (see component definition below) 54 INTEGER , PUBLIC :: nn_fwb !: FreshWater Budget: 55 ! !: = 0 unchecked 55 56 ! !: = 1 global mean of e-p-r set to zero at each nn_fsbc time step 56 57 ! !: = 2 annual global mean of e-p-r set to zero … … 77 78 INTEGER , PUBLIC, PARAMETER :: jp_flx = 2 !: flux formulation 78 79 INTEGER , PUBLIC, PARAMETER :: jp_blk = 3 !: bulk formulation 79 INTEGER , PUBLIC, PARAMETER :: jp_purecpl = 4 !: Pure ocean-atmosphere Coupled formulation 80 INTEGER , PUBLIC, PARAMETER :: jp_none = 5 !: for OPA when doing coupling via SAS module 81 82 !!---------------------------------------------------------------------- 83 !! Stokes drift parametrization definition 80 INTEGER , PUBLIC, PARAMETER :: jp_abl = 4 !: Atmospheric boundary layer formulation 81 INTEGER , PUBLIC, PARAMETER :: jp_purecpl = 5 !: Pure ocean-atmosphere Coupled formulation 82 INTEGER , PUBLIC, PARAMETER :: jp_none = 6 !: for OPA when doing coupling via SAS module 83 84 !!---------------------------------------------------------------------- 85 !! Stokes drift parametrization definition 84 86 !!---------------------------------------------------------------------- 85 87 INTEGER , PUBLIC, PARAMETER :: jp_breivik_2014 = 0 !: Breivik 2014: v_z=v_0*[exp(2*k*z)/(1-8*k*z)] 86 INTEGER , PUBLIC, PARAMETER :: jp_li_2017 = 1 !: Li et al 2017: Stokes drift based on Phillips spectrum (Breivik 2016) 87 88 INTEGER , PUBLIC, PARAMETER :: jp_peakfr = 2 !: Li et al 2017: using the peak wave number read from wave model instead 89 88 INTEGER , PUBLIC, PARAMETER :: jp_li_2017 = 1 !: Li et al 2017: Stokes drift based on Phillips spectrum (Breivik 2016) 89 ! with depth averaged profile 90 INTEGER , PUBLIC, PARAMETER :: jp_peakfr = 2 !: Li et al 2017: using the peak wave number read from wave model instead 91 ! of the inverse depth scale 90 92 LOGICAL , PUBLIC :: ll_st_bv2014 = .FALSE. ! logical indicator, .true. if Breivik 2014 parameterisation is active. 91 93 LOGICAL , PUBLIC :: ll_st_li2017 = .FALSE. ! logical indicator, .true. if Li 2017 parameterisation is active. … … 96 98 !! component definition 97 99 !!---------------------------------------------------------------------- 98 INTEGER , PUBLIC, PARAMETER :: jp_iam_nemo = 0 !: Initial single executable configuration 99 100 INTEGER , PUBLIC, PARAMETER :: jp_iam_nemo = 0 !: Initial single executable configuration 101 ! (no internal OASIS coupling) 100 102 INTEGER , PUBLIC, PARAMETER :: jp_iam_opa = 1 !: Multi executable configuration - OPA component 101 103 ! (internal OASIS coupling) 102 104 INTEGER , PUBLIC, PARAMETER :: jp_iam_sas = 2 !: Multi executable configuration - SAS component 103 105 ! (internal OASIS coupling) 104 106 !!---------------------------------------------------------------------- 105 107 !! Ocean Surface Boundary Condition fields … … 107 109 INTEGER , PUBLIC :: ncpl_qsr_freq = 0 !: qsr coupling frequency per days from atmosphere (used by top) 108 110 ! 109 LOGICAL , PUBLIC :: lhftau = .FALSE. !: HF tau used in TKE: mean(stress module) - module(mean stress)110 111 !! !! now ! before !! 111 112 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: utau , utau_b !: sea surface i-stress (ocean referential) [N/m2] 112 113 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vtau , vtau_b !: sea surface j-stress (ocean referential) [N/m2] 113 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: taum !: module of sea surface stress (at T-point) [N/m2] 114 !! wndm is used onmpute surface gases exchanges in ice-free ocean or leads114 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: taum !: module of sea surface stress (at T-point) [N/m2] 115 !! wndm is used compute surface gases exchanges in ice-free ocean or leads 115 116 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndm !: wind speed module at T-point (=|U10m-Uoce|) [m/s] 117 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rhoa !: air density at "rn_zu" m above the sea [kg/m3] 116 118 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr !: sea heat flux: solar [W/m2] 117 119 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qns , qns_b !: sea heat flux: non solar [W/m2] … … 122 124 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_tot !: total E-P over ocean and ice [Kg/m2/s] 123 125 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fmmflx !: freshwater budget: freezing/melting [Kg/m2/s] 124 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnf , rnf_b !: river runoff [Kg/m2/s] 125 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fwfisf , fwfisf_b !: ice shelf melting [Kg/m2/s] 126 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fwficb , fwficb_b !: iceberg melting [Kg/m2/s] 127 126 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnf , rnf_b !: river runoff [Kg/m2/s] 127 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fwficb , fwficb_b !: iceberg melting [Kg/m2/s] 128 128 !! 129 129 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sbc_tsc, sbc_tsc_b !: sbc content trend [K.m/s] jpi,jpj,jpts … … 137 137 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xcplmask !: coupling mask for ln_mixcpl (warning: allocated in sbccpl) 138 138 139 !!--------------------------------------------------------------------- 140 !! ABL Vertical Domain size 141 !!--------------------------------------------------------------------- 142 INTEGER , PUBLIC :: jpka = 2 !: ABL number of vertical levels (default definition) 143 INTEGER , PUBLIC :: jpkam1 = 1 !: jpka-1 144 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ght_abl, ghw_abl !: ABL geopotential height (needed for iom) 145 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: e3t_abl, e3w_abl !: ABL vertical scale factors (needed for iom) 146 139 147 !!---------------------------------------------------------------------- 140 148 !! Sea Surface Mean fields … … 146 154 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sss_m !: mean (nn_fsbc time-step) surface sea salinity [psu] 147 155 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ssh_m !: mean (nn_fsbc time-step) sea surface height [m] 156 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tsk_m !: mean (nn_fsbc time-step) SKIN surface sea temp. [Celsius] 148 157 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: e3t_m !: mean (nn_fsbc time-step) sea surface layer thickness [m] 149 158 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: frq_m !: mean (nn_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level [-] 150 159 151 160 !! * Substitutions 152 # include " vectopt_loop_substitute.h90"161 # include "do_loop_substitute.h90" 153 162 !!---------------------------------------------------------------------- 154 163 !! NEMO/OCE 4.0 , NEMO Consortium (2018) … … 167 176 ! 168 177 ALLOCATE( utau(jpi,jpj) , utau_b(jpi,jpj) , taum(jpi,jpj) , & 169 & vtau(jpi,jpj) , vtau_b(jpi,jpj) , wndm(jpi,jpj) , STAT=ierr(1) )170 178 & vtau(jpi,jpj) , vtau_b(jpi,jpj) , wndm(jpi,jpj) , rhoa(jpi,jpj) , STAT=ierr(1) ) 179 ! 171 180 ALLOCATE( qns_tot(jpi,jpj) , qns (jpi,jpj) , qns_b(jpi,jpj), & 172 181 & qsr_tot(jpi,jpj) , qsr (jpi,jpj) , & 173 182 & emp (jpi,jpj) , emp_b(jpi,jpj) , & 174 183 & sfx (jpi,jpj) , sfx_b(jpi,jpj) , emp_tot(jpi,jpj), fmmflx(jpi,jpj), STAT=ierr(2) ) 175 176 ALLOCATE( fwfisf (jpi,jpj),rnf (jpi,jpj) , sbc_tsc (jpi,jpj,jpts) , qsr_hc (jpi,jpj,jpk) , &177 & fwfisf_b(jpi,jpj),rnf_b(jpi,jpj) , sbc_tsc_b(jpi,jpj,jpts) , qsr_hc_b(jpi,jpj,jpk) , &184 ! 185 ALLOCATE( rnf (jpi,jpj) , sbc_tsc (jpi,jpj,jpts) , qsr_hc (jpi,jpj,jpk) , & 186 & rnf_b(jpi,jpj) , sbc_tsc_b(jpi,jpj,jpts) , qsr_hc_b(jpi,jpj,jpk) , & 178 187 & fwficb (jpi,jpj), fwficb_b(jpi,jpj), STAT=ierr(3) ) 179 188 ! 180 189 ALLOCATE( tprecip(jpi,jpj) , sprecip(jpi,jpj) , fr_i(jpi,jpj) , & 181 & atm_co2(jpi,jpj) , 190 & atm_co2(jpi,jpj) , tsk_m(jpi,jpj) , & 182 191 & ssu_m (jpi,jpj) , sst_m(jpi,jpj) , frq_m(jpi,jpj) , & 183 192 & ssv_m (jpi,jpj) , sss_m(jpi,jpj) , ssh_m(jpi,jpj) , STAT=ierr(4) ) 184 193 ! 185 194 ALLOCATE( e3t_m(jpi,jpj) , STAT=ierr(5) ) 186 195 ! 187 196 sbc_oce_alloc = MAXVAL( ierr ) 188 197 CALL mpp_sum ( 'sbc_oce', sbc_oce_alloc ) … … 195 204 !!--------------------------------------------------------------------- 196 205 !! *** ROUTINE sbc_tau2wnd *** 197 !! 198 !! ** Purpose : Estimation of wind speed as a function of wind stress 206 !! 207 !! ** Purpose : Estimation of wind speed as a function of wind stress 199 208 !! 200 209 !! ** Method : |tau|=rhoa*Cd*|U|^2 … … 207 216 INTEGER :: ji, jj ! dummy indices 208 217 !!--------------------------------------------------------------------- 209 zcoef = 0.5 / ( zrhoa * zcdrag ) 210 DO jj = 2, jpjm1 211 DO ji = fs_2, fs_jpim1 ! vect. opt. 212 ztx = utau(ji-1,jj ) + utau(ji,jj) 213 zty = vtau(ji ,jj-1) + vtau(ji,jj) 214 ztau = SQRT( ztx * ztx + zty * zty ) 215 wndm(ji,jj) = SQRT ( ztau * zcoef ) * tmask(ji,jj,1) 216 END DO 217 END DO 218 zcoef = 0.5 / ( zrhoa * zcdrag ) 219 DO_2D_00_00 220 ztx = utau(ji-1,jj ) + utau(ji,jj) 221 zty = vtau(ji ,jj-1) + vtau(ji,jj) 222 ztau = SQRT( ztx * ztx + zty * zty ) 223 wndm(ji,jj) = SQRT ( ztau * zcoef ) * tmask(ji,jj,1) 224 END_2D 218 225 CALL lbc_lnk( 'sbc_oce', wndm(:,:) , 'T', 1. ) 219 226 !
Note: See TracChangeset
for help on using the changeset viewer.