source: LMDZ6/branches/Amaury_dev/tools/netcdf95/Attributes/nf95_copy_att.f90 @ 5411

Last change on this file since 5411 was 5088, checked in by abarral, 5 months ago

Remove all managed netcdf77 usage (excluding external: rrtm, ecrad)
Remove call to netcdf.inc
Replace USE lmdz_netcdf by USE netcdf
Replace lmdz_netcdf.F90 by lmdz_netcdf_format.F90

File size: 860 bytes
Line 
1module nf95_copy_att_m
2
3  implicit none
4
5contains
6
7
8  subroutine nf95_copy_att(ncid_in, varid_in, name, ncid_out, varid_out, ncerr)
9
10    use netcdf, only: nf90_copy_att
11
12    use nf95_abort_m, only: nf95_abort
13    use nf95_constants, only: nf95_noerr
14
15    integer, intent( in):: ncid_in,  varid_in
16    character(len=*), intent( in):: name
17    integer, intent( in):: ncid_out, varid_out
18    integer, intent(out), optional:: ncerr
19
20    ! Variable local to the procedure:
21    integer ncerr_not_opt
22
23    !-------------------
24
25    ncerr_not_opt = nf90_copy_att(ncid_in, varid_in, name, ncid_out, varid_out)
26    if (present(ncerr)) then
27       ncerr = ncerr_not_opt
28    else
29       if (ncerr_not_opt /= nf95_noerr) call nf95_abort("nf95_copy_att " &
30            // name, ncerr_not_opt, ncid_out)
31    end if
32
33  end subroutine nf95_copy_att
34
35end module nf95_copy_att_m
Note: See TracBrowser for help on using the repository browser.