Changes between Version 2 and Version 3 of Documentation/UserGuide/ExtractPixel


Ignore:
Timestamp:
2018-02-23T16:28:32+01:00 (6 years ago)
Author:
luyssaert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/ExtractPixel

    v2 v3  
    11Sometimes it happens that you are running a simulation over a large spatial area and you have hundreds or thousands of grid points.  If the simulation crashes and you know what pixel is causing the problem, it's nice to be able to use the previous restart file to debug.  How do you convert a restart file with thousands of pixels into a single pixel, though? 
     2 
     3The first problem is of course to know which pixel is causing the crash. The pixel number is easy to find: it is ipts in the code. If your code does not have the following lines of code then paste them right at the start of sechiba_init (this subroutine is only called the first time step so you will have to look in the out_orchidee file of the first time step of your run to find the lat and long of the pixel) 
     4{{{ 
     5! Debug 
     6! It is good to leave this in here.  It is only written out once, 
     7! it takes almost no time, and it's necessary for identifying a  
     8! problem pixel. 
     9DO ipts=1,kjpindex 
     10   WRITE(numout,'(A,I6,10F20.10)') 'pixel number to lat/lon: ',ipts,lalo(ipts,1:2) 
     11ENDDO 
     12!- 
     13}}} 
    214 
    315The answer lies in the tool ncks, which stands for NetCDF Kitchen Sink.  In English, the expression "I brought everything but the kitchen sink" means that I brought absolutely everything with me.  ncks is a bit similar; it's a tool that does almost everything NetCDF related, according to the authors.