Changeset 1130 for trunk/LMDZ.MARS/libf/phymars/newstart.F
- Timestamp:
- Dec 20, 2013, 4:04:56 PM (11 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/newstart.F
r1087 r1130 17 17 ! to use 'getin' 18 18 use ioipsl_getincom, only: getin 19 use infotrac, only: iniadvtrac, nqtot, tnom 20 use tracer_mod, only: noms, igcm_h2o_vap, igcm_h2o_ice 19 use infotrac, only: iniadvtrac, nqtot, tname 20 use tracer_mod, only: noms, igcm_dust_number, igcm_dust_mass, 21 & igcm_ccn_number, igcm_ccn_mass, 22 & igcm_h2o_vap, igcm_h2o_ice 21 23 use surfdat_h, only: phisfi, z0, zmea, zstd, zsig, zgam, zthe, 22 24 & albedodat, z0_default 23 25 use comsoil_h, only: inertiedat, layer, mlayer, nsoilmx 26 use control_mod, only: day_step, iphysiq, anneeref 27 use phyredem, only: physdem0, physdem1 28 use iostart, only: open_startphy 29 use comgeomphy, only: initcomgeomphy 24 30 implicit none 25 31 … … 36 42 #include "comvert.h" 37 43 #include "comgeom2.h" 38 #include "control.h"44 !#include "control.h" 39 45 #include "logic.h" 40 46 #include "description.h" 41 47 #include "ener.h" 42 48 #include "temps.h" 43 #include "lmdstd.h"49 !#include "lmdstd.h" 44 50 #include "comdissnew.h" 45 51 #include "clesph0.h" … … 142 148 c variables diverses 143 149 c------------------- 144 real choix_1 150 real choix_1 ! ==0 : read start_archive file ; ==1: read start files 145 151 character*80 fichnom 146 152 integer Lmodif,iq … … 183 189 preff = 610. ! for Mars, instead of 101325. (Earth) 184 190 pa= 20 ! for Mars, instead of 500 (Earth) 191 192 ! initialize "serial/parallel" related stuff 193 CALL init_phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/)) 194 call initcomgeomphy 185 195 186 196 ! Load tracer number and names: … … 316 326 c----------------------------------------------------------------------- 317 327 if (choix_1.eq.0) then 328 ! tabfi requires that input file be first opened by open_startphy(fichnom) 329 fichnom = 'start_archive.nc' 330 call open_startphy(fichnom) 318 331 call tabfi (nid,Lmodif,tab0,day_ini,lllm,p_rad, 319 332 . p_omeg,p_g,p_mugaz,p_daysec,time) 320 333 else if (choix_1.eq.1) then 334 fichnom = 'startfi.nc' 335 call open_startphy(fichnom) 321 336 call tabfi (nid_fi,Lmodif,tab0,day_ini,lllm,p_rad, 322 337 . p_omeg,p_g,p_mugaz,p_daysec,time) … … 461 476 txt=" " 462 477 write(txt,'(a1,i2.2)') 'q',iq 463 if (txt.eq.tn om(iq)) then478 if (txt.eq.tname(iq)) then 464 479 count=count+1 465 480 endif … … 471 486 if (count.eq.nqtot) then 472 487 write(*,*) 'Newstart: updating tracer names' 473 ! copy noms(:) to tn om(:) to have matching tracer names in physics488 ! copy noms(:) to tname(:) to have matching tracer names in physics 474 489 ! and dynamics 475 tn om(1:nqtot)=noms(1:nqtot)490 tname(1:nqtot)=noms(1:nqtot) 476 491 endif 477 492 … … 497 512 $ tracer' 498 513 write(*,*) 'q=profile : specify a profile for a tracer' 514 write(*,*) 'freedust : rescale dust to a true value' 499 515 write(*,*) 'ini_q : tracers initialization for chemistry 500 516 $ and water vapour' … … 723 739 write(*,*) 'Which tracer name do you want to change ?' 724 740 do iq=1,nqtot 725 write(*,'(i3,a3,a20)')iq,' : ',trim(tn om(iq))741 write(*,'(i3,a3,a20)')iq,' : ',trim(tname(iq)) 726 742 enddo 727 743 write(*,'(a35,i3)') … … 730 746 read(*,*) iq 731 747 if ((iq.ge.1).and.(iq.le.nqtot)) then 732 write(*,*)'Change tracer name ',trim(tn om(iq)),' to ?'748 write(*,*)'Change tracer name ',trim(tname(iq)),' to ?' 733 749 read(*,*) txt 734 tn om(iq)=txt750 tname(iq)=txt 735 751 write(*,*)'Do you want to change another tracer name (y/n)?' 736 752 read(*,'(a)') yes … … 768 784 write(*,*) 'Which tracer do you want to modify ?' 769 785 do iq=1,nqtot 770 write(*,*)iq,' : ',trim(tn om(iq))786 write(*,*)iq,' : ',trim(tname(iq)) 771 787 enddo 772 788 write(*,*) '(choose between 1 and ',nqtot,')' … … 777 793 cycle 778 794 endif 779 write(*,*)'mixing ratio of tracer ',trim(tn om(iq)),795 write(*,*)'mixing ratio of tracer ',trim(tname(iq)), 780 796 & ' ? (kg/kg)' 781 797 read(*,*) val … … 787 803 ENDDO 788 804 ENDDO 789 write(*,*) 'SURFACE value of tracer ',trim(tn om(iq)),805 write(*,*) 'SURFACE value of tracer ',trim(tname(iq)), 790 806 & ' ? (kg/m2)' 791 807 read(*,*) val … … 804 820 write(*,*) 'Which tracer do you want to set?' 805 821 do iq=1,nqtot 806 write(*,*)iq,' : ',trim(tn om(iq))822 write(*,*)iq,' : ',trim(tname(iq)) 807 823 enddo 808 824 write(*,*) '(choose between 1 and ',nqtot,')' … … 814 830 endif 815 831 ! look for input file 'profile_tracer' 816 txt="profile_"//trim(tn om(iq))832 txt="profile_"//trim(tname(iq)) 817 833 open(41,file=trim(txt),status='old',form='formatted', 818 834 & iostat=ierr) … … 831 847 q(:,:,l,iq)=profile(l+1) 832 848 enddo 833 write(*,*)'OK, tracer ',trim(tn om(iq)),' initialized ',834 & 849 write(*,*)'OK, tracer ',trim(tname(iq)), 850 & ' initialized ','using values from file ',trim(txt) 835 851 else 836 852 write(*,*)'problem reading file ',trim(txt),' !' 837 write(*,*)'No modifications to tracer ',trim(tn om(iq))853 write(*,*)'No modifications to tracer ',trim(tname(iq)) 838 854 endif 839 855 else 840 856 write(*,*)'Could not find file ',trim(txt),' !' 841 write(*,*)'No modifications to tracer ',trim(tn om(iq))857 write(*,*)'No modifications to tracer ',trim(tname(iq)) 842 858 endif 843 859 860 c q=profile : initialize tracer with a given profile 861 c -------------------------------------------------- 862 else if (trim(modif) .eq. 'freedust') then 863 do l=1,llm 864 do j=1,jjp1 865 do i=1,iip1 866 if (igcm_dust_number .ne. 0) 867 & q(i,j,l,igcm_dust_number)= 868 & q(i,j,l,igcm_dust_number) * 1e-3 ! grosso modo 869 if (igcm_dust_mass .ne. 0) 870 & q(i,j,l,igcm_dust_mass)= 871 & q(i,j,l,igcm_dust_mass) * 1e-3 ! grosso modo 872 if (igcm_ccn_number .ne. 0) 873 & q(i,j,l,igcm_ccn_number)= 874 & q(i,j,l,igcm_ccn_number) * 1e-3 ! grosso modo 875 if (igcm_ccn_mass .ne. 0) 876 & q(i,j,l,igcm_ccn_mass)= 877 & q(i,j,l,igcm_ccn_mass) * 1e-3 ! grosso modo 878 end do 879 end do 880 end do 881 882 ! We want to have the very same value at lon -180 and lon 180 883 do l = 1,llm 884 do j = 1,jjp1 885 do iq = 1,nqtot 886 q(iip1,j,l,iq) = q(1,j,l,iq) 887 end do 888 end do 889 end do 844 890 845 891 c ini_q : Initialize tracers for chemistry
Note: See TracChangeset
for help on using the changeset viewer.