New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
README.md in NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF – NEMO

source: NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/tests/STATION_ASF/README.md @ 13893

Last change on this file since 13893 was 13893, checked in by laurent, 3 years ago

Improvements and better README for tests/STATION_ASF

File size: 11.6 KB
Line 
1# *Station Air-Sea Fluxes* demonstration case
2
3Last successful test done with NEMOGCM branch: `NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice`, revision `13806`
4
5Author: Laurent Brodeau, 2020
6
7## Objectives
8
9`STATION_ASF` is a demonstration test-case that mimics a (static) in-situ station (buoy, platform) dedicated to the estimation of surface air-sea fluxes by means of *widely-measured* (bulk) meteorological surface parameters.
10
11`STATION_ASF` has been constructed by merging the *single column* and the *standalone surface module* configurations of NEMO. In short, it can be defined as "SAS meets C1D". As such, the spatial domain of `STATION_ASF` is punctual (1D, well actually 3 x 3 as in C1D).
12
13`STATION_ASF` is therefore a versatile tool, and extremely lightweight in terms of computing requirements, to test the different bulk algorithms and cool-skin/warm-layer parameterization options included in NEMO.
14
15As input `STATION_ASF` will require the traditional *bulk* sea surface parameters:
16- Bulk sea surface temperature (SST) at _z<sub>SST</sub>_ meters below the surface
17- Surface current vector
18- Sea surface salinity
19
20as well as the usual surface atmospheric state:
21- air temperature at _z<sub>t</sub>_ meters above the surface
22- air humidity  at _z<sub>t</sub>_ meters above the surface (specific humidity or relative humidity or dew-point temperature)
23- wind speed vector at _z<sub>u</sub>_ meters above the surface
24- Sea level atmospheric pressure (SLP)
25- Downwelling solar radiation
26- Downwelling longwave radiation
27
28
29### Example of diagnostics with `STATION_ASF`
30
31(Generated with script `./EXPREF/plot_station_asf_simple.py`)
32
33![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/01_temperatures_ECMWF.svg)
34
35![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/Cd.svg)
36
37![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/dT_skin.svg)
38
39![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/Qlat.svg)
40
41
42## Physical description
43
44### Important namelist parameters specific to `STATION_ASF`
45
46* ```rn_dept1@namusr_def:``` depth (m) at which the prescribed SST is taken (*i.e.* depth of first T-point); important due to impact on warm-layer estimate, the deeper, the more pronounced!
47
48* ```rn_lat1d,rn_lon1d@namc1d:``` fixed coordinates of the location of the station (buoy, platform, etc).
49
50* ```namsbc_blk:``` to be filled carefully, just as for "C1D", the prescribed surface ATMOSPHERIC state (files) are time series of shape 3x3 in space
51
52* ```namsbc_sas:``` to be filled carefully, just as for "C1D", the prescribed surface OCEAN state (files) are time series of shape 3x3 in space
53
54
55
56## Testing the sanity of the SBCBLK (bulk atmospheric forcing) interface of NEMO
57
58`STATION_ASF` can be used to perform a sanity test of the SBCBLK interface of
59NEMO.  It will test all the bulk-parameterization algorithms using an idealized
60forcing that includes a wide range of *SSX / surface atmospheric state*
61conditions to detect potential error / inconsistencies.  Both a short report and
62boolean output: *passed* or *failed* is provided as an output.
63
64
65### How is the validation test performed ?
66
67Turbulent fluxes and transfer coefficients computed by NEMO with all different bulk parameterizations (via `STATION_ASF`), in all these idealized possible air-sea meteorological states, must be checked against a *supposedly trustable* reference solution, plus/minus a tolerance range not to deviate from (to allow the deviation from the reference inherent to each tested bulk parameterization). This reference solution, and this tolerance, are constructed independently and outside of NEMO. They are based on the mean, and twice the standard deviation, respectively, across all the members (1 member = 1 bulk parameterizations, N=5). This reference solution and tolerance range, just as the idealized input atmospheric and sea-surface forcings, are provided in the same NetCDF file:
68`STATION_ASF/input_data/input_output_VALIDATION_IDEALIZED.nc`
69
70
71### Performing the sanity test
72
73First compile the `STATION_ASF` test-case as follows (compile with xios-2.5 support → check your ARCH file):
74
75```./makenemo -a STATION_ASF -m <your_arch> -n STATION_ASF2 -j 4```
76
77(successful compilation generates ```tests/STATION_ASF2/BLD/bin/nemo.exe```
78
79Move to: ```tests/STATION_ASF/SANITY_CHECK/```
80
81There, in script ``sanity_check_SBCBLK.sh``, double check that the variables given a value in the first lines are consistent with your setup (it should).
82
83Launch the script:
84
85    $ ./sanity_check_SBCBLK.sh
86
87
88The report is both interactively shown in the standard output and spawned in the report file:
89
90- `SBCBLK.success` the test passed :)
91- `SBCBLK.fail` the test failed :(
92
93In case of failure, read the rapport to know which algorithm/computed variables did not pass the test... You should also re-run the script `sanity_check_SBCBLK.sh` with the "more" argument:
94
95    $ ./sanity_check_SBCBLK.sh more
96
97 This will generate more output such as figure of time series for the tested variables.
98
99### Dependencies
100
101In order for the python script `analyze_output.py` to work, you need `Python 3` with the following modules:
102- NumPy
103- netCDF4
104- (Matplotlib)
105
106### Example of the report for a successful test
107
108
109    ############ FINAL REPORT ############
110
111     ***** Algorithm "ECMWF" PASSED sanity check !!!
112
113     ***** Algorithm "NCAR" PASSED sanity check !!!
114
115     ***** Algorithm "COARE3p0" PASSED sanity check !!!
116
117     ***** Algorithm "COARE3p6" PASSED sanity check !!!
118
119     ***** Algorithm "ANDREAS" PASSED sanity check !!!
120
121     Test performed on the following NEMO prognostic variables:
122      ==> qsb_oce, qla_oce, qlw_oce, taum, Cd_oce, Ce_oce
123
124       ####################################
125       ###    TEST PASSED FOR SBCBLK !  ###
126       ####################################
127
128
129
130## Playing with `STATION_ASF`
131
132
133### Input forcing files to test STATION ASF
134
135By default, `STATION_ASF` comes with two forcing sets:
136
137* The `PAPA` forcing is an "open-ocean-only" hourly forcing, that corresponds to a real off-shore platform, the PAPA station (North-East Pacific, 50°N, 145°W). Hence the data provided for the PAPA test is actual data measured by the PAPA station.
138
139* The `ERA5_NorthGreenland` forcing simulates a *virtual station* as it is extracted from the ECMWF ERA5 reanalysis right north of Greenland (84°N,36°W). This forcing is also hourly and allows for `STATION_ASF` to be used with sea-ice support as this particular location is ice-covered year-round.
140
141
142#### `PAPA` forcing
143
144One full year (2018) of processed hourly data from the PAPA station (buoy) are found in the 3 following files (found in `tests/STATION_ASF/input_data`):
145- ```Station_PAPA_50N-145W_atm_hourly_y2018.nc```  → contains hourly surface atmospheric state
146- ```Station_PAPA_50N-145W_precip_daily_y2018.nc``` → contains daily precipitation
147- ```Station_PAPA_50N-145W_oce_hourly_y2018.nc``` → contains hourly sea surface state
148
149For station PAPA (50.1 N, 144.9 W), air temperature and humidity are measured at 2.5 m, the wind speed at 4 m, and the SST at 1 m below the surface, hence the following namelist parameters are given:
150
151    ...
152    &namusr_def
153        rn_dept1 =    1.
154    ...
155    &namc1d
156        rn_lat1d =  50.1
157        rn_lon1d = 215.1
158    ...
159    &namsbc_blk
160        ...
161        rn_zqt = 2.5
162        rn_zu  = 4.
163        ...
164        ln_humi_rlh = .true.  !  humidity in PAPA data is relative humidity  [%]
165        ...
166
167The namelists for the `PAPA` forcing are located into `EXPREF/PAPA/oce/`
168
169
170
171#### `ERA5_NorthGreenland` forcing
172
173The entire forcing is found in one single file: `ERA5_NorthGreenland_surface_84N_-36E_1h_y2018.nc`.
174Since we are dealing with a reanalysis of the ECMWF:
175
176    ...
177    &namusr_def
178        rn_dept1 = 1. ! we assume ECMWF uses a prescribed bulk SST product at the standard depth of 1m...
179    ...
180    &namc1d
181        rn_lat1d =  84.
182        rn_lon1d = 324.
183    ...
184    &namsbc_blk
185        ...
186        rn_zqt =  2.
187        rn_zu  = 10.
188        ...
189        ln_humi_dpt = .true.  !  humidity in ERA5 is dew-point temperature [K]
190        ...
191
192The namelists for the `ERA5_NorthGreenland` forcing are located into `ERA5/oce+ice/` or `ERA5/oce`, depending whether you want to use sea-ice support or not.
193
194
195
196### Compiling and launching STATION_ASF simulations
197
198First compile the test-case as follows (compile with xios-2.5 support → check your ARCH file):
199
200    $ ./makenemo -a STATION_ASF -m <your_arch> -n STATION_ASF2 -j 4
201
202Move to `tests/STATION_ASF/EXPREF/`, there, you can use the script ``launch_sasf.sh`` to launch `STATION_ASF` simulations. You need to adapt the following variable to your environment in the script:
203
204- ```CONFIG_BLD``` : the name of the sub-directory of `tests/` in which `STATION_ASF` has been compiled (default: `CONFIG_BLD="STATION_ASF2"`)
205
206- ```FORCING``` : this is where you pick the forcing you want to use, and wether to use sea-ice support or not (only available for `ERA5_NorthGreenland` forcing)
207
208- ```PROD_DIR``` :  Directory in which the simulation will be installed and run
209
210- ```MPI_LAUNCH```: this is where you can adapt how the `nemo.exe` executable is launched on your system (default: `MPI_LAUNCH="mpirun -n 1"`)
211
212
213Now, it's time to launch simulations:
214
215    $ ./launch_sasf.sh
216
217If everything goes according to plan, ``launch_sasf.sh`` should have generated the 4 following sets of output files into `${PROD_DIR}/output` (example for PAPA forcing, 4 algos tested):
218
219    STATION_ASF-ANDREAS_PAPA_1h_20180101_20181231_gridT.nc
220    STATION_ASF-ANDREAS_PAPA_1h_20180101_20181231_gridU.nc
221    STATION_ASF-ANDREAS_PAPA_1h_20180101_20181231_gridV.nc
222    STATION_ASF-COARE3p6_PAPA_1h_20180101_20181231_gridT.nc
223    STATION_ASF-COARE3p6_PAPA_1h_20180101_20181231_gridU.nc
224    STATION_ASF-COARE3p6_PAPA_1h_20180101_20181231_gridV.nc
225    STATION_ASF-ECMWF_PAPA_1h_20180101_20181231_gridT.nc
226    STATION_ASF-ECMWF_PAPA_1h_20180101_20181231_gridU.nc
227    STATION_ASF-ECMWF_PAPA_1h_20180101_20181231_gridV.nc
228    STATION_ASF-NCAR_PAPA_1h_20180101_20181231_gridT.nc
229    STATION_ASF-NCAR_PAPA_1h_20180101_20181231_gridU.nc
230    STATION_ASF-NCAR_PAPA_1h_20180101_20181231_gridV.nc
231
232
233#### Post-processing and figures
234
235Use the `plot_station_asf_OCE.py` script (Python 3) to generate a multitude of figures that compares the *open ocean* transfer coefficients and fluxes between the 4 algorithms, in our case with the `PAPA` forcing:
236
237    $ ./plot_station_asf_OCE.py -d <PROD_DIR> -f PAPA
238
239Example of a comparison plot:
240![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/Cd_PAPA_open-ocean.svg)
241
242If you have used a forcing with sea-ice support, such as `ERA5_NorthGreenland`, you can do the same for *sea-ice* transfer coefficients and fluxes, which will compare *air-ice* bulk algorithms:
243
244    $ ./plot_station_asf_ICE.py -d <PROD_DIR> -f ERA5_NorthGreenland
245
246Example of a comparison plot:
247![plot](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/figs/Cd_ERA5_NorthGreenland_sea-ice.svg)
248Note: when sea-ice support is enabled, typically by using the following `FORCING` configuration in script `launch_sasf.sh`:
249
250    FORCING="ERA5_NorthGreenland" ; i_sea_ice=1 ; SFORC="ERA5_NorthGreenland_surface_84N_-36E_1h"
251   
252the fact that `i_sea_ice=1` trigers the computation of *air-ice* fluxes with different bulk *air-ice* algorithms, over the remaining open-ocean fraction the same *air-sea* algorithm is used: `ECMWF`.
253
254
255-----------------------
256
257#### TO FINISH, BROKEN !!!
258
259Then, you can fire the Jupyter notebook [`station_asf_notebook.ipynb`](https://github.com/NEMO-ocean/NEMO-examples/blob/master/STATION_ASF/notebook/station_asf_notebook.ipynb) found into the `notebook` directory! In which you should update `cprod_dir` to the same path as `PROD_DIR` of `launch_sasf.sh`...
260
261---
262
263*/Laurent, November 2020.*
264
Note: See TracBrowser for help on using the repository browser.