- Timestamp:
- 2014-10-31T12:45:41+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_3841_sbc/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
r3772 r4827 27 27 USE dom_oce ! ocean space and time domain 28 28 USE phycst ! physical constants 29 USE fldread ! read input fields 29 USE fldread2 ! read input fields 30 USE fld_def 31 USE sbcget 30 32 USE sbc_oce ! Surface boundary condition: ocean fields 31 33 USE cyclone ! Cyclone 10m wind form trac of cyclone centres … … 49 51 PUBLIC blk_ice_core ! routine called in sbc_ice_lim module 50 52 PUBLIC turb_core_2z ! routine calles in sbcblk_mfs module 51 52 INTEGER , PARAMETER :: jpfld = 9 ! maximum number of files to read53 INTEGER , PARAMETER :: jp_wndi = 1 ! index of 10m wind velocity (i-component) (m/s) at T-point54 INTEGER , PARAMETER :: jp_wndj = 2 ! index of 10m wind velocity (j-component) (m/s) at T-point55 INTEGER , PARAMETER :: jp_humi = 3 ! index of specific humidity ( % )56 INTEGER , PARAMETER :: jp_qsr = 4 ! index of solar heat (W/m2)57 INTEGER , PARAMETER :: jp_qlw = 5 ! index of Long wave (W/m2)58 INTEGER , PARAMETER :: jp_tair = 6 ! index of 10m air temperature (Kelvin)59 INTEGER , PARAMETER :: jp_prec = 7 ! index of total precipitation (rain+snow) (Kg/m2/s)60 INTEGER , PARAMETER :: jp_snow = 8 ! index of snow (solid prcipitation) (kg/m2/s)61 INTEGER , PARAMETER :: jp_tdif = 9 ! index of tau diff associated to HF tau (N/m2) at T-point62 53 63 TYPE( FLD), ALLOCATABLE, DIMENSION(:) :: sf ! structure of input fields (file informations, fields read)54 TYPE(MAP_POINTER), ALLOCATABLE, DIMENSION(:) :: nbmap_ptr 64 55 65 56 ! !!! CORE bulk parameters … … 119 110 INTEGER, INTENT(in) :: kt ! ocean time step 120 111 !! 121 INTEGER :: ierror ! return error code 122 INTEGER :: ifpr ! dummy loop indice 123 INTEGER :: jfld ! dummy loop arguments 124 !! 125 CHARACTER(len=100) :: cn_dir ! Root directory for location of core files 126 TYPE(FLD_N), DIMENSION(jpfld) :: slf_i ! array of namelist informations on the fields to read 127 TYPE(FLD_N) :: sn_wndi, sn_wndj, sn_humi, sn_qsr ! informations about the fields to be read 128 TYPE(FLD_N) :: sn_qlw , sn_tair, sn_prec, sn_snow, sn_tdif ! - - 129 NAMELIST/namsbc_core/ cn_dir , ln_2m , ln_taudif, rn_pfac, & 130 & sn_wndi, sn_wndj, sn_humi , sn_qsr , & 131 & sn_qlw , sn_tair, sn_prec , sn_snow, sn_tdif 112 ! NAMELIST/namsbc_core/ cn_dir , ln_2m , ln_taudif, rn_pfac, & 113 ! & sn_wndi, sn_wndj, sn_humi , sn_qsr , & 114 ! & sn_qlw , sn_tair, sn_prec , sn_snow, sn_tdif 132 115 !!--------------------------------------------------------------------- 133 116 … … 135 118 IF( kt == nit000 ) THEN ! First call kt=nit000 ! 136 119 ! ! ====================== ! 137 ! set file information (default values)138 cn_dir = './' ! directory in which the model is executed139 120 ! 140 ! (NB: frequency positive => hours, negative => months)141 ! ! file ! frequency ! variable ! time intep ! clim ! 'yearly' or ! weights ! rotation !142 ! ! name ! (hours) ! name ! (T/F) ! (T/F) ! 'monthly' ! filename ! pairs !143 sn_wndi = FLD_N( 'uwnd10m', 24 , 'u_10' , .false. , .false. , 'yearly' , '' , '' )144 sn_wndj = FLD_N( 'vwnd10m', 24 , 'v_10' , .false. , .false. , 'yearly' , '' , '' )145 sn_qsr = FLD_N( 'qsw' , 24 , 'qsw' , .false. , .false. , 'yearly' , '' , '' )146 sn_qlw = FLD_N( 'qlw' , 24 , 'qlw' , .false. , .false. , 'yearly' , '' , '' )147 sn_tair = FLD_N( 'tair10m', 24 , 't_10' , .false. , .false. , 'yearly' , '' , '' )148 sn_humi = FLD_N( 'humi10m', 24 , 'q_10' , .false. , .false. , 'yearly' , '' , '' )149 sn_prec = FLD_N( 'precip' , -1 , 'precip' , .true. , .false. , 'yearly' , '' , '' )150 sn_snow = FLD_N( 'snow' , -1 , 'snow' , .true. , .false. , 'yearly' , '' , '' )151 sn_tdif = FLD_N( 'taudif' , 24 , 'taudif' , .true. , .false. , 'yearly' , '' , '' )152 !153 REWIND( numnam ) ! read in namlist namsbc_core154 READ ( numnam, namsbc_core )155 121 ! ! check: do we plan to use ln_dm2dc with non-daily forcing? 156 IF( ln_dm2dc .AND. s n_qsr%nfreqh /= 24 ) &122 IF( ln_dm2dc .AND. sf(jp_qsroce)%nfreqh /= 24 ) & 157 123 & CALL ctl_stop( 'sbc_blk_core: ln_dm2dc can be activated only with daily short-wave forcing' ) 158 IF( ln_dm2dc .AND. s n_qsr%ln_tint ) THEN124 IF( ln_dm2dc .AND. sf(jp_qsroce)%ln_tint ) THEN 159 125 CALL ctl_warn( 'sbc_blk_core: ln_dm2dc is taking care of the temporal interpolation of daily qsr', & 160 126 & ' ==> We force time interpolation = .false. for qsr' ) 161 s n_qsr%ln_tint = .false.127 sf(jp_qsroce)%ln_tint = .false. 162 128 ENDIF 163 ! ! store namelist information in an array164 slf_i(jp_wndi) = sn_wndi ; slf_i(jp_wndj) = sn_wndj165 slf_i(jp_qsr ) = sn_qsr ; slf_i(jp_qlw ) = sn_qlw166 slf_i(jp_tair) = sn_tair ; slf_i(jp_humi) = sn_humi167 slf_i(jp_prec) = sn_prec ; slf_i(jp_snow) = sn_snow168 slf_i(jp_tdif) = sn_tdif169 129 ! 170 130 lhftau = ln_taudif ! do we use HF tau information? 171 jfld = jpfld - COUNT( (/.NOT. lhftau/) )172 !173 ALLOCATE( sf(jfld), STAT=ierror ) ! set sf structure174 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_blk_core: unable to allocate sf structure' )175 DO ifpr= 1, jfld176 ALLOCATE( sf(ifpr)%fnow(jpi,jpj,1) )177 IF( slf_i(ifpr)%ln_tint ) ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) )178 END DO179 ! ! fill sf with slf_i and control print180 CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_core', 'flux formulation for ocean surface boundary condition', 'namsbc_core' )181 131 ! 182 132 sfx(:,:) = 0._wp ! salt flux; zero unless ice is present (computed in limsbc(_2).F90) 183 133 ! 184 134 ENDIF 185 186 CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step187 188 135 ! ! compute the surface ocean fluxes using CORE bulk formulea 189 136 IF( MOD( kt - 1, nn_fsbc ) == 0 ) CALL blk_oce_core( kt, sf, sst_m, ssu_m, ssv_m ) … … 192 139 IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 193 140 qlw_ice(:,:,1) = sf(jp_qlw)%fnow(:,:,1) 194 qsr_ice(:,:,1) = sf(jp_qsr )%fnow(:,:,1)141 qsr_ice(:,:,1) = sf(jp_qsroce)%fnow(:,:,1) 195 142 tatm_ice(:,:) = sf(jp_tair)%fnow(:,:,1) 196 143 qatm_ice(:,:) = sf(jp_humi)%fnow(:,:,1) … … 298 245 ! ocean albedo assumed to be constant + modify now Qsr to include the diurnal cycle ! Short Wave 299 246 zztmp = 1. - albo 300 IF( ln_dm2dc ) THEN ; qsr(:,:) = zztmp * sbc_dcy( sf(jp_qsr )%fnow(:,:,1) ) * tmask(:,:,1)301 ELSE ; qsr(:,:) = zztmp * sf(jp_qsr )%fnow(:,:,1) * tmask(:,:,1)247 IF( ln_dm2dc ) THEN ; qsr(:,:) = zztmp * sbc_dcy( sf(jp_qsroce)%fnow(:,:,1) ) * tmask(:,:,1) 248 ELSE ; qsr(:,:) = zztmp * sf(jp_qsroce)%fnow(:,:,1) * tmask(:,:,1) 302 249 ENDIF 303 250 !CDIR COLLAPSE
Note: See TracChangeset
for help on using the changeset viewer.