Changeset 4202 for LMDZ6/branches/LMDZ_ECRad
- Timestamp:
- Jul 18, 2022, 4:19:18 PM (2 years ago)
- Location:
- LMDZ6/branches/LMDZ_ECRad/libf/phylmd
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/regr_horiz_time_climoz_m.F90
r4179 r4202 4 4 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, grid_type, unstructured 5 5 USE nrtype, ONLY: pi 6 USE netcdf, ONLY: NF90_CLOBBER, NF90_FLOAT, NF90_ GET_VAR, NF90_OPEN, &6 USE netcdf, ONLY: NF90_CLOBBER, NF90_FLOAT, NF90_OPEN, & 7 7 NF90_NOWRITE, NF90_NOERR, NF90_GET_ATT, NF90_GLOBAL 8 8 USE netcdf95, ONLY: NF95_DEF_DIM, NF95_INQ_DIMID, NF95_INQUIRE_DIMENSION, & 9 NF95_DEF_VAR, NF95_INQ_VARID, NF95_INQUIRE_VARIABLE,&10 NF95_OPEN, NF95_CREATE, NF95_GET_ATT, NF95_GW_VAR, HANDLE_ERR, &11 9 NF95_DEF_VAR, NF95_INQ_VARID, NF95_INQUIRE_VARIABLE, & 10 NF95_OPEN, NF95_CREATE, NF95_GET_ATT, NF95_GW_VAR, nf95_get_var, & 11 NF95_CLOSE, NF95_ENDDEF, NF95_PUT_ATT, NF95_PUT_VAR, NF95_COPY_ATT 12 12 USE print_control_mod, ONLY: lunout 13 13 USE dimphy … … 333 333 !--- Read full current file and one record each available contiguous file 334 334 DO iv=1,read_climoz 335 msg=TRIM(sub)//" NF90_GET_VAR "//TRIM(vars_in(iv))336 335 CALL NF95_INQ_VARID(fID_in, vars_in(1), vID_in(iv)) 337 IF(l3D) ncerr=NF90_GET_VAR(fID_in, vID_in(iv), o3_in3(1:nlon_in,:,:,1:12,iv)) 338 IF(l2D) ncerr=NF90_GET_VAR(fID_in, vID_in(iv), o3_in2( :,:,1:12,iv)) 339 CALL handle_err(TRIM(msg), ncerr, fID_in) 336 IF(l3D) call NF95_GET_VAR(fID_in, vID_in(iv), o3_in3(1:nlon_in,:,:,1:12,iv)) 337 IF(l2D) call NF95_GET_VAR(fID_in, vID_in(iv), o3_in2( :,:,1:12,iv)) 340 338 IF(lprev) THEN; sta(ndims)=12 341 339 CALL NF95_INQ_VARID(fID_in_m, vars_in(1), vID_in(iv)) 342 IF(l3D) ncerr=NF90_GET_VAR(fID_in_m,vID_in(iv),o3_in3(1:nlon_in,:,:, 0,iv),sta,cnt) 343 IF(l2d) ncerr=NF90_GET_VAR(fID_in_m,vID_in(iv),o3_in2( :,:, 0,iv),sta,cnt) 344 CALL handle_err(TRIM(msg)//" previous", ncerr, fID_in_m) 340 IF(l3D) call NF95_GET_VAR(fID_in_m,vID_in(iv),o3_in3(1:nlon_in,:,:, 0,iv),sta,cnt) 341 IF(l2d) call NF95_GET_VAR(fID_in_m,vID_in(iv),o3_in2( :,:, 0,iv),sta,cnt) 345 342 END IF 346 343 IF(lnext) THEN; sta(ndims)=1 347 344 CALL NF95_INQ_VARID(fID_in_p, vars_in(1), vID_in(iv)) 348 IF(l3D) ncerr=NF90_GET_VAR(fID_in_p,vID_in(iv),o3_in3(1:nlon_in,:,:,13,iv),sta,cnt) 349 IF(l2D) ncerr=NF90_GET_VAR(fID_in_p,vID_in(iv),o3_in2( :,:,13,iv),sta,cnt) 350 CALL handle_err(TRIM(msg)//" next", ncerr, fID_in_p) 345 IF(l3D) call NF95_GET_VAR(fID_in_p,vID_in(iv),o3_in3(1:nlon_in,:,:,13,iv),sta,cnt) 346 IF(l2D) call NF95_GET_VAR(fID_in_p,vID_in(iv),o3_in2( :,:,13,iv),sta,cnt) 351 347 END IF 352 348 END DO -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/regr_lat_time_coefoz_m.F90
r4179 r4202 43 43 use regr_conserv_m, only: regr_conserv 44 44 use regr_lint_m, only: regr_lint 45 use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, handle_err, &45 use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, nf95_get_var, & 46 46 nf95_put_var, nf95_gw_var 47 use netcdf, only: nf90_nowrite , nf90_get_var47 use netcdf, only: nf90_nowrite 48 48 use nrtype, only: pi 49 49 use regular_lonlat_mod, only: boundslat_reg, south … … 201 201 ! Process ozone parameter "name_in(i_v)" 202 202 203 ncerr = nf90_get_var(ncid_in, varid_in(i_v), o3_par_in) 204 call handle_err("nf90_get_var", ncerr, ncid_in) 205 203 call nf95_get_var(ncid_in, varid_in(i_v), o3_par_in) 206 204 if (desc_lat) o3_par_in = o3_par_in(n_lat:1:-1, :, :) 207 205 -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/regr_pr_int_m.F90
r2788 r4202 25 25 26 26 use dimphy, only: klon 27 use netcdf95, only: nf95_inq_varid, handle_err 28 use netcdf, only: nf90_get_var 27 use netcdf95, only: nf95_inq_varid, nf95_get_var 29 28 use assert_m, only: assert 30 29 use regr_lint_m, only: regr_lint … … 79 78 80 79 ! Get data at the right day from the input file: 81 ncerr = nf90_get_var(ncid, varid, v1(1, :, 1:), start=(/1, 1, julien/)) 82 call handle_err("regr_pr_int nf90_get_var " // name, ncerr, ncid) 80 call nf95_get_var(ncid, varid, v1(1, :, 1:), start=(/1, 1, julien/)) 83 81 ! Latitudes are in ascending order in the input file while 84 82 ! "rlatu" is in descending order so we need to invert order: -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/regr_pr_o3_m.F90
r2788 r4202 25 25 ! hPa and strictly increasing. 26 26 27 use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, handle_err28 use netcdf, only: nf90_nowrite , nf90_get_var27 use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, nf95_get_var 28 use netcdf, only: nf90_nowrite 29 29 use assert_m, only: assert 30 30 use regr_conserv_m, only: regr_conserv … … 63 63 call nf95_inq_varid(ncid, "r_Mob", varid) 64 64 ! Get data at the right day from the input file: 65 ncerr = nf90_get_var(ncid, varid, r_mob, start=(/1, 1, day_ref/)) 66 call handle_err("nf90_get_var r_Mob", ncerr) 65 call nf95_get_var(ncid, varid, r_mob, start=(/1, 1, day_ref/)) 67 66 ! Latitudes are in ascending order in the input file while 68 67 ! "rlatu" is in descending order so we need to invert order: -
LMDZ6/branches/LMDZ_ECRad/libf/phylmd/regr_pr_time_av_m.F90
r3598 r4202 113 113 !------------------------------------------------------------------------------- 114 114 USE dimphy, ONLY: klon 115 USE netcdf95, ONLY: NF95_INQ_VARID, NF95_INQUIRE_VARIABLE, handle_err,&116 NF95_INQ_DIMID, NF95_INQUIRE_DIMENSION 117 USE netcdf, ONLY: NF90_INQ_VARID, NF90_ GET_VAR, NF90_NOERR115 USE netcdf95, ONLY: NF95_INQ_VARID, NF95_INQUIRE_VARIABLE, & 116 NF95_INQ_DIMID, NF95_INQUIRE_DIMENSION, nf95_get_var 117 USE netcdf, ONLY: NF90_INQ_VARID, NF90_NOERR 118 118 USE assert_m, ONLY: assert 119 119 USE assert_eq_m, ONLY: assert_eq … … 482 482 CALL NF95_INQ_VARID(fID, TRIM(var), vID) 483 483 CALL NF95_INQUIRE_VARIABLE(fID, vID, ndims=n_dim) 484 IF(n_dim==2) ncerr=NF90_GET_VAR(fID,vID,v(1,:), start=[ 1,irec]) 485 IF(n_dim==3) ncerr=NF90_GET_VAR(fID,vID,v(:,:), start=[1,1,irec]) 486 CALL handle_err(TRIM(sub)//" NF90_GET_VAR "//TRIM(var),ncerr,fID) 484 IF(n_dim==2) call NF95_GET_VAR(fID,vID,v(1,:), start=[ 1,irec]) 485 IF(n_dim==3) call NF95_GET_VAR(fID,vID,v(:,:), start=[1,1,irec]) 487 486 488 487 !--- Flip latitudes: ascending in input file, descending in "rlatu". … … 514 513 CALL NF95_INQ_VARID(fID, TRIM(nam(i)), vID) 515 514 CALL NF95_INQUIRE_VARIABLE(fID, vID, ndims=n_dim) 516 IF(n_dim==3) ncerr=NF90_GET_VAR(fID,vID,v(1,:,:,i), start=[ 1,1,irec]) 517 IF(n_dim==4) ncerr=NF90_GET_VAR(fID,vID,v(:,:,:,i), start=[1,1,1,irec]) 518 CALL handle_err(TRIM(sub)//" NF90_GET_VAR "//TRIM(nam(i)),ncerr,fID) 515 IF(n_dim==3) call NF95_GET_VAR(fID,vID,v(1,:,:,i), start=[ 1,1,irec]) 516 IF(n_dim==4) call NF95_GET_VAR(fID,vID,v(:,:,:,i), start=[1,1,1,irec]) 519 517 END DO 520 518
Note: See TracChangeset
for help on using the changeset viewer.