Changeset 1532 for trunk/LMDZ.MARS/libf/phymars/inistats.F
- Timestamp:
- Apr 7, 2016, 3:53:15 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/inistats.F
r1528 r1532 1 1 subroutine inistats(ierr) 2 2 3 use statto_mod, only: istats,istime 3 4 use mod_phys_lmdz_para, only : is_master 4 5 USE comvert_mod, ONLY: ap,bp,aps,bps,preff,pseudoalt,presnivs … … 9 10 implicit none 10 11 11 include "statto.h"12 12 include "netcdf.inc" 13 13 … … 16 16 integer :: l,nsteppd 17 17 real, dimension(nbp_lev) :: sig_s 18 real :: lon_reg_ext(nbp_lon+1) ! extended longitudes18 real,allocatable :: lon_reg_ext(:) ! extended longitudes 19 19 integer :: idim_lat,idim_lon,idim_llm,idim_llmp1,idim_time 20 20 real, dimension(istime) :: lt 21 21 integer :: nvarid 22 22 23 24 IF (nbp_lon*nbp_lat==1) THEN 25 ! 1D model 26 ALLOCATE(lon_reg_ext(1)) 27 ELSE 28 ! 3D model 29 ALLOCATE(lon_reg_ext(nbp_lon+1)) 30 ENDIF 31 23 32 write (*,*) 24 33 write (*,*) ' || STATS ||' … … 46 55 47 56 lon_reg_ext(1:nbp_lon)=lon_reg(1:nbp_lon) 48 !add extra redundant point (180 degrees, since lon_reg starts at -180 49 lon_reg_ext(nbp_lon+1)=-lon_reg_ext(1) 57 IF (nbp_lon*nbp_lat/=1) THEN 58 ! In 3D, add extra redundant point (180 degrees, 59 ! since lon_reg starts at -180) 60 lon_reg_ext(nbp_lon+1)=-lon_reg_ext(1) 61 ENDIF 50 62 51 63 if (is_master) then … … 59 71 60 72 ierr = NF_DEF_DIM (nid, "latitude", nbp_lat, idim_lat) 61 ierr = NF_DEF_DIM (nid, "longitude", nbp_lon+1, idim_lon) 73 IF (nbp_lon*nbp_lat==1) THEN 74 ierr = NF_DEF_DIM (nid, "longitude", 1, idim_lon) 75 ELSE 76 ierr = NF_DEF_DIM (nid, "longitude", nbp_lon+1, idim_lon) 77 ENDIF 62 78 ierr = NF_DEF_DIM (nid, "altitude", nbp_lev, idim_llm) 63 79 ierr = NF_DEF_DIM (nid, "llmp1", nbp_lev+1, idim_llmp1)
Note: See TracChangeset
for help on using the changeset viewer.