Changeset 8765
- Timestamp:
- 2017-11-21T14:15:42+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/r8727_WAVE-2_Clementi_add_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90
r8755 r8765 29 29 PUBLIC sbc_flx ! routine called by step.F90 30 30 31 INTEGER :: jpfld! maximum number of files to read32 INTEGER :: jp_utau! index of wind stress (i-component) file33 INTEGER :: jp_vtau! index of wind stress (j-component) file34 INTEGER :: jp_qtot! index of total (non solar+solar) heat file35 INTEGER :: jp_qsr! index of solar heat file36 INTEGER :: jp_emp! index of evaporation-precipation file31 INTEGER , PARAMETER :: jpfld = 5 ! maximum number of files to read 32 INTEGER , PARAMETER :: jp_utau = 1 ! index of wind stress (i-component) file 33 INTEGER , PARAMETER :: jp_vtau = 2 ! index of wind stress (j-component) file 34 INTEGER , PARAMETER :: jp_qtot = 3 ! index of total (non solar+solar) heat file 35 INTEGER , PARAMETER :: jp_qsr = 4 ! index of solar heat file 36 INTEGER , PARAMETER :: jp_emp = 5 ! index of evaporation-precipation file 37 37 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf ! structure of input fields (file informations, fields read) 38 38 … … 82 82 REAL(wp) :: zcdrag = 1.5e-3 ! drag coefficient 83 83 REAL(wp) :: ztx, zty, zmod, zcoef ! temporary variables 84 LOGICAL :: ln_readtau ! Is it necessary to read utau, vtau from file?85 84 !! 86 85 CHARACTER(len=100) :: cn_dir ! Root directory for location of flx files … … 91 90 ! 92 91 IF( kt == nit000 ) THEN ! First call kt=nit000 93 ln_readtau = .NOT. (ln_wave .AND. ln_tauw )94 95 ! prepare the index of the fields that have to be read96 jpfld = 097 IF( ln_readtau ) THEN98 jp_utau = jpfld+199 jp_vtau = jpfld+2100 jpfld = jpfld+2101 ELSE102 jp_utau = 0 ; jp_vtau = 0103 ENDIF104 jp_qtot = jpfld+1105 jp_qsr = jpfld+2106 jp_emp = jpfld+3107 jpfld = jpfld+3108 109 92 ! set file information 110 93 REWIND( numnam_ref ) ! Namelist namsbc_flx in reference namelist : Files for fluxes … … 122 105 ! 123 106 ! ! store namelist information in an array 124 IF( ln_readtau ) THEN 125 slf_i(jp_utau) = sn_utau ; slf_i(jp_vtau) = sn_vtau 126 ENDIF 107 slf_i(jp_utau) = sn_utau ; slf_i(jp_vtau) = sn_vtau 127 108 slf_i(jp_qtot) = sn_qtot ; slf_i(jp_qsr ) = sn_qsr 128 109 slf_i(jp_emp ) = sn_emp … … 152 133 DO jj = 1, jpj ! set the ocean fluxes from read fields 153 134 DO ji = 1, jpi 154 IF( ln_readtau ) THEN 155 utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1) 156 vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1) 157 ENDIF 135 utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1) 136 vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1) 158 137 qns (ji,jj) = sf(jp_qtot)%fnow(ji,jj,1) - sf(jp_qsr)%fnow(ji,jj,1) 159 138 emp (ji,jj) = sf(jp_emp )%fnow(ji,jj,1) … … 164 143 ! 165 144 ! ! module of wind stress and wind speed at T-point 166 IF( ln_readtau ) THEN 167 zcoef = 1. / ( zrhoa * zcdrag ) 168 DO jj = 2, jpjm1 169 DO ji = fs_2, fs_jpim1 ! vect. opt. 170 ztx = utau(ji-1,jj ) + utau(ji,jj) 171 zty = vtau(ji ,jj-1) + vtau(ji,jj) 172 zmod = 0.5 * SQRT( ztx * ztx + zty * zty ) 173 taum(ji,jj) = zmod 174 wndm(ji,jj) = SQRT( zmod * zcoef ) 175 END DO 145 zcoef = 1. / ( zrhoa * zcdrag ) 146 DO jj = 2, jpjm1 147 DO ji = fs_2, fs_jpim1 ! vect. opt. 148 ztx = utau(ji-1,jj ) + utau(ji,jj) 149 zty = vtau(ji ,jj-1) + vtau(ji,jj) 150 zmod = 0.5 * SQRT( ztx * ztx + zty * zty ) 151 taum(ji,jj) = zmod 152 wndm(ji,jj) = SQRT( zmod * zcoef ) 176 153 END DO 177 taum(:,:) = taum(:,:) * tmask(:,:,1) ; wndm(:,:) = wndm(:,:) * tmask(:,:,1)178 CALL lbc_lnk( taum(:,:), 'T', 1. ) ; CALL lbc_lnk( wndm(:,:), 'T', 1.)179 ENDIF154 END DO 155 taum(:,:) = taum(:,:) * tmask(:,:,1) ; wndm(:,:) = wndm(:,:) * tmask(:,:,1) 156 CALL lbc_lnk( taum(:,:), 'T', 1. ) ; CALL lbc_lnk( wndm(:,:), 'T', 1. ) 180 157 181 158 IF( nitend-nit000 <= 100 .AND. lwp ) THEN ! control print (if less than 100 time-step asked)
Note: See TracChangeset
for help on using the changeset viewer.