Changeset 2514 for LMDZ5/trunk/libf/phylmd
- Timestamp:
- May 13, 2016, 8:46:39 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/limit_slab.F90
r2344 r2514 42 42 lmt_pas = NINT(86400./dtime) 43 43 44 ! Initialize saved variables 45 IF (.NOT. ALLOCATED(bils_save)) THEN 46 ALLOCATE(bils_save(klon), diff_sst_save(klon), diff_siv_save(klon), stat=ierr) 47 IF (ierr /= 0) CALL abort_physic('limit_slab', 'pb in allocation',1) 48 END IF 49 44 50 ! F. Codron 5/14: add defaults for bils, diff_sst (0) 45 51 IF (MOD(itime-1, lmt_pas) == 0) THEN ! time to read 46 52 !$OMP MASTER ! Only master thread 47 53 IF (is_mpi_root) THEN ! Only master processus 48 54 print*,'in limit_slab time to read, itime=',itime … … 53 59 ierr = NF90_OPEN ('limit_slab.nc', NF90_NOWRITE, nid) 54 60 IF (ierr /= NF90_NOERR) THEN 61 PRINT *,'LIMIT_SLAB file not found' 55 62 read_bils=.FALSE. 56 63 read_sst=.FALSE. … … 112 119 ierr = NF90_CLOSE(nid) 113 120 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Pb when closing file', 1) 114 END IF ! Read File 121 END IF ! Read File 115 122 IF (read_sst) THEN 116 123 ! Calculate difference in temperature between this day and one ahead … … 128 135 129 136 !$OMP END MASTER 137 !$OMP BARRIER 130 138 131 IF (.NOT. ALLOCATED(bils_save)) THEN 132 ALLOCATE(bils_save(klon), diff_sst_save(klon), diff_siv_save(klon), stat=ierr) 133 IF (ierr /= 0) CALL abort_physic('limit_slab', 'pb in allocation',1) 134 END IF 135 139 ! Send fields to all processes 136 140 ! Give default values if needed 141 CALL bcast(read_bils) 142 CALL bcast(read_sst) 143 CALL bcast(read_siv) 144 PRINT *,'limit_slab sst',read_sst,'siv',read_siv,'qflux',read_bils 137 145 IF (read_bils) THEN 138 146 CALL Scatter(bils_glo, bils_save) … … 156 164 diff_sst(:) = diff_sst_save(:) 157 165 diff_siv(:) = diff_siv_save(:) 166 ! For Debug purpose 167 ! PRINT *,'limit_slab sst',MINVAL(diff_sst(:)),MAXVAL(diff_sst(:)) 168 ! PRINT *,'limit_slab siv',MINVAL(diff_siv(:)),MAXVAL(diff_siv(:)) 169 ! PRINT *,'limit_slab bils',MINVAL(lmt_bils(:)),MAXVAL(lmt_bils(:)) 158 170 159 160 171 END SUBROUTINE limit_slab
Note: See TracChangeset
for help on using the changeset viewer.