[MITgcm-support] defining my own xx_gentim2d_weight file

gael forget gforget at mit.edu
Thu Nov 27 08:09:15 EST 2014


Hi Dan,
there is an example @
http://mitgcm.org/viewvc/MITgcm/MITgcm_contrib/gael/verification/global_oce_cs32/results/output_adm.txt?view=markup
See the ‘data.ctrl' and 'control vector configuration’ portion.
Cheers,
Gael

On Nov 27, 2014, at 5:41 AM, Daniel Goldberg <dngoldberg at gmail.com> wrote:

> Hi Gael
> 
> I have asked about the xx_gentim2d_weight and xx_genarr2d_weight files before, but that was because I wanted not to define them. Now, however, I would like to actually use them to weight the gradient data when packing for M1QN3.
> 
> I might have misunderstood their purpose before. My understanding is that if I use the genarr2d control with size=2, then i would define in data.ctrl:
> 
> xx_genarr2d_weight='weightfile1','weightfile2'
> 
> and then in the run directory i would provide binary files weightfile1.bin and weightfile2.bin. These binary files would be the size of the grid, and would contain the weight I want to attach to the corresponding gradient entry.
> 
> however, while these files are read, I am finding this is not the case -- and I'm not sure if I understand the point of the xx_genarr2d_weight parameter array -- or else I'm not sure I am constructing the binary files correctly. 
> 
> for instance, say my grid is Nx=100,Ny=100. For genarr2d control #1, I would like to weight the gradient by 2x for i.le.50, and by 0.5x for i.gt.50. My understanding is that I would create a file via
> 
> q=zeros(100,100); q(1:50,:) = 2; q(51:100,:)=0.5;
> fid=fopen('weightfile1.bin','w','b'); fwrite(fid,q,'real*8'); fclose(fid);
> 
> and then place weightfile1.bin in the run directory. However, by inspection of ctrl_set_xy_pack.F, I can see that the weightFld2D array does not populate with the values I would expect, and I am not sure why. 
> 
> Is there an example in verification/ of a weighttype being used, with an nonconstant weight field being set via file?
> 
> Many thanks
> Dan 
> 
> -- 
> 
> Daniel Goldberg, PhD
> Lecturer in Glaciology
> School of Geosciences, University of Edinburgh
> Geography Building, Drummond Street, Edinburgh EH8 9XP
> 
> 
> em: Dan.Goldberg at ed.ac.uk
> web: http://ocean.mit.edu/~dgoldberg
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20141127/7ea68565/attachment.htm>


More information about the MITgcm-support mailing list