Changeset 3631
- Timestamp:
- Feb 19, 2025, 2:26:27 PM (5 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/dyn3d_common/iniconst.F90
r1422 r3631 38 38 jm = jjm 39 39 lllm = llm 40 imp1 = iim 40 imp1 = iim 41 41 jmp1 = jjm + 1 42 42 lllmm1 = llm - 1 … … 44 44 45 45 !----------------------------------------------------------------------- 46 47 46 dtphys = iphysiq * dtvr 48 47 unsim = 1./iim -
trunk/LMDZ.PLUTO/libf/dynphy_lonlat/phypluto/newstart.F
r3539 r3631 43 43 use exner_hyb_m, only: exner_hyb 44 44 use geometry_mod, only: longitude, ! longitudes (rad) 45 & latitude, ! latitudes (rad) 46 & cell_area ! physics grid area (m2) 45 & latitude, ! latitudes (rad) 46 & cell_area ! physics grid area (m2) 47 47 implicit none 48 48 49 49 include "dimensions.h" 50 integer, parameter :: ngridmx = (2+(jjm-1)*iim - 1/jjm) 50 integer, parameter :: ngridmx = (2+(jjm-1)*iim - 1/jjm) 51 51 include "paramet.h" 52 52 include "comgeom2.h" … … 62 62 CHARACTER relief*3 63 63 64 c Variables pour les lectures NetCDF des fichiers "start_archive" 64 c Variables pour les lectures NetCDF des fichiers "start_archive" 65 65 c-------------------------------------------------- 66 66 INTEGER nid_dyn, nid_fi,nid,nvarid,nvarid_input,nvarid_inputs … … 75 75 REAL p_rad,p_omeg,p_g,p_cpp,p_mugaz,p_daysec 76 76 77 c Variable histoire 77 c Variable histoire 78 78 c------------------ 79 79 REAL vcov(iip1,jjm,llm),ucov(iip1,jjp1,llm) ! vents covariants … … 91 91 PARAMETER (klatdat=180,klongdat=360) 92 92 93 c Physique sur grille scalaire 93 c Physique sur grille scalaire 94 94 c---------------------------- 95 95 real zmeaS(iip1,jjp1),zstdS(iip1,jjp1) … … 116 116 real mugaz ! molar mass of the atmosphere 117 117 118 integer ierr 119 120 c Variables on the new grid along scalar points 118 integer ierr 119 120 c Variables on the new grid along scalar points 121 121 c------------------------------------------------------ 122 122 REAL t(iip1,jjp1,llm) … … 132 132 REAL :: p3d(iip1, jjp1, llm+1) 133 133 134 c Variable de l'ancienne grille 134 c Variable de l'ancienne grille 135 135 c------------------------------ 136 136 real time … … 160 160 161 161 INTEGER :: itau 162 162 163 163 character(len=20) :: txt ! to store some text 164 164 character(len=50) :: surfacefile ! "surface.nc" (or equivalent file) … … 174 174 real fact2 175 175 176 c Special Pluto Map from Lellouch & Grundy 176 c Special Pluto Map from Lellouch & Grundy 177 177 c------------------------------------------ 178 178 integer,parameter :: im_plu=360 ! from topo 179 integer,parameter :: jm_plu=180 179 integer,parameter :: jm_plu=180 180 180 real latv_plu(jm_plu+1),lonu_plu(im_plu+1) 181 181 real map_pluto_dat(im_plu,jm_plu+1) … … 224 224 is_omp_root=.true. 225 225 is_master=.true. 226 226 227 227 ! Load tracer number and names: 228 228 call infotrac_init … … 231 231 allocate(qsurf(ngridmx,nqtot)) 232 232 allocate(qsurf_tmp(ngridmx,nqtot)) 233 233 234 234 ! get value of nsoilmx and allocate corresponding arrays 235 235 ! a default value of nsoilmx is set in comsoil_h 236 236 call getin_p("nsoilmx",nsoilmx) 237 237 238 238 allocate(inertiedat_simple(ngridmx,nsoilmx)) 239 239 allocate(tsoil(ngridmx,nsoilmx)) 240 240 allocate(field_inputs(ngridmx,nsoilmx)) 241 241 allocate(ith(iip1,jjp1,nsoilmx),ithfi(ngridmx,nsoilmx)) 242 242 243 243 c======================================================================= 244 244 c Choice of the start file(s) to use … … 248 248 write(*,*) ' 0 - from a file start_archive' 249 249 write(*,*) ' 1 - from files start and startfi' 250 250 251 251 c----------------------------------------------------------------------- 252 252 c Open file(s) to modify (start or start_archive) … … 272 272 CALL ABORT 273 273 ENDIF 274 tab0 = 50 274 tab0 = 50 275 275 Lmodif = 1 276 276 … … 288 288 CALL ABORT 289 289 ENDIF 290 290 291 291 fichnom = 'startfi.nc' 292 292 ierr = NF_OPEN (fichnom, NF_NOWRITE,nid_fi) … … 297 297 ENDIF 298 298 299 tab0 = 0 299 tab0 = 0 300 300 Lmodif = 0 301 301 … … 308 308 ! Initialize global tracer indexes (stored in tracer.h) 309 309 ! ... this has to be done before phyetat0 310 ! and requires that "datadir" be correctly initialized 310 ! and requires that "datadir" be correctly initialized 311 311 call getin_p("datadir",datadir) 312 312 call initracer(ngridmx,nqtot) … … 358 358 write(*,*) i,tab_cntrl(i) 359 359 enddo 360 360 361 361 write(*,*) 'Reading file START' 362 362 fichnom = 'start.nc' … … 375 375 & 1) 376 376 377 ! Lmodif set to 0 to disable modifications possibility in phyeta0 377 ! Lmodif set to 0 to disable modifications possibility in phyeta0 378 378 Lmodif=0 379 379 write(*,*) 'Reading file STARTFI' … … 399 399 call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,ithfi,ith) 400 400 call gr_fi_dyn(1,ngridmx,iip1,jjp1,surfithfi,surfith) 401 401 402 402 endif 403 403 c----------------------------------------------------------------------- … … 405 405 c----------------------------------------------------------------------- 406 406 407 kappa = tab_cntrl(9) 407 kappa = tab_cntrl(9) 408 408 etot0 = tab_cntrl(12) 409 409 ptot0 = tab_cntrl(13) … … 448 448 fichnom = 'startfi.nc' 449 449 call open_startphy(fichnom) 450 Lmodif=1 ! Lmodif set to 1 to allow modifications in phyeta0 450 Lmodif=1 ! Lmodif set to 1 to allow modifications in phyeta0 451 451 call tabfi (ngridmx,nid_fi,Lmodif,tab0,day_ini,lllm,p_rad, 452 452 . p_omeg,p_g,p_cpp,p_mugaz,p_daysec,time) … … 482 482 daysec = p_daysec 483 483 kappa = 8.314*1000./(p_mugaz*p_cpp) ! added by RDW 484 dtvr = 0 ! will be changed later but we need it initalized in iniconst 484 485 485 486 c======================================================================= … … 488 489 ! Load parameters from run.def file 489 490 CALL defrun_new( 99, .TRUE. ) 490 ! Initialize dynamics geometry and co. (which, when using start.nc may 491 ! Initialize dynamics geometry and co. (which, when using start.nc may 491 492 ! have changed because of modifications (tabi, preff, pa) above) 492 CALL iniconst 493 CALL iniconst 493 494 CALL inigeom 494 495 idum=-1 … … 509 510 c======================================================================= 510 511 511 if (choix_1.eq.0) then ! for start_archive files, 512 if (choix_1.eq.0) then ! for start_archive files, 512 513 ! where an external "surface.nc" file is needed 513 514 … … 551 552 zgamS(:,:)=0 552 553 ztheS(:,:)=0 553 554 554 555 write(*,*) "Enter value of albedo of the bare ground:" 555 556 read(*,*) alb(1,1) 556 557 alb(:,:)=alb(1,1) 557 558 558 559 write(*,*) "Enter value of thermal inertia of soil:" 559 560 read(*,*) surfith(1,1) 560 561 surfith(:,:)=surfith(1,1) 561 562 562 563 endif ! of if (surfacefile.ne."none") 563 564 … … 588 589 ! copy soil thermal inertia 589 590 ithfi(:,:)=inertiedat(:,:) 590 591 591 592 ierr= NF_CLOSE(nid) 592 593 593 else if (choix_1.eq.1) then 594 else if (choix_1.eq.1) then 594 595 !do nothing, start and startfi have already been read 595 else 596 else 596 597 CALL exit(1) 597 598 endif … … 601 602 602 603 c======================================================================= 603 c 604 c 604 605 c======================================================================= 605 606 … … 643 644 write(*,*) 'tsurfice: temperature depending on N2 ice' 644 645 write(*,*) 'icarus: option to change surface/soil temperature' 645 write(*,*) 'icarus_ch4: special option to add ch4' 646 write(*,*) 'delfrostch4: delete ch4 frost' 647 write(*,*) 'modch4: remove/modify amount ch4 frost' 648 write(*,*) 'modch4n2: modify amount ch4 frost according N2' 649 write(*,*) 'modco: remove/modify amount co frost' 646 write(*,*) 'icarus_ch4: special option to add ch4' 647 write(*,*) 'delfrostch4: delete ch4 frost' 648 write(*,*) 'modch4: remove/modify amount ch4 frost' 649 write(*,*) 'modch4n2: modify amount ch4 frost according N2' 650 write(*,*) 'modco: remove/modify amount co frost' 650 651 write(*,*) 'modn2: remove/modify amount n2 ice' 651 652 write(*,*) 'modcoch4: remove/modify co ch4 where no n2 ' 652 653 write(*,*) 'checktsoil: change tsoil where no n2 ' 653 654 write(*,*) 'non2noco: if no n2, no co ' 654 write(*,*) 'modn2_topo: modify n2 ice topo according to topo' 655 write(*,*) 'modwheren2: modify n2 where already n2' 656 write(*,*) 'modn2HD: modify n2 for HD runs' 657 write(*,*) 'modn2HD_SP: modify n2 for HD runs in SP' 658 write(*,*) 'globch4co: add/remove global amount ch4co frost' 659 write(*,*) 'source_ch4: add source ch4' 660 write(*,*) 'nomountain: remove pluto mountains (!)' 661 write(*,*) 'relief: add pluto crater or mountain' 655 write(*,*) 'modn2_topo: modify n2 ice topo according to topo' 656 write(*,*) 'modwheren2: modify n2 where already n2' 657 write(*,*) 'modn2HD: modify n2 for HD runs' 658 write(*,*) 'modn2HD_SP: modify n2 for HD runs in SP' 659 write(*,*) 'globch4co: add/remove global amount ch4co frost' 660 write(*,*) 'source_ch4: add source ch4' 661 write(*,*) 'nomountain: remove pluto mountains (!)' 662 write(*,*) 'relief: add pluto crater or mountain' 662 663 write(*,*) 'seticeNH: set ice for initial start with NH topo' 663 664 write(*,*) 'topo_sp: change topography of SP' … … 684 685 write(*,*) 'albedomap: read in an albedomap albedo.nc' 685 686 write(*,*) 'mod_distrib_ice: modify ice distrib. from albedo' 686 687 687 688 write(*,*) 688 689 write(*,*) 'Please note that emis and albedo are set in physiq' … … 705 706 c ------------------------------------- 706 707 if (trim(modif) .eq. 'flat') then 707 c set topo to zero 708 c set topo to zero 708 709 z_reel(1:iip1,1:jjp1)=0 709 710 phis(1:iip1,1:jjp1)=g*z_reel(1:iip1,1:jjp1) … … 711 712 write(*,*) 'topography set to zero.' 712 713 write(*,*) 'WARNING : the subgrid topography parameters', 713 & ' were not set to zero ! => set calllott to F' 714 & ' were not set to zero ! => set calllott to F' 714 715 715 716 c Choice of surface pressure … … 741 742 end if 742 743 743 c 'set_ps_to_preff' : used if changing preff with topo 744 c 'set_ps_to_preff' : used if changing preff with topo 744 745 c ---------------------------------------------------- 745 746 else if (trim(modif) .eq. 'set_ps_to_preff') then … … 750 751 enddo 751 752 752 c ptot : Modification of the total pressure: ice + current atmosphere 753 c ptot : Modification of the total pressure: ice + current atmosphere 753 754 c ------------------------------------------------------------------- 754 755 else if (modif(1:len_trim(modif)).eq.'ptot') then … … 826 827 tname(iq)=txt 827 828 write(*,*)'Do you want to change another tracer name (y/n)?' 828 read(*,'(a)') yes 829 read(*,'(a)') yes 829 830 else 830 831 ! inapropiate value of iq; quit this option … … 855 856 ENDDO 856 857 857 c q=x : initialise tracer manually 858 c q=x : initialise tracer manually 858 859 c -------------------------------- 859 860 else if (trim(modif).eq.'q=x') then … … 863 864 enddo 864 865 write(*,*) '(choose between 1 and ',nqtot,')' 865 read(*,*) iq 866 read(*,*) iq 866 867 write(*,*)'mixing ratio of tracer ',trim(tname(iq)), 867 868 & ' ? (kg/kg)' … … 880 881 c qsurf(ig,iq)=val 881 882 c ENDDO 882 883 c qs=x : initialise surface tracer manually 883 884 c qs=x : initialise surface tracer manually 884 885 c -------------------------------- 885 886 else if (trim(modif).eq.'qs=x') then … … 889 890 enddo 890 891 write(*,*) '(choose between 1 and ',nqtot,')' 891 read(*,*) iq 892 read(*,*) iq 892 893 write(*,*) 'SURFACE value of tracer ',trim(tname(iq)), 893 894 & ' ? (kg/m2)' … … 949 950 enddo 950 951 write(*,*) '(choose between 1 and ',nqtot,')' 951 read(*,*) iq 952 read(*,*) iq 952 953 if ((iq.lt.1).or.(iq.gt.nqtot)) then 953 954 ! wrong value for iq, go back to menu … … 984 985 endif 985 986 986 c qnogcm : initialise tracer from nogcm (CH4, CO) 987 c qnogcm : initialise tracer from nogcm (CH4, CO) 987 988 c -------------------------------- 988 989 else if (modif(1:len_trim(modif)).eq.'qnogcm') then … … 993 994 enddo 994 995 write(*,*) '(choose between 1 and ',nqtot,')' 995 read(*,*) iq 996 read(*,*) iq 996 997 DO l=1,llm 997 998 DO j=1,jjp1 … … 1002 1003 ENDDO 1003 1004 1004 c isothermal temperatures 1005 c isothermal temperatures 1005 1006 c ------------------------------------------------ 1006 1007 else if (modif(1:len_trim(modif)) .eq. 'isotherm') then … … 1020 1021 write(*,*) 'atmospheric temp =', Tset(2,2,2) 1021 1022 1022 c specific temperature profile 1023 c specific temperature profile 1023 1024 c ------------------------------------------------ 1024 1025 else if (modif(1:len_trim(modif)) .eq. 'tempprof') then … … 1202 1203 ENDDO 1203 1204 ENDIF 1204 1205 1205 1206 c bladed : adding/remove ch4 on bladed terrains 1206 1207 c ---------------------------------------------------------- … … 1227 1228 if(ierr.ne.0) goto 449 1228 1229 1229 ! shift 1230 ! shift 1230 1231 DO ig=1,ngridmx 1231 1232 IF ( (latfi(ig)*180./pi.ge.val) .and. … … 1233 1234 & (lonfi(ig)*180./pi.ge.val3) .and. 1234 1235 & (lonfi(ig)*180./pi.le.val4) .and. 1235 & (phisfi(ig).gt.choice) ) then 1236 & (phisfi(ig).gt.choice) ) then 1236 1237 qsurf(ig,igcm_ch4_ice)=qsurf(ig,igcm_ch4_ice)*val5 1237 1238 qsurf(ig,igcm_ch4_ice)=qsurf(ig,igcm_ch4_ice)+val6 … … 1257 1258 if(ierr.ne.0) goto 562 1258 1259 1259 ! Get index correponding to central points 1260 ! Get index correponding to central points 1260 1261 ! 1/ Reference point 1261 1262 igref=1 … … 1267 1268 actualmin=val6 1268 1269 igref=ig 1269 endif 1270 endif 1270 1271 enddo 1271 1272 1272 do k=1,l 1273 do k=1,l 1273 1274 1274 1275 write(*,*) 'Choice lat,lon where terrain is copied' 1275 1276 563 read(*,*,iostat=ierr) val4,val5 1276 1277 if(ierr.ne.0) goto 563 1277 1278 1278 1279 if (val5.gt.180.) then 1279 1280 val5=val5-360. … … 1289 1290 actualmin=val6 1290 1291 igref2=ig 1291 endif 1292 endif 1292 1293 enddo 1293 1294 … … 1310 1311 enddo 1311 1312 1312 ! for each point within A2, get distance and angle 1313 ! and look where fit with previous table, and set value 1313 ! for each point within A2, get distance and angle 1314 ! and look where fit with previous table, and set value 1314 1315 1315 1316 do ig=1,ngridmx … … 1386 1387 & (lonfi(ig)*180./pi.ge.val4) .and. 1387 1388 & (lonfi(ig)*180./pi.lt.val5)) then 1388 ! & (qsurf(ig,igcm_n2).gt.50)) then 1389 ! & (qsurf(ig,igcm_n2).gt.50)) then 1389 1390 ! & (qsurf(ig,igcm_ch4_ice).lt.10) ) then 1390 1391 qsurf(ig,igcm_ch4_ice)=qsurf(ig,igcm_ch4_ice)*val3 … … 1414 1415 & (lonfi(ig)*180./pi.ge.val4) .and. 1415 1416 & (lonfi(ig)*180./pi.lt.val5) .and. 1416 & (qsurf(ig,igcm_n2).gt.val7) .and. 1417 & (qsurf(ig,igcm_n2).gt.val7) .and. 1417 1418 & (qsurf(ig,igcm_n2).lt.val8) ) then 1418 1419 qsurf(ig,igcm_ch4_ice)=qsurf(ig,igcm_ch4_ice)*val3 … … 1425 1426 else if (modif(1:len_trim(modif)) .eq. 'non2noco') then 1426 1427 DO ig=1,ngridmx 1427 IF ( (qsurf(ig,igcm_n2).lt.0.001)) then 1428 IF ( (qsurf(ig,igcm_n2).lt.0.001)) then 1428 1429 qsurf(ig,igcm_co_ice)=0. 1429 1430 ENDIF … … 1455 1456 & (latfi(ig)*180./pi.le.val2) .and. 1456 1457 & (lonfi(ig)*180./pi.ge.val4) .and. 1457 & (lonfi(ig)*180./pi.lt.val5) .and. 1458 & (qsurf(ig,igcm_n2).gt.val7)) then 1458 & (lonfi(ig)*180./pi.lt.val5) .and. 1459 & (qsurf(ig,igcm_n2).gt.val7)) then 1459 1460 qsurf(ig,igcm_co_ice)=qsurf(ig,igcm_co_ice)*val3 1460 1461 qsurf(ig,igcm_co_ice)=qsurf(ig,igcm_co_ice)+val6 … … 1462 1463 ENDDO 1463 1464 1464 c modn2 : adding/remove n2 ice 1465 c modn2 : adding/remove n2 ice 1465 1466 c ---------------------------------------------------------- 1466 1467 else if (modif(1:len_trim(modif)) .eq. 'modn2') then … … 1484 1485 & (latfi(ig)*180./pi.le.val2) .and. 1485 1486 & (lonfi(ig)*180./pi.ge.val4) .and. 1486 & (lonfi(ig)*180./pi.lt.val5) ) then 1487 c & (qsurf(ig,igcm_n2).lt.50)) then 1487 & (lonfi(ig)*180./pi.lt.val5) ) then 1488 c & (qsurf(ig,igcm_n2).lt.50)) then 1488 1489 qsurf(ig,igcm_n2)=qsurf(ig,igcm_n2)*val3 1489 1490 qsurf(ig,igcm_n2)=qsurf(ig,igcm_n2)+val6 1490 1491 ENDIF 1491 ! IF ((phisfi(ig).gt.-1000.)) then 1492 ! IF ((phisfi(ig).gt.-1000.)) then 1492 1493 ! qsurf(ig,igcm_n2)=0. 1493 1494 ! ENDIF … … 1516 1517 & (latfi(ig)*180./pi.le.val2) .and. 1517 1518 & (lonfi(ig)*180./pi.ge.val4) .and. 1518 & (lonfi(ig)*180./pi.le.val5) .and. 1519 & (qsurf(ig,igcm_n2).lt.10.)) then 1519 & (lonfi(ig)*180./pi.le.val5) .and. 1520 & (qsurf(ig,igcm_n2).lt.10.)) then 1520 1521 qsurf(ig,igcm_co_ice)=qsurf(ig,igcm_co_ice)*val3 1521 1522 qsurf(ig,igcm_co_ice)=qsurf(ig,igcm_co_ice)+val6 … … 1560 1561 & (qsurf(ig,igcm_n2).lt.val5) .and. 1561 1562 & (phisfi(ig).ge.val6) .and. 1562 & (phisfi(ig).le.val11) ) then 1563 & (phisfi(ig).le.val11) ) then 1563 1564 1564 1565 qsurf(ig,igcm_n2)=qsurf(ig,igcm_n2)*val7 … … 1577 1578 !DO l=1,nsoilmx 1578 1579 ! tsoil(ig,l)=tsoil(iref,l) 1579 !ENDDO 1580 !ENDDO 1580 1581 tsurf(ig)=tsurf(ig)+4 1581 1582 DO l=1,nsoilmx 1582 1583 tsoil(ig,l)=tsoil(ig,l)+4 1583 ENDDO 1584 ENDDO 1584 1585 ENDIF 1585 ! IF ((phisfi(ig).gt.-1000.)) then 1586 ! IF ((phisfi(ig).gt.-1000.)) then 1586 1587 ! qsurf(ig,igcm_n2)=0. 1587 1588 ! ENDIF … … 1623 1624 & (qsurf(ig,igcm_n2).lt.val5) .and. 1624 1625 & (phisfi(ig).ge.val6) .and. 1625 & (phisfi(ig).le.val11) ) then 1626 & (phisfi(ig).le.val11) ) then 1626 1627 1627 1628 qsurf(ig,igcm_n2)=qsurf(ig,igcm_n2)*val7 … … 1640 1641 DO l=1,nsoilmx 1641 1642 tsoil(ig,l)=tsoil(iref,l) 1642 ENDDO 1643 ENDDO 1643 1644 else if (iref.eq.0) then 1644 1645 choice=int(ig/96.)*96+84 … … 1647 1648 DO l=1,nsoilmx 1648 1649 tsoil(ig,l)=tsoil(int(choice),l) 1649 ENDDO 1650 ENDDO 1650 1651 endif 1651 1652 ENDIF 1652 1653 ENDDO 1653 1654 1654 c modn2_topo : adding/remove n2 ice 1655 c modn2_topo : adding/remove n2 ice 1655 1656 c ---------------------------------------------------------- 1656 1657 else if (modif(1:len_trim(modif)) .eq. 'modn2_topo') then … … 1732 1733 & (phisfi(ig).ge.val6) .and. 1733 1734 & (phisfi(ig).le.val11) .and. 1734 & (qsurf(ig,igcm_n2).gt.0.001) ) then 1735 & (qsurf(ig,igcm_n2).gt.0.001) ) then 1735 1736 1736 1737 ! DO i=1,ngridmx … … 1738 1739 ! & (lonfi(i).eq.0.) ) then 1739 1740 ! 1740 tsurf(ig)=34.7 1741 tsurf(ig)=34.7 1741 1742 !qsurf(ig,igcm_ch4_ice)=qsurf(i,igcm_ch4_ice) 1742 1743 ! 1743 1744 DO l=1,nsoilmx 1744 1745 tsoil(ig,l)=34.7 !tsoil(i,l) 1745 ENDDO 1746 ENDDO 1746 1747 !ENDIF 1747 1748 !ENDDO … … 1772 1773 & (latfi(ig)*180./pi.le.val1+val2) .and. 1773 1774 & (qsurf(ig,igcm_n2).gt.0.) ) then 1774 ! Look for same longitude point where no ice 1775 ! Look for same longitude point where no ice 1775 1776 val5=1. 1776 1777 jref=ig … … 1784 1785 val5=qsurf(jref,igcm_n2) 1785 1786 ! write(*,*) jref, 1786 ! & latfi(jref)*180./pi,lonfi(jref)*180/pi,val5 1787 enddo 1788 if (val5.ge.1) write(*,*) 'NO POINT FOUND WITH NO ICE' 1787 ! & latfi(jref)*180./pi,lonfi(jref)*180/pi,val5 1788 enddo 1789 if (val5.ge.1) write(*,*) 'NO POINT FOUND WITH NO ICE' 1789 1790 1790 1791 ! Copy point in the selected area 1791 tsurf(ig)=tsurf(jref) 1792 tsurf(ig)=tsurf(jref) 1792 1793 qsurf(ig,igcm_n2)=qsurf(jref,igcm_n2) 1793 1794 qsurf(ig,igcm_ch4_ice)=qsurf(jref,igcm_ch4_ice) … … 1795 1796 DO l=1,nsoilmx 1796 1797 tsoil(ig,l)=tsoil(jref,l) 1797 ENDDO 1798 ENDDO 1798 1799 ENDIF 1799 1800 ! If below line and no ice: add ice … … 1801 1802 & (latfi(ig)*180./pi.le.val1+val2) .and. 1802 1803 & (qsurf(ig,igcm_n2).eq.0.) ) then 1803 ! Look for same longitude point where ice 1804 ! Look for same longitude point where ice 1804 1805 val5=1. 1805 1806 jref=ig … … 1810 1811 val5=qsurf(jref,igcm_n2) 1811 1812 write(*,*) jref, 1812 & latfi(jref)*180./pi,lonfi(jref)*180/pi,val5 1813 enddo 1814 if (val5.le.1) write(*,*) 'NO POINT FOUND WITH ICE' 1813 & latfi(jref)*180./pi,lonfi(jref)*180/pi,val5 1814 enddo 1815 if (val5.le.1) write(*,*) 'NO POINT FOUND WITH ICE' 1815 1816 1816 1817 ! Copy point in the selected area 1817 tsurf(ig)=tsurf(jref) 1818 tsurf(ig)=tsurf(jref) 1818 1819 qsurf(ig,igcm_n2)=qsurf(jref,igcm_n2) 1819 1820 qsurf(ig,igcm_ch4_ice)=qsurf(jref,igcm_ch4_ice) … … 1821 1822 DO l=1,nsoilmx 1822 1823 tsoil(ig,l)=tsoil(jref,l) 1823 ENDDO 1824 ENDDO 1824 1825 ENDIF 1825 1826 … … 1830 1831 else if (modif(1:len_trim(modif)) .eq. 'source_ch4') then 1831 1832 1832 write(*,*) 'Adding ch4 ice latitudinally ' 1833 write(*,*) 'Adding ch4 ice latitudinally ' 1833 1834 write(*,*) 'Choice : lat1 and lat2 ?' 1834 1835 433 read(*,*,iostat=ierr) val,val2 … … 1845 1846 & (latfi(ig)*180./pi.le.val2) .and. 1846 1847 & (lonfi(ig)*180./pi.ge.val3) .and. 1847 & (lonfi(ig)*180./pi.lt.val4) ) then 1848 & (lonfi(ig)*180./pi.lt.val4) ) then 1848 1849 qsurf(ig,igcm_ch4_ice)=qsurf(ig,igcm_ch4_ice)+val5 1849 1850 ENDIF … … 1854 1855 else if (modif(1:len_trim(modif)) .eq. 'source_co') then 1855 1856 1856 write(*,*) 'Adding co ice latitudinally ' 1857 write(*,*) 'Adding co ice latitudinally ' 1857 1858 write(*,*) 'Choice : lat1 and lat2 ?' 1858 1859 436 read(*,*,iostat=ierr) val,val2 … … 1869 1870 & (latfi(ig)*180./pi.le.val2) .and. 1870 1871 & (lonfi(ig)*180./pi.ge.val3) .and. 1871 & (lonfi(ig)*180./pi.lt.val4) ) then 1872 & (lonfi(ig)*180./pi.lt.val4) ) then 1872 1873 qsurf(ig,igcm_co_ice)=qsurf(ig,igcm_co_ice)+val5 1873 1874 ENDIF … … 1888 1889 call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,ithfi,ith) 1889 1890 1890 ! inert3d: set soil thermal inertia to specific uniform value 1891 ! inert3d: set soil thermal inertia to specific uniform value 1891 1892 ! ---------------------------------------------------------------------- 1892 1893 else if (modif(1:len_trim(modif)).eq.'inert3d') then … … 1932 1933 jref=j+1 1933 1934 endif 1934 1935 1935 1936 write(*,*)'Will use nearest grid latitude which is:', 1936 1937 & rlatu(jref)*180./pi … … 1966 1967 endif 1967 1968 enddo ! of do while 1968 1969 1969 1970 ! find the reference index iref the depth corresponds to 1970 1971 ! if (val2.lt.layer(1)) then … … 1989 1990 ! recast ithfi() onto ith() 1990 1991 call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,ithfi,ith) 1991 1992 1992 1993 do j=1,jref 1993 1994 ! write(*,*)'j:',j,'rlatu(j)*180./pi:',rlatu(j)*180./pi … … 2001 2002 ith(i,j,isoil)=iceith ! ice 2002 2003 enddo 2003 enddo ! of do i=1,iip1 2004 enddo ! of do i=1,iip1 2004 2005 enddo ! of do j=1,jjp1 2005 2006 2006 2007 CALL gr_dyn_fi(nsoilmx,iip1,jjp1,ngridmx,ith,ithfi) 2007 2008 … … 2033 2034 jref=j+1 2034 2035 endif 2035 2036 2036 2037 write(*,*)'Will use nearest grid latitude which is:', 2037 2038 & rlatu(jref)*180./pi … … 2067 2068 endif 2068 2069 enddo ! of do while 2069 2070 2070 2071 ! find the reference index iref the depth corresponds to 2071 2072 do isoil=1,nsoilmx-1 … … 2076 2077 endif 2077 2078 enddo 2078 2079 2079 2080 ! thermal inertia of the ice: 2080 2081 ierr=1 … … 2084 2085 read(*,*,iostat=ierr)iceith 2085 2086 enddo ! of do while 2086 2087 2087 2088 ! recast ithfi() onto ith() 2088 2089 call gr_fi_dyn(nsoilmx,ngridmx,iip1,jjp1,ithfi,ith) 2089 2090 2090 2091 do j=jref,jjp1 2091 2092 ! write(*,*)'j:',j,'rlatu(j)*180./pi:',rlatu(j)*180./pi … … 2099 2100 ith(i,j,isoil)=iceith ! ice 2100 2101 enddo 2101 enddo ! of do i=1,iip1 2102 enddo ! of do i=1,iip1 2102 2103 enddo ! of do j=jref,jjp1 2103 2104 … … 2130 2131 IF ( (latfi(ig)*180./pi.ge.val3) .and. 2131 2132 & (latfi(ig)*180./pi.le.val4) .and. 2132 & ( ((lonfi(ig)*180./pi.ge.-180.) .and. 2133 & ( ((lonfi(ig)*180./pi.ge.-180.) .and. 2133 2134 & (lonfi(ig)*180./pi.le.val6)) .or. 2134 & ((lonfi(ig)*180./pi.ge.val5) .and. 2135 & ((lonfi(ig)*180./pi.ge.val5) .and. 2135 2136 & (lonfi(ig)*180./pi.le.180.))) ) then 2136 2137 … … 2145 2146 ENDDO 2146 2147 2147 c subsoil_SP : choice of thermal inertia values for SP 2148 c subsoil_SP : choice of thermal inertia values for SP 2148 2149 c ---------------------------------------------------------------- 2149 2150 else if (modif(1:len_trim(modif)) .eq. 'subsoil_SP') then … … 2171 2172 write(*,*)'Thermal inertia set for all subsurface layers' 2172 2173 ierr=0 2173 else 2174 else 2174 2175 write(*,*)'Depth should be more than ',layer(1) 2175 2176 ierr=1 … … 2182 2183 if(val2.eq.0) then 2183 2184 iref=1 2184 write(*,*)'Level selected is first level: ',layer(iref),' m' 2185 write(*,*)'Level selected is first level: ',layer(iref),' m' 2185 2186 else 2186 2187 do isoil=1,nsoilmx-1 … … 2192 2193 endif 2193 2194 enddo 2194 endif 2195 endif 2195 2196 2196 2197 ! Definition SP: … … 2209 2210 IF ( (latfi(ig)*180./pi.ge.val3) .and. 2210 2211 & (latfi(ig)*180./pi.le.val4) .and. 2211 & ( ((lonfi(ig)*180./pi.ge.-180.) .and. 2212 & ( ((lonfi(ig)*180./pi.ge.-180.) .and. 2212 2213 & (lonfi(ig)*180./pi.le.val6)) .or. 2213 & ((lonfi(ig)*180./pi.ge.val5) .and. 2214 & ((lonfi(ig)*180./pi.ge.val5) .and. 2214 2215 & (lonfi(ig)*180./pi.le.180.))) ) then 2215 2216 … … 2219 2220 ithfi(ig,j)=ith_bb 2220 2221 ENDDO 2221 ENDIF 2222 ENDIF 2222 2223 ENDIF 2223 2224 ENDDO … … 2248 2249 temp=40. 2249 2250 write(*,*) 'r, sale height temperature =',r,temp 2250 2251 2251 2252 do j=1,jjp1 2252 2253 do i=1,iip1 … … 2254 2255 IF ( (rlatu(j)*180./pi.ge.val2) .and. 2255 2256 & (rlatu(j)*180./pi.le.val3) .and. 2256 & ( ((rlonv(i)*180./pi.ge.-180.) .and. 2257 & ( ((rlonv(i)*180./pi.ge.-180.) .and. 2257 2258 & (rlonv(i)*180./pi.le.val5)) .or. 2258 & ((rlonv(i)*180./pi.ge.val4) .and. 2259 & ((rlonv(i)*180./pi.ge.val4) .and. 2259 2260 & (rlonv(i)*180./pi.le.180.))) ) then 2260 2261 … … 2263 2264 ps(i,j) = ps(i,j) * 2264 2265 . exp((phisprev-phis(i,j))/(temp * r)) 2265 ENDIF 2266 ENDIF 2266 ENDIF 2267 ENDIF 2267 2268 end do 2268 2269 end do … … 2293 2294 temp=40. 2294 2295 write(*,*) 'r, sale height temperature =',r,temp,g 2295 qsurf=0. 2296 qsurf=0. 2296 2297 2297 2298 write(*,*) 'latfi=',latfi … … 2303 2304 write(*,*) 'phisold=',phisold 2304 2305 do ig=1,ngridmx 2305 2306 2306 2307 write(*,*) 'lat=',latfi(ig)*180./pi 2307 2308 write(*,*) 'lon=',lonfi(ig)*180./pi … … 2309 2310 IF ( (latfi(ig)*180./pi.ge.val2) .and. 2310 2311 & (latfi(ig)*180./pi.le.val3) .and. 2311 & (lonfi(ig)*180./pi.ge.val4) .and. 2312 & (lonfi(ig)*180./pi.ge.val4) .and. 2312 2313 & (lonfi(ig)*180./pi.le.val5) ) then 2313 2314 write(*,*) 'hello SP',phisfi(ig),ig … … 2317 2318 write(*,*) 'changes',phisfi(ig),qsurf(ig,igcm_n2) 2318 2319 ENDIF 2319 ENDIF 2320 ENDIF 2320 2321 end do 2321 2322 c update new phis and ps … … 2355 2356 end do 2356 2357 2357 c correct phisfi 2358 c correct phisfi 2358 2359 c ----------------------------------------------------- 2359 2360 else if (modif(1:len_trim(modif)) .eq. 'correctphi') then … … 2378 2379 IF ( (latfi(ig)*180./pi.ge.val1) .and. 2379 2380 & (latfi(ig)*180./pi.le.val2) .and. 2380 & (lonfi(ig)*180./pi.ge.val3) .and. 2381 & (lonfi(ig)*180./pi.ge.val3) .and. 2381 2382 & (lonfi(ig)*180./pi.le.val4) ) then 2382 2383 … … 2414 2415 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,phis,phisfi) 2415 2416 2416 c correct phisfi 2417 c correct phisfi 2417 2418 c ----------------------------------------------------- 2418 2419 else if (modif(1:len_trim(modif)) .eq. 'correctps') then … … 2442 2443 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,phis,phisfi) 2443 2444 2444 c No flat topo 2445 c No flat topo 2445 2446 c ----------------------------------------------------- 2446 2447 else if (modif(1:len_trim(modif)) .eq. 'toponoise') then … … 2465 2466 IF ( (latfi(ig)*180./pi.ge.val1) .and. 2466 2467 & (latfi(ig)*180./pi.le.val2) .and. 2467 & (lonfi(ig)*180./pi.ge.val3) .and. 2468 & (lonfi(ig)*180./pi.ge.val3) .and. 2468 2469 & (lonfi(ig)*180./pi.le.val4) ) then 2469 2470 … … 2520 2521 temp=40. 2521 2522 write(*,*) 'r, sale height temperature =',r,temp,g 2522 qsurf=0. 2523 qsurf=0. 2523 2524 2524 2525 write(*,*) 'latfi=',latfi … … 2530 2531 write(*,*) 'phisold=',phisold 2531 2532 do ig=1,ngridmx 2532 2533 2533 2534 write(*,*) 'lat=',latfi(ig)*180./pi 2534 2535 write(*,*) 'lon=',lonfi(ig)*180./pi … … 2536 2537 IF ( (latfi(ig)*180./pi.ge.val2) .and. 2537 2538 & (latfi(ig)*180./pi.le.val3) .and. 2538 & ( ((lonfi(ig)*180./pi.ge.-180.) .and. 2539 & ( ((lonfi(ig)*180./pi.ge.-180.) .and. 2539 2540 & (lonfi(ig)*180./pi.le.val5)) .or. 2540 & ((lonfi(ig)*180./pi.ge.val4) .and. 2541 & ((lonfi(ig)*180./pi.ge.val4) .and. 2541 2542 & (lonfi(ig)*180./pi.le.180.))) ) then 2542 2543 write(*,*) 'hello SP',phisfi(ig),ig … … 2546 2547 write(*,*) 'changes',phisfi(ig),qsurf(ig,igcm_n2) 2547 2548 ENDIF 2548 ENDIF 2549 ENDIF 2549 2550 end do 2550 2551 c update new phis and ps … … 2561 2562 end do 2562 2563 2563 c bugch4 correct bug warm ch4 due to change of resolution 2564 c bugch4 correct bug warm ch4 due to change of resolution 2564 2565 c ----------------------------------------------------- 2565 2566 else if (modif(1:len_trim(modif)) .eq. 'bugch4') then … … 2592 2593 DO l=1,nsoilmx 2593 2594 tsoil(ig,l)=tsoil(int(ig-jref),l) 2594 ENDDO 2595 ENDDO 2595 2596 goto 548 2596 2597 ELSEIF ((ig+jref.le.ngridmx).and. … … 2602 2603 DO l=1,nsoilmx 2603 2604 tsoil(ig,l)=tsoil(int(ig+jref),l) 2604 ENDDO 2605 ENDDO 2605 2606 goto 548 2606 2607 ENDIF 2607 2608 enddo 2608 2609 548 write(*,*) 'found point with ch4' 2609 ENDIF 2610 ENDIF 2610 ENDIF 2611 ENDIF 2611 2612 END DO 2612 2613 2613 c bugn2 correct bug warm n2 due to change of resolution 2614 c bugn2 correct bug warm n2 due to change of resolution 2614 2615 c ----------------------------------------------------- 2615 2616 else if (modif(1:len_trim(modif)) .eq. 'bugn2') then … … 2642 2643 DO l=1,nsoilmx 2643 2644 tsoil(ig,l)=tsoil(int(ig-jref),l) 2644 ENDDO 2645 ENDDO 2645 2646 goto 541 2646 2647 ELSEIF ((ig+jref.le.ngridmx).and. … … 2651 2652 DO l=1,nsoilmx 2652 2653 tsoil(ig,l)=tsoil(int(ig+jref),l) 2653 ENDDO 2654 ENDDO 2654 2655 goto 541 2655 2656 ENDIF 2656 2657 enddo 2657 2658 541 write(*,*) 'found point with n2' 2658 ENDIF 2659 ENDIF 2659 ENDIF 2660 ENDIF 2660 2661 END DO 2661 2662 … … 2672 2673 ! DO l=1,nsoilmx 2673 2674 ! tsoil(ig,l)=tsoil(ig-1,l) 2674 ! ENDDO 2675 ! ENDDO 2675 2676 ! ELSEIF (qsurf(ig+1,igcm_n2).gt.0.001) then 2676 2677 ! tsurf(ig)=tsurf(ig+1) 2677 2678 ! DO l=1,nsoilmx 2678 2679 ! tsoil(ig,l)=tsoil(ig+1,l) 2679 ! ENDDO 2680 ! ENDDO 2680 2681 ! ENDIF 2681 ! ENDIF 2682 ! ENDIF 2682 ! ENDIF 2683 ! ENDIF 2683 2684 2684 2685 ! END DO 2685 2686 2686 c flatnosp : flat topo outside a specific terrain (SP) 2687 c flatnosp : flat topo outside a specific terrain (SP) 2687 2688 c ----------------------------------------------------- 2688 2689 else if (modif(1:len_trim(modif)) .eq. 'flatnosp') then … … 2691 2692 551 read(*,*,iostat=ierr) val 2692 2693 if(ierr.ne.0) goto 551 2693 write(*,*) 'gravity g is : ',g 2694 write(*,*) 'gravity g is : ',g 2694 2695 geop=g*val 2695 2696 write(*,*) 'Choice of minimum amount of N2 ice we keep ?' 2696 2697 552 read(*,*,iostat=ierr) val2 2697 2698 if(ierr.ne.0) goto 552 2698 2699 2699 2700 write(*,*) 'phis=',phis 2700 2701 write(*,*) 'phisfi=',phisfi 2701 2702 do ig=1,ngridmx 2702 2703 2703 2704 IF ( (qsurf(ig,1).le.val2) .and. 2704 2705 & (phisfi(ig).gt.geop) ) then … … 2726 2727 end do 2727 2728 2728 c flatregion : flat topo specific to region 2729 c flatregion : flat topo specific to region 2729 2730 c ----------------------------------------------------- 2730 2731 else if (modif(1:len_trim(modif)) .eq. 'flatregion') then … … 2742 2743 556 read(*,*,iostat=ierr) val7 2743 2744 if(ierr.ne.0) goto 556 2744 2745 2745 2746 write(*,*) 'phis=',phis 2746 2747 write(*,*) 'phisfi=',phisfi … … 2749 2750 & (latfi(ig)*180./pi.le.val2) .and. 2750 2751 & (lonfi(ig)*180./pi.ge.val3) .and. 2751 & (lonfi(ig)*180./pi.le.val4) ) then 2752 2752 & (lonfi(ig)*180./pi.le.val4) ) then 2753 2753 2754 IF ( (phisfi(ig).ge.val5) .and. 2754 2755 & (phisfi(ig).le.val6) ) then … … 2775 2776 end do 2776 2777 2777 c changetopo 2778 c changetopo 2778 2779 c ----------------------------------------------------- 2779 2780 else if (modif(1:len_trim(modif)) .eq. 'changetopo') then … … 2794 2795 577 read(*,*,iostat=ierr) val8 2795 2796 if(ierr.ne.0) goto 577 2796 2797 2797 2798 write(*,*) 'phis=',phis 2798 2799 write(*,*) 'phisfi=',phisfi … … 2801 2802 & (latfi(ig)*180./pi.le.val2) .and. 2802 2803 & (lonfi(ig)*180./pi.ge.val3) .and. 2803 & (lonfi(ig)*180./pi.le.val4) ) then 2804 2804 & (lonfi(ig)*180./pi.le.val4) ) then 2805 2805 2806 IF ( (phisfi(ig).ge.val5) .and. 2806 2807 & (phisfi(ig).le.val6) ) then … … 2863 2864 end do 2864 2865 2865 c asymtopo: 2866 c asymtopo: 2866 2867 c ----------------------------------------------------- 2867 2868 else if (modif(1:len_trim(modif)) .eq. 'asymtopo') then … … 2923 2924 IF ( (latfi(ig)*180./pi.ge.val2) .and. 2924 2925 & (latfi(ig)*180./pi.le.val3) .and. 2925 & ( ((lonfi(ig)*180./pi.ge.-180.) .and. 2926 & ( ((lonfi(ig)*180./pi.ge.-180.) .and. 2926 2927 & (lonfi(ig)*180./pi.le.val5)) .or. 2927 & ((lonfi(ig)*180./pi.ge.val4) .and. 2928 & ((lonfi(ig)*180./pi.ge.val4) .and. 2928 2929 & (lonfi(ig)*180./pi.le.180.))) ) then 2929 2930 … … 2937 2938 DO l=1,nsoilmx 2938 2939 tsoil(ig,l)=tempsoil(l) 2939 ENDDO 2940 ENDIF 2940 ENDDO 2941 ENDIF 2941 2942 2942 2943 ! IF high topo : rm N2 … … 2976 2977 2977 2978 ENDIF 2978 2979 2979 2980 END DO 2980 2981 … … 2984 2985 do j=1,jjp1 2985 2986 do i=1,iip1 2986 if (phis(i,j).gt.0.1) then 2987 if (phis(i,j).gt.0.1) then 2987 2988 phis(i,j) = 0. 2988 2989 ps(i,j)=ps(iim/4,j) ! assuming no topo here 2989 endif 2990 endif 2990 2991 enddo 2991 2992 enddo … … 2999 3000 707 read(*,*,iostat=ierr) lat0, lon0 3000 3001 if(ierr.ne.0) goto 707 3001 if(lon0.gt.180.) lon0=lon0-360. 3002 if(lon0.gt.180.) lon0=lon0-360. 3002 3003 lat0 = lat0 * pi/180. 3003 3004 lon0 = lon0 * pi/180. … … 3029 3030 if (dist.le.radm) then 3030 3031 phisprev= phis(i,j) 3031 phis(i,j)=phisprev+1000.*g*height*(radm-dist)/radm 3032 phis(i,j)=phisprev+1000.*g*height*(radm-dist)/radm 3032 3033 write(*,*) 'lat=',rlatu(j)*180./pi 3033 3034 write(*,*) 'lon=',rlonv(i)*180./pi … … 3036 3037 ps(i,j) = ps(i,j) * 3037 3038 . exp((phis(i,j))/(temp * r)) 3038 end if 3039 end if 3039 3040 end do 3040 3041 end do … … 3072 3073 write(*,*)'Thermal inertia set for all subsurface layers' 3073 3074 ierr=0 3074 else 3075 else 3075 3076 write(*,*)'Depth should be more than ',layer(1) 3076 3077 ierr=1 … … 3083 3084 if(val2.eq.0) then 3084 3085 iref=1 3085 write(*,*)'Level selected is first level: ',layer(iref),' m' 3086 write(*,*)'Level selected is first level: ',layer(iref),' m' 3086 3087 else 3087 3088 do isoil=1,nsoilmx-1 … … 3093 3094 endif 3094 3095 enddo 3095 endif 3096 endif 3096 3097 3097 3098 DO ig=1,ngridmx … … 3133 3134 write(*,*)'Thermal inertia set for all subsurface layers' 3134 3135 ierr=0 3135 else 3136 else 3136 3137 write(*,*)'Depth should be more than ',layer(1) 3137 3138 ierr=1 … … 3144 3145 if(val2.eq.0) then 3145 3146 iref=1 3146 write(*,*)'Level selected is first level: ',layer(iref),' m' 3147 write(*,*)'Level selected is first level: ',layer(iref),' m' 3147 3148 else 3148 3149 do isoil=1,nsoilmx-1 … … 3154 3155 endif 3155 3156 enddo 3156 endif 3157 endif 3157 3158 3158 3159 DO ig=1,ngridmx … … 3195 3196 write(*,*)'Thermal inertia set for all subsurface layers' 3196 3197 ierr=0 3197 else 3198 else 3198 3199 write(*,*)'Depth should be more than ',layer(1) 3199 3200 ierr=1 … … 3206 3207 if(val3.eq.0) then 3207 3208 iref=1 3208 write(*,*)'Level selected is first level: ',layer(iref),' m' 3209 write(*,*)'Level selected is first level: ',layer(iref),' m' 3209 3210 else 3210 3211 do isoil=1,nsoilmx-1 … … 3216 3217 endif 3217 3218 enddo 3218 endif 3219 endif 3219 3220 3220 3221 DO ig=1,ngridmx … … 3255 3256 write(*,*)'Thermal inertia set for all subsurface layers' 3256 3257 ierr=0 3257 else 3258 else 3258 3259 write(*,*)'Depth should be more than ',layer(1) 3259 3260 ierr=1 … … 3266 3267 if(val2.eq.0) then 3267 3268 iref=1 3268 write(*,*)'Level selected is first level: ',layer(iref),' m' 3269 write(*,*)'Level selected is first level: ',layer(iref),' m' 3269 3270 else 3270 3271 do isoil=1,nsoilmx-1 … … 3278 3279 endif 3279 3280 enddo 3280 endif 3281 endif 3281 3282 3282 3283 DO ig=1,ngridmx … … 3399 3400 c ----------------------------------------------------- 3400 3401 else if (modif(1:len_trim(modif)) .eq. 'copylat') then 3401 3402 3402 3403 write(*,*) 'all latitudes : ',rlatu*180./pi 3403 3404 write(*,*) 'Choice band to be modified lat1 ?' … … 3432 3433 tsoil(ig,l)=tsoil(randtab(k),l)*val3 3433 3434 tsoil(ig,l)=tsoil(ig,l)+val4 3434 ENDDO 3435 ENDDO 3435 3436 k=k+1 3436 3437 ENDIF … … 3442 3443 c ----------------------------------------------------- 3443 3444 else if (modif(1:len_trim(modif)) .eq. 'copylon') then 3444 3445 3445 3446 write(*,*) 'all longitudes : ',rlonu*180./pi 3446 3447 write(*,*) 'Choice band to be modified lon1 ?' … … 3469 3470 tsoil(ig,l)=tsoil(randtab(k),l) 3470 3471 ENDDO 3471 qsurf(ig,1)=qsurf(randtab(k),1) 3472 phisfi(ig)=phisfi(randtab(k)) 3472 qsurf(ig,1)=qsurf(randtab(k),1) 3473 phisfi(ig)=phisfi(randtab(k)) 3473 3474 k=k+1 3474 3475 ENDIF … … 3481 3482 c ----------------------------------------------------- 3482 3483 else if (modif(1:len_trim(modif)) .eq. 'copylatlon') then 3483 3484 3484 3485 write(*,*) 'all longitudes : ',rlonu*180./pi 3485 3486 write(*,*) 'Choice lat/lon to be copied ?' … … 3547 3548 c ----------------------------------------------------- 3548 3549 else if (modif(1:len_trim(modif)) .eq. 'albedomap') then 3549 3550 3550 3551 ! Get field 2D 3551 3552 fichnom = 'albedo.nc' … … 3557 3558 ENDIF 3558 3559 3559 ierr = NF_INQ_VARID (nid_fi_input, trim("albedodat"), 3560 ierr = NF_INQ_VARID (nid_fi_input, trim("albedodat"), 3560 3561 & nvarid_input) 3561 3562 IF (ierr .NE. NF_NOERR) THEN … … 3573 3574 PRINT*, "Could not get asked variable in albedo.nc" 3574 3575 CALL abort 3575 ELSE 3576 ELSE 3576 3577 PRINT*, "Got variable in albedo.nc" 3577 3578 ENDIF … … 3596 3597 temp=40. 3597 3598 write(*,*) 'r, sale height temperature =',r,temp 3598 3599 3599 3600 do j=1,jjp1 3600 3601 do i=1,iip1 … … 3610 3611 ps(i,j) = ps(i,j) * 3611 3612 . exp((phisprev-phis(i,j))/(temp * r)) 3612 ENDIF 3613 ENDIF 3613 3614 end do 3614 3615 end do … … 3640 3641 temp=40. 3641 3642 write(*,*) 'r, sale height temperature =',r,temp 3642 3643 3643 3644 do j=1,jjp1 3644 3645 do i=1,iip1 … … 3653 3654 ps(i,j) = ps(i,j) * 3654 3655 . exp((phisprev-phis(i,j))/(temp * r)) 3655 ENDIF 3656 ENDIF 3656 3657 end do 3657 3658 end do … … 3665 3666 c ----------------------------------------------------- 3666 3667 else if (modif(1:len_trim(modif)) .eq. 'copytsoil') then 3667 3668 3668 3669 ! Get field 2D 3669 3670 fichnom = 'startfi_input.nc' … … 3702 3703 PRINT*, "Could not get asked variable in startfi_input.nc" 3703 3704 CALL abort 3704 ELSE 3705 ELSE 3705 3706 PRINT*, "Got variable in startfi_input.nc" 3706 3707 ENDIF … … 3714 3715 PRINT*, "Could not get asked variable s in startfi_input.nc" 3715 3716 CALL abort 3716 ELSE 3717 ELSE 3717 3718 PRINT*, "Got variable s in startfi_input.nc" 3718 3719 ENDIF … … 3804 3805 write(*,*) 'Newstart : you should set jm_plu to 180' 3805 3806 stop 3806 ENDIF 3807 ENDIF 3807 3808 ! Read values 3808 3809 do j=1,jm_plu+1 … … 3892 3893 alb=alb_gcm 3893 3894 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,alb_gcm,albfi) 3894 !print*, 'N2dat=',N2_pluto_gcm 3895 !print*, 'COdat=',CO_pluto_gcm 3896 !print*, 'CH4dat=',CH4_pluto_gcm 3895 !print*, 'N2dat=',N2_pluto_gcm 3896 !print*, 'COdat=',CO_pluto_gcm 3897 !print*, 'CH4dat=',CH4_pluto_gcm 3897 3898 print*, 'N2dat=',qsurf_tmp(:,igcm_n2) 3898 3899 print*, 'COdat=',qsurf_tmp(:,igcm_co_ice) … … 3910 3911 & qsurf_tmp(ig,igcm_co_ice) 3911 3912 endif 3912 ENDDO 3913 ENDDO 3913 3914 3914 3915 endif 3915 3916 3916 3917 enddo ! of do ! infinite loop on liste of changes 3917 3918 … … 3943 3944 c======================================================================= 3944 3945 3945 CALL inifilr 3946 CALL inifilr 3946 3947 CALL pression(ip1jmp1, ap, bp, ps, p3d) 3947 3948 … … 4005 4006 * phi,w, pbaru,pbarv,day_ini+time ) 4006 4007 4007 4008 4008 4009 CALL dynredem0("restart.nc",day_ini,phis) 4009 CALL dynredem1("restart.nc",0.0,vcov,ucov,teta,q,masse,ps) 4010 CALL dynredem1("restart.nc",0.0,vcov,ucov,teta,q,masse,ps) 4010 4011 C 4011 4012 C Ecriture etat initial physique … … 4023 4024 4024 4025 c======================================================================= 4025 c Formats 4026 c Formats 4026 4027 c======================================================================= 4027 4028
Note: See TracChangeset
for help on using the changeset viewer.