Changeset 529 for XIOS/branchs
- Timestamp:
- 12/04/14 15:36:07 (10 years ago)
- Location:
- XIOS/branchs/xios-1.0
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/branchs/xios-1.0/inputs/COMPLETE/context_atmosphere.xml
r486 r529 1 1 <!-- Context atm --> 2 2 3 <context id="atmo pshere" calendar_type="Gregorian" start_date="2012-03-01 15:00:00" time_origin="2012-02-29 15:00:00">3 <context id="atmosphere" calendar_type="Gregorian" start_date="2012-03-01 15:00:00" time_origin="2012-02-29 15:00:00"> 4 4 5 5 <field_definition level="1" enabled=".FALSE." default_value="9.96921e+36"> … … 26 26 </domain_definition> 27 27 28 <grid_definition />29 30 28 </context> -
XIOS/branchs/xios-1.0/inputs/COMPLETE/context_surface.xml
r513 r529 24 24 <field field_ref="field_A_srf" name="field_A_srf_prec4" prec="8"/> 25 25 <field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 6h" operation="average" freq_op="1h" > @field_A_srf_max </field> 26 <variable id="my_global_attribute " type="string" >file_6h</variable>26 <variable id="my_global_attribute_xml" type="string" >file_6h</variable> 27 27 </file> 28 28 … … 39 39 <field field_ref="field_A_srf" name="field_A_srf_prec4" prec="8"/> 40 40 <field field_ref="field_A_srf_max" name="field_A_srf_mean_max" long_name="Average of hourly maximum over 1d" operation="average" freq_op="1h" > @field_A_srf_max </field> 41 <variable id="my_global_attribute" type="string" >file_1d</variable>42 41 </file> 43 42 </file_definition> … … 51 50 </domain_definition> 52 51 53 <grid_definition />54 55 52 </context> -
XIOS/branchs/xios-1.0/src/interface/fortran/ixios.F90
r519 r529 157 157 158 158 PUBLIC :: txios(domain), txios(domaingroup),txios(field), txios(fieldgroup),txios(file), txios(filegroup), & 159 txios(grid), txios(gridgroup), txios(axis), txios(axisgroup),txios(context), txios(date),txios(time) 159 txios(grid), txios(gridgroup), txios(axis), txios(axisgroup),txios(context), txios(date), & 160 txios(time), txios(variable) 160 161 161 162 PUBLIC :: xios(set_attr), xios(set_domain_attr), xios(set_domaingroup_attr), xios(set_fieldgroup_attr), & -
XIOS/branchs/xios-1.0/src/test/test_complete.f90
r501 r529 20 20 TYPE(xios_fieldgroup) :: fieldgroup_hdl 21 21 TYPE(xios_file) :: file_hdl 22 TYPE(xios_variable) :: var_hdl 22 23 LOGICAL :: ok 23 CHARACTER(len=256) :: crname 24 24 CHARACTER(len=256) :: crname, str_temp 25 25 DOUBLE PRECISION,DIMENSION(ni_glo,nj_glo) :: lon_glo,lat_glo 26 26 DOUBLE PRECISION :: field_A_glo(ni_glo,nj_glo,llm) … … 29 29 INTEGER :: ni,ibegin,iend,nj,jbegin,jend 30 30 INTEGER :: i,j,l,ts,n, nb_pt 31 INTEGER :: iret 31 32 32 33 !!! MPI Initialization … … 45 46 46 47 !########################################################################### 47 ! Contexte ATM48 !########################################################################### 49 50 !!! Initiali sation des coordonnées globales et locales pour la grille réguliÚre48 ! ATM Context 49 !########################################################################### 50 51 !!! Initialization of global and local coordinates for regular grid 51 52 52 53 DO j=1,nj_glo … … 77 78 78 79 79 !!! Context ATMOSPHERE80 !!! ATMOSPHERE context 80 81 81 82 CALL xios_context_initialize("atmosphere",comm) … … 97 98 CALL xios_set_domain_attr("domain_atm_zoom",lonvalue=RESHAPE(lon,(/ni*nj/)),latvalue=RESHAPE(lat,(/ni*nj/))) 98 99 99 !!! Activation du groupe field_definition100 !!! field_definition group activation 100 101 101 102 CALL xios_set_fieldgroup_attr("field_definition",enabled=.TRUE.) 102 103 103 !!! Cr éation d un nouveau champ104 !!! Creation of new field 104 105 105 106 CALL xios_get_handle("field_definition",fieldgroup_hdl) 106 107 CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B_atm") 107 108 108 !!! Heritage des attributs d un autre champ109 !!! Attribute inheritance from another field 109 110 110 111 CALL xios_set_attr(field_hdl,field_ref="field_A_atm",name="field_B_atm") 111 112 112 !!! A ffectation de ce nouveau champ au fichier avec un nouveau nom113 !!! Assign new field into a file (with a new name) 113 114 114 115 CALL xios_get_handle("output_atmosphere",file_hdl) … … 116 117 CALL xios_set_attr(field_hdl,field_ref="field_B_atm",name="field_C_atm") 117 118 118 !!! Definition du timestep119 !!! Timestep definition 119 120 120 121 dtime%second=3600 121 122 CALL xios_set_timestep(dtime) 122 123 123 !!! Recupration des valeurs des longitudes et de taille des domaines locaux (pour test de fonctionnalité)124 !!! Get longitude values and local domain sizes (to check functionality) 124 125 125 126 ni=0 ; lonvalue(:)=0 … … 129 130 PRINT *,"lonvalue",lonvalue ; 130 131 131 !!! Fin de la definition du contexte132 !!! End of context definition 132 133 133 134 CALL xios_close_context_definition() 134 135 135 !!! Test des valeurs des champs/fichiers136 137 !!! Attribut defini ?136 !!! Test on fields/files values 137 138 !!! Is an attribute defined ? 138 139 139 140 CALL xios_is_defined_field_attr("field_A_atm",enabled=ok) 140 141 PRINT *,"field_A_atm : attribute enabled is defined ? ",ok 141 142 142 !!! Recuperer la valeur d un attribut143 !!! Get an attibute value 143 144 144 145 CALL xios_get_field_attr("field_A_atm",name=crname) 145 146 PRINT *,"field_A_atm : attribute name is : ",TRIM(crname) 146 147 147 !!! Champ actif (besoin de fournir la valeur) ?148 !!! Is a field active (i.e need to give the value ) ? 148 149 149 150 PRINT*,"field field_A_atm is active ? ",xios_field_is_active("field_A_atm") 150 151 151 !!! Champ defini?152 !!! Is a field defined ? 152 153 153 154 PRINT*,"field field_A_atm is valid ?",xios_is_valid_field("field_A_atm") … … 155 156 156 157 !########################################################################### 157 ! Contexte SRF158 !########################################################################### 159 160 !!! Initiali sation des coordonnées globales et locales pour la grille indexee (1 point sur 2)158 ! SRF Context 159 !########################################################################### 160 161 !!! Initialization of global and local coordinates for indexed grid (1 point every 2 points) 161 162 162 163 nb_pt=ni*nj/2 … … 181 182 CALL xios_set_domain_attr("domain_srf",lonvalue=RESHAPE(lon,(/ni*nj/)),latvalue=RESHAPE(lat,(/ni*nj/))) 182 183 183 !!! Cr éation d un nouveau champ184 !!! Creation of new field 184 185 185 186 CALL xios_get_handle("field_definition",fieldgroup_hdl) 186 187 CALL xios_add_child(fieldgroup_hdl,field_hdl,"field_B_srf") 187 188 188 !!! Heritage des attributs d un autre champ189 !!! Attribute inheritance from another field 189 190 190 191 CALL xios_set_attr(field_hdl,field_ref="field_A_srf",name="field_B_srf") 191 192 !!! A ffectation de ce nouveau champ au fichier avec un nouveau nom192 193 !!! Assign new field into a file (with a new name) 193 194 194 195 CALL xios_get_handle("output_surface",file_hdl) 195 196 CALL xios_add_child(file_hdl,field_hdl) 196 197 CALL xios_set_attr(field_hdl,field_ref="field_B_srf",name="field_C_srf") 197 198 !!! Definition du timestep 198 199 !!! Add a variable as field local attribute 200 201 CALL xios_add_child(field_hdl,var_hdl,"my_local_attribute") 202 CALL xios_set_attr(var_hdl,type="string") 203 iret=xios_setVar("my_local_attribute","attribute_local") 204 205 !!! Add a variable as file global attribute 206 207 CALL xios_add_child(file_hdl,var_hdl,"my_global_attribute") 208 CALL xios_set_attr(var_hdl,type="string") 209 iret=xios_setVar("my_global_attribute","attribute_global") 210 211 !!! Modify a variable used as attribute (defined in xml file) 212 213 iret=xios_setVar("my_global_attribute_xml","6h_file") 214 215 !!! Get the value of a variable (defined in xml file) 216 217 iret=xios_getVar("my_attribute1",str_temp) 218 PRINT *, "my_attribute1 is :",TRIM(str_temp) 219 220 !!! Timestep definition 199 221 200 222 dtime%second=1800 201 223 CALL xios_set_timestep(dtime) 202 224 203 !!! Recupration des valeurs des longitudes et de taille des domaines locaux (pour test de fonctionnalité)225 !!! Get longitude values and local domain sizes (to check functionality) 204 226 205 227 ni=0 ; lonvalue(:)=0 … … 209 231 PRINT *,"lonvalue",lonvalue ; 210 232 211 !!! Fin de la definition du contexte SRF233 !!! End of SRF context definition 212 234 213 235 CALL xios_close_context_definition() 214 236 215 216 !#################################################################################### 217 !!! Boucle temporelle 237 !#################################################################################### 238 !!! Loop on timesteps 218 239 !#################################################################################### 219 240 … … 223 244 CALL xios_set_current_context(ctx_hdl) 224 245 225 !!! Mise a jour du pas de temps246 !!! Update of calendar 226 247 227 248 CALL xios_update_calendar(ts) 228 249 229 !!! On donne la valeur du champ atm250 !!! Put the value of atm field 230 251 231 252 CALL xios_send_field("field_A_atm",field_A_atm) 232 253 233 !!! On change de contexte254 !!! Change of context 234 255 235 256 CALL xios_get_handle("surface",ctx_hdl) 236 257 CALL xios_set_current_context(ctx_hdl) 237 258 238 !!! Mise a jour du pas de temps259 !!! Update of calendar 239 260 240 261 CALL xios_update_calendar(ts) 241 262 242 !!! On donne la valeur du champ srf263 !!! Put the value of srf field 243 264 244 265 CALL xios_send_field("field_A_srf",field_A_srf) … … 248 269 249 270 !#################################################################################### 250 !!! Finali sation251 !#################################################################################### 252 253 !!! Fin descontextes254 271 !!! Finalization 272 !#################################################################################### 273 274 !!! End of contextes 275 255 276 CALL xios_context_finalize() 256 277 CALL xios_get_handle("atmosphere",ctx_hdl) … … 258 279 CALL xios_context_finalize() 259 280 260 !!! Fin deXIOS281 !!! End of XIOS 261 282 262 283 CALL xios_finalize()
Note: See TracChangeset
for help on using the changeset viewer.