Changeset 3065 for trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
- Timestamp:
- Oct 2, 2023, 2:30:47 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
r3060 r3065 1 1 PROGRAM testphys1d 2 2 3 use ioipsl_getincom, only: getin ! To use 'getin'4 3 use comsoil_h, only: inertiedat, inertiesoil, nsoilmx 5 4 use surfdat_h, only: albedodat, perenial_co2ice, watercap … … 100 99 character(len = 44) :: txt 101 100 102 ! RV & JBC: Use of "start1D.txt" and "startfi.nc" files101 ! RV & JBC: Use of starting files for 1D 103 102 logical :: startfiles_1D, therestart1D, therestartfi 104 103 … … 121 120 !call initcomgeomphy 122 121 123 !------------------------------------------------------ 124 ! Loading run parameters from "run.def" file 125 !------------------------------------------------------ 126 ! check if 'run.def' file is around. Otherwise reading parameters 127 ! from callphys.def via getin() routine won't work. 128 inquire(file = 'run.def',exist = there) 129 if (.not. there) then 130 write(*,*) 'Cannot find required file "run.def"' 131 write(*,*) ' (which should contain some input parameters along with the following line: INCLUDEDEF=callphys.def)' 132 write(*,*) ' ... might as well stop here ...' 133 stop 134 endif 135 136 write(*,*)'Do you want to use "start1D.txt" and "startfi.nc" files?' 137 startfiles_1D = .false. 138 therestart1D = .false. 139 therestartfi = .false. 140 call getin("startfiles_1D",startfiles_1D) 141 write(*,*) " startfiles_1D = ", startfiles_1D 142 143 if (startfiles_1D) then 144 inquire(file = 'start1D.txt',exist = therestart1D) 145 if (.not. therestart1D) then 146 write(*,*) 'There is no "start1D.txt" file!' 147 write(*,*) 'Initialization is done with default values.' 148 endif 149 inquire(file = 'startfi.nc',exist = therestartfi) 150 if (.not. therestartfi) then 151 write(*,*) 'There is no "startfi.nc" file!' 152 write(*,*) 'Initialization is done with default values.' 153 endif 154 endif 155 156 call init_testphys1d(startfiles_1D,therestart1D,therestartfi,ngrid,nlayer,odpref,nq,ndt,ptif,pks,dttestphys, & 157 q,zqsat,qsurf,dq,dqdyn,day0,day,time,psurf,tsurf,gru,grv,u,v,w,q2,play,plev,tsoil,temp, & 122 call init_testphys1d(.false.,ngrid,nlayer,odpref,nq,q,time,psurf,u,v,temp,startfiles_1D,therestart1D,therestartfi, & 123 ndt,ptif,pks,dttestphys,zqsat,qsurf,dq,dqdyn,day0,day,tsurf,gru,grv,w,q2,play,plev,tsoil, & 158 124 albedo,emis,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau) 159 125 … … 265 231 266 232 ! Writing the "restart1D.txt" file for the next run 267 if (startfiles_1D) call writerestart1D( psurf,tsurf,nlayer,temp,u,v,nq,noms,qsurf,q)233 if (startfiles_1D) call writerestart1D('restart1D.txt',psurf,tsurf,nlayer,temp,u,v,nq,noms,qsurf,q) 268 234 269 235 write(*,*) "testphys1d: everything is cool."
Note: See TracChangeset
for help on using the changeset viewer.