Changeset 3574 for branches/2012
- Timestamp:
- 2012-11-16T12:13:00+01:00 (12 years ago)
- Location:
- branches/2012/dev_INGV/NEMOGCM
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2012/dev_INGV/NEMOGCM/CONFIG/AMM12/EXP00/namelist
r3309 r3574 144 144 ! =2 annual global mean of e-p-r set to zero 145 145 ! =3 global emp set to zero and spread out over erp area 146 ln_wave = .false. ! Activate coupling with wave (either Stokes Drift or Drag coefficient, or both) (T => fill namsbc_wave) 146 147 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => fill namsbc_wave) 148 ln_sdw = .false. ! Computation of 3D stokes drift (T => fill namsbc_wave) 147 149 / 148 150 !----------------------------------------------------------------------- … … 971 973 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 972 974 sn_cdg = 'cdg_wave' , 1 , 'drag_coeff' , .true. , .false. , 'daily' ,'' , '' 975 sn_usd = 'sdw_wave' , 1 , 'u_sd2d' , .true. , .false. , 'daily' ,'' , '' 976 sn_vsd = 'sdw_wave' , 1 , 'v_sd2d' , .true. , .false. , 'daily' ,'' , '' 977 sn_wn = 'sdw_wave' , 1 , 'wave_num' , .true. , .false. , 'daily' ,'' , '' 973 978 ! 974 979 cn_dir_cdg = './' ! root directory for the location of drag coefficient files -
branches/2012/dev_INGV/NEMOGCM/CONFIG/AMM12_PISCES/EXP00/namelist
r3309 r3574 144 144 ! =2 annual global mean of e-p-r set to zero 145 145 ! =3 global emp set to zero and spread out over erp area 146 ln_wave = .false. ! Activate coupling with wave (either Stokes Drift or Drag coefficient, or both) (T => fill namsbc_wave) 146 147 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => fill namsbc_wave) 148 ln_sdw = .false. ! Computation of 3D stokes drift (T => fill namsbc_wave) 147 149 / 148 150 !----------------------------------------------------------------------- … … 972 974 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 973 975 sn_cdg = 'cdg_wave' , 1 , 'drag_coeff' , .true. , .false. , 'daily' ,'' , '' 976 sn_usd = 'sdw_wave' , 1 , 'u_sd2d' , .true. , .false. , 'daily' ,'' , '' 977 sn_vsd = 'sdw_wave' , 1 , 'v_sd2d' , .true. , .false. , 'daily' ,'' , '' 978 sn_wn = 'sdw_wave' , 1 , 'wave_num' , .true. , .false. , 'daily' ,'' , '' 974 979 ! 975 980 cn_dir_cdg = './' ! root directory for the location of drag coefficient files -
branches/2012/dev_INGV/NEMOGCM/CONFIG/GYRE/EXP00/namelist
r3306 r3574 144 144 ! =2 annual global mean of e-p-r set to zero 145 145 ! =3 global emp set to zero and spread out over erp area 146 ln_wave = .false. ! Activate coupling with wave (either Stokes Drift or Drag coefficient, or both) (T => fill namsbc_wave) 146 147 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => fill namsbc_wave) 148 ln_sdw = .false. ! Computation of 3D stokes drift (T => fill namsbc_wave) 147 149 / 148 150 !----------------------------------------------------------------------- … … 963 965 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 964 966 sn_cdg = 'cdg_wave' , 1 , 'drag_coeff' , .true. , .false. , 'daily' ,'' , '' 967 sn_usd = 'sdw_wave' , 1 , 'u_sd2d' , .true. , .false. , 'daily' ,'' , '' 968 sn_vsd = 'sdw_wave' , 1 , 'v_sd2d' , .true. , .false. , 'daily' ,'' , '' 969 sn_wn = 'sdw_wave' , 1 , 'wave_num' , .true. , .false. , 'daily' ,'' , '' 965 970 ! 966 971 cn_dir_cdg = './' ! root directory for the location of drag coefficient files -
branches/2012/dev_INGV/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist
r3306 r3574 144 144 ! =2 annual global mean of e-p-r set to zero 145 145 ! =3 global emp set to zero and spread out over erp area 146 ln_wave = .false. ! Activate coupling with wave (either Stokes Drift or Drag coefficient, or both) (T => fill namsbc_wave) 146 147 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => fill namsbc_wave) 148 ln_sdw = .false. ! Computation of 3D stokes drift (T => fill namsbc_wave) 147 149 / 148 150 !----------------------------------------------------------------------- … … 967 969 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 968 970 sn_cdg = 'cdg_wave' , 1 , 'drag_coeff' , .true. , .false. , 'daily' ,'' , '' 971 sn_usd = 'sdw_wave' , 1 , 'u_sd2d' , .true. , .false. , 'daily' ,'' , '' 972 sn_vsd = 'sdw_wave' , 1 , 'v_sd2d' , .true. , .false. , 'daily' ,'' , '' 973 sn_wn = 'sdw_wave' , 1 , 'wave_num' , .true. , .false. , 'daily' ,'' , '' 969 974 ! 970 975 cn_dir_cdg = './' ! root directory for the location of drag coefficient files -
branches/2012/dev_INGV/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist
r3306 r3574 144 144 ! =2 annual global mean of e-p-r set to zero 145 145 ! =3 global emp set to zero and spread out over erp area 146 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => fill namsbc_wave ) 146 ln_wave = .false. ! Activate coupling with wave (either Stokes Drift or Drag coefficient, or both) (T => fill namsbc_wave) 147 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => fill namsbc_wave) 148 ln_sdw = .false. ! Computation of 3D stokes drift (T => fill namsbc_wave) 147 149 / 148 150 !----------------------------------------------------------------------- … … 964 966 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 965 967 sn_cdg = 'cdg_wave' , 1 , 'drag_coeff' , .true. , .false. , 'daily' ,'' , '' 968 sn_usd = 'sdw_wave' , 1 , 'u_sd2d' , .true. , .false. , 'daily' ,'' , '' 969 sn_vsd = 'sdw_wave' , 1 , 'v_sd2d' , .true. , .false. , 'daily' ,'' , '' 970 sn_wn = 'sdw_wave' , 1 , 'wave_num' , .true. , .false. , 'daily' ,'' , '' 966 971 ! 967 972 cn_dir_cdg = './' ! root directory for the location of drag coefficient files -
branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
r3294 r3574 44 44 ! !: = 1 global mean of e-p-r set to zero at each nn_fsbc time step 45 45 ! !: = 2 annual global mean of e-p-r set to zero 46 LOGICAL , PUBLIC :: ln_cdgw = .FALSE. !: true if neutral drag coefficient read from wave model 46 LOGICAL , PUBLIC :: ln_wave = .FALSE. !: true if some coupling with wave model 47 LOGICAL , PUBLIC :: ln_cdgw = .FALSE. !: true if neutral drag coefficient from wave model 48 LOGICAL , PUBLIC :: ln_sdw = .FALSE. !: true if 3d stokes drift from wave model 47 49 48 50 !!---------------------------------------------------------------------- -
branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r3294 r3574 83 83 !! 84 84 NAMELIST/namsbc/ nn_fsbc , ln_ana , ln_flx , ln_blk_clio, ln_blk_core, ln_cpl, & 85 & ln_blk_mfs, ln_apr_dyn, nn_ice , ln_dm2dc, ln_rnf, ln_ssr , nn_fwb, ln_cdgw 85 & ln_blk_mfs, ln_apr_dyn, nn_ice , ln_dm2dc, ln_rnf, ln_ssr, nn_fwb, & 86 & ln_wave, ln_cdgw, ln_sdw 86 87 !!---------------------------------------------------------------------- 87 88 … … 92 93 ENDIF 93 94 95 call flush(numout) 94 96 REWIND( numnam ) ! Read Namelist namsbc 95 97 READ ( numnam, namsbc ) 98 call flush(numout) 96 99 97 100 ! ! overwrite namelist parameter using CPP key information … … 166 169 & CALL ctl_warn( 'diurnal cycle for qsr: the sampling of the diurnal cycle is too small...' ) 167 170 168 !drag coefficient read from wave model definable only with mfs bulk formulae and core 169 IF(ln_cdgw .AND. .NOT.(ln_blk_mfs .OR. ln_blk_core) ) & 170 & CALL ctl_stop( 'drag coefficient read from wave model definable only with mfs bulk formulae and core') 171 IF ( ln_wave ) THEN 172 !Activated wave module but neither drag nor stokes drift activated 173 IF ( .NOT.(ln_cdgw .OR. ln_sdw) ) THEN 174 CALL ctl_warn( 'Ask for wave coupling but nor drag coefficient (ln_cdgw=F) neither stokes drift activated (ln_sdw=F)' ) 175 !drag coefficient read from wave model definable only with mfs bulk formulae and core 176 ELSEIF (ln_cdgw .AND. .NOT.(ln_blk_mfs .OR. ln_blk_core) ) THEN 177 CALL ctl_stop( 'drag coefficient read from wave model definable only with mfs bulk formulae and core') 178 ENDIF 179 ELSE 180 IF ( ln_cdgw .OR. ln_sdw ) & 181 & CALL ctl_stop( 'Not Activated Wave Module (ln_wave=F) but asked coupling with drag coefficient (ln_cdgw =T) or Stokes drift (ln_sdw=T) ') 182 ENDIF 171 183 172 184 ! ! Choice of the Surface Boudary Condition (set nsbc) … … 249 261 ! ! averaged over nf_sbc time-step 250 262 251 IF (ln_ cdgw) CALL sbc_wave( kt )263 IF (ln_wave) CALL sbc_wave( kt ) 252 264 !== sbc formulation ==! 253 265 -
branches/2012/dev_INGV/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90
r3294 r3574 4 4 !! Wave module 5 5 !!====================================================================== 6 !! History : 3.3.1 ! 2011-09 (Adani M) Original code 6 !! History : 3.3.1 ! 2011-09 (Adani M) Original code: Drag Coefficient 7 !! : 3.4 ! 2012-10 (Adani M) Stokes Drift 7 8 !!---------------------------------------------------------------------- 8 9 USE iom ! I/O manager library … … 22 23 PUBLIC sbc_wave ! routine called in sbc_blk_core or sbc_blk_mfs 23 24 24 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_wave ! structure of input fields (file informations, fields read) 25 INTEGER , PARAMETER :: jpfld = 3 ! maximum number of files to read for srokes drift 26 INTEGER , PARAMETER :: jp_usd = 1 ! index of stokes drift (i-component) (m/s) at T-point 27 INTEGER , PARAMETER :: jp_vsd = 2 ! index of stokes drift (j-component) (m/s) at T-point 28 INTEGER , PARAMETER :: jp_wn = 3 ! index of wave number (1/m) at T-point 29 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_cd ! structure of input fields (file informations, fields read) Drag Coefficient 30 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_sd ! structure of input fields (file informations, fields read) Stokes Drift 25 31 REAL(wp),PUBLIC,ALLOCATABLE,DIMENSION (:,:) :: cdn_wave 32 REAL(wp),ALLOCATABLE,DIMENSION (:,:) :: usd2d,vsd2d,uwavenum,vwavenum 33 REAL(wp),PUBLIC,ALLOCATABLE,DIMENSION (:,:,:) :: usd3d,vsd3d,wsd3d 26 34 35 !! * Substitutions 36 # include "domzgr_substitute.h90" 27 37 !!---------------------------------------------------------------------- 28 38 !! NEMO/OPA 4.0 , NEMO Consortium (2011) … … 40 50 !! ** Method : - Read namelist namsbc_wave 41 51 !! - Read Cd_n10 fields in netcdf files 52 !! - Read stokes drift 2d in netcdf files 53 !! - Read wave number in netcdf files 54 !! - Compute 3d stokes drift using monochromatic 42 55 !! ** action : 43 56 !! 44 57 !!--------------------------------------------------------------------- 45 INTEGER, INTENT( in ) :: kt ! ocean time step 58 USE oce, ONLY : un,vn,hdivn,rotn 59 USE divcur 60 USE wrk_nemo 61 #if defined key_bdy 62 USE bdy_oce, ONLY : bdytmask 63 #endif 64 INTEGER, INTENT( in ) :: kt ! ocean time step 46 65 INTEGER :: ierror ! return error code 47 CHARACTER(len=100) :: cn_dir_cdg ! Root directory for location of drag coefficient files 48 TYPE(FLD_N) :: sn_cdg ! informations about the fields to be read 66 INTEGER :: ifpr, jj,ji,jk 67 REAL(wp),DIMENSION(:,:,:),POINTER :: udummy,vdummy,hdivdummy,rotdummy 68 REAL :: z2dt,z1_2dt 69 TYPE(FLD_N), DIMENSION(jpfld) :: slf_i ! array of namelist informations on the fields to read 70 CHARACTER(len=100) :: cn_dir ! Root directory for location of drag coefficient files 71 TYPE(FLD_N) :: sn_cdg, sn_usd, sn_vsd, sn_wn ! informations about the fields to be read 49 72 !!--------------------------------------------------------------------- 50 NAMELIST/namsbc_wave/ sn_cdg, cn_dir _cdg73 NAMELIST/namsbc_wave/ sn_cdg, cn_dir, sn_usd, sn_vsd, sn_wn 51 74 !!--------------------------------------------------------------------- 52 75 … … 62 85 ! ! name ! (hours) ! name ! (T/F) ! (T/F) ! 'monthly' ! filename ! pairs ! 63 86 sn_cdg = FLD_N('cdg_wave' , 1 ,'drag_coeff', .true. , .false. , 'daily' , '' , '' ) 64 cn_dir_cdg = './' ! directory in which the Patm data are 87 sn_usd = FLD_N('sdw_wave' , 1 ,'u_sd2d', .true. , .false. , 'daily' , '' , '' ) 88 sn_vsd = FLD_N('sdw_wave' , 1 ,'v_sd2d', .true. , .false. , 'daily' , '' , '' ) 89 sn_wn = FLD_N( 'sdw_wave' , 1 ,'wave_num', .true. , .false. , 'daily' , '' , '' ) 90 cn_dir = './' ! directory in which the wave data are 65 91 66 92 … … 69 95 ! 70 96 71 ALLOCATE( sf_wave(1), STAT=ierror ) !* allocate and fill sf_wave with sn_cdg 72 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave: unable to allocate sf_wave structure' ) 73 ! 74 CALL fld_fill( sf_wave, (/ sn_cdg /), cn_dir_cdg, 'sbc_wave', 'Wave module ', 'namsbc_wave' ) 75 ALLOCATE( sf_wave(1)%fnow(jpi,jpj,1) ) 76 IF( sn_cdg%ln_tint ) ALLOCATE( sf_wave(1)%fdta(jpi,jpj,1,2) ) 77 ALLOCATE( cdn_wave(jpi,jpj) ) 78 cdn_wave(:,:) = 0.0 97 IF ( ln_cdgw ) THEN 98 ALLOCATE( sf_cd(1), STAT=ierror ) !* allocate and fill sf_wave with sn_cdg 99 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave: unable to allocate sf_wave structure' ) 100 ! 101 ALLOCATE( sf_cd(1)%fnow(jpi,jpj,1) ) 102 IF( sn_cdg%ln_tint ) ALLOCATE( sf_cd(1)%fdta(jpi,jpj,1,2) ) 103 CALL fld_fill( sf_cd, (/ sn_cdg /), cn_dir, 'sbc_wave', 'Wave module ', 'namsbc_wave' ) 104 ALLOCATE( cdn_wave(jpi,jpj) ) 105 cdn_wave(:,:) = 0.0 106 ENDIF 107 IF ( ln_sdw ) THEN 108 slf_i(jp_usd) = sn_usd ; slf_i(jp_vsd) = sn_vsd; slf_i(jp_wn) = sn_wn 109 ALLOCATE( sf_sd(3), STAT=ierror ) !* allocate and fill sf_wave with sn_cdg 110 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_wave: unable to allocate sf_wave structure' ) 111 ! 112 DO ifpr= 1, jpfld 113 ALLOCATE( sf_sd(ifpr)%fnow(jpi,jpj,1) ) 114 IF( slf_i(ifpr)%ln_tint ) ALLOCATE( sf_sd(ifpr)%fdta(jpi,jpj,1,2) ) 115 END DO 116 CALL fld_fill( sf_sd, slf_i, cn_dir, 'sbc_wave', 'Wave module ', 'namsbc_wave' ) 117 ALLOCATE( usd2d(jpi,jpj),vsd2d(jpi,jpj),uwavenum(jpi,jpj),vwavenum(jpi,jpj) ) 118 ALLOCATE( usd3d(jpi,jpj,jpk),vsd3d(jpi,jpj,jpk),wsd3d(jpi,jpj,jpk) ) 119 usd2d(:,:) = 0.0 ; vsd2d(:,:) = 0.0 ; uwavenum(:,:) = 0.0 ; vwavenum(:,:) = 0.0 120 usd3d(:,:,:) = 0.0 ;vsd3d(:,:,:) = 0.0 ; wsd3d(:,:,:) = 0.0 121 ENDIF 79 122 ENDIF 80 123 ! 81 124 ! 82 CALL fld_read( kt, nn_fsbc, sf_wave ) !* read drag coefficient from external forcing 83 cdn_wave(:,:) = sf_wave(1)%fnow(:,:,1) 125 IF ( ln_cdgw ) THEN 126 CALL fld_read( kt, nn_fsbc, sf_cd ) !* read drag coefficient from external forcing 127 cdn_wave(:,:) = sf_cd(1)%fnow(:,:,1) 128 ENDIF 129 IF ( ln_sdw ) THEN 130 CALL fld_read( kt, nn_fsbc, sf_sd ) !* read drag coefficient from external forcing 84 131 132 ! Interpolate wavenumber, stokes drift into the grid_V and grid_V 133 !------------------------------------------------- 134 135 DO jj = 1, jpjm1 136 DO ji = 1, jpim1 137 uwavenum(ji,jj)=0.5 * ( 2. - umask(ji,jj,1) ) * ( sf_sd(3)%fnow(ji,jj,1) * tmask(ji,jj,1) & 138 & + sf_sd(3)%fnow(ji+1,jj,1) * tmask(ji+1,jj,1) ) 139 140 vwavenum(ji,jj)=0.5 * ( 2. - vmask(ji,jj,1) ) * ( sf_sd(3)%fnow(ji,jj,1) * tmask(ji,jj,1) & 141 & + sf_sd(3)%fnow(ji,jj+1,1) * tmask(ji,jj+1,1) ) 142 143 usd2d(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( sf_sd(1)%fnow(ji,jj,1) * tmask(ji,jj,1) & 144 & + sf_sd(1)%fnow(ji+1,jj,1) * tmask(ji+1,jj,1) ) 145 146 vsd2d(ji,jj) = 0.5 * ( 2. - vmask(ji,jj,1) ) * ( sf_sd(2)%fnow(ji,jj,1) * tmask(ji,jj,1) & 147 & + sf_sd(2)%fnow(ji,jj+1,1) * tmask(ji,jj+1,1) ) 148 END DO 149 END DO 150 151 !Computation of the 3d Stokes Drift 152 DO jk = 1, jpk 153 DO jj = 1, jpj-1 154 DO ji = 1, jpi-1 155 usd3d(ji,jj,jk) = usd2d(ji,jj)*exp(2.0*uwavenum(ji,jj)*(-MIN( gdept(ji,jj,jk) , gdept(ji+1,jj ,jk)))) 156 vsd3d(ji,jj,jk) = vsd2d(ji,jj)*exp(2.0*vwavenum(ji,jj)*(-MIN( gdept(ji,jj,jk) , gdept(ji ,jj+1,jk)))) 157 END DO 158 END DO 159 usd3d(jpi,:,jk) = usd2d(jpi,:)*exp( 2.0*uwavenum(jpi,:)*(-gdept(jpi,:,jk)) ) 160 vsd3d(:,jpj,jk) = vsd2d(:,jpj)*exp( 2.0*vwavenum(:,jpj)*(-gdept(:,jpj,jk)) ) 161 END DO 162 163 CALL wrk_alloc( jpi,jpj,jpk,udummy,vdummy,hdivdummy,rotdummy) 164 165 udummy(:,:,:)=un(:,:,:) 166 vdummy(:,:,:)=vn(:,:,:) 167 hdivdummy(:,:,:)=hdivn(:,:,:) 168 rotdummy(:,:,:)=rotn(:,:,:) 169 un(:,:,:)=usd3d(:,:,:) 170 vn(:,:,:)=vsd3d(:,:,:) 171 CALL div_cur(kt) 172 ! !------------------------------! 173 ! ! Now Vertical Velocity ! 174 ! !------------------------------! 175 z2dt = 2._wp * rdt ! set time step size (Euler/Leapfrog) 176 177 z1_2dt = 1.e0 / z2dt 178 DO jk = jpkm1, 1, -1 ! integrate from the bottom the hor. divergence 179 ! - ML - need 3 lines here because replacement of fse3t by its expression yields too long lines otherwise 180 wsd3d(:,:,jk) = wsd3d(:,:,jk+1) - fse3t_n(:,:,jk) * hdivn(:,:,jk) & 181 & - ( fse3t_a(:,:,jk) - fse3t_b(:,:,jk) ) & 182 & * tmask(:,:,jk) * z1_2dt 183 #if defined key_bdy 184 wsd3d(:,:,jk) = wsd3d(:,:,jk) * bdytmask(:,:) 185 #endif 186 END DO 187 hdivn(:,:,:)=hdivdummy(:,:,:) 188 rotn(:,:,:)=rotdummy(:,:,:) 189 vn(:,:,:)=vdummy(:,:,:) 190 un(:,:,:)=udummy(:,:,:) 191 CALL wrk_dealloc( jpi,jpj,jpk,udummy,vdummy,hdivdummy,rotdummy) 192 ENDIF 85 193 END SUBROUTINE sbc_wave 86 194
Note: See TracChangeset
for help on using the changeset viewer.