/usr/share/doc/libetsf-io-doc/group_level/etsf_io_electrons_get_f90.html is in libetsf-io-doc 1.0.3-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" href="../robodoc.css" type="text/css" />
<title>./src/group_level/etsf_io_electrons_get.f90</title>
<!-- Source: ./src/group_level/etsf_io_electrons_get.f90 -->
<!-- Generated with ROBODoc Version 4.99.30 (Jun 25 2008) -->
</head>
<body>
<div id="logo">
<a name="robo_top_of_doc">ETSF_IO library - documentation pages</a>
</div> <!-- logo -->
<div id="navigation">
</div> <!-- navigation -->
<div id="content">
<h3>TABLE OF CONTENTS</h3>
<ul>
<li><a href="#robo39">etsf_io_electrons_get</a></li>
</ul>
<hr />
<a name="etsf5felectrons2fetsf5fio5felectrons5fget">
</a><a name="robo39"></a><h2>etsf_io_electrons_get</h2>
<p>[ <a href="#robo_top_of_doc">Top</a> ] [ <a href="./etsf_io_f90.html#robo11">etsf_electrons</a> ] [ <a href="../robo_methods.html#robo_top_of_doc">Methods</a> ]</p>
<p class="item_name">NAME</p>
<p> <strong>etsf_io_electrons_get</strong>
</p>
<p class="item_name">FUNCTION</p>
<p> Read an opened ETSF file to get data related to the given group.
Only associated pointers of argument @folder will be accessed. If any accessed
variable is missing, this routine returns an error (usually an access_mode_id
of argument error_data set to ERROR_MODE_INQ). Any other errors implies a
return with @lstat = .false..
</p>
<p class="item_name">INPUTS</p>
<ul><li> ncid =
integer returned by an 'open' NetCDF call. The file can be
either in define or write mode. This status can be changed
by the call.
</li>
<li> use_atomic_units = (optional)
set this flag to .true. makes the library use the value of the attribute
scale_to_atomic_units to multiply the read variables (that are units dependent)
by this factor (if different from 1.0d0).
</li>
</ul>
<p></p>
<p class="item_name">OUTPUT</p>
<ul><li> lstat =
return .true. if all the actions succeed, if not the status
of the file is undefined.
</li>
<li> error_data <type(<a href="../low_level/public_variables_f90.html#robo68">etsf_io_low_error</a>)> =
contains the details of the error is @lstat is false.
</li>
</ul>
<p></p>
<p class="item_name">SIDE EFFECTS</p>
<ul><li> folder <type(<a href="./etsf_io_f90.html#robo11">etsf_electrons</a>)> =
an allocated structure with pointers on allocated areas in memory.
These areas will be read or written if the pointer is associated, if
not, the variable will be ignored. It is possible to access to specific
dimensions of a variable using the <short_var_name>__kpoint_access or
<short_var_name>__spin_access of this @folder structure. The
<short_var_name>__number_of_<something> can also been set if only a subpart
in one dimension should be accessed (this is possible when the specifications
have been declared with a max_number_of_<something>.
</li>
</ul>
<p></p>
<p class="item_name">NOTES</p>
<p> This file has been automatically generated by the autogen_subroutines.py
script. Any change you would bring to it will systematically be
overwritten.
</p>
<p class="item_name">SOURCE</p>
<pre class="source"><span class="keyword">subroutine</span> <strong>etsf_io_electrons_get</strong><span class="sign">(</span>ncid<span class="sign">,</span> folder<span class="sign">,</span> lstat<span class="sign">,</span> error_data<span class="sign">,</span> use_atomic_units<span class="sign">)</span>
<span class="comment">!Arguments ------------------------------------</span>
<span class="keyword">integer</span><span class="sign">,</span> <span class="keyword">intent</span><span class="sign">(</span><span class="keyword">intent</span><span class="sign">)</span> <span class="sign">:</span><span class="sign">:</span> ncid
<span class="keyword">type</span><span class="sign">(</span><a href="./etsf_io_f90.html#robo11">etsf_electrons</a><span class="sign">)</span><span class="sign">,</span> <span class="keyword">intent</span><span class="sign">(</span><span class="keyword">inout</span><span class="sign">)</span> <span class="sign">:</span><span class="sign">:</span> folder
<span class="keyword">logical</span><span class="sign">,</span> <span class="keyword">intent</span><span class="sign">(</span><span class="keyword">out</span><span class="sign">)</span> <span class="sign">:</span><span class="sign">:</span> lstat
<span class="keyword">type</span><span class="sign">(</span><a href="../low_level/public_variables_f90.html#robo68">etsf_io_low_error</a><span class="sign">)</span><span class="sign">,</span> <span class="keyword">intent</span><span class="sign">(</span><span class="keyword">out</span><span class="sign">)</span> <span class="sign">:</span><span class="sign">:</span> error_data
<span class="keyword">logical</span><span class="sign">,</span> <span class="keyword">optional</span><span class="sign">,</span> <span class="keyword">intent</span><span class="sign">(</span><span class="keyword">intent</span><span class="sign">)</span> <span class="sign">:</span><span class="sign">:</span> use_atomic_units
<span class="comment">!Local variables-------------------------------</span>
<span class="keyword">character</span><span class="sign">(</span><span class="keyword">len</span> <span class="sign">=</span> <span class="sign">*</span><span class="sign">)</span><span class="sign">,</span> <span class="keyword">parameter</span> <span class="sign">:</span><span class="sign">:</span> my_name <span class="sign">=</span> <span class="squote">'<strong>etsf_io_electrons_get</strong>'</span>
<span class="keyword">logical</span> <span class="sign">:</span><span class="sign">:</span> my_use_atomic_units
<span class="keyword">integer</span><span class="sign">,</span><span class="keyword">allocatable</span> <span class="sign">:</span><span class="sign">:</span> varid<span class="sign">(</span><span class="sign">:</span><span class="sign">)</span>
<span class="keyword">integer</span><span class="sign">,</span><span class="keyword">allocatable</span> <span class="sign">:</span><span class="sign">:</span> start<span class="sign">(</span><span class="sign">:</span><span class="sign">)</span>
<span class="keyword">integer</span><span class="sign">,</span><span class="keyword">allocatable</span> <span class="sign">:</span><span class="sign">:</span> count<span class="sign">(</span><span class="sign">:</span><span class="sign">)</span>
<span class="keyword">integer</span> <span class="sign">:</span><span class="sign">:</span> <span class="keyword">len</span>
<span class="keyword">character</span><span class="sign">(</span>etsf_charlen<span class="sign">)</span> <span class="sign">:</span><span class="sign">:</span> flag
<span class="comment">! *************************************************************************</span>
<span class="comment">!DEBUG</span>
<span class="comment">!write (*,*) '<strong>etsf_io_electrons_get</strong> : enter'</span>
<span class="comment">!ENDDEBUG</span>
<span class="comment">! Get values for optional arguments, set default.</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">present</span><span class="sign">(</span>use_atomic_units<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
my_use_atomic_units <span class="sign">=</span> use_atomic_units
<span class="keyword">else</span>
my_use_atomic_units <span class="sign">=</span> <span class="sign">.</span><span class="keyword">true</span><span class="sign">.</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">allocate</span><span class="sign">(</span>varid<span class="sign">(</span>9<span class="sign">)</span><span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">associated</span><span class="sign">(</span>folder<span class="sign">%</span>number_of_electrons<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo86">etsf_io_low_read_var</a><span class="sign">(</span>ncid<span class="sign">,</span> <span class="quote">"number_of_electrons"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>number_of_electrons<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> ncvarid <span class="sign">=</span> varid<span class="sign">(</span>1<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo74">etsf_io_low_error_update</a><span class="sign">(</span>error_data<span class="sign">,</span> my_name<span class="sign">)</span>
<span class="keyword">return</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">associated</span><span class="sign">(</span>folder<span class="sign">%</span>exchange_functional<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo86">etsf_io_low_read_var</a><span class="sign">(</span>ncid<span class="sign">,</span> <span class="quote">"exchange_functional"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>exchange_functional<span class="sign">,</span> etsf_charlen<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> ncvarid <span class="sign">=</span> varid<span class="sign">(</span>2<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo74">etsf_io_low_error_update</a><span class="sign">(</span>error_data<span class="sign">,</span> my_name<span class="sign">)</span>
<span class="keyword">return</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">associated</span><span class="sign">(</span>folder<span class="sign">%</span>correlation_functional<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo86">etsf_io_low_read_var</a><span class="sign">(</span>ncid<span class="sign">,</span> <span class="quote">"correlation_functional"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>correlation_functional<span class="sign">,</span> etsf_charlen<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> ncvarid <span class="sign">=</span> varid<span class="sign">(</span>3<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo74">etsf_io_low_error_update</a><span class="sign">(</span>error_data<span class="sign">,</span> my_name<span class="sign">)</span>
<span class="keyword">return</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">associated</span><span class="sign">(</span>folder<span class="sign">%</span>fermi_energy<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo86">etsf_io_low_read_var</a><span class="sign">(</span>ncid<span class="sign">,</span> <span class="quote">"fermi_energy"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>fermi_energy<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> ncvarid <span class="sign">=</span> varid<span class="sign">(</span>4<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo74">etsf_io_low_error_update</a><span class="sign">(</span>error_data<span class="sign">,</span> my_name<span class="sign">)</span>
<span class="keyword">return</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">associated</span><span class="sign">(</span>folder<span class="sign">%</span>smearing_scheme<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo86">etsf_io_low_read_var</a><span class="sign">(</span>ncid<span class="sign">,</span> <span class="quote">"smearing_scheme"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>smearing_scheme<span class="sign">,</span> etsf_charlen<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> ncvarid <span class="sign">=</span> varid<span class="sign">(</span>5<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo74">etsf_io_low_error_update</a><span class="sign">(</span>error_data<span class="sign">,</span> my_name<span class="sign">)</span>
<span class="keyword">return</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">associated</span><span class="sign">(</span>folder<span class="sign">%</span>smearing_width<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo86">etsf_io_low_read_var</a><span class="sign">(</span>ncid<span class="sign">,</span> <span class="quote">"smearing_width"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>smearing_width<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> ncvarid <span class="sign">=</span> varid<span class="sign">(</span>6<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo74">etsf_io_low_error_update</a><span class="sign">(</span>error_data<span class="sign">,</span> my_name<span class="sign">)</span>
<span class="keyword">return</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span><a href="../low_level/etsf_io_low_level_f90.html#robo91">etsf_io_low_var_associated</a><span class="sign">(</span>folder<span class="sign">%</span>number_of_states<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo86">etsf_io_low_read_var</a><span class="sign">(</span>ncid<span class="sign">,</span> <span class="quote">"number_of_states"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>number_of_states<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> ncvarid <span class="sign">=</span> varid<span class="sign">(</span>7<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo74">etsf_io_low_error_update</a><span class="sign">(</span>error_data<span class="sign">,</span> my_name<span class="sign">)</span>
<span class="keyword">return</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span><a href="../low_level/etsf_io_low_level_f90.html#robo91">etsf_io_low_var_associated</a><span class="sign">(</span>folder<span class="sign">%</span>eigenvalues<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">allocate</span><span class="sign">(</span>start<span class="sign">(</span>3<span class="sign">)</span><span class="sign">,</span> count<span class="sign">(</span>3<span class="sign">)</span><span class="sign">)</span>
start<span class="sign">(</span><span class="sign">:</span><span class="sign">)</span> <span class="sign">=</span> 1
count<span class="sign">(</span><span class="sign">:</span><span class="sign">)</span> <span class="sign">=</span> 0
<span class="keyword">if</span> <span class="sign">(</span>folder<span class="sign">%</span>eigenvalues__spin_access <span class="sign">/</span><span class="sign">=</span> etsf_no_sub_access<span class="sign">)</span> <span class="keyword">then</span>
start<span class="sign">(</span>3<span class="sign">)</span> <span class="sign">=</span> folder<span class="sign">%</span>eigenvalues__spin_access
count<span class="sign">(</span>3<span class="sign">)</span> <span class="sign">=</span> 1
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span>folder<span class="sign">%</span>eigenvalues__kpoint_access <span class="sign">/</span><span class="sign">=</span> etsf_no_sub_access<span class="sign">)</span> <span class="keyword">then</span>
start<span class="sign">(</span>2<span class="sign">)</span> <span class="sign">=</span> folder<span class="sign">%</span>eigenvalues__kpoint_access
count<span class="sign">(</span>2<span class="sign">)</span> <span class="sign">=</span> 1
<span class="keyword">end</span> <span class="keyword">if</span>
count<span class="sign">(</span>1<span class="sign">)</span> <span class="sign">=</span> folder<span class="sign">%</span>eigenvalues__number_of_states
<span class="keyword">if</span> <span class="sign">(</span>folder<span class="sign">%</span>eigenvalues__state_access <span class="sign">/</span><span class="sign">=</span> etsf_no_sub_access<span class="sign">)</span> <span class="keyword">then</span>
start<span class="sign">(</span>1<span class="sign">)</span> <span class="sign">=</span> folder<span class="sign">%</span>eigenvalues__state_access
count<span class="sign">(</span>1<span class="sign">)</span> <span class="sign">=</span> 1
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo86">etsf_io_low_read_var</a><span class="sign">(</span>ncid<span class="sign">,</span> <span class="quote">"eigenvalues"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>eigenvalues<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> ncvarid <span class="sign">=</span> varid<span class="sign">(</span>8<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> error_data <span class="sign">=</span> error_data<span class="sign">,</span> start <span class="sign">=</span> start<span class="sign">,</span> count <span class="sign">=</span> count<span class="sign">)</span>
<span class="keyword">deallocate</span><span class="sign">(</span>start<span class="sign">,</span> count<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo74">etsf_io_low_error_update</a><span class="sign">(</span>error_data<span class="sign">,</span> my_name<span class="sign">)</span>
<span class="keyword">return</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span><a href="../low_level/etsf_io_low_level_f90.html#robo91">etsf_io_low_var_associated</a><span class="sign">(</span>folder<span class="sign">%</span>occupations<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">allocate</span><span class="sign">(</span>start<span class="sign">(</span>3<span class="sign">)</span><span class="sign">,</span> count<span class="sign">(</span>3<span class="sign">)</span><span class="sign">)</span>
start<span class="sign">(</span><span class="sign">:</span><span class="sign">)</span> <span class="sign">=</span> 1
count<span class="sign">(</span><span class="sign">:</span><span class="sign">)</span> <span class="sign">=</span> 0
<span class="keyword">if</span> <span class="sign">(</span>folder<span class="sign">%</span>occupations__spin_access <span class="sign">/</span><span class="sign">=</span> etsf_no_sub_access<span class="sign">)</span> <span class="keyword">then</span>
start<span class="sign">(</span>3<span class="sign">)</span> <span class="sign">=</span> folder<span class="sign">%</span>occupations__spin_access
count<span class="sign">(</span>3<span class="sign">)</span> <span class="sign">=</span> 1
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span>folder<span class="sign">%</span>occupations__kpoint_access <span class="sign">/</span><span class="sign">=</span> etsf_no_sub_access<span class="sign">)</span> <span class="keyword">then</span>
start<span class="sign">(</span>2<span class="sign">)</span> <span class="sign">=</span> folder<span class="sign">%</span>occupations__kpoint_access
count<span class="sign">(</span>2<span class="sign">)</span> <span class="sign">=</span> 1
<span class="keyword">end</span> <span class="keyword">if</span>
count<span class="sign">(</span>1<span class="sign">)</span> <span class="sign">=</span> folder<span class="sign">%</span>occupations__number_of_states
<span class="keyword">if</span> <span class="sign">(</span>folder<span class="sign">%</span>occupations__state_access <span class="sign">/</span><span class="sign">=</span> etsf_no_sub_access<span class="sign">)</span> <span class="keyword">then</span>
start<span class="sign">(</span>1<span class="sign">)</span> <span class="sign">=</span> folder<span class="sign">%</span>occupations__state_access
count<span class="sign">(</span>1<span class="sign">)</span> <span class="sign">=</span> 1
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo86">etsf_io_low_read_var</a><span class="sign">(</span>ncid<span class="sign">,</span> <span class="quote">"occupations"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>occupations<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> ncvarid <span class="sign">=</span> varid<span class="sign">(</span>9<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> error_data <span class="sign">=</span> error_data<span class="sign">,</span> start <span class="sign">=</span> start<span class="sign">,</span> count <span class="sign">=</span> count<span class="sign">)</span>
<span class="keyword">deallocate</span><span class="sign">(</span>start<span class="sign">,</span> count<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo74">etsf_io_low_error_update</a><span class="sign">(</span>error_data<span class="sign">,</span> my_name<span class="sign">)</span>
<span class="keyword">return</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="comment">! Handle all attributes for the group.</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">associated</span><span class="sign">(</span>folder<span class="sign">%</span>fermi_energy<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="comment">! Handle the units attribute.</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo82">etsf_io_low_read_att</a><span class="sign">(</span>ncid<span class="sign">,</span> varid<span class="sign">(</span>4<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> <span class="quote">"units"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> etsf_charlen<span class="sign">,</span> folder<span class="sign">%</span>fermi_energy__units<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">return</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">trim</span><span class="sign">(</span>folder<span class="sign">%</span>fermi_energy__units<span class="sign">)</span> <span class="sign">/</span><span class="sign">=</span> <span class="quote">"atomic units"</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo82">etsf_io_low_read_att</a><span class="sign">(</span>ncid<span class="sign">,</span> varid<span class="sign">(</span>4<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> <span class="quote">"scale_to_atomic_units"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>fermi_energy__scale_to_atomic_units<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">return</span>
<span class="keyword">else</span>
folder<span class="sign">%</span>fermi_energy__scale_to_atomic_units <span class="sign">=</span> 1<span class="sign">.</span>0d0
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span>my_use_atomic_units <span class="sign">.</span><span class="keyword">and</span><span class="sign">.</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>fermi_energy__scale_to_atomic_units <span class="sign">/</span><span class="sign">=</span> 1<span class="sign">.</span>0d0<span class="sign">)</span> <span class="keyword">then</span>
folder<span class="sign">%</span>fermi_energy <span class="sign">=</span> folder<span class="sign">%</span>fermi_energy <span class="sign">*</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>fermi_energy__scale_to_atomic_units
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">associated</span><span class="sign">(</span>folder<span class="sign">%</span>smearing_width<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="comment">! Handle the units attribute.</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo82">etsf_io_low_read_att</a><span class="sign">(</span>ncid<span class="sign">,</span> varid<span class="sign">(</span>6<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> <span class="quote">"units"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> etsf_charlen<span class="sign">,</span> folder<span class="sign">%</span>smearing_width__units<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">return</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">trim</span><span class="sign">(</span>folder<span class="sign">%</span>smearing_width__units<span class="sign">)</span> <span class="sign">/</span><span class="sign">=</span> <span class="quote">"atomic units"</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo82">etsf_io_low_read_att</a><span class="sign">(</span>ncid<span class="sign">,</span> varid<span class="sign">(</span>6<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> <span class="quote">"scale_to_atomic_units"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>smearing_width__scale_to_atomic_units<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">return</span>
<span class="keyword">else</span>
folder<span class="sign">%</span>smearing_width__scale_to_atomic_units <span class="sign">=</span> 1<span class="sign">.</span>0d0
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span>my_use_atomic_units <span class="sign">.</span><span class="keyword">and</span><span class="sign">.</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>smearing_width__scale_to_atomic_units <span class="sign">/</span><span class="sign">=</span> 1<span class="sign">.</span>0d0<span class="sign">)</span> <span class="keyword">then</span>
folder<span class="sign">%</span>smearing_width <span class="sign">=</span> folder<span class="sign">%</span>smearing_width <span class="sign">*</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>smearing_width__scale_to_atomic_units
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span><a href="../low_level/etsf_io_low_level_f90.html#robo91">etsf_io_low_var_associated</a><span class="sign">(</span>folder<span class="sign">%</span>eigenvalues<span class="sign">)</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="comment">! Handle the units attribute.</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo82">etsf_io_low_read_att</a><span class="sign">(</span>ncid<span class="sign">,</span> varid<span class="sign">(</span>8<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> <span class="quote">"units"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> etsf_charlen<span class="sign">,</span> folder<span class="sign">%</span>eigenvalues__units<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">return</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="keyword">trim</span><span class="sign">(</span>folder<span class="sign">%</span>eigenvalues__units<span class="sign">)</span> <span class="sign">/</span><span class="sign">=</span> <span class="quote">"atomic units"</span><span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo82">etsf_io_low_read_att</a><span class="sign">(</span>ncid<span class="sign">,</span> varid<span class="sign">(</span>8<span class="sign">)</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> <span class="quote">"scale_to_atomic_units"</span><span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>eigenvalues__scale_to_atomic_units<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> lstat<span class="sign">,</span> error_data <span class="sign">=</span> error_data<span class="sign">)</span>
<span class="keyword">if</span> <span class="sign">(</span><span class="sign">.</span><span class="keyword">not</span><span class="sign">.</span> lstat<span class="sign">)</span> <span class="keyword">return</span>
<span class="keyword">else</span>
folder<span class="sign">%</span>eigenvalues__scale_to_atomic_units <span class="sign">=</span> 1<span class="sign">.</span>0d0
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">if</span> <span class="sign">(</span>my_use_atomic_units <span class="sign">.</span><span class="keyword">and</span><span class="sign">.</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>eigenvalues__scale_to_atomic_units <span class="sign">/</span><span class="sign">=</span> 1<span class="sign">.</span>0d0<span class="sign">)</span> <span class="keyword">then</span>
<span class="keyword">call</span> <a href="../low_level/etsf_io_low_level_f90.html#robo95">etsf_io_low_var_multiply</a><span class="sign">(</span>folder<span class="sign">%</span>eigenvalues<span class="sign">,</span> <span class="sign">&</span>
<span class="sign">&</span> folder<span class="sign">%</span>eigenvalues__scale_to_atomic_units<span class="sign">)</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">end</span> <span class="keyword">if</span>
<span class="keyword">deallocate</span><span class="sign">(</span>varid<span class="sign">)</span>
<span class="comment">!DEBUG</span>
<span class="comment">!write (*,*) '<strong>etsf_io_electrons_get</strong> : exit'</span>
<span class="comment">!ENDDEBUG</span>
<span class="keyword">end</span> <span class="keyword">subroutine</span> <strong>etsf_io_electrons_get</strong>
</pre>
</div> <!-- content -->
<div id="footer">
<p>Generated from ./src/group_level/etsf_io_electrons_get.f90 with <a href="http://www.xs4all.nl/~rfsber/Robo/robodoc.html">ROBODoc</a> V4.99.30 on Mon Mar 29 2010 18:10:53
</p>
</div> <!-- footer -->
</body>
</html>
|