[MITgcm-devel] add warning to ini_curvilinear_grid.F

Jean-Michel Campin jmc at mit.edu
Fri Oct 14 17:40:42 EDT 2016


Hi An,

I agree.
Do you prefer to check-in this fix yourself ?
otherwise I could try sometime next week.

Cheers,
Jean-Michel

On Thu, Oct 13, 2016 at 05:41:19PM -0400, An Nguyen wrote:
> 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

> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel




More information about the MITgcm-devel mailing list