Changeset 1918 for trunk/LMDZ.MARS/libf
- Timestamp:
- Apr 12, 2018, 8:35:48 AM (7 years ago)
- Location:
- trunk/LMDZ.MARS/libf
- Files:
-
- 1 deleted
- 19 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F90
r1660 r1918 5 5 USE vertical_layers_mod, ONLY: aps,bps 6 6 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev 7 USE datafile_mod, ONLY: datadir 7 8 implicit none 8 9 … … 36 37 37 38 include "callkeys.h" 38 include "datafile.h"39 39 40 40 ! inputs : … … 454 454 ! 2.1 open initialization files 455 455 456 open(210, iostat=ierr,file=trim(data file)//'/atmosfera_LMD_may.dat')456 open(210, iostat=ierr,file=trim(datadir)//'/atmosfera_LMD_may.dat') 457 457 if (ierr /= 0) then 458 458 write(*,*)'Error : cannot open file atmosfera_LMD_may.dat ' 459 459 write(*,*)'(in aeronomars/inichim_newstart.F)' 460 write(*,*)'It should be in :', trim(data file),'/'460 write(*,*)'It should be in :', trim(datadir),'/' 461 461 write(*,*)'1) You can change this path in callphys.def with' 462 462 write(*,*)' datadir=/path/to/datafiles/' … … 466 466 stop 467 467 end if 468 open(220, iostat=ierr,file=trim(data file)//'/atmosfera_LMD_min.dat')468 open(220, iostat=ierr,file=trim(datadir)//'/atmosfera_LMD_min.dat') 469 469 if (ierr /= 0) then 470 470 write(*,*)'Error : cannot open file atmosfera_LMD_min.dat ' 471 471 write(*,*)'(in aeronomars/inichim_newstart.F)' 472 write(*,*)'It should be in :', trim(data file),'/'472 write(*,*)'It should be in :', trim(datadir),'/' 473 473 write(*,*)'1) You can change this path in callphys.def with' 474 474 write(*,*)' datadir=/path/to/datafiles/' … … 479 479 end if 480 480 if(flagnitro) then 481 open(230, iostat=ierr,file=trim(data file)//'/atmosfera_LMD_nitr.dat')481 open(230, iostat=ierr,file=trim(datadir)//'/atmosfera_LMD_nitr.dat') 482 482 if (ierr.ne.0) then 483 483 write(*,*)'Error : cannot open file atmosfera_LMD_nitr.dat ' 484 484 write(*,*)'(in aeronomars/inichim_newstart.F)' 485 write(*,*)'It should be in :', datafile486 write(*,*)'1) You can change this directory address in'487 write(*,*)' file phymars/datafile.h'485 write(*,*)'It should be in :', trim(datadir),'/' 486 write(*,*)'1) You can change this path in callphys.def with' 487 write(*,*)' datadir=/path/to/datafiles/' 488 488 write(*,*)'2) If necessary atmosfera_LMD_nitr.dat (and others)' 489 489 write(*,*)' can be obtained online on:' -
trunk/LMDZ.MARS/libf/aeronomars/param_read.F
r1381 r1918 14 14 . fluxtop,ct1,ct2,p1,p2 15 15 16 use datafile_mod, only: datadir 17 16 18 implicit none 17 19 18 19 c common variables and constants20 include 'datafile.h'21 22 20 23 21 c local variables … … 34 32 !Tabulated column amount 35 33 open(210, status = 'old', 36 c $file=trim(data file)//'/EUVDAT/coln.dat',iostat=ierr)37 $file=trim(data file)//'/EUVDAT/param_v5/coln.dat',iostat=ierr)34 c $file=trim(datadir)//'/EUVDAT/coln.dat',iostat=ierr) 35 $file=trim(datadir)//'/EUVDAT/param_v5/coln.dat',iostat=ierr) 38 36 39 37 IF (ierr.NE.0) THEN 40 38 write(*,*)'cant find directory EUVDAT containing param_v5 subdir' 41 39 write(*,*)'(in aeronomars/param_read.F)' 42 write(*,*)'It should be in :', trim(data file),'/'40 write(*,*)'It should be in :', trim(datadir),'/' 43 41 write(*,*)'1) You can change this directory address in ' 44 42 write(*,*)' callphys.def with datadir=/path/to/dir' … … 50 48 51 49 !Tabulated photoabsorption coefficients 52 open(220,file=trim(data file)//'/EUVDAT/param_v5/j2_an.dat')53 open(230,file=trim(data file)//'/EUVDAT/param_v5/j3_an.dat')54 open(240,file=trim(data file)//'/EUVDAT/param_v5/j1_an.dat')55 open(250,file=trim(data file)//'/EUVDAT/param_v5/j2_bn.dat')56 open(260,file=trim(data file)//'/EUVDAT/param_v5/j2_cn.dat')57 open(300,file=trim(data file)//'/EUVDAT//param_v5/j2_dn.dat')58 open(270,file=trim(data file)//'/EUVDAT//param_v5/j1_bn.dat')59 open(280,file=trim(data file)//'/EUVDAT//param_v5/j1_cn.dat')60 open(290,file=trim(data file)//'/EUVDAT//param_v5/j1_dn.dat')61 open(150,file=trim(data file)//'/EUVDAT//param_v5/j4n.dat')62 open(160,file=trim(data file)//'/EUVDAT//param_v5/j5n.dat')63 open(170,file=trim(data file)//'/EUVDAT//param_v5/j6n.dat')64 open(180,file=trim(data file)//'/EUVDAT//param_v5/j7n.dat')65 open(390,file=trim(data file)//'/EUVDAT//param_v5/j8_an.dat')66 open(400,file=trim(data file)//'/EUVDAT//param_v5/j8_bn.dat')67 open(410,file=trim(data file)//'/EUVDAT//param_v5/j9n.dat')68 open(420,file=trim(data file)//'/EUVDAT//param_v5/j10_an.dat')69 open(430,file=trim(data file)//'/EUVDAT//param_v5/j10_bn.dat')70 open(440,file=trim(data file)//'/EUVDAT//param_v5/j10_cn.dat')71 open(450,file=trim(data file)//'/EUVDAT//param_v5/j11_an.dat')72 open(460,file=trim(data file)//'/EUVDAT//param_v5/j11_bn.dat')73 open(470,file=trim(data file)//'/EUVDAT//param_v5/j11_cn.dat')74 open(480,file=trim(data file)//'/EUVDAT//param_v5/j12n.dat')75 open(490,file=trim(data file)//'/EUVDAT//param_v5/j13_an.dat')76 open(500,file=trim(data file)//'/EUVDAT//param_v5/j13_bn.dat')77 open(510,file=trim(data file)//'/EUVDAT//param_v5/j13_cn.dat')50 open(220,file=trim(datadir)//'/EUVDAT/param_v5/j2_an.dat') 51 open(230,file=trim(datadir)//'/EUVDAT/param_v5/j3_an.dat') 52 open(240,file=trim(datadir)//'/EUVDAT/param_v5/j1_an.dat') 53 open(250,file=trim(datadir)//'/EUVDAT/param_v5/j2_bn.dat') 54 open(260,file=trim(datadir)//'/EUVDAT/param_v5/j2_cn.dat') 55 open(300,file=trim(datadir)//'/EUVDAT//param_v5/j2_dn.dat') 56 open(270,file=trim(datadir)//'/EUVDAT//param_v5/j1_bn.dat') 57 open(280,file=trim(datadir)//'/EUVDAT//param_v5/j1_cn.dat') 58 open(290,file=trim(datadir)//'/EUVDAT//param_v5/j1_dn.dat') 59 open(150,file=trim(datadir)//'/EUVDAT//param_v5/j4n.dat') 60 open(160,file=trim(datadir)//'/EUVDAT//param_v5/j5n.dat') 61 open(170,file=trim(datadir)//'/EUVDAT//param_v5/j6n.dat') 62 open(180,file=trim(datadir)//'/EUVDAT//param_v5/j7n.dat') 63 open(390,file=trim(datadir)//'/EUVDAT//param_v5/j8_an.dat') 64 open(400,file=trim(datadir)//'/EUVDAT//param_v5/j8_bn.dat') 65 open(410,file=trim(datadir)//'/EUVDAT//param_v5/j9n.dat') 66 open(420,file=trim(datadir)//'/EUVDAT//param_v5/j10_an.dat') 67 open(430,file=trim(datadir)//'/EUVDAT//param_v5/j10_bn.dat') 68 open(440,file=trim(datadir)//'/EUVDAT//param_v5/j10_cn.dat') 69 open(450,file=trim(datadir)//'/EUVDAT//param_v5/j11_an.dat') 70 open(460,file=trim(datadir)//'/EUVDAT//param_v5/j11_bn.dat') 71 open(470,file=trim(datadir)//'/EUVDAT//param_v5/j11_cn.dat') 72 open(480,file=trim(datadir)//'/EUVDAT//param_v5/j12n.dat') 73 open(490,file=trim(datadir)//'/EUVDAT//param_v5/j13_an.dat') 74 open(500,file=trim(datadir)//'/EUVDAT//param_v5/j13_bn.dat') 75 open(510,file=trim(datadir)//'/EUVDAT//param_v5/j13_cn.dat') 78 76 79 77 … … 228 226 229 227 !Parameters for the variation of the solar flux with 11 years cycle 230 open(100,file=trim(data file)//'/EUVDAT/param_v5/varflujo.dat')228 open(100,file=trim(datadir)//'/EUVDAT/param_v5/varflujo.dat') 231 229 read(100,*) 232 230 do i=1,24 … … 266 264 c CO2, O2, NO 267 265 268 open(120,file=trim(data file)//'/EUVDAT/param_v5/efdis_inter.dat')266 open(120,file=trim(datadir)//'/EUVDAT/param_v5/efdis_inter.dat') 269 267 read(120,*) 270 268 ! do i=1,21 -
trunk/LMDZ.MARS/libf/aeronomars/param_read_e107.F
r1888 r1918 16 16 . fluxtop,ct1,ct2,p1,p2 17 17 18 use datafile_mod, only: datadir 19 18 20 implicit none 19 21 20 22 21 23 c common variables and constants 22 include 'datafile.h'23 24 include "callkeys.h" 24 25 … … 39 40 !Tabulated column amount 40 41 open(210, status = 'old', 41 c $file=trim(data file)//'/EUVDAT/coln.dat',iostat=ierr)42 $file=trim(data file)//'/EUVDAT/param_v6/coln.dat',iostat=ierr)42 c $file=trim(datadir)//'/EUVDAT/coln.dat',iostat=ierr) 43 $file=trim(datadir)//'/EUVDAT/param_v6/coln.dat',iostat=ierr) 43 44 44 45 IF (ierr.NE.0) THEN 45 46 write(*,*)'cant find directory EUVDAT containing param_v6 subdir' 46 47 write(*,*)'(in aeronomars/param_read.F)' 47 write(*,*)'It should be in :', trim(data file),'/'48 write(*,*)'It should be in :', trim(datadir),'/' 48 49 write(*,*)'1) You can change this directory address in ' 49 50 write(*,*)' callphys.def with datadir=/path/to/dir' … … 55 56 56 57 !Tabulated photoabsorption coefficients 57 open(220,file=trim(data file)//'/EUVDAT/param_v6/trans2_an.dat')58 open(230,file=trim(data file)//'/EUVDAT/param_v6/trans3_an.dat')59 open(240,file=trim(data file)//'/EUVDAT/param_v6/trans1_an.dat')60 open(250,file=trim(data file)//'/EUVDAT/param_v6/trans2_bn.dat')61 open(260,file=trim(data file)//'/EUVDAT/param_v6/trans2_cn.dat')62 open(300,file=trim(data file)//'/EUVDAT/param_v6/trans2_dn.dat')63 open(270,file=trim(data file)//'/EUVDAT/param_v6/trans1_bn.dat')64 open(280,file=trim(data file)//'/EUVDAT/param_v6/trans1_cn.dat')65 open(290,file=trim(data file)//'/EUVDAT/param_v6/trans1_dn.dat')66 open(150,file=trim(data file)//'/EUVDAT/param_v6/trans4n.dat')67 open(160,file=trim(data file)//'/EUVDAT/param_v6/trans5n.dat')68 open(170,file=trim(data file)//'/EUVDAT/param_v6/trans6n.dat')69 open(180,file=trim(data file)//'/EUVDAT/param_v6/trans7n.dat')70 open(390,file=trim(data file)//'/EUVDAT/param_v6/trans8_an.dat')71 open(400,file=trim(data file)//'/EUVDAT/param_v6/trans8_bn.dat')72 open(410,file=trim(data file)//'/EUVDAT/param_v6/trans9n.dat')73 open(420,file=trim(data file)//'/EUVDAT/param_v6/trans10_an.dat')74 open(430,file=trim(data file)//'/EUVDAT/param_v6/trans10_bn.dat')75 open(440,file=trim(data file)//'/EUVDAT/param_v6/trans10_cn.dat')76 open(450,file=trim(data file)//'/EUVDAT/param_v6/trans11_an.dat')77 open(460,file=trim(data file)//'/EUVDAT/param_v6/trans11_bn.dat')78 open(470,file=trim(data file)//'/EUVDAT/param_v6/trans11_cn.dat')79 open(480,file=trim(data file)//'/EUVDAT/param_v6/trans12n.dat')80 open(490,file=trim(data file)//'/EUVDAT/param_v6/trans13_an.dat')81 open(500,file=trim(data file)//'/EUVDAT/param_v6/trans13_bn.dat')82 open(510,file=trim(data file)//'/EUVDAT/param_v6/trans13_cn.dat')58 open(220,file=trim(datadir)//'/EUVDAT/param_v6/trans2_an.dat') 59 open(230,file=trim(datadir)//'/EUVDAT/param_v6/trans3_an.dat') 60 open(240,file=trim(datadir)//'/EUVDAT/param_v6/trans1_an.dat') 61 open(250,file=trim(datadir)//'/EUVDAT/param_v6/trans2_bn.dat') 62 open(260,file=trim(datadir)//'/EUVDAT/param_v6/trans2_cn.dat') 63 open(300,file=trim(datadir)//'/EUVDAT/param_v6/trans2_dn.dat') 64 open(270,file=trim(datadir)//'/EUVDAT/param_v6/trans1_bn.dat') 65 open(280,file=trim(datadir)//'/EUVDAT/param_v6/trans1_cn.dat') 66 open(290,file=trim(datadir)//'/EUVDAT/param_v6/trans1_dn.dat') 67 open(150,file=trim(datadir)//'/EUVDAT/param_v6/trans4n.dat') 68 open(160,file=trim(datadir)//'/EUVDAT/param_v6/trans5n.dat') 69 open(170,file=trim(datadir)//'/EUVDAT/param_v6/trans6n.dat') 70 open(180,file=trim(datadir)//'/EUVDAT/param_v6/trans7n.dat') 71 open(390,file=trim(datadir)//'/EUVDAT/param_v6/trans8_an.dat') 72 open(400,file=trim(datadir)//'/EUVDAT/param_v6/trans8_bn.dat') 73 open(410,file=trim(datadir)//'/EUVDAT/param_v6/trans9n.dat') 74 open(420,file=trim(datadir)//'/EUVDAT/param_v6/trans10_an.dat') 75 open(430,file=trim(datadir)//'/EUVDAT/param_v6/trans10_bn.dat') 76 open(440,file=trim(datadir)//'/EUVDAT/param_v6/trans10_cn.dat') 77 open(450,file=trim(datadir)//'/EUVDAT/param_v6/trans11_an.dat') 78 open(460,file=trim(datadir)//'/EUVDAT/param_v6/trans11_bn.dat') 79 open(470,file=trim(datadir)//'/EUVDAT/param_v6/trans11_cn.dat') 80 open(480,file=trim(datadir)//'/EUVDAT/param_v6/trans12n.dat') 81 open(490,file=trim(datadir)//'/EUVDAT/param_v6/trans13_an.dat') 82 open(500,file=trim(datadir)//'/EUVDAT/param_v6/trans13_bn.dat') 83 open(510,file=trim(datadir)//'/EUVDAT/param_v6/trans13_cn.dat') 83 84 84 85 … … 233 234 234 235 !Parameters for the variation of the solar flux with 11 years cycle 235 open(620,file=trim(data file)//'/EUVDAT/param_v6/fit_js_e107.dat')236 open(620,file=trim(datadir)//'/EUVDAT/param_v6/fit_js_e107.dat') 236 237 do i=1,ninter 237 238 read(620,*) … … 274 275 endif 275 276 276 open(640,file=trim(data file)//'/EUVDAT/param_v6/'//filename)277 open(640,file=trim(datadir)//'/EUVDAT/param_v6/'//filename) 277 278 read(640,*) 278 279 do i=1,669 … … 316 317 c CO2, O2, NO 317 318 318 ! open(120,file=trim(data file)//'/EUVDAT/param_v5/efdis_inter.dat')319 ! open(120,file=trim(datadir)//'/EUVDAT/param_v5/efdis_inter.dat') 319 320 ! read(120,*) 320 321 !! do i=1,21 … … 375 376 376 377 !4 possible channels for CO2 ionization 377 open(130,file=trim(data file)//'/EUVDAT'//378 open(130,file=trim(datadir)//'/EUVDAT'// 378 379 $ '/co2ion_branchingratio_schunkandnagy2000_param.dat') 379 380 do inter=1,16 … … 408 409 409 410 !2 possible channels for O2 ionization 410 open(131,file=trim(data file)//'/EUVDAT'//411 open(131,file=trim(datadir)//'/EUVDAT'// 411 412 $ '/o2ion_branchingratio_schunkandnagy2000_param.dat') 412 413 do inter=1,23 … … 430 431 431 432 !2 channels for N2 ionization 432 open(132,file=trim(data file)//'/EUVDAT'//433 open(132,file=trim(datadir)//'/EUVDAT'// 433 434 $ '/n2ion_branchingratio_schunkandnagy2000_param.dat') 434 435 do inter=1,15 … … 453 454 454 455 !3 channels for CO ionization 455 open(133,file=trim(data file)//'/EUVDAT'//456 open(133,file=trim(datadir)//'/EUVDAT'// 456 457 $ '/coion_branchingratio_schunkandnagy2000_param.dat') 457 458 do inter=1,16 -
trunk/LMDZ.MARS/libf/aeronomars/read_phototable.F90
r1430 r1918 21 21 !*********************************************************************** 22 22 23 use ioipsl_getincom 23 use ioipsl_getincom, only: getin 24 use datafile_mod, only: datadir 24 25 25 26 implicit none 26 27 27 #include "chimiedata.h" 28 #include "datafile.h" 28 include "chimiedata.h" 29 29 30 30 !ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc … … 50 50 51 51 open(fic, form = 'formatted', status = 'old', & 52 file =trim(data file)//"/"//trim(phototable),iostat=ierr)52 file =trim(datadir)//"/"//trim(phototable),iostat=ierr) 53 53 54 54 if (ierr /= 0) THEN 55 55 write(*,*)'Error : cannot open photolysis lookup table ', trim(phototable) 56 write(*,*)'It should be in :',trim(data file),'/'56 write(*,*)'It should be in :',trim(datadir),'/' 57 57 write(*,*)'1) You can change this directory in callphys.def' 58 58 write(*,*)' with:' -
trunk/LMDZ.MARS/libf/dynlonlat_phylonlat/phymars/datareadnc.F
r1422 r1918 45 45 use ioipsl_getincom 46 46 USE comconst_mod, ONLY: g,pi 47 use datafile_mod, only: datadir 47 48 48 49 implicit none 49 50 50 #include "dimensions.h" 51 #include "paramet.h" 52 #include "comgeom.h" 53 #include "netcdf.inc" 54 #include "datafile.h" 51 include "dimensions.h" 52 include "paramet.h" 53 include "comgeom.h" 54 include "netcdf.inc" 55 55 56 56 c======================================================================= … … 113 113 write(*,*) 'datareadnc: opening file surface.nc' 114 114 115 data file="/u/lmdz/WWW/planets/mars/datadir" ! default path to surface.nc116 call getin("datadir",data file) ! but users may specify another path115 datadir="/u/lmdz/WWW/planets/mars/datadir" ! default path to surface.nc 116 call getin("datadir",datadir) ! but users may specify another path 117 117 118 ierr = NF_OPEN (trim(data file)//'/surface.nc',118 ierr = NF_OPEN (trim(datadir)//'/surface.nc', 119 119 & NF_NOWRITE,unit) 120 120 IF (ierr.NE.NF_NOERR) THEN 121 121 write(*,*)'Error : cannot open file surface.nc ' 122 122 write(*,*)'(in phymars/datareadnc.F)' 123 write(*,*)'It should be in :',trim(data file),'/'123 write(*,*)'It should be in :',trim(datadir),'/' 124 124 write(*,*)'1) You can set this path in the 125 125 & callphys.def file:' … … 210 210 if (ierr.ne.nf_noerr) then 211 211 write(*,*) 'datareadnc error, cannot find ',trim(string(k)) 212 write(*,*) ' in file ',trim(data file),'/surface.nc'212 write(*,*) ' in file ',trim(datadir),'/surface.nc' 213 213 stop 214 214 endif -
trunk/LMDZ.MARS/libf/dynlonlat_phylonlat/phymars/newstart.F
r1711 r1918 51 51 #include "clesph0.h" 52 52 #include "netcdf.inc" 53 #include "datafile.h"54 53 c======================================================================= 55 54 c Declarations … … 1680 1679 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1681 1680 subroutine load_MONS_data(MONS_Hdn,MONS_d21) 1681 1682 use datafile_mod, only:datadir 1683 1682 1684 implicit none 1683 1685 ! routine to load Benedicte Diez MONS dataset, fill in date in southern 1684 1686 ! polar region, and interpolate the result onto the GCM grid 1685 #include"dimensions.h" 1686 #include"paramet.h" 1687 #include"datafile.h" 1688 #include"comgeom.h" 1687 include"dimensions.h" 1688 include"paramet.h" 1689 include"comgeom.h" 1689 1690 ! arguments: 1690 1691 real,intent(out) :: MONS_Hdn(iip1,jjp1) ! Hdn: %WEH=Mass fraction of H2O … … 1715 1716 1716 1717 ! Open MONS datafile: 1717 open(42,file=trim(data file)//"/"//trim(filename),1718 open(42,file=trim(datadir)//"/"//trim(filename), 1718 1719 & status="old",iostat=ierr) 1719 1720 if (ierr/=0) then 1720 1721 write(*,*) "Error in load_MONS_data:" 1721 1722 write(*,*) "Failed opening file ", 1722 & trim(datafile)//"/"//trim(filename) 1723 write(*,*)'1) You can change the path to the file in ' 1724 write(*,*)' file phymars/datafile.h' 1723 & trim(datadir)//"/"//trim(filename) 1724 write(*,*)'1) You can change this directory address in ', 1725 & 'callfis.def with' 1726 write(*,*)' datadir=/path/to/datafiles' 1725 1727 write(*,*)'2) If necessary ',trim(filename), 1726 1728 & ' (and other datafiles)' -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/datareadnc.F
r1422 r1918 42 42 c======================================================================= 43 43 44 ! to use 'getin' 45 use ioipsl_getincom 44 use ioipsl_getincom, only: getin 46 45 USE comconst_mod, ONLY: g,pi 46 use datafile_mod, only: datadir 47 47 48 48 implicit none 49 49 50 #include "dimensions.h" 51 #include "paramet.h" 52 #include "comgeom.h" 53 #include "netcdf.inc" 54 #include "datafile.h" 50 include "dimensions.h" 51 include "paramet.h" 52 include "comgeom.h" 53 include "netcdf.inc" 55 54 56 55 c======================================================================= … … 113 112 write(*,*) 'datareadnc: opening file surface.nc' 114 113 115 data file="/u/lmdz/WWW/planets/mars/datadir" ! default path to surface.nc116 call getin("datadir",data file) ! but users may specify another path114 datadir="/u/lmdz/WWW/planets/mars/datadir" ! default path to surface.nc 115 call getin("datadir",datadir) ! but users may specify another path 117 116 118 ierr = NF_OPEN (trim(data file)//'/surface.nc',117 ierr = NF_OPEN (trim(datadir)//'/surface.nc', 119 118 & NF_NOWRITE,unit) 120 119 IF (ierr.NE.NF_NOERR) THEN 121 120 write(*,*)'Error : cannot open file surface.nc ' 122 121 write(*,*)'(in phymars/datareadnc.F)' 123 write(*,*)'It should be in :',trim(data file),'/'122 write(*,*)'It should be in :',trim(datadir),'/' 124 123 write(*,*)'1) You can set this path in the 125 124 & callphys.def file:' … … 210 209 if (ierr.ne.nf_noerr) then 211 210 write(*,*) 'datareadnc error, cannot find ',trim(string(k)) 212 write(*,*) ' in file ',trim(data file),'/surface.nc'211 write(*,*) ' in file ',trim(datadir),'/surface.nc' 213 212 stop 214 213 endif -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/newstart.F
r1711 r1918 53 53 include "clesph0.h" 54 54 include "netcdf.inc" 55 include "datafile.h"56 55 c======================================================================= 57 56 c Declarations … … 1662 1661 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1663 1662 subroutine load_MONS_data(MONS_Hdn,MONS_d21) 1663 1664 use datafile_mod, only:datadir 1665 1664 1666 implicit none 1665 1667 ! routine to load Benedicte Diez MONS dataset, fill in date in southern 1666 1668 ! polar region, and interpolate the result onto the GCM grid 1667 #include"dimensions.h" 1668 #include"paramet.h" 1669 #include"datafile.h" 1670 #include"comgeom.h" 1669 include"dimensions.h" 1670 include"paramet.h" 1671 include"comgeom.h" 1671 1672 ! arguments: 1672 1673 real,intent(out) :: MONS_Hdn(iip1,jjp1) ! Hdn: %WEH=Mass fraction of H2O … … 1697 1698 1698 1699 ! Open MONS datafile: 1699 open(42,file=trim(data file)//"/"//trim(filename),1700 open(42,file=trim(datadir)//"/"//trim(filename), 1700 1701 & status="old",iostat=ierr) 1701 1702 if (ierr/=0) then 1702 1703 write(*,*) "Error in load_MONS_data:" 1703 1704 write(*,*) "Failed opening file ", 1704 & trim(datafile)//"/"//trim(filename) 1705 write(*,*)'1) You can change the path to the file in ' 1706 write(*,*)' file phymars/datafile.h' 1705 & trim(datadir)//"/"//trim(filename) 1706 write(*,*)'1) You can change this directory address in ', 1707 & 'callfis.def with' 1708 write(*,*)' datadir=/path/to/datafiles' 1707 1709 write(*,*)'2) If necessary ',trim(filename), 1708 1710 & ' (and other datafiles)' -
trunk/LMDZ.MARS/libf/phymars/albedocaps.F90
r1779 r1918 90 90 use geometry_mod, only: latitude, longitude ! in radians 91 91 use surfdat_h, only: albedice, TESice_Ncoef, TESice_Scoef 92 use datafile_mod, only: datadir 92 93 use netcdf, only: nf90_open, NF90_NOWRITE, NF90_NOERR, & 93 94 nf90_strerror, nf90_inq_varid, nf90_get_var, nf90_close 94 95 95 96 implicit none 96 include"datafile.h"97 97 98 98 ! arguments: … … 151 151 if (firstcall) then 152 152 ! Load TES albedoes for Northern Hemisphere 153 ! Note: datafile() is defined in "datafile.h" 154 ierr=nf90_open(trim(datafile)//"/npsc_albedo.nc",NF90_NOWRITE,nid) 153 ierr=nf90_open(trim(datadir)//"/npsc_albedo.nc",NF90_NOWRITE,nid) 155 154 IF (ierr.NE.NF90_NOERR) THEN 156 155 write(*,*)'Problem opening npsc_albedo.nc (phymars/albedocaps.F90)' 157 write(*,*)'It should be in :',trim(data file),'/'156 write(*,*)'It should be in :',trim(datadir),'/' 158 157 write(*,*)'1) You can change this directory address in callfis.def with' 159 158 write(*,*)' datadir=/path/to/datafiles' … … 163 162 CALL ABORT 164 163 ELSE 165 write(*,*) "albedocaps: using file ",trim(data file)//"/npsc_albedo.nc"164 write(*,*) "albedocaps: using file ",trim(datadir)//"/npsc_albedo.nc" 166 165 ENDIF 167 166 … … 225 224 226 225 ! Load albedoes for Southern Hemisphere 227 ierr=nf90_open(trim(data file)//"/spsc_albedo.nc",NF90_NOWRITE,nid)226 ierr=nf90_open(trim(datadir)//"/spsc_albedo.nc",NF90_NOWRITE,nid) 228 227 IF (ierr.NE.NF90_NOERR) THEN 229 228 write(*,*)'Problem opening spsc_albedo.nc (phymars/albedocaps.F90)' 230 write(*,*)'It should be in :',trim(data file),'/'229 write(*,*)'It should be in :',trim(datadir),'/' 231 230 write(*,*)'1) You can change this directory address in callfis.def with' 232 231 write(*,*)' datadir=/path/to/datafiles' … … 236 235 CALL ABORT 237 236 ELSE 238 write(*,*) "albedocaps: using file ",trim(data file)//"/spsc_albedo.nc"237 write(*,*) "albedocaps: using file ",trim(datadir)//"/spsc_albedo.nc" 239 238 ENDIF 240 239 -
trunk/LMDZ.MARS/libf/phymars/callradite_mod.F
r1776 r1918 11 11 & nuice,co2ice,clearsky,totcloudfrac) 12 12 13 use aeropacity_mod 13 use aeropacity_mod, only: aeropacity 14 14 use dimradmars_mod, only: ndomainsz, nflev, nsun, nir 15 15 use dimradmars_mod, only: naerkind, name_iaer, … … 59 59 c The names of the corresponding ASCII files have to be set in 60 60 c this subroutine (file_id variable), and files must be in the 61 c directory specified in datafile .h. Please make sure that the61 c directory specified in datafile_mod. Please make sure that the 62 62 c ASCII files are correctly written, and that the range 63 63 c of particle sizes is consistent with what you would expect. -
trunk/LMDZ.MARS/libf/phymars/co2cloud.F
r1913 r1918 19 19 & rho_ice_co2,r3n_q,rho_ice,nuice_sed 20 20 USE newsedim_mod, ONLY: newsedim 21 USE datafile_mod, ONLY: datadir 21 22 IMPLICIT NONE 22 23 23 include "datafile.h"24 24 include "callkeys.h" 25 25 include "microphys.h" … … 248 248 249 249 c read the Qext values 250 INQUIRE(FILE= datafile(1:LEN_TRIM(datafile))//250 INQUIRE(FILE=TRIM(datadir)// 251 251 & '/optprop_co2ice_1mic.dat', EXIST=file_ok) 252 252 IF (.not. file_ok) THEN 253 253 write(*,*) 'file optprop_co2ice_1mic.dat should be in ' 254 & , datafile254 & ,trim(datadir) 255 255 STOP 256 256 endif 257 ! open(newunit=uQext,file=trim(data file)//258 open(unit=uQext,file=trim(data file)//257 ! open(newunit=uQext,file=trim(datadir)// 258 open(unit=uQext,file=trim(datadir)// 259 259 & '/optprop_co2ice_1mic.dat' 260 260 & ,FORM='formatted') -
trunk/LMDZ.MARS/libf/phymars/conf_phys.F
r1818 r1918 41 41 use time_phylmdz_mod, only: ecritphy,day_step,iphysiq,ecritstart, 42 42 & daysec,dtphys 43 use planete_h44 43 use dimradmars_mod, only: naerkind, name_iaer, 45 44 & ini_scatterers,tauvis 45 use datafile_mod, only: datadir 46 46 47 47 IMPLICIT NONE 48 #include "callkeys.h" 49 #include "datafile.h" 50 #include "microphys.h" 48 include "callkeys.h" 49 include "microphys.h" 51 50 52 51 INTEGER,INTENT(IN) :: ngrid,nlayer,nq … … 85 84 86 85 write(*,*) "Directory where external input files are:" 87 datafile="/u/lmdz/WWW/planets/mars/datadir"88 call getin("datadir",data file) ! default path89 write(*,*) " data file = ",trim(datafile)86 ! default path is set in datafile_mod 87 call getin("datadir",datadir) 88 write(*,*) " datadir = ",trim(datadir) 90 89 91 90 write(*,*) "Run with or without tracer transport ?" -
trunk/LMDZ.MARS/libf/phymars/datafile_mod.F90
r1916 r1918 1 1 !----------------------------------------------------------------------- 2 ! INCLUDE datafile.h 2 module datafile_mod 3 3 4 ! Address of the directory containing tables of data needed by the GCM 5 COMMON/datadirectory/datafile 6 character (len=300) :: datafile 7 ! NB: default value for 'datafile' is set in conf_phys.F 4 implicit none 5 6 ! root path to directory containing tables 7 ! and datasets needed by the GCM 8 character(len=300),save :: datadir="/u/lmdz/WWW/planets/mars/datadir" 9 10 end module datafile_mod 8 11 !----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/improvedCO2clouds.F
r1913 r1918 13 13 & rho_ice_co2 14 14 use conc_mod, only: mmean 15 use datafile_mod, only: datadir 15 16 16 17 implicit none … … 55 56 include "callkeys.h" 56 57 include "microphys.h" 57 include "datafile.h"58 58 c------------------------------------------------------------------ 59 59 c Arguments: … … 247 247 ! Initialisation of the flux: it is constant and is it saved 248 248 !We must interpolate the table to the GCM pressures 249 INQUIRE(FILE= datafile(1:LEN_TRIM(datafile))//249 INQUIRE(FILE=TRIM(datadir)// 250 250 & '/Meteo_flux_Plane.dat', EXIST=file_ok) 251 251 IF (.not. file_ok) THEN 252 252 write(*,*) 'file Meteo_flux_Plane.dat should be in ' 253 & , datafile253 & ,trim(datadir) 254 254 STOP 255 255 endif 256 256 !used Variables 257 ! open(newunit=uMeteor,file=trim(data file)//258 open(unit=uMeteor,file=trim(data file)//257 ! open(newunit=uMeteor,file=trim(datadir)// 258 open(unit=uMeteor,file=trim(datadir)// 259 259 & '/Meteo_flux_Plane.dat' 260 260 & ,FORM='formatted') -
trunk/LMDZ.MARS/libf/phymars/nir_leedat.F
r498 r1918 7 7 c*********************************************************************** 8 8 9 use datafile_mod, only: datadir 10 9 11 implicit none 10 12 11 include 'datafile.h'12 13 include 'nirdata.h' 13 14 … … 20 21 c*********************************************************************** 21 22 22 open(43,file=trim(data file)//'/NIRcorrection_feb2011.dat',23 open(43,file=trim(datadir)//'/NIRcorrection_feb2011.dat', 23 24 $ status='old') 24 25 do ind=1,9 -
trunk/LMDZ.MARS/libf/phymars/nlte_calc.F
r1124 r1918 31 31 implicit none 32 32 33 include 'datafile.h'34 33 include 'nlte_paramdef.h' 35 34 include 'nlte_commons.h' … … 228 227 implicit none 229 228 230 include 'datafile.h'231 229 include 'nlte_paramdef.h' 232 230 include 'nlte_commons.h' … … 793 791 implicit none 794 792 795 include 'datafile.h'796 793 include 'nlte_paramdef.h' 797 794 include 'nlte_commons.h' … … 1318 1315 implicit none 1319 1316 1320 include 'datafile.h'1321 1317 include 'nlte_paramdef.h' 1322 1318 include 'nlte_commons.h' … … 1585 1581 implicit none 1586 1582 1587 include 'datafile.h'1588 1583 include 'nlte_paramdef.h' 1589 1584 include 'nlte_commons.h' -
trunk/LMDZ.MARS/libf/phymars/nlte_setup.F
r757 r1918 17 17 c*********************************************************************** 18 18 19 use datafile_mod, only: datadir 20 19 21 implicit none 20 22 21 include 'datafile.h'22 23 include 'nlte_paramdef.h' 23 24 include 'nlte_commons.h' … … 49 50 write (isotcode,132) indexisot(k) 50 51 open (lun1, 51 $ file=trim(data file)//'/NLTEDAT/enelow'52 $ file=trim(datadir)//'/NLTEDAT/enelow' 52 53 $ //isotcode//'.dat',status='old') 53 54 open (lun2, 54 $ file=trim(data file)//'/NLTEDAT/deltanu'55 $ file=trim(datadir)//'/NLTEDAT/deltanu' 55 56 $ //isotcode//'.dat',status='old') 56 57 read (lun1,*) … … 71 72 c *** Old LeeESCTVCISO_dlvr11 *** 72 73 73 open( 11, file=trim(data file)//74 open( 11, file=trim(datadir)// 74 75 $ '/NLTEDAT/parametp_Tstar_IAA1204.dat' ) 75 76 read (11, *) … … 80 81 close (11) 81 82 82 open( 12, file=trim(data file)//83 open( 12, file=trim(datadir)// 83 84 $ '/NLTEDAT/parametp_VC_IAA1204.dat' ) 84 85 read (12, *) … … 104 105 c*********************************************************************** 105 106 107 use datafile_mod, only: datadir 108 106 109 implicit none 107 110 108 include 'datafile.h'109 111 include 'nlte_paramdef.h' 110 112 include 'nlte_commons.h' … … 119 121 ! Banda fundamental 120 122 ! 121 hisfile = trim(data file)//123 hisfile = trim(datadir)// 122 124 $ '/NLTEDAT/hid26-1.dat' 123 125 ihist = 1 … … 127 129 ! First Hot bands 128 130 ! 129 hisfile = trim(data file)//131 hisfile = trim(datadir)// 130 132 $ '/NLTEDAT/hid26-2.dat' 131 133 ihist = 2 132 134 call rhist_03 (ihist) 133 135 134 hisfile = trim(data file)//136 hisfile = trim(datadir)// 135 137 $ '/NLTEDAT/hid26-3.dat' 136 138 ihist = 3 137 139 call rhist_03 (ihist) 138 140 139 hisfile = trim(data file)//141 hisfile = trim(datadir)// 140 142 $ '/NLTEDAT/hid26-4.dat' 141 143 ihist = 4 -
trunk/LMDZ.MARS/libf/phymars/read_dust_scenario.F90
r1861 r1918 5 5 use netcdf 6 6 use geometry_mod, only: latitude, longitude ! in radians 7 use datafile_mod, only: datadir 7 8 implicit none 8 9 9 include "datafile.h"10 10 include "callkeys.h" 11 11 … … 92 92 endif 93 93 94 ! Note: datafile() is defined in "datafile.h" 95 !ierr=NF_OPEN(trim(datafile)//"/"//trim(filename),NF_NOWRITE,nid) 96 ierr=nf90_open(trim(datafile)//"/"//trim(filename),NF90_NOWRITE,nid) 94 ierr=nf90_open(trim(datadir)//"/"//trim(filename),NF90_NOWRITE,nid) 97 95 IF (ierr.NE.nf90_noerr) THEN 98 96 write(*,*)'Problem opening ',trim(filename),' (in phymars/read_dust_scenario.F90)' 99 write(*,*)'It should be in :',trim(data file),'/'97 write(*,*)'It should be in :',trim(datadir),'/' 100 98 write(*,*)'1) You can change this directory address in callfis.def with' 101 99 write(*,*)' datadir=/path/to/datafiles' -
trunk/LMDZ.MARS/libf/phymars/suaer.F90
r1381 r1918 11 11 omegaREFvis, omegaREFir, & 12 12 nsize 13 use datafile_mod, only: datadir 13 14 IMPLICIT NONE 14 15 !================================================================== … … 43 44 ! Includes: 44 45 45 #include "callkeys.h" 46 #include "datafile.h" 46 include "callkeys.h" 47 47 48 48 ! Optical properties (read in external ASCII files) … … 188 188 ! 1.1 Open the ASCII file 189 189 190 INQUIRE(FILE= datafile(1:LEN_TRIM(datafile))//&191 '/'// file_id(iaer,idomain)(1:LEN_TRIM(file_id(iaer,idomain))),&190 INQUIRE(FILE=TRIM(datadir)//& 191 '/'//TRIM(file_id(iaer,idomain)),& 192 192 EXIST=file_ok) 193 193 IF(.NOT.file_ok) THEN 194 194 write(*,*)'Problem opening ',& 195 file_id(iaer,idomain)(1:LEN_TRIM(file_id(iaer,idomain)))195 TRIM(file_id(iaer,idomain)) 196 196 write(*,*)'It should be in: ',& 197 datafile(1:LEN_TRIM(datafile))198 write(*,*)'1) You can change this directory address in '199 write(*,*)' file phymars/datafile.h'197 TRIM(datadir) 198 write(*,*)'1) You can change this directory address in callfis.def with' 199 write(*,*)' datadir=/path/to/datafiles' 200 200 write(*,*)'2) If ',& 201 file_id(iaer,idomain)(1:LEN_TRIM(file_id(iaer,idomain))),&201 TRIM(file_id(iaer,idomain)),& 202 202 ' is a LMD reference datafile, it' 203 203 write(*,*)' can be obtained online on:' … … 210 210 ENDIF 211 211 OPEN(UNIT=file_unit,& 212 FILE= datafile(1:LEN_TRIM(datafile))//&213 '/'// file_id(iaer,idomain)(1:LEN_TRIM(file_id(iaer,idomain))),&212 FILE=TRIM(datadir)//& 213 '/'//TRIM(file_id(iaer,idomain)),& 214 214 FORM='formatted') 215 215 … … 222 222 if (read_ok.ne.0) then 223 223 write(*,*)' readoptprop: Error reading file',& 224 trim(datafile(1:LEN_TRIM(datafile))//&225 '/'// file_id(iaer,idomain)(1:LEN_TRIM(file_id(iaer,idomain))))224 TRIM(datadir)//& 225 '/'//TRIM(file_id(iaer,idomain)) 226 226 call abort 227 227 endif … … 236 236 trim(scanline) 237 237 write(*,*)' of file',& 238 trim(datafile(1:LEN_TRIM(datafile))//&239 '/'// file_id(iaer,idomain)(1:LEN_TRIM(file_id(iaer,idomain))))238 TRIM(datadir)//& 239 '/'//TRIM(file_id(iaer,idomain)) 240 240 call abort 241 241 endif … … 247 247 trim(scanline) 248 248 write(*,*)' of file',& 249 trim(datafile(1:LEN_TRIM(datafile))//&250 '/'// file_id(iaer,idomain)(1:LEN_TRIM(file_id(iaer,idomain))))249 TRIM(datadir)//& 250 '/'//TRIM(file_id(iaer,idomain)) 251 251 call abort 252 252 endif -
trunk/LMDZ.MARS/libf/phymars/surfini.F
r1543 r1918 1 1 SUBROUTINE surfini(ngrid,piceco2,qsurf,psolaralb) 2 ! to use 'getin' 3 USE ioipsl_getincom 2 3 USE ioipsl_getincom, only: getin 4 4 use netcdf 5 5 use tracer_mod, only: nqmx, noms … … 14 14 USE comcstfi_h 15 15 use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat 16 use datafile_mod, only: datadir 16 17 IMPLICIT NONE 17 18 c======================================================================= … … 23 24 c Declarations: 24 25 c ------------- 25 #include "callkeys.h" 26 #include "datafile.h" 26 include "callkeys.h" 27 27 28 28 integer,intent(in) :: ngrid ! number of atmospheric columns … … 173 173 174 174 175 zedatafile = trim(data file)175 zedatafile = trim(datadir) 176 176 177 177
Note: See TracChangeset
for help on using the changeset viewer.