- Timestamp:
- 2010-10-11T13:09:49+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC/sbcflx.F90
r1951 r2198 4 4 !! Ocean forcing: momentum, heat and freshwater flux formulation 5 5 !!===================================================================== 6 !! History : 9.0 ! 06-06 (G. Madec) Original code 6 !! History : 1.0 ! 2006-06 (G. Madec) Original code 7 !! 3.3 ! 2010-10 (S. Masson) add diurnal cycle 7 8 !!---------------------------------------------------------------------- 8 9 9 10 !!---------------------------------------------------------------------- 10 11 !! namflx : flux formulation namlist 11 !! sbc_flx : flux formulation as ocean surface boundary condition 12 !! (forced mode, fluxes read in NetCDF files) 13 !!---------------------------------------------------------------------- 14 !! question diverses 15 !! * ajouter un test sur la division entier de freqh et rdttra ??? 16 !! ** ajoute dans namelist: 1 year forcing files 17 !! or forcing file starts at the begining of the run 18 !! *** we assume that the forcing file start and end with the previous 19 !! year last record and the next year first record (useful for 20 !! time interpolation, required even if no time interp???) 21 !! * ajouter un test sur la division de la frequence en pas de temps 22 !! ==> daymod ajout de nsec_year = number of second since the begining of the year 23 !! assumed to be 0 at 0h january the 1st (i.e. 24h december the 31) 24 !! 25 !! *** regrouper dtatem et dtasal 12 !! sbc_flx : flux formulation as ocean surface boundary condition (forced mode, fluxes read in NetCDF files) 26 13 !!---------------------------------------------------------------------- 27 14 USE oce ! ocean dynamics and tracers 28 15 USE dom_oce ! ocean space and time domain 29 USE sbc_oce ! Surface boundary condition: ocean fields 16 USE sbc_oce ! surface boundary condition: ocean fields 17 USE sbcdcy ! surface boundary condition: diurnal cycle on qsr 30 18 USE phycst ! physical constants 31 19 USE fldread ! read input fields … … 52 40 # include "vectopt_loop_substitute.h90" 53 41 !!---------------------------------------------------------------------- 54 !! OPA 9.0 , LOCEAN-IPSL (2006)42 !! NEMO/OPA 3.3 , NEMO-consortium (2010) 55 43 !! $Id$ 56 44 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 57 45 !!---------------------------------------------------------------------- 58 59 46 CONTAINS 60 47 … … 98 85 NAMELIST/namsbc_flx/ cn_dir, sn_utau, sn_vtau, sn_qtot, sn_qsr, sn_emp 99 86 !!--------------------------------------------------------------------- 100 ! ! ====================== ! 101 IF( kt == nit000 ) THEN ! First call kt=nit000 ! 102 ! ! ====================== ! 87 ! 88 IF( kt == nit000 ) THEN ! First call kt=nit000 103 89 ! set file information 104 90 cn_dir = './' ! directory in which the model is executed 105 91 ! ... default values (NB: frequency positive => hours, negative => months) 106 ! ! file ! frequency ! variable ! time intep ! clim ! 'yearly' or ! weights ! rotation!107 ! ! name ! (hours) ! name ! (T/F) ! (T/F) ! 'monthly' ! filename ! pairs!108 sn_utau = FLD_N( 'utau' , 24 , 'utau' , .false. , .false. , 'yearly' , '' , '')109 sn_vtau = FLD_N( 'vtau' , 24 , 'vtau' , .false. , .false. , 'yearly' , '' , '')110 sn_qtot = FLD_N( 'qtot' , 24 , 'qtot' , .false. , .false. , 'yearly' , '' , '')111 sn_qsr = FLD_N( 'qsr' , 24 , 'qsr' , .false. , .false. , 'yearly' , '' , '')112 sn_emp = FLD_N( 'emp' , 24 , 'emp' , .false. , .false. , 'yearly' , '' , '')113 114 REWIND ( numnam ) ! ...read in namlist namflx92 ! ! file ! frequency ! variable ! time intep ! clim ! 'yearly' or ! weights ! rotation ! 93 ! ! name ! (hours) ! name ! (T/F) ! (T/F) ! 'monthly' ! filename ! pairs ! 94 sn_utau = FLD_N( 'utau' , 24 , 'utau' , .false. , .false. , 'yearly' , '' , '' ) 95 sn_vtau = FLD_N( 'vtau' , 24 , 'vtau' , .false. , .false. , 'yearly' , '' , '' ) 96 sn_qtot = FLD_N( 'qtot' , 24 , 'qtot' , .false. , .false. , 'yearly' , '' , '' ) 97 sn_qsr = FLD_N( 'qsr' , 24 , 'qsr' , .false. , .false. , 'yearly' , '' , '' ) 98 sn_emp = FLD_N( 'emp' , 24 , 'emp' , .false. , .false. , 'yearly' , '' , '' ) 99 ! 100 REWIND ( numnam ) ! read in namlist namflx 115 101 READ ( numnam, namsbc_flx ) 116 117 ! store namelist information in an array 102 ! 103 ! ! check: do we plan to use ln_dm2dc with non-daily forcing? 104 IF( ln_dm2dc .AND. sn_qsr%nfreqh /= 24 ) & 105 & CALL ctl_stop( 'sbc_blk_core: ln_dm2dc can be activated only with daily short-wave forcing' ) 106 ! 107 ! ! store namelist information in an array 118 108 slf_i(jp_utau) = sn_utau ; slf_i(jp_vtau) = sn_vtau 119 109 slf_i(jp_qtot) = sn_qtot ; slf_i(jp_qsr ) = sn_qsr 120 110 slf_i(jp_emp ) = sn_emp 121 122 ! set sf structure 123 ALLOCATE( sf(jpfld), STAT=ierror ) 111 ! 112 ALLOCATE( sf(jpfld), STAT=ierror ) ! set sf structure 124 113 IF( ierror > 0 ) THEN 125 114 CALL ctl_stop( 'sbc_flx: unable to allocate sf structure' ) ; RETURN … … 129 118 ALLOCATE( sf(ji)%fdta(jpi,jpj,1,2) ) 130 119 END DO 131 132 133 ! fill sf with slf_i and control print 120 ! ! fill sf with slf_i and control print 134 121 CALL fld_fill( sf, slf_i, cn_dir, 'sbc_flx', 'flux formulation for ocean surface boundary condition', 'namsbc_flx' ) 135 122 ! 136 123 ENDIF 137 124 138 CALL fld_read( kt, nn_fsbc, sf ) ! Read input fields and provides the 139 ! ! input fields at the current time-step 125 CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step 126 127 IF( ln_dm2dc ) CALL sbc_dcy( kt , sf(jp_qsr)%fnow ) ! modify now Qsr to include the diurnal cycle 140 128 141 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN 142 ! 143 ! set the ocean fluxes from read fields 129 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN ! update ocean fluxes at each SBC frequency 144 130 !CDIR COLLAPSE 145 DO jj = 1, jpj 131 DO jj = 1, jpj ! set the ocean fluxes from read fields 146 132 DO ji = 1, jpi 147 133 utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1) … … 152 138 END DO 153 139 END DO 154 155 ! module of wind stress and wind speed at T-point 156 zcoef = 1. / ( zrhoa * zcdrag ) 140 ! ! module of wind stress and wind speed at T-point 141 zcoef = 1. / ( zrhoa * zcdrag ) 157 142 !CDIR NOVERRCHK 158 143 DO jj = 2, jpjm1 … … 168 153 CALL lbc_lnk( taum(:,:), 'T', 1. ) ; CALL lbc_lnk( wndm(:,:), 'T', 1. ) 169 154 170 ! Initialization of emps (when no ice model) 171 emps(:,:) = emp (:,:) 155 emps(:,:) = emp (:,:) ! Initialization of emps (needed when no ice model) 172 156 173 ! control print (if less than 100 time-step asked) 174 IF( nitend-nit000 <= 100 .AND. lwp ) THEN 157 IF( nitend-nit000 <= 100 .AND. lwp ) THEN ! control print (if less than 100 time-step asked) 175 158 WRITE(numout,*) 176 159 WRITE(numout,*) ' read daily momentum, heat and freshwater fluxes OK'
Note: See TracChangeset
for help on using the changeset viewer.