[Wrf-users] When loading a netcdf file into WRF, with which indices should I declare the variable?

Maxime Colin m.colin at unsw.edu.au
Fri Jan 27 03:43:23 MST 2017


Dear WRF users,


I have a weird behaviour in WRF.

It seems that when variables are passed from a routine to a subroutine, the variables are always declared with the memory indices.

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).


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.

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).

Am I missing anything? It really doesn't make sense...


Here is an extract of the subroutine I added:


  SUBROUTINE compute_target_profiles (   ......   T_target_prof ..... )
......
    REAL, DIMENSION( kms:kme ) , INTENT(OUT)    :: T_target_prof
......
    status_d = nf90_get_var(ncid, T_VarId, T_target_prof)
......
DO k = kts , kte
       DO j = jts, min(jte,jde-1)  !jts , jte   ! jts, min(jte,jde-1)
       DO i = its, min(ite,ide-1)
              dU_2_strong_nudging(k) = - ( var_hor_average(k)  - U_target_prof(k) )
.......



Thank you so much if you have any explanation or suggestion.

Maxime.





Maxime Colin
---------------------------------------------
PhD candidate
Climate Change Research Centre & ARC Centre of Excellence for Climate System Science, UNSW, Australia
and Laboratoire de Météorologie Dynamique, UPMC, France
http://www.ccrc.unsw.edu.au/ccrc-team/students/maxime-colin
http://www.climatescience.org.au/staff/profile/mcolin
---------------------------------------------
+61 (0)421 620 779    /    +33 (0)6 25 57 81 93
m.colin at unsw.edu.au    /     colinmaxime at hotmail.fr<https://www.normalesup.org/phare/squirrelmail/src/compose.php?send_to=maxime.colin%40normalesup.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/wrf-users/attachments/20170127/43786b53/attachment.html 


More information about the Wrf-users mailing list