Changes to remove switchdim in ncdio_pio
- Dominant language
- Fortran
- Stars
- 352
- Forks
- 361
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 7
Description
**Erik Kluzek < erik > - 2016-01-08 15:43:37 -0700**
**Bugzilla Id:** [2266](http://bugz.cgd.ucar.edu/show_bug.cgi?id=2266)
**Bugzilla CC:** jedwards, rfisher,
These are changes from Jim Edwards to remove the switchdim logic in ncd_pio.F90 for clm4_5_7_r163.
```
[erik@hobart SMS_Ld5_D_P24x1.f10_f10.IHISTCLM45BGC.hobart_nag.clm-clm50BGCmonthly.GC.160106-153439]$ diff $MYGLDCSEG/clm_trunk/components/clm/src/main/ncdio_pio.F90.in /home/jedwards/cesm1_5_alpha/components/clm/src/main/ncdio_pio.F90.in
363c363
< write(iulog,'(a)') msg
---
> write(iulog,*) msg
1717d1716
< allocate(temp(lb2:ub2,lb1:ub1))
1742a1742
> allocate(temp(lb2:ub2,lb1:ub1))
1748a1749
> deallocate(temp)
1779,1788c1780
< if (present(switchdim)) then
< call pio_read_darray(ncid, vardesc, iodesc_plus%iodesc, temp, status)
< do j = lb2,ub2
< do i = lb1,ub1
< data(i,j) = temp(j,i)
< end do
< end do
< else
< call pio_read_darray(ncid, vardesc, iodesc_plus%iodesc, data, status)
< end if
---
> call pio_read_darray(ncid, vardesc, iodesc_plus%iodesc, data, status)
1833,1839d1824
< if (present(switchdim)) then
< do j = lb2,ub2
< do i = lb1,ub1
< temp(j,i) = data(i,j)
< end do
< end do
< end if
1841,1845c1826
< if (present(switchdim)) then
< call pio_write_darray(ncid, vardesc, iodesc_plus%iodesc, temp, status, fillval=0)
< else
< call pio_write_darray(ncid, vardesc, iodesc_plus%iodesc, data, status, fillval=0)
< end if
---
> call pio_write_darray(ncid, vardesc, iodesc_plus%iodesc, data, status, fillval=0)
1847,1851c1828
< if (present(switchdim)) then
< call pio_write_darray(ncid, vardesc, iodesc_plus%iodesc, temp, status, fillval=spval)
< else
< call pio_write_darray(ncid, vardesc, iodesc_plus%iodesc, data, status, fillval=spval)
< end if
---
> call pio_write_darray(ncid, vardesc, iodesc_plus%iodesc, data, status, fillval=spval)
1872,1875d1848
< if (present(switchdim)) then
< deallocate(temp)
< end if
<
2342,2343c2315,2316
< do m = 1,gsmap_lsize
< do n = 1,vsize
---
> do n = 1,vsize
> do m = 1,gsmap_lsize
```
Contributor guide
Assessment
This issue has not been assessed yet.