Changeset 2665 for LMDZ5/trunk/libf/dynphy_lonlat/phylmd/limit_netcdf.F90
- Timestamp:
- Oct 12, 2016, 2:53:20 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dynphy_lonlat/phylmd/limit_netcdf.F90
r2603 r2665 71 71 USE netcdf95, ONLY: nf95_def_var, nf95_put_att, nf95_put_var 72 72 USE comconst_mod, ONLY: pi 73 USE phys_cal_mod, ONLY: calend 73 74 IMPLICIT NONE 74 75 !------------------------------------------------------------------------------- … … 244 245 !--- Attributes creation 245 246 CALL ncerr(NF90_PUT_ATT(nid,id_tim, "title","Jour dans l annee"),fnam) 247 CALL ncerr(NF90_PUT_ATT(nid,id_tim, "calendar",calend),fnam) 246 248 CALL ncerr(NF90_PUT_ATT(nid,id_FOCE,"title","Fraction ocean"),fnam) 247 249 CALL ncerr(NF90_PUT_ATT(nid,id_FSIC,"title","Fraction glace de mer"),fnam) … … 405 407 CASE('SIC', 'SST'); cal_in='gregorian' 406 408 END SELECT 407 CALL msg(5,'WARNING: missing "calendar" attribute for "time" in '&409 CALL msg(5,'WARNING: missing "calendar" attribute for "time" in '& 408 410 &//TRIM(fnam)//'. Choosing default value.') 409 411 END IF 412 CALL strclean(cal_in) !--- REMOVE (WEIRD) NULL CHARACTERS 410 413 CALL msg(5,'var, calendar, dim: '//TRIM(dnam)//' '//TRIM(cal_in), lmdep) 411 414 … … 477 480 fnam_p=fnam(1:idx)//'_p.nc' 478 481 IF(NF90_OPEN(fnam_p,NF90_NOWRITE,ncid)==NF90_NOERR) THEN 479 CALL msg(0,'Reading previousyear file ("'//TRIM(fnam_p)//'") first record for '//TRIM(title))482 CALL msg(0,'Reading next year file ("'//TRIM(fnam_p)//'") first record for '//TRIM(title)) 480 483 CALL ncerr(NF90_INQ_VARID(ncid, varname, varid),fnam_p) 481 484 CALL ncerr(NF90_GET_VAR(ncid,varid,champ,[1,1,1],[imdep,jmdep,1]),fnam_p) … … 767 770 !------------------------------------------------------------------------------- 768 771 772 773 !------------------------------------------------------------------------------- 774 ! 775 SUBROUTINE strclean(s) 776 ! 777 !------------------------------------------------------------------------------- 778 IMPLICIT NONE 779 !------------------------------------------------------------------------------- 780 ! Purpose: Remove tail null characters from the input string. 781 !------------------------------------------------------------------------------- 782 ! Parameters: 783 CHARACTER(LEN=*), INTENT(INOUT) :: s 784 !------------------------------------------------------------------------------- 785 ! Local variable: 786 INTEGER :: k 787 !------------------------------------------------------------------------------- 788 k=LEN_TRIM(s); DO WHILE(ICHAR(s(k:k))==0); s(k:k)=' '; k=LEN_TRIM(s); END DO 789 790 END SUBROUTINE strclean 791 ! 792 !------------------------------------------------------------------------------- 793 769 794 #endif 770 795 ! of #ifndef CPP_1D
Note: See TracChangeset
for help on using the changeset viewer.