- Timestamp:
- 2017-03-17T15:21:06+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/r6232_HZG_WAVE-coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90
r7797 r7809 56 56 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_wn ! structure of input fields (file informations, fields read) wave number for Qiao 57 57 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_tauoc ! structure of input fields (file informations, fields read) normalized wave stress into the ocean 58 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_phioc ! structure of input fields (file informations, fields read) wave to ocean energy 58 59 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: cdn_wave !: 59 60 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: hsw, wmp, wnum !: 61 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: rn_crban !: Craig and Banner constant for surface breaking waves mixing 60 62 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: tauoc_wave !: 61 63 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: tsd2d !: … … 222 224 ENDIF 223 225 226 IF( ln_phioc .AND. .NOT. cpl_phioc ) THEN !== Wave to ocean energy ==! 227 CALL fld_read( kt, nn_fsbc, sf_phioc ) ! read wave to ocean energy from external forcing 228 rn_crban(:,:) = 29.0 * sf_phioc(1)%fnow(:,:,1) ! ! Alfa is phioc*sqrt(rw/ra)sbc_wa 229 WHERE( rn_crban < 10.0 ) rn_crban = 10.0 230 WHERE( rn_crban > 300.0 ) rn_crban = 300.0 231 ENDIF 232 224 233 IF( ln_sdw ) THEN !== Computation of the 3d Stokes Drift ==! 225 234 ! … … 267 276 CHARACTER(len=100) :: cn_dir ! Root directory for location of drag coefficient files 268 277 TYPE(FLD_N), ALLOCATABLE, DIMENSION(:) :: slf_i ! array of namelist informations on the fields to read 269 TYPE(FLD_N) :: sn_cdg, sn_usd, sn_vsd, &278 TYPE(FLD_N) :: sn_cdg, sn_usd, sn_vsd, sn_phioc, & 270 279 & sn_hsw, sn_wmp, sn_wnum, sn_tauoc ! informations about the fields to be read 271 280 ! 272 NAMELIST/namsbc_wave/ sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wnum, sn_tauoc 281 NAMELIST/namsbc_wave/ sn_cdg, cn_dir, sn_usd, sn_vsd, sn_hsw, sn_wmp, sn_wnum, sn_tauoc, sn_phioc 273 282 !!--------------------------------------------------------------------- 274 283 ! … … 285 294 IF( .NOT. cpl_wdrag ) THEN 286 295 ALLOCATE( sf_cd(1), STAT=ierror ) !* allocate and fill sf_wave with sn_cdg 287 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave_init: unable to allocate sf_ wavestructure' )296 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave_init: unable to allocate sf_cd structure' ) 288 297 ! 289 298 ALLOCATE( sf_cd(1)%fnow(jpi,jpj,1) ) … … 297 306 IF( .NOT. cpl_tauoc ) THEN 298 307 ALLOCATE( sf_tauoc(1), STAT=ierror ) !* allocate and fill sf_wave with sn_tauoc 299 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave_init: unable to allocate sf_ wavestructure' )308 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave_init: unable to allocate sf_tauoc structure' ) 300 309 ! 301 310 ALLOCATE( sf_tauoc(1)%fnow(jpi,jpj,1) ) … … 304 313 ENDIF 305 314 ALLOCATE( tauoc_wave(jpi,jpj) ) 315 ENDIF 316 317 IF( ln_phioc ) THEN 318 IF( .NOT. cpl_phioc ) THEN 319 ALLOCATE( sf_phioc(1), STAT=ierror ) !* allocate and fill sf_wave with sn_phioc 320 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave_init: unable to allocate sf_phioc structure' ) 321 ! 322 ALLOCATE( sf_phioc(1)%fnow(jpi,jpj,1) ) 323 IF( sn_phioc%ln_tint ) ALLOCATE( sf_phioc(1)%fdta(jpi,jpj,1,2) ) 324 CALL fld_fill( sf_phioc, (/ sn_phioc /), cn_dir, 'sbc_wave_init', 'Wave module', 'namsbc_wave' ) 325 ENDIF 326 ALLOCATE( rn_crban(jpi,jpj) ) 306 327 ENDIF 307 328 … … 334 355 IF( jp_wmp > 0 ) slf_i(jp_wmp) = sn_wmp 335 356 ALLOCATE( sf_sd(jpfld), STAT=ierror ) !* allocate and fill sf_sd with stokes drift 336 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave_init: unable to allocate sf_ wavestructure' )357 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave_init: unable to allocate sf_sd structure' ) 337 358 ! 338 359 DO ifpr= 1, jpfld … … 354 375 IF( ln_zdfqiao .AND. .NOT.cpl_wnum ) THEN 355 376 ALLOCATE( sf_wn(1), STAT=ierror ) !* allocate and fill sf_wave with sn_wnum 356 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave_init: unable toallocate sf_w avestructure' )377 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave_init: unable toallocate sf_wn structure' ) 357 378 ALLOCATE( sf_wn(1)%fnow(jpi,jpj,1) ) 358 379 IF( sn_wnum%ln_tint ) ALLOCATE( sf_wn(1)%fdta(jpi,jpj,1,2) )
Note: See TracChangeset
for help on using the changeset viewer.