Changeset 1647 for trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan
- Timestamp:
- Jan 11, 2017, 3:33:51 PM (8 years ago)
- Location:
- trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/ini_archive.F
r1478 r1647 36 36 37 37 USE comsoil_h 38 USE slab_ice_h, only: noceanmx39 38 ! use control_mod 40 39 USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt … … 81 80 INTEGER idim_tim 82 81 INTEGER idim_nsoilmx ! "subsurface_layers" dimension ID # 83 INTEGER idim_noceanmx ! "ocean_layers" dimension ID #84 82 INTEGER nid,nvarid 85 83 real sig_s(llm),s(llm) … … 164 162 ierr = NF_DEF_DIM (nid, "altitude", llm, idim_llm) 165 163 ierr = NF_DEF_DIM (nid,"subsurface_layers",nsoilmx,idim_nsoilmx) 166 ierr = NF_DEF_DIM (nid,"ocean_layers",noceanmx,idim_noceanmx)167 164 168 165 ierr = NF_DEF_DIM (nid,"index", length, idim_index) -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/iniphysiq_mod.F90
r1573 r1647 11 11 12 12 use control_mod, only: nday 13 use surf_heat_transp_mod, only: ini_surf_heat_transp14 13 use infotrac, only : nqtot ! number of advected tracers 15 14 use planete_mod, only: ini_planete_mod … … 53 52 integer,intent(in) :: iflag_phys ! type of physics to be called 54 53 55 logical :: ok_slab_ocean56 57 54 ! the common part for all planetary physics 58 55 !------------------------------------------ … … 79 76 call ini_planete_mod(nlayer,preff,ap,bp) 80 77 81 ! for slab ocean, copy over some arrays82 ok_slab_ocean=.false. ! default value83 call getin_p("ok_slab_ocean",ok_slab_ocean)84 if (ok_slab_ocean) then85 call ini_surf_heat_transp(ip1jm,ip1jmp1,unsairez,fext,unsaire, &86 cu,cuvsurcv,cv,cvusurcu,aire,apoln,apols, &87 aireu,airev)88 endif89 90 78 call inifis(klon_omp,nlayer,nqtot,pdayref,punjours,nday,ptimestep, & 91 79 latitude,longitude,cell_area,prad,pg,pr,pcpp) -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/lect_start_archive.F
r1478 r1647 2 2 & date,tsurf,tsoil,emis,q2, 3 3 & t,ucov,vcov,ps,h,phisold_newgrid, 4 & q,qsurf,surfith,nid, 5 & rnat,pctsrf_sic,tslab,tsea_ice,sea_ice) 4 & q,qsurf,surfith,nid) 6 5 7 6 ! USE surfdat_h 8 7 USE comsoil_h, ONLY: nsoilmx, layer, mlayer, volcapa, inertiedat 9 USE tracer_h, ONLY: igcm_co2_ice10 8 USE infotrac, ONLY: tname, nqtot 11 USE slab_ice_h, ONLY: noceanmx12 9 ! USE control_mod 13 10 ! to use 'getin' 14 USE callkeys_mod, ONLY: ok_slab_ocean15 11 USE comvert_mod, ONLY: ap,bp,aps,bps,preff 16 12 USE comconst_mod, ONLY: kappa,g,pi … … 101 97 REAL tsurf(ngrid) ! surface temperature 102 98 REAL tsoil(ngrid,nsoilmx) ! soil temperature 103 REAL co2ice(ngrid) ! CO2 ice layer104 99 REAL emis(ngrid) 105 100 REAL q2(ngrid,llm+1),qsurf(ngrid,nqtot) 106 REAL tslab(ngrid,noceanmx)107 REAL rnat(ngrid),pctsrf_sic(ngrid)108 REAL tsea_ice(ngrid),sea_ice(ngrid)109 101 c REAL phisfi(ngrid) 110 102 … … 126 118 real tsurfS(iip1,jjp1),tsoilS(iip1,jjp1,nsoilmx) 127 119 real inertiedatS(iip1,jjp1,nsoilmx) 128 real co2iceS(iip1,jjp1)129 120 real emisS(iip1,jjp1) 130 121 REAL q2S(iip1,jjp1,llm+1),qsurfS(iip1,jjp1,nqtot) 131 real tslabS(iip1,jjp1,noceanmx) 132 real pctsrf_sicS(iip1,jjp1),tsea_iceS(iip1,jjp1) 133 real rnatS(iip1,jjp1), sea_iceS(iip1,jjp1) 134 135 real ptotal, co2icetotal 122 123 real ptotal 136 124 137 125 c Var intermediaires : vent naturel, mais pas coord scalaire … … 156 144 real, dimension(:,:,:), allocatable :: inertiedatoldnew 157 145 real, dimension(:,:), allocatable :: psold,phisold 158 real, dimension(:,:), allocatable :: co2iceold159 146 real, dimension(:,:), allocatable :: tsurfold 160 147 real, dimension(:,:), allocatable :: emisold 161 148 real, dimension(:,:,:,:), allocatable :: qold 162 real, dimension(:,:,:), allocatable :: tslabold163 real, dimension(:,:), allocatable :: rnatold,pctsrf_sicold164 real, dimension(:,:), allocatable :: tsea_iceold,sea_iceold165 166 149 167 150 real tab_cntrl(100) 168 151 169 real ptotalold , co2icetotalold152 real ptotalold 170 153 171 154 logical :: olddepthdef=.false. ! flag … … 300 283 allocate(phisold(imold+1,jmold+1)) 301 284 allocate(qold(imold+1,jmold+1,lmold,nqtot)) 302 allocate(co2iceold(imold+1,jmold+1))303 285 allocate(tsurfold(imold+1,jmold+1)) 304 286 allocate(emisold(imold+1,jmold+1)) … … 313 295 allocate(mlayerold(nsoilold)) 314 296 allocate(qsurfold(imold+1,jmold+1,nqtot)) 315 allocate(tslabold(imold+1,jmold+1,noceanmx))316 allocate(rnatold(imold+1,jmold+1))317 allocate(pctsrf_sicold(imold+1,jmold+1))318 allocate(tsea_iceold(imold+1,jmold+1))319 allocate(sea_iceold(imold+1,jmold+1))320 297 321 298 allocate(var (imold+1,jmold+1,llm)) … … 332 309 C----------------------------------------------------------------------- 333 310 c 3.1. Lecture du tableau des parametres du run 334 c (pour la lecture ulterieure de "ptotalold" et "co2icetotalold")311 c (pour la lecture ulterieure de "ptotalold") 335 312 c----------------------------------------------------------------------- 336 313 c … … 556 533 557 534 C----------------------------------------------------------------------- 558 c lecture de "ptotalold" et "co2icetotalold"535 c lecture de "ptotalold" 559 536 c----------------------------------------------------------------------- 560 537 ptotalold = tab_cntrl(tab0+49) 561 co2icetotalold = tab_cntrl(tab0+50)562 538 563 539 c----------------------------------------------------------------------- … … 636 612 637 613 c----------------------------------------------------------------------- 638 c 5.1 Lecture des champs 2D ( co2ice,emis,ps,tsurf,Tg[10], qsurf)614 c 5.1 Lecture des champs 2D (emis,ps,tsurf,Tg[10], qsurf) 639 615 c----------------------------------------------------------------------- 640 616 … … 642 618 count=(/imold+1,jmold+1,1,0/) 643 619 644 ! CO2ice is now in qsurf(igcm_co2_ice) ... 645 ! ierr = NF_INQ_VARID (nid, "co2ice", nvarid) 646 ! IF (ierr .NE. NF_NOERR) THEN 647 ! PRINT*, "lect_start_archive: Le champ <co2ice> est absent" 648 ! CALL abort 649 ! ENDIF 650 !#ifdef NC_DOUBLE 651 ! ierr = NF_GET_VARA_DOUBLE(nid, nvarid,start,count,co2iceold) 652 !#else 653 ! ierr = NF_GET_VARA_REAL(nid, nvarid,start,count,co2iceold) 654 !#endif 655 ! IF (ierr .NE. NF_NOERR) THEN 656 ! PRINT*, "lect_start_archive: Lecture echouee pour <co2ice>" 657 ! PRINT*, NF_STRERROR(ierr) 658 ! CALL abort 659 ! ENDIF 660 c 620 661 621 ierr = NF_INQ_VARID (nid, "emis", nvarid) 662 622 IF (ierr .NE. NF_NOERR) THEN … … 718 678 CALL abort 719 679 ENDIF 720 c 721 cc Slab ocean 722 if(ok_slab_ocean) then 723 start=(/1,1,1,memo/) 724 count=(/imold+1,jmold+1,noceanmx,1/) 725 726 ierr=NF_INQ_VARID(nid,"tslab",nvarid) 727 IF (ierr.ne.NF_NOERR) then 728 PRINT*,"lect_start_archive: Cannot find <tslab>" 729 ENDIF 730 #ifdef NC_DOUBLE 731 ierr=NF_GET_VARA_DOUBLE(nid,nvarid,start,count,tslabold) 732 #else 733 ierr=NF_GET_VARA_REAL(nid,nvarid,start,count,tslabold) 734 #endif 735 IF (ierr .NE. NF_NOERR) THEN 736 PRINT*, "lect_start_archive: Lecture echouee pour <tslab>" 737 ENDIF 738 739 740 c 741 start=(/1,1,memo,0/) 742 count=(/imold+1,jmold+1,1,0/) 743 744 ierr = NF_INQ_VARID (nid, "rnat", nvarid) 745 IF (ierr .NE. NF_NOERR) THEN 746 PRINT*, "lect_start_archive: Le champ <rnat> est absent" 747 ENDIF 748 #ifdef NC_DOUBLE 749 ierr = NF_GET_VARA_DOUBLE(nid, nvarid,start,count,rnatold) 750 #else 751 ierr = NF_GET_VARA_REAL(nid, nvarid,start,count,rnatold) 752 #endif 753 IF (ierr .NE. NF_NOERR) THEN 754 PRINT*, "lect_start_archive: Lecture echouee pour <rnat>" 755 ENDIF 756 c 757 ierr = NF_INQ_VARID (nid, "pctsrf_sic", nvarid) 758 IF (ierr .NE. NF_NOERR) THEN 759 PRINT*, "lect_start_archive: Le champ <pctsrf_sic> est absent" 760 ENDIF 761 #ifdef NC_DOUBLE 762 ierr = NF_GET_VARA_DOUBLE(nid, nvarid,start,count,pctsrf_sicold) 763 #else 764 ierr = NF_GET_VARA_REAL(nid, nvarid,start,count,pctsrf_sicold) 765 #endif 766 IF (ierr .NE. NF_NOERR) THEN 767 PRINT*, "lect_start_archive: Lecture echouee pour <pctsrf_sic>" 768 ENDIF 769 c 770 ierr = NF_INQ_VARID (nid, "tsea_ice", nvarid) 771 IF (ierr .NE. NF_NOERR) THEN 772 PRINT*, "lect_start_archive: Le champ <tsea_ice> est absent" 773 ENDIF 774 #ifdef NC_DOUBLE 775 ierr = NF_GET_VARA_DOUBLE(nid, nvarid,start,count,tsea_iceold) 776 #else 777 ierr = NF_GET_VARA_REAL(nid, nvarid,start,count,tsea_iceold) 778 #endif 779 IF (ierr .NE. NF_NOERR) THEN 780 PRINT*, "lect_start_archive: Lecture echouee pour <tsea_ice>" 781 ENDIF 782 c 783 ierr = NF_INQ_VARID (nid, "sea_ice", nvarid) 784 IF (ierr .NE. NF_NOERR) THEN 785 PRINT*, "lect_start_archive: Le champ <sea_ice> est absent" 786 ENDIF 787 #ifdef NC_DOUBLE 788 ierr = NF_GET_VARA_DOUBLE(nid, nvarid,start,count,sea_iceold) 789 #else 790 ierr = NF_GET_VARA_REAL(nid, nvarid,start,count,sea_iceold) 791 #endif 792 IF (ierr .NE. NF_NOERR) THEN 793 PRINT*, "lect_start_archive: Lecture echouee pour <sea_ice>" 794 ENDIF 795 796 ENDIF! ok_slab_ocean 680 797 681 c 798 682 write(*,*)"lect_start_archive: rlonuold:" … … 813 697 814 698 DO iq=1,nqtot 815 txt=trim(tname(iq))//"_surf"816 if (txt.eq."h2o_vap") then817 ! There is no surface tracer for h2o_vap;818 ! "h2o_ice" should be loaded instead819 txt="h2o_ice_surf"820 write(*,*) 'lect_start_archive: loading surface tracer',821 & ' h2o_ice instead of h2o_vap'822 endif823 824 699 825 700 write(*,*) "lect_start_archive: loading tracer ",trim(txt) … … 1045 920 & rlonuold,rlatvold,rlonu,rlatv) 1046 921 1047 ! CO2 ice is now in qsurf(igcm_co2_ice)1048 ! call interp_horiz (co2iceold,co2ices,imold,jmold,iim,jjm,1,1049 ! & rlonuold,rlatvold,rlonu,rlatv)1050 1051 922 c Temperature de surface 1052 923 call interp_horiz (tsurfold,tsurfs,imold,jmold,iim,jjm,1, … … 1088 959 END DO 1089 960 END DO 1090 co2icetotal = 0. 1091 if (igcm_co2_ice.ne.0) then 1092 ! recast surface CO2 ice on new grid 1093 call interp_horiz(qsurfold(1,1,igcm_co2_ice), 1094 & qsurfs(1,1,igcm_co2_ice), 1095 & imold,jmold,iim,jjm,1, 1096 & rlonuold,rlatvold,rlonu,rlatv) 1097 DO j=1,jjp1 1098 DO i=1,iim 1099 !co2icetotal = co2icetotal + co2iceS(i,j)*aire(i,j) 1100 co2icetotal=co2icetotal+qsurfS(i,j,igcm_co2_ice)*aire(i,j) 1101 END DO 1102 END DO 1103 else 1104 write(*,*) "Warning: No co2_ice surface tracer" 1105 endif 961 1106 962 1107 963 write(*,*) … … 1110 966 write (*,*) 'Ratio new atm./ old atm =', ptotal/ptotalold 1111 967 write(*,*) 1112 write(*,*)'Ancienne grille: masse de la glace CO2:',co2icetotalold1113 write(*,*)'Nouvelle grille: masse de la glace CO2:',co2icetotal1114 if (co2icetotalold.ne.0.) then1115 write(*,*)'Ratio new ice./old ice =',co2icetotal/co2icetotalold1116 endif1117 write(*,*)1118 1119 968 1120 969 DO j=1,jjp1 … … 1124 973 END DO 1125 974 1126 if ( co2icetotalold.gt.0.) then1127 ! DO j=1,jjp11128 ! DO i=1,iip11129 ! co2iceS(i,j)=co2iceS(i,j) * co2icetotalold/co2icetotal1130 ! END DO1131 ! END DO1132 write(*,*) "Not enforcing conservation of surface CO2 ice"1133 write(*,*) " (should be OK when CO2 ice is a tracer)"1134 end if1135 975 1136 976 c----------------------------------------------------------------------- … … 1290 1130 1291 1131 c----------------------------------------------------------------------- 1292 c 6.3 Slab Ocean : 1293 c----------------------------------------------------------------------- 1294 call interp_horiz (tslabold,tslabs,imold,jmold,iim,jjm,noceanmx, 1295 & rlonuold,rlatvold,rlonu,rlatv) 1296 call gr_dyn_fi (noceanmx,iim+1,jjm+1,ngrid,tslabs,tslab) 1297 1298 call interp_horiz (rnatold,rnats,imold,jmold,iim,jjm,1, 1299 & rlonuold,rlatvold,rlonu,rlatv) 1300 call gr_dyn_fi (1,iim+1,jjm+1,ngrid,rnats,rnat) 1301 1302 call interp_horiz (pctsrf_sicold,pctsrf_sics,imold,jmold,iim, 1303 & jjm,1,rlonuold,rlatvold,rlonu,rlatv) 1304 call gr_dyn_fi (1,iim+1,jjm+1,ngrid,pctsrf_sics,pctsrf_sic) 1305 1306 call interp_horiz (tsea_iceold,tsea_ices,imold,jmold,iim,jjm,1, 1307 & rlonuold,rlatvold,rlonu,rlatv) 1308 call gr_dyn_fi (1,iim+1,jjm+1,ngrid,tsea_ices,tsea_ice) 1309 1310 call interp_horiz (sea_iceold,sea_ices,imold,jmold,iim,jjm,1, 1311 & rlonuold,rlatvold,rlonu,rlatv) 1312 call gr_dyn_fi (1,iim+1,jjm+1,ngrid,sea_ices,sea_ice) 1313 1314 c----------------------------------------------------------------------- 1315 c 6.4 Variable 3d : 1132 c 6.3 Variable 3d : 1316 1133 c----------------------------------------------------------------------- 1317 1134 … … 1434 1251 end do 1435 1252 enddo 1436 1437 ! call gr_dyn_fi (1,iim+1,jjm+1,ngrid,co2ices,co2ice)1438 ! no need to transfer "co2ice" any more; it is in qsurf(igcm_co2_ice)1439 1253 1440 1254 endif !! if nqtot .ne. 0 … … 1470 1284 deallocate(phisold) 1471 1285 deallocate(qold) 1472 deallocate(co2iceold)1473 1286 deallocate(tsurfold) 1474 1287 deallocate(emisold) … … 1482 1295 deallocate(qsurfold) 1483 1296 deallocate(var,varp1) 1484 deallocate(tslabold)1485 deallocate(rnatold)1486 deallocate(pctsrf_sicold)1487 deallocate(tsea_iceold)1488 deallocate(sea_iceold)1489 1297 1490 1298 ! write(*,*)'lect_start_archive: END' -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/newstart.F
r1644 r1647 19 19 & is_master 20 20 use infotrac, only: infotrac_init, nqtot, tname 21 USE tracer_h, ONLY: igcm_co2_ice, igcm_h2o_vap, igcm_h2o_ice22 21 USE comsoil_h, ONLY: nsoilmx, layer, mlayer, inertiedat 23 22 USE surfdat_h, ONLY: phisfi, albedodat, … … 28 27 use phyredem, only: physdem0, physdem1 29 28 use iostart, only: open_startphy 30 use slab_ice_h, only:noceanmx31 29 use filtreg_mod, only: inifilr 32 30 USE mod_const_mpi, ONLY: COMM_LMDZ … … 95 93 REAL tsurf(ngridmx) ! surface temperature 96 94 REAL,ALLOCATABLE :: tsoil(:,:) ! soil temperature 97 ! REAL co2ice(ngridmx) ! CO2 ice layer98 95 REAL emis(ngridmx) ! surface emissivity 99 96 real emisread ! added by RW … … 109 106 real mugaz ! molar mass of the atmosphere 110 107 111 integer ierr 112 113 REAL rnat(ngridmx) 114 REAL,ALLOCATABLE :: tslab(:,:) ! slab ocean temperature 115 REAL pctsrf_sic(ngridmx) ! sea ice cover 116 REAL tsea_ice(ngridmx) ! temperature sea_ice 117 REAL sea_ice(ngridmx) ! mass of sea ice (kg/m2) 108 integer ierr 118 109 119 110 c Variables on the new grid along scalar points … … 153 144 logical :: flagtset=.false. , flagps0=.false. 154 145 real val, val2, val3, val4 ! to store temporary variables 155 real :: iceith=2000 ! thermal inertia of subterranean ice156 146 157 147 INTEGER :: itau … … 165 155 ! added by BC for equilibrium temperature startup 166 156 real teque 167 168 ! added by BC for cloud fraction setup169 REAL hice(ngridmx),cloudfrac(ngridmx,llm)170 REAL totalfrac(ngridmx)171 172 157 173 158 ! added by RW for nuketharsis … … 209 194 allocate(tsoil(ngridmx,nsoilmx)) 210 195 allocate(ith(iip1,jjp1,nsoilmx),ithfi(ngridmx,nsoilmx)) 211 allocate(tslab(ngridmx,nsoilmx))212 196 213 197 c======================================================================= … … 355 339 CALL phyetat0 (ngridmx,llm,fichnom,tab0,Lmodif,nsoilmx, 356 340 . nqtot,day_ini,time, 357 . tsurf,tsoil,emis,q2,qsurf, !) ! temporary modif by RDW 358 . cloudfrac,totalfrac,hice,rnat,pctsrf_sic,tslab,tsea_ice, 359 . sea_ice) 341 . tsurf,tsoil,emis,q2,qsurf) 360 342 361 343 ! copy albedo and soil thermal inertia on (local) physics grid … … 549 531 & date,tsurf,tsoil,emis,q2, 550 532 & t,ucov,vcov,ps,teta,phisold_newgrid,q,qsurf, 551 & surfith,nid, 552 & rnat,pctsrf_sic,tslab,tsea_ice,sea_ice) 533 & surfith,nid) 553 534 write(*,*) "OK, read start_archive file" 554 535 ! copy soil thermal inertia … … 784 765 else if (trim(modif).eq.'ptot') then 785 766 786 ! check if we have a co2_ice surface tracer:787 if (igcm_co2_ice.eq.0) then788 write(*,*) " No surface CO2 ice !"789 write(*,*) " only atmospheric pressure will be considered!"790 endif791 767 c calcul de la pression totale glace + atm actuelle 792 768 patm=0. … … 800 776 patm = patm + ps(i,j)*aire(i,j) 801 777 airetot= airetot + aire(i,j) 802 if (igcm_co2_ice.ne.0) then803 !pcap = pcap + aire(i,j)*co2ice(ig)*g804 pcap = pcap + aire(i,j)*qsurf(ig,igcm_co2_ice)*g805 endif806 778 ENDDO 807 779 ENDDO 808 780 ptoto = pcap + patm 809 781 810 print*,'Current total pressure at surface ( co2 ice +atm) ',782 print*,'Current total pressure at surface (atm) ', 811 783 & ptoto/airetot 812 784 … … 1048 1020 else if (trim(modif) .eq. 'wetstart') then 1049 1021 ! check that there is indeed a water vapor tracer 1050 if (igcm_h2o_vap.eq.0) then 1022 1051 1023 write(*,*) "No water vapour tracer! Can't use this option" 1052 1024 stop 1053 endif1054 DO l=1,llm1055 DO j=1,jjp11056 DO i=1,iip11057 q(i,j,l,igcm_h2o_vap)=150.e-6 * (rlatu(j)+pi/2.) / pi1058 ENDDO1059 ENDDO1060 ENDDO1061 1062 write(*,*) 'Water mass mixing ratio at north pole='1063 * ,q(1,1,1,igcm_h2o_vap)1064 write(*,*) '---------------------------south pole='1065 * ,q(1,jjp1,1,igcm_h2o_vap)1066 1025 1067 1026 c noglacier : remove tropical water ice (to initialize high res sim) 1068 1027 c -------------------------------------------------- 1069 1028 else if (trim(modif) .eq. 'noglacier') then 1070 if (igcm_h2o_ice.eq.0) then1029 1071 1030 write(*,*) "No water ice tracer! Can't use this option" 1072 1031 stop 1073 endif 1074 do ig=1,ngridmx 1075 j=(ig-2)/iim +2 1076 if(ig.eq.1) j=1 1077 write(*,*) 'OK: remove surface ice for |lat|<45' 1078 if (abs(rlatu(j)*180./pi).lt.45.) then 1079 qsurf(ig,igcm_h2o_ice)=0. 1080 end if 1081 end do 1032 1082 1033 1083 1034 … … 1085 1036 c -------------------------------------------------- 1086 1037 else if (trim(modif) .eq. 'watercapn') then 1087 if (igcm_h2o_ice.eq.0) then1038 1088 1039 write(*,*) "No water ice tracer! Can't use this option" 1089 1040 stop 1090 endif1091 1092 DO j=1,jjp11093 DO i=1,iim1094 ig=1+(j-2)*iim +i1095 if(j.eq.1) ig=11096 if(j.eq.jjp1) ig=ngridmx1097 1098 if (rlatu(j)*180./pi.gt.80.) then1099 qsurf(ig,igcm_h2o_ice)=3.4e31100 !do isoil=1,nsoilmx1101 ! ith(i,j,isoil) = 18000. ! thermal inertia1102 !enddo1103 write(*,*)' ==> Ice mesh North boundary (deg)= ',1104 & rlatv(j-1)*180./pi1105 end if1106 ENDDO1107 ENDDO1108 CALL gr_dyn_fi(nsoilmx,iip1,jjp1,ngridmx,ith,ithfi)1109 1110 c$$$ do ig=1,ngridmx1111 c$$$ j=(ig-2)/iim +21112 c$$$ if(ig.eq.1) j=11113 c$$$ if (rlatu(j)*180./pi.gt.80.) then1114 c$$$1115 c$$$ qsurf(ig,igcm_h2o_ice)=1.e51116 c$$$ qsurf(ig,igcm_h2o_vap)=0.0!1.e51117 c$$$1118 c$$$ write(*,*) 'ig=',ig,' H2O ice mass (kg/m2)= ',1119 c$$$ & qsurf(ig,igcm_h2o_ice)1120 c$$$1121 c$$$ write(*,*)' ==> Ice mesh South boundary (deg)= ',1122 c$$$ & rlatv(j)*180./pi1123 c$$$ end if1124 c$$$ enddo1125 1041 1126 1042 c watercaps : H20 ice on permanent southern cap 1127 1043 c ------------------------------------------------- 1128 1044 else if (trim(modif) .eq. 'watercaps') then 1129 if (igcm_h2o_ice.eq.0) then 1045 1130 1046 write(*,*) "No water ice tracer! Can't use this option" 1131 1047 stop 1132 endif1133 1134 DO j=1,jjp11135 DO i=1,iim1136 ig=1+(j-2)*iim +i1137 if(j.eq.1) ig=11138 if(j.eq.jjp1) ig=ngridmx1139 1140 if (rlatu(j)*180./pi.lt.-80.) then1141 qsurf(ig,igcm_h2o_ice)=3.4e31142 !do isoil=1,nsoilmx1143 ! ith(i,j,isoil) = 18000. ! thermal inertia1144 !enddo1145 write(*,*)' ==> Ice mesh South boundary (deg)= ',1146 & rlatv(j-1)*180./pi1147 end if1148 ENDDO1149 ENDDO1150 CALL gr_dyn_fi(nsoilmx,iip1,jjp1,ngridmx,ith,ithfi)1151 1152 c$$$ do ig=1,ngridmx1153 c$$$ j=(ig-2)/iim +21154 c$$$ if(ig.eq.1) j=11155 c$$$ if (rlatu(j)*180./pi.lt.-80.) then1156 c$$$ qsurf(ig,igcm_h2o_ice)=1.e51157 c$$$ qsurf(ig,igcm_h2o_vap)=0.0 !1.e51158 c$$$1159 c$$$ write(*,*) 'ig=',ig,' H2O ice mass (kg/m2)= ',1160 c$$$ & qsurf(ig,igcm_h2o_ice)1161 c$$$ write(*,*)' ==> Ice mesh North boundary (deg)= ',1162 c$$$ & rlatv(j-1)*180./pi1163 c$$$ end if1164 c$$$ enddo1165 1166 1048 1167 1049 c noacglac : H2O ice across highest terrain 1168 1050 c -------------------------------------------- 1169 1051 else if (trim(modif) .eq. 'noacglac') then 1170 if (igcm_h2o_ice.eq.0) then 1052 1171 1053 write(*,*) "No water ice tracer! Can't use this option" 1172 1054 stop 1173 endif1174 DO j=1,jjp11175 DO i=1,iim1176 ig=1+(j-2)*iim +i1177 if(j.eq.1) ig=11178 if(j.eq.jjp1) ig=ngridmx1179 1180 if(phis(i,j).gt.1000.*g)then1181 alb(i,j) = 0.5 ! snow value1182 do isoil=1,nsoilmx1183 ith(i,j,isoil) = 18000. ! thermal inertia1184 ! this leads to rnat set to 'ocean' in physiq.F901185 ! actually no, because it is soil not surface1186 enddo1187 endif1188 ENDDO1189 ENDDO1190 CALL gr_dyn_fi(nsoilmx,iip1,jjp1,ngridmx,ith,ithfi)1191 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,alb,albfi)1192 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,phis,phisfi)1193 1194 1195 1055 1196 1056 c oborealis : H2O oceans across Vastitas Borealis 1197 1057 c ----------------------------------------------- 1198 1058 else if (trim(modif) .eq. 'oborealis') then 1199 if (igcm_h2o_ice.eq.0) then 1059 1200 1060 write(*,*) "No water ice tracer! Can't use this option" 1201 1061 stop 1202 endif 1203 DO j=1,jjp1 1204 DO i=1,iim 1205 ig=1+(j-2)*iim +i 1206 if(j.eq.1) ig=1 1207 if(j.eq.jjp1) ig=ngridmx 1208 1209 if(phis(i,j).lt.-4000.*g)then 1210 ! if( (phis(i,j).lt.-4000.*g) 1211 ! & .and. (rlatu(j)*180./pi.lt.0.) )then ! south hemisphere only 1212 ! phis(i,j)=-8000.0*g ! proper ocean 1213 phis(i,j)=-4000.0*g ! scanty ocean 1214 1215 alb(i,j) = 0.07 ! oceanic value 1216 do isoil=1,nsoilmx 1217 ith(i,j,isoil) = 18000. ! thermal inertia 1218 ! this leads to rnat set to 'ocean' in physiq.F90 1219 ! actually no, because it is soil not surface 1220 enddo 1221 endif 1222 ENDDO 1223 ENDDO 1224 CALL gr_dyn_fi(nsoilmx,iip1,jjp1,ngridmx,ith,ithfi) 1225 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,alb,albfi) 1226 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,phis,phisfi) 1227 1062 1228 1063 c iborealis : H2O ice in Northern plains 1229 1064 c -------------------------------------- 1230 1065 else if (trim(modif) .eq. 'iborealis') then 1231 if (igcm_h2o_ice.eq.0) then 1066 1232 1067 write(*,*) "No water ice tracer! Can't use this option" 1233 1068 stop 1234 endif1235 DO j=1,jjp11236 DO i=1,iim1237 ig=1+(j-2)*iim +i1238 if(j.eq.1) ig=11239 if(j.eq.jjp1) ig=ngridmx1240 1241 if(phis(i,j).lt.-4000.*g)then1242 !qsurf(ig,igcm_h2o_ice)=1.e31243 qsurf(ig,igcm_h2o_ice)=241.4 ! to make total 33 kg m^-21244 endif1245 ENDDO1246 ENDDO1247 CALL gr_dyn_fi(nsoilmx,iip1,jjp1,ngridmx,ith,ithfi)1248 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,alb,albfi)1249 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,phis,phisfi)1250 1251 1069 1252 1070 c oceanball : H2O liquid everywhere 1253 1071 c ---------------------------- 1254 1072 else if (trim(modif) .eq. 'oceanball') then 1255 if (igcm_h2o_ice.eq.0) then 1073 1256 1074 write(*,*) "No water ice tracer! Can't use this option" 1257 1075 stop 1258 endif1259 DO j=1,jjp11260 DO i=1,iim1261 ig=1+(j-2)*iim +i1262 if(j.eq.1) ig=11263 if(j.eq.jjp1) ig=ngridmx1264 1265 qsurf(ig,igcm_h2o_vap)=0.0 ! for ocean, this is infinite source1266 qsurf(ig,igcm_h2o_ice)=0.01267 alb(i,j) = 0.07 ! ocean value1268 1269 do isoil=1,nsoilmx1270 ith(i,j,isoil) = 18000. ! thermal inertia1271 !ith(i,j,isoil) = 50. ! extremely low for test1272 ! this leads to rnat set to 'ocean' in physiq.F901273 enddo1274 1275 ENDDO1276 ENDDO1277 CALL gr_dyn_fi(nsoilmx,iip1,jjp1,ngridmx,ith,ithfi)1278 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,alb,albfi)1279 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,phis,phisfi)1280 1076 1281 1077 c iceball : H2O ice everywhere 1282 1078 c ---------------------------- 1283 1079 else if (trim(modif) .eq. 'iceball') then 1284 if (igcm_h2o_ice.eq.0) then 1080 1285 1081 write(*,*) "No water ice tracer! Can't use this option" 1286 1082 stop 1287 endif1288 DO j=1,jjp11289 DO i=1,iim1290 ig=1+(j-2)*iim +i1291 if(j.eq.1) ig=11292 if(j.eq.jjp1) ig=ngridmx1293 1294 qsurf(ig,igcm_h2o_vap)=-50. ! for ocean, this is infinite source1295 qsurf(ig,igcm_h2o_ice)=50. ! == to 0.05 m of oceanic ice1296 alb(i,j) = 0.6 ! ice albedo value1297 1298 do isoil=1,nsoilmx1299 !ith(i,j,isoil) = 18000. ! thermal inertia1300 ! this leads to rnat set to 'ocean' in physiq.F901301 enddo1302 1303 ENDDO1304 ENDDO1305 CALL gr_dyn_fi(nsoilmx,iip1,jjp1,ngridmx,ith,ithfi)1306 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,alb,albfi)1307 1083 1308 1084 c supercontinent : H2O ice everywhere 1309 1085 c ---------------------------- 1310 1086 else if (trim(modif) .eq. 'supercontinent') then 1311 write(*,*) 'Minimum longitude (-180,180)' 1312 read(*,*) val 1313 write(*,*) 'Maximum longitude (-180,180)' 1314 read(*,*) val2 1315 write(*,*) 'Minimum latitude (-90,90)' 1316 read(*,*) val3 1317 write(*,*) 'Maximum latitude (-90,90)' 1318 read(*,*) val4 1319 1320 do j=1,jjp1 1321 do i=1,iip1 1322 ig=1+(j-2)*iim +i 1323 if(j.eq.1) ig=1 1324 if(j.eq.jjp1) ig=ngridmx 1325 1326 c Supercontinent: 1327 if (((rlatu(j)*180./pi.le.val4).and. 1328 & (rlatu(j)*180./pi.ge.val3).and. 1329 & (rlonv(i)*180./pi.le.val2).and. 1330 & (rlonv(i)*180./pi.ge.val))) then 1331 1332 rnat(ig)=1. 1333 alb(i,j) = 0.3 1334 do isoil=1,nsoilmx 1335 ith(i,j,isoil) = 2000. 1336 enddo 1337 c Ocean: 1338 else 1339 rnat(ig)=0. 1340 alb(i,j) = 0.07 1341 do isoil=1,nsoilmx 1342 ith(i,j,isoil) = 18000. 1343 enddo 1344 end if 1345 1346 enddo 1347 enddo 1348 CALL gr_dyn_fi(nsoilmx,iip1,jjp1,ngridmx,ith,ithfi) 1349 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,alb,albfi) 1087 1088 write(*,*) "No water ice tracer! Can't use this option" 1089 stop 1350 1090 1351 1091 c isotherm : Isothermal temperatures and no winds … … 1445 1185 c ------------------------------------------------ 1446 1186 else if (trim(modif) .eq. 'co2ice=0') then 1447 ! check that there is indeed a co2_ice tracer ...1448 if (igcm_co2_ice.ne.0) then1449 do ig=1,ngridmx1450 !co2ice(ig)=01451 qsurf(ig,igcm_co2_ice)=01452 emis(ig)=emis(ngridmx/2)1453 end do1454 else1455 1187 write(*,*) "Can't remove CO2 ice!! (no co2_ice tracer)" 1456 endif1188 1457 1189 1458 1190 ! therm_ini_s: (re)-set soil thermal inertia to reference surface values … … 1484 1216 c ------------------------------------------------ 1485 1217 else if (trim(modif) .eq. 'slab_ocean_0') then 1486 write(*,*)'OK: initialisation of slab ocean' 1487 1488 DO ig=1, ngridmx 1489 rnat(ig)=1. 1490 tslab(ig,1)=0. 1491 tslab(ig,2)=0. 1492 tsea_ice(ig)=0. 1493 sea_ice(ig)=0. 1494 pctsrf_sic(ig)=0. 1495 1496 if(ithfi(ig,1).GT.10000.)then 1497 rnat(ig)=0. 1498 phisfi(ig)=0. 1499 tsea_ice(ig)=273.15-1.8 1500 tslab(ig,1)=tsurf(ig) 1501 tslab(ig,2)=tsurf(ig)!*2./3.+(273.15-1.8)/3. 1502 endif 1503 1504 ENDDO 1505 CALL gr_fi_dyn(1,ngridmx,iip1,jjp1,phisfi,phis) 1506 1507 1218 1219 write(*,*) "No ocean yet on Titan ! Can't use this option" 1220 stop 1508 1221 1509 1222 else … … 1517 1230 999 continue 1518 1231 1519 1520 c=======================================================================1521 c Initialisation for cloud fraction and oceanic ice (added by BC 2010)1522 c=======================================================================1523 DO ig=1, ngridmx1524 totalfrac(ig)=0.51525 DO l=1,llm1526 cloudfrac(ig,l)=0.51527 ENDDO1528 ! Ehouarn, march 2012: also add some initialisation for hice1529 hice(ig)=0.01530 ENDDO1531 1232 1532 c========================================================1533 1534 ! DO ig=1,ngridmx1535 ! IF(tsurf(ig) .LT. 273.16-1.8) THEN1536 ! hice(ig)=(273.16-1.8-tsurf(ig))/(273.16-1.8-240)*1.1537 ! hice(ig)=min(hice(ig),1.0)1538 ! ENDIF1539 ! ENDDO1540 1541 1542 1543 1233 1544 1234 c======================================================================= … … 1647 1337 call physdem1("restartfi.nc",nsoilmx,ngridmx,llm,nqtot, 1648 1338 & dtphys,real(day_ini), 1649 & tsurf,tsoil,emis,q2,qsurf, 1650 & cloudfrac,totalfrac,hice, 1651 & rnat,pctsrf_sic,tslab,tsea_ice,sea_ice) 1339 & tsurf,tsoil,emis,q2,qsurf) 1652 1340 1653 1341 c======================================================================= -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/start2archive.F
r1644 r1647 25 25 ! use control_mod 26 26 ! use comgeomphy, only: initcomgeomphy 27 use slab_ice_h, only: noceanmx28 27 ! to use 'getin' 29 28 USE ioipsl_getincom … … 31 30 USE mod_const_mpi, ONLY: COMM_LMDZ 32 31 USE control_mod, only: planet_type 33 USE callkeys_mod, ONLY: ok_slab_ocean34 32 use filtreg_mod, only: inifilr 35 33 USE comvert_mod, ONLY: ap,bp … … 72 70 REAL tsurf(ngridmx) ! Surface temperature 73 71 REAL,ALLOCATABLE :: tsoil(:,:) ! Soil temperature 74 REAL co2ice(ngridmx) ! CO2 ice layer75 72 REAL q2(ngridmx,llm+1) 76 73 REAL,ALLOCATABLE :: qsurf(:,:) … … 82 79 INTEGER*4 day_ini_fi 83 80 84 ! added by FF for cloud fraction setup85 REAL hice(ngridmx)86 REAL cloudfrac(ngridmx,llm),totalcloudfrac(ngridmx)87 88 ! added by BC for slab ocean89 REAL rnat(ngridmx),pctsrf_sic(ngridmx),sea_ice(ngridmx)90 REAL tslab(ngridmx,noceanmx),tsea_ice(ngridmx)91 92 81 93 82 c Variable naturelle / grille scalaire … … 97 86 REAL,ALLOCATABLE :: tsoilS(:,:) 98 87 REAL,ALLOCATABLE :: ithS(:,:) ! Soil Thermal Inertia 99 REAL co2iceS(ip1jmp1)100 88 REAL q2S(ip1jmp1,llm+1) 101 89 REAL,ALLOCATABLE :: qsurfS(:,:) 102 90 REAL emisS(ip1jmp1) 103 104 ! added by FF for cloud fraction setup105 REAL hiceS(ip1jmp1)106 REAL cloudfracS(ip1jmp1,llm),totalcloudfracS(ip1jmp1)107 108 ! added by BC for slab ocean109 REAL rnatS(ip1jmp1),pctsrf_sicS(ip1jmp1),sea_iceS(ip1jmp1)110 REAL tslabS(ip1jmp1,noceanmx),tsea_iceS(ip1jmp1)111 91 112 92 … … 120 100 INTEGER Lmodif 121 101 122 REAL ptotal , co2icetotal102 REAL ptotal 123 103 REAL timedyn,timefi !fraction du jour dans start, startfi 124 104 REAL date … … 236 216 CALL phyetat0 (ngridmx,llm,fichnom,0,Lmodif,nsoilmx,nqtot, 237 217 . day_ini_fi,timefi, 238 . tsurf,tsoil,emis,q2,qsurf, 239 ! change FF 05/2011 240 . cloudfrac,totalcloudfrac,hice, 241 ! change BC 05/2014 242 . rnat,pctsrf_sic,tslab,tsea_ice,sea_ice) 243 218 . tsurf,tsoil,emis,q2,qsurf) 244 219 245 220 … … 328 303 c 329 304 c tsurf --> tsurfS 330 c co2ice --> co2iceS331 305 c tsoil --> tsoilS 332 306 c emis --> emisS … … 337 311 338 312 call gr_fi_dyn(1,ngridmx,iip1,jjp1,tsurf,tsurfS) 339 ! call gr_fi_dyn(1,ngridmx,iip1,jjp1,co2ice,co2iceS)340 313 call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,tsoil,tsoilS) 341 314 ! Note: thermal inertia "inertiedat" is in comsoil.h … … 344 317 call gr_fi_dyn(llm+1,ngridmx,iip1,jjp1,q2,q2S) 345 318 call gr_fi_dyn(nqtot,ngridmx,iip1,jjp1,qsurf,qsurfS) 346 call gr_fi_dyn(llm,ngridmx,iip1,jjp1,cloudfrac,cloudfracS)347 call gr_fi_dyn(1,ngridmx,iip1,jjp1,hice,hiceS)348 call gr_fi_dyn(1,ngridmx,iip1,jjp1,totalcloudfrac,totalcloudfracS)349 350 call gr_fi_dyn(1,ngridmx,iip1,jjp1,rnat,rnatS)351 call gr_fi_dyn(1,ngridmx,iip1,jjp1,pctsrf_sic,pctsrf_sicS)352 call gr_fi_dyn(1,ngridmx,iip1,jjp1,tsea_ice,tsea_iceS)353 call gr_fi_dyn(1,ngridmx,iip1,jjp1,sea_ice,sea_iceS)354 call gr_fi_dyn(noceanmx,ngridmx,iip1,jjp1,tslab,tslabS)355 319 356 320 c======================================================================= … … 359 323 360 324 ptotal = 0. 361 co2icetotal = 0.362 325 DO j=1,jjp1 363 326 DO i=1,iim 364 327 ptotal=ptotal+aire(i+(iim+1)*(j-1))*ps(i+(iim+1)*(j-1))/g 365 ! co2icetotal = co2icetotal +366 ! & co2iceS(i+(iim+1)*(j-1))*aire(i+(iim+1)*(j-1))367 328 ENDDO 368 329 ENDDO 369 330 write(*,*)'Ancienne grille : masse de l''atm :',ptotal 370 ! write(*,*)'Ancienne grille : masse de la glace CO2 :',co2icetotal 371 372 c----------------------------------------------------------------------- 373 c Passage de "ptotal" et "co2icetotal" par tab_cntrl_fi 331 332 c----------------------------------------------------------------------- 333 c Passage de "ptotal" par tab_cntrl_fi 374 334 c----------------------------------------------------------------------- 375 335 376 336 tab_cntrl_fi(49) = ptotal 377 tab_cntrl_fi(50) = co2icetotal337 tab_cntrl_fi(50) = 0. 378 338 379 339 c======================================================================= … … 430 390 431 391 c----------------------------------------------------------------------- 432 c Ecriture des champs ( co2ice,emis,ps,Tsurf,T,u,v,q2,q,qsurf)392 c Ecriture des champs (emis,ps,Tsurf,T,u,v,q2,q,qsurf) 433 393 c----------------------------------------------------------------------- 434 394 c ATTENTION: q2 a une couche de plus!!!! … … 439 399 c----------------------------------------------------------------------- 440 400 441 ! call write_archive(nid,ntime,'co2ice','couche de glace co2',442 ! & 'kg/m2',2,co2iceS)443 401 call write_archive(nid,ntime,'emis','grd emis',' ',2,emisS) 444 402 call write_archive(nid,ntime,'ps','Psurf','Pa',2,ps) … … 497 455 ! Note: no need to write volcapa, it is stored in "controle" table 498 456 499 c----------------------------------------------------------------------- 500 c Ecriture du champs cloudfrac,hice,totalcloudfrac 501 c----------------------------------------------------------------------- 502 call write_archive(nid,ntime,'hice', 503 & 'Height of oceanic ice','m',2,hiceS) 504 call write_archive(nid,ntime,'totalcloudfrac', 505 & 'Total cloud Fraction','',2,totalcloudfracS) 506 call write_archive(nid,ntime,'cloudfrac' 507 & ,'Cloud fraction','',3,cloudfracS) 508 509 c----------------------------------------------------------------------- 510 c Slab ocean 511 c----------------------------------------------------------------------- 512 OPEN(99,file='callphys.def',status='old',form='formatted' 513 & ,iostat=ierr) 514 CLOSE(99) 515 516 IF(ierr.EQ.0) THEN 517 518 519 write(*,*) "Use slab-ocean ?" 520 ok_slab_ocean=.false. ! default value 521 call getin("ok_slab_ocean",ok_slab_ocean) 522 write(*,*) "ok_slab_ocean = ",ok_slab_ocean 523 524 if(ok_slab_ocean) then 525 call write_archive(nid,ntime,'rnat' 526 & ,'rnat','',2,rnatS) 527 call write_archive(nid,ntime,'pctsrf_sic' 528 & ,'pctsrf_sic','',2,pctsrf_sicS) 529 call write_archive(nid,ntime,'sea_ice' 530 & ,'sea_ice','',2,sea_iceS) 531 call write_archive(nid,ntime,'tslab' 532 & ,'tslab','',-2,tslabS) 533 call write_archive(nid,ntime,'tsea_ice' 534 & ,'tsea_ice','',2,tsea_iceS) 535 endif !ok_slab_ocean 536 ENDIF 537 c----------------------------------------------------------------------- 457 538 458 c Fin 539 459 c----------------------------------------------------------------------- -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/write_archive.F
r1478 r1647 33 33 34 34 use comsoil_h, only: nsoilmx 35 use slab_ice_h, only: noceanmx36 35 37 36 implicit none … … 195 194 edges(1)=iip1 196 195 edges(2)=jjp1 197 edges(3)= noceanmx196 edges(3)=1 ! JVO2017 : was noceanmx before -> set to 1 198 197 edges(4)=1 199 198 #ifdef NC_DOUBLE
Note: See TracChangeset
for help on using the changeset viewer.