Changeset 4104
- Timestamp:
- Mar 17, 2022, 12:12:32 PM (3 years ago)
- Location:
- LMDZ6/trunk/libf/phylmd/dyn1d
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/dyn1d/1D_decl_cases.h
r3781 r4104 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) … … 286 286 real ug_mod_cas(llm),vg_mod_cas(llm) 287 287 real temp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm),v_nudg_mod_cas(llm),u_nudg_mod_cas(llm) 288 real invtau_temp_nudg_mod_cas(llm),invtau_qv_nudg_mod_cas(llm),invtau_v_nudg_mod_cas(llm),invtau_u_nudg_mod_cas(llm) 288 289 real u_mod_cas(llm),v_mod_cas(llm) 289 290 real omega_mod_cas(llm),tke_mod_cas(llm+1) -
LMDZ6/trunk/libf/phylmd/dyn1d/1D_interp_cases.h
r3781 r4104 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 & ,invtau_temp_nudg_cas,invtau_qv_nudg_cas,invtau_u_nudg_cas,invtau_v_nudg_cas & 15 16 & ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas & 16 17 & ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas & … … 22 23 & ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas & 23 24 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 25 & ,invtau_temp_nudg_prof_cas,invtau_qv_nudg_prof_cas,invtau_u_nudg_prof_cas,invtau_v_nudg_prof_cas & 24 26 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 25 27 & ,du_prof_cas,hu_prof_cas,vu_prof_cas & … … 39 41 & ,ug_prof_cas,vg_prof_cas & 40 42 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 43 & ,invtau_temp_nudg_prof_cas,invtau_qv_nudg_prof_cas,invtau_u_nudg_prof_cas,invtau_v_nudg_prof_cas & 44 41 45 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 42 46 & ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas & … … 47 51 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas & 48 52 & ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas & 53 & ,invtau_temp_nudg_mod_cas,invtau_qv_nudg_mod_cas,invtau_u_nudg_mod_cas,invtau_v_nudg_mod_cas & 49 54 & ,w_mod_cas,omega_mod_cas,tke_mod_cas & 50 55 & ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas & -
LMDZ6/trunk/libf/phylmd/dyn1d/1D_read_forc_cases.h
r3781 r4104 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,tke_cas,du_cas,hu_cas,vu_cas & 29 & ,invtau_temp_nudg_cas,invtau_qv_nudg_cas,invtau_u_nudg_cas,invtau_v_nudg_cas & 30 & ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas & 30 31 & ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas & 31 32 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas & … … 36 37 & ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas & 37 38 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 39 & ,invtau_temp_nudg_prof_cas,invtau_qv_nudg_prof_cas,invtau_u_nudg_prof_cas,invtau_v_nudg_prof_cas & 38 40 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 39 41 & ,du_prof_cas,hu_prof_cas,vu_prof_cas & … … 54 56 & ,ug_prof_cas,vg_prof_cas & 55 57 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 56 58 & ,invtau_temp_nudg_prof_cas,invtau_qv_nudg_prof_cas,invtau_u_nudg_prof_cas,invtau_v_nudg_prof_cas & 57 59 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 58 60 & ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas & … … 63 65 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas & 64 66 & ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas & 67 & ,invtau_temp_nudg_mod_cas,invtau_qv_nudg_mod_cas,invtau_u_nudg_mod_cas,invtau_v_nudg_mod_cas & 65 68 & ,w_mod_cas,omega_mod_cas,tke_mod_cas & 66 69 & ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas & -
LMDZ6/trunk/libf/phylmd/dyn1d/mod_1D_cases_read2.F90
r3679 r4104 326 326 REAL, ALLOCATABLE :: time_val(:) 327 327 328 print*,'ON EST VRAIMENT LA'329 328 fich_cas='cas.nc' 330 329 print*,'fich_cas ',fich_cas -
LMDZ6/trunk/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90
r3781 r4104 29 29 real, allocatable:: ug_cas(:,:),vg_cas(:,:) 30 30 real, allocatable:: temp_nudg_cas(:,:),qv_nudg_cas(:,:),u_nudg_cas(:,:),v_nudg_cas(:,:) 31 real, allocatable:: invtau_temp_nudg_cas(:,:),invtau_qv_nudg_cas(:,:),invtau_u_nudg_cas(:,:),invtau_v_nudg_cas(:,:) 31 32 real, allocatable:: lat_cas(:),sens_cas(:),ts_cas(:),ps_cas(:),ustar_cas(:) 32 33 real, allocatable:: uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tkes_cas(:) … … 52 53 real, allocatable:: vg_prof_cas(:) 53 54 real, allocatable:: temp_nudg_prof_cas(:),qv_nudg_prof_cas(:),u_nudg_prof_cas(:),v_nudg_prof_cas(:) 55 real, allocatable:: invtau_temp_nudg_prof_cas(:),invtau_qv_nudg_prof_cas(:),invtau_u_nudg_prof_cas(:),invtau_v_nudg_prof_cas(:) 56 54 57 real, allocatable:: ht_prof_cas(:) 55 58 real, allocatable:: hth_prof_cas(:) … … 74 77 75 78 76 real lat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tkes_prof_cas77 real o 3_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,rugos_cas,sand_cas,clay_cas79 real o3_cas,lat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tkes_prof_cas 80 real orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,rugos_cas,sand_cas,clay_cas 78 81 79 82 … … 93 96 REAL, ALLOCATABLE :: time_val(:) 94 97 95 print*,'ON EST VRAIMENT DASN MOD_1D_CASES_READ_STD'96 98 fich_cas='cas.nc' 97 99 print*,'fich_cas ',fich_cas … … 180 182 allocate(temp_nudg_cas(nlev_cas,nt_cas),qv_nudg_cas(nlev_cas,nt_cas)) 181 183 allocate(u_nudg_cas(nlev_cas,nt_cas),v_nudg_cas(nlev_cas,nt_cas)) 184 allocate(invtau_temp_nudg_cas(nlev_cas,nt_cas),invtau_qv_nudg_cas(nlev_cas,nt_cas)) 185 allocate(invtau_u_nudg_cas(nlev_cas,nt_cas),invtau_v_nudg_cas(nlev_cas,nt_cas)) 182 186 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)) 183 187 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)) … … 206 210 allocate(temp_nudg_prof_cas(nlev_cas),qv_nudg_prof_cas(nlev_cas)) 207 211 allocate(u_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas)) 212 allocate(invtau_temp_nudg_prof_cas(nlev_cas),invtau_qv_nudg_prof_cas(nlev_cas)) 213 allocate(invtau_u_nudg_prof_cas(nlev_cas),invtau_v_nudg_prof_cas(nlev_cas)) 208 214 allocate(ht_prof_cas(nlev_cas)) 209 215 allocate(hth_prof_cas(nlev_cas)) … … 232 238 & ql_cas,qi_cas,rh_cas,rv_cas,u_cas,v_cas,vitw_cas,omega_cas,tke_cas,ug_cas,vg_cas, & 233 239 & temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas, & 240 & invtau_temp_nudg_cas,invtau_qv_nudg_cas,invtau_u_nudg_cas,invtau_v_nudg_cas, & 234 241 & du_cas,hu_cas,vu_cas, & 235 242 & dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas, & … … 289 296 deallocate(vg_prof_cas) 290 297 deallocate(temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas) 298 deallocate(invtau_temp_nudg_prof_cas,invtau_qv_nudg_prof_cas,invtau_u_nudg_prof_cas,invtau_v_nudg_prof_cas) 291 299 deallocate(ht_prof_cas) 292 300 deallocate(hq_prof_cas) … … 317 325 & ap,bp,zz,pp,zzh,pph,temp,theta,thv,thl,qv,ql,qi,rh,rv,u,v,vitw,omega,tke,ug,vg,& 318 326 & temp_nudg,qv_nudg,u_nudg,v_nudg, & 327 & invtau_temp_nudg,invtau_qv_nudg,invtau_u_nudg,invtau_v_nudg, & 319 328 & du,hu,vu,dv,hv,vv,dt,ht,vt,dq,hq,vq, & 320 329 & dth,hth,vth,dr,hr,vr,dtrad,sens,flat,ts,ps,ustar,tkes,uw,vw,q1,q2, & … … 339 348 real u(nlevel,ntime),v(nlevel,ntime),tkes(ntime) 340 349 real temp_nudg(nlevel,ntime),qv_nudg(nlevel,ntime),u_nudg(nlevel,ntime),v_nudg(nlevel,ntime) 350 real invtau_temp_nudg(nlevel,ntime),invtau_qv_nudg(nlevel,ntime),invtau_u_nudg(nlevel,ntime),invtau_v_nudg(nlevel,ntime) 341 351 real ug(nlevel,ntime),vg(nlevel,ntime) 342 352 real vitw(nlevel,ntime),omega(nlevel,ntime),tke(nlevel,ntime) … … 355 365 356 366 357 integer nid, ierr,ierr1,ierr2,rid,i 367 integer nid, ierr,ierr1,ierr2,rid,i,int_test 358 368 integer nbvar3d 359 parameter(nbvar3d=7 4)369 parameter(nbvar3d=78) 360 370 integer var3didin(nbvar3d),missing_var(nbvar3d) 361 371 character*13 name_var(1:nbvar3d) 362 372 363 373 374 ! data name_var/ & 375 ! ! coordonnees pression (n+1 niveaux) #4 376 ! & 'coor_par_a','coor_par_b','height_h','pressure_h',& ! #1-#4 377 ! ! coordonnees pression (n niveaux) #8 378 ! &'temp','qv','ql','qi','u','v','tke','pressure',& ! #5-#12 379 ! ! coordonnees pression + temps #42 380 ! &'w','omega','ug','vg','uadv','uadvh','uadvv','vadv','vadvh','vadvv','temp_adv','tadvh','tadvv',& ! #13 - #25 381 ! &'qv_adv','qvadvh','qvadvv','thadv','thadvh','thadvv','thladvh', & ! #26 - #32 382 ! & 'radv','radvh','radvv','radcool','q1','q2','ustress','vstress', & ! #33 - #40 383 ! & 'rh','temp_nudging','qv_nudging','u_nudging','v_nudging', & ! #41-45 384 ! &'height_f','pressure_forc','tempt','theta','thv','thl','qvt','qlt','qit','rv','ut','vt', & ! #46-58 385 ! ! coordonnees temps #12 386 ! &'tkes','sfc_sens_flx','sfc_lat_flx','ts','ps','ustar',& 387 ! &'orog','albedo','emiss','t_skin','q_skin','mom_rough','heat_rough',& 388 ! ! scalaires #4 389 ! &'o3','rugos','clay','sand'/ 390 391 392 364 393 data name_var/ & 365 394 ! coordonnees pression (n+1 niveaux) #4 366 & 'coor_par_a','coor_par_b',' height_h','pressure_h',& ! #1-#4395 & 'coor_par_a','coor_par_b','zf','pressure_h',& ! #1-#4 367 396 ! coordonnees pression (n niveaux) #8 368 &'temp','qv','ql','qi','u','v','tke','pressure',& ! #5-#12 369 ! coordonnees pression + temps #42 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 397 & 'ta','qv','ql','qi','ua','va','tke','pa',& ! #5-#12 398 ! coordonnees pression + temps #46 399 & 'wa','wap','ug','vg','tnua_adv','tnua_advh','tnua_advv','tnva_adv','tnva_advh','tnva_advv','tnta_adv','tnta_advh','tnta_advv',& ! #13 - #25 400 & 'tnqv_adv','tnqv_advh','tnqv_advv','thadv','thadvh','thadvv','thladvh', & ! #26 - #32 401 & 'radv','radvh','radvv','tnta_rad','q1','q2','ustress','vstress', & ! #33 - #40 402 & 'rh','ta_nud','qv_nud','ua_nud','va_nud', & ! #41-45 403 & 'zh_forc','pa_forc','tat','thetat','thetavt','thetalt','qvt','qlt','qit','rv','uat','vat', & ! #46-57 404 & 'nudging_constant_ta', 'nudging_constant_qv', 'nudging_constant_ua', 'nudging_constant_va', & ! # 58-61 375 405 ! coordonnees temps #12 376 &'tkes','sfc_sens_flx','sfc_lat_flx','ts','ps','ustar',& 377 &'orog','albedo','emiss','t_skin','q_skin','mom_rough','heat_rough',& 378 ! scalaires #4 379 &'o3','rugos','clay','sand'/ 380 406 & 'tkes','hfss','hfls','ts_forc','ps_forc','ustar', & ! 62-67 407 & 'orog','albedo','emiss','t_skin','q_skin','z0','z0h', & ! 68-74 408 ! scalaires #4 409 & 'O3','rugos','clay','sand'/ ! 75-78 410 411 412 !----------------------------------------------------------------------- 413 ! First check that we are using a version > v2 of the 1D standard format 414 ! use the difference between 'temp' (old version) and 'ta' (new version) 415 !----------------------------------------------------------------------- 416 417 418 ierr=NF_INQ_VARID(nid,'ta',int_test) 419 if(ierr/=NF_NOERR) then 420 print*, '++++++++++++++++++++++++++++++' 421 print*, 'variable ta missing in cas.nc ' 422 print*, 'You are probably using an obsolete version of the 1D cases' 423 print*, 'please dowload the last version of the 1D archive from https://lmdz.lmd.jussieu.fr/pub/' 424 print*, '++++++++++++++++++++++++++++++' 425 CALL abort_gcm ('mod_1D_cases_read_std','bad version of 1D directory',0) 426 endif 427 381 428 !----------------------------------------------------------------------- 382 429 ! Checking availability of variable #i in the cas.nc file … … 387 434 missing_var(i)=0. 388 435 ierr=NF_INQ_VARID(nid,name_var(i),var3didin(i)) 436 print*, 'name_var(i)', name_var(i), var3didin(i) 389 437 if(ierr/=NF_NOERR) then 390 438 print *,'Variable manquante dans cas.nc:',i,name_var(i) … … 399 447 ! A MODIFIER: il faudrait dire nudging_temp mais faut le declarer dans compar1d.h etc... 400 448 ! if ( name_var(i) == 'temp_nudging' .and. nint(nudging_t)==0) stop 'Nudging inconsistency temp' 401 if ( name_var(i) == 'qv_nud ging' .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'449 if ( name_var(i) == 'qv_nud' .and. nint(nudging_qv)==0) stop 'Nudging inconsistency qv' 450 if ( name_var(i) == 'ua_nud' .and. nint(nudging_u)==0) stop 'Nudging inconsistency u' 451 if ( name_var(i) == 'va_nud' .and. nint(nudging_v)==0) stop 'Nudging inconsistency v' 404 452 ELSE 405 453 print*,'GUIDAGE : CONSISTENCY CHECK DEACTIVATED FOR TESTS of SANDU/REF' … … 441 489 ! TBD : seems to be the same as above. 442 490 !----------------------------------------------------------------------- 443 else if(i.gt.12.and.i.LE. 57) then491 else if(i.gt.12.and.i.LE.61) then 444 492 #ifdef NC_DOUBLE 445 493 ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),resul) … … 457 505 ! Reading 1D time variables (time,lat,lon) 458 506 !----------------------------------------------------------------------- 459 else if (i.gt. 57.and.i.LE.63) then507 else if (i.gt.62.and.i.LE.75) then 460 508 #ifdef NC_DOUBLE 461 509 ierr = NF_GET_VAR_DOUBLE(nid,var3didin(i),resul2) … … 549 597 case(56) ; u=resul 550 598 case(57) ; v=resul 551 case(58) ; tkes=resul2 ! donnees indexees en time 552 case(59) ; sens=resul2 553 case(60) ; flat=resul2 554 case(61) ; ts=resul2 555 case(62) ; ps=resul2 556 case(63) ; ustar=resul2 557 case(64) ; orog_cas=resul3 ! constantes 558 case(65) ; albedo_cas=resul3 559 case(66) ; emiss_cas=resul3 560 case(67) ; t_skin_cas=resul3 561 case(68) ; q_skin_cas=resul3 562 case(69) ; mom_rough=resul3 563 case(70) ; heat_rough=resul3 564 case(71) ; o3_cas=resul3 565 case(72) ; rugos_cas=resul3 566 case(73) ; clay_cas=resul3 567 case(74) ; sand_cas=resul3 599 case(58) ; invtau_temp_nudg=resul 600 case(59) ; invtau_qv_nudg=resul 601 case(60) ; invtau_u_nudg=resul 602 case(61) ; invtau_v_nudg=resul 603 case(62) ; tkes=resul2 ! donnees indexees en time 604 case(63) ; sens=resul2 605 case(64) ; flat=resul2 606 case(65) ; ts=resul2 607 case(66) ; ps=resul2 608 case(67) ; ustar=resul2 609 case(68) ; orog_cas=resul3 ! constantes 610 case(69) ; albedo_cas=resul3 611 case(70) ; emiss_cas=resul3 612 case(71) ; t_skin_cas=resul3 613 case(72) ; q_skin_cas=resul3 614 case(73) ; mom_rough=resul3 615 case(74) ; heat_rough=resul3 616 case(75) ; o3_cas=resul3 617 case(76) ; rugos_cas=resul3 618 case(77) ; clay_cas=resul3 619 case(78) ; sand_cas=resul3 568 620 end select 569 621 resul=0. … … 606 658 & ,qv_cas,ql_cas,qi_cas,u_cas,v_cas & 607 659 & ,ug_cas,vg_cas,temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas & 660 & ,invtau_temp_nudg_cas,invtau_qv_nudg_cas,invtau_u_nudg_cas,invtau_v_nudg_cas & 608 661 & ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas & 609 662 & ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas & … … 616 669 & ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas & 617 670 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 671 & ,invtau_temp_nudg_prof_cas,invtau_qv_nudg_prof_cas,invtau_u_nudg_prof_cas,invtau_v_nudg_prof_cas & 618 672 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas,du_prof_cas,hu_prof_cas,vu_prof_cas & 619 673 & ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas & … … 656 710 real u_nudg_cas(nlev_cas,nt_cas),v_nudg_cas(nlev_cas,nt_cas) 657 711 712 real invtau_temp_nudg_cas(nlev_cas,nt_cas),invtau_qv_nudg_cas(nlev_cas,nt_cas) 713 real invtau_u_nudg_cas(nlev_cas,nt_cas),invtau_v_nudg_cas(nlev_cas,nt_cas) 714 658 715 real vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas),tke_cas(nlev_cas,nt_cas) 659 716 real du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas) … … 675 732 real temp_nudg_prof_cas(nlev_cas),qv_nudg_prof_cas(nlev_cas) 676 733 real u_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas) 734 735 real invtau_temp_nudg_prof_cas(nlev_cas),invtau_qv_nudg_prof_cas(nlev_cas) 736 real invtau_u_nudg_prof_cas(nlev_cas),invtau_v_nudg_prof_cas(nlev_cas) 677 737 678 738 real vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas),tke_prof_cas(nlev_cas) … … 810 870 v_nudg_prof_cas(k) = v_nudg_cas(k,it_cas2) & 811 871 & -frac*(v_nudg_cas(k,it_cas2)-v_nudg_cas(k,it_cas1)) 872 invtau_temp_nudg_prof_cas(k) = invtau_temp_nudg_cas(k,it_cas2) & 873 & -frac*(invtau_temp_nudg_cas(k,it_cas2)-invtau_temp_nudg_cas(k,it_cas1)) 874 invtau_qv_nudg_prof_cas(k) = invtau_qv_nudg_cas(k,it_cas2) & 875 & -frac*(invtau_qv_nudg_cas(k,it_cas2)-invtau_qv_nudg_cas(k,it_cas1)) 876 invtau_u_nudg_prof_cas(k) = invtau_u_nudg_cas(k,it_cas2) & 877 & -frac*(invtau_u_nudg_cas(k,it_cas2)-invtau_u_nudg_cas(k,it_cas1)) 878 invtau_v_nudg_prof_cas(k) = invtau_v_nudg_cas(k,it_cas2) & 879 & -frac*(invtau_v_nudg_cas(k,it_cas2)-invtau_v_nudg_cas(k,it_cas1)) 812 880 vitw_prof_cas(k) = vitw_cas(k,it_cas2) & 813 881 & -frac*(vitw_cas(k,it_cas2)-vitw_cas(k,it_cas1)) … … 868 936 & ,ug_prof_cas,vg_prof_cas & 869 937 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 938 & ,invtau_temp_nudg_prof_cas,invtau_qv_nudg_prof_cas,invtau_u_nudg_prof_cas,invtau_v_nudg_prof_cas & 870 939 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 871 940 & ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas & … … 877 946 & ,ug_mod_cas,vg_mod_cas & 878 947 & ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas & 948 & ,invtau_temp_nudg_mod_cas,invtau_qv_nudg_mod_cas,invtau_u_nudg_mod_cas,invtau_v_nudg_mod_cas & 879 949 & ,w_mod_cas,omega_mod_cas,tke_mod_cas & 880 950 & ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas & … … 907 977 real temp_nudg_prof_cas(nlev_cas),qv_nudg_prof_cas(nlev_cas) 908 978 real u_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas) 979 real invtau_temp_nudg_prof_cas(nlev_cas),invtau_qv_nudg_prof_cas(nlev_cas) 980 real invtau_u_nudg_prof_cas(nlev_cas),invtau_v_nudg_prof_cas(nlev_cas) 909 981 910 982 real du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas) … … 920 992 real temp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm) 921 993 real u_nudg_mod_cas(llm),v_nudg_mod_cas(llm) 994 real invtau_temp_nudg_mod_cas(llm),invtau_qv_nudg_mod_cas(llm) 995 real invtau_u_nudg_mod_cas(llm),invtau_v_nudg_mod_cas(llm) 922 996 real du_mod_cas(llm),hu_mod_cas(llm),vu_mod_cas(llm) 923 997 real dv_mod_cas(llm),hv_mod_cas(llm),vv_mod_cas(llm) … … 979 1053 u_nudg_mod_cas(l)= u_nudg_prof_cas(k2) - frac*(u_nudg_prof_cas(k2)-u_nudg_prof_cas(k1)) 980 1054 v_nudg_mod_cas(l)= v_nudg_prof_cas(k2) - frac*(v_nudg_prof_cas(k2)-v_nudg_prof_cas(k1)) 1055 1056 invtau_temp_nudg_mod_cas(l)= invtau_temp_nudg_prof_cas(k2) - frac*(invtau_temp_nudg_prof_cas(k2)-invtau_temp_nudg_prof_cas(k1)) 1057 invtau_qv_nudg_mod_cas(l)= invtau_qv_nudg_prof_cas(k2) - frac*(invtau_qv_nudg_prof_cas(k2)-invtau_qv_nudg_prof_cas(k1)) 1058 invtau_u_nudg_mod_cas(l)= invtau_u_nudg_prof_cas(k2) - frac*(invtau_u_nudg_prof_cas(k2)-invtau_u_nudg_prof_cas(k1)) 1059 invtau_v_nudg_mod_cas(l)= invtau_v_nudg_prof_cas(k2) - frac*(invtau_v_nudg_prof_cas(k2)-invtau_v_nudg_prof_cas(k1)) 1060 981 1061 w_mod_cas(l)= vitw_prof_cas(k2) - frac*(vitw_prof_cas(k2)-vitw_prof_cas(k1)) 982 1062 omega_mod_cas(l)= omega_prof_cas(k2) - frac*(omega_prof_cas(k2)-omega_prof_cas(k1)) … … 1021 1101 u_nudg_mod_cas(l)= frac1*u_nudg_prof_cas(k1) - frac2*u_nudg_prof_cas(k2) 1022 1102 v_nudg_mod_cas(l)= frac1*v_nudg_prof_cas(k1) - frac2*v_nudg_prof_cas(k2) 1103 1104 invtau_temp_nudg_mod_cas(l)= frac1*invtau_temp_nudg_prof_cas(k1) - frac2*invtau_temp_nudg_prof_cas(k2) 1105 invtau_qv_nudg_mod_cas(l)= frac1*invtau_qv_nudg_prof_cas(k1) - frac2*invtau_qv_nudg_prof_cas(k2) 1106 invtau_u_nudg_mod_cas(l)= frac1*invtau_u_nudg_prof_cas(k1) - frac2*invtau_u_nudg_prof_cas(k2) 1107 invtau_v_nudg_mod_cas(l)= frac1*invtau_v_nudg_prof_cas(k1) - frac2*invtau_v_nudg_prof_cas(k2) 1108 1023 1109 w_mod_cas(l)= frac1*vitw_prof_cas(k1) - frac2*vitw_prof_cas(k2) 1024 1110 omega_mod_cas(l)= frac1*omega_prof_cas(k1) - frac2*omega_prof_cas(k2) … … 1063 1149 u_nudg_mod_cas(l)= u_nudg_prof_cas(nlev_cas) !jyg 1064 1150 v_nudg_mod_cas(l)= v_nudg_prof_cas(nlev_cas) !jyg 1151 1152 invtau_temp_nudg_mod_cas(l)= invtau_temp_nudg_prof_cas(nlev_cas) !jyg 1153 invtau_qv_nudg_mod_cas(l)= invtau_qv_nudg_prof_cas(nlev_cas) !jyg 1154 invtau_u_nudg_mod_cas(l)= invtau_u_nudg_prof_cas(nlev_cas) !jyg 1155 invtau_v_nudg_mod_cas(l)= invtau_v_nudg_prof_cas(nlev_cas) !jyg 1156 1065 1157 thv_mod_cas(l)= thv_prof_cas(nlev_cas) !jyg 1066 1158 w_mod_cas(l)= 0.0 !jyg -
LMDZ6/trunk/libf/phylmd/dyn1d/old_lmdz1d.F90
r3977 r4104 889 889 clwcon=0. 890 890 zmax0 = 0. 891 zmea= 0.891 zmea=zsurf 892 892 zstd=0. 893 893 zsig=0. -
LMDZ6/trunk/libf/phylmd/dyn1d/scm.F90
r3977 r4104 654 654 clwcon=0. 655 655 zmax0 = 0. 656 zmea= 0.656 zmea=zsurf 657 657 zstd=0. 658 658 zsig=0. … … 815 815 ! Geopotential : 816 816 !--------------------------------------------------------------------- 817 !phis(1)=zsurf*RG817 phis(1)=zsurf*RG 818 818 ! phi(1)=phis(1)+RD*temp(1)*(plev(1)-play(1))/(.5*(plev(1)+play(1))) 819 820 ! Calculate geopotential from the ground surface since phi and phis are added in physiq_mod 819 821 phi(1)=RD*temp(1)*(plev(1)-play(1))/(.5*(plev(1)+play(1))) 820 822 … … 823 825 & (play(l)-play(l+1))/(play(l)+play(l+1)) 824 826 enddo 825 826 827 827 828 !--------------------------------------------------------------------- … … 852 853 d_t_adv(:)=d_t_adv(:)+d_t_vert_adv(:) 853 854 d_q_adv(:,1)=d_q_adv(:,1)+d_q_vert_adv(:,1) 854 855 print*,'OMEGA ',w_adv(10),z_adv(10) 856 855 857 856 ENDIF 858 857 … … 938 937 !--------------------------------------------------------------------- 939 938 ! Nudging 939 ! EV: rewrite the section to account for a time- and height-varying 940 ! nudging 940 941 !--------------------------------------------------------------------- 941 942 d_t_nudge(:) = 0. … … 943 944 d_v_nudge(:) = 0. 944 945 d_q_nudge(:,:) = 0. 946 945 947 DO l=1,llm 946 IF ( play(l) < p_nudging_u .AND. nint(nudging_u) /= 0 ) & 948 949 IF (nudging_u .LT. 0) THEN 950 951 d_u_nudge(l)=(u_nudg_mod_cas(l)-u(l))*invtau_u_nudg_mod_cas(l) 952 953 ELSE 954 955 IF ( play(l) < p_nudging_u .AND. nint(nudging_u) /= 0 ) & 947 956 & d_u_nudge(l)=(u_nudg_mod_cas(l)-u(l))/nudging_u 948 IF ( play(l) < p_nudging_v .AND. nint(nudging_v) /= 0 ) & 957 958 ENDIF 959 960 961 IF (nudging_v .LT. 0) THEN 962 963 d_v_nudge(l)=(v_nudg_mod_cas(l)-v(l))*invtau_v_nudg_mod_cas(l) 964 965 ELSE 966 967 968 IF ( play(l) < p_nudging_v .AND. nint(nudging_v) /= 0 ) & 949 969 & d_v_nudge(l)=(v_nudg_mod_cas(l)-v(l))/nudging_v 950 IF ( play(l) < p_nudging_t .AND. nint(nudging_t) /= 0 ) & 970 971 ENDIF 972 973 974 IF (nudging_t .LT. 0) THEN 975 976 d_t_nudge(l)=(temp_nudg_mod_cas(l)-temp(l))*invtau_temp_nudg_mod_cas(l) 977 978 ELSE 979 980 981 IF ( play(l) < p_nudging_t .AND. nint(nudging_t) /= 0 ) & 951 982 & d_t_nudge(l)=(temp_nudg_mod_cas(l)-temp(l))/nudging_t 952 IF ( play(l) < p_nudging_qv .AND. nint(nudging_qv) /= 0 ) & 983 984 ENDIF 985 986 987 IF (nudging_qv .LT. 0) THEN 988 989 d_q_nudge(l,1)=(qv_nudg_mod_cas(l)-q(l,1))*invtau_qv_nudg_mod_cas(l) 990 991 ELSE 992 993 IF ( play(l) < p_nudging_qv .AND. nint(nudging_qv) /= 0 ) & 953 994 & d_q_nudge(l,1)=(qv_nudg_mod_cas(l)-q(l,1))/nudging_qv 995 996 ENDIF 997 954 998 ENDDO 955 999 … … 957 1001 ! Optional outputs 958 1002 !--------------------------------------------------------------------- 1003 959 1004 #ifdef OUTPUT_PHYS_SCM 960 1005 CALL iophys_ecrit('w_adv',klev,'w_adv','K/day',w_adv)
Note: See TracChangeset
for help on using the changeset viewer.