30 | | The strategy to adapt the driver needs to ensure that what works today continues to work. It also needs to limit the work needed to adapt existing netCDF forcing files. |
| 30 | The strategy to adapt the driver needs to ensure that what works today continues to work. It also needs to limit the work required to adapt existing netCDF forcing files. |
| 31 | |
| 32 | We propose to add to the netCDF files a scalar information on the height of the 2 types of atmospheric variables (scalar : T, Q and vector : wind). This can be done easily with the following type of script : |
| 33 | |
| 34 | Creat a cdf file (levels.cdf) of the following type : |
| 35 | {{{ |
| 36 | netcdf filename { |
| 37 | dimensions: |
| 38 | lev = 1 ; |
| 39 | variables: |
| 40 | float IFSHybSigA(lev) ; |
| 41 | IFSHybSigA:long_name = "hybrid level at layer midpoints" ; |
| 42 | IFSHybSigA:title="hyam (mlev=hyam+hybm*aps)"; |
| 43 | float IFSHybSigB(lev) ; |
| 44 | IFSHybSigB:long_name = "hybrid level at layer midpoints" ; |
| 45 | IFSHybSigB:title="hybm (mlev=hyam+hybm*aps)"; |
| 46 | data: |
| 47 | IFSHybSigA = 0.0 ; |
| 48 | IFSHybSigB = 0.998815059661865 ; |
| 49 | } |
| 50 | }}} |
| 51 | |
| 52 | Then have a small script when generates the netCDF file (levels.nc) and adds the variables to an existing forcing file : |
| 53 | {{{ |
| 54 | ncgen -o levels.nc levels.cdf |
| 55 | ncks -A -v IFSHybSigA,IFSHybSigB levels.nc My_ORCHIDEE_Forcing_2012.n |
| 56 | }}} |
| 57 | |
| 58 | This scalar information can either be of 3 types : |
| 59 | |
| 60 | 1. Sigma level height : This allows then to compute the actual height given the surface pressure. |
| 61 | |
| 62 | 2. Hybrid sigma levels (as in the example above) : Also given surface pressure we can compute the height. |
| 63 | |
| 64 | 3. height in meters : This is the usual way we get forcing data. |
| 65 | |
| 66 | Following a convention readdim2.f90 will check for the presence of either one of the 3 above listed cases. |
| 67 | |
| 68 | If one of the cases is found in the forcing file, forcing_just_read will compute the height directly after reading surface pressure. |
| 69 | |
| 70 | If none of the above cases is found, the variables '''HEIGHT_LEV1''' and '''HEIGHT_LEVW''' found in run.def will be used to fill the global fields. |