Re: Overwrite netcdf variable: fatal:Dimension sizes of left hand side do not match right hand side

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Thu Jan 30 2014 - 12:40:49 MST

Just as a guess: you used wrf_user_getvar to get your 'lu' and 'li' variables, but you only got the first time step, thus reducing the dimensionality of these variables from 3d to 2d. There could be a single element dimension for time (or not) but in any case you need to account for it when you write back to the variables in the file.
You could try:
a->LANDUSEF(0,:,:) =LANDUSEF
a->LU_INDEX(0,:,:) =LU_INDEX
 -dave

On Jan 30, 2014, at 12:22 PM, Tim Baker <cm06tb@leeds.ac.uk> wrote:

> Hi,
>
> I'm trying to overwrite the Landuse and Land index in a WRF geogrid file. I can read in, change and plot the fields but get the following error when trying to overwrite the original file:
>
> fatal:Dimension sizes of left hand side do not match right hand side
> fatal:["Execute.c":7556]:Execute: Error occurred at or near line 138 in file modis_LULIchange_test3_writenc.ncl
>
> As far as I can tell all the dimensions, attributes and coordinates are all the same, although I may be missing something!?
>
> The script is attached and I can upload the geogrid data if needed, any help would be gratefully appreciated.
>
> Regards
> Tim
> --
> Timothy Baker
> Research Postgraduate
> Room 9.157,
> Institute for Climate and Atmospheric Science,
> School of Earth and Environment,
> University of Leeds, Woodhouse Lane,
> Leeds, LS2 9JT, UK.
>
> Tel: 0113 343-5605
> Email: cm06tb@leeds.ac.uk
>
>
>
>
> <modis_LULIchange_test3_writenc.ncl>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jan 30 12:41:00 2014

This archive was generated by hypermail 2.1.8 : Fri Feb 07 2014 - 16:39:11 MST