Changeset 1216 for trunk/LMDZ.GENERIC/libf/phystd/start2archive.F
- Timestamp:
- Apr 3, 2014, 9:09:47 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/start2archive.F
r993 r1216 19 19 c======================================================================= 20 20 21 use infotrac, only: iniadvtrac, nqtot, tname 21 22 USE comsoil_h 22 USE comgeomfi_h 23 23 USE comgeomfi_h, ONLY: lati, long, area 24 ! use control_mod 25 use comgeomphy, only: initcomgeomphy 24 26 implicit none 25 27 … … 32 34 #include "logic.h" 33 35 #include "temps.h" 34 #include "control.h"36 !#include "control.h" 35 37 #include "ener.h" 36 38 37 39 #include "dimphys.h" 38 40 #include "planete.h" 39 #include"advtrac.h"41 !#include"advtrac.h" 40 42 #include "netcdf.inc" 41 43 … … 48 50 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) ! vents covariants 49 51 REAL teta(ip1jmp1,llm) ! temperature potentielle 50 REAL q(ip1jmp1,llm,nqmx)! champs advectes52 REAL,ALLOCATABLE :: q(:,:,:) ! champs advectes 51 53 REAL pks(ip1jmp1) ! exner (f pour filtre) 52 54 REAL pk(ip1jmp1,llm) … … 63 65 REAL tsoil(ngridmx,nsoilmx) ! Soil temperature 64 66 REAL co2ice(ngridmx) ! CO2 ice layer 65 REAL q2(ngridmx,nlayermx+1),qsurf(ngridmx,nqmx) 67 REAL q2(ngridmx,nlayermx+1) 68 REAL,ALLOCATABLE :: qsurf(:,:) 66 69 REAL emis(ngridmx) 67 70 INTEGER start,length … … 83 86 REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia 84 87 REAL co2iceS(ip1jmp1) 85 REAL q2S(ip1jmp1,llm+1),qsurfS(ip1jmp1,nqmx) 88 REAL q2S(ip1jmp1,llm+1) 89 REAL,ALLOCATABLE :: qsurfS(:,:) 86 90 REAL emisS(ip1jmp1) 87 91 … … 122 126 c----------------------------------------------------------------------- 123 127 128 CALL defrun_new(99, .TRUE. ) 124 129 grireg = .TRUE. 125 130 cursor = 1 ! added by AS in dimphys. 131 132 ! initialize "serial/parallel" related stuff 133 CALL init_phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/)) 134 call initcomgeomphy 126 135 127 136 ! ALLOCATE ARRAYS IN comgeomfi_h (usually done in inifis) … … 134 143 c Lecture des donnees 135 144 c======================================================================= 136 ! Load tracer names: 137 call iniadvtrac(nq,numvanle) 138 ! Initialize global tracer indexes (stored in tracer.h) 139 ! ... this has to be done before phyetat0 140 call initracer(ngridmx,nqmx,tnom) 145 ! Load tracer number and names: 146 call iniadvtrac(nqtot,numvanle) 147 148 ! allocate arrays: 149 allocate(q(ip1jmp1,llm,nqtot)) 150 allocate(qsurf(ngridmx,nqtot)) 151 allocate(qsurfS(ip1jmp1,nqtot)) 141 152 142 153 fichnom = 'start.nc' 143 CALL dynetat0(fichnom,nq mx,vcov,ucov,teta,q,masse,154 CALL dynetat0(fichnom,nqtot,vcov,ucov,teta,q,masse, 144 155 . ps,phis,timedyn) 145 156 … … 173 184 Lmodif=0 174 185 175 CALL phyetat0 (ngridmx,fichnom,0,Lmodif,nsoilmx,nq mx,day_ini_fi,186 CALL phyetat0 (ngridmx,fichnom,0,Lmodif,nsoilmx,nqtot,day_ini_fi, 176 187 . timefi, 177 188 . tsurf,tsoil,emis,q2,qsurf, … … 286 297 call gr_fi_dyn(1,ngridmx,iip1,jjp1,emis,emisS) 287 298 call gr_fi_dyn(llm+1,ngridmx,iip1,jjp1,q2,q2S) 288 call gr_fi_dyn(nq mx,ngridmx,iip1,jjp1,qsurf,qsurfS)299 call gr_fi_dyn(nqtot,ngridmx,iip1,jjp1,qsurf,qsurfS) 289 300 call gr_fi_dyn(llm,ngridmx,iip1,jjp1,cloudfrac,cloudfracS) 290 301 call gr_fi_dyn(1,ngridmx,iip1,jjp1,hice,hiceS) … … 390 401 391 402 c----------------------------------------------------------------------- 392 c Ecriture du champs q ( q[1,nq mx] )393 c----------------------------------------------------------------------- 394 do iq=1,nq mx395 call write_archive(nid,ntime,tn om(iq),'tracer','kg/kg',403 c Ecriture du champs q ( q[1,nqtot] ) 404 c----------------------------------------------------------------------- 405 do iq=1,nqtot 406 call write_archive(nid,ntime,tname(iq),'tracer','kg/kg', 396 407 & 3,q(1,1,iq)) 397 408 end do 398 409 c----------------------------------------------------------------------- 399 c Ecriture du champs qsurf ( qsurf[1,nq mx] )400 c----------------------------------------------------------------------- 401 do iq=1,nq mx402 txt=trim(tn om(iq))//"_surf"410 c Ecriture du champs qsurf ( qsurf[1,nqtot] ) 411 c----------------------------------------------------------------------- 412 do iq=1,nqtot 413 txt=trim(tname(iq))//"_surf" 403 414 call write_archive(nid,ntime,txt,'Tracer on surface', 404 415 & 'kg.m-2',2,qsurfS(1,iq)) … … 448 459 ierr=NF_CLOSE(nid) 449 460 461 write(*,*) "start2archive: All is well that ends well." 462 450 463 end
Note: See TracChangeset
for help on using the changeset viewer.