- Timestamp:
- 11/08/19 17:23:11 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/devel/src/dissip/nudging_mod.f90
r973 r989 12 12 PRIVATE 13 13 ! nudging will be active outside a disc of radius 'radius' centered at 'center_lon', 'center lat'. 14 REAL(rstd) :: center_lon, center_lat, nudging_radius, nudging_relaxation_time 15 !$OMP THREADPRIVATE(center_lon, center_lat, nudging_radius, nudging_relaxation_time) 14 REAL(rstd) :: center_lon, center_lat, nudging_radius, nudging_relaxation_time, & 15 nudging_relaxation_time_in,nudging_relaxation_time_out 16 !$OMP THREADPRIVATE(center_lon, center_lat, nudging_radius, nudging_relaxation_time,nudging_relaxation_time_in,nudging_relaxation_time_out) 16 17 TYPE(t_field),POINTER :: f_relax_coef_e(:), f_target_ue(:), & 17 18 f_relax_coef_i(:), f_target_theta_rhodz(:),f_target_ps(:) … … 49 50 !nudging_time=0 50 51 51 nudging_relaxation_time = 0. 52 CALL getin('nudging_relaxation_time', nudging_relaxation_time) 53 nudging_relaxation_time = nudging_relaxation_time/scale_factor 52 nudging_relaxation_time_in = 0. 53 nudging_relaxation_time_out = 0. 54 CALL getin('nudging_relaxation_time_in', nudging_relaxation_time_in) 55 CALL getin('nudging_relaxation_time_out', nudging_relaxation_time_out) 56 nudging_relaxation_time_in = nudging_relaxation_time_in/scale_factor 57 nudging_relaxation_time_out = nudging_relaxation_time_out/scale_factor 58 IF(nudging_relaxation_time_in .EQ. 0. .AND. nudging_relaxation_time_out .EQ. 0.) THEN 59 PRINT*," nudging_relaxation_time_in and nudging_relaxation_time_out values can not be 0. at the same time" 60 ENDIF 54 61 55 62 CALL getin("guided_nudging_field",guided_nudging_field) … … 114 121 IF (c>0.99) c=1 115 122 IF (c<-0.99) c=-1 116 relax_coef= .5*(1.+c) ! rescale to [0,1] range ; ! 1 inside circle, 0 outside123 c = .5*(1.+c) ! rescale to [0,1] range ; ! 1 inside circle, 0 outside 117 124 ELSE 118 125 c = 0. 119 126 END IF 120 127 121 relax_coef = 1. - (1.-relax_coef) * dt / (dt + nudging_relaxation_time) 128 nudging_relaxation_time = c*nudging_relaxation_time_in + (1.-c)*nudging_relaxation_time_out 129 relax_coef = 1. - dt/(dt + nudging_relaxation_time) 122 130 END FUNCTION relax_coef 123 131
Note: See TracChangeset
for help on using the changeset viewer.