Changeset 2667 for LMDZ5/trunk
- Timestamp:
- Oct 13, 2016, 11:41:08 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/limit_read_mod.F90
r2666 r2667 237 237 ierr=NF90_INQUIRE(nid, UnlimitedDimID=ndimid) 238 238 ierr=NF90_INQUIRE_DIMENSION(nid, ndimid, len=nn) 239 str=""; DO WHILE(nn>0); str=TRIM(str)//CHAR(nn-10*(nn/10)-48); nn=nn/10; END DO239 CALL num2str(nn,str) 240 240 abort_message='limit.nc records number ('//TRIM(str)//') does'//& 241 241 ' not match year length (' 242 nn=year_len 243 str=""; DO WHILE(nn>0); str=TRIM(str)//CHAR(nn-10*(nn/10)-48); nn=nn/10; END DO 242 CALL num2str(year_len,str) 244 243 abort_message=TRIM(abort_message)//TRIM(str)//')' 245 244 IF(nn/=year_len) CALL abort_physic(modname,abort_message,1) … … 248 247 ierr=NF90_INQ_DIMID(nid, 'points_physiques', ndimid) 249 248 ierr=NF90_INQUIRE_DIMENSION(nid, ndimid, len=nn) 250 str=""; DO WHILE(nn>0); str=TRIM(str)//CHAR(nn-10*(nn/10)-48); nn=nn/10; END DO249 CALL num2str(nn,str) 251 250 abort_message='limit.nc horizontal number of cells ('//TRIM(str)//') does'//& 252 251 ' not match LMDZ klon_glo (' 253 nn=klon_glo 254 str=""; DO WHILE(nn>0); str=TRIM(str)//CHAR(nn-10*(nn/10)-48); nn=nn/10; END DO 252 CALL num2str(klon_glo,str) 255 253 abort_message=TRIM(abort_message)//TRIM(str)//')' 256 254 IF(nn/=klon_glo) CALL abort_physic(modname,abort_message,1) … … 372 370 END SUBROUTINE limit_read_tot 373 371 372 !-------------------------------------------------------------------------------------- 373 SUBROUTINE num2str(n,str) 374 !-------------------------------------------------------------------------------------- 375 ! Arguments: 376 INTEGER, INTENT(IN) :: n 377 CHARACTER(LEN=99), INTENT(OUT) :: str 378 !-------------------------------------------------------------------------------------- 379 ! Local variables: 380 INTEGER :: nn 381 !-------------------------------------------------------------------------------------- 382 nn=n; str=''; DO WHILE(nn>0); str=CHAR(nn-10*(nn/10)-48)//TRIM(str); nn=nn/10; END DO 383 END SUBROUTINE num2str 384 !-------------------------------------------------------------------------------------- 374 385 375 386 END MODULE limit_read_mod
Note: See TracChangeset
for help on using the changeset viewer.