Changeset 3780 for LMDZ6/trunk/libf/phylmd/dyn1d/scm.F90
- Timestamp:
- Oct 22, 2020, 2:50:18 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/dyn1d/scm.F90
r3693 r3780 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 … … 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/ … … 278 254 d_v_age(:)=0. 279 255 256 280 257 ! Initialization of Common turb_forcing 281 258 dtime_frcg = 0. … … 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) … … 446 425 !!! Feedback forcing values for Gateaux differentiation (al1) 447 426 !!!===================================================================== 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 427 !! 455 428 qsol = qsolinp … … 469 442 ENDIF 470 443 print*,'Flux sol ',fsens,flat 471 !! ok_flux_surf=.false.472 !! fsens=-wtsurf*rcpd*rho(1)473 !! flat=-wqsurf*rlvtt*rho(1)474 !!!!475 444 476 445 ! Vertical discretization and pressure levels at half and mid levels: … … 496 465 plev =ap+bp*psurf 497 466 play = 0.5*(plev(1:llm)+plev(2:llm+1)) 498 zlay=-rd*300.*log(play/psurf)/rg ! moved after reading profiles 467 zlay=-rd*300.*log(play/psurf)/rg ! moved after reading profiles. 499 468 500 469 IF (forcing_type .eq. 59) THEN … … 527 496 print*,'mxcalc=',mxcalc 528 497 ! 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 498 ! print*,'play=',play(mxcalc) 499 500 !! When surface temperature is forced 501 tg= tsurf ! surface T used in read_tsurf1d 502 503 533 504 !===================================================================== 534 505 ! Initialisation de la physique : … … 546 517 ! airefi,zcufi,zcvfi initialises au debut de ce programme 547 518 ! rday,ra,rg,rd,rcpd declares dans YOMCST.h et calcules dans suphel.F 519 520 548 521 day_step = float(nsplit_phys)*day_step/float(iphysiq) 549 522 write (*,*) 'Time step divided by nsplit_phys (=',nsplit_phys,')' … … 563 536 ! e.g. for cell boundaries, which are meaningless in 1D; so pad these 564 537 ! with '0.' when necessary 538 565 539 call iniphysiq(iim,jjm,llm, & 566 540 1,comm_lmdz, & … … 653 627 ! 6 albedo, mais on peut quand meme tourner avec 654 628 ! moins. Seules les 2 ou 4 premiers seront lus 629 print*, 'les albedos sont', albedo 655 630 falb_dir=albedo 656 631 falb_dif=albedo … … 664 639 prw_ancien = 0. 665 640 !jyg< 666 !! 641 !! pbl_tke(:,:,:)=1.e-8 667 642 pbl_tke(:,:,:)=0. 668 pbl_tke(:,2,:)=1.e-2 643 ! EV: pourquoi???? 644 ! pbl_tke(:,2,:)=1.e-2 669 645 PRINT *, ' pbl_tke dans lmdz1d ' 670 646 if (prt_level .ge. 5) then … … 675 651 676 652 !>jyg 677 678 653 rain_fall=0. 679 654 snow_fall=0. … … 715 690 v_ancien(1,:)=v(:) 716 691 717 u10m=0.718 v10m=0.719 ale_wake=0.720 ale_bl_stat=0.692 u10m=0. 693 v10m=0. 694 ale_wake=0. 695 ale_bl_stat=0. 721 696 722 697 !------------------------------------------------------------------------ … … 738 713 ! to be set at some arbitratry convenient values. 739 714 !------------------------------------------------------------------------ 740 !Al1 =============== restart option ========================== 715 !Al1 =============== restart option ====================================== 741 716 if (.not.restart) then 742 717 iflag_pbl = 5 … … 803 778 print*,'plev,play,phi,phis,presnivs,u,v,temp,q,omega2' 804 779 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 780 print*,temp(1),q(1,1),u(1),v(1),plev(1),phis(1) 806 781 ! raz for safety 807 782 do l=1,llm … … 809 784 enddo 810 785 endif 811 ! Al1================ end restart =================================786 !====================== end restart ================================= 812 787 IF (ecrit_slab_oc.eq.1) then 813 788 open(97,file='div_slab.dat',STATUS='UNKNOWN') … … 820 795 CALL iophys_ini 821 796 #endif 797 798 !===================================================================== 822 799 ! START OF THE TEMPORAL LOOP : 823 800 !===================================================================== 824 801 825 802 it_end = nint(fnday*day_step) 826 !test JLD it_end = 10827 803 do while(it.le.it_end) 828 804 … … 832 808 print*,'PAS DE TEMPS ',timestep 833 809 endif 834 !Al1 demande de restartphy.nc835 810 if (it.eq.it_end) lastcall=.True. 836 811 … … 844 819 ! Geopotential : 845 820 !--------------------------------------------------------------------- 846 821 ! phis(1)=zsurf*RG 822 ! phi(1)=phis(1)+RD*temp(1)*(plev(1)-play(1))/(.5*(plev(1)+play(1))) 847 823 phi(1)=RD*temp(1)*(plev(1)-play(1))/(.5*(plev(1)+play(1))) 824 848 825 do l = 1, llm-1 849 826 phi(l+1)=phi(l)+RD*(temp(l)+temp(l+1))* & 850 827 & (play(l)-play(l+1))/(play(l)+play(l+1)) 851 828 enddo 829 852 830 853 831 !--------------------------------------------------------------------- … … 950 928 sfdt = sin(0.5*fcoriolis*timestep) 951 929 cfdt = cos(0.5*fcoriolis*timestep) 952 ! print *,'fcoriolis,sfdt,cfdt,timestep',fcoriolis,sfdt,cfdt,timestep 953 ! 930 954 931 d_u_age(1:mxcalc)= -2.*sfdt/timestep* & 955 932 & (sfdt*(u(1:mxcalc)-ug(1:mxcalc)) - & … … 1030 1007 temp(1:mxcalc)=temp(1:mxcalc)+timestep*( & 1031 1008 & dt_phys(1:mxcalc) & 1032 & +d_t_adv(1:mxcalc) &1033 & +d_t_nudge(1:mxcalc) 1009 & +d_t_adv(1:mxcalc) & 1010 & +d_t_nudge(1:mxcalc) & 1034 1011 & +dt_cooling(1:mxcalc)) ! Taux de chauffage ou refroid. 1035 1012 1036 1013 1037 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1014 !======================================================================= 1038 1015 !! CONSERVE EN ATTENDANT QUE LE CAS EN QUESTION FONCTIONNE EN STD !! 1039 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1040 ! endif ! forcing_sandu or forcing_astex 1041 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1016 !======================================================================= 1042 1017 1043 1018 teta=temp*(pzero/play)**rkappa 1044 ! 1019 1045 1020 !--------------------------------------------------------------------- 1046 1021 ! Nudge soil temperature if requested … … 1080 1055 1081 1056 ! incremente day time 1082 ! print*,'daytime bef',daytime,1./day_step1083 1057 daytime = daytime+1./day_step 1084 !Al1dbg1085 1058 day = int(daytime+0.1/day_step) 1086 1059 ! time = max(daytime-day,0.0) … … 1088 1061 !cc time = real(mod(it,day_step))/day_step 1089 1062 time = time_ini/24.+real(mod(it,day_step))/day_step 1090 ! print*,'daytime nxt time',daytime,time1091 1063 it=it+1 1092 1064 1093 1065 enddo 1094 1066 1095 !Al11096 1067 if (ecrit_slab_oc.ne.-1) close(97) 1097 1068 1098 1069 !Al1 Call to 1D equivalent of dynredem (an,mois,jour,heure ?) 1099 ! ------------------------------------- 1070 ! --------------------------------------------------------------------------- 1100 1071 call dyn1dredem("restart1dyn.nc", & 1101 1072 & plev,play,phi,phis,presnivs, &
Note: See TracChangeset
for help on using the changeset viewer.