Changeset 3867
- Timestamp:
- Jan 8, 2016, 9:52:14 AM (9 years ago)
- Location:
- dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/limit_read_mod.F90
r3817 r3867 31 31 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 32 32 33 34 SUBROUTINE init_limit_read(first_day) 35 USE mod_grid_phy_lmdz 36 USE surface_data 37 USE XIOS 38 USE etat0_limit_unstruct_mod, ONLY: create_etat0_limit 39 IMPLICIT NONE 40 INTEGER, INTENT(IN) :: first_day 41 42 43 IF ( type_ocean /= 'couple') THEN 44 IF (grid_type==unstructured) THEN 45 IF (.NOT. create_etat0_limit) CALL xios_set_file_attr("limit_read",enabled=.TRUE.,record_offset=first_day) 46 ENDIF 47 ENDIF 48 49 END SUBROUTINE init_limit_read 50 33 51 SUBROUTINE limit_read_frac(itime, dtime, jour, pctsrf_new, is_modified) 34 52 ! … … 148 166 USE netcdf 149 167 USE indice_sol_mod 150 168 USE XIOS 169 151 170 IMPLICIT NONE 152 171 … … 177 196 REAL, DIMENSION(klon_glo) :: rug_glo ! rugosity at global grid 178 197 REAL, DIMENSION(klon_glo) :: alb_glo ! albedo at global grid 198 199 REAL, DIMENSION(klon_mpi,nbsrf) :: pct_mpi ! fraction at global grid 200 REAL, DIMENSION(klon_mpi) :: sst_mpi ! sea-surface temperature at global grid 201 REAL, DIMENSION(klon_mpi) :: rug_mpi ! rugosity at global grid 202 REAL, DIMENSION(klon_mpi) :: alb_mpi ! albedo at global grid 203 179 204 CHARACTER(len=20) :: modname='limit_read_mod' 180 205 … … 211 236 212 237 is_modified = .FALSE. 213 IF (MOD(itime-1, lmt_pas) == 0 .OR. jour_lu /= jour ) THEN ! time to read 238 !ym IF (MOD(itime-1, lmt_pas) == 0 .OR. jour_lu /= jour ) THEN ! time to read 239 ! not REALLY PERIODIC 240 IF (MOD(itime-1, lmt_pas) == 0) THEN ! time to read 214 241 jour_lu = jour 215 242 is_modified = .TRUE. 243 244 IF (grid_type==unstructured) THEN 245 216 246 !$OMP MASTER ! Only master thread 217 IF (is_mpi_root) THEN ! Only master processus 218 219 ierr = NF90_OPEN ('limit.nc', NF90_NOWRITE, nid) 220 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,& 221 'Pb d''ouverture du fichier de conditions aux limites',1) 222 223 ! La tranche de donnees a lire: 224 start(1) = 1 225 start(2) = jour 226 epais(1) = klon_glo 227 epais(2) = 1 228 229 230 !**************************************************************************************** 231 ! 2) Read fraction if not type_ocean=couple 232 ! 233 !**************************************************************************************** 234 235 IF ( type_ocean /= 'couple') THEN 236 ! 237 ! Ocean fraction 238 ierr = NF90_INQ_VARID(nid, 'FOCE', nvarid) 239 IF (ierr /= NF90_NOERR) CALL abort_physic(modname, 'Le champ <FOCE> est absent',1) 240 241 ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_oce),start,epais) 242 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FOCE>' ,1) 243 ! 244 ! Sea-ice fraction 245 ierr = NF90_INQ_VARID(nid, 'FSIC', nvarid) 246 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <FSIC> est absent',1) 247 248 ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_sic),start,epais) 249 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FSIC>' ,1) 250 251 252 ! Read land and continentals fraction only if asked for 253 IF (read_continents .OR. itime == 1) THEN 254 ! 255 ! Land fraction 256 ierr = NF90_INQ_VARID(nid, 'FTER', nvarid) 257 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <FTER> est absent',1) 258 259 ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_ter),start,epais) 260 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FTER>',1) 261 ! 262 ! Continentale ice fraction 263 ierr = NF90_INQ_VARID(nid, 'FLIC', nvarid) 264 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <FLIC> est absent',1) 265 266 ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_lic),start,epais) 267 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FLIC>',1) 268 END IF 247 248 249 IF ( type_ocean /= 'couple') THEN 250 251 CALL xios_recv_field("foce_limin",pct_mpi(:,is_oce)) 252 CALL xios_recv_field("fsic_limin",pct_mpi(:,is_sic)) 253 ! IF (read_continents .OR. itime == 1) THEN 254 CALL xios_recv_field("fter_limin",pct_mpi(:,is_ter)) 255 CALL xios_recv_field("flic_limin",pct_mpi(:,is_lic)) 256 ! ENDIF 257 ENDIF! type_ocean /= couple 258 259 IF ( type_ocean /= 'couple') THEN 260 CALL xios_recv_field("sst_limin",sst_mpi) 261 ENDIF 262 263 IF (.NOT. ok_veget) THEN 264 CALL xios_recv_field("alb_limin",alb_mpi) 265 CALL xios_recv_field("rug_limin",rug_mpi) 266 ENDIF 267 268 IF ( type_ocean /= 'couple') THEN 269 CALL Scatter_omp(sst_mpi,sst) 270 CALL Scatter_omp(pct_mpi(:,is_oce),pctsrf(:,is_oce)) 271 CALL Scatter_omp(pct_mpi(:,is_sic),pctsrf(:,is_sic)) 272 ! IF (read_continents .OR. itime == 1) THEN 273 CALL Scatter_omp(pct_mpi(:,is_ter),pctsrf(:,is_ter)) 274 CALL Scatter_omp(pct_mpi(:,is_lic),pctsrf(:,is_lic)) 275 ! END IF 276 END IF 277 278 IF (.NOT. ok_veget) THEN 279 CALL Scatter_omp(alb_mpi, albedo) 280 CALL Scatter_omp(rug_mpi, rugos) 281 END IF 282 283 !$OMP END MASTER 284 285 286 ELSE ! grid_type==regular 287 288 !$OMP MASTER ! Only master thread 289 290 IF (is_mpi_root) THEN ! Only master processus! 291 292 ierr = NF90_OPEN ('limit.nc', NF90_NOWRITE, nid) 293 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,& 294 'Pb d''ouverture du fichier de conditions aux limites',1) 295 296 ! La tranche de donnees a lire: 297 start(1) = 1 298 start(2) = jour 299 epais(1) = klon_glo 300 epais(2) = 1 301 302 303 !**************************************************************************************** 304 ! 2) Read fraction if not type_ocean=couple 305 ! 306 !**************************************************************************************** 307 308 IF ( type_ocean /= 'couple') THEN 309 ! 310 ! Ocean fraction 311 ierr = NF90_INQ_VARID(nid, 'FOCE', nvarid) 312 IF (ierr /= NF90_NOERR) CALL abort_physic(modname, 'Le champ <FOCE> est absent',1) 313 314 ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_oce),start,epais) 315 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FOCE>' ,1) 316 ! 317 ! Sea-ice fraction 318 ierr = NF90_INQ_VARID(nid, 'FSIC', nvarid) 319 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <FSIC> est absent',1) 320 321 ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_sic),start,epais) 322 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FSIC>' ,1) 323 324 325 ! Read land and continentals fraction only if asked for 326 IF (read_continents .OR. itime == 1) THEN 327 ! 328 ! Land fraction 329 ierr = NF90_INQ_VARID(nid, 'FTER', nvarid) 330 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <FTER> est absent',1) 331 332 ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_ter),start,epais) 333 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FTER>',1) 334 ! 335 ! Continentale ice fraction 336 ierr = NF90_INQ_VARID(nid, 'FLIC', nvarid) 337 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <FLIC> est absent',1) 338 339 ierr = NF90_GET_VAR(nid,nvarid,pct_glo(:,is_lic),start,epais) 340 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <FLIC>',1) 341 END IF 342 269 343 270 344 END IF ! type_ocean /= couple … … 289 363 !**************************************************************************************** 290 364 291 IF (.NOT. ok_veget) THEN292 !293 ! Read albedo294 ierr = NF90_INQ_VARID(nid, 'ALB', nvarid)295 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <ALB> est absent',1)296 297 ierr = NF90_GET_VAR(nid,nvarid,alb_glo,start,epais)298 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <ALB>',1)299 !300 ! Read rugosity301 ierr = NF90_INQ_VARID(nid, 'RUG', nvarid)302 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <RUG> est absent',1)303 304 ierr = NF90_GET_VAR(nid,nvarid,rug_glo,start,epais)305 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <RUG>',1)306 307 END IF365 IF (.NOT. ok_veget) THEN 366 ! 367 ! Read albedo 368 ierr = NF90_INQ_VARID(nid, 'ALB', nvarid) 369 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <ALB> est absent',1) 370 371 ierr = NF90_GET_VAR(nid,nvarid,alb_glo,start,epais) 372 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <ALB>',1) 373 ! 374 ! Read rugosity 375 ierr = NF90_INQ_VARID(nid, 'RUG', nvarid) 376 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Le champ <RUG> est absent',1) 377 378 ierr = NF90_GET_VAR(nid,nvarid,rug_glo,start,epais) 379 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Lecture echouee pour <RUG>',1) 380 381 END IF 308 382 309 383 !**************************************************************************************** … … 314 388 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Pb when closing file', 1) 315 389 ENDIF ! is_mpi_root 316 317 !$OMP END MASTER 318 !$OMP BARRIER 390 391 392 !$OMP END MASTER 393 !$OMP BARRIER 319 394 320 395 IF ( type_ocean /= 'couple') THEN … … 332 407 CALL Scatter(rug_glo, rugos) 333 408 END IF 409 410 ENDIF ! grid_type 334 411 335 412 ENDIF ! time to read -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phyaqua_mod.F90
r3842 r3867 235 235 CALL profil_sst(nlon, latitude, type_profil, phy_sst) 236 236 237 CALL writelim (klon, phy_nat, phy_alb, phy_sst, phy_bil, phy_rug, phy_ice, &237 CALL writelim_unstruct(klon, phy_nat, phy_alb, phy_sst, phy_bil, phy_rug, phy_ice, & 238 238 phy_fter, phy_foce, phy_flic, phy_fsic) 239 239 … … 332 332 333 333 PRINT *, 'iniaqua: after phyredem' 334 CALL phys_state_var_end334 ! CALL phys_state_var_end 335 335 336 336 RETURN … … 455 455 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 456 456 457 SUBROUTINE writelim (klon, phy_nat, phy_alb, phy_sst, phy_bil, phy_rug, &457 SUBROUTINE writelim_unstruct(klon, phy_nat, phy_alb, phy_sst, phy_bil, phy_rug, & 458 458 phy_ice, phy_fter, phy_foce, phy_flic, phy_fsic) 459 459 460 USE mod_phys_lmdz_para, ONLY: is_ master461 USE mod_ grid_phy_lmdz, ONLY: klon_glo462 USE mod_phys_lmdz_transfert_para, ONLY: gather460 USE mod_phys_lmdz_para, ONLY: is_omp_master, klon_mpi 461 USE mod_phys_lmdz_transfert_para, ONLY: gather_omp 462 USE xios 463 463 IMPLICIT NONE 464 464 … … 477 477 REAL, INTENT (IN) :: phy_fsic(klon, 360) 478 478 479 REAL :: phy_glo(klon_mpi, 360) ! temporary variable, to store phy_***(:) 480 ! on the whole physics grid 481 482 483 PRINT *, 'writelim: Ecriture du fichier limit' 484 485 CALL gather_omp(phy_foce, phy_glo) 486 IF (is_omp_master) CALL xios_send_field('foce_limout',phy_glo) 487 488 CALL gather_omp(phy_fsic, phy_glo) 489 IF (is_omp_master) CALL xios_send_field('fsic_limout',phy_glo) 490 491 CALL gather_omp(phy_fter, phy_glo) 492 IF (is_omp_master) CALL xios_send_field('fter_limout',phy_glo) 493 494 CALL gather_omp(phy_flic, phy_glo) 495 IF (is_omp_master) CALL xios_send_field('flic_limout',phy_glo) 496 497 CALL gather_omp(phy_sst, phy_glo) 498 IF (is_omp_master) CALL xios_send_field('sst_limout',phy_glo) 499 500 CALL gather_omp(phy_bil, phy_glo) 501 IF (is_omp_master) CALL xios_send_field('bils_limout',phy_glo) 502 503 CALL gather_omp(phy_alb, phy_glo) 504 IF (is_omp_master) CALL xios_send_field('alb_limout',phy_glo) 505 506 CALL gather_omp(phy_rug, phy_glo) 507 IF (is_omp_master) CALL xios_send_field('rug_limout',phy_glo) 508 509 END SUBROUTINE writelim_unstruct 510 511 512 513 SUBROUTINE writelim(klon, phy_nat, phy_alb, phy_sst, phy_bil, phy_rug, & 514 phy_ice, phy_fter, phy_foce, phy_flic, phy_fsic) 515 516 USE mod_phys_lmdz_para, ONLY: is_master 517 USE mod_grid_phy_lmdz, ONLY: klon_glo 518 USE mod_phys_lmdz_transfert_para, ONLY: gather 519 IMPLICIT NONE 520 521 include "netcdf.inc" 522 523 INTEGER, INTENT (IN) :: klon 524 REAL, INTENT (IN) :: phy_nat(klon, 360) 525 REAL, INTENT (IN) :: phy_alb(klon, 360) 526 REAL, INTENT (IN) :: phy_sst(klon, 360) 527 REAL, INTENT (IN) :: phy_bil(klon, 360) 528 REAL, INTENT (IN) :: phy_rug(klon, 360) 529 REAL, INTENT (IN) :: phy_ice(klon, 360) 530 REAL, INTENT (IN) :: phy_fter(klon, 360) 531 REAL, INTENT (IN) :: phy_foce(klon, 360) 532 REAL, INTENT (IN) :: phy_flic(klon, 360) 533 REAL, INTENT (IN) :: phy_fsic(klon, 360) 534 479 535 REAL :: phy_glo(klon_glo, 360) ! temporary variable, to store phy_***(:) 480 536 ! on the whole physics grid … … 494 550 PRINT *, 'writelim: Ecriture du fichier limit' 495 551 496 ierr = nf_create('limit.nc', nf_clobber, nid)552 ierr = nf_create('limit.nc', NF_NETCDF4, nid) 497 553 498 554 ierr = nf_put_att_text(nid, nf_global, 'title', 30, & -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phyetat0.F90
r3838 r3867 28 28 USE ocean_slab_mod, ONLY: tslab, seaice, tice, ocean_slab_init 29 29 USE time_phylmdz_mod, ONLY: init_iteration, pdtphys, itau_phy 30 USE create_etat0_unstruct_mod 31 USE wxios 30 32 31 33 IMPLICIT none … … 74 76 75 77 REAL :: lon_startphy(klon), lat_startphy(klon) 76 78 77 79 ! FH1D 78 80 ! real iolat(jjm+1) … … 879 881 ENDIF 880 882 881 CALL init_iophy_new(lat_degrees,lon_degrees)883 ! CALL init_iophy_new(lat_degrees,lon_degrees) 882 884 883 885 ! Initilialize module fonte_neige_mod -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phys_cal_mod.F90
r3849 r3867 36 36 37 37 SUBROUTINE phys_cal_init(annee_ref,day_ref) 38 USE IOIPSL, ONLY: ymds2ju, getin 38 USE IOIPSL, ONLY: ymds2ju, getin, ioconf_calendar 39 39 USE mod_phys_lmdz_para, ONLY: is_master,bcast 40 40 IMPLICIT NONE … … 51 51 IF (is_master) CALL getin('calend', calend) 52 52 CALL bcast(calend) 53 54 IF (calend == 'earth_360d') THEN 55 CALL ioconf_calendar('360d') 56 ELSE IF (calend == 'earth_365d') THEN 57 CALL ioconf_calendar('noleap') 58 ELSE IF (calend == 'earth_366d') THEN 59 CALL ioconf_calendar('gregorian') 60 ELSE 61 CALL abort_physic('phys_cal_init','Mauvais choix de calendrier',1) 62 ENDIF 63 53 64 54 65 CALL ymds2ju(annee_ref, 1, day_ref, 0., jD_ref) -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phys_output_write_mod.F90
r3849 r3867 298 298 299 299 IF(.NOT.vars_defined) THEN 300 iinitend = 2300 iinitend = 1 301 301 ELSE 302 302 iinitend = 1 -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phys_state_var_mod.F90
r3838 r3867 397 397 !$OMP THREADPRIVATE(du_gwd_rando, dv_gwd_rando) 398 398 ! tendencies on wind due to gravity waves 399 399 400 400 CONTAINS 401 401 … … 419 419 420 420 include "clesphys.h" 421 INTEGER,SAVE :: is_initialized=.FALSE. 422 !$OMP THREADPRIVATE(is_initialized) 423 424 IF (is_initialized) RETURN 425 is_initialized=.TRUE. 421 426 ALLOCATE(pctsrf(klon,nbsrf)) 422 427 ALLOCATE(ftsol(klon,nbsrf)) -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/physiq.F90
r3842 r3867 50 50 set_timestep, pdtphys 51 51 USE tracinca_mod, ONLY : config_inca 52 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, grid1dTo2d_glo, klon_glo 52 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, grid1dTo2d_glo, klon_glo, grid_type, unstructured 53 53 #ifdef REPROBUS 54 54 USE CHEM_REP, ONLY : Init_chem_rep_xjour … … 64 64 USE CFMIP_point_locations 65 65 use FLOTT_GWD_rando_m, only: FLOTT_GWD_rando 66 66 USE etat0_limit_unstruct_mod 67 USE xios 68 USE regr_lat_time_climoz_m 69 USE climoz_mod 70 USE limit_read_mod, ONLY : init_limit_read 67 71 IMPLICIT none 68 72 !>====================================================================== … … 247 251 real clw(klon,klev),elij(klon,klev,klev) 248 252 real epmlmMm(klon,klev,klev),eplaMm(klon,klev) 253 real delta_epsilon 249 254 ! RomP <<< 250 255 !IM definition dynamique o_trac dans phys_output_open … … 798 803 ! ascending order 799 804 800 integer, save:: co3i = 0805 integer, save:: co3i = -1 801 806 ! time index in NetCDF file of current ozone fields 802 807 !$OMP THREADPRIVATE(co3i) … … 876 881 mydebug=.FALSE. 877 882 CALL set_timestep(pdtphys_) 878 883 IF (.NOT. debut) CALL xios_update_calendar(itap+1) 879 884 !====================================================================== 880 885 ! Ecriture eventuelle d'un profil verticale en entree de la physique. … … 904 909 905 910 if (first) then 906 911 CALL init_etat0_limit_unstruct 912 CALL init_limit_read(days_elapsed) 913 907 914 !CR:nvelles variables convection/poches froides 908 915 … … 1055 1062 radpas = NINT( 86400./pdtphys/nbapp_rad) 1056 1063 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1057 1064 CALL init_iophy_new(lat_degrees,lon_degrees) 1065 1066 !============================================================= 1067 ! Initialisation des sorties 1068 !============================================================= 1069 1070 #ifdef CPP_IOIPSL 1071 1072 !$OMP MASTER 1073 ! FH : if ok_sync=.true. , the time axis is written at each time step 1074 ! in the output files. Only at the end in the opposite case 1075 ok_sync_omp=.false. 1076 CALL getin('ok_sync',ok_sync_omp) 1077 call phys_output_open(lon_degrees,lat_degrees,nCFMIP,tabijGCM, & 1078 iGCM,jGCM,lonGCM,latGCM, & 1079 jjmp1,nlevSTD,clevSTD,rlevSTD, pdtphys,ok_veget, & 1080 type_ocean,iflag_pbl,iflag_pbl_split,ok_mensuel,ok_journe, & 1081 ok_hf,ok_instan,ok_LES,ok_ade,ok_aie, & 1082 read_climoz, phys_out_filestations, & 1083 new_aod, aerosol_couple, & 1084 flag_aerosol_strat, pdtphys, paprs, pphis, & 1085 pplay, lmax_th, ptconv, ptconvth, ivap, & 1086 d_t, qx, d_qx, zmasse, ok_sync_omp) 1087 !$OMP END MASTER 1088 !$OMP BARRIER 1089 ok_sync=ok_sync_omp 1090 1091 freq_outNMC(1) = ecrit_files(7) 1092 freq_outNMC(2) = ecrit_files(8) 1093 freq_outNMC(3) = ecrit_files(9) 1094 WRITE(lunout,*)'OK freq_outNMC(1)=',freq_outNMC(1) 1095 WRITE(lunout,*)'OK freq_outNMC(2)=',freq_outNMC(2) 1096 WRITE(lunout,*)'OK freq_outNMC(3)=',freq_outNMC(3) 1097 1098 include "ini_histday_seri.h" 1099 1100 include "ini_paramLMDZ_phy.h" 1101 1102 #endif 1103 ecrit_reg = ecrit_reg * un_jour 1104 ecrit_tra = ecrit_tra * un_jour 1105 1106 !XXXPB Positionner date0 pour initialisation de ORCHIDEE 1107 date0 = jD_ref 1108 WRITE(*,*) 'physiq date0 : ',date0 1109 1110 !--- OZONE CLIMATOLOGY 1111 ! create ozone file for unstuctured grid 1112 CALL create_climoz(read_climoz) 1113 1114 CALL phys_output_write(itap, pdtphys, paprs, pphis, & 1115 pplay, lmax_th, aerosol_couple, & 1116 ok_ade, ok_aie, ivap, new_aod, ok_sync, & 1117 ptconv, read_climoz, clevSTD, & 1118 ptconvth, d_t, qx, d_qx, zmasse, & 1119 flag_aerosol, flag_aerosol_strat, ok_cdnc) 1120 1121 CALL xios_update_calendar(1) 1122 1123 CALL create_etat0_limit_unstruct 1124 1125 1058 1126 CALL phyetat0 ("startphy.nc",clesphy0,tabcntr0) 1059 1127 IF (klon_glo==1) THEN … … 1230 1298 !IM cf. AM 081204 END 1231 1299 ! 1232 !============================================================= 1233 ! Initialisation des sorties 1234 !============================================================= 1235 1236 #ifdef CPP_IOIPSL 1237 1238 !$OMP MASTER 1239 ! FH : if ok_sync=.true. , the time axis is written at each time step 1240 ! in the output files. Only at the end in the opposite case 1241 ok_sync_omp=.false. 1242 CALL getin('ok_sync',ok_sync_omp) 1243 call phys_output_open(lon_degrees,lat_degrees,nCFMIP,tabijGCM, & 1244 iGCM,jGCM,lonGCM,latGCM, & 1245 jjmp1,nlevSTD,clevSTD,rlevSTD, pdtphys,ok_veget, & 1246 type_ocean,iflag_pbl,iflag_pbl_split,ok_mensuel,ok_journe, & 1247 ok_hf,ok_instan,ok_LES,ok_ade,ok_aie, & 1248 read_climoz, phys_out_filestations, & 1249 new_aod, aerosol_couple, & 1250 flag_aerosol_strat, pdtphys, paprs, pphis, & 1251 pplay, lmax_th, ptconv, ptconvth, ivap, & 1252 d_t, qx, d_qx, zmasse, ok_sync_omp) 1253 !$OMP END MASTER 1254 !$OMP BARRIER 1255 ok_sync=ok_sync_omp 1256 1257 freq_outNMC(1) = ecrit_files(7) 1258 freq_outNMC(2) = ecrit_files(8) 1259 freq_outNMC(3) = ecrit_files(9) 1260 WRITE(lunout,*)'OK freq_outNMC(1)=',freq_outNMC(1) 1261 WRITE(lunout,*)'OK freq_outNMC(2)=',freq_outNMC(2) 1262 WRITE(lunout,*)'OK freq_outNMC(3)=',freq_outNMC(3) 1263 1264 include "ini_histday_seri.h" 1265 1266 include "ini_paramLMDZ_phy.h" 1267 1268 #endif 1269 ecrit_reg = ecrit_reg * un_jour 1270 ecrit_tra = ecrit_tra * un_jour 1271 1272 !XXXPB Positionner date0 pour initialisation de ORCHIDEE 1273 date0 = jD_ref 1274 WRITE(*,*) 'physiq date0 : ',date0 1300 1275 1301 ! 1276 1302 ! … … 1611 1637 ! Ozone from a file 1612 1638 ! Update required ozone index: 1613 ro3i = int((days_elapsed + jh_cur - jh_1jan) / year_len * 360.) + 1 1639 !ym ro3i = int((days_elapsed + jh_cur - jh_1jan) / year_len * 360.) + 1 1640 ! ro3i = int((days_elapsed + jh_cur - jh_1jan )) + 1 1641 1642 delta_epsilon=jh_cur-pdtphys/un_jour 1643 if (ABS(delta_epsilon)<1e-6) delta_epsilon=0 1644 ro3i = int((days_elapsed+delta_epsilon - jh_1jan ))+1 1645 1646 1614 1647 if (ro3i == 361) ro3i = 360 1615 1648 ! (This should never occur, except perhaps because of roundup … … 1618 1651 ! Update ozone field: 1619 1652 if (read_climoz == 1) then 1620 call regr_pr_av(ncid_climoz, (/"tro3"/), julien=ro3i, & 1653 1654 IF (grid_type==unstructured) THEN 1655 CALL get_ozone_var((/"tro3_read"/),press_climoz,paprs,wo) 1656 ELSE 1657 CALL regr_pr_av(ncid_climoz, (/"tro3"/), julien=ro3i, & 1621 1658 press_in_edg=press_climoz, paprs=paprs, v3=wo) 1659 ENDIF 1660 1622 1661 else 1623 1662 ! read_climoz == 2 1624 call regr_pr_av(ncid_climoz, (/"tro3 ", "tro3_daylight"/), & 1625 julien=ro3i, press_in_edg=press_climoz, paprs=paprs, v3=wo) 1663 1664 IF (grid_type==unstructured) THEN 1665 CALL get_ozone_var((/"tro3_read","tro3_daylight_read"/),press_climoz,paprs,wo) 1666 ELSE 1667 CALL regr_pr_av(ncid_climoz, (/"tro3 ", "tro3_daylight"/), & 1668 julien=ro3i, press_in_edg=press_climoz, paprs=paprs, v3=wo) 1669 ENDIF 1670 1626 1671 end if 1627 1672 ! Convert from mole fraction of ozone to column density of ozone in a -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/regr_lat_time_climoz_m.F90
r3825 r3867 11 11 contains 12 12 13 subroutine regr_lat_time_climoz(read_climoz )13 subroutine regr_lat_time_climoz(read_climoz, regr_lat) 14 14 15 15 ! "regr_lat_time_climoz" stands for "regrid latitude time … … 65 65 ! periodicity for interpolation at the beginning and at the end of the 66 66 ! year. 67 use mod_grid_phy_lmdz, ONLY : nbp_lat 67 use mod_grid_phy_lmdz, ONLY : nbp_lat, grid_type, unstructured 68 68 use regr1_step_av_m, only: regr1_step_av 69 69 use regr3_lint_m, only: regr3_lint … … 75 75 use regular_lonlat_mod, only : boundslat_reg, south 76 76 use nrtype, only: pi 77 use regular_lonlat_mod, only : lat_reg 78 implicit none 77 79 integer, intent(in):: read_climoz ! read ozone climatology 78 80 ! Allowed values are 1 and 2 … … 82 84 83 85 ! Variables local to the procedure: 86 LOGICAL, intent(in), OPTIONAL :: regr_lat 84 87 85 88 integer n_plev ! number of pressure levels in the input data 86 89 integer n_lat ! number of latitudes in the input data 87 90 integer n_month ! number of months in the input data 91 integer n_lat_out ! number of latitudes in the output data 88 92 89 93 real, pointer:: latitude(:) … … 158 162 ! (time to middle of day, in days since January 1st 0h, in a 159 163 ! 360-day calendar) 160 164 logical :: regr_lat_ 165 REAL,ALLOCATABLE :: lat_out(:) 166 161 167 !--------------------------------- 168 IF (PRESENT(regr_lat)) THEN 169 regr_lat_=regr_lat 170 ELSE 171 regr_lat_=.TRUE. 172 ENDIF 162 173 163 174 print *, "Call sequence information: regr_lat_time_climoz" … … 183 194 forall (j = 2:n_lat) lat_in_edg(j) = (latitude(j - 1) + latitude(j)) / 2 184 195 lat_in_edg(n_lat + 1) = pi / 2 185 deallocate(latitude) ! pointer186 196 187 197 call nf95_inq_varid(ncid_in, "plev", varid) … … 204 214 end if 205 215 216 IF (regr_lat_) THEN 217 n_lat_out=nbp_lat 218 ALLOCATE(lat_out(n_lat_out)) 219 lat_out=lat_reg 220 ELSE 221 n_lat_out=n_lat 222 ALLOCATE(lat_out(n_lat_out)) 223 lat_out=latitude 224 ENDIF 225 206 226 ! Create the output file and get the variable IDs: 207 call prepare_out(ncid_in, n_ plev, ncid_out, varid_out, varid_plev, &227 call prepare_out(ncid_in, n_lat_out, lat_out, n_plev, ncid_out, varid_out, varid_plev, & 208 228 varid_time) 229 230 deallocate(latitude) ! pointer 209 231 210 232 ! Write remaining coordinate variables: … … 281 303 call nf95_close(ncid_in) 282 304 283 allocate(o3_regr_lat(nbp_lat, n_plev, 0:13, read_climoz)) 284 allocate(o3_out(nbp_lat, n_plev, 360, read_climoz)) 285 286 ! Regrid in latitude: 287 ! We average with respect to sine of latitude, which is 288 ! equivalent to weighting by cosine of latitude: 289 if (n_month == 12) then 290 print *, & 291 "Found 12 months in ozone climatologies, assuming periodicity..." 292 o3_regr_lat(nbp_lat:1:-1, :, 1:12, :) = regr1_step_av(o3_in, & 293 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 294 ! (invert order of indices in "o3_regr_lat" because "rlatu" is 295 ! in descending order) 296 297 ! Duplicate January and December values, in preparation of time 298 ! interpolation: 299 o3_regr_lat(:, :, 0, :) = o3_regr_lat(:, :, 12, :) 300 o3_regr_lat(:, :, 13, :) = o3_regr_lat(:, :, 1, :) 301 else 302 print *, "Using 14 months in ozone climatologies..." 303 o3_regr_lat(nbp_lat:1:-1, :, :, :) = regr1_step_av(o3_in, & 304 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 305 ! (invert order of indices in "o3_regr_lat" because "rlatu" is 306 ! in descending order) 307 end if 308 309 ! Regrid in time by linear interpolation: 310 o3_out = regr3_lint(o3_regr_lat, tmidmonth, tmidday) 305 allocate(o3_out(n_lat_out, n_plev, 360, read_climoz)) 306 IF (regr_lat) THEN 307 allocate(o3_regr_lat(nbp_lat, n_plev, 0:13, read_climoz)) 308 309 ! Regrid in latitude: 310 ! We average with respect to sine of latitude, which is 311 ! equivalent to weighting by cosine of latitude: 312 if (n_month == 12) then 313 print *, & 314 "Found 12 months in ozone climatologies, assuming periodicity..." 315 o3_regr_lat(nbp_lat:1:-1, :, 1:12, :) = regr1_step_av(o3_in, & 316 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 317 ! (invert order of indices in "o3_regr_lat" because "rlatu" is 318 ! in descending order) 319 320 ! Duplicate January and December values, in preparation of time 321 ! interpolation: 322 o3_regr_lat(:, :, 0, :) = o3_regr_lat(:, :, 12, :) 323 o3_regr_lat(:, :, 13, :) = o3_regr_lat(:, :, 1, :) 324 else 325 print *, "Using 14 months in ozone climatologies..." 326 o3_regr_lat(nbp_lat:1:-1, :, :, :) = regr1_step_av(o3_in, & 327 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 328 ! (invert order of indices in "o3_regr_lat" because "rlatu" is 329 ! in descending order) 330 end if 331 ! Regrid in time by linear interpolation: 332 o3_out = regr3_lint(o3_in, tmidmonth, tmidday) 333 ELSE 334 ! Regrid in time by linear interpolation: 335 o3_out = regr3_lint(o3_in, tmidmonth, tmidday) 336 ENDIF 311 337 312 338 ! Write to file: 339 313 340 do m = 1, read_climoz 314 call nf95_put_var(ncid_out, varid_out(m), o3_out(nbp_lat:1:-1, :, :, m)) 341 IF (grid_type==unstructured) THEN 342 ! Doing spatial interpolation from XIOS need to have some point in longitude 343 ! waiting zonal mean operation from XIOS 344 call nf95_put_var(ncid_out, varid_out(m), SPREAD(o3_out(n_lat_out:1:-1, :, :, m),1,4)) 345 ELSE 346 call nf95_put_var(ncid_out, varid_out(m), o3_out(n_lat_out:1:-1, :, :, m)) 347 ENDIF 348 315 349 ! (The order of "rlatu" is inverted in the output file) 316 350 end do … … 322 356 !******************************************** 323 357 324 subroutine prepare_out(ncid_in, n_ plev, ncid_out, varid_out, varid_plev, &358 subroutine prepare_out(ncid_in, n_lat, lat, n_plev, ncid_out, varid_out, varid_plev, & 325 359 varid_time) 326 360 … … 328 362 ! dimensions and variables, and writes one of the coordinate variables. 329 363 330 use mod_grid_phy_lmdz, ONLY : nbp_lat331 364 use netcdf95, only: nf95_create, nf95_def_dim, nf95_def_var, & 332 365 nf95_put_att, nf95_enddef, nf95_copy_att, nf95_put_var 333 use netcdf, only: nf90_clobber, nf90_float, nf90_global366 use netcdf, only: nf90_clobber,nf90_netcdf4, nf90_float, nf90_global, nf90_unlimited 334 367 use nrtype, only: pi 335 use regular_lonlat_mod, only : lat_reg 336 integer, intent(in):: ncid_in, n_plev 368 use mod_grid_phy_lmdz, ONLY : grid_type, unstructured 369 370 integer, intent(in):: ncid_in, n_lat, n_plev 371 real, intent(in):: lat(:) 337 372 integer, intent(out):: ncid_out, varid_plev, varid_time 338 373 … … 344 379 345 380 integer ncerr 346 integer dimid_rlatu, dimid_ plev, dimid_time347 integer varid_rl atu381 integer dimid_rlatu, dimid_rlonv, dimid_plev, dimid_time 382 integer varid_rlonv, varid_rlatu 348 383 349 384 !--------------------------- … … 351 386 print *, "Call sequence information: prepare_out" 352 387 353 call nf95_create("climoz_LMDZ.nc", nf90_clobber, ncid_out)388 call nf95_create("climoz_LMDZ.nc", NF90_CLOBBER + NF90_NETCDF4, ncid_out) 354 389 355 390 ! Dimensions: 356 call nf95_def_dim(ncid_out, "time", 360, dimid_time)391 call nf95_def_dim(ncid_out, "time", nf90_unlimited, dimid_time) 357 392 call nf95_def_dim(ncid_out, "plev", n_plev, dimid_plev) 358 call nf95_def_dim(ncid_out, "rlatu", nbp_lat, dimid_rlatu) 393 call nf95_def_dim(ncid_out, "rlatu", n_lat, dimid_rlatu) 394 if (grid_type==unstructured) call nf95_def_dim(ncid_out, "rlonv", 4, dimid_rlonv) 359 395 360 396 ! Define coordinate variables: … … 374 410 call nf95_put_att(ncid_out, varid_rlatu, "standard_name", "latitude") 375 411 412 if (grid_type==unstructured) then 413 call nf95_def_var(ncid_out, "rlonv", nf90_float, dimid_rlonv, varid_rlonv) 414 call nf95_put_att(ncid_out, varid_rlonv, "units", "degrees_east") 415 call nf95_put_att(ncid_out, varid_rlonv, "standard_name", "longitude") 416 endif 417 376 418 ! Define the primary variables: 377 419 378 call nf95_def_var(ncid_out, "tro3", nf90_float, & 420 if (grid_type==unstructured) then 421 call nf95_def_var(ncid_out, "tro3", nf90_float, & 422 (/dimid_rlonv, dimid_rlatu, dimid_plev, dimid_time/), varid_out(1)) 423 else 424 call nf95_def_var(ncid_out, "tro3", nf90_float, & 379 425 (/dimid_rlatu, dimid_plev, dimid_time/), varid_out(1)) 426 endif 427 380 428 call nf95_put_att(ncid_out, varid_out(1), "long_name", & 381 429 "ozone mole fraction") … … 384 432 385 433 if (size(varid_out) == 2) then 386 call nf95_def_var(ncid_out, "tro3_daylight", nf90_float, & 387 (/dimid_rlatu, dimid_plev, dimid_time/), varid_out(2)) 434 if (grid_type==unstructured) then 435 call nf95_def_var(ncid_out, "tro3_daylight", nf90_float, & 436 (/dimid_rlonv, dimid_rlatu, dimid_plev, dimid_time/), varid_out(2)) 437 else 438 call nf95_def_var(ncid_out, "tro3_daylight", nf90_float, & 439 (/ dimid_rlatu, dimid_plev, dimid_time/), varid_out(2)) 440 endif 441 388 442 call nf95_put_att(ncid_out, varid_out(2), "long_name", & 389 443 "ozone mole fraction in daylight") … … 417 471 418 472 ! Write one of the coordinate variables: 419 call nf95_put_var(ncid_out, varid_rlatu, lat _reg(nbp_lat:1:-1) / pi * 180.)473 call nf95_put_var(ncid_out, varid_rlatu, lat(n_lat:1:-1) / pi * 180.) 420 474 ! (convert from rad to degrees and sort in ascending order) 475 if (grid_type==unstructured) call nf95_put_var(ncid_out, varid_rlonv, (/ 0., 90., 180.,270. /)) 421 476 422 477 contains -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/wxios.F90
r3849 r3867 31 31 SUBROUTINE reformadate(odate, ndate) 32 32 CHARACTER(len=*), INTENT(IN) :: odate 33 CHARACTER(len=100), INTENT(OUT) :: ndate33 TYPE(xios_duration) :: ndate 34 34 35 35 INTEGER :: i = 0 … … 46 46 i = INDEX(odate, "day") 47 47 IF (i > 0) THEN 48 ndate = odate(1:i-1)//"d"48 read(odate(1:i-1),*) ndate%day 49 49 END IF 50 50 51 51 i = INDEX(odate, "hr") 52 52 IF (i > 0) THEN 53 ndate = odate(1:i-1)//"h"53 read(odate(1:i-1),*) ndate%hour 54 54 END IF 55 55 56 56 i = INDEX(odate, "mth") 57 57 IF (i > 0) THEN 58 ndate = odate(1:i-1)//"mo"58 read(odate(1:i-1),*) ndate%month 59 59 END IF 60 60 … … 135 135 SUBROUTINE wxios_context_init() 136 136 USE print_control_mod, ONLY : prt_level, lunout 137 USE mod_phys_lmdz_mpi_data, ONLY : COMM_LMDZ_PHY 137 138 IMPLICIT NONE 138 139 … … 141 142 !$OMP MASTER 142 143 !Initialisation du contexte: 143 CALL xios_context_initialize(g_ctx_name, g_comm)144 CALL xios_context_initialize(g_ctx_name, COMM_LMDZ_PHY) 144 145 CALL xios_get_handle(g_ctx_name, xios_ctx) !Récupération 145 146 CALL xios_set_current_context(xios_ctx) !Activation … … 186 187 187 188 !Variables pour xios: 188 TYPE(xios_ time) :: mdtime189 TYPE(xios_duration) :: mdtime 189 190 !REAL(kind = 8) :: year=0, month=0, day=0, hour=0, minute=0, second=0 190 191 191 mdtime = xios_time(0, 0, 0, 0, 0, pasdetemps)192 mdtime%second=pasdetemps 192 193 193 194 !Réglage du calendrier: 194 195 SELECT CASE (calendrier) 195 196 CASE('earth_360d') 196 CALL xios_ set_context_attr_hdl(g_ctx, calendar_type="D360")197 CALL xios_define_calendar("D360") 197 198 IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier terrestre a 360 jours/an' 198 199 CASE('earth_365d') 199 CALL xios_ set_context_attr_hdl(g_ctx, calendar_type="NoLeap")200 CALL xios_define_calendar("NoLeap") 200 201 IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier terrestre a 365 jours/an' 201 202 CASE('earth_366d') 202 CALL xios_ set_context_attr_hdl(g_ctx, calendar_type="Gregorian")203 CALL xios_define_calendar("Gregorian") 203 204 IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier gregorien' 204 205 CASE DEFAULT … … 211 212 212 213 IF (prt_level >= 10) WRITE(lunout,*) "wxios_set_cal: Time origin: ", date 213 214 CALL xios_set_ context_attr_hdl(g_ctx, time_origin = date)214 215 CALL xios_set_time_origin(xios_date(annee,mois,jour,int(heure),0,0)) 215 216 216 217 !Formatage de la date de debut: … … 220 221 IF (prt_level >= 10) WRITE(lunout,*) "wxios_set_cal: Start date: ", date 221 222 222 CALL xios_set_ context_attr_hdl(g_ctx, start_date = date)223 CALL xios_set_start_date(xios_date(ini_an,ini_mois,ini_jour,int(ini_heure),0,0)) 223 224 224 225 !Et enfin,le pas de temps: … … 229 230 SUBROUTINE wxios_set_timestep(ts) 230 231 REAL, INTENT(IN) :: ts 231 TYPE(xios_ time) :: mdtime232 233 mdtime = xios_time(0, 0, 0, 0, 0, ts)232 TYPE(xios_duration) :: mdtime 233 234 mdtime%timestep = ts 234 235 235 236 CALL xios_set_timestep(mdtime) … … 285 286 286 287 !On parametrise le domaine: 287 CALL xios_set_domain_attr_hdl(dom, ni_glo=ni_glo, ibegin=ibegin , ni=ni)288 CALL xios_set_domain_attr_hdl(dom, nj_glo=nj_glo, jbegin=jbegin , nj=nj, data_dim=2)289 CALL xios_set_domain_attr_hdl(dom, lonvalue =io_lon(ibegin:iend), latvalue=io_lat(jbegin:jend))288 CALL xios_set_domain_attr_hdl(dom, ni_glo=ni_glo, ibegin=ibegin-1, ni=ni) 289 CALL xios_set_domain_attr_hdl(dom, nj_glo=nj_glo, jbegin=jbegin-1, nj=nj, data_dim=2) 290 CALL xios_set_domain_attr_hdl(dom, lonvalue_1d=io_lon(ibegin:iend), latvalue_1d=io_lat(jbegin:jend)) 290 291 291 292 IF (.NOT.is_sequential) THEN … … 299 300 WRITE(lunout,*) "wxios_domain_param: mpirank=",mpi_rank," mask(:,nj)=",mask(:,nj) 300 301 ENDIF 301 CALL xios_set_domain_attr_hdl(dom, mask =mask)302 CALL xios_set_domain_attr_hdl(dom, mask_2d=mask) 302 303 END IF 303 304 … … 322 323 REAL :: boundslon_mpi(klon_mpi,nvertex) 323 324 REAL :: boundslat_mpi(klon_mpi,nvertex) 324 TYPE(xios_domain ) :: dom325 TYPE(xios_domaingroup) :: dom 325 326 326 327 … … 331 332 332 333 !$OMP MASTER 333 CALL xios_get_domain _handle("dom_glo", dom)334 CALL xios_get_domaingroup_handle("dom_glo", dom) 334 335 335 336 !On parametrise le domaine: 336 CALL xios_set_ domain_attr_hdl(dom, ni_glo=klon_glo, ibegin=ij_begin, ni=ij_nb, data_dim=1, type="unstructured")337 CALL xios_set_ domain_attr_hdl(dom, nvertex=nvertex, lonvalue=lon_mpi, latvalue=lat_mpi, bounds_lon=TRANSPOSE(boundslon_mpi), bounds_lat=TRANSPOSE(boundslat_mpi) )337 CALL xios_set_attr(dom, ni_glo=klon_glo, ibegin=ij_begin-1, ni=ij_nb, type="unstructured") 338 CALL xios_set_attr(dom, nvertex=nvertex, lonvalue_1d=lon_mpi, latvalue_1d=lat_mpi, bounds_lon_1d=TRANSPOSE(boundslon_mpi), bounds_lat_1d=TRANSPOSE(boundslat_mpi) ) 338 339 !$OMP END MASTER 339 340 … … 375 376 376 377 ! Ehouarn: New way to declare axis, without axis_group: 377 CALL xios_set_axis_attr(trim(axis_id), size=axis_size,value=axis_value)378 CALL xios_set_axis_attr(trim(axis_id),n_glo=axis_size,value=axis_value) 378 379 379 380 !Vérification: … … 400 401 TYPE(xios_file) :: x_file 401 402 TYPE(xios_filegroup) :: x_fg 402 CHARACTER(len=100) :: nffreq 403 ! CHARACTER(len=100) :: nffreq 404 TYPE(xios_duration) :: nffreq 403 405 404 406 !On regarde si le fichier n'est pas défini par XML: … … 413 415 !On configure: 414 416 CALL xios_set_file_attr_hdl(x_file, name="X"//fname,& 415 output_freq= TRIM(ADJUSTL(nffreq)), output_level=flvl, enabled=.TRUE.)417 output_freq=nffreq, output_level=flvl, enabled=.TRUE.) 416 418 417 419 IF (xios_is_valid_file("X"//fname)) THEN 418 420 IF (prt_level >= 10) THEN 419 421 WRITE(lunout,*) "wxios_add_file: New file: ", "X"//fname 420 WRITE(lunout,*) "wxios_add_file: output_freq=", TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl422 WRITE(lunout,*) "wxios_add_file: output_freq=",nffreq,"; output_lvl=",flvl 421 423 ENDIF 422 424 ELSE 423 425 WRITE(lunout,*) "wxios_add_file: Error, invalid file: ", "X"//trim(fname) 424 WRITE(lunout,*) "wxios_add_file: output_freq=", TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl426 WRITE(lunout,*) "wxios_add_file: output_freq=",nffreq,"; output_lvl=",flvl 425 427 END IF 426 428 ELSE … … 492 494 TYPE(xios_field) :: field 493 495 TYPE(xios_fieldgroup) :: fieldgroup 496 TYPE(xios_duration) :: freq_op 494 497 LOGICAL :: bool=.FALSE. 495 498 INTEGER :: lvl =0 … … 550 553 551 554 !L'operation, sa frequence: 552 CALL xios_set_field_attr_hdl(field, field_ref=fieldname, operation=TRIM(ADJUSTL(operation)), freq_op="1ts", prec=4) 555 freq_op%timestep=1 556 CALL xios_set_field_attr_hdl(field, field_ref=fieldname, operation=TRIM(ADJUSTL(operation)), freq_op=freq_op, prec=4) 553 557 554 558
Note: See TracChangeset
for help on using the changeset viewer.