I don't know the answer to your question about the size limit for the <values>
tag, but there is another way to solve your problem..
You can write your lon,lat values to a netcdf file, and then use a union
aggregation to create a dataset that virtually joins that netcdf file to another netcdf file (or aggregation of netcdf files)
For example, if you have a bunch of files like:
mod_his_0001.nc
mod_his_0002.nc
...
that you want to aggregate along the time
dimension and you create a netcdf file that contains the lon,lat variables:
lonlat.nc
you can aggregate them together like so:
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
<!-- union the (1) time aggregation with the (2) grid file -->
<aggregation type="union">
<!-- (1) time aggregate files like "mod_his_0001.nc" -->
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2">
<aggregation dimName="time" type="joinExisting">
<scan
location="/home/baum/models/run01/"
regExp=".*mod_his_[0-9]{4}\.nc$"/>
</aggregation>
</netcdf>
<!-- (2) grid file -->
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"
location="/home/baum/models/lonlat.nc"/>
</aggregation>
</netcdf>