Changeset 3506 for trunk/LMDZ.PLUTO/libf/phypluto/writediagsoil.F90
- Timestamp:
- Nov 8, 2024, 10:57:27 AM (13 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/writediagsoil.F90
r3184 r3506 1 module writediagsoil_mod 2 3 implicit none 4 5 contains 6 1 7 subroutine writediagsoil(ngrid,name,title,units,dimpx,px) 2 8 … … 86 92 stop 87 93 endif 88 94 89 95 ! Set output sample rate 90 96 isample=int(ecritphy) ! same as for diagfi outputs 91 97 ! Note ecritphy is known from control.h 92 98 93 99 ! Create output NetCDF file 94 100 if (is_master) then … … 129 135 enddo 130 136 endif 131 137 132 138 ! write "header" of file (longitudes, latitudes, geopotential, ...) 133 139 if (klon_glo>1) then ! general 3D case … … 138 144 139 145 endif ! of if (is_master) 140 146 141 147 ! set zitau to -1 to be compatible with zitau incrementation step below 142 148 zitau=-1 143 149 144 150 else 145 151 ! If not an initialization call, simply open the NetCDF file … … 164 170 date=float(zitau+1)/float(day_step) 165 171 ! Note: day_step is known from control.h 166 172 167 173 if (is_master) then 168 174 ! Get NetCDF ID for "time" … … 176 182 if (ierr.ne.NF_NOERR) then 177 183 write(*,*)"writediagsoil: Failed writing date to time variable" 178 stop 184 stop 179 185 endif 180 186 endif ! of if (is_master) … … 217 223 endif 218 224 #endif 219 225 220 226 ! B. Write (append) the variable to the NetCDF file 221 227 if (is_master) then … … 235 241 call def_var(nid,name,title,units,4,id,varid,ierr) 236 242 endif ! of if (ierr.ne.NF_NOERR) 237 243 238 244 ! B.2. Prepare things to be able to write/append the variable 239 245 corners(1)=1 … … 241 247 corners(3)=1 242 248 corners(4)=ntime 243 249 244 250 if (klon_glo==1) then 245 251 edges(1)=1 … … 250 256 edges(3)=nsoilmx 251 257 edges(4)=1 252 258 253 259 ! B.3. Write the slab of data 254 260 !#ifdef NC_DOUBLE … … 324 330 corners(2)=1 325 331 corners(3)=ntime 326 332 327 333 if (klon_glo==1) then 328 334 edges(1)=1 … … 332 338 edges(2)=nbp_lat 333 339 edges(3)=1 334 340 335 341 ! B.3. Write the slab of data 336 342 !#ifdef NC_DOUBLE … … 373 379 ! B.2. Prepare things to be able to write/append the variable 374 380 corners(1)=ntime 375 381 376 382 edges(1)=1 377 383 … … 396 402 397 403 end subroutine writediagsoil 404 405 end module writediagsoil_mod
Note: See TracChangeset
for help on using the changeset viewer.