[MITgcm-support] gluemnc

John Pender jgpender at alaska.edu
Mon Aug 13 11:56:51 EDT 2012


Hi Martin-
This system has both 
	nc0/3.9.9 (default)
and
	nc0/4.1.0
I had the same trouble either way.
Take care,
John


On Aug 12, 2012, at 11:04 PM, Martin Losch wrote:

> Hi John,
> 
> probably a version problem of ncrcat? Could you post your version of ncrcat for reference?
> 
> Martin
> 
> On Aug 9, 2012, at 10:28 PM, John Pender wrote:
> 
>> Forgive me if this bug has been reported before.  
>> 
>> THE PROBLEM
>> 
>> I have recently been tasked with configuring mult-processor experiments using latitude and longitude for the horizontal grid as per these lines in input/data.  
>> 
>> # Gridding parameters
>> &PARM04
>> usingCartesianGrid=.FALSE.,
>> usingSphericalPolarGrid=.TRUE.,
>> ygOrigin            = -55,
>> xgOrigin            = 142,
>> delXfile='delXvar',
>> delYfile='delYvar',
>> delRfile='delZvar',
>> /
>> 
>> The model is configured to write netcdf files to disk with mnc package.  This all takes place without error but the utility script that glues all the files for individual processors into a single netcdf file
>> 	MITgcm/utils/scripts/gluemnc
>> wouldn't work, though it worked fine for a Cartesian horizontal grid.
>> 
>> THE SOLUTION
>> 
>> I don't know why, but ncrcat (which is invoked many times in gluemnc) would not accept the ASCII string in the netcdf header that describes the units for the SphericalPolar horizontal grid
>> 
>>>> double X(X) ;
>> 		X:long_name = "longitude of cell center" ;
>> 		X:units = "degrees_east" ;
>> 	double Yp1(Yp1) ;
>> 		Yp1:long_name = "latitude of cell corner" ;
>> 		Yp1:units = "degrees_north" ;
>> ...
>> 
>> For reference, when I use a Cartesian grid the header reads like this:
>> 
>> 	double X(X) ;
>> 		X:long_name = "X-coordinate of cell center" ;
>> 		X:units = "meters" ;
>> 	double Yp1(Yp1) ;
>> 		Yp1:long_name = "Y-Coordinate of cell corner" ;
>> 		Yp1:units = "meters" ;
>> 
>> and gluemnc runs fine, though with lots of non-fatal warning messages.
>> 
>> Faced with fixing ncrcat or modifying MITgcm I chose the latter.  I went to 
>> 	MITgcm/pkg/mnc
>> and modified the file
>> 	mnc_cw_cvars.F
>> so that every instance of 
>> 	degrees_east	and		degrees_north
>> is replaced with simpler ASCII strings
>> 	dE				and		dN
>> 
>> It's not so mnemonic, I know, but it does work.
>> 
>> John
>> 
>> 
>> 
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-support
> 
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list