Changeset 5071
- Timestamp:
- Jul 18, 2024, 3:07:22 PM (7 weeks ago)
- Location:
- LMDZ6/trunk/libf
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3d/guide_mod.F90
r5068 r5071 12 12 USE Write_Field 13 13 USE lmdz_netcdf, ONLY: nf90_nowrite, nf90_open, nf90_inq_varid, nf90_close, & 14 nf90_inq_dimid, nf90_inquire_dimension, nf _put_var_rd, nf90_float, nf90_def_var, &14 nf90_inq_dimid, nf90_inquire_dimension, nf90_float, nf90_def_var, & 15 15 nf_create, nf_def_dim, nf_open, nf_unlimited, nf_write, nf_enddef, nf_redef, & 16 nf_close, nf_inq_varid, nf _put_vara_rd, nf90_get_var, nf90_noerr, nf_clobber, &17 nf_64bit_offset, nf_inq_dimid, nf_inq_dimlen 16 nf_close, nf_inq_varid, nf90_get_var, nf90_noerr, nf_clobber, & 17 nf_64bit_offset, nf_inq_dimid, nf_inq_dimlen, nf90_put_var 18 18 USE pres2lev_mod, ONLY: pres2lev 19 19 … … 1707 1707 1708 1708 ! Enregistrement des variables dimensions 1709 ierr = nf _put_var_rd(nid,vid_lonu,rlonu*180./pi)1710 ierr = nf _put_var_rd(nid,vid_lonv,rlonv*180./pi)1711 ierr = nf _put_var_rd(nid,vid_latu,rlatu*180./pi)1712 ierr = nf _put_var_rd(nid,vid_latv,rlatv*180./pi)1713 ierr = nf _put_var_rd(nid,vid_lev,presnivs)1714 ierr = nf _put_var_rd(nid,vid_cu,cu)1715 ierr = nf _put_var_rd(nid,vid_cv,cv)1716 ierr = nf _put_var_rd(nid,vid_au,alpha_u)1717 ierr = nf _put_var_rd(nid,vid_av,alpha_v)1709 ierr = nf90_put_var(nid,vid_lonu,rlonu*180./pi) 1710 ierr = nf90_put_var(nid,vid_lonv,rlonv*180./pi) 1711 ierr = nf90_put_var(nid,vid_latu,rlatu*180./pi) 1712 ierr = nf90_put_var(nid,vid_latv,rlatv*180./pi) 1713 ierr = nf90_put_var(nid,vid_lev,presnivs) 1714 ierr = nf90_put_var(nid,vid_cu,cu) 1715 ierr = nf90_put_var(nid,vid_cv,cv) 1716 ierr = nf90_put_var(nid,vid_au,alpha_u) 1717 ierr = nf90_put_var(nid,vid_av,alpha_v) 1718 1718 call nf95_put_var(nid, varid_alpha_t, alpha_t) 1719 1719 call nf95_put_var(nid, varid_alpha_q, alpha_q) … … 1789 1789 END SELECT 1790 1790 1791 ierr = nf _put_vara_rd(nid,varid,start,count,field2)1791 ierr = nf90_put_var(nid,varid,field2,start,count) 1792 1792 ierr = NF_CLOSE(nid) 1793 1793 -
LMDZ6/trunk/libf/dyn3dmem/guide_loc_mod.F90
r5070 r5071 10 10 use lmdz_netcdf, only: nf90_nowrite, nf90_open, nf90_inq_varid, nf90_close, & 11 11 nf90_inq_dimid, nf90_inquire_dimension, nf_get_vara_rd, nf_inq_dimid, & 12 nf_inq_dimlen, nf_enddef, nf_def_dim, nf _put_var_rd, nf_noerr, nf_close, nf_inq_varid, &12 nf_inq_dimlen, nf_enddef, nf_def_dim, nf90_put_var, nf_noerr, nf_close, nf_inq_varid, & 13 13 nf_redef, nf_write, nf_unlimited, nf_float, nf_clobber, nf_64bit_offset, nf90_float, & 14 nf_create, nf_def_var, nf_open , nf_put_vara_rd14 nf_create, nf_def_var, nf_open 15 15 USE parallel_lmdz 16 16 USE pres2lev_mod, only: pres2lev … … 2257 2257 2258 2258 ! Enregistrement des variables dimensions 2259 ierr = nf _put_var_rd(nid,vid_lonu,rlonu*180./pi)2260 ierr = nf _put_var_rd(nid,vid_lonv,rlonv*180./pi)2261 ierr = nf _put_var_rd(nid,vid_latu,rlatu*180./pi)2262 ierr = nf _put_var_rd(nid,vid_latv,rlatv*180./pi)2263 ierr = nf _put_var_rd(nid,vid_lev,presnivs)2264 ierr = nf _put_var_rd(nid,vid_cu,cu)2265 ierr = nf _put_var_rd(nid,vid_cv,cv)2266 ierr = nf _put_var_rd(nid,vid_au,zu)2267 ierr = nf _put_var_rd(nid,vid_av,zv)2259 ierr = nf90_put_var(nid,vid_lonu,rlonu*180./pi) 2260 ierr = nf90_put_var(nid,vid_lonv,rlonv*180./pi) 2261 ierr = nf90_put_var(nid,vid_latu,rlatu*180./pi) 2262 ierr = nf90_put_var(nid,vid_latv,rlatv*180./pi) 2263 ierr = nf90_put_var(nid,vid_lev,presnivs) 2264 ierr = nf90_put_var(nid,vid_cu,cu) 2265 ierr = nf90_put_var(nid,vid_cv,cv) 2266 ierr = nf90_put_var(nid,vid_au,zu) 2267 ierr = nf90_put_var(nid,vid_av,zv) 2268 2268 call nf95_put_var(nid, varid_alpha_t, zt) 2269 2269 call nf95_put_var(nid, varid_alpha_q, zq) … … 2355 2355 !$OMP MASTER 2356 2356 2357 ierr = nf _put_vara_rd(nid,varid,start,count,field_glo)2357 ierr = nf90_put_var(nid,varid,field_glo,start,count) 2358 2358 ierr = NF_CLOSE(nid) 2359 2359 -
LMDZ6/trunk/libf/misc/lmdz_netcdf.F90
r5069 r5071 30 30 CONTAINS 31 31 32 ! Note: below, we use the same declarations as the fortran netcdf lib, hence the use of (*)33 34 ! We'd like to use "nf_put_var", but it already exists as a legacy nc4 function35 ! CPP_NC_DOUBLE wrapper around nf_put_var_real, nf_put_var_double36 INTEGER FUNCTION nf_put_var_rd(ncid, varid, vals)37 INTEGER, INTENT(IN) :: ncid, varid38 REAl(REAL_FORMAT), INTENT(IN) :: vals(*) ! (*) as declared in netcdf lib39 40 IF (CPP_NC_DOUBLE) THEN41 nf_put_var_rd = nf_put_var_double(ncid, varid, vals)42 ELSE43 nf_put_var_rd = nf_put_var_real(ncid, varid, vals)44 END IF45 END FUNCTION nf_put_var_rd46 47 ! CPP_NC_DOUBLE wrapper around nf_put_vara_real, nf_put_vara_double48 INTEGER FUNCTION nf_put_vara_rd(ncid, varid, start, counts, vals)49 INTEGER, INTENT(IN) :: ncid, varid50 INTEGER, INTENT(IN) :: start(*), counts(*)51 REAl(REAL_FORMAT), INTENT(IN) :: vals(*)52 53 IF (CPP_NC_DOUBLE) THEN54 nf_put_vara_rd = nf_put_vara_double(ncid, varid, start, counts, vals)55 ELSE56 nf_put_vara_rd = nf_put_vara_real(ncid, varid, start, counts, vals)57 END IF58 END FUNCTION nf_put_vara_rd59 60 ! CPP_NC_DOUBLE wrapper around nf_get_vara_real, nf_get_vara_double61 INTEGER FUNCTION nf_get_vara_rd(ncid, varid, start, counts, vals)62 INTEGER, INTENT(IN) :: ncid, varid63 INTEGER, INTENT(IN) :: start(*), counts(*)64 REAl(REAL_FORMAT), INTENT(OUT) :: vals(*)65 66 IF (CPP_NC_DOUBLE) THEN67 nf_get_vara_rd = nf_get_vara_double(ncid, varid, start, counts, vals)68 ELSE69 nf_get_vara_rd = nf_get_vara_real(ncid, varid, start, counts, vals)70 END IF71 END FUNCTION nf_get_vara_rd72 73 32 END MODULE lmdz_netcdf
Note: See TracChangeset
for help on using the changeset viewer.