Changeset 2198
- Timestamp:
- 2010-10-11T13:09:49+02:00 (13 years ago)
- Location:
- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC/sbcblk_core.F90
r1951 r2198 12 12 !! 3.0 ! 2006-06 (G. Madec) sbc rewritting 13 13 !! 3.2 ! 2009-04 (B. Lemaire) Introduce iom_put 14 !! 3.3 ! 2010-10 (S. Masson) add diurnal cycle 14 15 !!---------------------------------------------------------------------- 15 16 … … 26 27 USE fldread ! read input fields 27 28 USE sbc_oce ! Surface boundary condition: ocean fields 29 USE sbcdcy ! surface boundary condition: diurnal cycle 28 30 USE iom ! I/O manager library 29 31 USE in_out_manager ! I/O manager … … 34 36 USE sbc_ice ! Surface boundary condition: ice fields 35 37 #endif 36 37 38 38 39 IMPLICIT NONE … … 62 63 REAL(wp), PARAMETER :: Cice = 1.63e-3 ! transfer coefficient over ice 63 64 64 ! !!* Namelist namsbc_core : CORE bulk parameters65 LOGICAL :: ln_2m = .FALSE. 66 LOGICAL :: ln_taudif = .FALSE. 67 REAL(wp) :: rn_pfac = 1. 65 ! !!* Namelist namsbc_core : CORE bulk parameters 66 LOGICAL :: ln_2m = .FALSE. ! logical flag for height of air temp. and hum 67 LOGICAL :: ln_taudif = .FALSE. ! logical flag to use the "mean of stress module - module of mean stress" data 68 REAL(wp) :: rn_pfac = 1. ! multiplication factor for precipitation 68 69 69 70 !! * Substitutions … … 71 72 # include "vectopt_loop_substitute.h90" 72 73 !!---------------------------------------------------------------------- 73 !! NEMO/OPA 3. 2 , LOCEAN-IPSL (2009)74 !! NEMO/OPA 3.3 , NEMO-consortium (2010) 74 75 !! $Id$ 75 76 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 76 77 !!---------------------------------------------------------------------- 77 78 78 CONTAINS 79 79 … … 144 144 sn_tdif = FLD_N( 'taudif' , 24 , 'taudif' , .true. , .false. , 'yearly' , '' , '' ) 145 145 ! 146 REWIND( numnam ) ! ...read in namlist namsbc_core146 REWIND( numnam ) ! read in namlist namsbc_core 147 147 READ ( numnam, namsbc_core ) 148 ! 149 ! store namelist information in an array 148 ! ! check: do we plan to use ln_dm2dc with non-daily forcing? 149 IF( ln_dm2dc .AND. sn_qsr%nfreqh /= 24 ) & 150 & CALL ctl_stop( 'sbc_blk_core: ln_dm2dc can be activated only with daily short-wave forcing' ) 151 IF( ln_dm2dc .AND. sn_qsr%ln_tint ) THEN 152 CALL ctl_warn( 'sbc_blk_core: ln_dm2dc is taking care of the temporal interpolation of daily qsr', & 153 & ' ==> We force time interpolation = .false. for qsr' ) 154 sn_qsr%ln_tint = .false. 155 ENDIF 156 ! ! store namelist information in an array 150 157 slf_i(jp_wndi) = sn_wndi ; slf_i(jp_wndj) = sn_wndj 151 158 slf_i(jp_qsr ) = sn_qsr ; slf_i(jp_qlw ) = sn_qlw … … 153 160 slf_i(jp_prec) = sn_prec ; slf_i(jp_snow) = sn_snow 154 161 slf_i(jp_tdif) = sn_tdif 155 ! 156 ! do we use HF tau information? 157 lhftau = ln_taudif 162 ! 163 lhftau = ln_taudif ! do we use HF tau information? 158 164 jfld = jpfld - COUNT( (/.NOT. lhftau/) ) 159 165 ! 160 ! set sf structure 161 ALLOCATE( sf(jfld), STAT=ierror ) 166 ALLOCATE( sf(jfld), STAT=ierror ) ! set sf structure 162 167 IF( ierror > 0 ) THEN 163 168 CALL ctl_stop( 'sbc_blk_core: unable to allocate sf structure' ) ; RETURN … … 167 172 ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) ) 168 173 END DO 169 ! 170 ! fill sf with slf_i and control print 171 CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_core', 'flux formulattion for ocean surface boundary condition', 'namsbc_core' ) 174 ! ! fill sf with slf_i and control print 175 CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_core', 'flux formulation for ocean surface boundary condition', 'namsbc_core' ) 172 176 ! 173 177 ENDIF 174 178 175 CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step 179 CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step 180 181 IF( ln_dm2dc ) CALL sbc_dcy ( kt , sf(jp_qsr)%fnow ) ! modify now Qsr to include the diurnal cycle 176 182 177 183 #if defined key_lim3 178 tatm_ice(:,:) = sf(jp_tair)%fnow(:,:,1) 184 tatm_ice(:,:) = sf(jp_tair)%fnow(:,:,1) ! LIM3: make Tair available in sea-ice 179 185 #endif 180 181 IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 182 CALL blk_oce_core( sf, sst_m, ssu_m, ssv_m ) ! compute the surface ocean fluxes using CLIO bulk formulea 183 ENDIF 184 ! ! using CORE bulk formulea 186 ! ! surface ocean fluxes computed with CLIO bulk formulea 187 IF( MOD( kt - 1, nn_fsbc ) == 0 ) CALL blk_oce_core( sf, sst_m, ssu_m, ssv_m ) 188 ! 185 189 END SUBROUTINE sbc_blk_core 186 190 -
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' -
branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC/sbcmod.F90
r2148 r2198 5 5 !!====================================================================== 6 6 !! History : 3.0 ! 2006-07 (G. Madec) Original code 7 !! 3.1 ! 2008-08 (S. Masson, E. Maisonnave, G. Madec) coupled interface7 !! 3.1 ! 2008-08 (S. Masson, A. Caubel, E. Maisonnave, G. Madec) coupled interface 8 8 !! 3.3 ! 2010-04 (M. Leclair, G. Madec) Forcing averaged over 2 time steps 9 !! 3.3 ! 2010-10 (S. Masson) add diurnal cycle 9 10 !!---------------------------------------------------------------------- 10 11 … … 13 14 !! sbc : surface ocean momentum, heat and freshwater boundary conditions 14 15 !!---------------------------------------------------------------------- 15 USE oce ! ocean dynamics and tracers 16 USE dom_oce ! ocean space and time domain 17 USE phycst ! physical constants 18 19 USE sbc_oce ! Surface boundary condition: ocean fields 20 USE sbc_ice ! Surface boundary condition: ice fields 21 USE sbcssm ! surface boundary condition: sea-surface mean variables 22 USE sbcana ! surface boundary condition: analytical formulation 23 USE sbcflx ! surface boundary condition: flux formulation 24 USE sbcblk_clio ! surface boundary condition: bulk formulation : CLIO 25 USE sbcblk_core ! surface boundary condition: bulk formulation : CORE 26 USE sbcice_if ! surface boundary condition: ice-if sea-ice model 27 USE sbcice_lim ! surface boundary condition: LIM 3.0 sea-ice model 28 USE sbcice_lim_2 ! surface boundary condition: LIM 2.0 sea-ice model 29 USE sbccpl ! surface boundary condition: coupled florulation 16 USE oce ! ocean dynamics and tracers 17 USE dom_oce ! ocean space and time domain 18 USE phycst ! physical constants 19 USE sbc_oce ! Surface boundary condition: ocean fields 20 USE sbc_ice ! Surface boundary condition: ice fields 21 USE sbcssm ! surface boundary condition: sea-surface mean variables 22 USE sbcana ! surface boundary condition: analytical formulation 23 USE sbcflx ! surface boundary condition: flux formulation 24 USE sbcblk_clio ! surface boundary condition: bulk formulation : CLIO 25 USE sbcblk_core ! surface boundary condition: bulk formulation : CORE 26 USE sbcice_if ! surface boundary condition: ice-if sea-ice model 27 USE sbcice_lim ! surface boundary condition: LIM 3.0 sea-ice model 28 USE sbcice_lim_2 ! surface boundary condition: LIM 2.0 sea-ice model 29 USE sbccpl ! surface boundary condition: coupled florulation 30 30 USE cpl_oasis3, ONLY:lk_cpl ! are we in coupled mode? 31 USE sbcssr ! surface boundary condition: sea surface restoring32 USE sbcrnf ! surface boundary condition: runoffs33 USE sbcfwb ! surface boundary condition: freshwater budget34 USE closea ! closed sea35 36 USE prtctl ! Print control (prt_ctl routine)37 USE restart ! ocean restart38 USE iom 39 USE in_out_manager ! I/O manager31 USE sbcssr ! surface boundary condition: sea surface restoring 32 USE sbcrnf ! surface boundary condition: runoffs 33 USE sbcfwb ! surface boundary condition: freshwater budget 34 USE closea ! closed sea 35 36 USE prtctl ! Print control (prt_ctl routine) 37 USE restart ! ocean restart 38 USE iom ! IOM library 39 USE in_out_manager ! I/O manager 40 40 41 41 IMPLICIT NONE … … 50 50 # include "domzgr_substitute.h90" 51 51 !!---------------------------------------------------------------------- 52 !! NEMO/OPA 3.3 , LOCEAN-IPSL(2010)52 !! NEMO/OPA 3.3 , NEMO-consortium (2010) 53 53 !! $Id$ 54 54 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 55 55 !!---------------------------------------------------------------------- 56 57 56 CONTAINS 58 57 … … 70 69 INTEGER :: icpt ! temporary integer 71 70 !! 72 NAMELIST/namsbc/ nn_fsbc, ln_ana , ln_flx, ln_blk_clio, ln_blk_core, ln_cpl, &73 & nn_ice , ln_dm2dc, ln_rnf, ln_ssr , nn_fwb, nn_ico_cpl71 NAMELIST/namsbc/ nn_fsbc, ln_ana , ln_flx, ln_blk_clio, ln_blk_core, ln_cpl , & 72 & nn_ice , ln_dm2dc, ln_rnf, ln_ssr , nn_fwb , nn_ico_cpl 74 73 !!---------------------------------------------------------------------- 75 74 … … 80 79 ENDIF 81 80 82 REWIND( numnam ) 81 REWIND( numnam ) ! Read Namelist namsbc 83 82 READ ( numnam, namsbc ) 84 83 85 ! overwrite namelist parameter using CPP key information 86 !!gm here no overwrite, test all option via namelist change: require more incore memory 87 !!gm IF( lk_sbc_cpl ) THEN ; ln_cpl = .TRUE. ; ELSE ; ln_cpl = .FALSE. ; ENDIF 88 89 IF( Agrif_Root() ) THEN 90 IF( lk_lim2 ) nn_ice = 2 91 IF( lk_lim3 ) nn_ice = 3 92 ENDIF 93 ! 94 IF( cp_cfg == 'gyre' ) THEN 84 ! ! overwrite namelist parameter using CPP key information 85 IF( Agrif_Root() ) THEN ! AGRIF zoom 86 IF( lk_lim2 ) nn_ice = 2 87 IF( lk_lim3 ) nn_ice = 3 88 ENDIF 89 IF( cp_cfg == 'gyre' ) THEN ! GYRE configuration 95 90 ln_ana = .TRUE. 96 91 nn_ice = 0 97 92 ENDIF 98 93 99 ! Control print 100 IF(lwp) THEN 94 IF(lwp) THEN ! Control print 101 95 WRITE(numout,*) ' Namelist namsbc (partly overwritten with CPP key setting)' 102 96 WRITE(numout,*) ' frequency update of sbc (and ice) nn_fsbc = ', nn_fsbc … … 117 111 ENDIF 118 112 113 ! ! Checks: 119 114 IF( .NOT. ln_rnf ) THEN ! no specific treatment in vicinity of river mouths 120 115 ln_rnf_mouth = .false. … … 139 134 & CALL ctl_stop( 'sea-ice model requires a bulk formulation or coupled configuration' ) 140 135 141 ! Choice of the Surface Boudary Condition (set nsbc) 136 IF( ln_dm2dc .AND. .NOT.( ln_flx .OR. ln_blk_core ) ) & 137 & CALL ctl_stop( 'diurnal cycle into qsr field from daily values requires a flux or core-bulk formulation' ) 138 139 IF( ln_dm2dc .AND. ( ( NINT(rday) / ( nn_fsbc * NINT(rdt) ) ) < 8 ) ) & 140 & CALL ctl_warn( 'diurnal cycle for qsr: the sampling of the diurnal cycle is too small...' ) 141 142 ! ! Choice of the Surface Boudary Condition (set nsbc) 142 143 icpt = 0 143 144 IF( ln_ana ) THEN ; nsbc = 1 ; icpt = icpt + 1 ; ENDIF ! analytical formulation … … 148 149 IF( cp_cfg == 'gyre') THEN ; nsbc = 0 ; ENDIF ! GYRE analytical formulation 149 150 IF( lk_esopa ) nsbc = -1 ! esopa test, ALL formulations 150 151 ! 151 152 IF( icpt /= 1 .AND. .NOT.lk_esopa ) THEN 152 153 WRITE(numout,*) … … 229 230 230 231 ! !== Misc. Options ==! 231 232 !!gm IF( ln_dm2dc ) CALL sbc_dcy( kt ) ! Daily mean qsr distributed over the Diurnal Cycle233 232 234 233 SELECT CASE( nn_ice ) ! Update heat and freshwater fluxes over sea-ice areas … … 293 292 CALL iom_put( "emp-rnf" , emp - rnf ) ! upward water flux 294 293 CALL iom_put( "emps-rnf", emps - rnf ) ! c/d water flux 295 CALL iom_put( "qns+qsr" , qns + qsr ) ! total heat flux (caution if ln_dm2dc=true, to be296 CALL iom_put( "qns" , qns ) ! solar heat flux moved after the call to iom_setkt)297 CALL iom_put( "qsr" , qsr ) ! solar heat flux moved after the call to iom_setkt)294 CALL iom_put( "qns+qsr" , qns + qsr ) ! total heat flux 295 CALL iom_put( "qns" , qns ) ! solar heat flux 296 CALL iom_put( "qsr" , qsr ) ! solar heat flux 298 297 IF( nn_ice > 0 ) CALL iom_put( "ice_cover", fr_i ) ! ice fraction 299 298 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.