[MITgcm-devel] add warning to ini_curvilinear_grid.F

An Nguyen antnguyen13 at gmail.com
Thu Oct 13 17:41:19 EDT 2016


Hello,

We have several existing setups that use

#define OLD_GRID_IO

and for this to be read in properly, I believe it needs to be compiled with package mdsio , because in 
ini_curvilinear_grid.F , starting on line #72, we call READ_REC_3D_RS or some variations of read_rec.F to read the grid in.
If one traces further inside pkg/rw/read_rec.F, we can see that nothing will be read in unless msdio is defined:

66	#ifdef ALLOW_MDSIO
67	      CALL MDS_READ_FIELD(
68	     I                     fName, readBinaryPrec, useCurrentDir,
69	     I                     fType, nNz, 1, nNz,
70	     O                     dummyRL, field,
71	     I                     iRec, myThid )
72	#endif


As a result, your grid would simply be all zeros as defined in ini_grid.F.  There is currently no warning or stop, so the model would continue forward with all zeros as the horizontal grid.

Would be it appropriate to modify ini_curvilinear_grid.F such that everything between line #73 and #194 is wrapped around an additional ifdef block:

#ifdef ALLOW_MDSIO
#else
  print out error
  stop
#endif

I see that this is done for the block of reading new grid 'mitgrid':
280	#ifdef ALLOW_MDSIO
....
342	#else /* ALLOW_MDSIO */
343	        WRITE(msgBuf,'(2A)')
344	     &   'INI_CURVILINEAR_GRID: Needs to compile MDSIO pkg'
345	        CALL PRINT_ERROR( msgBuf, myThid )
346	        STOP 'ABNORMAL END: S/R INI_CURVILINEAR_GRID'
347	#endif /* ALLOW_MDSIO */

and I think it should be extended to when OLD_GRID_IO is used as well.

An
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20161013/389ed496/attachment-0001.htm>


More information about the MITgcm-devel mailing list