Changeset 3965 for LMDZ6/branches/LMDZ-INCA-Dyn
- Timestamp:
- Jul 21, 2021, 4:05:15 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/LMDZ-INCA-Dyn/libf/dyn3dmem/dynetat0_loc.F90
r3043 r3965 229 229 CHARACTER(LEN=*), INTENT(IN) :: var 230 230 REAL, INTENT(OUT) :: v(:,:) 231 REAL, ALLOCATABLE :: w4(:,:,:,:) 231 REAL, ALLOCATABLE :: w4(:,:,:,:), w3(:,:,:) 232 232 INTEGER :: nn(4), dids(4), k, nd 233 234 233 235 CALL err(NF90_INQ_VARID(fID,var,vID),"inq",var) 234 ierr=NF90_INQUIRE_VARIABLE(fID,vID,dimids=dids,ndims=nd) 236 ierr=NF90_INQUIRE_VARIABLE(fID,vID,ndims=nd) 237 238 IF(nd==1) THEN 239 CALL err(NF90_GET_VAR(fID,vID,v),"get",var); RETURN 240 END IF 241 ierr=NF90_INQUIRE_VARIABLE(fID,vID,dimids=dids) 242 235 243 DO k=1,nd; ierr=NF90_INQUIRE_DIMENSION(fID,dids(k),len=nn(k)); END DO 236 ALLOCATE(w4(nn(1),nn(2),nn(3),nn(4))) 237 CALL err(NF90_GET_VAR(fID,vID,w4),"get",var) 238 v=RESHAPE(w4,[nn(1)*nn(2),nn(3)]); DEALLOCATE(w4) 244 245 SELECT CASE(nd) 246 CASE(3); ALLOCATE(w3(nn(1),nn(2),nn(3))) 247 CALL err(NF90_GET_VAR(fID,vID,w3),"get",var) 248 v=RESHAPE(w3,[nn(1)*nn(2),nn(3)]); DEALLOCATE(w3) 249 CASE(4); ALLOCATE(w4(nn(1),nn(2),nn(3),nn(4))) 250 CALL err(NF90_GET_VAR(fID,vID,w4),"get",var) 251 v=RESHAPE(w4,[nn(1)*nn(2),nn(3)]); DEALLOCATE(w4) 252 END SELECT 239 253 END SUBROUTINE get_var2 240 254
Note: See TracChangeset
for help on using the changeset viewer.