Changeset 4368 for LMDZ6/branches/Ocean_skin/libf/dyn3dmem/dynredem_loc.F90
- Timestamp:
- Dec 6, 2022, 12:01:16 AM (2 years ago)
- Location:
- LMDZ6/branches/Ocean_skin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Ocean_skin
- Property svn:mergeinfo changed
-
LMDZ6/branches/Ocean_skin/libf/dyn3dmem/dynredem_loc.F90
r4013 r4368 9 9 USE parallel_lmdz 10 10 USE mod_hallo 11 USE infotrac 11 USE strings_mod, ONLY: maxlen 12 USE infotrac, ONLY: nqtot, tracers 12 13 USE netcdf, ONLY: NF90_CREATE, NF90_DEF_DIM, NF90_INQ_VARID, NF90_GLOBAL, & 13 14 NF90_CLOSE, NF90_PUT_ATT, NF90_UNLIMITED, NF90_CLOBBER, & 14 15 NF90_64BIT_OFFSET 15 16 USE dynredem_mod, ONLY: cre_var, put_var, err, modname, fil 16 USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt,pa,preff,&17 nivsig,nivsigs17 USE comvert_mod, ONLY: ap, bp, presnivs, pa, preff, nivsig, nivsigs,& 18 aps,bps,pseudoalt 18 19 USE comconst_mod, ONLY: cpp, daysec, dtvr, g, kappa, omeg, rad 19 20 USE logic_mod, ONLY: fxyhypb, ysinus … … 36 37 !=============================================================================== 37 38 ! Local variables: 38 INTEGER :: iq , l39 INTEGER :: iq 39 40 INTEGER, PARAMETER :: length=100 40 41 REAL :: tab_cntrl(length) !--- RUN PARAMETERS TABLE 41 42 REAL :: phis_glo(ip1jmp1) 42 43 ! For NetCDF: 43 CHARACTER(LEN= 30) :: unites44 CHARACTER(LEN=maxlen) :: unites 44 45 INTEGER :: indexID 45 46 INTEGER :: rlonuID, rlonvID, rlatuID, rlatvID 46 INTEGER :: sID, sigID, nID, vID,timID47 INTEGER :: sID, sigID, nID, timID 47 48 INTEGER :: yyears0, jjour0, mmois0 48 REAL :: z an0, zjulian, hours49 REAL :: zjulian, hours 49 50 !=============================================================================== 50 51 modname='dynredem0'; fil=fichnom … … 144 145 145 146 !--- Define fields saved later 146 WRITE(unites,"('days since ',i4,'-',i2.2,'-',i2.2,' 00:00:00')") ,&147 WRITE(unites,"('days since ',i4,'-',i2.2,'-',i2.2,' 00:00:00')") & 147 148 yyears0,mmois0,jjour0 148 149 CALL cre_var(nid,"temps","Temps de simulation",[timID],unites) … … 151 152 CALL cre_var(nid,"teta" ,"Temperature",[rlonvID,rlatuID,sID,timID]) 152 153 DO iq=1,nqtot 153 CALL cre_var(nid,t name(iq),ttext(iq),[rlonvID,rlatuID,sID,timID])154 CALL cre_var(nid,tracers(iq)%name,tracers(iq)%longName,[rlonvID,rlatuID,sID,timID]) 154 155 END DO 155 156 CALL cre_var(nid,"masse","Masse d air" ,[rlonvID,rlatuID,sID,timID]) … … 174 175 USE parallel_lmdz 175 176 USE mod_hallo 176 USE infotrac 177 USE strings_mod, ONLY: maxlen 178 USE infotrac, ONLY: nqtot, tracers, types_trac 177 179 USE control_mod 178 180 USE netcdf, ONLY: NF90_OPEN, NF90_NOWRITE, NF90_GET_VAR, NF90_INQ_VARID, & … … 200 202 !=============================================================================== 201 203 ! Local variables: 202 INTEGER :: l,iq, nid, vID, ierr, nid_trac, vID_trac204 INTEGER :: iq, nid, vID, ierr, nid_trac, vID_trac 203 205 INTEGER, SAVE :: nb=0 204 206 INTEGER, PARAMETER :: length=100 205 207 REAL :: tab_cntrl(length) ! tableau des parametres du run 206 CHARACTER(LEN= 256) :: var, dum208 CHARACTER(LEN=maxlen) :: var, dum 207 209 LOGICAL :: lread_inca 208 210 !=============================================================================== … … 211 213 IF(mpi_rank==0) THEN !++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 212 214 modname='dynredem1_loc'; fil=fichnom 213 fil=fichnom214 215 CALL err(NF90_OPEN(fil,NF90_WRITE,nid),"open",fil) 215 216 … … 242 243 !$OMP MASTER 243 244 fil="start_trac.nc" 244 IF( type_trac=='inca' .OR. type_trac=='inco') INQUIRE(FILE=fil,EXIST=lread_inca)245 IF(ANY(types_trac=='inca') .OR. ANY(types_trac=='inco')) INQUIRE(FILE=fil,EXIST=lread_inca) 245 246 IF(lread_inca) CALL err(NF90_OPEN(fil,NF90_NOWRITE,nid_trac),"open") 246 247 !$OMP END MASTER … … 248 249 249 250 !--- Save tracers 250 DO iq=1,nqtot; var= tname(iq); ierr=-1251 DO iq=1,nqtot; var=TRIM(tracers(iq)%name); ierr=-1 251 252 IF(lread_inca) THEN !--- Possibly read from "start_trac.nc" 252 253 !$OMP MASTER
Note: See TracChangeset
for help on using the changeset viewer.