Changeset 3798 for LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d
- Timestamp:
- Jan 11, 2021, 11:24:08 PM (4 years ago)
- Location:
- LMDZ6/branches/Ocean_skin
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Ocean_skin
-
LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d/1DUTILS.h
r3605 r3798 233 233 CALL getin('ok_flux_surf',ok_flux_surf) 234 234 235 !Config Key = ok_forc_tsurf 236 !Config Desc = forcage ou non par la Ts 237 !Config Def = false 238 !Config Help = forcage ou non par la Ts 239 ok_forc_tsurf=.false. 240 CALL getin('ok_forc_tsurf',ok_forc_tsurf) 241 235 242 !Config Key = ok_prescr_ust 236 243 !Config Desc = ustar impose ou non … … 239 246 ok_prescr_ust = .false. 240 247 CALL getin('ok_prescr_ust',ok_prescr_ust) 248 249 250 !Config Key = ok_prescr_beta 251 !Config Desc = betaevap impose ou non 252 !Config Def = false 253 !Config Help = betaevap impose ou non 254 ok_prescr_beta = .false. 255 CALL getin('ok_prescr_beta',ok_prescr_beta) 241 256 242 257 !Config Key = ok_old_disvert … … 280 295 !Config Desc = surface temperature 281 296 !Config Def = 290. 282 !Config Help = not used if type_ts_forcing=1 in lmdz1d.F297 !Config Help = surface temperature 283 298 tsurf = 290. 284 299 CALL getin('tsurf',tsurf) … … 297 312 zsurf = 0. 298 313 CALL getin('zsurf',zsurf) 314 ! EV pour accord avec format standard 315 CALL getin('zorog',zsurf) 316 299 317 300 318 !Config Key = rugos … … 304 322 rugos = 0.0001 305 323 CALL getin('rugos',rugos) 324 ! FH/2020/04/08/confinement: Pour le nouveau format standard, la rugosite s'appelle z0 325 CALL getin('z0',rugos) 306 326 307 327 !Config Key = rugosh … … 357 377 qsolinp = 1. 358 378 CALL getin('qsolinp',qsolinp) 379 380 381 382 !Config Key = betaevap 383 !Config Desc = beta for actual evaporation when prescribed 384 !Config Def = 1.0 385 !Config Help = 386 betaevap = 1. 387 CALL getin('betaevap',betaevap) 359 388 360 389 !Config Key = zpicinp … … 518 547 CALL getin('forc_ustar',forc_ustar) 519 548 IF (forc_ustar .EQ. 1) ok_prescr_ust=.true. 549 520 550 521 551 !Config Key = nudging_u … … 1246 1276 END 1247 1277 1248 ! ======================================================================1249 SUBROUTINE read_tsurf1d(knon,sst_out)1250 1251 ! This subroutine specifies the surface temperature to be used in 1D simulations1252 1253 USE dimphy, ONLY : klon1254 1255 INTEGER, INTENT(IN) :: knon ! nomber of points on compressed grid1256 REAL, DIMENSION(klon), INTENT(OUT) :: sst_out ! tsurf used to force the single-column model1257 1258 INTEGER :: i1259 ! COMMON defined in lmdz1d.F:1260 real ts_cur1261 common /sst_forcing/ts_cur1262 1263 DO i = 1, knon1264 sst_out(i) = ts_cur1265 ENDDO1266 1267 END SUBROUTINE read_tsurf1d1268 1278 !!====================================================================== 1279 ! SUBROUTINE read_tsurf1d(knon,sst_out) 1280 ! 1281 !! This subroutine specifies the surface temperature to be used in 1D simulations 1282 ! 1283 ! USE dimphy, ONLY : klon 1284 ! 1285 ! INTEGER, INTENT(IN) :: knon ! nomber of points on compressed grid 1286 ! REAL, DIMENSION(klon), INTENT(OUT) :: sst_out ! tsurf used to force the single-column model 1287 ! 1288 ! INTEGER :: i 1289 !! COMMON defined in lmdz1d.F: 1290 ! real ts_cur 1291 ! common /sst_forcing/ts_cur 1292 1293 ! DO i = 1, knon 1294 ! sst_out(i) = ts_cur 1295 ! ENDDO 1296 ! 1297 ! END SUBROUTINE read_tsurf1d 1298 ! 1269 1299 !=============================================================== 1270 1300 subroutine advect_vert(llm,w,dt,q,plev) -
LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d/1D_decl_cases.h
r3605 r3798 34 34 real w_mod(llm), t_mod(llm),q_mod(llm) 35 35 real u_mod(llm),v_mod(llm), ht_mod(llm),vt_mod(llm),ug_mod(llm),vg_mod(llm) 36 real temp_nudg_mod(llm),qv_nudg_mod(llm),u_nudg_mod(llm),v_nudg_mod(llm)36 real temp_nudg_mod(llm),qv_nudg_mod(llm),u_nudg_mod(llm),v_nudg_mod(llm) 37 37 real hq_mod(llm),vq_mod(llm),qv_mod(llm),ql_mod(llm),qt_mod(llm) 38 38 real th_mod(llm) 39 39 40 real ts_cur 41 common /sst_forcing/ts_cur ! also in read_tsurf1d.F 40 ! EV comment these lines 41 ! real ts_cur 42 ! common /sst_forcing/ts_cur ! also in read_tsurf1d.F 42 43 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 43 44 ! Declarations specifiques au cas RICO … … 286 287 real temp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm),v_nudg_mod_cas(llm),u_nudg_mod_cas(llm) 287 288 real u_mod_cas(llm),v_mod_cas(llm) 288 real omega_mod_cas(llm) 289 real omega_mod_cas(llm),tke_mod_cas(llm+1) 289 290 real ht_mod_cas(llm),vt_mod_cas(llm),dt_mod_cas(llm),dtrad_mod_cas(llm) 290 291 real hth_mod_cas(llm),vth_mod_cas(llm),dth_mod_cas(llm) -
LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d/1D_interp_cases.h
r3605 r3798 1 1 2 2 print*,'FORCING CASE forcing_case2' 3 3 ! print*, & 4 4 ! & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/pdt_cas=', & … … 13 13 & ,u_cas,v_cas,ug_cas,vg_cas & 14 14 & ,temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas & 15 & ,vitw_cas,omega_cas, du_cas,hu_cas,vu_cas &15 & ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas & 16 16 & ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas & 17 17 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas & 18 & ,uw_cas,vw_cas,q1_cas,q2_cas,tke _cas &18 & ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas & 19 19 ! 20 20 & ,ts_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas & … … 22 22 & ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas & 23 23 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 24 & ,vitw_prof_cas,omega_prof_cas 24 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 25 25 & ,du_prof_cas,hu_prof_cas,vu_prof_cas & 26 26 & ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas,ht_prof_cas,vt_prof_cas & 27 27 & ,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 28 28 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas,lat_prof_cas & 29 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke _prof_cas)30 31 t s_cur= ts_prof_cas29 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tkes_prof_cas) 30 ! EV tg instead of ts_cur 31 tg = ts_prof_cas 32 32 ! psurf=plev_prof_cas(1) 33 33 psurf=ps_prof_cas 34 34 35 35 ! vertical interpolation: 36 CALL interp2_case_vertical_std(play, nlev_cas,plev_prof_cas &36 CALL interp2_case_vertical_std(play,plev,nlev_cas,plev_prof_cas & 37 37 & ,t_prof_cas,theta_prof_cas,thv_prof_cas,thl_prof_cas & 38 38 & ,qv_prof_cas,ql_prof_cas,qi_prof_cas,u_prof_cas,v_prof_cas & 39 39 & ,ug_prof_cas,vg_prof_cas & 40 40 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 41 & ,vitw_prof_cas,omega_prof_cas &41 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 42 42 & ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas & 43 43 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & … … 47 47 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas & 48 48 & ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas & 49 & ,w_mod_cas,omega_mod_cas 49 & ,w_mod_cas,omega_mod_cas,tke_mod_cas & 50 50 & ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas & 51 51 & ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas & … … 109 109 do l = 1, llm 110 110 ! Modif w_mod_cas -> omega_mod_cas (MM+MPL 20170309) 111 print*, l, llm 112 print*, play(l), temp(l) 111 113 omega(l) = -w_mod_cas(l)*play(l)*rg/(rd*temp(l)) 112 114 enddo -
LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d/1D_read_forc_cases.h
r3605 r3798 27 27 & ,u_cas,v_cas,ug_cas,vg_cas & 28 28 & ,temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas & 29 & ,vitw_cas,omega_cas, du_cas,hu_cas,vu_cas &29 & ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas & 30 30 & ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas & 31 31 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas & 32 & ,uw_cas,vw_cas,q1_cas,q2_cas,tke _cas &32 & ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas & 33 33 ! 34 34 & ,ts_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas & … … 36 36 & ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas & 37 37 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 38 & ,vitw_prof_cas,omega_prof_cas 38 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 39 39 & ,du_prof_cas,hu_prof_cas,vu_prof_cas & 40 40 & ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas,ht_prof_cas,vt_prof_cas & 41 41 & ,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 42 42 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas,lat_prof_cas & 43 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke _prof_cas)43 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tkes_prof_cas) 44 44 45 45 do l = 1, nlev_cas … … 49 49 ! vertical interpolation using interpolation routine: 50 50 ! write(*,*)'avant interp vert', t_prof 51 CALL interp2_case_vertical_std(play, nlev_cas,plev_prof_cas &51 CALL interp2_case_vertical_std(play,plev,nlev_cas,plev_prof_cas & 52 52 & ,t_prof_cas,theta_prof_cas,thv_prof_cas,thl_prof_cas & 53 53 & ,qv_prof_cas,ql_prof_cas,qi_prof_cas,u_prof_cas,v_prof_cas & … … 55 55 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 56 56 57 & ,vitw_prof_cas,omega_prof_cas 57 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 58 58 & ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas & 59 59 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & … … 63 63 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas & 64 64 & ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas & 65 & ,w_mod_cas,omega_mod_cas 65 & ,w_mod_cas,omega_mod_cas,tke_mod_cas & 66 66 & ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas & 67 67 & ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas & … … 70 70 71 71 ! initial and boundary conditions : 72 ! 72 ! tsurf = ts_prof_cas 73 73 psurf = ps_prof_cas 74 ts_cur = ts_prof_cas 74 !EV tg instead of ts_cur 75 tg = ts_prof_cas 76 print*, 'tg=', tg 77 75 78 do l = 1, llm 76 79 temp(l) = t_mod_cas(l) … … 95 98 d_u_adv(l) = du_mod_cas(l)+hu_mod_cas(l)+vu_mod_cas(l) 96 99 d_v_adv(l) = dv_mod_cas(l)+hv_mod_cas(l)+vv_mod_cas(l) 100 enddo 97 101 98 ! print*,'d_t_adv ',d_t_adv(1:20)*86400102 ! Etienne pour initialisation de TKE 99 103 100 enddo 104 do l=1,llm+1 105 pbl_tke(:,l,:)=tke_mod_cas(l) 106 enddo 101 107 102 108 ! Faut-il multiplier par -1 ? (MPL 20160713) … … 108 114 IF (ok_prescr_ust) THEN 109 115 ust=ustar_prof_cas 110 print *,'ust=',ust111 116 ENDIF 112 117 118 113 119 endif !forcing_SCM -
LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d/mod_1D_cases_read2.F90
r3605 r3798 316 316 317 317 !********************************************************************************************** 318 SUBROUTINE read_SCM_cas318 SUBROUTINE old_read_SCM_cas 319 319 implicit none 320 320 … … 457 457 458 458 print*,'Allocations OK' 459 call read_SCM (nid,nlev_cas,nt_cas, &459 call old_read_SCM (nid,nlev_cas,nt_cas, & 460 460 & ap_cas,bp_cas,z_cas,plev_cas,zh_cas,plevh_cas,t_cas,th_cas,thv_cas,thl_cas,qv_cas, & 461 461 & ql_cas,qi_cas,rh_cas,rv_cas,u_cas,v_cas,vitw_cas,omega_cas,ug_cas,vg_cas,du_cas,hu_cas,vu_cas, & … … 470 470 471 471 472 END SUBROUTINE read_SCM_cas472 END SUBROUTINE old_read_SCM_cas 473 473 474 474 … … 846 846 847 847 !====================================================================== 848 subroutine read_SCM(nid,nlevel,ntime, &848 subroutine old_read_SCM(nid,nlevel,ntime, & 849 849 & ap,bp,zz,pp,zzh,pph,temp,theta,thv,thl,qv,ql,qi,rh,rv,u,v,vitw,omega,ug,vg,& 850 850 & du,hu,vu,dv,hv,vv,dt,ht,vt,dq,hq,vq, & … … 1073 1073 1074 1074 return 1075 end subroutine read_SCM1075 end subroutine old_read_SCM 1076 1076 !====================================================================== 1077 1077 -
LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90
r3605 r3798 18 18 real, allocatable:: t_cas(:,:),q_cas(:,:),qv_cas(:,:),ql_cas(:,:),qi_cas(:,:),rh_cas(:,:) 19 19 real, allocatable:: th_cas(:,:),thv_cas(:,:),thl_cas(:,:),rv_cas(:,:) 20 real, allocatable:: u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:) 20 real, allocatable:: u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:),tke_cas(:,:) 21 21 22 22 !forcing … … 30 30 real, allocatable:: temp_nudg_cas(:,:),qv_nudg_cas(:,:),u_nudg_cas(:,:),v_nudg_cas(:,:) 31 31 real, allocatable:: lat_cas(:),sens_cas(:),ts_cas(:),ps_cas(:),ustar_cas(:) 32 real, allocatable:: uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tke _cas(:)32 real, allocatable:: uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tkes_cas(:) 33 33 34 34 !champs interpoles … … 48 48 real, allocatable:: vitw_prof_cas(:) 49 49 real, allocatable:: omega_prof_cas(:) 50 real, allocatable:: tke_prof_cas(:) 50 51 real, allocatable:: ug_prof_cas(:) 51 52 real, allocatable:: vg_prof_cas(:) … … 73 74 74 75 75 real lat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tke _prof_cas76 real lat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tkes_prof_cas 76 77 real o3_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,rugos_cas,sand_cas,clay_cas 77 78 … … 92 93 REAL, ALLOCATABLE :: time_val(:) 93 94 94 print*,'ON EST VRAIMENT LA'95 print*,'ON EST VRAIMENT DASN MOD_1D_CASES_READ_STD' 95 96 fich_cas='cas.nc' 96 97 print*,'fich_cas ',fich_cas … … 123 124 ierr=NF_INQ_DIMLEN(nid,rid,nlev_cas) 124 125 print*,'OK3 read2: nid,rid,nlev_cas',nid,rid,nlev_cas 125 IF ( .NOT. ( nlev_cas > 10 .AND. nlev_cas < 1000 )) THEN126 IF ( .NOT. ( nlev_cas > 10 .AND. nlev_cas < 200000 )) THEN 126 127 print*,'Valeur de nlev_cas peu probable' 127 128 STOP … … 168 169 allocate(th_cas(nlev_cas,nt_cas),thl_cas(nlev_cas,nt_cas),thv_cas(nlev_cas,nt_cas),rv_cas(nlev_cas,nt_cas)) 169 170 allocate(u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas),vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas)) 170 171 allocate(tke_cas(nlev_cas,nt_cas)) 171 172 !forcing 172 173 allocate(ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas),dt_cas(nlev_cas,nt_cas),dtrad_cas(nlev_cas,nt_cas)) … … 179 180 allocate(temp_nudg_cas(nlev_cas,nt_cas),qv_nudg_cas(nlev_cas,nt_cas)) 180 181 allocate(u_nudg_cas(nlev_cas,nt_cas),v_nudg_cas(nlev_cas,nt_cas)) 181 allocate(lat_cas(nt_cas),sens_cas(nt_cas),ts_cas(nt_cas),ps_cas(nt_cas),ustar_cas(nt_cas),tke _cas(nt_cas))182 allocate(lat_cas(nt_cas),sens_cas(nt_cas),ts_cas(nt_cas),ps_cas(nt_cas),ustar_cas(nt_cas),tkes_cas(nt_cas)) 182 183 allocate(uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas),q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas)) 183 184 … … 200 201 allocate(vitw_prof_cas(nlev_cas)) 201 202 allocate(omega_prof_cas(nlev_cas)) 203 allocate(tke_prof_cas(nlev_cas)) 202 204 allocate(ug_prof_cas(nlev_cas)) 203 205 allocate(vg_prof_cas(nlev_cas)) … … 228 230 CALL read_SCM (nid,nlev_cas,nt_cas, & 229 231 & ap_cas,bp_cas,z_cas,plev_cas,zh_cas,plevh_cas,t_cas,th_cas,thv_cas,thl_cas,qv_cas, & 230 & ql_cas,qi_cas,rh_cas,rv_cas,u_cas,v_cas,vitw_cas,omega_cas, ug_cas,vg_cas, &232 & ql_cas,qi_cas,rh_cas,rv_cas,u_cas,v_cas,vitw_cas,omega_cas,tke_cas,ug_cas,vg_cas, & 231 233 & temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas, & 232 234 & du_cas,hu_cas,vu_cas, & 233 235 & dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas, & 234 & dr_cas,hr_cas,vr_cas,dtrad_cas,sens_cas,lat_cas,ts_cas,ps_cas,ustar_cas,tke _cas, &236 & dr_cas,hr_cas,vr_cas,dtrad_cas,sens_cas,lat_cas,ts_cas,ps_cas,ustar_cas,tkes_cas, & 235 237 & uw_cas,vw_cas,q1_cas,q2_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough, & 236 238 & o3_cas,rugos_cas,clay_cas,sand_cas) … … 254 256 deallocate(t_cas,q_cas,qv_cas,ql_cas,qi_cas,rh_cas) 255 257 deallocate(th_cas,thl_cas,thv_cas,rv_cas) 256 deallocate(u_cas,v_cas,vitw_cas,omega_cas )258 deallocate(u_cas,v_cas,vitw_cas,omega_cas,tke_cas) 257 259 258 260 !forcing … … 265 267 deallocate(ug_cas) 266 268 deallocate(vg_cas) 267 deallocate(lat_cas,sens_cas,ts_cas,ps_cas,ustar_cas,tke _cas,uw_cas,vw_cas,q1_cas,q2_cas)269 deallocate(lat_cas,sens_cas,ts_cas,ps_cas,ustar_cas,tkes_cas,uw_cas,vw_cas,q1_cas,q2_cas) 268 270 269 271 !champs interpoles … … 283 285 deallocate(vitw_prof_cas) 284 286 deallocate(omega_prof_cas) 287 deallocate(tke_prof_cas) 285 288 deallocate(ug_prof_cas) 286 289 deallocate(vg_prof_cas) … … 312 315 !===================================================================== 313 316 SUBROUTINE read_SCM(nid,nlevel,ntime, & 314 & ap,bp,zz,pp,zzh,pph,temp,theta,thv,thl,qv,ql,qi,rh,rv,u,v,vitw,omega, ug,vg,&317 & ap,bp,zz,pp,zzh,pph,temp,theta,thv,thl,qv,ql,qi,rh,rv,u,v,vitw,omega,tke,ug,vg,& 315 318 & temp_nudg,qv_nudg,u_nudg,v_nudg, & 316 319 & du,hu,vu,dv,hv,vv,dt,ht,vt,dq,hq,vq, & 317 & dth,hth,vth,dr,hr,vr,dtrad,sens,flat,ts,ps,ustar,tke ,uw,vw,q1,q2, &320 & dth,hth,vth,dr,hr,vr,dtrad,sens,flat,ts,ps,ustar,tkes,uw,vw,q1,q2, & 318 321 & orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough, & 319 322 & heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas) … … 334 337 real temp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime) 335 338 real theta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime) 336 real u(nlevel,ntime),v(nlevel,ntime),tke (nlevel,ntime)339 real u(nlevel,ntime),v(nlevel,ntime),tkes(ntime) 337 340 real temp_nudg(nlevel,ntime),qv_nudg(nlevel,ntime),u_nudg(nlevel,ntime),v_nudg(nlevel,ntime) 338 341 real ug(nlevel,ntime),vg(nlevel,ntime) 339 real vitw(nlevel,ntime),omega(nlevel,ntime) 342 real vitw(nlevel,ntime),omega(nlevel,ntime),tke(nlevel,ntime) 340 343 real du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime) 341 344 real dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime) … … 365 368 &'temp','qv','ql','qi','u','v','tke','pressure',& ! #5-#12 366 369 ! coordonnees pression + temps #42 367 &'w','omega','ug','vg','uadv','uadvh','uadvv','vadv','vadvh','vadvv','t adv','tadvh','tadvv',& ! #13 - #25368 &'qv adv','qvadvh','qvadvv','thadv','thadvh','thadvv','thladvh', & ! #26 - #33369 & 'radv','radvh','radvv','radcool','q1','q2','ustress','vstress', & ! #3 4 - #41370 & 'rh','temp_nudg ','qv_nudg','u_nudg','v_nudg',&371 &'height_f','pressure_forc','tempt','theta','thv','thl','qvt','qlt','qit','rv','ut','vt', 'tket',&370 &'w','omega','ug','vg','uadv','uadvh','uadvv','vadv','vadvh','vadvv','temp_adv','tadvh','tadvv',& ! #13 - #25 371 &'qv_adv','qvadvh','qvadvv','thadv','thadvh','thadvv','thladvh', & ! #26 - #32 372 & 'radv','radvh','radvv','radcool','q1','q2','ustress','vstress', & ! #33 - #40 373 & 'rh','temp_nudging','qv_nudging','u_nudging','v_nudging', & ! #41-45 374 &'height_f','pressure_forc','tempt','theta','thv','thl','qvt','qlt','qit','rv','ut','vt', & ! #46-58 372 375 ! coordonnees temps #12 373 &' sfc_sens_flx','sfc_lat_flx','ts','ps','ustar',&376 &'tkes','sfc_sens_flx','sfc_lat_flx','ts','ps','ustar',& 374 377 &'orog','albedo','emiss','t_skin','q_skin','mom_rough','heat_rough',& 375 378 ! scalaires #4 376 379 &'o3','rugos','clay','sand'/ 377 380 378 do i=1,nbvar3d 379 missing_var(i)=0. 380 enddo 381 381 !----------------------------------------------------------------------- 382 ! Checking availability of variable #i in the cas.nc file 383 ! missing_var=1 if the variable is missing 382 384 !----------------------------------------------------------------------- 383 385 384 386 do i=1,nbvar3d 387 missing_var(i)=0. 385 388 ierr=NF_INQ_VARID(nid,name_var(i),var3didin(i)) 386 389 if(ierr/=NF_NOERR) then … … 391 394 392 395 !----------------------------------------------------------------------- 393 ! Activati on de quelques cles en fonction des variables disponibles396 ! Activating keys depending on the presence of specific variables in cas.nc 394 397 !----------------------------------------------------------------------- 395 398 if ( 1 == 1 ) THEN 396 if ( name_var(i) == 'temp_nudg' .and. nint(nudging_t)==0) stop 'Nudging inconsistency temp' 397 if ( name_var(i) == 'qv_nudg' .and. nint(nudging_qv)==0) stop 'Nudging inconsistency qv' 398 if ( name_var(i) == 'u_nudg' .and. nint(nudging_u)==0) stop 'Nudging inconsistency u' 399 if ( name_var(i) == 'v_nudg' .and. nint(nudging_u)==0) stop 'Nudging inconsistency v' 399 ! A MODIFIER: il faudrait dire nudging_temp mais faut le declarer dans compar1d.h etc... 400 ! if ( name_var(i) == 'temp_nudging' .and. nint(nudging_t)==0) stop 'Nudging inconsistency temp' 401 if ( name_var(i) == 'qv_nudging' .and. nint(nudging_qv)==0) stop 'Nudging inconsistency qv' 402 if ( name_var(i) == 'u_nudging' .and. nint(nudging_u)==0) stop 'Nudging inconsistency u' 403 if ( name_var(i) == 'v_nudging' .and. nint(nudging_u)==0) stop 'Nudging inconsistency v' 400 404 ELSE 401 405 print*,'GUIDAGE : CONSISTENCY CHECK DEACTIVATED FOR TESTS of SANDU/REF' … … 403 407 404 408 !----------------------------------------------------------------------- 405 if(i.LE.4) then ! Lecture des coord pression en (nlevelp1,lat,lon) 409 ! Reading variables 1D (N+1) vertical variables (nlevelp1,lat,lon) 410 !----------------------------------------------------------------------- 411 if(i.LE.4) then 406 412 #ifdef NC_DOUBLE 407 413 ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),apbp) … … 414 420 stop "getvarup" 415 421 endif 416 !----------------------------------------------------------------------- 417 else if(i.gt.4.and.i.LE.12) then ! Lecture des variables en (time,nlevel,lat,lon) 422 423 !----------------------------------------------------------------------- 424 ! Reading 1D (N) vertical varialbes (nlevel,lat,lon) 425 !----------------------------------------------------------------------- 426 else if(i.gt.4.and.i.LE.12) then 418 427 #ifdef NC_DOUBLE 419 428 ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),resul1) … … 427 436 endif 428 437 print*,'Lecture de la variable #i ',i,name_var(i),minval(resul1),maxval(resul1) 429 !----------------------------------------------------------------------- 430 else if(i.gt.12.and.i.LE.54) then ! Lecture des variables en (time,nlevel,lat,lon) 438 439 !----------------------------------------------------------------------- 440 ! Reading 2D tim-vertical variables (time,nlevel,lat,lon) 441 ! TBD : seems to be the same as above. 442 !----------------------------------------------------------------------- 443 else if(i.gt.12.and.i.LE.57) then 431 444 #ifdef NC_DOUBLE 432 445 ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),resul) … … 439 452 stop "getvarup" 440 453 endif 441 442 454 print*,'Lecture de la variable #i ',i,name_var(i),minval(resul),maxval(resul) 443 !----------------------------------------------------------------------- 444 else if (i.gt.54.and.i.LE.65) then ! Lecture des variables en (time,lat,lon) 455 456 !----------------------------------------------------------------------- 457 ! Reading 1D time variables (time,lat,lon) 458 !----------------------------------------------------------------------- 459 else if (i.gt.57.and.i.LE.63) then 445 460 #ifdef NC_DOUBLE 446 461 ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),resul2) … … 454 469 endif 455 470 print*,'Lecture de la variable #i ',i,name_var(i),minval(resul2),maxval(resul2) 456 !----------------------------------------------------------------------- 457 else ! Lecture des constantes (lat,lon) 471 472 !----------------------------------------------------------------------- 473 ! Reading scalar variables (lat,lon) 474 !----------------------------------------------------------------------- 475 else 458 476 #ifdef NC_DOUBLE 459 477 ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),resul3) … … 469 487 endif 470 488 endif 489 490 !----------------------------------------------------------------------- 491 ! Attributing variables 471 492 !----------------------------------------------------------------------- 472 493 select case(i) … … 528 549 case(56) ; u=resul 529 550 case(57) ; v=resul 530 case(58) ; tke =resul531 case(59) ; sens=resul2 ! donnees indexees en time551 case(58) ; tkes=resul2 ! donnees indexees en time 552 case(59) ; sens=resul2 532 553 case(60) ; flat=resul2 533 554 case(61) ; ts=resul2 … … 577 598 578 599 !********************************************************************************************** 600 601 !********************************************************************************************** 579 602 SUBROUTINE interp_case_time_std(day,day1,annee_ref & 580 603 ! & ,year_cas,day_cas,nt_cas,pdt_forc,nlev_cas & … … 583 606 & ,qv_cas,ql_cas,qi_cas,u_cas,v_cas & 584 607 & ,ug_cas,vg_cas,temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas & 585 & ,vitw_cas,omega_cas, du_cas,hu_cas,vu_cas &608 & ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas & 586 609 & ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas & 587 610 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas & 588 611 & ,lat_cas,sens_cas,ustar_cas & 589 & ,uw_cas,vw_cas,q1_cas,q2_cas,tke _cas &612 & ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas & 590 613 ! 591 614 & ,ts_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas & … … 593 616 & ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas & 594 617 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 595 & ,vitw_prof_cas,omega_prof_cas, du_prof_cas,hu_prof_cas,vu_prof_cas &618 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas,du_prof_cas,hu_prof_cas,vu_prof_cas & 596 619 & ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas & 597 620 & ,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas & 598 621 & ,hq_prof_cas,vq_prof_cas,dth_prof_cas,hth_prof_cas,vth_prof_cas & 599 622 & ,lat_prof_cas,sens_prof_cas & 600 & ,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke_prof_cas) 601 602 603 implicit none 623 & ,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tkes_prof_cas) 624 625 626 627 628 629 630 implicit none 604 631 605 632 !--------------------------------------------------------------------------------------- … … 621 648 real ts_cas(nt_cas),ps_cas(nt_cas) 622 649 real plev_cas(nlev_cas,nt_cas) 623 real t_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas),thv_cas(nlev_cas,nt_cas),thl_cas(nlev_cas,nt_cas) 650 real t_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas) 651 real thv_cas(nlev_cas,nt_cas), thl_cas(nlev_cas,nt_cas) 624 652 real qv_cas(nlev_cas,nt_cas),ql_cas(nlev_cas,nt_cas),qi_cas(nlev_cas,nt_cas) 625 653 real u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas) … … 628 656 real u_nudg_cas(nlev_cas,nt_cas),v_nudg_cas(nlev_cas,nt_cas) 629 657 630 real vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas) 658 real vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas),tke_cas(nlev_cas,nt_cas) 631 659 real du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas) 632 660 real dv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas) … … 635 663 real dtrad_cas(nlev_cas,nt_cas) 636 664 real dq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas) 637 real lat_cas(nt_cas),sens_cas(nt_cas),tke _cas(nt_cas)665 real lat_cas(nt_cas),sens_cas(nt_cas),tkes_cas(nt_cas) 638 666 real ustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas) 639 667 real q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas) … … 648 676 real u_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas) 649 677 650 real vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas) 678 real vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas),tke_prof_cas(nlev_cas) 651 679 real du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas) 652 680 real dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas) … … 655 683 real dtrad_prof_cas(nlev_cas) 656 684 real dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas) 657 real lat_prof_cas,sens_prof_cas,tke _prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas685 real lat_prof_cas,sens_prof_cas,tkes_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas 658 686 real uw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas) 659 687 ! local: … … 739 767 sens_prof_cas = sens_cas(it_cas2) & 740 768 & -frac*(sens_cas(it_cas2)-sens_cas(it_cas1)) 741 tke _prof_cas = tke_cas(it_cas2) &742 & -frac*(tke _cas(it_cas2)-tke_cas(it_cas1))769 tkes_prof_cas = tkes_cas(it_cas2) & 770 & -frac*(tkes_cas(it_cas2)-tkes_cas(it_cas1)) 743 771 ts_prof_cas = ts_cas(it_cas2) & 744 772 & -frac*(ts_cas(it_cas2)-ts_cas(it_cas1)) … … 786 814 omega_prof_cas(k) = omega_cas(k,it_cas2) & 787 815 & -frac*(omega_cas(k,it_cas2)-omega_cas(k,it_cas1)) 816 tke_prof_cas(k) = tke_cas(k,it_cas2) & 817 & -frac*(tke_cas(k,it_cas2)-tke_cas(k,it_cas1)) 788 818 du_prof_cas(k) = du_cas(k,it_cas2) & 789 819 & -frac*(du_cas(k,it_cas2)-du_cas(k,it_cas1)) … … 833 863 !********************************************************************************************** 834 864 !===================================================================== 835 SUBROUTINE interp2_case_vertical_std(play, nlev_cas,plev_prof_cas&865 SUBROUTINE interp2_case_vertical_std(play,plev,nlev_cas,plev_prof_cas & 836 866 & ,t_prof_cas,th_prof_cas,thv_prof_cas,thl_prof_cas & 837 867 & ,qv_prof_cas,ql_prof_cas,qi_prof_cas,u_prof_cas,v_prof_cas & 838 868 & ,ug_prof_cas,vg_prof_cas & 839 869 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 840 & ,vitw_prof_cas,omega_prof_cas 870 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 841 871 & ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas & 842 872 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & … … 847 877 & ,ug_mod_cas,vg_mod_cas & 848 878 & ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas & 849 & ,w_mod_cas,omega_mod_cas 879 & ,w_mod_cas,omega_mod_cas,tke_mod_cas & 850 880 & ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas & 851 881 & ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas & … … 870 900 ! real hq_prof(nlevmax),vq_prof(nlevmax) 871 901 872 real play(llm), plev _prof_cas(nlev_cas)902 real play(llm), plev(llm+1), plev_prof_cas(nlev_cas) 873 903 real t_prof_cas(nlev_cas),th_prof_cas(nlev_cas),thv_prof_cas(nlev_cas),thl_prof_cas(nlev_cas) 874 904 real qv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas) 875 905 real u_prof_cas(nlev_cas),v_prof_cas(nlev_cas) 876 real ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas) 906 real ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas),tke_prof_cas(nlev_cas) 877 907 real temp_nudg_prof_cas(nlev_cas),qv_nudg_prof_cas(nlev_cas) 878 908 real u_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas) … … 887 917 real qv_mod_cas(llm),ql_mod_cas(llm),qi_mod_cas(llm) 888 918 real u_mod_cas(llm),v_mod_cas(llm) 889 real ug_mod_cas(llm),vg_mod_cas(llm), w_mod_cas(llm),omega_mod_cas(llm) 919 real ug_mod_cas(llm),vg_mod_cas(llm), w_mod_cas(llm),omega_mod_cas(llm),tke_mod_cas(llm+1) 890 920 real temp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm) 891 921 real u_nudg_mod_cas(llm),v_nudg_mod_cas(llm) … … 899 929 real frac,frac1,frac2,fact 900 930 901 ! do l = 1, llm 902 ! print *,'debut interp2, play=',l,play(l) 903 ! enddo 904 ! do l = 1, nlev_cas 905 ! print *,'debut interp2, plev_prof_cas=',l,play(l),plev_prof_cas(l) 906 ! enddo 931 932 933 ! for variables defined at the middle of layers 907 934 908 935 do l = 1, llm … … 932 959 endif 933 960 961 962 934 963 frac = (plev_prof_cas(k2)-play(l))/(plev_prof_cas(k2)-plev_prof_cas(k1)) 964 935 965 t_mod_cas(l)= t_prof_cas(k2) - frac*(t_prof_cas(k2)-t_prof_cas(k1)) 936 966 theta_mod_cas(l)= th_prof_cas(k2) - frac*(th_prof_cas(k2)-th_prof_cas(k1)) … … 1029 1059 ug_mod_cas(l)= ug_prof_cas(nlev_cas) !jyg 1030 1060 vg_mod_cas(l)= vg_prof_cas(nlev_cas) !jyg 1031 temp_nudg_mod_cas(l)= temp_nudg_prof_cas(nlev_cas) 1032 qv_nudg_mod_cas(l)= qv_nudg_prof_cas(nlev_cas) 1033 u_nudg_mod_cas(l)= u_nudg_prof_cas(nlev_cas) 1034 v_nudg_mod_cas(l)= v_nudg_prof_cas(nlev_cas) 1061 temp_nudg_mod_cas(l)= temp_nudg_prof_cas(nlev_cas) !jyg 1062 qv_nudg_mod_cas(l)= qv_nudg_prof_cas(nlev_cas) !jyg 1063 u_nudg_mod_cas(l)= u_nudg_prof_cas(nlev_cas) !jyg 1064 v_nudg_mod_cas(l)= v_nudg_prof_cas(nlev_cas) !jyg 1035 1065 thv_mod_cas(l)= thv_prof_cas(nlev_cas) !jyg 1036 1066 w_mod_cas(l)= 0.0 !jyg … … 1057 1087 enddo ! l 1058 1088 1089 ! for variables defined at layer interfaces (EV): 1090 1091 1092 do l = 1, llm+1 1093 1094 if (plev(l).ge.plev_prof_cas(nlev_cas)) then 1095 1096 mxcalc=l 1097 k1=0 1098 k2=0 1099 1100 if (plev(l).le.plev_prof_cas(1)) then 1101 1102 do k = 1, nlev_cas-1 1103 if (plev(l).le.plev_prof_cas(k).and. plev(l).gt.plev_prof_cas(k+1)) then 1104 k1=k 1105 k2=k+1 1106 endif 1107 enddo 1108 1109 if (k1.eq.0 .or. k2.eq.0) then 1110 write(*,*) 'PB! k1, k2 = ',k1,k2 1111 write(*,*) 'l,plev(l) = ',l,plev(l)/100 1112 do k = 1, nlev_cas-1 1113 write(*,*) 'k,plev_prof_cas(k) = ',k,plev_prof_cas(k)/100 1114 enddo 1115 endif 1116 1117 frac = (plev_prof_cas(k2)-plev(l))/(plev_prof_cas(k2)-plev_prof_cas(k1)) 1118 tke_mod_cas(l)= tke_prof_cas(k2) - frac*(tke_prof_cas(k2)-tke_prof_cas(k1)) 1119 else !play>plev_prof_cas(1) 1120 k1=1 1121 k2=2 1122 tke_mod_cas(l)= frac1*tke_prof_cas(k1) - frac2*tke_prof_cas(k2) 1123 1124 endif ! plev.le.plev_prof_cas(1) 1125 1126 else ! above max altitude of forcing file 1127 1128 tke_mod_cas(l)=0.0 1129 1130 endif ! plev 1131 1132 enddo ! l 1133 1134 1135 1059 1136 return 1060 end 1137 end SUBROUTINE interp2_case_vertical_std 1061 1138 !***************************************************************************** 1062 1139 -
LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d/old_1D_decl_cases.h
r3605 r3798 37 37 real th_mod(llm) 38 38 39 real ts_cur40 common /sst_forcing/ts_cur ! also in read_tsurf1d.F39 !real ts_cur 40 !common /sst_forcing/ts_cur ! also in read_tsurf1d.F 41 41 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 42 42 ! Declarations specifiques au cas RICO -
LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d/old_1D_interp_cases.h
r3605 r3798 62 62 & ,ts_prof,plev_prof,t_prof,q_prof,u_prof,v_prof,w_prof & 63 63 & ,ht_prof,vt_prof,hq_prof,vq_prof) 64 65 if (type_ts_forcing.eq.1) t s_cur = ts_prof ! SST used in read_tsurf1d64 ! EV: tg instead of ts_cur 65 if (type_ts_forcing.eq.1) tg = ts_prof ! 66 66 67 67 ! vertical interpolation: … … 113 113 ! print *,'llm l omega_profd',llm,l,omega_profd(l) 114 114 ! enddo 115 116 if (type_ts_forcing.eq.1) t s_cur = tg_prof ! SST used in read_tsurf1d115 ! EV tg instead of ts_cur 116 if (type_ts_forcing.eq.1) tg = tg_prof ! SST used 117 117 118 118 ! vertical interpolation: … … 206 206 & ,ug_gabls4,vg_gabls4,ht_gabls4,hq_gabls4,tg_gabls4 & 207 207 & ,ug_profg,vg_profg,ht_profg,hq_profg,tg_profg) 208 209 if (type_ts_forcing.eq.1) t s_cur = tg_prof ! SST used in read_tsurf1d208 !EV tg instead of ts_cur 209 if (type_ts_forcing.eq.1) tg = tg_prof ! SST used 210 210 211 211 ! vertical interpolation: … … 499 499 & ,nlev_sandu & 500 500 & ,ts_sandu,ts_prof) 501 502 if (type_ts_forcing.eq.1) t s_cur= ts_prof ! SST used in read_tsurf1d501 ! EV tg instead of ts_cur 502 if (type_ts_forcing.eq.1) tg = ts_prof ! SST used in read_tsurf1d 503 503 504 504 ! vertical interpolation: … … 582 582 & ,ufa_astex,vfa_astex,div_prof,ts_prof,ug_prof,vg_prof & 583 583 & ,ufa_prof,vfa_prof) 584 585 if (type_ts_forcing.eq.1) ts_cur = ts_prof ! SST used in read_tsurf1d 586 584 ! EV tg instead of ts_cur 585 if (type_ts_forcing.eq.1) tg = ts_prof ! SST used 587 586 ! vertical interpolation: 588 587 CALL interp_astex_vertical(play,nlev_astex,plev_profa & … … 675 674 & ,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas,lat_prof_cas & 676 675 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas) 677 678 ts_cur = ts_prof_cas 676 ! EV tg instead of ts_cur 677 678 tg = ts_prof_cas 679 679 psurf=plev_prof_cas(1) 680 680 … … 850 850 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas,lat_prof_cas & 851 851 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke_prof_cas) 852 853 ts_cur = ts_prof_cas 852 ! EV tg instead of ts_cur 853 854 tg = ts_prof_cas 854 855 ! psurf=plev_prof_cas(1) 855 856 psurf=ps_prof_cas -
LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d/old_1D_read_forc_cases.h
r3605 r3798 875 875 876 876 ! initial and boundary conditions : 877 ! tsurf = ts_prof_cas 878 ts_cur = ts_prof_cas 877 ! tsurf = ts_prof_cas 878 ! EV tg instead of ts_cur 879 tg= ts_prof_cas 879 880 psurf=plev_prof_cas(1) 880 881 write(*,*) 'SST initiale: ',tsurf … … 965 966 ! initial and boundary conditions : 966 967 ! tsurf = ts_prof_cas 967 ts_cur = ts_prof_cas 968 ! EV tg instead of ts_cur 969 tg = ts_prof_cas 968 970 psurf=plev_prof_cas(1) 969 971 write(*,*) 'SST initiale: ',tsurf … … 1015 1017 if (forcing_SCM) then 1016 1018 1017 write(*,*),'avant call read_SCM'1018 call read_SCM_cas1019 write(*,*),'avant call old_read_SCM_cas' 1020 call old_read_SCM_cas 1019 1021 write(*,*) 'Forcing read' 1020 1022 … … 1063 1065 ! initial and boundary conditions : 1064 1066 ! tsurf = ts_prof_cas 1065 ts_cur = ts_prof_cas 1067 ! EV tg instead of ts_cur 1068 1069 tg = ts_prof_cas 1066 1070 psurf=plev_prof_cas(1) 1067 1071 write(*,*) 'SST initiale: ',tsurf -
LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d/old_lmdz1d.F90
r3605 r3798 632 632 ! (phys_state_var_init is called again in physiq) 633 633 read_climoz = 0 634 ! 634 nsw=6 ! EV et LF: sinon, falb_dir et falb_dif ne peuvent etre alloues 635 636 635 637 call phys_state_var_init(read_climoz) 636 638 … … 728 730 729 731 !Al1 pour SST forced, appell?? depuis ocean_forced_noice 730 ts_cur = tsurf ! SST used in read_tsurf1d 732 ! EV tg instead of ts_cur 733 734 tg = tsurf ! SST used in read_tsurf1d 731 735 !===================================================================== 732 736 ! Initialisation de la physique : … … 791 795 792 796 fder=0. 797 print *, 'snsrf', snsrf 793 798 snsrf(1,:)=snowmass ! masse de neige des sous surface 794 799 qsurfsrf(1,:)=qsurf ! humidite de l'air des sous surface … … 841 846 end if 842 847 843 844 848 print*,'nat_surf,pctsrf(1,is_oce),pctsrf(1,is_ter)',nat_surf & 845 849 & ,pctsrf(1,is_oce),pctsrf(1,is_ter) … … 848 852 zpic = zpicinp 849 853 ftsol=tsurf 850 nsw=6 ! on met le nb de bandes SW=6, pour initialiser851 ! 6 albedo, mais on peut quand meme tourner avec852 ! moins. Seules les 2 ou 4 premiers seront lus853 854 falb_dir=albedo 854 855 falb_dif=albedo … … 913 914 v_ancien(1,:)=v(:) 914 915 915 u10m=0.916 v10m=0.917 ale_wake=0.918 ale_bl_stat=0.916 u10m=0. 917 v10m=0. 918 ale_wake=0. 919 ale_bl_stat=0. 919 920 920 921 !------------------------------------------------------------------------ -
LMDZ6/branches/Ocean_skin/libf/phylmd/dyn1d/scm.F90
r3605 r3798 75 75 real :: zcufi = 1. 76 76 real :: zcvfi = 1. 77 78 !- real :: nat_surf79 !- logical :: ok_flux_surf80 !- real :: fsens81 !- real :: flat82 !- real :: tsurf83 !- real :: rugos84 !- real :: qsol(1:2)85 !- real :: qsurf86 !- real :: psurf87 !- real :: zsurf88 !- real :: albedo89 !-90 !- real :: time = 0.91 !- real :: time_ini92 !- real :: xlat93 !- real :: xlon94 !- real :: wtsurf95 !- real :: wqsurf96 !- real :: restart_runoff97 !- real :: xagesno98 !- real :: qsolinp99 !- real :: zpicinp100 !-101 77 real :: fnday 102 78 real :: day, daytime … … 141 117 logical :: forcing_case2 = .false. 142 118 logical :: forcing_SCM = .false. 143 integer :: type_ts_forcing ! 0 = SST constant; 1 = SST read from a file144 ! (cf read_tsurf1d.F)145 119 146 120 !flag forcings … … 148 122 logical :: nudge_thermo=.false. 149 123 logical :: cptadvw=.true. 124 125 150 126 !===================================================================== 151 127 ! DECLARATIONS FOR EACH CASE … … 190 166 real :: dt_cooling(llm),d_t_adv(llm),d_t_nudge(llm) 191 167 real :: d_u_nudge(llm),d_v_nudge(llm) 192 real :: du_adv(llm),dv_adv(llm)193 real :: d u_age(llm),dv_age(llm)168 ! real :: d_u_adv(llm),d_v_adv(llm) 169 real :: d_u_age(llm),d_v_age(llm) 194 170 real :: alpha 195 171 real :: ttt … … 248 224 ! 249 225 integer :: it_end ! iteration number of the last call 250 !Al1 226 !Al1,plev,play,phi,phis,presnivs, 251 227 integer ecrit_slab_oc !1=ecrit,-1=lit,0=no file 252 228 data ecrit_slab_oc/-1/ … … 273 249 d_u_nudge(:)=0. 274 250 d_v_nudge(:)=0. 275 du_adv(:)=0. 276 dv_adv(:)=0. 277 du_age(:)=0. 278 dv_age(:)=0. 251 d_u_adv(:)=0. 252 d_v_adv(:)=0. 253 d_u_age(:)=0. 254 d_v_age(:)=0. 255 279 256 280 257 ! Initialization of Common turb_forcing … … 290 267 ! OPTIONS OF THE 1D SIMULATION (lmdz1d.def => unicol.def) 291 268 !--------------------------------------------------------------------- 292 !Al1293 269 call conf_unicol 294 270 !Al1 moves this gcssold var from common fcg_gcssold to … … 296 272 ! -------------------------------------------------------------------- 297 273 close(1) 298 !Al1299 274 write(*,*) 'lmdz1d.def lu => unicol.def' 300 275 … … 302 277 year_ini_cas=1997 303 278 ! It is possible that those parameters are run twice. 304 305 279 ! A REVOIR : LIRE PEUT ETRE AN MOIS JOUR DIRECETEMENT 280 281 306 282 call getin('anneeref',year_ini_cas) 307 283 call getin('dayref',day_deb) … … 309 285 call getin('time_ini',heure_ini_cas) 310 286 311 type_ts_forcing = 0 312 IF (nat_surf==0) type_ts_forcing=1 ! SST forcee sur OCEAN 313 print*,'NATURE DE LA SURFACE ',nat_surf 287 print*,'NATURE DE LA SURFACE ',nat_surf 314 288 ! 315 289 ! Initialization of the logical switch for nudging 290 316 291 jcode = iflag_nudge 317 292 do i = 1,nudge_max … … 319 294 jcode = jcode/10 320 295 enddo 321 !--------------------------------------------------------------------- 296 !----------------------------------------------------------------------- 322 297 ! Definition of the run 323 !--------------------------------------------------------------------- 298 !----------------------------------------------------------------------- 324 299 325 300 call conf_gcm( 99, .TRUE. ) … … 343 318 allocate( phy_flic(year_len)) ! Fraction de glace 344 319 phy_flic(:)=0.0 320 321 345 322 !----------------------------------------------------------------------- 346 323 ! Choix du calendrier … … 373 350 ! Le numero du jour est dans "day". L heure est traitee separement. 374 351 ! La date complete est dans "daytime" (l'unite est le jour). 352 353 375 354 if (nday>0) then 376 355 fnday=nday … … 409 388 ! Initialization of dimensions, geometry and initial state 410 389 !--------------------------------------------------------------------- 411 ! 390 ! call init_phys_lmdz(1,1,llm,1,(/1/)) ! job now done via iniphysiq 412 391 ! but we still need to initialize dimphy module (klon,klev,etc.) here. 413 392 call init_dimphy1D(1,llm) … … 433 412 ! (phys_state_var_init is called again in physiq) 434 413 read_climoz = 0 435 ! 414 nsw=6 415 436 416 call phys_state_var_init(read_climoz) 437 417 … … 446 426 !!! Feedback forcing values for Gateaux differentiation (al1) 447 427 !!!===================================================================== 448 !!! Surface Planck forcing bracketing call radiation449 !! surf_Planck = 0.450 !! surf_Conv = 0.451 !! write(*,*) 'Gateaux-dif Planck,Conv:',surf_Planck,surf_Conv452 !!! a mettre dans le lmdz1d.def ou autre453 !!454 428 !! 455 429 qsol = qsolinp … … 469 443 ENDIF 470 444 print*,'Flux sol ',fsens,flat 471 !! ok_flux_surf=.false.472 !! fsens=-wtsurf*rcpd*rho(1)473 !! flat=-wqsurf*rlvtt*rho(1)474 !!!!475 445 476 446 ! Vertical discretization and pressure levels at half and mid levels: … … 496 466 plev =ap+bp*psurf 497 467 play = 0.5*(plev(1:llm)+plev(2:llm+1)) 498 zlay=-rd*300.*log(play/psurf)/rg ! moved after reading profiles 468 zlay=-rd*300.*log(play/psurf)/rg ! moved after reading profiles. 499 469 500 470 IF (forcing_type .eq. 59) THEN … … 527 497 print*,'mxcalc=',mxcalc 528 498 ! print*,'zlay=',zlay(mxcalc) 529 print*,'play=',play(mxcalc) 530 531 !Al1 pour SST forced, appell?? depuis ocean_forced_noice 532 ts_cur = tsurf ! SST used in read_tsurf1d 499 ! print*,'play=',play(mxcalc) 500 501 !! When surface temperature is forced 502 tg= tsurf ! surface T used in read_tsurf1d 503 504 533 505 !===================================================================== 534 506 ! Initialisation de la physique : … … 546 518 ! airefi,zcufi,zcvfi initialises au debut de ce programme 547 519 ! rday,ra,rg,rd,rcpd declares dans YOMCST.h et calcules dans suphel.F 520 521 548 522 day_step = float(nsplit_phys)*day_step/float(iphysiq) 549 523 write (*,*) 'Time step divided by nsplit_phys (=',nsplit_phys,')' … … 563 537 ! e.g. for cell boundaries, which are meaningless in 1D; so pad these 564 538 ! with '0.' when necessary 539 565 540 call iniphysiq(iim,jjm,llm, & 566 541 1,comm_lmdz, & … … 650 625 zpic = zpicinp 651 626 ftsol=tsurf 652 nsw=6 ! on met le nb de bandes SW=6, pour initialiser653 ! 6 albedo, mais on peut quand meme tourner avec654 ! moins. Seules les 2 ou 4 premiers seront lus655 627 falb_dir=albedo 656 628 falb_dif=albedo … … 664 636 prw_ancien = 0. 665 637 !jyg< 666 !! pbl_tke(:,:,:)=1.e-8 667 pbl_tke(:,:,:)=0. 668 pbl_tke(:,2,:)=1.e-2 669 PRINT *, ' pbl_tke dans lmdz1d ' 670 if (prt_level .ge. 5) then 671 DO nsrf = 1,4 672 PRINT *,'pbl_tke(1,:,',nsrf,') ',pbl_tke(1,:,nsrf) 673 ENDDO 674 end if 675 638 ! Etienne: comment those lines since now the TKE is inialized in 1D_read_forc_cases 639 !! pbl_tke(:,:,:)=1.e-8 640 ! pbl_tke(:,:,:)=0. 641 ! pbl_tke(:,2,:)=1.e-2 676 642 !>jyg 677 678 643 rain_fall=0. 679 644 snow_fall=0. … … 715 680 v_ancien(1,:)=v(:) 716 681 717 u10m=0.718 v10m=0.719 ale_wake=0.720 ale_bl_stat=0.682 u10m=0. 683 v10m=0. 684 ale_wake=0. 685 ale_bl_stat=0. 721 686 722 687 !------------------------------------------------------------------------ … … 738 703 ! to be set at some arbitratry convenient values. 739 704 !------------------------------------------------------------------------ 740 !Al1 =============== restart option ========================== 705 !Al1 =============== restart option ====================================== 741 706 if (.not.restart) then 742 707 iflag_pbl = 5 … … 803 768 print*,'plev,play,phi,phis,presnivs,u,v,temp,q,omega2' 804 769 print*,'temp(1),q(1,1),u(1),v(1),plev(1),phis :' 805 print*,temp(1),q(1,1),u(1),v(1),plev(1),phis 770 print*,temp(1),q(1,1),u(1),v(1),plev(1),phis(1) 806 771 ! raz for safety 807 772 do l=1,llm … … 809 774 enddo 810 775 endif 811 ! Al1================ end restart =================================776 !====================== end restart ================================= 812 777 IF (ecrit_slab_oc.eq.1) then 813 778 open(97,file='div_slab.dat',STATUS='UNKNOWN') … … 820 785 CALL iophys_ini 821 786 #endif 787 788 !===================================================================== 822 789 ! START OF THE TEMPORAL LOOP : 823 790 !===================================================================== 824 791 825 792 it_end = nint(fnday*day_step) 826 !test JLD it_end = 10827 793 do while(it.le.it_end) 828 794 … … 832 798 print*,'PAS DE TEMPS ',timestep 833 799 endif 834 !Al1 demande de restartphy.nc835 800 if (it.eq.it_end) lastcall=.True. 836 801 … … 840 805 841 806 #include "1D_interp_cases.h" 842 ! Vertical advection843 ! call lstendH(llm,nqtot,omega,d_t_vert_adv,d_q_vert_adv,q,temp,u,v,play)844 ! print*,'B d_t_adv ',d_t_adv(1:20)*86400845 ! print*,'B d_t_vert_adv ',d_t_vert_adv(1:20)*86400846 ! print*,'B dt omega ',omega847 807 848 808 !--------------------------------------------------------------------- 849 809 ! Geopotential : 850 810 !--------------------------------------------------------------------- 851 811 ! phis(1)=zsurf*RG 812 ! phi(1)=phis(1)+RD*temp(1)*(plev(1)-play(1))/(.5*(plev(1)+play(1))) 852 813 phi(1)=RD*temp(1)*(plev(1)-play(1))/(.5*(plev(1)+play(1))) 814 853 815 do l = 1, llm-1 854 816 phi(l+1)=phi(l)+RD*(temp(l)+temp(l+1))* & 855 817 & (play(l)-play(l+1))/(play(l)+play(l+1)) 856 818 enddo 819 857 820 858 821 !--------------------------------------------------------------------- … … 872 835 teta=temp*(pzero/play)**rkappa 873 836 do l=2,llm-1 837 ! vertical tendencies computed as d X / d t = -W d X / d z 874 838 d_u_vert_adv(l)=-w_adv(l)*(u(l+1)-u(l-1))/(z_adv(l+1)-z_adv(l-1)) 875 839 d_v_vert_adv(l)=-w_adv(l)*(v(l+1)-v(l-1))/(z_adv(l+1)-z_adv(l-1)) 876 d_t_vert_adv(l)=-(w_adv(l)*(teta(l+1)-teta(l-1))/(z_adv(l+1)-z_adv(l-1)))/(pzero/play(l))**rkappa 840 ! d theta / dt = -W d theta / d z, transformed into d temp / d t dividing by (pzero/play(l))**rkappa 841 d_t_vert_adv(l)=-w_adv(l)*(teta(l+1)-teta(l-1))/(z_adv(l+1)-z_adv(l-1)) / (pzero/play(l))**rkappa 877 842 d_q_vert_adv(l,1)=-w_adv(l)*(q(l+1,1)-q(l-1,1))/(z_adv(l+1)-z_adv(l-1)) 878 843 enddo 844 d_u_adv(:)=d_u_adv(:)+d_u_vert_adv(:) 845 d_v_adv(:)=d_v_adv(:)+d_v_vert_adv(:) 879 846 d_t_adv(:)=d_t_adv(:)+d_t_vert_adv(:) 880 847 d_q_adv(:,1)=d_q_adv(:,1)+d_q_vert_adv(:,1) … … 938 905 fcoriolis=2.*sin(rpi*xlat/180.)*romega 939 906 940 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!941 !! CONSERVE EN ATTENDANT QUE LE CAS EN QUESTION FONCTIONNE EN STD !!942 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!943 ! if (forcing_radconv .or. forcing_fire) then944 ! fcoriolis=0.0945 ! dt_cooling=0.0946 ! d_t_adv=0.0947 ! d_q_adv=0.0948 ! endif949 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!950 951 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!952 !! CONSERVE EN ATTENDANT QUE LE CAS EN QUESTION FONCTIONNE EN STD !!953 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!954 ! if (forcing_toga .or. forcing_GCSSold .or. forcing_twpice &955 ! & .or.forcing_amma .or. forcing_type.eq.101) then956 ! fcoriolis=0.0 ; ug=0. ; vg=0.957 ! endif958 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!959 960 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!961 !! CONSERVE EN ATTENDANT QUE LE CAS EN QUESTION FONCTIONNE EN STD !!962 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!963 ! if(forcing_rico) then964 ! dt_cooling=0.965 ! endif966 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!967 968 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!969 !! CONSERVE EN ATTENDANT QUE LE CAS EN QUESTION FONCTIONNE EN STD !!970 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!971 !CRio:Attention modif sp??cifique cas de Caroline972 ! if (forcing_type==-1) then973 ! fcoriolis=0.974 !975 !on calcule dt_cooling976 ! do l=1,llm977 ! if (play(l).ge.20000.) then978 ! dt_cooling(l)=-1.5/86400.979 ! elseif ((play(l).ge.10000.).and.((play(l).lt.20000.))) then980 ! dt_cooling(l)=-1.5/86400.*(play(l)-10000.)/(10000.)-1./86400.*(20000.-play(l))/10000.*(temp(l)-200.)981 ! else982 ! dt_cooling(l)=-1.*(temp(l)-200.)/86400.983 ! endif984 ! enddo985 !986 ! endif987 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!988 989 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!990 !! CONSERVE EN ATTENDANT QUE LE CAS EN QUESTION FONCTIONNE EN STD !!991 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!992 ! if (forcing_sandu) then993 ! ug(1:llm)=u_mod(1:llm)994 ! vg(1:llm)=v_mod(1:llm)995 ! endif996 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!997 998 907 IF (prt_level >= 5) print*, 'fcoriolis, xlat,mxcalc ', & 999 908 fcoriolis, xlat,mxcalc 1000 909 1001 ! print *,'u-ug=',u-ug1002 1003 ! !!!!!!!!!!!!!!!!!!!!!!!1004 ! Geostrophic wind 1005 ! Le calcul ci dessous est insuffisamment precis 1006 ! du_age(1:mxcalc)=fcoriolis*(v(1:mxcalc)-vg(1:mxcalc)) 1007 ! dv_age(1:mxcalc)=-fcoriolis*(u(1:mxcalc)-ug(1:mxcalc)) 1008 !!!!!!!!!!!!!!!!!!!!!!!! 910 !--------------------------------------------------------------------- 911 ! Geostrophic forcing 912 !--------------------------------------------------------------------- 913 914 IF ( forc_geo == 0 ) THEN 915 d_u_age(1:mxcalc)=0. 916 d_v_age(1:mxcalc)=0. 917 ELSE 1009 918 sfdt = sin(0.5*fcoriolis*timestep) 1010 919 cfdt = cos(0.5*fcoriolis*timestep) 1011 ! print *,'fcoriolis,sfdt,cfdt,timestep',fcoriolis,sfdt,cfdt,timestep 1012 ! 1013 du_age(1:mxcalc)= -2.*sfdt/timestep* & 920 921 d_u_age(1:mxcalc)= -2.*sfdt/timestep* & 1014 922 & (sfdt*(u(1:mxcalc)-ug(1:mxcalc)) - & 1015 923 & cfdt*(v(1:mxcalc)-vg(1:mxcalc)) ) 1016 924 !! : fcoriolis*(v(1:mxcalc)-vg(1:mxcalc)) 1017 925 ! 1018 d v_age(1:mxcalc)= -2.*sfdt/timestep* &926 d_v_age(1:mxcalc)= -2.*sfdt/timestep* & 1019 927 & (cfdt*(u(1:mxcalc)-ug(1:mxcalc)) + & 1020 928 & sfdt*(v(1:mxcalc)-vg(1:mxcalc)) ) 1021 929 !! : -fcoriolis*(u(1:mxcalc)-ug(1:mxcalc)) 1022 ! 1023 !!!!!!!!!!!!!!!!!!!!!!!! 930 ENDIF 931 ! 932 !--------------------------------------------------------------------- 1024 933 ! Nudging 1025 ! !!!!!!!!!!!!!!!!!!!!!!!934 !--------------------------------------------------------------------- 1026 935 d_t_nudge(:) = 0. 1027 936 d_u_nudge(:) = 0. … … 1039 948 ENDDO 1040 949 950 !--------------------------------------------------------------------- 951 ! Optional outputs 952 !--------------------------------------------------------------------- 1041 953 #ifdef OUTPUT_PHYS_SCM 1042 954 CALL iophys_ecrit('w_adv',klev,'w_adv','K/day',w_adv) … … 1056 968 #endif 1057 969 1058 !1059 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1060 !! CONSERVE EN ATTENDANT QUE LE CAS EN QUESTION FONCTIONNE EN STD !!1061 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1062 ! if (forcing_fire) THEN1063 ! print*,'Enlever cette section rapidement'1064 ! stop1065 !1066 !1067 !!let ww=if ( alt le 1100 ) then alt*-0.00001 else 01068 !!let wt=if ( alt le 1100 ) then min( -3.75e-5 , -7.5e-8*alt) else 01069 !!let wq=if ( alt le 1100 ) then max( 1.5e-8 , 3e-11*alt) else 01070 ! d_t_adv=0.1071 ! d_q_adv=0.1072 ! teta=temp*(pzero/play)**rkappa1073 ! d_t_adv=0.1074 ! d_q_adv=0.1075 ! do l=2,llm-11076 ! if (zlay(l)<=1100) then1077 ! wwww=-0.00001*zlay(l)1078 ! d_t_adv(l)=-wwww*(teta(l)-teta(l+1))/(zlay(l)-zlay(l+1)) /(pzero/play(l))**rkappa1079 ! d_q_adv(l,1:2)=-wwww*(q(l,1:2)-q(l+1,1:2))/(zlay(l)-zlay(l+1))1080 ! d_t_adv(l)=d_t_adv(l)+min(-3.75e-5 , -7.5e-8*zlay(l))1081 ! d_q_adv(l,1)=d_q_adv(l,1)+max( 1.5e-8 , 3e-11*zlay(l))1082 ! endif1083 ! enddo1084 !1085 ! endif1086 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1087 1088 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1089 ! call writefield_phy('dv_age' ,dv_age,llm)1090 ! call writefield_phy('du_age' ,du_age,llm)1091 ! call writefield_phy('du_phys' ,du_phys,llm)1092 ! call writefield_phy('u_tend' ,u,llm)1093 ! call writefield_phy('u_g' ,ug,llm)1094 !1095 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!1096 !! Increment state variables1097 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!1098 970 IF (flag_inhib_forcing == 0) then ! if tendency of forcings should be added 1099 971 1100 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1101 !! CONSERVE EN ATTENDANT QUE LE CAS EN QUESTION FONCTIONNE EN STD !!1102 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1103 ! pour les cas sandu et astex, on reclacule u,v,q,temp et teta dans 1D_nudge_sandu_astex.h1104 ! au dessus de 700hpa, on relaxe vers les profils initiaux1105 ! if (forcing_sandu .OR. forcing_astex) then1106 !#include "1D_nudge_sandu_astex.h"1107 ! else1108 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1109 972 u(1:mxcalc)=u(1:mxcalc) + timestep*( & 1110 973 & du_phys(1:mxcalc) & 1111 & +d u_age(1:mxcalc)+du_adv(1:mxcalc) &974 & +d_u_age(1:mxcalc)+d_u_adv(1:mxcalc) & 1112 975 & +d_u_nudge(1:mxcalc) ) 1113 976 v(1:mxcalc)=v(1:mxcalc) + timestep*( & 1114 977 & dv_phys(1:mxcalc) & 1115 & +d v_age(1:mxcalc)+dv_adv(1:mxcalc) &978 & +d_v_age(1:mxcalc)+d_v_adv(1:mxcalc) & 1116 979 & +d_v_nudge(1:mxcalc) ) 1117 980 q(1:mxcalc,:)=q(1:mxcalc,:)+timestep*( & … … 1125 988 & temp(1),dt_phys(1),d_t_adv(1),dt_cooling(1) 1126 989 print* ,'dv_phys=',dv_phys 1127 print* ,'d v_age=',dv_age1128 print* ,'d v_adv=',dv_adv990 print* ,'d_v_age=',d_v_age 991 print* ,'d_v_adv=',d_v_adv 1129 992 print* ,'d_v_nudge=',d_v_nudge 1130 993 print*, v … … 1134 997 temp(1:mxcalc)=temp(1:mxcalc)+timestep*( & 1135 998 & dt_phys(1:mxcalc) & 1136 & +d_t_adv(1:mxcalc) &1137 & +d_t_nudge(1:mxcalc) 999 & +d_t_adv(1:mxcalc) & 1000 & +d_t_nudge(1:mxcalc) & 1138 1001 & +dt_cooling(1:mxcalc)) ! Taux de chauffage ou refroid. 1139 1002 1140 1003 1141 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1004 !======================================================================= 1142 1005 !! CONSERVE EN ATTENDANT QUE LE CAS EN QUESTION FONCTIONNE EN STD !! 1143 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1144 ! endif ! forcing_sandu or forcing_astex 1145 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1006 !======================================================================= 1146 1007 1147 1008 teta=temp*(pzero/play)**rkappa 1148 ! 1009 1149 1010 !--------------------------------------------------------------------- 1150 1011 ! Nudge soil temperature if requested … … 1184 1045 1185 1046 ! incremente day time 1186 ! print*,'daytime bef',daytime,1./day_step1187 1047 daytime = daytime+1./day_step 1188 !Al1dbg1189 1048 day = int(daytime+0.1/day_step) 1190 1049 ! time = max(daytime-day,0.0) … … 1192 1051 !cc time = real(mod(it,day_step))/day_step 1193 1052 time = time_ini/24.+real(mod(it,day_step))/day_step 1194 ! print*,'daytime nxt time',daytime,time1195 1053 it=it+1 1196 1054 1197 1055 enddo 1198 1056 1199 !Al11200 1057 if (ecrit_slab_oc.ne.-1) close(97) 1201 1058 1202 1059 !Al1 Call to 1D equivalent of dynredem (an,mois,jour,heure ?) 1203 ! ------------------------------------- 1060 ! --------------------------------------------------------------------------- 1204 1061 call dyn1dredem("restart1dyn.nc", & 1205 1062 & plev,play,phi,phis,presnivs, &
Note: See TracChangeset
for help on using the changeset viewer.