<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><font class="Apple-style-span" face="Monaco">Hi, Lex,</font><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">If this error message "NC definations on multiprocesses conflict"</font></div><div><font class="Apple-style-span" face="Monaco">is the only one you got before every crash, it is most likely the</font></div><div><font class="Apple-style-span" face="Monaco">attribute values are not the same across&nbsp;all processes.&nbsp;</font></div><div><font class="Apple-style-span" face="Monaco">Please check that first, so you can rule out that possibility.</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">Also, can you check the attributes in the output file for the case</font></div><div><font class="Apple-style-span" face="Monaco">that ran successfully? (using ncmpidump -c filename) This is just</font></div><div><font class="Apple-style-span" face="Monaco">to see if the attributes are the&nbsp;ones&nbsp;you expected. Also, please</font></div><div><font class="Apple-style-span" face="Monaco">make sure the number of&nbsp;attributes created&nbsp;is less than 4K global</font></div><div><font class="Apple-style-span" face="Monaco">or per variable,&nbsp;as Rob indicated.</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">Wei-keng</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"><br></font><div><div><font class="Apple-style-span" face="Monaco">On Feb 19, 2009, at 5:53 PM, Alex Hoffmann wrote:</font></div><font class="Apple-style-span" face="Monaco"><br></font><blockquote type="cite"><div><font class="Apple-style-span" face="Monaco">Dear Wei-keng,<br><br>I understand that the attribute define arguments must be the same across<br>all processes. &nbsp;&nbsp;I am also almost certain that the arguments you cited<br>are identical across processes but I will perform a check.<br><br>Be this as it may, I get the same arrow message if I uncomment one of<br>the text attributes specifying the unit or one of the real attributes<br>specifying the fill value, for instance. &nbsp;There is no possibility that<br>these are different across processes as they are introduced straight<br>into the function call. &nbsp;Any check I performed seemed to indicate that<br>the problem arises from the number of arguments I defined, and not from<br>the arguments themselves, since they work all fine individually.<br><br>I was actually thinking to write the attributes ad-hoc once the dataset<br>is defined using regular netCDF functions. &nbsp;This however seemed to be a<br>little elegant solution defeating the purpose of using PnetCDF.<br><br>Thanks,<br><br>Lex<br><br><br>Wei-keng Liao a écrit :<br></font><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Hi, Lex,<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">PnetCDF requires the attribute define arguments be the same across<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">all processes. This is why you got the error message for defining<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">attribute "history" in line 400, if its value "conflicts" among<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">processes.<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">I think you have got this.<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">I checked your codes. Starting from line 562, you have a few text<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">attributes<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">from des_tgas_picture(i), des_trac_picture(i), des_tpas_picture(i),<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">and des.<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Similar for out_type == 2. Are you sure their values are all the same<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">across<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">all the processes? May be you can use MPI_Bcast to check if anyone has<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">different value.<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Wei-keng<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco">On Feb 19, 2009, at 11:14 AM, Alex Hoffmann wrote:<br></font></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Dear Rob<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Thanks a lot for your answer.<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Isolating the PnetCDF output module from the code as a stand-alone would<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">require a substantial effort, and I do not encounter this error in &nbsp;my<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">small test programs. &nbsp;I attached the output module for reference.<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">The attribute section that causes trouble is between lines 369-405<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(global) and 468-613 (variables). &nbsp;I am aware that the attribute history<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(line 400) may be problematic as every process may have a slightly<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">different value (for the time element taken from the fortran function<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">date_and_time). &nbsp;Yet this is not the only issue.<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">If I prematurely exit at line 492, uncommenting any further attribute<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">definition between 468 and 489 causes a crash with the multiprocesses<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">conflict.<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Note also that the attribute definitions between 558 and 613 only<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">produce no crash currently because of the print statements on lines 560<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">and 591, which made me think that maybe there is an optimization<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">problem. &nbsp;What is strange is that if these are not included, the crash<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">occurs only when I start writing the first file (movie file,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">out_type=2), AND if I leave the first block (if out_type==1)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">uncommented, although this block is not even entered in that particular<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">case, and vice versa. &nbsp;Hope this is more or less clear...<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Cheers,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Lex<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Robert Latham wrote:<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">On Thu, Feb 19, 2009 at 10:09:37AM +0000, Alex Hoffmann wrote:<br></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Hello,<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">I am getting the same error message as had already been inquired on in<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">this list, i.e.:<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NC definations on multiprocesses conflict.<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NOTE: Definitions across all process<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">and this seems to be related somehow randomly to the total number of<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">attributes (global or for each variable) that I intend to write during<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">the the definition phase (and, though I am not sure about this, to the<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">number of processes used to run my F90 parallel code).<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">More precisely, if I uncomment one put_att to replace another, the<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">program still runs, if I do not comment out another one, the program<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">crashes with the above error message.<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Is there any way of identifying where this problem comes from or is<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">there a maximum amount of attributes (though I don't write an<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">excessive<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">amount of them)? &nbsp;There is no problem running it on one process(or).<br></font></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Maybe you can show us with a small test program how you are<br></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">encountering this error? &nbsp;The maximum number of attributes is 4k (the<br></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">constant NC_MAX_ATTRS).<br></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">==rob<br></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">-- <br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">______________________________________________________________________<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Alex HOFFMANN &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PhD Candidate<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Centre for Atmospheric Science<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Department of Geography &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;University of Cambridge<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">Downing Place, Cambridge CB2 3EN, UK<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">e-mail: <a href="mailto:ah519@cam.ac.uk">ah519@cam.ac.uk</a> &nbsp;tel: +44 (0)1223 766581<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><a href="http://www.geog.cam.ac.uk/people/hoffmann/">www.geog.cam.ac.uk/people/hoffmann/</a><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">______________________________________________________________________<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">!-*- F90 -*-<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">module atham_pnetcdf<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> !--------------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> ! author: &nbsp;Alex HOFFMANN &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> ! email: &nbsp;&nbsp;<a href="mailto:ah519@cam.ac.uk">ah519@cam.ac.uk</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> ! date: &nbsp;&nbsp;&nbsp;February 2009 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> ! version: v0.1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> ! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> ! collection of routines for ATHAM PnetCDF output &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> !--------------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! module is to replace existing atham_netcdf.mod (GL) to write ATHAM<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">output as netCDF files<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! same as atham_netcdf.mod (AH) but adapted to run with the Parallel<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NetCDF API,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;developed by Northwestern University and Argonne National Laboratory,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;which is built on top of MPI-IO (tested with MPICH 2.1)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">use precision, &nbsp;&nbsp;&nbsp;only : kint, kreal, real4, my_real<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">use atham_module, only : nx, ny, nz, ntx, nty, npx, npy<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">use atham_module, only : ntgas_picture, ntrac_picture, ntpas_picture, &amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ntgas_movie, ntrac_movie, ntpas_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">implicit none<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">private<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">public :: netcdf_data<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! 'pnetcdf.inc' file includes cpp directives that were not understood<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">at compile-time<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! this is to be changed and hard-wired link to be replaced by the<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">include 'pnetcdf.inc' command<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">!include 'pnetcdf.inc'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">#include "/usr/local/parallel-netcdf-1.0.1/include/pnetcdf.inc"<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">include 'mpif.h'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! ######### tried saving netCDF variable IDs here so that they must<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">not be retrieved by inquiry<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! ######### if this creates conflict, especially between picture and<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">movie file, this must be changed<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint), save &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: x_dimID, y_dimID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">z_dimID, t_dimID<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint), save &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: x_varID, y_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">z_varID, t_varID<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint), save &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: u_varID, v_varID, w_varID<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint), save &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: pnew_varID, tetnew_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">tempnew_varID, density_varID<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint), save &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: turbhor_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">turbver_varID, turblen_varID<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint), dimension(99), save &nbsp;&nbsp;&nbsp;:: tgas_varID, trac_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">tpas_varID, d_trac_varID<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(MPI_OFFSET_KIND), save &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: tcounter<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;real(real4), parameter &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: undef = -0.99e33_real4 !<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">make sure precision of _FillValue and output (NF90_FLOAT) is the same<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">!!!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">contains<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> !=====================================================================<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> subroutine netcdf_data(outfile,out_type,timetot)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! IF: outfile = picture_file or movie_file (path/filename for<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">output created in atham_module)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! &nbsp;&nbsp;&nbsp;&nbsp;out_type = 1 (picture_file) or 2 (movie_file)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! &nbsp;&nbsp;&nbsp;&nbsp;timetot = total simulation time since simulation start<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;use atham_module, only : unew, vnew, wnew, pnew, tetnew, tempnew, &amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;density, turbhor, turbver, turblen<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;use atham_module, only : tgasnew, tracnew, tpasnew, tracdep<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;use atham_module, only : itgas_picture, itrac_picture,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">itpas_picture, &amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;itgas_movie, itrac_movie, itpas_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;use atham_module, only : mycoor, my_cart, myrank<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(*), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intent(in &nbsp;&nbsp;) :: outfile<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intent(in &nbsp;&nbsp;) :: out_type<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;real(kreal), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intent(in &nbsp;&nbsp;) :: timetot<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;!------------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! local variables &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;!------------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(MPI_OFFSET_KIND) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: nx_mpi,ny_mpi, nz_mpi,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">y_cl_mpi<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(MPI_OFFSET_KIND) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: istart,jstart<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: STATUS<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=50) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: OP &nbsp;! debugging variable<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">corresponding to the called netCDF OPeration<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: NCID<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: i<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;logical &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: DynMovie_flag,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">bounds_control<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: y_st, y_sp, y_cl<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! replace DynMovie precompiler flag by program flag for more<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">convenient code structure<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;DynMovie_flag = .false.<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">#ifdef DynMovie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;DynMovie_flag = .true.<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">#endif<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! re-assign dimension lengths as an MPI_Offset type (necessary for<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">the PnetCDF interface)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! cut-off subdomain borders<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;nx_mpi &nbsp;= nx-2<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;ny_mpi &nbsp;= ny-2<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;nz_mpi &nbsp;= nz<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! assign coordinates of first element of each process in the<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">netCDF file<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;istart = mycoor(1)*nx_mpi + 1_MPI_OFFSET_KIND<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;jstart = mycoor(2)*ny_mpi + 1_MPI_OFFSET_KIND<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;bounds_control = .true. ! debugging flag<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;tcounter = tcounter+1_MPI_OFFSET_KIND<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! === open netCDF dataset: enter data mode ------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! if &nbsp;&nbsp;&nbsp;&nbsp;dataset does not yet exist (STATUS = &nbsp;), create file and<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">enter data mode<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! else &nbsp;&nbsp;continue<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'open existing netCDF file'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;STATUS = nfmpi_open(my_cart, trim(outfile), NF_WRITE,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">MPI_INFO_NULL, NCID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if ( STATUS /= nf_noerr ) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (myrank==0) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, ""<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, "P-NetCDF operation: ",trim(OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, trim(nfmpi_strerror(STATUS))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, "atham_pnetcdf netcdf_data(): new netCDF file<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">created: ", outfile<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, ""<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call netcdf_define(outfile,out_type,timetot,NCID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tcounter = 1_MPI_OFFSET_KIND ! reset time counter for output if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">new file is created<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! --- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write data values --------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! unlimited record dimension time (only one process writes the<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">whole dimension, i.e. accross all processes)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'write data values - unlimited dimension t'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_begin_indep_data(NCID))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (myrank==0) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_vara_real(NCID, t_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/tcounter/), (/1_MPI_OFFSET_KIND/), real(timetot,real4)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_end_indep_data(NCID))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! --- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write data values --------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! discriminate between 2D and 3D case for output generation<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (nty>4) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y_st = 2 &nbsp;&nbsp;&nbsp;! y index start<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y_sp = ny-1 ! y index stop<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y_cl = ny-2 ! y number of columns<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;else<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y_st = ny-1 ! 3 in 2D case<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y_sp = ny-1 ! 3 in 2D case<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y_cl = 1<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;y_cl_mpi = y_cl<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! dynamics data<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'write data values - data'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (out_type == 1 .OR. DynMovie_flag == .true.) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call write_data(real(unew,real4),u_varID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bounds_control = .false.<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call write_data(real(vnew, &nbsp;&nbsp;real4),v_varID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call write_data(real(wnew, &nbsp;&nbsp;real4),w_varID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call write_data(real(pnew, &nbsp;&nbsp;real4),pnew_varID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call write_data(real(tetnew, real4),tetnew_varID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call write_data(real(tempnew,real4),tempnew_varID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call write_data(real(density,real4),density_varID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call write_data(real(turbhor,real4),turbhor_varID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call write_data(real(turbver,real4),turbver_varID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call write_data(real(turblen,real4),turblen_varID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! tracer data<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (out_type == 1) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntgas_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">write_data(real(tgasnew(:,:,:,itgas_picture(i)),real4),tgas_varID(i))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntrac_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">write_data(real(tracnew(:,:,:,itrac_picture(i)),real4),trac_varID(i))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntpas_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">write_data(real(tpasnew(:,:,:,itpas_picture(i)),real4),tpas_varID(i))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntrac_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_begin_indep_data(NCID))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_vara_real(NCID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">d_trac_varID(i),(/istart,jstart,tcounter/), &amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(/nx_mpi,y_cl_mpi,1_MPI_OFFSET_KIND/),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">real(reshape(tracdep(2:nx-1,y_st:y_sp,itrac_picture(i)),shape=(/nx-2,y_cl,1/)),real4)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_end_indep_data(NCID))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;else if (out_type == 2) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntgas_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">write_data(real(tgasnew(:,:,:,itgas_movie(i)),real4),tgas_varID(i))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntrac_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">write_data(real(tracnew(:,:,:,itrac_movie(i)),real4),trac_varID(i))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntpas_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">write_data(real(tpasnew(:,:,:,itpas_movie(i)),real4),tpas_varID(i))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;endif<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! === close netCDF dataset: exit data mode &amp; save -----------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'close netCDF file'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_close(NCID))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (myrank==0) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, ''<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, 'wrote netCDF output to file ', outfile<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, ''<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;contains<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;!----------------------------------------------------------------<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;subroutine write_data(array_in,varID)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! IF: array_in = data array (3D) to be written to netCDF<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! &nbsp;&nbsp;&nbsp;&nbsp;varID &nbsp;&nbsp;&nbsp;= data variable netCDF ID<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;use atham_module, only : iflgs ! topography mask: topography<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(iflgs=0) remains undef<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;use atham_module, only &nbsp;: myrank<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;real(real4),dimension(nx,ny,nz), intent (in &nbsp;&nbsp;) &nbsp;&nbsp;:: array_in<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;integer(kint), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intent(in &nbsp;&nbsp;) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: varID<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!--------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! local variables &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!--------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;real(real4), dimension(nx,ny,nz) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: array_masked<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! dimensions &amp; bounds control<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;integer(MPI_OFFSET_KIND) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: dimlenx,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">dimleny, dimlenz, dimlent<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;integer(kint), dimension(NF_max_var_dims) &nbsp;&nbsp;:: dimIDs<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! dimensions &amp; bounds control<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (myrank == 0) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (bounds_control) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, ''<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, 'atham var in xyz &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',shape(array_in)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, 'atham var reshaped to xyzt &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">',shape(reshape(array_in(2:nx-1,y_st:y_sp,1:nz),shape=(/nx-2,y_cl,nz,1/)))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_inq_vardimid(NCID, u_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">dimIDs)) ! taken unew as ref<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_inq_dimlen(NCID, dimIDs(1), dimlenx))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_inq_dimlen(NCID, dimIDs(2), dimleny))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_inq_dimlen(NCID, dimIDs(3), dimlenz))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_inq_dimlen(NCID, dimIDs(4), dimlent))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, 'netCDF var dimensions in xyzt<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">',dimlenx,dimleny,dimlenz,dimlent<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! mask topography<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;where (iflgs == 1)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array_masked = array_in<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elsewhere<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array_masked = undef<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endwhere<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! mask control<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!print *, ''<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!print *, 'topography mask'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!print *, iflgs(1:5,3,3)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!print *, iflgs(1:5,3,2)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!print *, iflgs(1:5,3,1)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!print *, ''<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!print *, 'masked variable array'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!print *, array_masked(:,3,3)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!print *, array_masked(:,3,2)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!print *, array_masked(:,3,1)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!print *, ''<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_begin_indep_data(NCID))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_vara_real(NCID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">varID,(/istart,jstart,1_MPI_OFFSET_KIND,tcounter/), &amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(/nx_mpi,y_cl_mpi,nz_mpi,1_MPI_OFFSET_KIND/),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">reshape(array_masked(2:nx-1,y_st:y_sp,1:nz),shape=(/nx-2,y_cl,nz,1/))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_end_indep_data(NCID))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;end subroutine write_data<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;! ----------------------------------------------------------------<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> end subroutine netcdf_data<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> !=====================================================================<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> subroutine netcdf_define(outfile,out_type,timetot,ncid_def)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! IF: outfile = picture_file or movie_file (path/filename for<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">output created in atham_module)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! &nbsp;&nbsp;&nbsp;&nbsp;out_type = 1 (picture_file) or 2 (movie_file)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! &nbsp;&nbsp;&nbsp;&nbsp;timetot = simulation time since simulation start (from<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">atham/atham_out)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! &nbsp;&nbsp;&nbsp;&nbsp;ncid_def = netCDF ID assigned to file during creation<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;use atham_module, only &nbsp;&nbsp;: var_tgas_picture,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">var_tgas_movie, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;des_tgas_picture,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">des_tgas_movie, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var_trac_picture,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">var_trac_movie, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;des_trac_picture,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">des_trac_movie, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var_tpas_picture,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">var_tpas_movie, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;des_tpas_picture, des_tpas_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;use atham_module, only &nbsp;&nbsp;: iindex, spinup, nrep, periodt<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;use atham_module, only &nbsp;&nbsp;: volcano_setup,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">coignimbrite_setup, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nuclear_setup, convection_setup,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">procsconfig_setup<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;use atham_module, only &nbsp;&nbsp;: x, y, z, xg, yg<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;use atham_module, only &nbsp;&nbsp;: grid2geo, sim_d_YYYY, sim_d_MM,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">sim_d_DD, &nbsp;&nbsp;&amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sim_t_hh, sim_t_mm, sim_t_ss<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;use atham_module, only &nbsp;&nbsp;: my_cart, myrank<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(*), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intent(in &nbsp;&nbsp;) :: outfile<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intent(in &nbsp;&nbsp;) :: out_type<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;real(kreal), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intent(in &nbsp;&nbsp;) :: timetot<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intent( &nbsp;out) :: ncid_def<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;!------------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! local variables &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;!------------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(MPI_OFFSET_KIND) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: ntx_mpi,nty_mpi,nz_mpi<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=50) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: OP &nbsp;! debugging variable<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">corresponding to the called netCDF OPeration<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: NCID<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: i<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=50) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: var, des<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;real(kreal) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: toffset<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;real(real4) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: coord_scale,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">coord_x_offset, coord_y_offset, coord_t_offset<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;logical &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: DynMovie_flag<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=3) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: coord_x_name,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">coord_y_name, coord_z_name<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=4) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: coord_t_name<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=9) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: coord_x_lname, coord_y_lname<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=13) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: coord_x_units, coord_y_units<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=33) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: coord_t_units<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=8) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: date<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=10) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: time<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=19) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: simdatetime<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=10) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: simdate<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=20) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: login<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=63) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: hist_string<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;integer(kint) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: isetup<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;character(len=12) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: model_setup(6)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;data model_setup /'volcano &nbsp;&nbsp;&nbsp;&nbsp;', 'coignimbrite', 'nuclear &nbsp;&nbsp;&nbsp;&nbsp;',<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'convection &nbsp;', 'procsconfig ','unknown &nbsp;&nbsp;&nbsp;&nbsp;'/<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! replace DynMovie precompiler flag by program flag for more<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">convenient code structure<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;DynMovie_flag = .false.<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">#ifdef DynMovie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;DynMovie_flag = .true.<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">#endif<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! re-assign dimension lengths as an MPI_Offset type (necessary for<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">the PnetCDF interface)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! cut-off domain borders<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;ntx_mpi = ntx-2<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;nty_mpi = nty-2<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;nz_mpi &nbsp;= nz<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! convert date and time integers into string 'YYYYMMDD hh:mm:ss'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;write (simdatetime,10)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">sim_d_YYYY,sim_d_MM,sim_d_DD,sim_t_hh,sim_t_mm,sim_t_ss<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">10 format (I4,'-',I2,'-',I2,1X,I2,':',I2,':',I2)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;simdate = simdatetime(1:10)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! switch between cartesian axes/time (default) and geographic<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">axes/date (linear approx)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_scale &nbsp;&nbsp;&nbsp;= 1._real4<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_x_offset = 0._real4<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_x_name &nbsp;&nbsp;= 'x &nbsp;'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_x_lname &nbsp;= 'x_coor &nbsp;&nbsp;'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_x_units &nbsp;= 'm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_y_offset = 0._real4<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_y_name &nbsp;&nbsp;= 'y &nbsp;'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_y_lname &nbsp;= 'y_coor &nbsp;&nbsp;'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_y_units &nbsp;= 'm &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_z_name &nbsp;&nbsp;= 'z &nbsp;'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_t_offset = 0._real4<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_t_name &nbsp;&nbsp;= 'time'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;coord_t_units &nbsp;= 'sec &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (grid2geo) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">gridconvert(coord_scale,coord_x_offset,coord_x_name,coord_x_lname,coord_x_units,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">&amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">coord_y_offset,coord_y_name,coord_y_lname,coord_y_units, &amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">coord_z_name,coord_t_offset,coord_t_name,coord_t_units)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! === create netCDF dataset: enter define mode --------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'enter define mode'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_create(my_cart, trim(outfile), 0,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">MPI_INFO_NULL,NCID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;ncid_def = NCID<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! === create netCDF dataset: assign metadata ----------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! --- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set global attributes ----------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'set global attributes'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (out_type == 1) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;toffset = timetot - spinup<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, NF_GLOBAL, 'title',<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">13_MPI_OFFSET_KIND, 'atham_picture'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;else<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;toffset = timetot - spinup - nrep*periodt<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, NF_GLOBAL, 'title',<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">11_MPI_OFFSET_KIND, 'atham_movie'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, NF_GLOBAL, 'content',<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">223_MPI_OFFSET_KIND, &amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'This data corresponds to a simulation run of the<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">mesoscale-beta/gamma type non-hydrostatic Active Tracer<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">High-resolution Atmospheric Model ATHAM ' &amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// '(Oberhuber et al., 1998, Herzog, 1998), for a setup as<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">specified under history'),OP) ! ######### add further description as<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">necessary<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, NF_GLOBAL, 'version',<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">21_MPI_OFFSET_KIND, 'no current versioning'),OP) ! ######### change<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">once available<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call date_and_time(date, time)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call getlog(login)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (volcano_setup) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isetup=1<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;else if (coignimbrite_setup) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isetup=2<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;else if (nuclear_setup) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isetup=3<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;else if (convection_setup) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isetup=4<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;else if (procsconfig_setup) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isetup=5<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;else<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isetup=6<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;hist_string = trim(date//' '//time//' &nbsp;'//trim(login)//' &nbsp;atham <br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'//model_setup(isetup))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, NF_GLOBAL, 'history',<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">63_MPI_OFFSET_KIND, hist_string),OP) ! 1 line/modification: &nbsp;- cmd arg<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, NF_GLOBAL,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'Conventions', 28_MPI_OFFSET_KIND, 'COARDS, //cf-pcmdi.llnl.gov/'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, NF_GLOBAL,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'sim_onset_date_time', 19_MPI_OFFSET_KIND, simdatetime),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, NF_GLOBAL,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'sim_time_offset', NF_FLOAT, 1_MPI_OFFSET_KIND, real(toffset,real4)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, NF_GLOBAL,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'x_zoom_location', NF_FLOAT, 1_MPI_OFFSET_KIND,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">real(x(max(1,iindex)),real4)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! --- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;define dimensions --------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'define dimensions'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_def_dim(NCID, trim(coord_x_name), &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">ntx_mpi, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x_dimID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (nty>4) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_dim(NCID, trim(coord_y_name), &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">nty_mpi, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y_dimID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;else<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_dim(NCID, trim(coord_y_name), &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">1_MPI_OFFSET_KIND, &nbsp;&nbsp;y_dimID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_def_dim(NCID, trim(coord_z_name), &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">nz_mpi, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;z_dimID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_def_dim(NCID, coord_t_name, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">nfmpi_unlimited, &nbsp;&nbsp;&nbsp;&nbsp;t_dimID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! --- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;define variables ---------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! dimensions<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'define variables - dimensions'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, trim(coord_x_name), &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NF_FLOAT, 1, x_dimID, x_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, trim(coord_y_name), &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NF_FLOAT, 1, y_dimID, y_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, trim(coord_z_name), &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NF_FLOAT, 1, z_dimID, z_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, coord_t_name, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NF_FLOAT, 1, t_dimID, t_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! dynamics data<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'define variables - data'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (out_type == 1 .OR. DynMovie_flag == .true.) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, 'u', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NF_FLOAT, 4,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/x_dimID,y_dimID,z_dimID,t_dimID/), u_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, 'v', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NF_FLOAT, 4,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/x_dimID,y_dimID,z_dimID,t_dimID/), v_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, 'w', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NF_FLOAT, 4,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/x_dimID,y_dimID,z_dimID,t_dimID/), w_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, 'pnew', &nbsp;&nbsp;&nbsp;NF_FLOAT, 4,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/x_dimID,y_dimID,z_dimID,t_dimID/), pnew_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, 'tetnew', &nbsp;NF_FLOAT, 4,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/x_dimID,y_dimID,z_dimID,t_dimID/), tetnew_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, 'tempnew', NF_FLOAT, 4,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/x_dimID,y_dimID,z_dimID,t_dimID/), tempnew_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, 'density', NF_FLOAT, 4,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/x_dimID,y_dimID,z_dimID,t_dimID/), density_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, 'turbhor', NF_FLOAT, 4,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/x_dimID,y_dimID,z_dimID,t_dimID/), turbhor_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, 'turbver', NF_FLOAT, 4,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/x_dimID,y_dimID,z_dimID,t_dimID/), turbver_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, 'turblen', NF_FLOAT, 4,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/x_dimID,y_dimID,z_dimID,t_dimID/), turblen_varID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! tracer data<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (out_type == 1) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntgas_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, var_tgas_picture(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NF_FLOAT, 4, (/x_dimID,y_dimID,z_dimID,t_dimID/), tgas_varID(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntrac_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, var_trac_picture(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NF_FLOAT, 4, (/x_dimID,y_dimID,z_dimID,t_dimID/), trac_varID(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntpas_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, var_tpas_picture(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NF_FLOAT, 4, (/x_dimID,y_dimID,z_dimID,t_dimID/), tpas_varID(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntrac_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var='d_'//trim(var_trac_picture(i))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, var, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NF_FLOAT, 3, (/x_dimID,y_dimID,t_dimID/), d_trac_varID(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;else if (out_type == 2) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntgas_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, var_tgas_movie(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NF_FLOAT, 4, (/x_dimID,y_dimID,z_dimID,t_dimID/), tgas_varID(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntrac_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, var_trac_movie(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NF_FLOAT, 4, (/x_dimID,y_dimID,z_dimID,t_dimID/), trac_varID(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntpas_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_def_var(NCID, var_tpas_movie(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">NF_FLOAT, 4, (/x_dimID,y_dimID,z_dimID,t_dimID/), tpas_varID(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;endif<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! --- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assign attributes --------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! common attributes: long_name, units, valid_range, scale_factor,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">add_offset, _FillValue, history, conventions<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! dimensions<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'assign attributes - dimensions'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, x_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9_MPI_OFFSET_KIND, trim(coord_x_lname)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, x_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13_MPI_OFFSET_KIND, trim(coord_x_units)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, x_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor', NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, coord_scale),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, x_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;&nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, coord_x_offset),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, y_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9_MPI_OFFSET_KIND, trim(coord_y_lname)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, y_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13_MPI_OFFSET_KIND, trim(coord_y_units)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, y_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor', NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, coord_scale),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, y_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;&nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, coord_y_offset),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, z_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6_MPI_OFFSET_KIND, 'height'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, z_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1_MPI_OFFSET_KIND, 'm'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, z_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'positive', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2_MPI_OFFSET_KIND, 'up'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, t_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4_MPI_OFFSET_KIND, coord_t_name),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, t_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;33_MPI_OFFSET_KIND, trim(coord_t_units)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, t_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;&nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, coord_t_offset),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;OP = 'exit define mode NOW for testing<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">****************************************************' ! ah_testing<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">********************************<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;call<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">handle_err(nfmpi_enddef(NCID),OP) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! ah_testing ********************************<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! dynamics data<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'assign attributes - data'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (out_type == 1 .OR. DynMovie_flag == .true.) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, u_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6_MPI_OFFSET_KIND, 'x_wind'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, u_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7_MPI_OFFSET_KIND, 'm sec-1'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, u_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, u_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, u_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, v_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6_MPI_OFFSET_KIND, 'y_wind'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, v_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7_MPI_OFFSET_KIND, 'm sec-1'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, v_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, v_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, v_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, w_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;19_MPI_OFFSET_KIND, 'upward_air_velocity'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, w_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7_MPI_OFFSET_KIND, 'm sec-1'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, w_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, w_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, w_varID, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, pnew_varID, &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;20_MPI_OFFSET_KIND, 'air_pressure_anomaly'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, pnew_varID, &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2_MPI_OFFSET_KIND, 'Pa'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, pnew_varID, &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, pnew_varID, &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, pnew_varID, &nbsp;&nbsp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tetnew_varID, <br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25_MPI_OFFSET_KIND,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'air_potential_temperature'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tetnew_varID, <br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1_MPI_OFFSET_KIND, 'K'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tetnew_varID, <br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tetnew_varID, <br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tetnew_varID, <br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tempnew_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;15_MPI_OFFSET_KIND, 'air_temperature'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tempnew_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7_MPI_OFFSET_KIND, 'Celsius'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tempnew_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tempnew_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, -273.15),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tempnew_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, density_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;11_MPI_OFFSET_KIND, 'air_density'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, density_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6_MPI_OFFSET_KIND, 'kg m-3'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, density_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, density_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, density_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, turbhor_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;15_MPI_OFFSET_KIND, 'hor_turb_energy'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, turbhor_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8_MPI_OFFSET_KIND, 'm2 sec-2'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, turbhor_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, turbhor_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, turbhor_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, turbver_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;15_MPI_OFFSET_KIND, 'ver_turb_energy'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, turbver_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8_MPI_OFFSET_KIND, 'm2 sec-2'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, turbver_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, turbver_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, turbver_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, turblen_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;17_MPI_OFFSET_KIND, 'turb_length_scale'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, turblen_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1_MPI_OFFSET_KIND, 'm'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, turblen_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, turblen_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, turblen_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! tracer data<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (out_type == 1) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, 'NetCDF output type (1-picture,2-movie) ',out_type !<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">##### &nbsp;DO NOT REMOVE!!! optimization problem, trace source<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntgas_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tgas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25_MPI_OFFSET_KIND, des_tgas_picture(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tgas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9_MPI_OFFSET_KIND, 'gram kg-1'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tgas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1000.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tgas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tgas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntrac_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25_MPI_OFFSET_KIND, des_trac_picture(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9_MPI_OFFSET_KIND, 'gram kg-1'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1000.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntpas_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tpas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25_MPI_OFFSET_KIND, des_tpas_picture(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tpas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1_MPI_OFFSET_KIND, '%'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tpas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 100.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tpas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tpas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntrac_picture<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;des='deposited_'//trim(des_trac_picture(i))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, d_trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;35_MPI_OFFSET_KIND, des),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, d_trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9_MPI_OFFSET_KIND, 'gram m-2'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, d_trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1000.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, d_trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, d_trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;else if (out_type == 2) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, 'NetCDF output type (1-picture,2-movie) ',out_type !<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">##### &nbsp;DO NOT REMOVE!!! optimization problem, trace source<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntgas_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tgas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25_MPI_OFFSET_KIND, des_tgas_movie(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tgas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9_MPI_OFFSET_KIND, 'gram kg-1'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tgas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1000.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tgas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tgas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntrac_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25_MPI_OFFSET_KIND, des_trac_movie(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9_MPI_OFFSET_KIND, 'gram kg-1'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 1000.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, trac_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;do i=1,ntpas_movie<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tpas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'long_name', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25_MPI_OFFSET_KIND, des_tpas_movie(i)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_text(NCID, tpas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'units', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1_MPI_OFFSET_KIND, '%'),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tpas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'scale_factor',NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 100.),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tpas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'add_offset', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, 0.0),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_att_real(NCID, tpas_varID(i),<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">'_FillValue', &nbsp;NF_FLOAT, &nbsp;1_MPI_OFFSET_KIND, undef),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! === create netCDF dataset: exit define mode, enter data mode ----!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'exit define mode'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_enddef(NCID),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! --- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write data values --------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;! dimensions (only one process writes the whole dimension, i.e.<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">accross all processes)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;OP = 'write data values - dimensions'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_begin_indep_data(NCID))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;if (myrank==0) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_vara_real(NCID, x_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/1_MPI_OFFSET_KIND/), (/ntx_mpi/),real(xg(2:ntx-1),real4)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (nty>4) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_vara_real(NCID, y_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/1_MPI_OFFSET_KIND/), (/nty_mpi/), real(yg(2:nty-1),real4)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_vara_real(NCID, y_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/1_MPI_OFFSET_KIND/), (/1_MPI_OFFSET_KIND/), real(yg(nty-1),real4)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call handle_err(nfmpi_put_vara_real(NCID, z_varID,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(/1_MPI_OFFSET_KIND/), (/nz_mpi/), real(z,real4)),OP)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;call handle_err(nfmpi_end_indep_data(NCID))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;contains<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;! ----------------------------------------------------------------<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;subroutine<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">gridconvert(cd_scale,cd_x_offset,cd_x_name,cd_x_lname,cd_x_units, &amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">cd_y_offset,cd_y_name,cd_y_lname,cd_y_units, &amp;<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">cd_z_name,cd_t_offset,cd_t_name,cd_t_units)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! IF: cd_* = coordinate parameters<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!--------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! linear conversion from cartesian grid into lon/lat system &nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! only valid as first approxiamtion over small domains &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! to be replaced once a dyn core in a lat/lon system available !<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!--------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;use atham_module, only &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: deglat_start, deglon_start<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;use phys_constants, only &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: pi<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;real(real4), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intent(inout) :: cd_scale, cd_x_offset,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">cd_y_offset, cd_t_offset<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;character(len=3), &nbsp;&nbsp;intent(inout) :: cd_x_name, cd_y_name,<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">cd_z_name<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;character(len=4), &nbsp;&nbsp;intent(inout) :: cd_t_name<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;character(len=9), &nbsp;&nbsp;intent(inout) :: cd_x_lname, cd_y_lname<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;character(len=13), &nbsp;intent(inout) :: cd_x_units, cd_y_units<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;character(len=33), &nbsp;intent(inout) :: cd_t_units<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!--------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! local variables &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;!--------------------------------------------------------------!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;real(kreal) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: r<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;real(kreal), parameter &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: a = 6378137._kreal &nbsp;&nbsp;&nbsp;&nbsp;!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(WGS 84)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;real(kreal), parameter &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:: b = 6356752.3142_kreal !<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">(WGS 84)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! ellipsoid radius at ATHAM domain start<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r = a*b / sqrt((b*b*(cos(deglat_start*pi/180._kreal))**2<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">)+(a*a*(sin(deglat_start*pi/180._kreal))**2 ))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd_scale &nbsp;&nbsp;&nbsp;= real((1/r) * (180._kreal/pi),real4)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd_x_offset = deglon_start<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd_x_name &nbsp;&nbsp;= 'lon'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd_x_lname &nbsp;= 'longitude'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd_x_units &nbsp;= 'degrees_east '<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd_y_offset = deglat_start<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd_y_name &nbsp;&nbsp;= 'lat'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd_y_lname &nbsp;= 'latitude '<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd_y_units &nbsp;= 'degrees_north'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd_z_name &nbsp;&nbsp;= 'lev'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;coord_t_offset = real((sim_t_hh*3600 + sim_t_mm*60<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">+sim_t_ss),real4)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;coord_t_name &nbsp;&nbsp;= 'date'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;coord_t_units &nbsp;= 'seconds since '//simdate//' 00:00:00 [local]'<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! COARDS conventions require time zone from UTC to be specified<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! not necessary for local area version of ATHAM<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;end subroutine gridconvert<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;! ----------------------------------------------------------------<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> end subroutine netcdf_define<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> !=====================================================================<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">! ======================================================================<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">subroutine handle_err(status,op)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> use atham_module, only : myrank<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> integer, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intent (in &nbsp;&nbsp;) :: status<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> character(len=*), optional, intent (in &nbsp;&nbsp;) :: op<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> if ( status /= nf_noerr ) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;if (myrank==0) then<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, ""<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, "P-NetCDF operation: ",trim(op)<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, trim(nfmpi_strerror(status))<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, "atham_pnetcdf error: program execution stopped"<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print *, ""<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stop<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> &nbsp;&nbsp;&nbsp;end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> end if<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"> return<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">end subroutine handle_err<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">!<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">==============================================================================<br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><font class="Apple-style-span" face="Monaco">end module atham_pnetcdf<br></font></blockquote></blockquote><blockquote type="cite"><font class="Apple-style-span" face="Monaco"><br></font></blockquote><font class="Apple-style-span" face="Monaco"><br></font></div></blockquote></div><br></div></body></html>