Changeset 2001
- Timestamp:
- Apr 3, 2014, 3:52:45 PM (11 years ago)
- Location:
- LMDZ5/trunk
- Files:
-
- 3 added
- 4 edited
- 7 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/DefLists/field_def_lmdz.xml
r1997 r2001 1 1 <field_definition level="1" prec="4" operation="average" freq_op="1ts" enabled=".FALSE."> 2 3 <field_group id="fields_1D" grid_ref="vertical"> 4 <field id="Ap" long_name="Hybrid coordinate: pressure part" unit="Pa" /> 5 <field id="Bp" long_name="Hybrid coordinate: sigma part" unit="-" /> 6 <field id="Alt" long_name="Pseudo-altitude (for an 8km scale height)" unit="km" /> 7 </field_group> 8 2 9 <field_group id="fields_2D" domain_ref="dom_glo"> 3 <field id="Ap" long_name="-" unit="-" />4 <field id="Bp" long_name="-" unit="-" />5 <field id="Alt" long_name="-" unit="-" />6 10 <field id="phis" long_name="Surface geop.height" unit="m2/s2" /> 7 11 <field id="aire" long_name="Grid area" unit="-" /> … … 324 328 <field id="lcc" long_name="Cloud liquid fraction at top of cloud" unit="1" /> 325 329 <field id="wvapp" long_name="-" unit="-" /> 330 <field id="ozone_daylight" long_name="Daylight ozone mole fraction" unit="-" /> 326 331 <field id="albe_ter" long_name="Albedo VIS surf. ter" unit="-" /> 327 332 <field id="albe_lic" long_name="Albedo VIS surf. lic" unit="-" /> … … 386 391 <field id="rhum" long_name="Relative humidity" unit="-" /> 387 392 <field id="ozone" long_name="Ozone mole fraction" unit="-" /> 388 <field id="ozone_daylight" long_name="Daylight ozone mole fraction" unit="-" />389 393 <field id="upwd" long_name="saturated updraft" unit="kg/m2/s" /> 390 394 <field id="dtphy" long_name="Physics dT" unit="K/s" /> … … 498 502 <field id="rldcs4co2" long_name="Downwelling CS LW 4xCO2 atmosphere" unit="W/m2" /> 499 503 </field_group> 504 505 <field_group id="fields_NMC" domain_ref="dom_glo" axis_ref="plev"> 506 <field id="tnondef" long_name="Undefined value of T" unit="K" /> 507 <field id="ta" long_name="Air temperature" unit="K" /> 508 <field id="zg" long_name="Geopotential height" unit="m" /> 509 <field id="hus" long_name="Specific humidity" unit="1" /> 510 <field id="hur" long_name="Relative humidity" unit="%" /> 511 <field id="ua" long_name="Eastward wind" unit="m s-1" /> 512 <field id="va" long_name="Northward wind" unit="m s-1" /> 513 <field id="wap" long_name="Lagrangian tendency of air pressure" unit="Pa s-1" /> 514 <field id="psbg" long_name="Pressure sfce below ground" unit="%" /> 515 <field id="tro3" long_name="Ozone mole fraction" unit="1e-9" /> 516 <field id="tro3_daylight" long_name="Daylight ozone mole fraction" unit="1e-9" /> 517 <field id="uv" long_name="uv" unit="m2/s2" /> 518 <!-- a field called "vq" is already defined... 519 <field id="vq" long_name="vq" unit="m/s * (kg/kg)" /> --> 520 <field id="vT" long_name="vT" unit="mK/s" /> 521 <field id="wq" long_name="wq" unit="(Pa/s)*(kg/kg)" /> 522 <field id="vphi" long_name="vphi" unit="m2/s" /> 523 <field id="wT" long_name="wT" unit="K*Pa/s" /> 524 <field id="uxu" long_name="u2" unit="m2/s2" /> 525 <field id="vxv" long_name="v2" unit="m2/s2" /> 526 <field id="TxT" long_name="T2" unit="K2" /> 527 </field_group> 528 500 529 </field_definition> -
LMDZ5/trunk/DefLists/iodef.xml
r1907 r2001 1 1 <?xml version="1.0"?> 2 2 <simulation> 3 <context id="LMDZ" calendar_type="D360" start_date="1980-01-01 00:00:00">4 5 <!-- Définition des variables -->6 <field_definition src="./iodef_fields.xml"/>7 8 <!-- Définition des fichiers de sortie9 Chaque fichier contient la liste de toutes les variables10 et leur niveau de sortie pour ce fichier, afin de coller11 à l'utilisation des niveaux de sortie que fait LMDZ. -->12 13 <file_definition src="./iodef_file_histday.xml"/>14 <file_definition src="./iodef_file_histhf.xml"/>15 <file_definition src="./iodef_file_histins.xml"/>16 <file_definition src="./iodef_file_histLES.xml"/>17 <file_definition src="./iodef_file_histmth.xml"/>18 <file_definition src="./iodef_file_histstn.xml"/>19 20 <!-- Définition des domaines et groupes de domaines -->21 <domain_definition>22 <domain id="dom_glo" data_dim="2" />23 </domain_definition>24 25 <!-- Définition des groupes d'axes verticaux26 (LMDZ va ensuite déclarer dans chaque groupe un axe différent par fichier) -->27 <axis_definition>28 <axis_group id="presnivs" standard_name="Vertical levels" unit="Pa">29 </axis_group>30 <axis_group id="Ahyb" standard_name="Ahyb comp of Hyb Cord" unit="Pa">31 </axis_group>32 <axis_group id="Bhyb" standard_name="Bhyb comp of Hyb Cord" unit="">33 </axis_group>34 <axis_group id="Alt" standard_name="Height approx for scale heigh of 8km at levels" unit="Km">35 </axis_group>36 </axis_definition>37 </context>38 3 39 4 <context id="xios"> … … 50 15 </variable_definition> 51 16 </context> 17 18 19 <context id="LMDZ" calendar_type="D360" start_date="1980-01-01 00:00:00"> 20 21 <!-- Define available variables --> 22 <field_definition src="./field_def_lmdz.xml"/> 23 24 <!-- Define output files 25 Each file contains the list of variables and their output levels --> 26 27 <file_definition src="./file_def_histday_lmdz.xml"/> 28 <file_definition src="./file_def_histhf_lmdz.xml"/> 29 <file_definition src="./file_def_histins_lmdz.xml"/> 30 <file_definition src="./file_def_histLES_lmdz.xml"/> 31 <file_definition src="./file_def_histmth_lmdz.xml"/> 32 <file_definition src="./file_def_histstn_lmdz.xml"/> 33 <file_definition src="./file_def_histmthNMC_lmdz.xml"/> 34 <file_definition src="./file_def_histdayNMC_lmdz.xml"/> 35 <file_definition src="./file_def_histhfNMC_lmdz.xml"/> 36 37 <!-- Define domains and groups of domains --> 38 <domain_definition> 39 <domain id="dom_glo" data_dim="2" /> 40 </domain_definition> 41 42 <!-- Need to define a grid? Do it here 43 <grid_definition> 44 <grid_group id="vertical" axis_ref="presnivs" /> 45 </grid_definition> 46 --> 47 48 <!-- Define groups of vertical axes --> 49 <axis_definition> 50 <axis_group id="presnivs" standard_name="Vertical levels" unit="Pa"> 51 </axis_group> 52 <axis_group id="Ahyb" standard_name="Ahyb comp of Hyb Cord" unit="Pa"> 53 </axis_group> 54 <axis_group id="Bhyb" standard_name="Bhyb comp of Hyb Cord" unit=""> 55 </axis_group> 56 <axis_group id="Alt" standard_name="Height approx for scale heigh of 8km at levels" unit="km"> 57 </axis_group> 58 <axis_group id="plev" standard_name="model_level_number" unit="Pa"> 59 </axis_group> 60 </axis_definition> 61 </context> 62 63 52 64 </simulation> -
LMDZ5/trunk/libf/bibio/wxios.F90
r1907 r2001 26 26 27 27 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 28 ! str + i => str_i !!!!!!!!!!!!!!!!!!!!29 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!30 31 SUBROUTINE concat(str, str2, str_str2)32 CHARACTER(len=*), INTENT(IN) :: str, str233 CHARACTER(len=20), INTENT(OUT) :: str_str234 35 36 str_str2 = TRIM(ADJUSTL(str//"_"//TRIM(ADJUSTL(str2))))37 !IF (prt_level >= 10) WRITE(lunout,*) "Xios. ",str,"+",str2,"=",str_str238 END SUBROUTINE concat39 40 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!41 28 ! 36day => 36d etc !!!!!!!!!!!!!!!!!!!! 42 29 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 158 145 g_ctx = xios_ctx 159 146 160 IF (prt_level >= 10) WRITE(lunout,*) "wxios_context_init: Current context is ",trim(g_ctx_name) 161 147 IF (prt_level >= 10) THEN 148 WRITE(lunout,*) "wxios_context_init: Current context is ",trim(g_ctx_name) 149 WRITE(lunout,*) " now call xios_solve_inheritance()" 150 ENDIF 162 151 !Une première analyse des héritages: 163 152 CALL xios_solve_inheritance() … … 313 302 TYPE(xios_axisgroup) :: axgroup 314 303 TYPE(xios_axis) :: ax 315 CHARACTER(len=20) :: axis_id 316 317 318 !Préparation du nom de l'axe: 319 CALL concat(axisgroup_id, axis_file, axis_id) 304 CHARACTER(len=50) :: axis_id 305 306 IF (len_trim(axisgroup_id).gt.len(axis_id)) THEN 307 WRITE(lunout,*) "wxios_add_vaxis: error, size of axis_id too small!!" 308 WRITE(lunout,*) " increase it to at least ",len_trim(axisgroup_id) 309 CALL abort_gcm("wxios_add_vaxis","len(axis_id) too small",1) 310 ENDIF 311 axis_id=trim(axisgroup_id) 320 312 321 313 !On récupère le groupe d'axes qui va bien: … … 332 324 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_vaxis: Axis created: ", TRIM(ADJUSTL(axis_id)) 333 325 ELSE 334 WRITE( *,*) "wxios_add_vaxis: Invalid axis: ", TRIM(ADJUSTL(axis_id))326 WRITE(lunout,*) "wxios_add_vaxis: Invalid axis: ", TRIM(ADJUSTL(axis_id)) 335 327 END IF 336 328 … … 367 359 368 360 IF (xios_is_valid_file("X"//fname)) THEN 369 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_file: New file: ", "X"//fname 370 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl 361 IF (prt_level >= 10) THEN 362 WRITE(lunout,*) "wxios_add_file: New file: ", "X"//fname 363 WRITE(lunout,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl 364 ENDIF 371 365 ELSE 372 WRITE( *,*) "wxios_add_file: Error, invalid file: ", "X"//trim(fname)373 WRITE( *,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl366 WRITE(lunout,*) "wxios_add_file: Error, invalid file: ", "X"//trim(fname) 367 WRITE(lunout,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl 374 368 END IF 375 369 ELSE 376 IF (prt_level >= 10) WRITE(lunout,*) "wxios_add_file: File ",trim(fname), " défined using XML." 377 CALL xios_set_file_attr(fname, enabled=.TRUE.) 370 IF (prt_level >= 10) THEN 371 WRITE(lunout,*) "wxios_add_file: File ",trim(fname), " défined using XML." 372 ENDIF 373 ! Ehouarn: add an enable=.true. on top of xml definitions... why??? 374 CALL xios_set_file_attr(fname, enabled=.TRUE.) 378 375 END IF 379 376 END SUBROUTINE wxios_add_file … … 432 429 CHARACTER(len=*), INTENT(IN) :: op 433 430 434 CHARACTER(len=20) :: axis_id 431 CHARACTER(len=20) :: axis_id ! Ehouarn: dangerous... 435 432 CHARACTER(len=100) :: operation 436 433 TYPE(xios_file) :: f … … 441 438 442 439 443 !Préparation du nom de l'axe: 444 CALL concat("presnivs", fname, axis_id) 440 ! Ajout Abd pour NMC: 441 IF (fid.LE.6) THEN 442 axis_id="presnivs" 443 ELSE 444 axis_id="plev" 445 ENDIF 445 446 446 447 !on prépare le nom de l'opération: … … 448 449 449 450 450 451 451 !On selectionne le bon groupe de champs: 452 452 IF (fdim.EQ.2) THEN 453 453 CALL xios_get_fieldgroup_handle("fields_2D", fieldgroup) 454 454 ELSE 455 455 CALL xios_get_fieldgroup_handle("fields_3D", fieldgroup) -
LMDZ5/trunk/libf/phylmd/iophy.F90
r1907 r2001 568 568 INCLUDE "temps.h" 569 569 INCLUDE "clesphys.h" 570 INCLUDE "iniprint.h" 570 571 571 572 INTEGER :: iff … … 602 603 603 604 #ifdef CPP_XIOS 605 IF ( var%flag(iff)<=lev_files(iff) ) THEN 604 606 CALL wxios_add_field_to_file(var%name, 2, iff, phys_out_filenames(iff), & 605 607 var%description, var%unit, var%flag(iff), typeecrit) 608 IF (prt_level >= 10) THEN 609 WRITE(lunout,*) 'histdef2d: call wxios_add_field_to_file var%name iff: ', & 610 trim(var%name),iff 611 ENDIF 612 ENDIF 606 613 #endif 607 614 #ifndef CPP_NO_IOIPSL … … 628 635 END IF 629 636 END SUBROUTINE histdef2d 637 630 638 SUBROUTINE histdef3d (iff,var) 631 639 … … 645 653 INCLUDE "temps.h" 646 654 INCLUDE "clesphys.h" 655 INCLUDE "iniprint.h" 647 656 648 657 INTEGER :: iff … … 679 688 680 689 #ifdef CPP_XIOS 690 IF ( var%flag(iff)<=lev_files(iff) ) THEN 681 691 CALL wxios_add_field_to_file(var%name, 3, iff, phys_out_filenames(iff), & 682 692 var%description, var%unit, var%flag(iff), typeecrit) 693 IF (prt_level >= 10) THEN 694 WRITE(lunout,*) 'histdef3d: call wxios_add_field_to_file var%name iff: ', & 695 trim(var%name),iff 696 ENDIF 697 ENDIF 683 698 #endif 684 699 #ifndef CPP_NO_IOIPSL … … 881 896 882 897 INTEGER :: iff, iff_beg, iff_end 883 898 LOGICAL, SAVE :: firstx 899 !$OMP THREADPRIVATE(firstx) 900 884 901 REAL,DIMENSION(klon_mpi) :: buffer_omp 885 902 INTEGER, allocatable, DIMENSION(:) :: index2d … … 889 906 REAL, ALLOCATABLE, DIMENSION(:) :: fieldok 890 907 891 IF (prt_level >= 10) WRITE(lunout,*)'Begin histwrite2d_phy ',trim(var%name) 892 908 IF (prt_level >= 10) THEN 909 WRITE(lunout,*)'Begin histwrite2d_phy for ',trim(var%name) 910 ENDIF 893 911 ! ug RUSTINE POUR LES STD LEVS..... 894 912 IF (PRESENT(STD_iff)) THEN … … 925 943 926 944 ! La boucle sur les fichiers: 945 firstx=.true. 927 946 DO iff=iff_beg, iff_end 928 947 IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN 929 948 949 #ifdef CPP_XIOS 950 IF (firstx) THEN 951 if (prt_level >= 10) then 952 write(lunout,*)'Dans iophy histwrite2D,iff,var%name ',& 953 iff,trim(var%name) 954 write(lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call wxios_write_2D" 955 endif 956 CALL wxios_write_2D(var%name, Field2d) 957 firstx=.false. 958 ENDIF 959 #endif 960 930 961 IF(.NOT.clef_stations(iff)) THEN 931 962 ALLOCATE(index2d(iim*jj_nb)) … … 934 965 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field2d,iim*jj_nb,index2d) 935 966 #endif 936 #ifdef CPP_XIOS937 IF (iff == iff_beg) THEN938 if (prt_level >= 10) then939 write(lunout,*)"histwrite2d_phy: .NOT.clef_stations(iff) and iff==iff_beg, call wxios_write_2D"940 endif941 CALL wxios_write_2D(var%name, Field2d)942 ENDIF943 #endif967 !#ifdef CPP_XIOS 968 ! IF (iff == iff_beg) THEN 969 ! if (prt_level >= 10) then 970 ! write(lunout,*)"histwrite2d_phy: .NOT.clef_stations(iff) and iff==iff_beg, call wxios_write_2D" 971 ! endif 972 ! CALL wxios_write_2D(var%name, Field2d) 973 ! ENDIF 974 !#endif 944 975 ELSE 945 976 ALLOCATE(fieldok(npstn)) … … 1001 1032 1002 1033 INTEGER :: iff, iff_beg, iff_end 1003 1034 LOGICAL, SAVE :: firstx 1035 !$OMP THREADPRIVATE(firstx) 1004 1036 REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp 1005 1037 REAL :: Field3d(iim,jj_nb,SIZE(field,2)) 1006 INTEGER :: ip, n, nlev 1038 INTEGER :: ip, n, nlev, nlevx 1007 1039 INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d 1008 1040 REAL,ALLOCATABLE, DIMENSION(:,:) :: fieldok … … 1033 1065 IF (SIZE(field,1)/=klon) CALL abort_gcm('iophy::histwrite3d','Field first DIMENSION not equal to klon',1) 1034 1066 nlev=SIZE(field,2) 1035 1067 if (nlev.eq.klev+1) then 1068 nlevx=klev 1069 else 1070 nlevx=nlev 1071 endif 1036 1072 1037 1073 CALL Gather_omp(field,buffer_omp) … … 1041 1077 1042 1078 ! BOUCLE SUR LES FICHIERS 1079 firstx=.true. 1043 1080 DO iff=iff_beg, iff_end 1044 1081 IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN 1082 #ifdef CPP_XIOS 1083 IF (firstx) THEN 1084 if (prt_level >= 10) then 1085 write(lunout,*)'Dans iophy, histwrite3D iff nlev klev firstx', & 1086 iff,nlev,klev, firstx 1087 write(lunout,*)'histwrite3d_phy: call wxios_write_3D for ', & 1088 trim(var%name), ' with iim jjm nlevx = ', & 1089 iim,jj_nb,nlevx 1090 endif 1091 CALL wxios_write_3D(var%name, Field3d(:,:,1:nlevx)) 1092 firstx=.false. 1093 ENDIF 1094 #endif 1045 1095 IF (.NOT.clef_stations(iff)) THEN 1046 1096 ALLOCATE(index3d(iim*jj_nb*nlev)) … … 1051 1101 #endif 1052 1102 1053 #ifdef CPP_XIOS1054 IF (iff == 1) THEN1055 CALL wxios_write_3D(var%name, Field3d(:,:,1:klev))1056 ENDIF1057 #endif1058 1103 !#ifdef CPP_XIOS 1104 ! IF (iff == 1) THEN 1105 ! CALL wxios_write_3D(var%name, Field3d(:,:,1:klev)) 1106 ! ENDIF 1107 !#endif 1108 ! 1059 1109 ELSE 1060 1110 nlev=size(field,2) … … 1204 1254 ALLOCATE(index3d(iim*jj_nb*nlev)) 1205 1255 ALLOCATE(fieldok(iim*jj_nb,nlev)) 1206 CALL wxios_write_3D(field_name, Field3d(:,:,1: klev))1256 CALL wxios_write_3D(field_name, Field3d(:,:,1:nlev)) 1207 1257 1208 1258 ELSE -
LMDZ5/trunk/libf/phylmd/phys_output_mod.F90
r1971 r2001 306 306 #ifdef CPP_XIOS 307 307 !!! Ouverture de chaque fichier XIOS !!!!!!!!!!! 308 if (prt_level >= 10) then 309 print*,'phys_output_open: call wxios_add_file with phys_out_filenames(iff)=',trim(phys_out_filenames(iff)) 310 endif 308 311 CALL wxios_add_file(phys_out_filenames(iff),chtimestep(iff),lev_files(iff)) 309 print*,'wxios_add_file phys_out_filenames(iff)',phys_out_filenames(iff)310 312 311 313 !!! Declaration des axes verticaux de chaque fichier: 312 print*,'Declaration des axes verticaux de chaque fichier ' 314 if (prt_level >= 10) then 315 print*,'phys_output_open: Declare vertical axes for each file' 316 endif 313 317 if (iff.le.6) then 314 318 CALL wxios_add_vaxis("presnivs", phys_out_filenames(iff), & … … 318 322 CALL wxios_add_vaxis("Bhyb", phys_out_filenames(iff), & 319 323 levmax(iff) - levmin(iff) + 1, Bhyb) 320 CALL wxios_add_vaxis("A hyb", phys_out_filenames(iff), &324 CALL wxios_add_vaxis("Alt", phys_out_filenames(iff), & 321 325 levmax(iff) - levmin(iff) + 1, Alt) 322 326 else 327 ! NMC files 323 328 CALL wxios_add_vaxis("plev", phys_out_filenames(iff), & 324 329 levmax(iff) - levmin(iff) + 1, rlevSTD(levmin(iff):levmax(iff))) … … 362 367 else IF (clef_stations(iff)) THEN 363 368 364 WRITE(lunout,*)'phys_output_mod phys_out_filenames=',phys_out_filenames(iff) 365 369 if (prt_level >= 10) then 370 WRITE(lunout,*)'phys_output_open: iff=',iff,' phys_out_filenames(iff)=',phys_out_filenames(iff) 371 endif 372 366 373 CALL histbeg_phy_all(rlon,rlat,pim,tabij,ipt,jpt,plon,plat,plon_bounds,plat_bounds, & 367 374 phys_out_filenames(iff), & … … 491 498 ecrit_ins = ecrit_files(6) 492 499 493 WRITE(lunout,*)'swaero_diag=',swaero_diag 494 WRITE(lunout,*)'Fin phys_output_mod.F90' 500 if (prt_level >= 10) then 501 WRITE(lunout,*)'swaero_diag=',swaero_diag 502 WRITE(lunout,*)'phys_output_open: ends here' 503 endif 495 504 496 505 end SUBROUTINE phys_output_open
Note: See TracChangeset
for help on using the changeset viewer.