<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Dear WRF users,</p>
<p><br>
</p>
<p>I have a weird behaviour in WRF.</p>
<p>It seems that when variables are passed from a routine to a subroutine, the variables are always declared with the memory indices.</p>
<p>And even though these variables may not be staggered, they are always declared from the start index to the end index (without any "-1" anywhere).</p>
<p><br>
</p>
<p>I have created a module in order to load values from an external netcdf file into WRF. The variable that I'm loading is unstaggered on the vertical.
<br>
</p>
<p>Strangely enough, it seemed to be loaded properly when I declared the variable for dimension kms:kme-1, but it fails if I try to declare it as I would do for any other variable (for dimension kms:kme).</p>
<p>Am I missing anything? It really doesn't make sense...</p>
<p><br>
</p>
<p>Here is an extract of the subroutine I added:<br>
</p>
<p><br>
</p>
<p></p>
<div> SUBROUTINE compute_target_profiles ( ...... T_target_prof ..... )<br>
......<br>
<span> REAL, DIMENSION( kms:kme ) , INTENT(OUT) :: T_target_prof<br>
......<br>
<span> status_d = nf90_get_var(ncid, T_VarId, T_target_prof)</span><br>
......<br>
<span>DO k = kts , kte</span><br>
<div> DO j = jts, min(jte,jde-1) !jts , jte ! jts, min(jte,jde-1)<br>
DO i = its, min(ite,ide-1)</div>
<div> <span>dU_2_strong_nudging(k) = - ( var_hor_average(k) - U_target_prof(k) )</span><br>
.......<br>
<span></span></div>
<br>
<br>
</span><br>
Thank you so much if you have any explanation or suggestion.<br>
<br>
Maxime.<br>
</div>
<br>
<p></p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p><font color="black" size="3" face="Calibri,Arial,Helvetica,sans-serif"></font></p>
<font color="black" size="3" face="Calibri,Arial,Helvetica,sans-serif">
<pre style="margin-top:14pt; margin-bottom:14pt"><font size="2" face="Candara,sans-serif"><span style="font-size:9pt">Maxime Colin</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"> <br>---------------------------------------------</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"> <br>PhD candidate</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"> <br>Climate Change Research Centre & ARC Centre of Excellence for Climate</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"> System Science, UNSW, Australia</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"> <br>and</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"> Laboratoire de Météorologie Dynamique, UPMC, France</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"> </span></font><br><a href="http://www.ccrc.unsw.edu.au/ccrc-team/students/maxime-colin" target="_blank" id="LPNoLP"><span id="LPNoLP"><font size="2" face="Candara,sans-serif"><span style="font-size:9pt">http://www.ccrc.unsw.edu.au/ccrc-team/students/maxime-colin</span></font></span></a><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"> </span></font><br><a href="http://www.climatescience.org.au/staff/profile/mcolin" target="_blank" id="LPNoLP"><span id="LPNoLP"><font size="2" face="Candara,sans-serif"><span style="font-size:9pt">http://www.climatescience.org.au/staff/profile/mcolin</span></font></span></a><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"> <br>---------------------------------------------</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"> <br>+61 (0)421 620 779 / +33 (0)6 25 57 81 93</span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"> </span></font><font size="2" face="Candara,sans-serif"><span style="font-size:9pt"><br>m.colin@unsw.edu.au / </span></font><a href="https://www.normalesup.org/phare/squirrelmail/src/compose.php?send_to=maxime.colin%40normalesup.org" target="_blank" id="LPNoLP"><span id="LPNoLP"><font size="2" face="Candara,sans-serif"><span style="font-size:9pt">colinmaxime@hotmail.fr</span></font></span></a></pre>
</font><br>
<p></p>
</div>
</div>
</div>
</body>
</html>