Changeset 3055
- Timestamp:
- Sep 27, 2023, 2:54:29 PM (14 months ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/changelog.txt
r3054 r3055 4215 4215 Upgrade of "testphys1d" to Fortran 90. Cleaning of the subroutine and minor optimizations of the code. 4216 4216 Correction of a bug: 'inertiedat(1,1)' was overwritten by 'inertieice'. 4217 4218 == 27/09/2023 == EM 4219 Add extra tests for XIOS output: only combine and send fields to XIOS if the 4220 user requests them in one of the output files. -
trunk/LMDZ.MARS/libf/phymars/write_output_mod.F90
r2976 r3055 17 17 ! For a surface field 18 18 #ifdef CPP_XIOS 19 use xios_output_mod, only: xios_is_active_field 19 20 use xios_output_mod, only: send_xios_field 20 21 #endif … … 30 31 call writediagfi(ngrid,field_name,title,units,0,field) 31 32 #ifdef CPP_XIOS 32 call send_xios_field(field_name,field) 33 if (xios_is_active_field(field_name)) then 34 ! only send the field to xios if the user asked for it 35 call send_xios_field(field_name,field) 36 endif 33 37 #endif 34 38 … … 38 42 ! For a surface field 39 43 #ifdef CPP_XIOS 44 use xios_output_mod, only: xios_is_active_field 40 45 use xios_output_mod, only: send_xios_field 41 46 #endif … … 51 56 call writediagfi(ngrid,field_name,title,units,2,field) 52 57 #ifdef CPP_XIOS 53 call send_xios_field(field_name,field) 58 if (xios_is_active_field(field_name)) then 59 ! only send the field to xios if the user asked for it 60 call send_xios_field(field_name,field) 61 endif 54 62 #endif 55 63 … … 59 67 ! For a "3D" horizontal-vertical field 60 68 #ifdef CPP_XIOS 69 use xios_output_mod, only: xios_is_active_field 61 70 use xios_output_mod, only: send_xios_field 62 71 #endif … … 78 87 endif 79 88 #ifdef CPP_XIOS 80 call send_xios_field(field_name,field) 89 if (xios_is_active_field(field_name)) then 90 ! only send the field to xios if the user asked for it 91 call send_xios_field(field_name,field) 92 endif 81 93 #endif 82 94 … … 86 98 ! For a surface field 87 99 #ifdef CPP_XIOS 100 use xios_output_mod, only: xios_is_active_field 88 101 use xios_output_mod, only: send_xios_field 89 102 #endif … … 99 112 call writediagfi(ngrid,field_name,title,units,0,real(field)) 100 113 #ifdef CPP_XIOS 101 call send_xios_field(field_name,real(field)) 114 if (xios_is_active_field(field_name)) then 115 ! only send the field to xios if the user asked for it 116 call send_xios_field(field_name,real(field)) 117 endif 102 118 #endif 103 119 … … 107 123 ! For a surface field 108 124 #ifdef CPP_XIOS 125 use xios_output_mod, only: xios_is_active_field 109 126 use xios_output_mod, only: send_xios_field 110 127 #endif … … 120 137 call writediagfi(ngrid,field_name,title,units,2,real(field)) 121 138 #ifdef CPP_XIOS 122 call send_xios_field(field_name,real(field)) 139 if (xios_is_active_field(field_name)) then 140 ! only send the field to xios if the user asked for it 141 call send_xios_field(field_name,real(field)) 142 endif 123 143 #endif 124 144 … … 128 148 ! For a "3D" horizontal-vertical field 129 149 #ifdef CPP_XIOS 150 use xios_output_mod, only: xios_is_active_field 130 151 use xios_output_mod, only: send_xios_field 131 152 #endif … … 147 168 endif 148 169 #ifdef CPP_XIOS 149 call send_xios_field(field_name,real(field)) 170 if (xios_is_active_field(field_name)) then 171 ! only send the field to xios if the user asked for it 172 call send_xios_field(field_name,real(field)) 173 endif 150 174 #endif 151 175 … … 155 179 ! For a surface field 156 180 #ifdef CPP_XIOS 181 use xios_output_mod, only: xios_is_active_field 157 182 use xios_output_mod, only: send_xios_field 158 183 #endif … … 173 198 call writediagfi(ngrid,field_name,title,units,0,field_real) 174 199 #ifdef CPP_XIOS 175 call send_xios_field(field_name,field_real) 200 if (xios_is_active_field(field_name)) then 201 ! only send the field to xios if the user asked for it 202 call send_xios_field(field_name,field_real) 203 endif 176 204 #endif 177 205 … … 181 209 ! For a surface field 182 210 #ifdef CPP_XIOS 211 use xios_output_mod, only: xios_is_active_field 183 212 use xios_output_mod, only: send_xios_field 184 213 #endif … … 202 231 call writediagfi(ngrid,field_name,title,units,2,field_real(:)) 203 232 #ifdef CPP_XIOS 204 call send_xios_field(field_name,field_real) 233 if (xios_is_active_field(field_name)) then 234 ! only send the field to xios if the user asked for it 235 call send_xios_field(field_name,field_real) 236 endif 205 237 #endif 206 238 … … 210 242 ! For a "3D" horizontal-vertical field 211 243 #ifdef CPP_XIOS 244 use xios_output_mod, only: xios_is_active_field 212 245 use xios_output_mod, only: send_xios_field 213 246 #endif … … 242 275 243 276 #ifdef CPP_XIOS 244 call send_xios_field(field_name,field_real) 277 if (xios_is_active_field(field_name)) then 278 ! only send the field to xios if the user asked for it 279 call send_xios_field(field_name,field_real) 280 endif 245 281 #endif 246 282 -
trunk/LMDZ.MARS/libf/phymars/xios_output_mod.F90
r2941 r3055 293 293 END SUBROUTINE histwrite3d_xios 294 294 295 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 296 297 FUNCTION xios_is_active_field(field_id) 298 USE xios, only: xios_field_is_active 299 USE mod_phys_lmdz_para, only: bcast_omp 300 IMPLICIT NONE 301 LOGICAL :: xios_is_active_field 302 CHARACTER(LEN=*) :: field_id 303 304 ! check with XIOS if "field_id" is requested by the user 305 ! to be in the output file(s) 306 307 !$OMP MASTER 308 xios_is_active_field = xios_field_is_active(field_id) 309 !$OMP END MASTER 310 CALL bcast_omp(xios_is_active_field) 311 END FUNCTION xios_is_active_field 312 295 313 #endif 296 314
Note: See TracChangeset
for help on using the changeset viewer.