- Timestamp:
- May 19, 2014, 10:05:08 AM (11 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 2 added
- 4 deleted
- 96 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r1260 r1266 2107 2107 angle when SZA slightly greater than 90 2108 2108 - Corrected misleading warning in nlte_tcool.F 2109 2110 == 20/05/2014 == AS 2111 IMPORTANT CHANGE 2112 - Remove all reference/use of nlayermx and dimphys.h 2113 - Made use of automatic arrays whenever arrays are needed with dimension nlayer 2114 - Remove lots of obsolete reference to dimensions.h 2115 - Converted iono.h and param_v4.h into corresponding modules 2116 (with embedded subroutine to allocate arrays) 2117 (no arrays allocated if thermosphere not used) 2118 - Deleted param.h and put contents into module param_v4_h 2119 - Adapted testphys1d, newstart, etc... 2120 - Made DATA arrays in param_read to be initialized by subroutine 2121 fill_data_thermos in module param_v4_h 2122 - Optimized computations in paramfoto_compact (twice less dlog10 calculations) 2123 - Checked consistency before/after modification in debug mode 2124 - Checked performance is not impacted (same as before) -
trunk/LMDZ.MARS/libf/aeronomars/calchim.F90
r1226 r1266 67 67 !======================================================================= 68 68 69 !#include "dimensions.h"70 !#include "dimphys.h"71 69 #include "chimiedata.h" 72 !#include "tracer.h"73 70 #include "callkeys.h" 74 !#include "conc.h"75 71 76 72 ! input: … … 668 664 669 665 if (thermochem) then 670 call chemthermos(ig, lswitch,chemthermod,zycol,ztemp,zdens,&671 z press,zlocal,szacol,ptimestep,zday)666 call chemthermos(ig,nlayer,lswitch,chemthermod,zycol,ztemp,& 667 zdens,zpress,zlocal,szacol,ptimestep,zday) 672 668 end if 673 669 -
trunk/LMDZ.MARS/libf/aeronomars/chemthermos.F90
r1226 r1266 1 SUBROUTINE chemthermos(ig, lswitch,chemthermod,zycol,ztemp,zdens,&2 z press,zlocal,zenit,ptimestep,zday)1 SUBROUTINE chemthermos(ig,nlayer,lswitch,chemthermod,zycol,ztemp, & 2 zdens,zpress,zlocal,zenit,ptimestep,zday) 3 3 4 4 use tracer_mod, only: nqmx, igcm_co2, igcm_co, igcm_o, igcm_o1d, & … … 30 30 ! ------------------ 31 31 ! 32 #include "dimensions.h"33 #include "dimphys.h"34 32 #include "callkeys.h" 35 !#include "comdiurn.h"36 #include "param.h"37 #include "param_v4.h"38 !#include"tracer.h"39 33 !----------------------------------------------------------------------- 40 34 ! Input/Output 41 35 ! ------------ 42 integer :: lswitch,ig,chemthermod 43 real :: zycol(nlayer mx,nqmx)44 real :: ztemp(nlayer mx)45 real :: zdens(nlayer mx)46 real :: zpress(nlayer mx) ! in mbar47 real :: zlocal(nlayer mx)36 integer :: lswitch,ig,chemthermod,nlayer 37 real :: zycol(nlayer,nqmx) 38 real :: ztemp(nlayer) 39 real :: zdens(nlayer) 40 real :: zpress(nlayer) ! in mbar 41 real :: zlocal(nlayer) 48 42 real :: zenit 49 43 real :: ptimestep … … 426 420 427 421 !Allocate density vector 428 allocate(rm(nlayer mx,nesptherm))429 430 do l=1,nlayer mx422 allocate(rm(nlayer,nesptherm)) 423 424 do l=1,nlayer 431 425 rm(l,i_co2) = max(zycol(l,g_co2)*zdens(l),1.e-30) 432 426 rm(l,i_co) = max(zycol(l,g_co)*zdens(l),1.e-30) … … 474 468 call flujo(solarcondate) 475 469 if(solvarmod.eq.0) then 476 call jthermcalc(ig, chemthermod,rm,nesptherm,ztemp,zlocal,zenit)470 call jthermcalc(ig,nlayer,chemthermod,rm,nesptherm,ztemp,zlocal,zenit) 477 471 else if(solvarmod.eq.1) then 478 call jthermcalc_e107(ig, chemthermod,rm,nesptherm,ztemp,zlocal,zenit,zday)472 call jthermcalc_e107(ig,nlayer,chemthermod,rm,nesptherm,ztemp,zlocal,zenit,zday) 479 473 endif 480 474 … … 482 476 !Chemistry 483 477 call paramfoto_compact & 484 (ig, chemthermod,lswitch,ztemp,ptimestep,zenit,zlocal,rm,nesptherm)478 (ig,nlayer,chemthermod,lswitch,ztemp,ptimestep,zenit,zlocal,rm,nesptherm) 485 479 486 480 !Concentrations back to GCM 487 do l=lswitch,nlayer mx481 do l=lswitch,nlayer 488 482 zycol(l,g_co2) = max(rm(l,i_co2) / zdens(l) , 1.e-30) 489 483 zycol(l,g_co) = max(rm(l,i_co) / zdens(l) , 1.e-30) -
trunk/LMDZ.MARS/libf/aeronomars/chemthermos_readini.F
r1013 r1266 1 1 subroutine chemthermos_readini 2 2 3 use param_v4_h, only: rcoef 3 4 implicit none 4 5 6 c common variables and constants7 include "dimensions.h"8 include "dimphys.h"9 include 'param.h'10 include 'param_v4.h'11 include 'datafile.h'12 include "callkeys.h"13 14 5 15 6 c local variables -
trunk/LMDZ.MARS/libf/aeronomars/concentrations.F
r1226 r1266 27 27 ! declarations 28 28 29 !#include "dimensions.h"30 !#include "dimphys.h"31 29 #include "callkeys.h" 32 !#include "comdiurn.h"33 30 #include "chimiedata.h" 34 !#include "tracer.h"35 !#include "conc.h"36 31 37 32 ! input/output -
trunk/LMDZ.MARS/libf/aeronomars/conduction.F
r1226 r1266 16 16 c declarations: 17 17 c----------------------------------------------------------------------- 18 19 !#include "dimensions.h"20 !#include "dimphys.h"21 !#include "surfdat.h"22 !#include "chimiedata.h"23 !#include "conc.h"24 18 25 19 c arguments: -
trunk/LMDZ.MARS/libf/aeronomars/deposition.F
r1226 r1266 12 12 implicit none 13 13 c 14 !#include "dimensions.h"15 !#include "dimphys.h"16 !#include "chimiedata.h"17 !#include "conc.h"18 !#include "surfdat.h"19 14 c 20 15 c input -
trunk/LMDZ.MARS/libf/aeronomars/euvheat.F90
r1226 r1266 31 31 ! ------------------ 32 32 ! 33 !#include "dimensions.h"34 !#include "dimphys.h"35 33 #include "callkeys.h" 36 !#include "comdiurn.h"37 !#include "param.h"38 !#include "param_v4.h"39 !#include "chimiedata.h"40 !#include "tracer.h"41 !#include "conc.h"42 34 !----------------------------------------------------------------------- 43 35 ! Input/Output … … 413 405 enddo 414 406 !Routine to calculate the UV heating 415 call hrtherm (ig, euvmod,rm,nespeuv,tx,zlocal,zenit,zday,jtot)407 call hrtherm (ig,nlayer,euvmod,rm,nespeuv,tx,zlocal,zenit,zday,jtot) 416 408 417 409 ! euveff=0.16 !UV heating efficiency. Following Fox et al. ASR 1996 -
trunk/LMDZ.MARS/libf/aeronomars/hrtherm.F
r1119 r1266 1 1 c********************************************************************** 2 2 3 subroutine hrtherm(ig,euvmod,rm,nespeuv,tx,iz,zenit,zday,jtot) 3 subroutine hrtherm(ig,nlayer, 4 . euvmod,rm,nespeuv,tx,iz,zenit,zday,jtot) 4 5 5 6 … … 9 10 c********************************************************************** 10 11 12 use param_v4_h, only: ninter,nabs,jfotsout,fluxtop,freccen 13 11 14 implicit none 12 15 13 16 c common variables and constants 14 15 16 include 'dimensions.h'17 include 'dimphys.h'18 include 'param.h'19 include 'param_v4.h'20 17 include "callkeys.h" 21 18 … … 23 20 c local parameters and variables 24 21 25 real xabsi(nabs,nlayer mx) !densities26 real jergs(ninter,nabs,nlayer mx)22 real xabsi(nabs,nlayer) !densities 23 real jergs(ninter,nabs,nlayer) 27 24 28 25 integer i,j,k,indexint !indexes … … 32 29 c input and output variables 33 30 34 integer ig ,euvmod 31 integer ig ,euvmod,nlayer 35 32 integer nespeuv 36 real rm(nlayer mx,nespeuv) !density matrix (cm^-3)37 real jtot(nlayer mx) !output: heating rate(erg/s)38 real tx(nlayer mx) !temperature33 real rm(nlayer,nespeuv) !density matrix (cm^-3) 34 real jtot(nlayer) !output: heating rate(erg/s) 35 real tx(nlayer) !temperature 39 36 real zenit 40 real iz(nlayer mx)37 real iz(nlayer) 41 38 real zday 42 39 … … 67 64 end if 68 65 if(dn.eq.'n') then 69 do i=1,nlayer mx66 do i=1,nlayer 70 67 jtot(i)=0. 71 68 enddo … … 78 75 jtot(:)=0. 79 76 !All number densities to a single array, xabsi(species,layer) 80 do i=1,nlayer mx77 do i=1,nlayer 81 78 xabsi(1,i) = rm(i,i_co2) 82 79 xabsi(2,i) = rm(i,i_o2) … … 102 99 !Calculation of photoabsortion coefficient 103 100 if(solvarmod.eq.0) then 104 call jthermcalc(ig, euvmod,rm,nespeuv,tx,iz,zenit)101 call jthermcalc(ig,nlayer,euvmod,rm,nespeuv,tx,iz,zenit) 105 102 else if (solvarmod.eq.1) then 106 call jthermcalc_e107(ig,euvmod,rm,nespeuv,tx,iz,zenit,zday) 103 call jthermcalc_e107(ig,nlayer,euvmod, 104 . rm,nespeuv,tx,iz,zenit,zday) 107 105 endif 108 106 109 107 !Total photoabsorption coefficient 110 do i=1,nlayer mx108 do i=1,nlayer 111 109 jtot(i)=0. 112 110 do j=1,nabs -
trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F90
r1047 r1266 34 34 35 35 #include "dimensions.h" 36 !#include "dimphys.h"37 36 #include "paramet.h" 38 !#include "tracer.h"39 37 #include "comvert.h" 40 38 #include "callkeys.h" -
trunk/LMDZ.MARS/libf/aeronomars/jthermcalc.F
r1260 r1266 1 1 c********************************************************************** 2 2 3 subroutine jthermcalc(ig,chemthermod,rm,nesptherm,tx,iz,zenit) 3 subroutine jthermcalc(ig,nlayer,chemthermod, 4 . rm,nesptherm,tx,iz,zenit) 4 5 5 6 … … 11 12 c********************************************************************** 12 13 14 use param_v4_h, only: jfotsout,crscabsi2, 15 . c1_16,c17_24,c25_29,c30_31,c32,c33,c34,c35,c36, 16 . co2crsc195,co2crsc295,t0, 17 . jabsifotsintpar,ninter,nz2 18 13 19 implicit none 14 20 15 c common variables and constants16 include "dimensions.h"17 include "dimphys.h"18 include 'param.h'19 include 'param_v4.h'20 21 21 c input and output variables 22 22 23 integer ig 23 integer ig,nlayer 24 24 integer chemthermod 25 25 integer nesptherm !Number of species considered 26 real rm(nlayer mx,nesptherm) !Densities (cm-3)27 real tx(nlayer mx) !temperature26 real rm(nlayer,nesptherm) !Densities (cm-3) 27 real tx(nlayer) !temperature 28 28 real zenit !SZA 29 real iz(nlayer mx) !Local altitude29 real iz(nlayer) !Local altitude 30 30 31 31 32 32 c local parameters and variables 33 33 34 real co2colx(nlayer mx) !column density of CO2 (cm^-2)35 real o2colx(nlayer mx) !column density of O2(cm^-2)36 real o3pcolx(nlayer mx) !column density of O(3P)(cm^-2)37 real h2colx(nlayer mx) !H2 column density (cm-2)38 real h2ocolx(nlayer mx) !H2O column density (cm-2)39 real h2o2colx(nlayer mx) !column density of H2O2(cm^-2)40 real o3colx(nlayer mx) !O3 column density (cm-2)41 real n2colx(nlayer mx) !N2 column density (cm-2)42 real ncolx(nlayer mx) !N column density (cm-2)43 real nocolx(nlayer mx) !NO column density (cm-2)44 real cocolx(nlayer mx) !CO column density (cm-2)45 real hcolx(nlayer mx) !H column density (cm-2)46 real no2colx(nlayer mx) !NO2 column density (cm-2)47 real t2(nlayer mx)48 real coltemp(nlayer mx)49 real sigma(ninter,nlayer mx)50 real alfa(ninter,nlayer mx)34 real co2colx(nlayer) !column density of CO2 (cm^-2) 35 real o2colx(nlayer) !column density of O2(cm^-2) 36 real o3pcolx(nlayer) !column density of O(3P)(cm^-2) 37 real h2colx(nlayer) !H2 column density (cm-2) 38 real h2ocolx(nlayer) !H2O column density (cm-2) 39 real h2o2colx(nlayer) !column density of H2O2(cm^-2) 40 real o3colx(nlayer) !O3 column density (cm-2) 41 real n2colx(nlayer) !N2 column density (cm-2) 42 real ncolx(nlayer) !N column density (cm-2) 43 real nocolx(nlayer) !NO column density (cm-2) 44 real cocolx(nlayer) !CO column density (cm-2) 45 real hcolx(nlayer) !H column density (cm-2) 46 real no2colx(nlayer) !NO2 column density (cm-2) 47 real t2(nlayer) 48 real coltemp(nlayer) 49 real sigma(ninter,nlayer) 50 real alfa(ninter,nlayer) 51 51 52 52 integer i,j,k,indexint !indexes … … 71 71 real*8 auxjh(nz2) 72 72 real*8 auxjno2(nz2) 73 real*8 wp(nlayer mx),wm(nlayermx)74 real*8 auxcolinp(nlayer mx)75 integer auxind(nlayer mx)73 real*8 wp(nlayer),wm(nlayer) 74 real*8 auxcolinp(nlayer) 75 integer auxind(nlayer) 76 76 integer auxi 77 77 integer ind 78 real*8 cortemp(nlayer mx)78 real*8 cortemp(nlayer) 79 79 80 80 real*8 limdown !limits for interpolation … … 102 102 !Auxiliar temperature to take into account the temperature dependence 103 103 !of CO2 cross section 104 do i=1,nlayer mx104 do i=1,nlayer 105 105 t2(i)=tx(i) 106 106 if(t2(i).lt.195.0) t2(i)=195.0 … … 109 109 110 110 !Calculation of column amounts 111 call column(ig, chemthermod,rm,nesptherm,tx,iz,zenit,111 call column(ig,nlayer,chemthermod,rm,nesptherm,tx,iz,zenit, 112 112 $ co2colx,o2colx,o3pcolx,h2colx,h2ocolx, 113 113 $ h2o2colx,o3colx,n2colx,ncolx,nocolx,cocolx,hcolx,no2colx) … … 115 115 !Auxiliar column to include the temperature dependence 116 116 !of CO2 cross section 117 coltemp(nlayer mx)=co2colx(nlayermx)*abs(t2(nlayermx)-t0(nlayermx))118 do i=nlayer mx-1,1,-1117 coltemp(nlayer)=co2colx(nlayer)*abs(t2(nlayer)-t0(nlayer)) 118 do i=nlayer-1,1,-1 119 119 coltemp(i)=!coltemp(i+1)+ PQ SE ELIMINA? REVISAR 120 120 $ ( rm(i,i_co2) + rm(i+1,i_co2) ) * 0.5 … … 123 123 124 124 !Calculation of CO2 cross section at temperature t0(i) 125 do i=1,nlayer mx125 do i=1,nlayer 126 126 do indexint=24,32 127 127 sigma(indexint,i)=co2crsc195(indexint-23) … … 148 148 c Input atmospheric column 149 149 indexint=1 150 do i=1,nlayer mx151 auxcolinp(nlayer mx-i+1) = co2colx(i)*crscabsi2(1,indexint) +150 do i=1,nlayer 151 auxcolinp(nlayer-i+1) = co2colx(i)*crscabsi2(1,indexint) + 152 152 $ o2colx(i)*crscabsi2(2,indexint) + 153 153 $ o3pcolx(i)*crscabsi2(3,indexint) + … … 159 159 limdown=1.e-20 160 160 limup=1.e26 161 162 161 163 162 c Interpolations … … 185 184 186 185 call interfast 187 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)188 do i=1,nlayer mx186 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 187 do i=1,nlayer 189 188 ind=auxind(i) 190 auxi=nlayer mx-i+1189 auxi=nlayer-i+1 191 190 ! Ehouarn: test 192 191 if ((ind+1.gt.nz2).or.(ind.le.0)) then 193 192 write(*,*) "jthercalc error: ind=",ind,ig,zenit 194 write(*,*) " auxind(1:nlayer mx)=",auxind195 write(*,*) " auxcolinp(:nlayer mx)=",auxcolinp196 write(*,*) " co2colx(:nlayer mx)=",co2colx197 write(*,*) " o2colx(:nlayer mx)=",o2colx198 write(*,*) " o3pcolx(:nlayer mx)=",o3pcolx199 write(*,*) " h2colx(:nlayer mx)=",h2colx200 write(*,*) " ncolx(:nlayer mx)=",ncolx193 write(*,*) " auxind(1:nlayer)=",auxind 194 write(*,*) " auxcolinp(:nlayer)=",auxcolinp 195 write(*,*) " co2colx(:nlayer)=",co2colx 196 write(*,*) " o2colx(:nlayer)=",o2colx 197 write(*,*) " o3pcolx(:nlayer)=",o3pcolx 198 write(*,*) " h2colx(:nlayer)=",h2colx 199 write(*,*) " ncolx(:nlayer)=",ncolx 201 200 write(*,*) " auxcoltab(1:nz2)=",auxcoltab 202 201 write(*,*) " limdown=",limdown … … 220 219 !N interpolated coefficient 221 220 if(chemthermod.ge.2) then 222 do i=1,nlayer mx221 do i=1,nlayer 223 222 ind=auxind(i) 224 jfotsout(indexint,9,nlayer mx-i+1) = wm(i)*auxjn(ind+1) +223 jfotsout(indexint,9,nlayer-i+1) = wm(i)*auxjn(ind+1) + 225 224 $ wp(i)*auxjn(ind) 226 225 enddo … … 241 240 c Input atmospheric column 242 241 do indexint=2,15 243 do i=1,nlayer mx244 auxcolinp(nlayer mx-i+1) = co2colx(i)*crscabsi2(1,indexint)+242 do i=1,nlayer 243 auxcolinp(nlayer-i+1) = co2colx(i)*crscabsi2(1,indexint)+ 245 244 $ o2colx(i)*crscabsi2(2,indexint)+ 246 245 $ o3pcolx(i)*crscabsi2(3,indexint)+ … … 288 287 endif 289 288 290 call interfast(wm,wp,auxind,auxcolinp,nlayer mx,289 call interfast(wm,wp,auxind,auxcolinp,nlayer, 291 290 $ auxcoltab,nz2,limdown,limup) 292 do i=1,nlayer mx291 do i=1,nlayer 293 292 ind=auxind(i) 294 auxi = nlayer mx-i+1293 auxi = nlayer-i+1 295 294 !O2 interpolated coefficient 296 295 jfotsout(indexint,2,auxi) = wm(i)*auxjo2(ind+1) + … … 317 316 !Only if chemthermod.ge.2 318 317 if(chemthermod.ge.2) then 319 do i=1,nlayer mx318 do i=1,nlayer 320 319 ind=auxind(i) 321 auxi = nlayer mx-i+1320 auxi = nlayer-i+1 322 321 !N interpolated coefficient 323 322 jfotsout(indexint,9,auxi) = wm(i)*auxjn(ind+1) + … … 346 345 c Input atmospheric column 347 346 indexint=16 348 do i=1,nlayer mx349 auxcolinp(nlayer mx-i+1) = co2colx(i)*crscabsi2(1,indexint)+347 do i=1,nlayer 348 auxcolinp(nlayer-i+1) = co2colx(i)*crscabsi2(1,indexint)+ 350 349 $ o2colx(i)*crscabsi2(2,indexint)+ 351 350 $ o3pcolx(i)*crscabsi2(3,indexint)+ … … 393 392 394 393 call interfast 395 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)396 do i=1,nlayer mx394 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 395 do i=1,nlayer 397 396 ind=auxind(i) 398 auxi = nlayer mx-i+1397 auxi = nlayer-i+1 399 398 !O2 interpolated coefficient 400 399 jfotsout(indexint,2,auxi) = wm(i)*auxjo2(ind+1) + … … 418 417 !Only if chemthermod.ge.2 419 418 if(chemthermod.ge.2) then 420 do i=1,nlayer mx419 do i=1,nlayer 421 420 ind=auxind(i) 422 auxi = nlayer mx-i+1421 auxi = nlayer-i+1 423 422 !N interpolated coefficient 424 423 jfotsout(indexint,9,auxi) = wm(i)*auxjn(ind+1) + … … 444 443 c Input column 445 444 446 do i=1,nlayer mx447 auxcolinp(nlayer mx-i+1) = co2colx(i) + o2colx(i) + n2colx(i) +445 do i=1,nlayer 446 auxcolinp(nlayer-i+1) = co2colx(i) + o2colx(i) + n2colx(i) + 448 447 $ nocolx(i) + cocolx(i) + no2colx(i) 449 448 end do … … 478 477 479 478 call interfast 480 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)479 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 481 480 !Correction to include T variation of CO2 cross section 482 481 if(indexint.eq.24) then 483 do i=1,nlayer mx484 auxi = nlayer mx-i+1482 do i=1,nlayer 483 auxi = nlayer-i+1 485 484 if(sigma(indexint,auxi)* 486 485 $ alfa(indexint,auxi)*coltemp(auxi) … … 493 492 enddo 494 493 else 495 do i=1,nlayer mx494 do i=1,nlayer 496 495 cortemp(i)=1. 497 496 enddo 498 497 end if 499 do i=1,nlayer mx498 do i=1,nlayer 500 499 ind=auxind(i) 501 auxi = nlayer mx-i+1500 auxi = nlayer-i+1 502 501 !O2 interpolated coefficient 503 502 jfotsout(indexint,2,auxi) = (wm(i)*auxjo2(ind+1) + … … 519 518 !Only if chemthermod.ge.2 520 519 if(chemthermod.ge.2) then 521 do i=1,nlayer mx520 do i=1,nlayer 522 521 ind=auxind(i) 523 auxi = nlayer mx-i+1522 auxi = nlayer-i+1 524 523 !NO interpolated coefficient 525 524 jfotsout(indexint,10,auxi)=(wm(i)*auxjno(ind+1) + … … 544 543 c Input atmospheric column 545 544 546 do i=1,nlayer mx547 auxcolinp(nlayer mx-i+1) = co2colx(i) + o2colx(i) + h2ocolx(i) +545 do i=1,nlayer 546 auxcolinp(nlayer-i+1) = co2colx(i) + o2colx(i) + h2ocolx(i) + 548 547 $ h2o2colx(i) + nocolx(i) + cocolx(i) + no2colx(i) 549 548 end do … … 579 578 endif 580 579 call interfast 581 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)582 do i=1,nlayer mx580 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 581 do i=1,nlayer 583 582 ind=auxind(i) 584 auxi = nlayer mx-i+1583 auxi = nlayer-i+1 585 584 !Correction to include T variation of CO2 cross section 586 585 if(sigma(indexint,auxi)*alfa(indexint,auxi)* … … 611 610 !Only if chemthermod.ge.2 612 611 if(chemthermod.ge.2) then 613 do i=1,nlayer mx612 do i=1,nlayer 614 613 ind=auxind(i) 615 auxi = nlayer mx-i+1614 auxi = nlayer-i+1 616 615 !NO interpolated coefficient 617 616 jfotsout(indexint,10,auxi)=(wm(i)*auxjno(ind+1) + … … 638 637 c Input atmospheric column 639 638 640 do i=1,nlayer mx641 auxcolinp(nlayer mx-i+1) = co2colx(i) + o2colx(i) + h2ocolx(i) +639 do i=1,nlayer 640 auxcolinp(nlayer-i+1) = co2colx(i) + o2colx(i) + h2ocolx(i) + 642 641 $ h2o2colx(i) + nocolx(i) + no2colx(i) 643 642 end do … … 672 671 673 672 call interfast 674 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)675 do i=1,nlayer mx673 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 674 do i=1,nlayer 676 675 ind=auxind(i) 677 auxi = nlayer mx-i+1676 auxi = nlayer-i+1 678 677 !Correction to include T variation of CO2 cross section 679 678 if(sigma(indexint,auxi)*alfa(indexint,auxi)* … … 701 700 !Only if chemthermod.ge.2 702 701 if(chemthermod.ge.2) then 703 do i=1,nlayer mx702 do i=1,nlayer 704 703 ind=auxind(i) 705 auxi = nlayer mx-i+1704 auxi = nlayer-i+1 706 705 !NO interpolated coefficient 707 706 jfotsout(indexint,10,auxi)=(wm(i)*auxjno(ind+1) + … … 728 727 729 728 indexint=32 730 do i=1,nlayer mx731 auxcolinp(nlayer mx-i+1) =co2colx(i) + o2colx(i) + h2o2colx(i) +729 do i=1,nlayer 730 auxcolinp(nlayer-i+1) =co2colx(i) + o2colx(i) + h2o2colx(i) + 732 731 $ nocolx(i) + no2colx(i) 733 732 end do … … 757 756 endif 758 757 call interfast 759 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)760 do i=1,nlayer mx758 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 759 do i=1,nlayer 761 760 ind=auxind(i) 762 auxi = nlayer mx-i+1761 auxi = nlayer-i+1 763 762 !Correction to include T variation of CO2 cross section 764 if(sigma(indexint,nlayer mx-i+1)*alfa(indexint,auxi)*763 if(sigma(indexint,nlayer-i+1)*alfa(indexint,auxi)* 765 764 $ coltemp(auxi).lt.60.) then 766 765 cortemp(i)=exp(-sigma(indexint,auxi)* … … 783 782 !Only if chemthermod.ge.2 784 783 if(chemthermod.ge.2) then 785 do i=1,nlayer mx786 auxi = nlayer mx-i+1784 do i=1,nlayer 785 auxi = nlayer-i+1 787 786 ind=auxind(i) 788 787 !NO interpolated coefficient … … 808 807 809 808 indexint=33 810 do i=1,nlayer mx811 auxcolinp(nlayer mx-i+1) = o2colx(i) + h2o2colx(i) + no2colx(i)809 do i=1,nlayer 810 auxcolinp(nlayer-i+1) = o2colx(i) + h2o2colx(i) + no2colx(i) 812 811 end do 813 812 … … 831 830 endif 832 831 call interfast 833 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)834 do i=1,nlayer mx832 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 833 do i=1,nlayer 835 834 ind=auxind(i) 836 auxi = nlayer mx-i+1835 auxi = nlayer-i+1 837 836 !O2 interpolated coefficient 838 837 jfotsout(indexint,2,auxi) = wm(i)*auxjo2(ind+1) + … … 844 843 !Only if chemthermod.ge.2 845 844 if(chemthermod.ge.2) then 846 do i=1,nlayer mx845 do i=1,nlayer 847 846 ind=auxind(i) 848 847 !NO2 interpolated coefficient 849 jfotsout(indexint,13,nlayer mx-i+1) = wm(i)*auxjno2(ind+1) +848 jfotsout(indexint,13,nlayer-i+1) = wm(i)*auxjno2(ind+1) + 850 849 $ wp(i)*auxjno2(ind) 851 850 enddo … … 865 864 866 865 indexint=34 867 do i=1,nlayer mx868 auxcolinp(nlayer mx-i+1) = h2o2colx(i) + o2colx(i) + o3colx(i) +866 do i=1,nlayer 867 auxcolinp(nlayer-i+1) = h2o2colx(i) + o2colx(i) + o3colx(i) + 869 868 $ no2colx(i) 870 869 end do … … 891 890 endif 892 891 call interfast 893 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)894 do i=1,nlayer mx892 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 893 do i=1,nlayer 895 894 ind=auxind(i) 896 auxi = nlayer mx-i+1895 auxi = nlayer-i+1 897 896 !O2 interpolated coefficient 898 897 jfotsout(indexint,2,auxi) = wm(i)*auxjo2(ind+1) + … … 907 906 !Only if chemthermod.ge.2 908 907 if(chemthermod.ge.2) then 909 do i=1,nlayer mx908 do i=1,nlayer 910 909 ind=auxind(i) 911 910 !NO2 interpolated coefficient 912 jfotsout(indexint,13,nlayer mx-i+1) = wm(i)*auxjno2(ind+1) +911 jfotsout(indexint,13,nlayer-i+1) = wm(i)*auxjno2(ind+1) + 913 912 $ wp(i)*auxjno2(ind) 914 913 enddo … … 928 927 929 928 indexint=35 930 do i=1,nlayer mx931 auxcolinp(nlayer mx-i+1) = h2o2colx(i) + o3colx(i) + no2colx(i)929 do i=1,nlayer 930 auxcolinp(nlayer-i+1) = h2o2colx(i) + o3colx(i) + no2colx(i) 932 931 end do 933 932 … … 951 950 endif 952 951 call interfast 953 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)954 do i=1,nlayer mx952 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 953 do i=1,nlayer 955 954 ind=auxind(i) 956 auxi = nlayer mx-i+1955 auxi = nlayer-i+1 957 956 !H2O2 interpolated coefficient 958 957 jfotsout(indexint,6,auxi) = wm(i)*auxjh2o2(ind+1) + … … 963 962 enddo 964 963 if(chemthermod.ge.2) then 965 do i=1,nlayer mx964 do i=1,nlayer 966 965 ind=auxind(i) 967 966 !NO2 interpolated coefficient 968 jfotsout(indexint,13,nlayer mx-i+1) = wm(i)*auxjno2(ind+1) +967 jfotsout(indexint,13,nlayer-i+1) = wm(i)*auxjno2(ind+1) + 969 968 $ wp(i)*auxjno2(ind) 970 969 enddo … … 983 982 984 983 indexint=36 985 do i=1,nlayer mx986 auxcolinp(nlayer mx-i+1) = o3colx(i) + no2colx(i)984 do i=1,nlayer 985 auxcolinp(nlayer-i+1) = o3colx(i) + no2colx(i) 987 986 end do 988 987 … … 1004 1003 endif 1005 1004 call interfast 1006 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)1007 do i=1,nlayer mx1005 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 1006 do i=1,nlayer 1008 1007 ind=auxind(i) 1009 1008 !O3 interpolated coefficient 1010 jfotsout(indexint,7,nlayer mx-i+1) = wm(i)*auxjo3(ind+1) +1009 jfotsout(indexint,7,nlayer-i+1) = wm(i)*auxjo3(ind+1) + 1011 1010 $ wp(i)*auxjo3(ind) 1012 1011 enddo 1013 1012 !Only if chemthermod.ge.2 1014 1013 if(chemthermod.ge.2) then 1015 do i=1,nlayer mx1014 do i=1,nlayer 1016 1015 ind=auxind(i) 1017 1016 !NO2 interpolated coefficient 1018 jfotsout(indexint,13,nlayer mx-i+1) = wm(i)*auxjno2(ind+1) +1017 jfotsout(indexint,13,nlayer-i+1) = wm(i)*auxjno2(ind+1) + 1019 1018 $ wp(i)*auxjno2(ind) 1020 1019 enddo … … 1035 1034 c********************************************************************** 1036 1035 1037 subroutine column(ig, chemthermod,rm,nesptherm,tx,iz,zenit,1036 subroutine column(ig,nlayer,chemthermod,rm,nesptherm,tx,iz,zenit, 1038 1037 $ co2colx,o2colx,o3pcolx,h2colx,h2ocolx,h2o2colx,o3colx, 1039 1038 $ n2colx,ncolx,nocolx,cocolx,hcolx,no2colx) … … 1047 1046 & igcm_o3, igcm_n2, igcm_n, igcm_no, igcm_no2, 1048 1047 & mmol 1048 use param_v4_h, only: radio,gg,masa,kboltzman,n_avog 1049 1049 1050 implicit none 1050 1051 1051 1052 1052 1053 c common variables and constants 1053 include "dimensions.h"1054 include "dimphys.h"1055 ! include "tracer.h"1056 include 'param.h'1057 include 'param_v4.h'1058 1054 include 'callkeys.h' 1059 1055 … … 1066 1062 c input and output variables 1067 1063 1068 integer ig 1064 integer ig,nlayer 1069 1065 integer chemthermod 1070 1066 integer nesptherm !# of species undergoing chemistry, input 1071 real rm(nlayer mx,nesptherm) !densities (cm-3), input1072 real tx(nlayer mx) !temperature profile, input1073 real iz(nlayer mx+1) !height profile, input1067 real rm(nlayer,nesptherm) !densities (cm-3), input 1068 real tx(nlayer) !temperature profile, input 1069 real iz(nlayer+1) !height profile, input 1074 1070 real zenit !SZA, input 1075 real co2colx(nlayer mx) !column density of CO2 (cm^-2), output1076 real o2colx(nlayer mx) !column density of O2(cm^-2), output1077 real o3pcolx(nlayer mx) !column density of O(3P)(cm^-2), output1078 real h2colx(nlayer mx) !H2 column density (cm-2), output1079 real h2ocolx(nlayer mx) !H2O column density (cm-2), output1080 real h2o2colx(nlayer mx) !column density of H2O2(cm^-2), output1081 real o3colx(nlayer mx) !O3 column density (cm-2), output1082 real n2colx(nlayer mx) !N2 column density (cm-2), output1083 real ncolx(nlayer mx) !N column density (cm-2), output1084 real nocolx(nlayer mx) !NO column density (cm-2), output1085 real cocolx(nlayer mx) !CO column density (cm-2), output1086 real hcolx(nlayer mx) !H column density (cm-2), output1087 real no2colx(nlayer mx) !NO2 column density (cm-2), output1088 1071 real co2colx(nlayer) !column density of CO2 (cm^-2), output 1072 real o2colx(nlayer) !column density of O2(cm^-2), output 1073 real o3pcolx(nlayer) !column density of O(3P)(cm^-2), output 1074 real h2colx(nlayer) !H2 column density (cm-2), output 1075 real h2ocolx(nlayer) !H2O column density (cm-2), output 1076 real h2o2colx(nlayer) !column density of H2O2(cm^-2), output 1077 real o3colx(nlayer) !O3 column density (cm-2), output 1078 real n2colx(nlayer) !N2 column density (cm-2), output 1079 real ncolx(nlayer) !N column density (cm-2), output 1080 real nocolx(nlayer) !NO column density (cm-2), output 1081 real cocolx(nlayer) !CO column density (cm-2), output 1082 real hcolx(nlayer) !H column density (cm-2), output 1083 real no2colx(nlayer) !NO2 column density (cm-2), output 1084 1089 1085 1090 1086 c local variables 1091 1087 1092 1088 real xx 1093 real grav(nlayer mx)1089 real grav(nlayer) 1094 1090 real Hco2,Ho3p,Ho2,Hh2,Hh2o,Hh2o2 1095 1091 real Ho3,Hn2,Hn,Hno,Hco,Hh,Hno2 1096 1092 1097 real co2x(nlayer mx)1098 real o2x(nlayer mx)1099 real o3px(nlayer mx)1100 real cox(nlayer mx)1101 real hx(nlayer mx)1102 real h2x(nlayer mx)1103 real h2ox(nlayer mx)1104 real h2o2x(nlayer mx)1105 real o3x(nlayer mx)1106 real n2x(nlayer mx)1107 real nx(nlayer mx)1108 real nox(nlayer mx)1109 real no2x(nlayer mx)1093 real co2x(nlayer) 1094 real o2x(nlayer) 1095 real o3px(nlayer) 1096 real cox(nlayer) 1097 real hx(nlayer) 1098 real h2x(nlayer) 1099 real h2ox(nlayer) 1100 real h2o2x(nlayer) 1101 real o3x(nlayer) 1102 real n2x(nlayer) 1103 real nx(nlayer) 1104 real nox(nlayer) 1105 real no2x(nlayer) 1110 1106 1111 1107 integer i,j,k,icol,indexint !indexes … … 1117 1113 1118 1114 integer jj 1119 real*8 esp(nlayer mx*2)1120 real*8 ilayesp(nlayer mx*2)1121 real*8 szalayesp(nlayer mx*2)1115 real*8 esp(nlayer*2) 1116 real*8 ilayesp(nlayer*2) 1117 real*8 szalayesp(nlayer*2) 1122 1118 integer nlayesp 1123 1119 real*8 zmini … … 1149 1145 c*************************PROGRAM STARTS******************************* 1150 1146 1151 nz3 = nlayer mx*21152 do i=1,nlayer mx1147 nz3 = nlayer*2 1148 do i=1,nlayer 1153 1149 xx = ( radio + iz(i) ) * 1.e5 1154 1150 grav(i) = gg * masa /(xx**2) … … 1156 1152 1157 1153 !Scale heights 1158 xx = kboltzman * tx(nlayer mx) * n_avog / grav(nlayermx)1154 xx = kboltzman * tx(nlayer) * n_avog / grav(nlayer) 1159 1155 Ho3p = xx / mmol(igcm_o) 1160 1156 Hco2 = xx / mmol(igcm_co2) … … 1176 1172 endif 1177 1173 ! first loop in altitude : initialisation 1178 do i=nlayer mx,1,-11174 do i=nlayer,1,-1 1179 1175 !Column initialisation 1180 1176 co2colx(i) = 0. … … 1212 1208 enddo 1213 1209 ! second loop in altitude : column calculations 1214 do i=nlayer mx,1,-11210 do i=nlayer,1,-1 1215 1211 !Routine to calculate the geometrical length of each layer 1216 call espesor_optico_A(ig,i, zenit,iz(i),nz3,iz,esp,ilayesp,1217 $ szalayesp,nlayesp, zmini)1212 call espesor_optico_A(ig,i,nlayer,zenit,iz(i),nz3,iz,esp, 1213 $ ilayesp,szalayesp,nlayesp, zmini) 1218 1214 if(ilayesp(nlayesp).eq.-1) then 1219 1215 co2colx(i)=1.e25 … … 1231 1227 no2colx(i)=1.e25 1232 1228 else 1233 rcmnz = ( radio + iz(nlayer mx) ) * 1.e51229 rcmnz = ( radio + iz(nlayer) ) * 1.e5 1234 1230 rcmmini = ( radio + zmini ) * 1.e5 1235 1231 !Column calculation taking into account the geometrical depth … … 1238 1234 jj=ilayesp(j) 1239 1235 !Top layer 1240 if(jj.eq.nlayer mx) then1236 if(jj.eq.nlayer) then 1241 1237 if(zenit.le.60.) then 1242 o3pcolx(i)=o3pcolx(i)+o3px(nlayer mx)*Ho3p*esp(j)1238 o3pcolx(i)=o3pcolx(i)+o3px(nlayer)*Ho3p*esp(j) 1243 1239 $ *1.e-5 1244 co2colx(i)=co2colx(i)+co2x(nlayer mx)*Hco2*esp(j)1240 co2colx(i)=co2colx(i)+co2x(nlayer)*Hco2*esp(j) 1245 1241 $ *1.e-5 1246 1242 h2o2colx(i)=h2o2colx(i)+ 1247 $ h2o2x(nlayer mx)*Hh2o2*esp(j)*1.e-51248 o2colx(i)=o2colx(i)+o2x(nlayer mx)*Ho2*esp(j)1243 $ h2o2x(nlayer)*Hh2o2*esp(j)*1.e-5 1244 o2colx(i)=o2colx(i)+o2x(nlayer)*Ho2*esp(j) 1249 1245 $ *1.e-5 1250 h2colx(i)=h2colx(i)+h2x(nlayer mx)*Hh2*esp(j)1246 h2colx(i)=h2colx(i)+h2x(nlayer)*Hh2*esp(j) 1251 1247 $ *1.e-5 1252 h2ocolx(i)=h2ocolx(i)+h2ox(nlayer mx)*Hh2o*esp(j)1248 h2ocolx(i)=h2ocolx(i)+h2ox(nlayer)*Hh2o*esp(j) 1253 1249 $ *1.e-5 1254 cocolx(i)=cocolx(i)+cox(nlayer mx)*Hco*esp(j)1250 cocolx(i)=cocolx(i)+cox(nlayer)*Hco*esp(j) 1255 1251 $ *1.e-5 1256 hcolx(i)=hcolx(i)+hx(nlayer mx)*Hh*esp(j)1252 hcolx(i)=hcolx(i)+hx(nlayer)*Hh*esp(j) 1257 1253 $ *1.e-5 1258 1254 !Only if O3 chemistry required 1259 1255 if(chemthermod.ge.1) o3colx(i)= 1260 $ o3colx(i)+o3x(nlayer mx)*Ho3*esp(j)1256 $ o3colx(i)+o3x(nlayer)*Ho3*esp(j) 1261 1257 $ *1.e-5 1262 1258 !Only if N or ion chemistry requested 1263 1259 if(chemthermod.ge.2) then 1264 n2colx(i)=n2colx(i)+n2x(nlayer mx)*Hn2*esp(j)1260 n2colx(i)=n2colx(i)+n2x(nlayer)*Hn2*esp(j) 1265 1261 $ *1.e-5 1266 ncolx(i)=ncolx(i)+nx(nlayer mx)*Hn*esp(j)1262 ncolx(i)=ncolx(i)+nx(nlayer)*Hn*esp(j) 1267 1263 $ *1.e-5 1268 nocolx(i)=nocolx(i)+nox(nlayer mx)*Hno*esp(j)1264 nocolx(i)=nocolx(i)+nox(nlayer)*Hno*esp(j) 1269 1265 $ *1.e-5 1270 no2colx(i)=no2colx(i)+no2x(nlayer mx)*Hno2*esp(j)1266 no2colx(i)=no2colx(i)+no2x(nlayer)*Hno2*esp(j) 1271 1267 $ *1.e-5 1272 1268 endif … … 1290 1286 espno2=sqrt((rcmnz+Hno2)**2-rcmmini**2)- esp(j) 1291 1287 endif 1292 co2colx(i) = co2colx(i) + espco2*co2x(nlayer mx)1293 o2colx(i) = o2colx(i) + espo2*o2x(nlayer mx)1294 o3pcolx(i) = o3pcolx(i) + espo3p*o3px(nlayer mx)1295 h2colx(i) = h2colx(i) + esph2*h2x(nlayer mx)1296 h2ocolx(i) = h2ocolx(i) + esph2o*h2ox(nlayer mx)1297 h2o2colx(i)= h2o2colx(i)+ esph2o2*h2o2x(nlayer mx)1298 cocolx(i) = cocolx(i) + espco*cox(nlayer mx)1299 hcolx(i) = hcolx(i) + esph*hx(nlayer mx)1288 co2colx(i) = co2colx(i) + espco2*co2x(nlayer) 1289 o2colx(i) = o2colx(i) + espo2*o2x(nlayer) 1290 o3pcolx(i) = o3pcolx(i) + espo3p*o3px(nlayer) 1291 h2colx(i) = h2colx(i) + esph2*h2x(nlayer) 1292 h2ocolx(i) = h2ocolx(i) + esph2o*h2ox(nlayer) 1293 h2o2colx(i)= h2o2colx(i)+ esph2o2*h2o2x(nlayer) 1294 cocolx(i) = cocolx(i) + espco*cox(nlayer) 1295 hcolx(i) = hcolx(i) + esph*hx(nlayer) 1300 1296 !Only if O3 chemistry required 1301 1297 if(chemthermod.ge.1) 1302 $ o3colx(i) = o3colx(i) + espo3*o3x(nlayer mx)1298 $ o3colx(i) = o3colx(i) + espo3*o3x(nlayer) 1303 1299 !Only if N or ion chemistry requested 1304 1300 if(chemthermod.ge.2) then 1305 n2colx(i) = n2colx(i) + espn2*n2x(nlayer mx)1306 ncolx(i) = ncolx(i) + espn*nx(nlayer mx)1307 nocolx(i) = nocolx(i) + espno*nox(nlayer mx)1308 no2colx(i) = no2colx(i) + espno2*no2x(nlayer mx)1301 n2colx(i) = n2colx(i) + espn2*n2x(nlayer) 1302 ncolx(i) = ncolx(i) + espn*nx(nlayer) 1303 nocolx(i) = nocolx(i) + espno*nox(nlayer) 1304 no2colx(i) = no2colx(i) + espno2*no2x(nlayer) 1309 1305 endif 1310 1306 endif !Of if zenit.lt.60 … … 1342 1338 $ esp(j) * (no2x(jj)+no2x(jj+1)) / 2. 1343 1339 endif 1344 endif !Of if jj.eq.nlayer mx1340 endif !Of if jj.eq.nlayer 1345 1341 end do !Of do j=1,nlayesp 1346 1342 endif !Of ilayesp(nlayesp).eq.-1 1347 1348 enddo !Of do i=nlayermx,1,-1 1343 enddo !Of do i=nlayer,1,-1 1349 1344 1350 1345 … … 1394 1389 c********************************************************************** 1395 1390 1396 subroutine espesor_optico_A (ig,capa, szadeg,z,1391 subroutine espesor_optico_A (ig,capa,nlayer, szadeg,z, 1397 1392 @ nz3,iz,esp,ilayesp,szalayesp,nlayesp, zmini) 1398 1393 … … 1402 1397 ************************************************************************* 1403 1398 1399 use param_v4_h, only: radio 1404 1400 implicit none 1405 1406 1407 c common variables and constants1408 1409 include "dimensions.h"1410 include "dimphys.h"1411 include 'param.h'1412 include 'param_v4.h'1413 1401 1414 1402 c arguments … … 1416 1404 real szadeg ! I. SZA [rad] 1417 1405 real z ! I. altitude of interest [km] 1418 integer nz3,ig 1419 ! (=2*nlayer mx= max# of layers in ray path)1420 real iz(nlayer mx+1) ! I. Altitude of each layer1406 integer nz3,ig,nlayer ! I. dimension of esp, ylayesp, etc... 1407 ! (=2*nlayer= max# of layers in ray path) 1408 real iz(nlayer+1) ! I. Altitude of each layer 1421 1409 real*8 esp(nz3) ! O. layer widths after geometrically 1422 1410 ! amplified; in [cm] except at TOA … … 1435 1423 real*8 szarad ! SZA [deg] 1436 1424 real*8 zz 1437 real*8 diz(nlayer mx+1)1425 real*8 diz(nlayer+1) 1438 1426 real*8 rkmnz ! distance TOA to center of Planet [km] 1439 1427 real*8 rkmmini ! distance zmini to center of P [km] … … 1448 1436 szarad = dble(szadeg)*3.141592d0/180.d0 1449 1437 zz=dble(z) 1450 do i=1,nlayer mx1438 do i=1,nlayer 1451 1439 diz(i)=dble(iz(i)) 1452 1440 enddo … … 1466 1454 1467 1455 zmini = zz 1468 if(abs(zz-diz(nlayer mx)).lt.1.d-3) goto 13571456 if(abs(zz-diz(nlayer)).lt.1.d-3) goto 1357 1469 1457 ! 1st Zone: Upper part of ray 1470 1458 ! 1471 do j=grid_R8(zz,diz,nlayer mx),nlayermx-11459 do j=grid_R8(zz,diz,nlayer),nlayer-1 1472 1460 nlayesp = nlayesp + 1 1473 1461 ilayesp(nlayesp) = j … … 1481 1469 1357 continue 1482 1470 nlayesp = nlayesp + 1 1483 ilayesp(nlayesp) = nlayer mx1471 ilayesp(nlayesp) = nlayer 1484 1472 esp(nlayesp) = 1.d0 / cos(szarad) ! aux. non-dimens. factor 1485 1473 szalayesp(nlayesp) = szadeg … … 1498 1486 rkmmini = radio + zmini 1499 1487 1500 if(abs(zz-diz(nlayer mx)).lt.1.d-4) goto 14701488 if(abs(zz-diz(nlayer)).lt.1.d-4) goto 1470 1501 1489 1502 1490 ! 1st Zone: Upper part of ray 1503 1491 ! 1504 do j=grid_R8(zz,diz,nlayer mx),nlayermx-11492 do j=grid_R8(zz,diz,nlayer),nlayer-1 1505 1493 nlayesp = nlayesp + 1 1506 1494 ilayesp(nlayesp) = j … … 1517 1505 ! 1518 1506 nlayesp = nlayesp + 1 1519 ilayesp(nlayesp) = nlayer mx1520 rkmnz = radio+diz(nlayer mx)1507 ilayesp(nlayesp) = nlayer 1508 rkmnz = radio+diz(nlayer) 1521 1509 esp(nlayesp) = sqrt( rkmnz**2 - rkmmini**2 ) ! aux.factor[km] 1522 1510 esp(nlayesp) = esp(nlayesp) * 1.d5 ! aux.f. [cm] … … 1549 1537 1550 1538 else 1551 jmin=grid_R8(zmini,diz,nlayer mx)+11539 jmin=grid_R8(zmini,diz,nlayer)+1 1552 1540 !Correction for possible rounding errors when SZA very close 1553 1541 !to 90 degrees 1554 if(jmin.gt.grid_R8(zz,diz,nlayer mx)) then1542 if(jmin.gt.grid_R8(zz,diz,nlayer)) then 1555 1543 write(*,*)'jthermcalc warning: possible rounding error' 1556 1544 write(*,*)'point,sza,layer:',ig,szadeg,capa 1557 jmin=grid_R8(zz,diz,nlayer mx)1545 jmin=grid_R8(zz,diz,nlayer) 1558 1546 endif 1559 1547 1560 if(abs(zz-diz(nlayer mx)).lt.1.d-4) goto 98761548 if(abs(zz-diz(nlayer)).lt.1.d-4) goto 9876 1561 1549 1562 1550 ! 1st Zone: Upper part of ray 1563 1551 ! 1564 do j=grid_R8(zz,diz,nlayer mx),nlayermx-11552 do j=grid_R8(zz,diz,nlayer),nlayer-1 1565 1553 nlayesp = nlayesp + 1 1566 1554 ilayesp(nlayesp) = j … … 1578 1566 ! 1579 1567 nlayesp = nlayesp + 1 1580 ilayesp(nlayesp) = nlayer mx1581 rkmnz = radio+diz(nlayer mx)1568 ilayesp(nlayesp) = nlayer 1569 rkmnz = radio+diz(nlayer) 1582 1570 esp(nlayesp) = sqrt( rkmnz**2 - rkmmini**2 ) !aux.factor[km] 1583 1571 esp(nlayesp) = esp(nlayesp) * 1.d5 !aux.f.[cm] … … 1601 1589 ! 4th zone: Lower part of ray, increasing from zmin to z 1602 1590 ! ( layers with SZA < 90 deg ) 1603 do j=jmin,grid_R8(zz,diz,nlayer mx)-11591 do j=jmin,grid_R8(zz,diz,nlayer)-1 1604 1592 nlayesp = nlayesp + 1 1605 1593 ilayesp(nlayesp) = j … … 1615 1603 ! 5th zone: Lower part of ray, decreasing from z to zmin 1616 1604 ! ( layers with SZA > 90 deg ) 1617 do j=grid_R8(zz,diz,nlayer mx)-1, jmin, -11605 do j=grid_R8(zz,diz,nlayer)-1, jmin, -1 1618 1606 nlayesp = nlayesp + 1 1619 1607 ilayesp(nlayesp) = j … … 1721 1709 1722 1710 use comsaison_h, only: dist_sol 1711 use param_v4_h, only: ninter, 1712 . fluxtop, ct1, ct2, p1, p2 1723 1713 implicit none 1724 1714 1725 1715 1726 1716 ! common variables and constants 1727 include "dimensions.h"1728 include "dimphys.h"1729 ! include "comsaison.h"1730 include 'param.h'1731 include 'param_v4.h'1732 1717 include "callkeys.h" 1733 1718 -
trunk/LMDZ.MARS/libf/aeronomars/jthermcalc_e107.F
r762 r1266 2 2 3 3 subroutine jthermcalc_e107 4 $ (ig, chemthermod,rm,nesptherm,tx,iz,zenit,zday)4 $ (ig,nlayer,chemthermod,rm,nesptherm,tx,iz,zenit,zday) 5 5 6 6 … … 12 12 c********************************************************************** 13 13 14 use param_v4_h, only: jfotsout,crscabsi2, 15 . c1_16,c17_24,c25_29,c30_31,c32,c33,c34,c35,c36, 16 . co2crsc195,co2crsc295,t0, 17 . jabsifotsintpar,ninter,nz2, 18 . nabs,e107,date_e107,e107_tab, 19 . coefit0,coefit1,coefit2,coefit3,coefit4 20 14 21 implicit none 15 22 16 c common variables and constants17 include "dimensions.h"18 include "dimphys.h"19 include 'param.h'20 include 'param_v4.h'21 22 23 c input and output variables 23 24 24 integer ig 25 integer ig,nlayer 25 26 integer chemthermod 26 27 integer nesptherm !Number of species considered 27 real rm(nlayer mx,nesptherm) !Densities (cm-3)28 real tx(nlayer mx) !temperature28 real rm(nlayer,nesptherm) !Densities (cm-3) 29 real tx(nlayer) !temperature 29 30 real zenit !SZA 30 real iz(nlayer mx) !Local altitude31 real iz(nlayer) !Local altitude 31 32 real zday !Martian day after Ls=0 32 33 … … 34 35 c local parameters and variables 35 36 36 real co2colx(nlayer mx) !column density of CO2 (cm^-2)37 real o2colx(nlayer mx) !column density of O2(cm^-2)38 real o3pcolx(nlayer mx) !column density of O(3P)(cm^-2)39 real h2colx(nlayer mx) !H2 column density (cm-2)40 real h2ocolx(nlayer mx) !H2O column density (cm-2)41 real h2o2colx(nlayer mx) !column density of H2O2(cm^-2)42 real o3colx(nlayer mx) !O3 column density (cm-2)43 real n2colx(nlayer mx) !N2 column density (cm-2)44 real ncolx(nlayer mx) !N column density (cm-2)45 real nocolx(nlayer mx) !NO column density (cm-2)46 real cocolx(nlayer mx) !CO column density (cm-2)47 real hcolx(nlayer mx) !H column density (cm-2)48 real no2colx(nlayer mx) !NO2 column density (cm-2)49 real t2(nlayer mx)50 real coltemp(nlayer mx)51 real sigma(ninter,nlayer mx)52 real alfa(ninter,nlayer mx)37 real co2colx(nlayer) !column density of CO2 (cm^-2) 38 real o2colx(nlayer) !column density of O2(cm^-2) 39 real o3pcolx(nlayer) !column density of O(3P)(cm^-2) 40 real h2colx(nlayer) !H2 column density (cm-2) 41 real h2ocolx(nlayer) !H2O column density (cm-2) 42 real h2o2colx(nlayer) !column density of H2O2(cm^-2) 43 real o3colx(nlayer) !O3 column density (cm-2) 44 real n2colx(nlayer) !N2 column density (cm-2) 45 real ncolx(nlayer) !N column density (cm-2) 46 real nocolx(nlayer) !NO column density (cm-2) 47 real cocolx(nlayer) !CO column density (cm-2) 48 real hcolx(nlayer) !H column density (cm-2) 49 real no2colx(nlayer) !NO2 column density (cm-2) 50 real t2(nlayer) 51 real coltemp(nlayer) 52 real sigma(ninter,nlayer) 53 real alfa(ninter,nlayer) 53 54 real realday 54 55 … … 75 76 real*8 auxjh(nz2) 76 77 real*8 auxjno2(nz2) 77 real*8 wp(nlayer mx),wm(nlayermx)78 real*8 auxcolinp(nlayer mx)79 integer auxind(nlayer mx)78 real*8 wp(nlayer),wm(nlayer) 79 real*8 auxcolinp(nlayer) 80 integer auxind(nlayer) 80 81 integer auxi 81 82 integer ind 82 real*8 cortemp(nlayer mx)83 real*8 cortemp(nlayer) 83 84 84 85 real*8 limdown !limits for interpolation … … 106 107 !Auxiliar temperature to take into account the temperature dependence 107 108 !of CO2 cross section 108 do i=1,nlayer mx109 do i=1,nlayer 109 110 t2(i)=tx(i) 110 111 if(t2(i).lt.195.0) t2(i)=195.0 … … 113 114 114 115 !Calculation of column amounts 115 call column(ig, chemthermod,rm,nesptherm,tx,iz,zenit,116 call column(ig,nlayer,chemthermod,rm,nesptherm,tx,iz,zenit, 116 117 $ co2colx,o2colx,o3pcolx,h2colx,h2ocolx, 117 118 $ h2o2colx,o3colx,n2colx,ncolx,nocolx,cocolx,hcolx,no2colx) … … 119 120 !Auxiliar column to include the temperature dependence 120 121 !of CO2 cross section 121 coltemp(nlayer mx)=co2colx(nlayermx)*abs(t2(nlayermx)-t0(nlayermx))122 do i=nlayer mx-1,1,-1122 coltemp(nlayer)=co2colx(nlayer)*abs(t2(nlayer)-t0(nlayer)) 123 do i=nlayer-1,1,-1 123 124 coltemp(i)=!coltemp(i+1)+ PQ SE ELIMINA? REVISAR 124 125 $ ( rm(i,i_co2) + rm(i+1,i_co2) ) * 0.5 … … 127 128 128 129 !Calculation of CO2 cross section at temperature t0(i) 129 do i=1,nlayer mx130 do i=1,nlayer 130 131 do indexint=24,32 131 132 sigma(indexint,i)=co2crsc195(indexint-23) … … 157 158 do j=1,nabs 158 159 do indexint=1,ninter 159 jfotsout(indexint,j,nlayer mx)=coefit0(indexint,j)+160 jfotsout(indexint,j,nlayer)=coefit0(indexint,j)+ 160 161 $ coefit1(indexint,j)*e107+coefit2(indexint,j)*e107**2+ 161 162 $ coefit3(indexint,j)*e107**3+coefit4(indexint,j)*e107**4 … … 179 180 c Input atmospheric column 180 181 indexint=1 181 do i=1,nlayer mx182 auxcolinp(nlayer mx-i+1) = co2colx(i)*crscabsi2(1,indexint) +182 do i=1,nlayer 183 auxcolinp(nlayer-i+1) = co2colx(i)*crscabsi2(1,indexint) + 183 184 $ o2colx(i)*crscabsi2(2,indexint) + 184 185 $ o3pcolx(i)*crscabsi2(3,indexint) + … … 214 215 215 216 call interfast 216 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)217 do i=1,nlayer mx217 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 218 do i=1,nlayer 218 219 ind=auxind(i) 219 auxi=nlayer mx-i+1220 auxi=nlayer-i+1 220 221 !CO2 interpolated coefficient 221 jfotsout(indexint,1,auxi) = jfotsout(indexint,1,nlayer mx) *222 jfotsout(indexint,1,auxi) = jfotsout(indexint,1,nlayer) * 222 223 $ (wm(i)*auxjco2(ind+1) + wp(i)*auxjco2(ind)) 223 224 !O2 interpolated coefficient 224 jfotsout(indexint,2,auxi) = jfotsout(indexint,2,nlayer mx) *225 jfotsout(indexint,2,auxi) = jfotsout(indexint,2,nlayer) * 225 226 $ (wm(i)*auxjo2(ind+1) + wp(i)*auxjo2(ind)) 226 227 !O3p interpolated coefficient 227 jfotsout(indexint,3,auxi) = jfotsout(indexint,3,nlayer mx) *228 jfotsout(indexint,3,auxi) = jfotsout(indexint,3,nlayer) * 228 229 $ (wm(i)*auxjo3p(ind+1) + wp(i)*auxjo3p(ind)) 229 230 !H2 interpolated coefficient … … 234 235 !N interpolated coefficient 235 236 if(chemthermod.ge.2) then 236 do i=1,nlayer mx237 do i=1,nlayer 237 238 ind=auxind(i) 238 jfotsout(indexint,9,nlayer mx-i+1) =239 $ jfotsout(indexint,9,nlayer mx) *239 jfotsout(indexint,9,nlayer-i+1) = 240 $ jfotsout(indexint,9,nlayer) * 240 241 $ (wm(i)*auxjn(ind+1) + wp(i)*auxjn(ind)) 241 242 enddo … … 256 257 c Input atmospheric column 257 258 do indexint=2,15 258 do i=1,nlayer mx259 auxcolinp(nlayer mx-i+1) = co2colx(i)*crscabsi2(1,indexint)+259 do i=1,nlayer 260 auxcolinp(nlayer-i+1) = co2colx(i)*crscabsi2(1,indexint)+ 260 261 $ o2colx(i)*crscabsi2(2,indexint)+ 261 262 $ o3pcolx(i)*crscabsi2(3,indexint)+ … … 303 304 endif 304 305 305 call interfast(wm,wp,auxind,auxcolinp,nlayer mx,306 call interfast(wm,wp,auxind,auxcolinp,nlayer, 306 307 $ auxcoltab,nz2,limdown,limup) 307 do i=1,nlayer mx308 do i=1,nlayer 308 309 ind=auxind(i) 309 auxi = nlayer mx-i+1310 auxi = nlayer-i+1 310 311 !O2 interpolated coefficient 311 312 jfotsout(indexint,2,auxi) = 312 $ jfotsout(indexint,2,nlayer mx) *313 $ jfotsout(indexint,2,nlayer) * 313 314 $ (wm(i)*auxjo2(ind+1) + wp(i)*auxjo2(ind)) 314 315 !O3p interpolated coefficient 315 316 jfotsout(indexint,3,auxi) = 316 $ jfotsout(indexint,3,nlayer mx) *317 $ jfotsout(indexint,3,nlayer) * 317 318 $ (wm(i)*auxjo3p(ind+1) + wp(i)*auxjo3p(ind)) 318 319 !CO2 interpolated coefficient 319 320 jfotsout(indexint,1,auxi) = 320 $ jfotsout(indexint,1,nlayer mx) *321 $ jfotsout(indexint,1,nlayer) * 321 322 $ (wm(i)*auxjco2(ind+1) + wp(i)*auxjco2(ind)) 322 323 !H2 interpolated coefficient 323 324 jfotsout(indexint,5,auxi) = 324 $ jfotsout(indexint,5,nlayer mx) *325 $ jfotsout(indexint,5,nlayer) * 325 326 $ (wm(i)*auxjh2(ind+1) + wp(i)*auxjh2(ind)) 326 327 !N2 interpolated coefficient 327 328 jfotsout(indexint,8,auxi) = 328 $ jfotsout(indexint,8,nlayer mx) *329 $ jfotsout(indexint,8,nlayer) * 329 330 $ (wm(i)*auxjn2(ind+1) + wp(i)*auxjn2(ind)) 330 331 !CO interpolated coefficient 331 332 jfotsout(indexint,11,auxi) = 332 $ jfotsout(indexint,11,nlayer mx) *333 $ jfotsout(indexint,11,nlayer) * 333 334 $ (wm(i)*auxjco(ind+1) + wp(i)*auxjco(ind)) 334 335 !H interpolated coefficient 335 336 jfotsout(indexint,12,auxi) = 336 $ jfotsout(indexint,12,nlayer mx) *337 $ jfotsout(indexint,12,nlayer) * 337 338 $ (wm(i)*auxjh(ind+1) + wp(i)*auxjh(ind)) 338 339 enddo 339 340 !Only if chemthermod.ge.2 340 341 if(chemthermod.ge.2) then 341 do i=1,nlayer mx342 do i=1,nlayer 342 343 ind=auxind(i) 343 auxi = nlayer mx-i+1344 auxi = nlayer-i+1 344 345 !N interpolated coefficient 345 346 jfotsout(indexint,9,auxi) = 346 $ jfotsout(indexint,9,nlayer mx) *347 $ jfotsout(indexint,9,nlayer) * 347 348 $ (wm(i)*auxjn(ind+1) + wp(i)*auxjn(ind)) 348 349 !NO interpolated coefficient 349 350 jfotsout(indexint,10,auxi)= 350 $ jfotsout(indexint,10,nlayer mx) *351 $ jfotsout(indexint,10,nlayer) * 351 352 $ (wm(i)*auxjno(ind+1) + wp(i)*auxjno(ind)) 352 353 !NO2 interpolated coefficient 353 354 jfotsout(indexint,13,auxi)= 354 $ jfotsout(indexint,13,nlayer mx) *355 $ jfotsout(indexint,13,nlayer) * 355 356 $ (wm(i)*auxjno2(ind+1) + wp(i)*auxjno2(ind)) 356 357 enddo … … 371 372 c Input atmospheric column 372 373 indexint=16 373 do i=1,nlayer mx374 auxcolinp(nlayer mx-i+1) = co2colx(i)*crscabsi2(1,indexint)+374 do i=1,nlayer 375 auxcolinp(nlayer-i+1) = co2colx(i)*crscabsi2(1,indexint)+ 375 376 $ o2colx(i)*crscabsi2(2,indexint)+ 376 377 $ o3pcolx(i)*crscabsi2(3,indexint)+ … … 418 419 419 420 call interfast 420 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)421 do i=1,nlayer mx421 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 422 do i=1,nlayer 422 423 ind=auxind(i) 423 auxi = nlayer mx-i+1424 auxi = nlayer-i+1 424 425 !O2 interpolated coefficient 425 jfotsout(indexint,2,auxi) = jfotsout(indexint,2,nlayer mx) *426 jfotsout(indexint,2,auxi) = jfotsout(indexint,2,nlayer) * 426 427 $ (wm(i)*auxjo2(ind+1) + wp(i)*auxjo2(ind)) 427 428 !CO2 interpolated coefficient 428 jfotsout(indexint,1,auxi) = jfotsout(indexint,1,nlayer mx) *429 jfotsout(indexint,1,auxi) = jfotsout(indexint,1,nlayer) * 429 430 $ (wm(i)*auxjco2(ind+1) + wp(i)*auxjco2(ind)) 430 431 !O3p interpolated coefficient 431 jfotsout(indexint,3,auxi) = jfotsout(indexint,3,nlayer mx) *432 jfotsout(indexint,3,auxi) = jfotsout(indexint,3,nlayer) * 432 433 $ (wm(i)*auxjo3p(ind+1) + wp(i)*auxjo3p(ind)) 433 434 !N2 interpolated coefficient 434 jfotsout(indexint,8,auxi) = jfotsout(indexint,8,nlayer mx) *435 jfotsout(indexint,8,auxi) = jfotsout(indexint,8,nlayer) * 435 436 $ (wm(i)*auxjn2(ind+1) + wp(i)*auxjn2(ind)) 436 437 !CO interpolated coefficient 437 438 jfotsout(indexint,11,auxi) = 438 $ jfotsout(indexint,11,nlayer mx) *439 $ jfotsout(indexint,11,nlayer) * 439 440 $ (wm(i)*auxjco(ind+1) + wp(i)*auxjco(ind)) 440 441 !H interpolated coefficient 441 442 jfotsout(indexint,12,auxi) = 442 $ jfotsout(indexint,12,nlayer mx) *443 $ jfotsout(indexint,12,nlayer) * 443 444 $ (wm(i)*auxjh(ind+1) + wp(i)*auxjh(ind)) 444 445 enddo 445 446 !Only if chemthermod.ge.2 446 447 if(chemthermod.ge.2) then 447 do i=1,nlayer mx448 do i=1,nlayer 448 449 ind=auxind(i) 449 auxi = nlayer mx-i+1450 auxi = nlayer-i+1 450 451 !N interpolated coefficient 451 452 jfotsout(indexint,9,auxi) = 452 $ jfotsout(indexint,9,nlayer mx) *453 $ jfotsout(indexint,9,nlayer) * 453 454 $ (wm(i)*auxjn(ind+1) + wp(i)*auxjn(ind)) 454 455 !NO interpolated coefficient 455 456 jfotsout(indexint,10,auxi) = 456 $ jfotsout(indexint,10,nlayer mx) *457 $ jfotsout(indexint,10,nlayer) * 457 458 $ (wm(i)*auxjno(ind+1) + wp(i)*auxjno(ind)) 458 459 !NO2 interpolated coefficient 459 460 jfotsout(indexint,13,auxi) = 460 $ jfotsout(indexint,13,nlayer mx) *461 $ jfotsout(indexint,13,nlayer) * 461 462 $ (wm(i)*auxjno2(ind+1) + wp(i)*auxjno2(ind)) 462 463 enddo … … 474 475 c Input column 475 476 476 do i=1,nlayer mx477 auxcolinp(nlayer mx-i+1) = co2colx(i) + o2colx(i) + n2colx(i) +477 do i=1,nlayer 478 auxcolinp(nlayer-i+1) = co2colx(i) + o2colx(i) + n2colx(i) + 478 479 $ nocolx(i) + cocolx(i) + no2colx(i) 479 480 end do … … 508 509 509 510 call interfast 510 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)511 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 511 512 !Correction to include T variation of CO2 cross section 512 513 if(indexint.eq.24) then 513 do i=1,nlayer mx514 auxi = nlayer mx-i+1514 do i=1,nlayer 515 auxi = nlayer-i+1 515 516 if(sigma(indexint,auxi)* 516 517 $ alfa(indexint,auxi)*coltemp(auxi) … … 523 524 enddo 524 525 else 525 do i=1,nlayer mx526 do i=1,nlayer 526 527 cortemp(i)=1. 527 528 enddo 528 529 end if 529 do i=1,nlayer mx530 do i=1,nlayer 530 531 ind=auxind(i) 531 auxi = nlayer mx-i+1532 auxi = nlayer-i+1 532 533 !O2 interpolated coefficient 533 534 jfotsout(indexint,2,auxi) = 534 $ jfotsout(indexint,2,nlayer mx) *535 $ jfotsout(indexint,2,nlayer) * 535 536 $ (wm(i)*auxjo2(ind+1) + wp(i)*auxjo2(ind)) * 536 537 $ cortemp(i) 537 538 !CO2 interpolated coefficient 538 539 jfotsout(indexint,1,auxi) = 539 $ jfotsout(indexint,1,nlayer mx) *540 $ jfotsout(indexint,1,nlayer) * 540 541 $ (wm(i)*auxjco2(ind+1) + wp(i)*auxjco2(ind)) 541 542 $ * cortemp(i) … … 546 547 !N2 interpolated coefficient 547 548 jfotsout(indexint,8,auxi) = 548 $ jfotsout(indexint,8,nlayer mx) *549 $ jfotsout(indexint,8,nlayer) * 549 550 $ (wm(i)*auxjn2(ind+1) + wp(i)*auxjn2(ind)) * 550 551 $ cortemp(i) 551 552 !CO interpolated coefficient 552 553 jfotsout(indexint,11,auxi) = 553 $ jfotsout(indexint,11,nlayer mx) *554 $ jfotsout(indexint,11,nlayer) * 554 555 $ (wm(i)*auxjco(ind+1) + wp(i)*auxjco(ind)) * 555 556 $ cortemp(i) … … 557 558 !Only if chemthermod.ge.2 558 559 if(chemthermod.ge.2) then 559 do i=1,nlayer mx560 do i=1,nlayer 560 561 ind=auxind(i) 561 auxi = nlayer mx-i+1562 auxi = nlayer-i+1 562 563 !NO interpolated coefficient 563 564 jfotsout(indexint,10,auxi)= 564 $ jfotsout(indexint,10,nlayer mx) *565 $ jfotsout(indexint,10,nlayer) * 565 566 $ (wm(i)*auxjno(ind+1) + wp(i)*auxjno(ind)) * 566 567 $ cortemp(i) 567 568 !NO2 interpolated coefficient 568 569 jfotsout(indexint,13,auxi)= 569 $ jfotsout(indexint,13,nlayer mx) *570 $ jfotsout(indexint,13,nlayer) * 570 571 $ (wm(i)*auxjno2(ind+1)+ wp(i)*auxjno2(ind)) * 571 572 $ cortemp(i) … … 586 587 c Input atmospheric column 587 588 588 do i=1,nlayer mx589 auxcolinp(nlayer mx-i+1) = co2colx(i) + o2colx(i) + h2ocolx(i) +589 do i=1,nlayer 590 auxcolinp(nlayer-i+1) = co2colx(i) + o2colx(i) + h2ocolx(i) + 590 591 $ h2o2colx(i) + nocolx(i) + cocolx(i) + no2colx(i) 591 592 end do … … 621 622 endif 622 623 call interfast 623 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)624 do i=1,nlayer mx624 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 625 do i=1,nlayer 625 626 ind=auxind(i) 626 auxi = nlayer mx-i+1627 auxi = nlayer-i+1 627 628 !Correction to include T variation of CO2 cross section 628 629 if(sigma(indexint,auxi)*alfa(indexint,auxi)* … … 635 636 !CO2 interpolated coefficient 636 637 jfotsout(indexint,1,auxi) = 637 $ jfotsout(indexint,1,nlayer mx) *638 $ jfotsout(indexint,1,nlayer) * 638 639 $ (wm(i)*auxjco2(ind+1) + wp(i)*auxjco2(ind)) * 639 640 $ cortemp(i) * … … 642 643 !O2 interpolated coefficient 643 644 jfotsout(indexint,2,auxi) = 644 $ jfotsout(indexint,2,nlayer mx) *645 $ jfotsout(indexint,2,nlayer) * 645 646 $ (wm(i)*auxjo2(ind+1) + wp(i)*auxjo2(ind)) * 646 647 $ cortemp(i) 647 648 !H2O interpolated coefficient 648 649 jfotsout(indexint,4,auxi) = 649 $ jfotsout(indexint,4,nlayer mx) *650 $ jfotsout(indexint,4,nlayer) * 650 651 $ (wm(i)*auxjh2o(ind+1) + wp(i)*auxjh2o(ind)) * 651 652 $ cortemp(i) 652 653 !H2O2 interpolated coefficient 653 654 jfotsout(indexint,6,auxi) = 654 $ jfotsout(indexint,6,nlayer mx) *655 $ jfotsout(indexint,6,nlayer) * 655 656 $ (wm(i)*auxjh2o2(ind+1) + wp(i)*auxjh2o2(ind)) * 656 657 $ cortemp(i) 657 658 !CO interpolated coefficient 658 659 jfotsout(indexint,11,auxi) = 659 $ jfotsout(indexint,11,nlayer mx) *660 $ jfotsout(indexint,11,nlayer) * 660 661 $ (wm(i)*auxjco(ind+1) + wp(i)*auxjco(ind)) * 661 662 $ cortemp(i) … … 663 664 !Only if chemthermod.ge.2 664 665 if(chemthermod.ge.2) then 665 do i=1,nlayer mx666 do i=1,nlayer 666 667 ind=auxind(i) 667 auxi = nlayer mx-i+1668 auxi = nlayer-i+1 668 669 !NO interpolated coefficient 669 670 jfotsout(indexint,10,auxi)= 670 $ jfotsout(indexint,10,nlayer mx) *671 $ jfotsout(indexint,10,nlayer) * 671 672 $ (wm(i)*auxjno(ind+1) + wp(i)*auxjno(ind)) * 672 673 $ cortemp(i) 673 674 !NO2 interpolated coefficient 674 675 jfotsout(indexint,13,auxi)= 675 $ jfotsout(indexint,13,nlayer mx) *676 $ jfotsout(indexint,13,nlayer) * 676 677 $ (wm(i)*auxjno2(ind+1) + wp(i)*auxjno2(ind)) * 677 678 $ cortemp(i) … … 694 695 c Input atmospheric column 695 696 696 do i=1,nlayer mx697 auxcolinp(nlayer mx-i+1) = co2colx(i) + o2colx(i) + h2ocolx(i) +697 do i=1,nlayer 698 auxcolinp(nlayer-i+1) = co2colx(i) + o2colx(i) + h2ocolx(i) + 698 699 $ h2o2colx(i) + nocolx(i) + no2colx(i) 699 700 end do … … 728 729 729 730 call interfast 730 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)731 do i=1,nlayer mx731 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 732 do i=1,nlayer 732 733 ind=auxind(i) 733 auxi = nlayer mx-i+1734 auxi = nlayer-i+1 734 735 !Correction to include T variation of CO2 cross section 735 736 if(sigma(indexint,auxi)*alfa(indexint,auxi)* … … 742 743 !CO2 interpolated coefficient 743 744 jfotsout(indexint,1,auxi) = 744 $ jfotsout(indexint,1,nlayer mx) *745 $ jfotsout(indexint,1,nlayer) * 745 746 $ (wm(i)*auxjco2(ind+1) + wp(i)*auxjco2(ind)) * 746 747 $ cortemp(i) * … … 749 750 !O2 interpolated coefficient 750 751 jfotsout(indexint,2,auxi) = 751 $ jfotsout(indexint,2,nlayer mx) *752 $ jfotsout(indexint,2,nlayer) * 752 753 $ (wm(i)*auxjo2(ind+1) + wp(i)*auxjo2(ind)) * 753 754 $ cortemp(i) 754 755 !H2O interpolated coefficient 755 756 jfotsout(indexint,4,auxi) = 756 $ jfotsout(indexint,4,nlayer mx) *757 $ jfotsout(indexint,4,nlayer) * 757 758 $ (wm(i)*auxjh2o(ind+1) + wp(i)*auxjh2o(ind)) * 758 759 $ cortemp(i) 759 760 !H2O2 interpolated coefficient 760 761 jfotsout(indexint,6,auxi) = 761 $ jfotsout(indexint,6,nlayer mx) *762 $ jfotsout(indexint,6,nlayer) * 762 763 $ (wm(i)*auxjh2o2(ind+1) + wp(i)*auxjh2o2(ind)) * 763 764 $ cortemp(i) … … 765 766 !Only if chemthermod.ge.2 766 767 if(chemthermod.ge.2) then 767 do i=1,nlayer mx768 do i=1,nlayer 768 769 ind=auxind(i) 769 auxi = nlayer mx-i+1770 auxi = nlayer-i+1 770 771 !NO interpolated coefficient 771 772 jfotsout(indexint,10,auxi)= 772 $ jfotsout(indexint,10,nlayer mx) *773 $ jfotsout(indexint,10,nlayer) * 773 774 $ (wm(i)*auxjno(ind+1) +wp(i)*auxjno(ind)) * 774 775 $ cortemp(i) … … 796 797 797 798 indexint=32 798 do i=1,nlayer mx799 auxcolinp(nlayer mx-i+1) =co2colx(i) + o2colx(i) + h2o2colx(i) +799 do i=1,nlayer 800 auxcolinp(nlayer-i+1) =co2colx(i) + o2colx(i) + h2o2colx(i) + 800 801 $ nocolx(i) + no2colx(i) 801 802 end do … … 825 826 endif 826 827 call interfast 827 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)828 do i=1,nlayer mx828 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 829 do i=1,nlayer 829 830 ind=auxind(i) 830 auxi = nlayer mx-i+1831 auxi = nlayer-i+1 831 832 !Correction to include T variation of CO2 cross section 832 if(sigma(indexint,nlayer mx-i+1)*alfa(indexint,auxi)*833 if(sigma(indexint,nlayer-i+1)*alfa(indexint,auxi)* 833 834 $ coltemp(auxi).lt.60.) then 834 835 cortemp(i)=exp(-sigma(indexint,auxi)* … … 839 840 !CO2 interpolated coefficient 840 841 jfotsout(indexint,1,auxi) = 841 $ jfotsout(indexint,1,nlayer mx) *842 $ jfotsout(indexint,1,nlayer) * 842 843 $ (wm(i)*auxjco2(ind+1)+wp(i)*auxjco2(ind)) * 843 844 $ cortemp(i) * … … 846 847 !O2 interpolated coefficient 847 848 jfotsout(indexint,2,auxi) = 848 $ jfotsout(indexint,2,nlayer mx) *849 $ jfotsout(indexint,2,nlayer) * 849 850 $ (wm(i)*auxjo2(ind+1) + wp(i)*auxjo2(ind)) * 850 851 $ cortemp(i) 851 852 !H2O2 interpolated coefficient 852 853 jfotsout(indexint,6,auxi) = 853 $ jfotsout(indexint,6,nlayer mx) *854 $ jfotsout(indexint,6,nlayer) * 854 855 $ (wm(i)*auxjh2o2(ind+1) + wp(i)*auxjh2o2(ind)) * 855 856 $ cortemp(i) … … 857 858 !Only if chemthermod.ge.2 858 859 if(chemthermod.ge.2) then 859 do i=1,nlayer mx860 auxi = nlayer mx-i+1860 do i=1,nlayer 861 auxi = nlayer-i+1 861 862 ind=auxind(i) 862 863 !NO interpolated coefficient 863 864 jfotsout(indexint,10,auxi) = 864 $ jfotsout(indexint,10,nlayer mx) *865 $ jfotsout(indexint,10,nlayer) * 865 866 $ (wm(i)*auxjno(ind+1) + wp(i)*auxjno(ind)) * 866 867 $ cortemp(i) 867 868 !NO2 interpolated coefficient 868 869 jfotsout(indexint,13,auxi) = 869 $ jfotsout(indexint,13,nlayer mx) *870 $ jfotsout(indexint,13,nlayer) * 870 871 $ (wm(i)*auxjno2(ind+1) + wp(i)*auxjno2(ind)) * 871 872 $ cortemp(i) … … 886 887 887 888 indexint=33 888 do i=1,nlayer mx889 auxcolinp(nlayer mx-i+1) = o2colx(i) + h2o2colx(i) + no2colx(i)889 do i=1,nlayer 890 auxcolinp(nlayer-i+1) = o2colx(i) + h2o2colx(i) + no2colx(i) 890 891 end do 891 892 … … 909 910 endif 910 911 call interfast 911 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)912 do i=1,nlayer mx912 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 913 do i=1,nlayer 913 914 ind=auxind(i) 914 auxi = nlayer mx-i+1915 auxi = nlayer-i+1 915 916 !O2 interpolated coefficient 916 jfotsout(indexint,2,auxi) = jfotsout(indexint,2,nlayer mx) *917 jfotsout(indexint,2,auxi) = jfotsout(indexint,2,nlayer) * 917 918 $ (wm(i)*auxjo2(ind+1) + wp(i)*auxjo2(ind)) 918 919 !H2O2 interpolated coefficient 919 jfotsout(indexint,6,auxi) = jfotsout(indexint,6,nlayer mx) *920 jfotsout(indexint,6,auxi) = jfotsout(indexint,6,nlayer) * 920 921 $ (wm(i)*auxjh2o2(ind+1) + wp(i)*auxjh2o2(ind)) 921 922 enddo 922 923 !Only if chemthermod.ge.2 923 924 if(chemthermod.ge.2) then 924 do i=1,nlayer mx925 do i=1,nlayer 925 926 ind=auxind(i) 926 927 !NO2 interpolated coefficient 927 jfotsout(indexint,13,nlayer mx-i+1) =928 $ jfotsout(indexint,13,nlayer mx) *928 jfotsout(indexint,13,nlayer-i+1) = 929 $ jfotsout(indexint,13,nlayer) * 929 930 $ (wm(i)*auxjno2(ind+1) + wp(i)*auxjno2(ind)) 930 931 enddo … … 944 945 945 946 indexint=34 946 do i=1,nlayer mx947 auxcolinp(nlayer mx-i+1) = h2o2colx(i) + o2colx(i) + o3colx(i) +947 do i=1,nlayer 948 auxcolinp(nlayer-i+1) = h2o2colx(i) + o2colx(i) + o3colx(i) + 948 949 $ no2colx(i) 949 950 end do … … 970 971 endif 971 972 call interfast 972 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)973 do i=1,nlayer mx973 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 974 do i=1,nlayer 974 975 ind=auxind(i) 975 auxi = nlayer mx-i+1976 auxi = nlayer-i+1 976 977 !O2 interpolated coefficient 977 jfotsout(indexint,2,auxi) = jfotsout(indexint,2,nlayer mx) *978 jfotsout(indexint,2,auxi) = jfotsout(indexint,2,nlayer) * 978 979 $ (wm(i)*auxjo2(ind+1) + wp(i)*auxjo2(ind)) 979 980 !H2O2 interpolated coefficient 980 jfotsout(indexint,6,auxi) = jfotsout(indexint,6,nlayer mx) *981 jfotsout(indexint,6,auxi) = jfotsout(indexint,6,nlayer) * 981 982 $ (wm(i)*auxjh2o2(ind+1) + wp(i)*auxjh2o2(ind)) 982 983 !O3 interpolated coefficient 983 jfotsout(indexint,7,auxi) = jfotsout(indexint,7,nlayer mx) *984 jfotsout(indexint,7,auxi) = jfotsout(indexint,7,nlayer) * 984 985 $ (wm(i)*auxjo3(ind+1) + wp(i)*auxjo3(ind)) 985 986 enddo 986 987 !Only if chemthermod.ge.2 987 988 if(chemthermod.ge.2) then 988 do i=1,nlayer mx989 do i=1,nlayer 989 990 ind=auxind(i) 990 991 !NO2 interpolated coefficient 991 jfotsout(indexint,13,nlayer mx-i+1) =992 $ jfotsout(indexint,13,nlayer mx) *992 jfotsout(indexint,13,nlayer-i+1) = 993 $ jfotsout(indexint,13,nlayer) * 993 994 $ (wm(i)*auxjno2(ind+1) + wp(i)*auxjno2(ind)) 994 995 enddo … … 1008 1009 1009 1010 indexint=35 1010 do i=1,nlayer mx1011 auxcolinp(nlayer mx-i+1) = h2o2colx(i) + o3colx(i) + no2colx(i)1011 do i=1,nlayer 1012 auxcolinp(nlayer-i+1) = h2o2colx(i) + o3colx(i) + no2colx(i) 1012 1013 end do 1013 1014 … … 1031 1032 endif 1032 1033 call interfast 1033 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)1034 do i=1,nlayer mx1034 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 1035 do i=1,nlayer 1035 1036 ind=auxind(i) 1036 auxi = nlayer mx-i+11037 auxi = nlayer-i+1 1037 1038 !H2O2 interpolated coefficient 1038 jfotsout(indexint,6,auxi) = jfotsout(indexint,6,nlayer mx) *1039 jfotsout(indexint,6,auxi) = jfotsout(indexint,6,nlayer) * 1039 1040 $ (wm(i)*auxjh2o2(ind+1) + wp(i)*auxjh2o2(ind)) 1040 1041 !O3 interpolated coefficient 1041 jfotsout(indexint,7,auxi) = jfotsout(indexint,7,nlayer mx) *1042 jfotsout(indexint,7,auxi) = jfotsout(indexint,7,nlayer) * 1042 1043 $ (wm(i)*auxjo3(ind+1) + wp(i)*auxjo3(ind)) 1043 1044 enddo 1044 1045 if(chemthermod.ge.2) then 1045 do i=1,nlayer mx1046 do i=1,nlayer 1046 1047 ind=auxind(i) 1047 1048 !NO2 interpolated coefficient 1048 jfotsout(indexint,13,nlayer mx-i+1) =1049 $ jfotsout(indexint,13,nlayer mx) *1049 jfotsout(indexint,13,nlayer-i+1) = 1050 $ jfotsout(indexint,13,nlayer) * 1050 1051 $ (wm(i)*auxjno2(ind+1) + wp(i)*auxjno2(ind)) 1051 1052 enddo … … 1064 1065 1065 1066 indexint=36 1066 do i=1,nlayer mx1067 auxcolinp(nlayer mx-i+1) = o3colx(i) + no2colx(i)1067 do i=1,nlayer 1068 auxcolinp(nlayer-i+1) = o3colx(i) + no2colx(i) 1068 1069 end do 1069 1070 … … 1085 1086 endif 1086 1087 call interfast 1087 $ (wm,wp,auxind,auxcolinp,nlayer mx,auxcoltab,nz2,limdown,limup)1088 do i=1,nlayer mx1088 $ (wm,wp,auxind,auxcolinp,nlayer,auxcoltab,nz2,limdown,limup) 1089 do i=1,nlayer 1089 1090 ind=auxind(i) 1090 1091 !O3 interpolated coefficient 1091 jfotsout(indexint,7,nlayer mx-i+1) =1092 $ jfotsout(indexint,7,nlayer mx) *1092 jfotsout(indexint,7,nlayer-i+1) = 1093 $ jfotsout(indexint,7,nlayer) * 1093 1094 $ (wm(i)*auxjo3(ind+1) + wp(i)*auxjo3(ind)) 1094 1095 enddo 1095 1096 !Only if chemthermod.ge.2 1096 1097 if(chemthermod.ge.2) then 1097 do i=1,nlayer mx1098 do i=1,nlayer 1098 1099 ind=auxind(i) 1099 1100 !NO2 interpolated coefficient 1100 jfotsout(indexint,13,nlayer mx-i+1) =1101 $ jfotsout(indexint,13,nlayer mx) *1101 jfotsout(indexint,13,nlayer-i+1) = 1102 $ jfotsout(indexint,13,nlayer) * 1102 1103 $ (wm(i)*auxjno2(ind+1) + wp(i)*auxjno2(ind)) 1103 1104 enddo -
trunk/LMDZ.MARS/libf/aeronomars/moldiff.F
r1226 r1266 10 10 USE comcstfi_h 11 11 implicit none 12 13 !#include "dimensions.h"14 !#include "dimphys.h"15 !#include "callkeys.h"16 !#include "comdiurn.h"17 !#include "chimiedata.h"18 !#include "tracer.h"19 !#include "conc.h"20 21 12 22 13 c -
trunk/LMDZ.MARS/libf/aeronomars/moldiff_red.F90
r1226 r1266 7 7 implicit none 8 8 9 !#include "dimensions.h"10 !#include "dimphys.h"11 !#include "callkeys.h"12 !#include "comdiurn.h"13 !#include "chimiedata.h"14 !#include "tracer.h"15 !#include "conc.h"16 9 #include "diffusion.h" 17 18 10 19 11 ! -
trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff.F
r1047 r1266 16 16 c 17 17 c======================================================================= 18 #include "dimensions.h"19 #include "dimphys.h"20 18 #include "callkeys.h" 21 !#include "comdiurn.h"22 19 #include "chimiedata.h" 23 !#include "tracer.h"24 !#include "conc.h"25 20 26 21 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff_red.F
r1047 r1266 12 12 c 13 13 c======================================================================= 14 #include "dimensions.h"15 #include "dimphys.h"16 14 #include "callkeys.h" 17 !#include "comdiurn.h"18 15 #include "chimiedata.h" 19 !#include "tracer.h"20 !#include "conc.h"21 16 #include "diffusion.h" 22 17 -
trunk/LMDZ.MARS/libf/aeronomars/molvis.F
r1226 r1266 19 19 c declarations: 20 20 c----------------------------------------------------------------------- 21 22 !#include "dimensions.h"23 !#include "dimphys.h"24 !#include "surfdat.h"25 !#include "chimiedata.h"26 !#include "conc.h"27 21 28 22 c arguments: -
trunk/LMDZ.MARS/libf/aeronomars/param_read.F
r705 r1266 1 1 subroutine param_read 2 2 3 use param_v4_h, only: jfotsout,crscabsi2, 4 . c1_16,c17_24,c25_29,c30_31,c32,c33,c34,c35,c36, 5 . co2crsc195,co2crsc295,t0, 6 . jabsifotsintpar,ninter,nz2, 7 . efdisco2,efdiso2,efdish2o, 8 . efdish2o2,efdish2,efdiso3, 9 . efdiso,efdisn,efdish, 10 . efdisno,efdisn2,efdisno2, 11 . efdisco,efionco2,efionn2, 12 . efionco,efiono3p,efionn, 13 . efionno,efionh, 14 . fluxtop,ct1,ct2,p1,p2 15 3 16 implicit none 4 17 5 18 6 19 c common variables and constants 7 include "dimensions.h"8 include "dimphys.h"9 include 'param.h'10 include 'param_v4.h'11 20 include 'datafile.h' 12 21 … … 20 29 21 30 c*************************+PROGRAM STARTS************************** 22 23 24 c data for the UV heating tabulation25 26 data (crscabsi2(1,j),j=1,16) /5.61031E-19,1.59677E-18,4.7072E-18,27 $ 1.48254e-17,2.07445e-17,2.573e-17,2.901e-17,3.083e-17,28 $ 3.217e-17,3.539e-17,3.658e-17,3.63e-17,3.41239e-17,29 $ 2.71019e-17,4.93677e-17,1.64e-17/30 31 data (crscabsi2(2,j),j=1,16) /0.27250E-18,0.11650E-17,0.39250E-17,32 $ 0.10630E-16,0.15590E-16,0.17180E-16,0.19270E-16,0.22860E-16,33 $ 0.24270E-16,0.24440E-16,0.25020E-16,0.26600E-16,0.25400E-16,34 $ 0.35800E-16,0.25590E-16,0.16740E-16/35 36 data (crscabsi2(3,j),j=1,16) /0.2776E-18,0.9792E-18,0.3313E-17,37 $ 0.6621E-17,0.8481E-17,0.9146E-17,0.9414E-17,0.1039E-16,38 $ 0.1012E-16,0.1033E-16,0.1033E-16,0.1033E-16,0.8268E-17,39 $ 0.6563E-17,0.3506E-17,0.3470E-17/40 41 data (crscabsi2(5,j),j=1,16) /.5E-20,.1077607E-19,.5670491E-19,42 $ .3322716E-18,.1054509E-17,.1700005E-17,.3171188E-17,43 $ .4734241E-17,.5108741E-17,.6022236E-17,.6741537E-17,44 $ .7277079E-17,.9070787E-17,.9708916E-17,.4026281E-17,0.0/45 46 data (crscabsi2(8,j),j=1,16) /0.0, 7.44175e-19, 2.23167e-18,47 $ 8.46200e-18,1.18275e-17,1.54900e-17,2.32475e-17,2.41373e-17,48 $ 2.55482e-17,2.38431e-17,2.28600e-17,2.35067e-17,2.56000e-17,49 $ 2.64636e-17,2.86260e-17,3.26561e-17/50 51 data(crscabsi2(9,j),j=1,16) /3.48182e-20,3.37038e-19,1.03077e-18,52 $ 4.01364e-18,6.45e-18,7.8e-18,1.0e-17,1.13500e-17,1.15500e-17,53 $ 1.18000e-17,1.17500e-17,1.16000e-17,1.28667e-17,1.18500e-17,54 $ 1.11000e-17,9.50000e-18/55 56 data(crscabsi2(10,j),j=1,16) /0.0,9.39833e-19,2.87714e-18,57 $ 9.66900e-18,1.37063e-17,1.61820e-17,2.30450e-17,2.63373e-17,58 $ 2.63773e-17,2.67677e-17,2.64100e-17,2.53000e-17,2.18100e-17,59 $ 2.04941e-17,2.28160e-17,2.93550e-17/60 61 data(crscabsi2(11,j),j=1,16) /0.0,9.58555e-19,2.52767e-18,62 $ 8.29700e-18,1.21850e-17,1.40500e-17,1.97025e-17,2.12018e-17,63 $ 2.14673e-17,2.20331e-17,2.21500e-17,2.21600e-17,2.33200e-17,64 $ 2.67800e-17,2.56400e-17,3.58561e-17/65 66 data(crscabsi2(12,j),j=1,16) /0.0,1.0e-20,2.5e-20,1.30400e-19,67 $ 2.93800e-19,4.36000e-19,8.49400e-19,1.29400e-18,1.40500e-18,68 $ 1.67600e-18,1.93400e-18,2.12200e-18,2.75800e-18,3.48400e-18,69 $ 4.17200e-18,5.26000e-18/70 71 data(crscabsi2(13,j),j=1,16) /0.0,1.60e-18,4.99111e-18,1.48496e-1772 $ ,2.17395e-17,2.55857e-17,2.87754e-17,3.65571e-17,3.85691e-17,73 $ 4.16286e-17,4.15117e-17,4.05901e-17,3.64000e-17,2.99670e-17,74 $ 2.46796e-17,2.51789e-17/75 76 data freccen /3.4,7.5,14.5,23.0,30.3,34.1,49.6,50.5,52.5,56.0,77 $59.0,61.5,68.7,73.1,78.4,83.1,92.4,97.5,99.3,100.1,100.7,102.1,78 $104.5,116.8,121.3,127.0,130.6,153.7,162.8,171.479 $,195.6,206.3,222.0,236.0,289.0,600./80 81 data co2crsc195/2.05864e-17,5.90557e-20,3.1027e-19,6.70653e-19,82 $4.55132e-19,8.87122e-20,1.32138e-20,7.22244e-23,2.88002e-26/83 84 data co2crsc295/2.05897e-17,6.71104e-20,3.45509e-19,7.45711e-19,85 $4.82752e-19,1.11594e-19,1.98308e-20,1.3853e-22,2.1414e-25/86 31 87 32 c Reads tabulated functions -
trunk/LMDZ.MARS/libf/aeronomars/param_read_e107.F
r705 r1266 1 1 subroutine param_read_e107 2 2 3 use param_v4_h, only: jfotsout,crscabsi2, 4 . c1_16,c17_24,c25_29,c30_31,c32,c33,c34,c35,c36, 5 . co2crsc195,co2crsc295,t0, 6 . jabsifotsintpar,ninter,nz2, 7 . nabs,e107,date_e107,e107_tab, 8 . coefit0,coefit1,coefit2,coefit3,coefit4, 9 . efdisco2,efdiso2,efdish2o, 10 . efdish2o2,efdish2,efdiso3, 11 . efdiso,efdisn,efdish, 12 . efdisno,efdisn2,efdisno2, 13 . efdisco,efionco2,efionn2, 14 . efionco,efiono3p,efionn, 15 . efionno,efionh, 16 . fluxtop,ct1,ct2,p1,p2 17 3 18 implicit none 4 19 5 20 6 21 c common variables and constants 7 include "dimensions.h"8 include "dimphys.h"9 include 'param.h'10 include 'param_v4.h'11 22 include 'datafile.h' 12 23 include "callkeys.h" -
trunk/LMDZ.MARS/libf/aeronomars/paramfoto_compact.F
r1265 r1266 2 2 3 3 subroutine paramfoto_compact 4 $(ig, chemthermod,lswitch,tx,timestep,zenit,zx,rm,nesptherm)4 $(ig,nlayer,chemthermod,lswitch,tx,timestep,zenit,zx,rm,nesptherm) 5 5 6 6 c may 2008 FGG+MALV,GG 7 7 c********************************************************************** 8 8 9 use iono_h 10 use param_v4_h 9 11 implicit none 10 include "dimensions.h"11 include "dimphys.h"12 include 'param.h'13 include 'param_v4.h'14 include 'iono.h'15 12 16 13 c arguments 17 14 18 integer lswitch,ig,nesptherm,chemthermod 19 real zdens(nlayer mx)20 real tx(nlayer mx)15 integer lswitch,ig,nesptherm,chemthermod,nlayer 16 real zdens(nlayer) 17 real tx(nlayer) 21 18 real zenit 22 real zx(nlayer mx)23 real rm(nlayer mx,nesptherm)19 real zx(nlayer) 20 real rm(nlayer,nesptherm) 24 21 real timestep 25 22 … … 67 64 real*8 delectx,dnplusx 68 65 69 real*8 jdistot8(nabs,nlayer mx)70 real*8 jdistot8_b(nabs,nlayer mx)71 real*8 jion8(nabs,nlayer mx,4)66 real*8 jdistot8(nabs,nlayer) 67 real*8 jdistot8_b(nabs,nlayer) 68 real*8 jion8(nabs,nlayer,4) 72 69 real*8 tx8 73 70 … … 76 73 real*8 alfa_laststep, IonMostAbundant 77 74 78 real*8 tmin(nlayer mx)75 real*8 tmin(nlayer) 79 76 real*8 fmargin1,critere 80 77 81 integer compmin(nlayer mx)78 integer compmin(nlayer) 82 79 integer i,j,k 83 80 integer numpasos 84 integer n_comp_en_EQ(nlayer mx), paso81 integer n_comp_en_EQ(nlayer), paso 85 82 86 83 ! Tracer indexes in the thermospheric chemistry: … … 124 121 timefrac_sec=dble(timestep) 125 122 126 do i=nlayer mx,lswitch,-1123 do i=nlayer,lswitch,-1 127 124 c Concentrations to real*8 128 125 … … 179 176 !from photoabsorption rates and ionization-to-dissociation 180 177 !branching ratios 181 call phdisrate(ig, chemthermod,zenit,i)178 call phdisrate(ig,nlayer,chemthermod,zenit,i) 182 179 ! Conversion to double precision 183 180 do j=1,nabs … … 194 191 195 192 !Lifetimes and temporal integration 196 call lifetimes(ig,i, chemthermod,zenit,zx,193 call lifetimes(ig,i,nlayer,chemthermod,zenit,zx, 197 194 $ jdistot8,jdistot8_b,jion8, 198 195 $ tmin(i),compmin(i), … … 220 217 endif !Of chemthermod.eq.3 221 218 222 call timemarching ( ig,i,chemthermod,n_comp_en_EQ,compmin, 223 $ tmin,timefrac_sec, deltat,fmargin1) 224 219 call timemarching ( ig,i,nlayer,chemthermod,n_comp_en_EQ, 220 . compmin,tmin,timefrac_sec, deltat,fmargin1) 225 221 226 222 !Number of timesteps … … 300 296 end if 301 297 !Calculation of productions and losses 302 call prodsandlosses ( ig, i ,chemthermod,zenit, zx,298 call prodsandlosses (ig,i,nlayer,chemthermod,zenit, zx, 303 299 & jdistot8, jdistot8_b, jion8, 304 300 & co2xinput, o2xinput, o3pxinput, … … 430 426 !Third, those species (among the 16 that can be in PE) that are in PE 431 427 call EF_oscilacion 432 & ( ig,i, paso,chemthermod,zenit, zx,428 & ( ig,i,nlayer, paso,chemthermod,zenit, zx, 433 429 & jdistot8, jdistot8_b,jion8, 434 430 & deltat, … … 1181 1177 c********************************************************************** 1182 1178 1183 subroutine phdisrate(ig, chemthermod,zenit,i)1179 subroutine phdisrate(ig,nlayer,chemthermod,zenit,i) 1184 1180 1185 1181 c apr 2002 fgg first version 1186 1182 c********************************************************************** 1187 1183 1184 use param_v4_h, only: ninter,nabs, 1185 . jfotsout,fluxtop, 1186 . jion,jdistot,jdistot_b, 1187 . efdisco2,efdiso2,efdish2o, 1188 . efdish2o2,efdish2,efdiso3, 1189 . efdiso,efdisn,efdish, 1190 . efdisno,efdisn2,efdisno2, 1191 . efdisco,efionco2,efionn2, 1192 . efionco,efiono3p,efionn, 1193 . efionno,efionh 1188 1194 1189 1195 implicit none 1190 include "dimensions.h"1191 include "dimphys.h"1192 include 'param.h'1193 include 'param_v4.h'1194 1196 1195 1197 c arguments 1196 1198 1197 1199 integer i !altitude 1198 integer ig,chemthermod 1200 integer ig,chemthermod,nlayer 1199 1201 real zenit 1200 1202 … … 1203 1205 integer inter,iz,j 1204 1206 real lambda 1205 real jdis(nabs,ninter,nlayer mx)1207 real jdis(nabs,ninter,nlayer) 1206 1208 character*1 dn 1207 1209 … … 1388 1390 c*************************************************************************** 1389 1391 1390 1392 use param_v4_h, only: rcoef, 1393 . ch2, ch3, ch4, ch5, ch7,ch9,ch10,ch11,ch13,ch14,ch15,ch18, 1394 . ch19,ch20,ch21,ch22,ch23,ch24,ch30,ch31,ch32,ch33,ch34, 1395 . ch35,ch36,ch37,ch38,ch39,ch40,ch41,ch42,ch43,ch45, 1396 . ch46,ch47,ch48,ch49,ch50,ch55,ch56,ch57,ch58,ch59,ch62, 1397 . ch63,ch64,ch65,ch66,ch67,ch68,ch69,ch70,ch71, 1398 . ch72,ch73,ch74,ch75,ch76,ch85,ch86,ch87 1399 1400 1401 1391 1402 implicit none 1392 include "dimensions.h"1393 include "dimphys.h"1394 include 'param.h'1395 include 'param_v4.h'1396 1403 1397 1404 c Arguments … … 2010 2017 2011 2018 subroutine lifetimes 2012 & ( ig,i, chemthermod,zenit,zx,jdistot8, jdistot8_b, jion8,2019 & ( ig,i,nlayer,chemthermod,zenit,zx,jdistot8, jdistot8_b, jion8, 2013 2020 $ xtmin, xcompmin, xn_comp_en_EQ, 2014 2021 $ co2xini,o2xini,o3pxini,coxini,hxini,ohxini,ho2xini,h2xini, … … 2028 2035 c********************************************************************** 2029 2036 2037 use iono_h 2038 use param_v4_h 2039 2030 2040 implicit none 2031 2041 2032 include "dimensions.h"2033 include "dimphys.h"2034 include 'param.h'2035 include 'param_v4.h'2036 include 'iono.h'2037 2042 include 'callkeys.h' 2038 2043 2039 2044 c arguments 2040 2045 c 2041 integer i,ig 2046 integer i,ig,nlayer ! I. Layer 2042 2047 integer chemthermod 2043 2048 real zenit 2044 real zx(nlayer mx)2045 real*8 jdistot8(nabs,nlayer mx) ! I.2046 real*8 jdistot8_b(nabs,nlayer mx) ! I.2047 real*8 jion8(nabs,nlayer mx,4) ! I.2049 real zx(nlayer) 2050 real*8 jdistot8(nabs,nlayer) ! I. 2051 real*8 jdistot8_b(nabs,nlayer) ! I. 2052 real*8 jion8(nabs,nlayer,4) ! I. 2048 2053 2049 2054 real*8 xtmin ! O. … … 2714 2719 c********************************************************************** 2715 2720 2716 subroutine timemarching( ig,i, chemthermod,n_comp_en_EQ,2721 subroutine timemarching( ig,i,nlayer,chemthermod,n_comp_en_EQ, 2717 2722 $ compmin,tmin,timefrac_sec, deltat,fmargin1 ) 2718 2723 … … 2725 2730 c********************************************************************** 2726 2731 2732 use iono_h 2733 use param_v4_h, only: tminco2,tmino2,tmino3p,tminco,tminh,tminoh, 2734 . tminho2,tminh2,tminh2o,tmino1d,tminh2o2,tmino3,tminn,tminno, 2735 . tminno2,tminn2,tminn2d,tminco2plus,tminoplus,tmino2plus, 2736 . tmincoplus,tmincplus,tminnplus,tminnoplus,tminn2plus, 2737 . tminhplus,tminhco2plus 2738 2727 2739 implicit none 2728 2729 include "dimensions.h"2730 include "dimphys.h"2731 include 'param.h'2732 include 'param_v4.h'2733 include 'iono.h'2734 2740 2735 2741 c arguments 2736 2742 c 2737 integer i,ig ! I. Layer2743 integer i,ig,nlayer ! I. Layer 2738 2744 integer chemthermod 2739 integer n_comp_en_EQ(nlayer mx) ! Number of species in PE2740 integer compmin(nlayer mx) ! Species with minimum lifetime2741 real*8 tmin(nlayer mx) ! Minimum lifetime2745 integer n_comp_en_EQ(nlayer) ! Number of species in PE 2746 integer compmin(nlayer) ! Species with minimum lifetime 2747 real*8 tmin(nlayer) ! Minimum lifetime 2742 2748 real*8 timefrac_sec ! I. 2743 2749 real*8 deltat ! O. TimeMarching step … … 2893 2899 c********************************************************************** 2894 2900 2895 subroutine prodsandlosses ( ig,i, chemthermod,zenit,zx,2901 subroutine prodsandlosses ( ig,i,nlayer,chemthermod,zenit,zx, 2896 2902 & jdistot8, jdistot8_b, jion8, 2897 2903 & co2xinput, o2xinput, o3pxinput, … … 2916 2922 c********************************************************************** 2917 2923 2924 use param_v4_h 2918 2925 implicit none 2919 include "dimensions.h"2920 include "dimphys.h"2921 include 'param.h'2922 include 'param_v4.h'2923 2926 2924 2927 c arguments 2925 2928 c 2926 integer ig 2929 integer ig,nlayer 2927 2930 integer i ! I. Layer 2928 2931 integer chemthermod 2929 real zx(nlayer mx)2932 real zx(nlayer) 2930 2933 real zenit 2931 real*8 jdistot8(nabs,nlayer mx)2932 real*8 jdistot8_b(nabs,nlayer mx)2933 real*8 jion8(nabs,nlayer mx,4)2934 real*8 jdistot8(nabs,nlayer) 2935 real*8 jdistot8_b(nabs,nlayer) 2936 real*8 jion8(nabs,nlayer,4) 2934 2937 real*8 co2xinput,o2xinput,o3pxinput,coxinput 2935 2938 real*8 ho2xinput,h2xinput,hxinput,ohxinput … … 2939 2942 real*8 cplusxinput,noplusxinput,n2plusxinput,hplusxinput 2940 2943 real*8 electxinput,nplusxinput,hco2plusxinput 2941 2942 2944 2943 2945 c local variables … … 4128 4130 4129 4131 subroutine EF_oscilacion 4130 & (ig,i, paso,chemthermod,zenit, zx,4132 & (ig,i,nlayer,paso,chemthermod,zenit, zx, 4131 4133 & jdistot8, jdistot8_b,jion8, 4132 4134 & tminaux, … … 4170 4172 c********************************************************************** 4171 4173 4174 use iono_h 4175 use param_v4_h, only: nabs, 4176 . ch2, ch3, ch4, ch5, ch7,ch9,ch10,ch11,ch13,ch14,ch15,ch18, 4177 . ch19,ch20,ch21,ch22,ch23,ch24,ch30,ch31,ch32,ch33,ch34, 4178 . ch35,ch36,ch37,ch38,ch39,ch40,ch41,ch42,ch43,ch45, 4179 . ch46,ch47,ch48,ch49,ch50,ch55,ch56,ch57,ch58,ch59,ch62, 4180 . ch63,ch64,ch65,ch66,ch67,ch68,ch69,ch70,ch71, 4181 . ch72,ch73,ch74,ch75,ch76,ch85,ch86,ch87 4182 4183 4172 4184 implicit none 4173 4185 4174 include "dimensions.h"4175 include "dimphys.h"4176 include 'param.h'4177 include 'param_v4.h'4178 include 'iono.h'4179 4180 4181 4186 c arguments 4182 4187 4183 integer ig 4188 integer ig,nlayer 4184 4189 integer i ! I. Layer 4185 4190 integer paso ! I. paso temporal del timemarching, 1,numpasos 4186 4191 integer chemthermod 4187 4192 real*8 tminaux ! I. 4188 real zx(nlayer mx)4193 real zx(nlayer) 4189 4194 real zenit 4190 real*8 jdistot8(nabs,nlayer mx) ! I.4191 real*8 jdistot8_b(nabs,nlayer mx) ! I.4192 real*8 jion8(nabs,nlayer mx,4)4195 real*8 jdistot8(nabs,nlayer) ! I. 4196 real*8 jdistot8_b(nabs,nlayer) ! I. 4197 real*8 jion8(nabs,nlayer,4) 4193 4198 4194 4199 real*8 co2xoutput,o2xoutput,o3pxoutput,coxoutput,h2xoutput … … 4277 4282 external ionsec_o2plus 4278 4283 real*8 ionsec_o2plus 4284 4285 external avg 4286 real*8 avg 4287 4288 external dif 4289 real*8 dif 4290 4291 real*8 log1 4292 real*8 log2 4293 real*8 log3 4279 4294 4280 4295 ccccccccccccccc CODE STARTS … … 4712 4727 4713 4728 if (o1d_eq(i).eq.'Y') then 4714 avg_pares = ( dlog10(o1dxpares(1)) + 4715 & dlog10(o1dxpares(2)) + 4716 & dlog10(o1dxpares(3)) )*0.333 4717 dif_pares = ( abs(dlog10(o1dxpares(1))-avg_pares) + 4718 & abs(dlog10(o1dxpares(2))-avg_pares) + 4719 & abs(dlog10(o1dxpares(3))-avg_pares) ) * 0.333 4720 avg_impar = ( dlog10(o1dximpar(1)) + 4721 & dlog10(o1dximpar(2)) + 4722 & dlog10(o1dximpar(3)) )*0.333 4723 dif_impar = ( abs(dlog10(o1dximpar(1))-avg_impar) + 4724 & abs(dlog10(o1dximpar(2))-avg_impar) + 4725 & abs(dlog10(o1dximpar(3))-avg_impar) ) * 0.333 4729 log1 = dlog10(o1dxpares(1)) 4730 log2 = dlog10(o1dxpares(2)) 4731 log3 = dlog10(o1dxpares(3)) 4732 avg_pares = avg(log1,log2,log3) 4733 dif_pares = dif(log1,log2,log3,avg_pares) 4734 log1 = dlog10(o1dximpar(1)) 4735 log2 = dlog10(o1dximpar(2)) 4736 log3 = dlog10(o1dximpar(3)) 4737 avg_impar = avg(log1,log2,log3) 4738 dif_impar = dif(log1,log2,log3,avg_impar) 4726 4739 dispersion = dif_pares + dif_impar 4727 4740 dif_pares_impar = abs(avg_pares-avg_impar) … … 4733 4746 4734 4747 if (oh_eq(i).eq.'Y') then 4735 avg_pares = ( dlog10(ohxpares(1)) + 4736 & dlog10(ohxpares(2)) + 4737 & dlog10(ohxpares(3)) )*0.333 4738 dif_pares = ( abs(dlog10(ohxpares(1))-avg_pares) + 4739 & abs(dlog10(ohxpares(2))-avg_pares) + 4740 & abs(dlog10(ohxpares(3))-avg_pares) ) * 0.333 4741 avg_impar = ( dlog10(ohximpar(1)) + 4742 & dlog10(ohximpar(2)) + 4743 & dlog10(ohximpar(3)) )*0.333 4744 dif_impar = ( abs(dlog10(ohximpar(1))-avg_impar) + 4745 & abs(dlog10(ohximpar(2))-avg_impar) + 4746 & abs(dlog10(ohximpar(3))-avg_impar) ) * 0.333 4748 log1 = dlog10(ohxpares(1)) 4749 log2 = dlog10(ohxpares(2)) 4750 log3 = dlog10(ohxpares(3)) 4751 avg_pares = avg(log1,log2,log3) 4752 dif_pares = dif(log1,log2,log3,avg_pares) 4753 log1 = dlog10(ohximpar(1)) 4754 log2 = dlog10(ohximpar(2)) 4755 log3 = dlog10(ohximpar(3)) 4756 avg_impar = avg(log1,log2,log3) 4757 dif_impar = dif(log1,log2,log3,avg_impar) 4747 4758 dispersion = dif_pares + dif_impar 4748 4759 dif_pares_impar = abs(avg_pares-avg_impar) … … 4755 4766 4756 4767 if (ho2_eq(i).eq.'Y') then 4757 avg_pares = ( dlog10(ho2xpares(1)) + 4758 & dlog10(ho2xpares(2)) + 4759 & dlog10(ho2xpares(3)) )*0.333 4760 dif_pares = ( abs(dlog10(ho2xpares(1))-avg_pares) + 4761 & abs(dlog10(ho2xpares(2))-avg_pares) + 4762 & abs(dlog10(ho2xpares(3))-avg_pares) ) * 0.333 4763 avg_impar = ( dlog10(ho2ximpar(1)) + 4764 & dlog10(ho2ximpar(2)) + 4765 & dlog10(ho2ximpar(3)) )*0.333 4766 dif_impar = ( abs(dlog10(ho2ximpar(1))-avg_impar) + 4767 & abs(dlog10(ho2ximpar(2))-avg_impar) + 4768 & abs(dlog10(ho2ximpar(3))-avg_impar) ) * 0.333 4768 log1 = dlog10(ho2xpares(1)) 4769 log2 = dlog10(ho2xpares(2)) 4770 log3 = dlog10(ho2xpares(3)) 4771 avg_pares = avg(log1,log2,log3) 4772 dif_pares = dif(log1,log2,log3,avg_pares) 4773 log1 = dlog10(ho2ximpar(1)) 4774 log2 = dlog10(ho2ximpar(2)) 4775 log3 = dlog10(ho2ximpar(3)) 4776 avg_impar = avg(log1,log2,log3) 4777 dif_impar = dif(log1,log2,log3,avg_impar) 4769 4778 dispersion = dif_pares + dif_impar 4770 4779 dif_pares_impar = abs(avg_pares-avg_impar) … … 4776 4785 4777 4786 if (h_eq(i).eq.'Y') then 4778 avg_pares = ( dlog10(hxpares(1)) + 4779 & dlog10(hxpares(2)) + 4780 & dlog10(hxpares(3)) )*0.333 4781 dif_pares = ( abs(dlog10(hxpares(1))-avg_pares) + 4782 & abs(dlog10(hxpares(2))-avg_pares) + 4783 & abs(dlog10(hxpares(3))-avg_pares) ) * 0.333 4784 avg_impar = ( dlog10(hximpar(1)) + 4785 & dlog10(hximpar(2)) + 4786 & dlog10(hximpar(3)) )*0.333 4787 dif_impar = ( abs(dlog10(hximpar(1))-avg_impar) + 4788 & abs(dlog10(hximpar(2))-avg_impar) + 4789 & abs(dlog10(hximpar(3))-avg_impar) ) * 0.333 4787 log1 = dlog10(hxpares(1)) 4788 log2 = dlog10(hxpares(2)) 4789 log3 = dlog10(hxpares(3)) 4790 avg_pares = avg(log1,log2,log3) 4791 dif_pares = dif(log1,log2,log3,avg_pares) 4792 log1 = dlog10(hximpar(1)) 4793 log2 = dlog10(hximpar(2)) 4794 log3 = dlog10(hximpar(3)) 4795 avg_impar = avg(log1,log2,log3) 4796 dif_impar = dif(log1,log2,log3,avg_impar) 4790 4797 dispersion = dif_pares + dif_impar 4791 4798 dif_pares_impar = abs(avg_pares-avg_impar) … … 4799 4806 if(chemthermod.ge.2) then 4800 4807 if (n2d_eq(i).eq.'Y') then 4801 avg_pares = ( dlog10(n2dxpares(1)) + 4802 & dlog10(n2dxpares(2)) + 4803 & dlog10( n2dxpares(3)) )*0.333 4804 dif_pares = ( abs(dlog10(n2dxpares(1))-avg_pares) + 4805 & abs(dlog10(n2dxpares(2))-avg_pares) + 4806 & abs(dlog10(n2dxpares(3))-avg_pares) ) * 0.333 4807 avg_impar = ( dlog10(n2dximpar(1)) + 4808 & dlog10(n2dximpar(2)) + 4809 & dlog10( n2dximpar(3)) )*0.333 4810 dif_impar = ( abs(dlog10(n2dximpar(1))-avg_impar) + 4811 & abs(dlog10(n2dximpar(2))-avg_impar) + 4812 & abs(dlog10(n2dximpar(3))-avg_impar) ) * 0.333 4808 log1 = dlog10(n2dxpares(1)) 4809 log2 = dlog10(n2dxpares(2)) 4810 log3 = dlog10(n2dxpares(3)) 4811 avg_pares = avg(log1,log2,log3) 4812 dif_pares = dif(log1,log2,log3,avg_pares) 4813 log1 = dlog10(n2dximpar(1)) 4814 log2 = dlog10(n2dximpar(2)) 4815 log3 = dlog10(n2dximpar(3)) 4816 avg_impar = avg(log1,log2,log3) 4817 dif_impar = dif(log1,log2,log3,avg_impar) 4813 4818 dispersion = dif_pares + dif_impar 4814 4819 dif_pares_impar = abs(avg_pares-avg_impar) … … 4820 4825 4821 4826 if (no2_eq(i).eq.'Y') then 4822 avg_pares = (dlog10(no2xpares(1)) + 4823 & dlog10(no2xpares(2)) + 4824 & dlog10( no2xpares(3)) )*0.333 4825 dif_pares = ( abs(dlog10(no2xpares(1))-avg_pares) + 4826 & abs(dlog10(no2xpares(2))-avg_pares) + 4827 & abs(dlog10(no2xpares(3))-avg_pares) ) * 0.333 4828 avg_impar = ( dlog10(no2ximpar(1)) + 4829 & dlog10(no2ximpar(2)) + 4830 & dlog10( no2ximpar(3)) )*0.333 4831 dif_impar = ( abs(dlog10(no2ximpar(1))-avg_impar) + 4832 & abs(dlog10(no2ximpar(2))-avg_impar) + 4833 & abs(dlog10(no2ximpar(3))-avg_impar) ) * 0.333 4827 log1 = dlog10(no2xpares(1)) 4828 log2 = dlog10(no2xpares(2)) 4829 log3 = dlog10(no2xpares(3)) 4830 avg_pares = avg(log1,log2,log3) 4831 dif_pares = dif(log1,log2,log3,avg_pares) 4832 log1 = dlog10(no2ximpar(1)) 4833 log2 = dlog10(no2ximpar(2)) 4834 log3 = dlog10(no2ximpar(3)) 4835 avg_impar = avg(log1,log2,log3) 4836 dif_impar = dif(log1,log2,log3,avg_impar) 4834 4837 dispersion = dif_pares + dif_impar 4835 4838 dif_pares_impar = abs(avg_pares-avg_impar) … … 4846 4849 if(chemthermod.eq.3) then 4847 4850 if (cplus_eq(i).eq.'Y') then 4848 avg_pares = ( dlog10(cplusxpares(1)) + 4849 & dlog10(cplusxpares(2)) + 4850 & dlog10(cplusxpares(3)) ) * 0.333 4851 dif_pares = ( abs(dlog10(cplusxpares(1))-avg_pares) + 4852 & abs(dlog10(cplusxpares(2))-avg_pares) + 4853 & abs(dlog10(cplusxpares(3))-avg_pares) ) * 0.333 4854 avg_impar = ( dlog10(cplusximpar(1)) + 4855 & dlog10(cplusximpar(2)) + 4856 & dlog10(cplusximpar(3)) ) * 0.333 4857 dif_impar = ( abs(dlog10(cplusximpar(1))-avg_impar) + 4858 & abs(dlog10(cplusximpar(2))-avg_impar) + 4859 & abs(dlog10(cplusximpar(3))-avg_impar) ) * 0.333 4851 log1 = dlog10(cplusxpares(1)) 4852 log2 = dlog10(cplusxpares(2)) 4853 log3 = dlog10(cplusxpares(3)) 4854 avg_pares = avg(log1,log2,log3) 4855 dif_pares = dif(log1,log2,log3,avg_pares) 4856 log1 = dlog10(cplusximpar(1)) 4857 log2 = dlog10(cplusximpar(2)) 4858 log3 = dlog10(cplusximpar(3)) 4859 avg_impar = avg(log1,log2,log3) 4860 dif_impar = dif(log1,log2,log3,avg_impar) 4860 4861 dispersion = dif_pares + dif_impar 4861 4862 dif_pares_impar = abs(avg_pares-avg_impar) … … 4867 4868 4868 4869 if (coplus_eq(i).eq.'Y') then 4869 avg_pares = ( dlog10(coplusxpares(1)) + 4870 & dlog10(coplusxpares(2)) + 4871 & dlog10(coplusxpares(3)) )*0.333 4872 dif_pares = ( abs(dlog10(coplusxpares(1))-avg_pares)+ 4873 & abs(dlog10(coplusxpares(2))-avg_pares) + 4874 & abs(dlog10(coplusxpares(3))-avg_pares) ) * 0.333 4875 avg_impar = ( dlog10(coplusximpar(1)) + 4876 & dlog10(coplusximpar(2)) + 4877 & dlog10(coplusximpar(3)) )*0.333 4878 dif_impar = ( abs(dlog10(coplusximpar(1))-avg_impar)+ 4879 & abs(dlog10(coplusximpar(2))-avg_impar) + 4880 & abs(dlog10(coplusximpar(3))-avg_impar) ) * 0.333 4870 log1 = dlog10(coplusxpares(1)) 4871 log2 = dlog10(coplusxpares(2)) 4872 log3 = dlog10(coplusxpares(3)) 4873 avg_pares = avg(log1,log2,log3) 4874 dif_pares = dif(log1,log2,log3,avg_pares) 4875 log1 = dlog10(coplusximpar(1)) 4876 log2 = dlog10(coplusximpar(2)) 4877 log3 = dlog10(coplusximpar(3)) 4878 avg_impar = avg(log1,log2,log3) 4879 dif_impar = dif(log1,log2,log3,avg_impar) 4881 4880 dispersion = dif_pares + dif_impar 4882 4881 dif_pares_impar = abs(avg_pares-avg_impar) … … 4888 4887 4889 4888 if (oplus_eq(i).eq.'Y') then 4890 avg_pares = ( dlog10(oplusxpares(1)) + 4891 & dlog10(oplusxpares(2)) + 4892 & dlog10( oplusxpares(3)) )*0.333 4893 dif_pares = ( abs(dlog10(oplusxpares(1))-avg_pares) + 4894 & abs(dlog10(oplusxpares(2))-avg_pares) + 4895 & abs(dlog10(oplusxpares(3))-avg_pares) ) * 0.333 4896 avg_impar = ( dlog10(oplusximpar(1)) + 4897 & dlog10(oplusximpar(2)) + 4898 & dlog10(oplusximpar(3)) )*0.333 4899 dif_impar = ( abs(dlog10(oplusximpar(1))-avg_impar) + 4900 & abs(dlog10(oplusximpar(2))-avg_impar) + 4901 & abs(dlog10(oplusximpar(3))-avg_impar) ) * 0.333 4889 log1 = dlog10(oplusxpares(1)) 4890 log2 = dlog10(oplusxpares(2)) 4891 log3 = dlog10(oplusxpares(3)) 4892 avg_pares = avg(log1,log2,log3) 4893 dif_pares = dif(log1,log2,log3,avg_pares) 4894 log1 = dlog10(oplusximpar(1)) 4895 log2 = dlog10(oplusximpar(2)) 4896 log3 = dlog10(oplusximpar(3)) 4897 avg_impar = avg(log1,log2,log3) 4898 dif_impar = dif(log1,log2,log3,avg_impar) 4902 4899 dispersion = dif_pares + dif_impar 4903 4900 dif_pares_impar = abs(avg_pares-avg_impar) … … 4909 4906 4910 4907 if (n2plus_eq(i).eq.'Y') then 4911 avg_pares = ( dlog10(n2plusxpares(1)) + 4912 & dlog10(n2plusxpares(2)) + 4913 & dlog10(n2plusxpares(3)) )*0.333 4914 dif_pares = ( abs(dlog10(n2plusxpares(1))-avg_pares)+ 4915 & abs(dlog10(n2plusxpares(2))-avg_pares) + 4916 & abs(dlog10(n2plusxpares(3))-avg_pares) ) * 0.333 4917 avg_impar = ( dlog10(n2plusximpar(1)) + 4918 & dlog10(n2plusximpar(2))+ 4919 & dlog10(n2plusximpar(3)) )*0.333 4920 dif_impar = ( abs(dlog10(n2plusximpar(1))-avg_impar)+ 4921 & abs(dlog10(n2plusximpar(2))-avg_impar) + 4922 & abs(dlog10(n2plusximpar(3))-avg_impar) ) * 0.333 4908 log1 = dlog10(n2plusxpares(1)) 4909 log2 = dlog10(n2plusxpares(2)) 4910 log3 = dlog10(n2plusxpares(3)) 4911 avg_pares = avg(log1,log2,log3) 4912 dif_pares = dif(log1,log2,log3,avg_pares) 4913 log1 = dlog10(n2plusximpar(1)) 4914 log2 = dlog10(n2plusximpar(2)) 4915 log3 = dlog10(n2plusximpar(3)) 4916 avg_impar = avg(log1,log2,log3) 4917 dif_impar = dif(log1,log2,log3,avg_impar) 4923 4918 dispersion = dif_pares + dif_impar 4924 4919 dif_pares_impar = abs(avg_pares-avg_impar) … … 4930 4925 4931 4926 if (hplus_eq(i).eq.'Y') then 4932 avg_pares = ( dlog10(hplusxpares(1)) + 4933 & dlog10(hplusxpares(2)) + 4934 & dlog10( hplusxpares(3)) )*0.333 4935 dif_pares = ( abs(dlog10(hplusxpares(1))-avg_pares) + 4936 & abs(dlog10(hplusxpares(2))-avg_pares) + 4937 & abs(dlog10(hplusxpares(3))-avg_pares) ) * 0.333 4938 avg_impar = ( dlog10(hplusximpar(1)) + 4939 & dlog10(hplusximpar(2)) + 4940 & dlog10(hplusximpar(3)) )*0.333 4941 dif_impar = ( abs(dlog10(hplusximpar(1))-avg_impar) + 4942 & abs(dlog10(hplusximpar(2))-avg_impar) + 4943 & abs(dlog10(hplusximpar(3))-avg_impar) ) * 0.333 4927 log1 = dlog10(hplusxpares(1)) 4928 log2 = dlog10(hplusxpares(2)) 4929 log3 = dlog10(hplusxpares(3)) 4930 avg_pares = avg(log1,log2,log3) 4931 dif_pares = dif(log1,log2,log3,avg_pares) 4932 log1 = dlog10(hplusximpar(1)) 4933 log2 = dlog10(hplusximpar(2)) 4934 log3 = dlog10(hplusximpar(3)) 4935 avg_impar = avg(log1,log2,log3) 4936 dif_impar = dif(log1,log2,log3,avg_impar) 4944 4937 dispersion = dif_pares + dif_impar 4945 4938 dif_pares_impar = abs(avg_pares-avg_impar) … … 4951 4944 4952 4945 if (co2plus_eq(i).eq.'Y') then 4953 avg_pares = ( dlog10(co2plusxpares(1)) + 4954 & dlog10(co2plusxpares(2)) + 4955 & dlog10(co2plusxpares(3)) )*0.333 4956 dif_pares = (abs(dlog10(co2plusxpares(1))-avg_pares)+ 4957 & abs(dlog10(co2plusxpares(2))-avg_pares) + 4958 & abs(dlog10(co2plusxpares(3))-avg_pares) ) * 0.333 4959 avg_impar = ( dlog10(co2plusximpar(1)) + 4960 & dlog10(co2plusximpar(2)) + 4961 & dlog10(co2plusximpar(3)) )*0.333 4962 dif_impar = (abs(dlog10(co2plusximpar(1))-avg_impar)+ 4963 & abs(dlog10(co2plusximpar(2))-avg_impar) + 4964 & abs(dlog10(co2plusximpar(3))-avg_impar) ) * 0.333 4946 log1 = dlog10(co2plusxpares(1)) 4947 log2 = dlog10(co2plusxpares(2)) 4948 log3 = dlog10(co2plusxpares(3)) 4949 avg_pares = avg(log1,log2,log3) 4950 dif_pares = dif(log1,log2,log3,avg_pares) 4951 log1 = dlog10(co2plusximpar(1)) 4952 log2 = dlog10(co2plusximpar(2)) 4953 log3 = dlog10(co2plusximpar(3)) 4954 avg_impar = avg(log1,log2,log3) 4955 dif_impar = dif(log1,log2,log3,avg_impar) 4965 4956 dispersion = dif_pares + dif_impar 4966 4957 dif_pares_impar = abs(avg_pares-avg_impar) … … 4972 4963 4973 4964 if (o2plus_eq(i).eq.'Y') then 4974 avg_pares = ( dlog10(o2plusxpares(1)) + 4975 & dlog10(o2plusxpares(2)) + 4976 & dlog10(o2plusxpares(3)) )*0.333 4977 dif_pares = ( abs(dlog10(o2plusxpares(1))-avg_pares)+ 4978 & abs(dlog10(o2plusxpares(2))-avg_pares) + 4979 & abs(dlog10(o2plusxpares(3))-avg_pares) ) * 0.333 4980 avg_impar = ( dlog10(o2plusximpar(1)) + 4981 & dlog10(o2plusximpar(2)) + 4982 & dlog10(o2plusximpar(3)) )*0.333 4983 dif_impar = ( abs(dlog10(o2plusximpar(1))-avg_impar)+ 4984 & abs(dlog10(o2plusximpar(2))-avg_impar) + 4985 & abs(dlog10(o2plusximpar(3))-avg_impar) ) * 0.333 4965 log1 = dlog10(o2plusxpares(1)) 4966 log2 = dlog10(o2plusxpares(2)) 4967 log3 = dlog10(o2plusxpares(3)) 4968 avg_pares = avg(log1,log2,log3) 4969 dif_pares = dif(log1,log2,log3,avg_pares) 4970 log1 = dlog10(o2plusximpar(1)) 4971 log2 = dlog10(o2plusximpar(2)) 4972 log3 = dlog10(o2plusximpar(3)) 4973 avg_impar = avg(log1,log2,log3) 4974 dif_impar = dif(log1,log2,log3,avg_impar) 4986 4975 dispersion = dif_pares + dif_impar 4987 4976 dif_pares_impar = abs(avg_pares-avg_impar) … … 4993 4982 4994 4983 if (noplus_eq(i).eq.'Y') then 4995 avg_pares = ( dlog10(noplusxpares(1)) + 4996 & dlog10(noplusxpares(2)) + 4997 & dlog10(noplusxpares(3)) )*0.333 4998 dif_pares = ( abs(dlog10(noplusxpares(1))-avg_pares)+ 4999 & abs(dlog10(noplusxpares(2))-avg_pares) + 5000 & abs(dlog10(noplusxpares(3))-avg_pares) ) * 0.333 5001 avg_impar = ( dlog10(noplusximpar(1)) + 5002 & dlog10(noplusximpar(2)) + 5003 & dlog10(noplusximpar(3)) )*0.333 5004 dif_impar = ( abs(dlog10(noplusximpar(1))-avg_impar)+ 5005 & abs(dlog10(noplusximpar(2))-avg_impar) + 5006 & abs(dlog10(noplusximpar(3))-avg_impar) ) * 0.333 4984 log1 = dlog10(noplusxpares(1)) 4985 log2 = dlog10(noplusxpares(2)) 4986 log3 = dlog10(noplusxpares(3)) 4987 avg_pares = avg(log1,log2,log3) 4988 dif_pares = dif(log1,log2,log3,avg_pares) 4989 log1 = dlog10(noplusximpar(1)) 4990 log2 = dlog10(noplusximpar(2)) 4991 log3 = dlog10(noplusximpar(3)) 4992 avg_impar = avg(log1,log2,log3) 4993 dif_impar = dif(log1,log2,log3,avg_impar) 5007 4994 dispersion = dif_pares + dif_impar 5008 4995 dif_pares_impar = abs(avg_pares-avg_impar) … … 5014 5001 5015 5002 if (nplus_eq(i).eq.'Y') then 5016 avg_pares = ( dlog10(nplusxpares(1)) + 5017 & dlog10(nplusxpares(2)) + 5018 & dlog10( nplusxpares(3)) )*0.333 5019 dif_pares = ( abs(dlog10(nplusxpares(1))-avg_pares) + 5020 & abs(dlog10(nplusxpares(2))-avg_pares) + 5021 & abs(dlog10(nplusxpares(3))-avg_pares) ) * 0.333 5022 avg_impar = ( dlog10(nplusximpar(1)) + 5023 & dlog10(nplusximpar(2)) + 5024 & dlog10(nplusximpar(3)) )*0.333 5025 dif_impar = ( abs(dlog10(nplusximpar(1))-avg_impar) + 5026 & abs(dlog10(nplusximpar(2))-avg_impar) + 5027 & abs(dlog10(nplusximpar(3))-avg_impar) ) * 0.333 5003 log1 = dlog10(nplusxpares(1)) 5004 log2 = dlog10(nplusxpares(2)) 5005 log3 = dlog10(nplusxpares(3)) 5006 avg_pares = avg(log1,log2,log3) 5007 dif_pares = dif(log1,log2,log3,avg_pares) 5008 log1 = dlog10(nplusximpar(1)) 5009 log2 = dlog10(nplusximpar(2)) 5010 log3 = dlog10(nplusximpar(3)) 5011 avg_impar = avg(log1,log2,log3) 5012 dif_impar = dif(log1,log2,log3,avg_impar) 5028 5013 dispersion = dif_pares + dif_impar 5029 5014 dif_pares_impar = abs(avg_pares-avg_impar) … … 5035 5020 5036 5021 if (hco2plus_eq(i).eq.'Y') then 5037 avg_pares = ( dlog10(hco2plusxpares(1)) + 5038 & dlog10(hco2plusxpares(2)) + 5039 & dlog10(hco2plusxpares(3)) )*0.333 5040 dif_pares = (abs(dlog10(hco2plusxpares(1))-avg_pares)+ 5041 & abs(dlog10(hco2plusxpares(2))-avg_pares) + 5042 & abs(dlog10(hco2plusxpares(3))-avg_pares) ) * 0.333 5043 avg_impar = ( dlog10(hco2plusximpar(1)) + 5044 & dlog10(hco2plusximpar(2)) + 5045 & dlog10(hco2plusximpar(3)) )*0.333 5046 dif_impar = (abs(dlog10(hco2plusximpar(1))-avg_impar)+ 5047 & abs(dlog10(hco2plusximpar(2))-avg_impar) + 5048 & abs(dlog10(hco2plusximpar(3))-avg_impar) ) * 0.333 5022 log1 = dlog10(hco2plusxpares(1)) 5023 log2 = dlog10(hco2plusxpares(2)) 5024 log3 = dlog10(hco2plusxpares(3)) 5025 avg_pares = avg(log1,log2,log3) 5026 dif_pares = dif(log1,log2,log3,avg_pares) 5027 log1 = dlog10(hco2plusximpar(1)) 5028 log2 = dlog10(hco2plusximpar(2)) 5029 log3 = dlog10(hco2plusximpar(3)) 5030 avg_impar = avg(log1,log2,log3) 5031 dif_impar = dif(log1,log2,log3,avg_impar) 5049 5032 dispersion = dif_pares + dif_impar 5050 5033 dif_pares_impar = abs(avg_pares-avg_impar) … … 5120 5103 end 5121 5104 5105 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5106 function avg(log1,log2,log3) 5107 implicit none 5108 real*8 avg 5109 real*8 log1,log2,log3 5110 avg = (log1+log2+log3)*0.333 5111 return 5112 end 5113 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5114 function dif(log1,log2,log3,avg) 5115 implicit none 5116 real*8 dif 5117 real*8 avg 5118 real*8 log1,log2,log3 5119 dif = (abs(log1-avg) + 5120 & abs(log2-avg) + 5121 & abs(log3-avg) ) * 0.333 5122 return 5123 end 5124 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5122 5125 5123 5126 c********************************************************************** -
trunk/LMDZ.MARS/libf/aeronomars/perosat.F
r1226 r1266 25 25 c ------------- 26 26 27 !#include "dimensions.h"28 !#include "dimphys.h"29 !#include "chimiedata.h"30 !#include "tracer.h"31 !#include "conc.h"32 27 c 33 28 c arguments: -
trunk/LMDZ.MARS/libf/aeronomars/photochemistry.F
r1226 r1266 17 17 implicit none 18 18 19 !#include "dimensions.h"20 !#include "dimphys.h"21 19 #include "chimiedata.h" 22 20 #include "callkeys.h" 23 !#include "tracer.h"24 21 25 22 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc … … 193 190 implicit none 194 191 195 !#include "dimensions.h"196 !#include "dimphys.h"197 192 #include "chimiedata.h" 198 193 #include "callkeys.h" … … 790 785 implicit none 791 786 792 !#include "dimensions.h"793 !#include "dimphys.h"794 787 #include "chimiedata.h" 795 788 … … 1163 1156 implicit none 1164 1157 1165 !#include "dimensions.h"1166 !#include "dimphys.h"1167 1158 #include "callkeys.h" 1168 !#include "tracer.h"1169 1159 1170 1160 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc … … 1268 1258 implicit none 1269 1259 1270 !#include "dimensions.h"1271 !#include "dimphys.h"1272 1260 #include "callkeys.h" 1273 !#include "tracer.h"1274 1261 1275 1262 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc … … 1365 1352 implicit none 1366 1353 1367 !#include "dimensions.h"1368 !#include "dimphys.h"1369 1370 1354 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 1371 1355 c inputs: c -
trunk/LMDZ.MARS/libf/aeronomars/surfacearea.F
r1246 r1266 20 20 21 21 #include "dimensions.h" 22 !#include "dimphys.h"23 22 #include "callkeys.h" 24 !#include "tracer.h"25 !#include "dimradmars.h"26 23 #include "chimiedata.h" 27 !#include "conc.h"28 24 29 25 ! input -
trunk/LMDZ.MARS/libf/aeronomars/thermosphere.F
r1226 r1266 9 9 implicit none 10 10 11 !#include "dimensions.h"12 !#include "dimphys.h"13 11 #include "callkeys.h" 14 !#include "comdiurn.h"15 !#include "param.h"16 !#include "param_v4.h"17 !#include "chimiedata.h"18 !#include "conc.h"19 20 12 21 13 integer,intent(in) :: ngrid ! number of atmospheric columns -
trunk/LMDZ.MARS/libf/dyn3d/writediagdyn.F90
r1130 r1266 30 30 ! Local variables: 31 31 !real,dimension(iip1,jjp1,llm) :: data3 ! to store 3D data 32 ! Note iip1,jjp1 known from paramet.h; nsoilmx known from dimphys.h32 ! Note iip1,jjp1 known from paramet.h; nsoilmx known from comsoil 33 33 !real,dimension(iip1,jjp1) :: data2 ! to store 2D data 34 34 !real :: data0 ! to store 0D data -
trunk/LMDZ.MARS/libf/phymars/aeropacity.F
r1246 r1266 56 56 c 57 57 c======================================================================= 58 !#include "dimensions.h"59 !#include "dimphys.h"60 58 #include "callkeys.h" 61 !#include "comgeomfi.h"62 !#include "dimradmars.h"63 !#include "tracer.h"64 59 65 60 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/aeroptproperties.F
r1246 r1266 28 28 29 29 #include "dimensions.h" 30 #include "dimphys.h"31 30 #include "callkeys.h" 32 !#include "dimradmars.h"33 31 34 32 c Local variables -
trunk/LMDZ.MARS/libf/phymars/albedocaps.F90
r1130 r1266 13 13 14 14 #include"dimensions.h" 15 #include"dimphys.h"16 !#include"surfdat.h"17 15 #include"callkeys.h" 18 !#ifdef MESOSCALE19 !#include"comgeomfi.h"20 !#endif21 16 22 17 ! arguments: … … 100 95 implicit none 101 96 #include"dimensions.h" 102 #include"dimphys.h"103 !#include"surfdat.h"104 !#include"comgeomfi.h"105 97 #include"datafile.h" 106 98 -
trunk/LMDZ.MARS/libf/phymars/blendrad.F
r1047 r1266 15 15 use yomlw_h, only: nlaylte 16 16 implicit none 17 !#include "dimensions.h"18 !#include "dimphys.h"19 !#include "dimradmars.h"20 17 #include "nlteparams.h" 21 !#include "yomlw.h"22 18 23 19 c Input: -
trunk/LMDZ.MARS/libf/phymars/calldrag_noro.F
r1047 r1266 55 55 c ------------------ 56 56 c 57 !#include "dimensions.h"58 !#include "dimphys.h"59 !#include "dimradmars.h"60 !#include "surfdat.h"61 57 62 58 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/callradite.F
r1246 r1266 82 82 c over layers 1..NFLEV (set in dimradmars_mod). Returns zero for higher 83 83 c layers, if any. 84 c In other routines, nlayer mx-> nflev.84 c In other routines, nlayer -> nflev. 85 85 c Routines affected: lwflux, lwi, lwmain, lwxb, lwxd, lwxn. 86 86 c … … 151 151 c ------------- 152 152 c 153 !#include "dimensions.h"154 !#include "dimphys.h"155 !#include "dimradmars.h"156 153 #include "callkeys.h" 157 !#include "yomlw.h"158 154 159 155 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/callsedim.F
r1226 r1266 30 30 c ------------- 31 31 32 !#include "dimensions.h"33 !#include "dimphys.h"34 !#include "tracer.h"35 32 #include "callkeys.h" 36 33 -
trunk/LMDZ.MARS/libf/phymars/co2snow.F
r1226 r1266 18 18 19 19 #include "dimensions.h" 20 #include "dimphys.h"21 !#include "surfdat.h"22 20 #include "callkeys.h" 23 21 -
trunk/LMDZ.MARS/libf/phymars/conf_phys.F
r1264 r1266 46 46 IMPLICIT NONE 47 47 #include "dimensions.h" 48 #include "dimphys.h"49 !#include "comsaison.h"50 !#include "comdiurn.h"51 !#include "comgeomfi.h"52 48 #include "callkeys.h" 53 !#include "surfdat.h"54 !#include "dimradmars.h"55 49 #include "datafile.h" 56 !#include "slope.h"57 50 #include "microphys.h" 58 !#include "tracer.h"59 51 60 52 INTEGER,INTENT(IN) :: ngrid,nlayer,nq -
trunk/LMDZ.MARS/libf/phymars/convadj.F
r1226 r1266 32 32 ! ------------ 33 33 34 !#include "dimensions.h"35 !#include "dimphys.h"36 34 #include "callkeys.h" 37 !#include "tracer.h"38 35 39 36 -
trunk/LMDZ.MARS/libf/phymars/dimradmars_mod.F90
r1246 r1266 8 8 ! NDLO2 and ndomainsz for the splitting in the physics call 9 9 ! WARNING: One must have 1 < ndomainsz =< ngrid 10 integer,save :: NFLEV !=nlayer mx! with splitting10 integer,save :: NFLEV !=nlayer ! with splitting 11 11 integer,save :: ndomainsz !=(ngrid-1)/20 + 1 12 12 integer,save :: NDLON !=ndomainsz ! with splitting -
trunk/LMDZ.MARS/libf/phymars/drag_noro.F
r1226 r1266 48 48 C 49 49 C comcstfi.h 50 C dimphys.h51 50 C 52 51 c … … 71 70 c d_v-----output-R-increment de la vitesse v 72 71 c====================================================================== 73 !#include "dimensions.h"74 !#include "dimphys.h"75 !#include "dimradmars.h"76 72 c 77 73 c ARGUMENTS -
trunk/LMDZ.MARS/libf/phymars/dustdevil.F
r1226 r1266 30 30 c ------------- 31 31 32 !#include "dimensions.h"33 !#include "dimphys.h"34 c#include "comconst.h" ! TEMPORAIRE AVEC ANLDEVIL !!!!35 !#include "surfdat.h"36 !#include "comgeomfi.h"37 !#include "tracer.h"38 32 c arguments: 39 33 c ---------- -
trunk/LMDZ.MARS/libf/phymars/dustlift.F
r1226 r1266 24 24 c declarations: 25 25 c ------------- 26 27 !#include "dimensions.h"28 !#include "dimphys.h"29 !#include "tracer.h"30 26 31 27 c -
trunk/LMDZ.MARS/libf/phymars/eofdump_mod.F90
r1226 r1266 22 22 ! 23 23 #include "dimensions.h" 24 !#include "dimphys.h"25 24 ! 26 25 … … 86 85 ! 87 86 #include "dimensions.h" 88 !#include "dimphys.h"89 87 #include "comvert.h" 90 !#include "comgeomfi.h"91 88 92 89 integer,intent(in) :: ngrid ! total number of physics grid points -
trunk/LMDZ.MARS/libf/phymars/flusv.F
r1047 r1266 1 1 SUBROUTINE flusv(KDLON,nsf,n,omega,g,tau,emis,bh,bsol,fah,fdh) 2 use dimradmars_mod, only: ndlo2, ndlon 2 use dimradmars_mod, only: ndlo2, ndlon, nflev 3 3 IMPLICIT NONE 4 4 c....................................................................... … … 37 37 c 38 38 #include "dimensions.h" 39 #include "dimphys.h"40 !#include "dimradmars.h"41 39 c....................................................................... 42 40 c declaration des arguments … … 52 50 INTEGER iv,i,j 53 51 REAL beta,gama1,gama2,amu1,grgama,b0,b1 54 REAL a(NDLON,4*n layermx),b(NDLON,4*nlayermx)55 & ,d(NDLON,4*n layermx),e(NDLON,4*nlayermx)56 & ,y(NDLON,4*n layermx)57 & ,alambda(NDLON,2*n layermx)58 & ,e1(NDLON,2*n layermx),e2(NDLON,2*nlayermx)59 & ,e3(NDLON,2*n layermx),e4(NDLON,2*nlayermx)60 & ,cah(NDLON,2*n layermx),cab(NDLON,2*nlayermx)61 & ,cdh(NDLON,2*n layermx),cdb(NDLON,2*nlayermx)62 REAL grg(NDLON,2*n layermx),grh(NDLON,2*nlayermx)63 & ,grj(NDLON,2*n layermx),grk(NDLON,2*nlayermx)64 & ,alpha1(NDLON,2*n layermx),alpha2(NDLON,2*nlayermx)65 & ,sigma1(NDLON,2*n layermx),sigma2(NDLON,2*nlayermx)52 REAL a(NDLON,4*nflev),b(NDLON,4*nflev) 53 & ,d(NDLON,4*nflev),e(NDLON,4*nflev) 54 & ,y(NDLON,4*nflev) 55 & ,alambda(NDLON,2*nflev) 56 & ,e1(NDLON,2*nflev),e2(NDLON,2*nflev) 57 & ,e3(NDLON,2*nflev),e4(NDLON,2*nflev) 58 & ,cah(NDLON,2*nflev),cab(NDLON,2*nflev) 59 & ,cdh(NDLON,2*nflev),cdb(NDLON,2*nflev) 60 REAL grg(NDLON,2*nflev),grh(NDLON,2*nflev) 61 & ,grj(NDLON,2*nflev),grk(NDLON,2*nflev) 62 & ,alpha1(NDLON,2*nflev),alpha2(NDLON,2*nflev) 63 & ,sigma1(NDLON,2*nflev),sigma2(NDLON,2*nflev) 66 64 INTEGER nq 67 65 PARAMETER (nq=8) … … 272 270 273 271 SUBROUTINE sys3v(KDLON,n,a,b,d,e,y) 274 use dimradmars_mod, only: ndlon, ndlo2 272 use dimradmars_mod, only: ndlon, ndlo2, nflev 275 273 IMPLICIT NONE 276 274 c....................................................................... … … 291 289 c 292 290 c....................................................................... 293 c include des dimensions locales294 c295 #include "dimensions.h"296 #include "dimphys.h"297 !#include "dimradmars.h"298 c.......................................................................299 291 c declaration des arguments 300 292 c … … 305 297 c 306 298 INTEGER iv,i 307 REAL as(NDLON,4*n layermx),ds(NDLON,4*nlayermx)308 & ,x(NDLON,4*n layermx)299 REAL as(NDLON,4*nflev),ds(NDLON,4*nflev) 300 & ,x(NDLON,4*nflev) 309 301 c....................................................................... 310 302 c -
trunk/LMDZ.MARS/libf/phymars/getslopes.F90
r1226 r1266 7 7 8 8 #include "dimensions.h" 9 !#include "dimphys.h"10 !#include "slope.h"11 !#include "comgeomfi.h"12 13 9 14 10 ! This routine computes slope inclination and orientation for the GCM (callslope=.true. in callphys.def) -
trunk/LMDZ.MARS/libf/phymars/growthrate.F
r1226 r1266 20 20 c ------------- 21 21 22 #include "dimensions.h"23 #include "dimphys.h"24 !#include "tracer.h"25 22 #include "microphys.h" 26 23 -
trunk/LMDZ.MARS/libf/phymars/gwprofil.F
r1047 r1266 58 58 C 59 59 60 #include "dimensions.h"61 #include "dimphys.h"62 !#include "dimradmars.h"63 60 integer klon,klev,kidia,kfdia 64 61 #include "yoegwd.h" … … 91 88 92 89 integer ji,jk,jl,ilevh 93 REAL ZDZ2 (NDLO2, nlayermx) , ZNORM(NDLO2) , zoro(NDLO2)94 REAL ZTAU (NDLO2, nlayermx+1)90 REAL ZDZ2 (NDLO2,klev) , ZNORM(NDLO2) , zoro(NDLO2) 91 REAL ZTAU (NDLO2,klev+1) 95 92 C 96 93 C----------------------------------------------------------------------- … … 182 179 c write(*,*) 'ptau' 183 180 c write(*,99) ((ji,ilevh,ptau(ji,ilevh),ji=1,NDLO2), 184 c . ilevh=1, nlayermx+1)181 c . ilevh=1,klev+1) 185 182 99 FORMAT(i3,i3,f15.5) 186 183 -
trunk/LMDZ.MARS/libf/phymars/gwstress.F
r1047 r1266 48 48 implicit none 49 49 #include "dimensions.h" 50 #include "dimphys.h"51 !#include "dimradmars.h"52 50 integer klon,klev,kidia,kfdia 53 51 -
trunk/LMDZ.MARS/libf/phymars/improvedclouds.F
r1226 r1266 35 35 c A. Spiga, optimization (February 2012) 36 36 c------------------------------------------------------------------ 37 !#include "dimensions.h"38 !#include "dimphys.h"39 37 #include "callkeys.h" 40 !#include "tracer.h"41 !#include "comgeomfi.h"42 !#include "dimradmars.h"43 38 #include "microphys.h" 44 !#include "conc.h"45 39 c------------------------------------------------------------------ 46 40 c Inputs: -
trunk/LMDZ.MARS/libf/phymars/ini_archive.F
r1208 r1266 38 38 39 39 #include "dimensions.h" 40 #include "dimphys.h"41 40 #include "paramet.h" 42 41 #include "comconst.h" … … 48 47 #include "description.h" 49 48 #include "serre.h" 50 !#include "control.h"51 !#include"comsoil.h"52 53 49 #include "netcdf.inc" 54 50 -
trunk/LMDZ.MARS/libf/phymars/initracer.F
r1226 r1266 27 27 28 28 29 !#include "dimensions.h"30 !#include "dimphys.h"31 29 #include "callkeys.h" 32 !#include "tracer.h"33 !#include "advtrac.h"34 !#include "comgeomfi.h"35 36 !#include "surfdat.h"37 30 38 31 integer,intent(in) :: ngrid ! number of atmospheric columns -
trunk/LMDZ.MARS/libf/phymars/iniwrite.F
r1226 r1266 23 23 #include "dimensions.h" 24 24 #include "paramet.h" 25 !include "comconst.h"26 25 #include "comvert.h" 27 26 #include "comgeom.h" … … 32 31 #include "description.h" 33 32 #include "serre.h" 34 !#include"dimphys.h"35 !#include"comsoil.h"36 33 37 34 c Arguments: -
trunk/LMDZ.MARS/libf/phymars/iniwritesoil.F90
r1226 r1266 11 11 12 12 #include"dimensions.h" 13 !#include"dimphys.h"14 13 #include"paramet.h" 15 14 #include"comgeom.h" 16 !#include"comsoil.h"17 15 #include"netcdf.inc" 18 16 … … 51 49 endif 52 50 ierr=NF_DEF_DIM(nid,"depth",nsoilmx,idim_depth) 53 ! nsoilmx known from dimphys.h51 ! nsoilmx known from comsoil_h 54 52 if (ierr.ne.NF_NOERR) then 55 53 write(*,*)"iniwritesoil: Error, could not define depth dimension" -
trunk/LMDZ.MARS/libf/phymars/lect_start_archive.F
r1246 r1266 23 23 24 24 #include "dimensions.h" 25 !#include "dimphys.h"26 !#include "surfdat.h"27 !#include "comsoil.h"28 !#include "dimradmars.h"29 25 #include "paramet.h" 30 26 #include "comconst.h" 31 27 #include "comvert.h" 32 28 #include "comgeom2.h" 33 !#include "control.h"34 29 #include "logic.h" 35 30 #include "description.h" 36 31 #include "ener.h" 37 32 #include "temps.h" 38 !#include "lmdstd.h"39 33 #include "netcdf.inc" 40 !#include "tracer.h"41 !#include"advtrac.h"42 34 c======================================================================= 43 35 c Declarations … … 337 329 write(*,*) ' which implies that you want subterranean interpola 338 330 &tion.' 339 write(*,*) ' Otherwise, set nsoilmx -in dimphys.h- to: ',nsoilold331 write(*,*) ' Otherwise, set nsoilmx -in comsoil_h- to: ',nsoilold 340 332 endif 341 333 write(*,*) "time lenght: ",timelen -
trunk/LMDZ.MARS/libf/phymars/lwb.F
r1085 r1266 11 11 implicit none 12 12 13 !#include "dimensions.h"14 !#include "dimphys.h"15 !#include "dimradmars.h"16 !#include "callkeys.h"17 18 !#include "yomlw.h"19 20 13 c---------------------------------------------------------------------- 21 14 c 0.1 arguments -
trunk/LMDZ.MARS/libf/phymars/lwdiff.F
r1246 r1266 10 10 IMPLICIT NONE 11 11 12 !#include "dimensions.h"13 !#include "dimphys.h"14 !#include "dimradmars.h"15 12 #include "callkeys.h" 16 13 17 !#include "yomlw.h"18 14 C----------------------------------------------------------------------- 19 15 C -
trunk/LMDZ.MARS/libf/phymars/lwflux.F
r1047 r1266 15 15 implicit none 16 16 17 18 !#include "dimensions.h"19 !#include "dimphys.h"20 !#include "dimradmars.h"21 17 #include "callkeys.h" 22 18 #include "comg1d.h" 23 24 !#include "yomlw.h"25 19 26 20 c---------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/lwi.F
r1226 r1266 9 9 implicit none 10 10 11 12 !#include "dimensions.h"13 !#include "dimphys.h"14 !#include "dimradmars.h"15 11 #include "comg1d.h" 16 12 #include "callkeys.h" 17 !#include "yomlw.h"18 13 19 14 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC -
trunk/LMDZ.MARS/libf/phymars/lwmain.F
r1246 r1266 17 17 implicit none 18 18 19 !#include "dimensions.h"20 !#include "dimphys.h"21 !#include "dimradmars.h"22 19 #include "callkeys.h" 23 20 #include "comg1d.h" 24 !#include "yomlw.h"25 21 26 22 c---------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/lwtt.F
r1047 r1266 10 10 use yomlw_h, only: ga, gb, cst_voigt 11 11 implicit none 12 13 !#include "dimensions.h"14 !#include "dimphys.h"15 !#include "dimradmars.h"16 !#include "yomlw.h"17 12 18 13 c---------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/lwu.F
r1246 r1266 37 37 implicit none 38 38 39 !#include "dimensions.h"40 !#include "dimphys.h"41 !#include "dimradmars.h"42 43 !#include "yomlw.h"44 45 39 #include "callkeys.h" 46 40 -
trunk/LMDZ.MARS/libf/phymars/lwxb.F
r1047 r1266 36 36 use yomlw_h, only: xi, nlaylte 37 37 implicit none 38 39 !#include "dimensions.h"40 !#include "dimphys.h"41 !#include "dimradmars.h"42 !#include "callkeys.h"43 44 !#include "yomlw.h"45 38 46 39 c---------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/lwxd.F
r1047 r1266 36 36 implicit none 37 37 38 !#include "dimensions.h"39 !#include "dimphys.h"40 !#include "dimradmars.h"41 42 !#include "yomlw.h"43 38 #include "callkeys.h" 44 39 -
trunk/LMDZ.MARS/libf/phymars/lwxn.F
r1047 r1266 74 74 implicit none 75 75 76 !#include "dimensions.h"77 !#include "dimphys.h"78 !#include "dimradmars.h"79 80 !#include "yomlw.h"81 76 #include "callkeys.h" 82 77 -
trunk/LMDZ.MARS/libf/phymars/newcondens.F
r1263 r1266 59 59 c 60 60 #include "dimensions.h" 61 !#include "dimphys.h"62 !#include "surfdat.h"63 !#include "comgeomfi.h"64 61 #include "comvert.h" 65 !#include "paramet.h"66 62 #include "callkeys.h" 67 !#include "tracer.h"68 63 69 64 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/newsedim.F
r1226 r1266 14 14 c declarations: 15 15 c ------------- 16 17 !#include "dimensions.h"18 !#include "dimphys.h"19 16 20 17 c -
trunk/LMDZ.MARS/libf/phymars/newstart.F
r1246 r1266 39 39 #include "dimensions.h" 40 40 integer, parameter :: ngridmx = (2+(jjm-1)*iim - 1/jjm) 41 #include "dimphys.h"42 !#include "surfdat.h"43 !#include "comsoil.h"44 !#include "dimradmars.h"45 41 #include "paramet.h" 46 42 #include "comconst.h" 47 43 #include "comvert.h" 48 44 #include "comgeom2.h" 49 !#include "control.h"50 45 #include "logic.h" 51 46 #include "description.h" 52 47 #include "ener.h" 53 48 #include "temps.h" 54 !#include "lmdstd.h"55 49 #include "comdissnew.h" 56 50 #include "clesph0.h" 57 51 #include "serre.h" 58 52 #include "netcdf.inc" 59 !#include"advtrac.h"60 !#include"tracer.h"61 53 #include "datafile.h" 62 54 c======================================================================= … … 105 97 c variable physique 106 98 c------------------ 107 ! REAL tsurf(ngridmx) ! surface temperature108 ! REAL tsoil(ngridmx,nsoilmx) ! soil temperature109 ! REAL co2ice(ngridmx) ! CO2 ice layer110 ! REAL emis(ngridmx) ! surface emissivity111 ! REAL tauscaling(ngridmx) ! dust conversion factor112 99 REAL tauscadyn(iip1,jjp1) ! dust conversion factor on the dynamics grid 113 ! REAL,ALLOCATABLE :: qsurf(:,:)114 ! REAL q2(ngridmx,nlayermx+1)115 ! REAL rnaturfi(ngridmx)116 100 real alb(iip1,jjp1),albfi(ngridmx) ! albedos 117 101 real ith(iip1,jjp1,nsoilmx),ithfi(ngridmx,nsoilmx) ! thermal inertia (3D) … … 203 187 ! allocate arrays 204 188 allocate(q(iip1,jjp1,llm,nqtot)) 205 ! allocate(qsurf(ngridmx,nqtot)) ! done in ini_surfdat_h206 189 allocate(coefvmr(nqtot)) 207 190 -
trunk/LMDZ.MARS/libf/phymars/nirco2abs.F
r1226 r1266 47 47 c ------------------ 48 48 c 49 !#include "dimensions.h"50 !#include "dimphys.h"51 49 #include "callkeys.h" 52 !#include "comdiurn.h"53 50 #include "nirdata.h" 54 !#include "tracer.h"55 51 56 52 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/nlte_tcool.F
r1260 r1266 34 34 35 35 include "dimensions.h" 36 include "dimphys.h"37 36 include 'nlte_paramdef.h' 38 37 include 'nlte_commons.h' 39 38 include "chimiedata.h" 40 ! include "conc.h"41 39 42 40 … … 1361 1359 @ ( mmean_nlte,cpmean_nlte ) 1362 1360 USE comcstfi_h 1361 use param_v4_h, only: n_avog 1363 1362 implicit none 1364 1363 1365 include 'param.h'1366 1367 1364 c argumentos 1368 real 1369 real 1365 real mmean_nlte,cpmean_nlte 1366 real hrkday_convert 1370 1367 1371 1368 ccccccccccccccccccccccccccccccccccccc -
trunk/LMDZ.MARS/libf/phymars/nltecool.F
r1047 r1266 36 36 #include "nltedata.h" ! (Equivalent to the reading of the "nlte_escape.dat" file) 37 37 #include "dimensions.h" 38 #include "dimphys.h"39 38 #include "chimiedata.h" 40 !#include "conc.h" !Added to have "dynamic composition" in the scheme41 !#include "tracer.h" !"42 39 #include "callkeys.h" 43 40 -
trunk/LMDZ.MARS/libf/phymars/nlthermeq.F
r1047 r1266 10 10 use yomlw_h, only: nlaylte 11 11 implicit none 12 !#include "dimensions.h"13 !#include "dimphys.h"14 !#include "dimradmars.h"15 12 #include "nlteparams.h" 16 !#include "yomlw.h"17 13 #include "callkeys.h" 18 14 -
trunk/LMDZ.MARS/libf/phymars/nuclea.F
r1226 r1266 16 16 17 17 #include "dimensions.h" 18 #include "dimphys.h"19 !#include "tracer.h"20 18 #include "microphys.h" 21 19 -
trunk/LMDZ.MARS/libf/phymars/orodrag.F
r1226 r1266 53 53 C 54 54 C comcstfi.h 55 C dimphys.h56 55 C yoegwd.h 57 56 C … … 76 75 C 77 76 C 78 #include "dimensions.h"79 #include "dimphys.h"80 !#include "dimradmars.h"81 77 integer klon,klev,kidia 82 78 parameter(kidia=1) … … 123 119 real zconb,zabsv,zzd1,ratio,zust,zvst,zdis,ztemp 124 120 C 125 REAL ZTAU(NDLO2, nlayermx+1),126 * ZSTAB(NDLO2, nlayermx+1),127 * ZVPH(NDLO2, nlayermx+1),128 * ZRHO(NDLO2, nlayermx+1),129 * ZRI(NDLO2, nlayermx+1),130 * ZpsI(NDLO2, nlayermx+1),131 * Zzdep(NDLO2, nlayermx)121 REAL ZTAU(NDLO2,klev+1), 122 * ZSTAB(NDLO2,klev+1), 123 * ZVPH(NDLO2,klev+1), 124 * ZRHO(NDLO2,klev+1), 125 * ZRI(NDLO2,klev+1), 126 * ZpsI(NDLO2,klev+1), 127 * Zzdep(NDLO2,klev) 132 128 REAL ZDUDT(NDLO2), 133 129 * ZDVDT(NDLO2), -
trunk/LMDZ.MARS/libf/phymars/orosetup.F
r1226 r1266 51 51 C 52 52 53 #include "dimensions.h"54 #include "dimphys.h"55 !#include "dimradmars.h"56 53 integer klon,klev,kidia,kfdia 57 54 … … 83 80 C 84 81 C 85 LOGICAL LL1(NDLO2, nlayermx+1)82 LOGICAL LL1(NDLO2,klev+1) 86 83 integer kknu(NDLO2),kknu2(NDLO2),kknub(NDLO2),kknul(NDLO2), 87 84 * kentp(NDLO2),ncount(NDLO2) 88 85 C 89 REAL ZHCRIT(NDLO2, nlayermx),ZNCRIT(NDLO2,nlayermx),90 * ZVPF(NDLO2, nlayermx), ZDP(NDLO2,nlayermx)86 REAL ZHCRIT(NDLO2,klev),ZNCRIT(NDLO2,klev), 87 * ZVPF(NDLO2,klev), ZDP(NDLO2,klev) 91 88 REAL ZNORM(NDLO2),zpsi(NDLO2),zb(NDLO2),zc(NDLO2), 92 89 * zulow(NDLO2),zvlow(NDLO2),znup(NDLO2),znum(NDLO2) -
trunk/LMDZ.MARS/libf/phymars/phyetat0.F90
r1246 r1266 21 21 ! June 2013 TN : Possibility to read files with a time axis 22 22 ! November 2013 EM : Enabeling parallel, using iostart module 23 !======================================================================24 !#include "netcdf.inc"25 !#include "dimensions.h"26 !#include "dimphys.h"27 !#include "comgeomfi.h"28 !#include "surfdat.h"29 !#include "dimradmars.h"30 !#include "tracer.h"31 !#include "advtrac.h"32 !#include "control.h"33 23 !====================================================================== 34 24 INTEGER nbsrf !Mars nbsrf a 1 au lieu de 4 -
trunk/LMDZ.MARS/libf/phymars/physiq.F
r1264 r1266 34 34 & obliquit 35 35 USE comcstfi_h, only: r, cpp, mugaz, g, rcp, pi, rad, daysec 36 use param_v4_h, only: nreact,n_avog, 37 & fill_data_thermos, allocate_param_thermos 38 use iono_h, only: allocate_param_iono 36 39 #ifdef MESOSCALE 37 40 use comsoil_h, only: mlayer,layer … … 144 147 145 148 #include "dimensions.h" 146 #include "dimphys.h"147 !#include "comgeomfi.h"148 !#include "surfdat.h"149 !#include "comsoil.h"150 !#include "comdiurn.h"151 149 #include "callkeys.h" 152 !#include "comsaison.h"153 !#include "control.h"154 !#include "dimradmars.h"155 150 #include "comg1d.h" 156 !#include "tracer.h"157 151 #include "nlteparams.h" 158 152 #include "comvert.h" 159 160 153 #include "chimiedata.h" 161 #include "param.h"162 #include "param_v4.h"163 !#include "conc.h"164 165 154 #include "netcdf.inc" 166 167 !#include "slope.h"168 155 169 156 c Arguments : … … 415 402 PRINT*,'check: tracernames ', noms 416 403 PRINT*,'check: emis ',emis(1),emis(ngrid) 417 PRINT*,'check: q2 ',q2(1,1),q2(ngrid,nlayer mx+1)404 PRINT*,'check: q2 ',q2(1,1),q2(ngrid,nlayer+1) 418 405 PRINT*,'check: qsurf ',qsurf(1,1),qsurf(ngrid,nq) 419 406 PRINT*,'check: co2 ',co2ice(1),co2ice(ngrid) … … 463 450 464 451 if (callthermos) then 452 call fill_data_thermos 453 call allocate_param_thermos(nlayer) 454 call allocate_param_iono(nlayer,nreact) 465 455 if(solvarmod.eq.0) call param_read 466 456 if(solvarmod.eq.1) call param_read_e107 … … 884 874 zdqdif(1:ngrid,1,igcm_dust_mass) = 885 875 . -zdqsdif(1:ngrid,igcm_dust_mass) 886 zdqdif(1:ngrid,2:nlayer mx,1:nq) = 0.876 zdqdif(1:ngrid,2:nlayer,1:nq) = 0. 887 877 DO iq=1, nq 888 878 IF ((iq .ne. igcm_dust_mass) -
trunk/LMDZ.MARS/libf/phymars/read_dust_scenario.F90
r1156 r1266 8 8 9 9 #include "dimensions.h" 10 #include "dimphys.h"11 !#include "comgeomfi.h"12 10 #include "datafile.h" 13 11 #include "callkeys.h" -
trunk/LMDZ.MARS/libf/phymars/simpleclouds.F
r1246 r1266 31 31 c of the typical CCN profile, Oct. 2011) 32 32 c------------------------------------------------------------------ 33 !#include "dimensions.h"34 !#include "dimphys.h"35 33 #include "callkeys.h" 36 !#include "tracer.h"37 !#include "comgeomfi.h"38 !#include "dimradmars.h"39 34 40 35 c------------------------------------------------------------------ -
trunk/LMDZ.MARS/libf/phymars/soil.F
r1224 r1266 21 21 22 22 #include "dimensions.h" 23 #include "dimphys.h" 24 25 !#include"comsoil.h" 26 27 !#include"surfdat.h" 28 #include"callkeys.h" 23 #include "callkeys.h" 29 24 30 25 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/soil_tifeedback.F
r1224 r1266 26 26 27 27 #include "dimensions.h" 28 #include "dimphys.h"29 !#include "comsoil.h"30 !#include "tracer.h"31 !#include "surfdat.h"32 28 33 29 c Local variables -
trunk/LMDZ.MARS/libf/phymars/start2archive.F
r1230 r1266 35 35 #include "logic.h" 36 36 #include "temps.h" 37 !#include "control.h"38 37 #include "ener.h" 39 38 #include "description.h" 40 41 !#include "dimphys.h"42 !#include "comsoil.h"43 !#include"advtrac.h"44 39 #include "netcdf.inc" 45 40 -
trunk/LMDZ.MARS/libf/phymars/suaer.F90
r1246 r1266 45 45 #include "callkeys.h" 46 46 #include "datafile.h" 47 !#include "dimensions.h"48 !#include "dimphys.h"49 !#include "dimradmars.h"50 47 51 48 ! Optical properties (read in external ASCII files) -
trunk/LMDZ.MARS/libf/phymars/surfini.F
r1226 r1266 23 23 c ------------- 24 24 #include "dimensions.h" 25 !#include "dimphys.h"26 !#include "surfdat.h"27 25 #include "callkeys.h" 28 !#include "tracer.h"29 !#include "comgeomfi.h"30 31 26 #include "datafile.h" 32 27 -
trunk/LMDZ.MARS/libf/phymars/swmain.F
r1246 r1266 10 10 IMPLICIT NONE 11 11 12 !#include "dimensions.h"13 !#include "dimphys.h"14 !#include "dimradmars.h"15 16 !#include "yomlw.h"17 12 #include "callkeys.h" 18 13 c -
trunk/LMDZ.MARS/libf/phymars/swr_fouquart.F
r1246 r1266 9 9 IMPLICIT NONE 10 10 C 11 !#include "dimensions.h"12 !#include "dimphys.h"13 !#include "dimradmars.h"14 11 #include "callkeys.h" 15 !#include "yomlw.h"16 12 17 13 C … … 382 378 implicit none 383 379 C 384 !#include "dimensions.h"385 !#include "dimphys.h"386 !#include "dimradmars.h"387 380 C 388 381 C**** *DEDD* - DELTA-EDDINGTON IN A CLOUDY LAYER -
trunk/LMDZ.MARS/libf/phymars/swr_toon.F
r1246 r1266 10 10 IMPLICIT NONE 11 11 C 12 !#include "dimensions.h"13 !#include "dimphys.h"14 !#include "dimradmars.h"15 12 #include "callkeys.h" 16 !#include "yomaer.h"17 !#include "yomlw.h"18 13 19 14 C -
trunk/LMDZ.MARS/libf/phymars/tabfi.F
r1246 r1266 34 34 c comparer avec le day_ini dynamique) 35 35 c 36 c - lmax: tab_cntrl(tab0+2) (pour test avec nlayer mx)36 c - lmax: tab_cntrl(tab0+2) (pour test avec nlayer) 37 37 c 38 38 c - p_rad … … 54 54 implicit none 55 55 56 !#include "dimensions.h"57 !#include "dimphys.h"58 !#include "comgeomfi.h"59 !#include "surfdat.h"60 !#include "comsoil.h"61 56 #include "netcdf.inc" 62 !#include "dimradmars.h"63 57 64 58 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/testphys1d.F
r1246 r1266 41 41 42 42 #include "dimensions.h" 43 #include "dimphys.h"44 43 integer, parameter :: ngrid = 1 !(2+(jjm-1)*iim - 1/jjm) 44 integer, parameter :: nlayer = llm 45 45 !#include "dimradmars.h" 46 46 !#include "comgeomfi.h" … … 72 72 REAL day ! date durant le run 73 73 REAL time ! time (0<time<1 ; time=0.5 a midi) 74 REAL play(nlayer mx) ! Pressure at the middle of the layers (Pa)75 REAL plev(nlayer mx+1) ! intermediate pressure levels (pa)74 REAL play(nlayer) ! Pressure at the middle of the layers (Pa) 75 REAL plev(nlayer+1) ! intermediate pressure levels (pa) 76 76 REAL psurf,tsurf(1) 77 REAL u(nlayer mx),v(nlayermx) ! zonal, meridional wind77 REAL u(nlayer),v(nlayer) ! zonal, meridional wind 78 78 REAL gru,grv ! prescribed "geostrophic" background wind 79 REAL temp(nlayer mx) ! temperature at the middle of the layers79 REAL temp(nlayer) ! temperature at the middle of the layers 80 80 REAL,ALLOCATABLE :: q(:,:) ! tracer mixing ratio (e.g. kg/kg) 81 81 REAL,ALLOCATABLE :: qsurf(:) ! tracer surface budget (e.g. kg.m-2) … … 83 83 REAL co2ice(1) ! co2ice layer (kg.m-2) 84 84 REAL emis(1) ! surface layer 85 REAL q2(nlayer mx+1) ! Turbulent Kinetic Energy86 REAL zlay(nlayer mx) ! altitude estimee dans les couches (km)85 REAL q2(nlayer+1) ! Turbulent Kinetic Energy 86 REAL zlay(nlayer) ! altitude estimee dans les couches (km) 87 87 88 88 c Physical and dynamical tandencies (e.g. m.s-2, K/s, Pa/s) 89 REAL du(nlayer mx),dv(nlayermx),dtemp(nlayermx)90 REAL dudyn(nlayer mx),dvdyn(nlayermx),dtempdyn(nlayermx)89 REAL du(nlayer),dv(nlayer),dtemp(nlayer) 90 REAL dudyn(nlayer),dvdyn(nlayer),dtempdyn(nlayer) 91 91 REAL dpsurf 92 92 REAL,ALLOCATABLE :: dq(:,:) … … 96 96 INTEGER thermo 97 97 REAL zls 98 REAL phi(nlayer mx),h(nlayermx),s(nlayermx)99 REAL pks, ptif, w(nlayer mx)98 REAL phi(nlayer),h(nlayer),s(nlayer) 99 REAL pks, ptif, w(nlayer) 100 100 REAL qtotinit,qtot 101 101 real,allocatable :: mqtot(:) 102 102 INTEGER ierr, aslun 103 REAL tmp1(0:nlayer mx),tmp2(0:nlayermx)103 REAL tmp1(0:nlayer),tmp2(0:nlayer) 104 104 Logical tracerdyn 105 105 integer :: nq=1 ! number of tracers … … 212 212 ! allocate arrays: 213 213 allocate(tname(nq)) 214 allocate(q(nlayer mx,nq))214 allocate(q(nlayer,nq)) 215 215 allocate(qsurf(nq)) 216 allocate(dq(nlayer mx,nq))217 allocate(dqdyn(nlayer mx,nq))216 allocate(dq(nlayer,nq)) 217 allocate(dqdyn(nlayer,nq)) 218 218 allocate(mqtot(nq)) 219 219 … … 247 247 if (ierr.eq.0) then 248 248 read(91,*) qsurf(iq) 249 do ilayer=1,nlayer mx249 do ilayer=1,nlayer 250 250 read(91,*) q(ilayer,iq) 251 251 enddo … … 262 262 if (ierr.eq.0) then 263 263 read(91,*) qsurf(iq) 264 do ilayer=1,nlayer mx264 do ilayer=1,nlayer 265 265 read(91,*) q(ilayer,iq) 266 266 enddo … … 278 278 if (ierr.eq.0) then 279 279 read(91,*) qsurf(iq) 280 do ilayer=1,nlayer mx280 do ilayer=1,nlayer 281 281 read(91,*) q(ilayer,iq) 282 282 enddo … … 293 293 if (ierr.eq.0) then 294 294 read(91,*) qsurf(iq) 295 do ilayer=1,nlayer mx295 do ilayer=1,nlayer 296 296 read(91,*) q(ilayer,iq) 297 297 enddo … … 313 313 if (ierr.eq.0) then 314 314 read(91,*) qsurf(iq) 315 do ilayer=1,nlayer mx315 do ilayer=1,nlayer 316 316 read(91,*) q(ilayer,iq) 317 317 ! write(*,*) "l=",ilayer," q(ilayer,iq)=",q(ilayer,iq) … … 329 329 if (ierr.eq.0) then 330 330 read(91,*) qsurf(iq) 331 do ilayer=1,nlayer mx331 do ilayer=1,nlayer 332 332 read(91,*) q(ilayer,iq) 333 333 enddo … … 345 345 if (ierr.eq.0) then 346 346 read(91,*) qsurf(iq) 347 do ilayer=1,nlayer mx347 do ilayer=1,nlayer 348 348 read(91,*) q(ilayer,iq) 349 349 enddo … … 360 360 if (ierr.eq.0) then 361 361 read(91,*) qsurf(iq) 362 do ilayer=1,nlayer mx362 do ilayer=1,nlayer 363 363 read(91,*) q(ilayer,iq) 364 364 enddo … … 375 375 ! allocate arrays: 376 376 allocate(tname(nq)) 377 allocate(q(nlayer mx,nq))377 allocate(q(nlayer,nq)) 378 378 allocate(qsurf(nq)) 379 allocate(dq(nlayer mx,nq))380 allocate(dqdyn(nlayer mx,nq))379 allocate(dq(nlayer,nq)) 380 allocate(dqdyn(nlayer,nq)) 381 381 allocate(mqtot(nq)) 382 382 do iq=1,nq … … 410 410 c -------------- 411 411 c 412 nlayer=nlayermx413 412 nlevel=nlayer+1 414 413 nsoil=nsoilmx -
trunk/LMDZ.MARS/libf/phymars/updaterad.F90
r1226 r1266 65 65 USE comcstfi_h 66 66 implicit none 67 68 #include "dimensions.h"69 #include "dimphys.h"70 !#include "tracer.h"71 67 72 68 real, intent(in) :: qice,qccn,nccn … … 122 118 USE comcstfi_h 123 119 implicit none 124 125 #include "dimensions.h"126 #include "dimphys.h"127 !#include "tracer.h"128 120 129 121 real, intent(in) :: qice … … 181 173 implicit none 182 174 183 #include "dimensions.h"184 #include "dimphys.h"185 !#include "tracer.h"186 187 175 real, intent(in) :: qdust,ndust ! needed if doubleq 188 176 real, intent(in), optional :: tauscaling ! useful for realistic thresholds … … 237 225 implicit none 238 226 239 #include "dimensions.h"240 #include "dimphys.h"241 !#include "tracer.h"242 243 227 real, intent(in) :: qccn,nccn ! needed if doubleq 244 228 real, intent(in), optional :: tauscaling ! useful for realistic thresholds -
trunk/LMDZ.MARS/libf/phymars/updatereffrad.F
r1246 r1266 35 35 c ------------- 36 36 c 37 !#include "dimensions.h"38 !#include "dimphys.h"39 37 #include "callkeys.h" 40 !#include "dimradmars.h"41 !#include "tracer.h"42 !#include "yomaer.h"43 38 44 39 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/vdif_kc.F
r1130 r1266 5 5 IMPLICIT NONE 6 6 c....................................................................... 7 !#include "dimensions.h"8 !#include "dimphys.h"9 !#include "tracer.h"10 7 #include "callkeys.h" 11 8 c....................................................................... -
trunk/LMDZ.MARS/libf/phymars/vdifc.F
r1242 r1266 36 36 c ------------- 37 37 38 !#include "dimensions.h"39 !#include "dimphys.h"40 38 #include "callkeys.h" 41 !#include "surfdat.h"42 !#include "comgeomfi.h"43 !#include "tracer.h"44 39 #include "microphys.h" 45 40 -
trunk/LMDZ.MARS/libf/phymars/vlz_fi.F
r1047 r1266 16 16 IMPLICIT NONE 17 17 c 18 !#include "dimensions.h"19 !#include "dimphys.h"20 18 21 19 c -
trunk/LMDZ.MARS/libf/phymars/watercloud.F
r1246 r1266 36 36 c ------------- 37 37 38 !#include "dimensions.h"39 !#include "dimphys.h"40 38 #include "callkeys.h" 41 !#include "tracer.h"42 !#include "comgeomfi.h"43 !#include "dimradmars.h"44 39 45 40 c Inputs: -
trunk/LMDZ.MARS/libf/phymars/write_archive.F
r1208 r1266 36 36 37 37 #include "dimensions.h" 38 #include "dimphys.h"39 38 #include "paramet.h" 40 39 !#include "control.h" -
trunk/LMDZ.MARS/libf/phymars/writediagfi.F
r1130 r1266 48 48 ! Commons 49 49 #include "dimensions.h" 50 !#include "dimphys.h"51 50 #include "paramet.h" 52 !#include "control.h"53 51 #include "comvert.h" 54 52 #include "comgeom.h" … … 56 54 #include "netcdf.inc" 57 55 #include "temps.h" 58 !#include "surfdat.h"59 56 60 57 ! Arguments on input: -
trunk/LMDZ.MARS/libf/phymars/writediagsoil.F90
r1130 r1266 20 20 21 21 #include"dimensions.h" 22 !#include"dimphys.h"23 22 #include"paramet.h" 24 23 !#include"control.h" -
trunk/LMDZ.MARS/libf/phymars/wstats.F90
r1130 r1266 7 7 8 8 #include "dimensions.h" 9 #include "dimphys.h"10 9 #include "comconst.h" 11 10 #include "statto.h" … … 293 292 294 293 include "dimensions.h" 295 include "dimphys.h"296 294 include "netcdf.inc" 297 295 -
trunk/LMDZ.MARS/libf/phymars/yamada4.F
r1224 r1266 16 16 !....................................................................... 17 17 ! MARS 18 #include "dimensions.h"19 #include "dimphys.h"20 !#include "tracer.h"21 18 #include "callkeys.h" 22 19 !....................................................................... … … 608 605 !....................................................................... 609 606 ! MARS 610 #include "dimensions.h"611 #include "dimphys.h"612 !#include "tracer.h"613 607 #include "callkeys.h" 614 608 !....................................................................... … … 689 683 !....................................................................... 690 684 ! MARS 691 #include "dimensions.h"692 #include "dimphys.h"693 !#include "tracer.h"694 685 #include "callkeys.h" 695 686 !.......................................................................
Note: See TracChangeset
for help on using the changeset viewer.