Mohid Ocean Downscalling
From MohidWiki
Contents
Download
NOOA/GFS
To download GFS model solution go to http://nomads.ncdc.noaa.gov/cgi-bin/ncdc-ui/define-collection.pl?model_sys=gfs4&model_name=gfs&grid_name=4. Then select date range(Ex.: 2013 April 15 To 2013 April 20), select cycles (Ex.: 0000), select forecast hours (Ex.: 003 006 009 012 015 018 021 024). Press Submit Data request button and Press Selected Files for FTP. On the Filename Filter Type “*.grb2” and press Select files button. Then select the levels desired and at FTP Information, type your email and press the start FTP button. This will place the files in the ftp for download.
NOTES : This is a 24 hour period with all the necessary properties for Mohid, the best forecast for each day in the range. The 000 output is neglected because some properties are 3 hour average, for instance “downward solar radiation” isn’t present. For this 000 is subtracted and the 024 added.
MyOcean
To download my ocean solution go to http://www.myocean.eu/. and click in ACCES THE CATALOGUE. In block 1 choose "Global Ocean", in 2 the parameters and in 3 choose forecast products. After fill all the blocks click search and in the next web page choose DATA ACCES and then GO. Prescribe the user name and password and then choose the dates and area of interest.
RTOFS
To download te RTOFS global model solution go to http://polar.ncep.noaa.gov/global/data_access.shtml or http://nomads.ncep.noaa.gov:9090/dods/rtofs. The download in the second one is made via opendap. select the product and thenclick in download data.
Conversion
Bathymetry transition
Running tool SmoothBathymNesting.exe
Example of the input file SmoothBathymNesting.dat
! File bathymetry of the external 3D solution FATHER_BATIM : !Bathymetry File of MOHID solution SON_BATIM : !New Bathymetry File NEW_SON_BATIM : <begin_coef> NAME : generic property !Name of generic property INITIALIZATION_METHOD : sponge !Type of initialization used DEFAULTVALUE : 1 !0-external 3D solution, 1-MOHID solution SPONGE_OUT : 0 SPONGE_CELLS : 10 !sponge cells number SPONGE_EVOLUTION : 2 !1-exponential, 2-linear <end_coef>
grib-netcdf-hdf5
Step 1: Grib to NetCDF
To convert grib files to NetCDF files create a batch file and write the follow comand line "java -Xmx1024m -classpath netcdfAll-4.3.jar ucar.nc2.dataset.NetcdfDataset -in gfs_4_20130415_0000_003.grb2 -out gfs_4_20130415_0000_003.nc > NCDumpLog.txt". The inpu file must be in the same folder of batch file
Step 2: NetCDF ro HDF5
Running tool ConversionHDF5.exe
Example of the file ConvertToHDF5.dat (GFS Data)
<begin_file> ACTION : CONVERT NETCDF CF TO HDF5 MOHID HDF5_OUT : 1 OUTPUTFILENAME : outfile.hdf5 NETCDF_OUT : 1 OUTPUT_NETCDF_FILE : outfile.nc
WINDOW_OUT : 1173 1323 1428 1643 !is optional but is usefull to generate smaller area for interpolation <<begin_time>> NETCDF_NAME : time <<end_time>>
<<begin_grid>> NETCDF_NAME_LAT : lat NETCDF_NAME_LONG : lon NETCDF_NAME_MAPPING : Temperature_height_above_ground MAPPING_LIMIT : -10000 <<end_grid>>
PROPERTIES_NUMBER : 8
<<begin_field>> NETCDF_NAME : u-component_of_wind_height_above_ground NAME : wind velocity X UNITS : m/s DESCRIPTION : MOHID DIM : 2 <<end_field>>
<<begin_field>> NETCDF_NAME : v-component_of_wind_height_above_ground NAME : wind velocity Y UNITS : m/s DESCRIPTION : MOHID DIM : 2 <<end_field>>
<<begin_field>> NETCDF_NAME : wind_modulus NAME : wind modulus UNITS : m/s DESCRIPTION : MOHID DIM : 2 VECTOR_INTENSITY : 1 VECTOR_X : wind velocity X VECTOR_Y : wind velocity Y <<end_field>>
<<begin_field>> NETCDF_NAME : Temperature_height_above_ground NAME : air temperature UNITS : oC DESCRIPTION : MOHID DIM : 2 ADD_FACTOR : -273 <<end_field>>
<<begin_field>> NETCDF_NAME : Total_precipitation_surface_3_Hour_Accumulation NAME : precipitation UNITS : mm/h DESCRIPTION : MOHID DIM : 2 <<end_field>>
<<begin_field>> NETCDF_NAME : Relative_humidity_height_above_ground NAME : relative humidity UNITS : - DESCRIPTION : MOHID DIM : 2 MULTIPLY_FACTOR : 0.01 <<end_field>>
<<begin_field>> NETCDF_NAME : Downward_Short-Wave_Radiation_Flux_surface_3_Hour_Average NAME : solar radiation UNITS : W/m^2 DESCRIPTION : MOHID DIM : 2 <<end_field>>
<<begin_field>> NETCDF_NAME : Pressure_reduced_to_MSL_msl NAME : atmospheric pressure UNITS : pa DESCRIPTION : Malaca DIM : 2 <<end_field>>
<<begin_input_files>> !path to the input files <<end_input_files>> <end_file>
Example of the file ConvertToHDF5.dat (RTOFS or MyOcean Data)
<begin_file> ACTION : CONVERT NETCDF CF TO HDF5 MOHID HDF5_OUT : 1 OUTPUTFILENAME : 20130416_rtofs_glo_3dz_nowcast_daily.hdf5 NETCDF_OUT : 1 OUTPUT_NETCDF_FILE : rtofs_glo_3dz_nowcast_daily.nc
WINDOW_OUT : 1173 1323 1428 1643 !is optional but is usefull to generate smaller area for interpolation
<<begin_time>> NETCDF_NAME : time <<end_time>>
<<begin_grid>> NETCDF_NAME_LAT : lat NETCDF_NAME_LONG : lon STARTS_180W : 0 NETCDF_NAME_MAPPING : temperature MAPPING_LIMIT : 1.2676506E29 MAPPING_INSTANT : 2 NETCDF_NAME_DEPTH : lev INVERT_LAYER_ORDER : 1 BATHYM_FROM_MAP : 1 BATHYM_FILENAME : Batim_rtofs_glo_3dz_nowcast_daily.dat <<end_grid>>
PROPERTIES_NUMBER : 5
<<begin_field>> NETCDF_NAME : temperature NAME : temperature UNITS : ºC DESCRIPTION : MOHID DIM : 3 <<end_field>>
<<begin_field>> NETCDF_NAME : salinity NAME : salinity UNITS : psu DESCRIPTION : MOHID DIM : 3 <<end_field>> <<begin_field>> NETCDF_NAME : u NAME : velocity U UNITS : m/s DESCRIPTION : MOHID DIM : 3 <<end_field>>
<<begin_field>> NETCDF_NAME : v NAME : velocity V UNITS : m/s DESCRIPTION : MOHID DIM : 3 <<end_field>>
<<begin_field>> NETCDF_NAME : velocity_modulus NAME : velocity modulus UNITS : m/s DESCRIPTION : MOHID DIM : 3 VECTOR_INTENSITY : 1 VECTOR_X : velocity U VECTOR_Y : velocity V <<end_field>>
<<begin_input_files>> !path to the input files <<end_input_files>>
<end_file>
Interpolation
z-level to MOHID geo
Running tool ConversionHDF5.exe
Example of the file ConvertToHDF5.dat (GFS to MOHID bathymetry)
This example perform linear horizontally interpolation (e.g., 2D) between GFS grid data and MOHID
<begin_file>
ACTION : INTERPOLATE GRIDS
TYPE_OF_INTERPOLATION : 1 !Option 1 is bilinear and 3 triangulation
INTERPOLATION3D : 0
FATHER_FILENAME : ..\outdata\GFS_2011010100_2011011621.hdf5 FATHER_GRID_FILENAME : batim\GFS.dat
OUTPUTFILENAME : ..\outdata\Batim_Caribe_Colombia_5km.hdf5 NEW_GRID_FILENAME : batim\Batim_Caribe_Colombia_5km_GFS.dat
EXTRAPOLATE_2D : 4 EXTRAPOLATE_LIMIT : -10000 <end_file>
Running tool ConversionHDF5.exe
Example of the file ConvertToHDF5.dat (RTOFS/MyOcean to MOHID bathymetry)
This example perform 2D horizontal and 3D vertical interpolation between RTOFs/MyOcean grid data and MOHID
<begin_file>
ACTION : INTERPOLATE GRIDS
TYPE_OF_INTERPOLATION : 1
FATHER_FILENAME : ..\conv\MyOcean3D.hdf5 FATHER_GRID_FILENAME : ..\conv\MyOceanMaxDepth.dat
OUTPUTFILENAME : Level2_MyOcean_13-04_27-04_2013.hdf5 START : 2013 04 12 12 0 0 END : 2013 04 27 12 0 0
NEW_GRID_FILENAME : Level2_.new FATHER_GEOMETRY : ..\conv\MyOceanGeometry.dat
NEW_GEOMETRY : geometry_1.dat
INTERPOLATION3D : 1 POLI_DEGREE : 1 DO_NOT_BELIEVE_MAP : 0 EXTRAPOLATE_2D : 4 <end_file>
Boundary conditions
Open boundary
The methodology used in MOHID for the Open Boundary Conditions (OBC) is similar to the one presented by Marchesiello et al. (2001). A Flow Relaxation Scheme (FRS) applied to temperature (T), salinity (S) and velocities (U, V) (Martinsen and Engedahl, 1987) is combined with a radiation scheme from Flather (1976) for the barotropic mode.
Sample for the hydrodynamic module:
IMPOSE_INVERTED_BAROMETER : 1
RADIATION : 2 LOCAL_SOLUTION : 7 ! there is 7 options for define loca solution see InvertedBarometer SUBMODEL : 1 MISSING_NULL : 1 SUBMODEL_EXTRAPOLATE : 1
Surface
To impose surface boundary conditions (e.g., wind stress, solar radiation, temperature, pressure etc.) in atmosphere module an example of the file is provided below.
OUTPUT_TIME : 0. 3600.
<begin_rugosity> INITIALIZATION_METHOD : CONSTANT DEFAULTVALUE : 0.0025 <end_rugosity>
<beginproperty> NAME : wind velocity X UNITS : m/s DESCRIPTION : wind velocity X interpolated from GFS model field DEFAULTVALUE : 0. FILE_IN_TIME : HDF FILENAME : ..\..\..\GeneralData\GFS\Abril2013\Level2_10-04-2013_25-04-2013.hdf5 TIME_SERIE : 0 OUTPUT_HDF : 1 <endproperty>
<beginproperty> NAME : wind velocity Y UNITS : m/s DESCRIPTION : wind velocity Y interpolated from GFS model field DEFAULTVALUE : 0. FILE_IN_TIME : HDF FILENAME : ..\..\..\GeneralData\GFS\Abril2013\Level2_10-04-2013_25-04-2013.hdf5 OUTPUT_HDF : 1 <endproperty>
<beginproperty> NAME : air temperature UNITS : ºC DESCRIPTION : Temperature interpolated from GFS model field DEFAULTVALUE : 15. FILE_IN_TIME : HDF FILENAME : ..\..\..\GeneralData\GFS\Abril2013\Level2_10-04-2013_25-04-2013.hdf5 TIME_SERIE : 0 OUTPUT_HDF : 1 <endproperty>
<beginproperty> NAME : solar radiation UNITS : W/m^2 DESCRIPTION : Solar radiation interpolated from GFS model field DEFAULTVALUE : 0.0 FILE_IN_TIME : HDF FILENAME : ..\..\..\GeneralData\GFS\Abril2013\Level2_10-04-2013_25-04-2013.hdf5 TIME_SERIE : 0 REMAIN_CONSTANT : 0 OUTPUT_HDF : 1 <endproperty>
<beginproperty> NAME : atmospheric pressure UNITS : Pa DESCRIPTION : Atmospheric pressure interpolated from GFS model field DEFAULTVALUE : 0. FILE_IN_TIME : HDF FILENAME : ..\..\..\GeneralData\GFS\Abril2013\Level2_10-04-2013_25-04-2013.hdf5 OUTPUT_HDF : 0 <endproperty>
<beginproperty> NAME : relative humidity UNITS : fraction DESCRIPTION : Constant value DEFAULTVALUE : 0.55 TIME_SERIE : 0 OUTPUT_HDF : 1 <endproperty>
<beginproperty> NAME : cloud cover UNITS : % DESCRIPTION : Constant value DEFAULTVALUE : 50. TIME_SERIE : 0 OUTPUT_HDF : 1 <endproperty>
Sensible/latent heat is computed in Module InterfaceWaterAir based in the atmospheric parameters (e.g.,wind stress, solar radiation, temperature, pressure etc.) prescribed in the atmosphere module. An example of the file is provided below.
OUTPUT_TIME : 0. 3600.
<begin_rugosity> INITIALIZATION_METHOD : CONSTANT DEFAULTVALUE : 0.0025 REMAIN_CONSTANT : 0 <end_rugosity>
<beginproperty> NAME : wind shear velocity UNITS : m/s DESCRIPTION : Computed wind shear velocity FILE_IN_TIME : NONE REMAIN_CONSTANT : 0 DEFAULTVALUE : 0. TIME_SERIE : 0 OUTPUT_HDF : 0 <endproperty>
<beginproperty> NAME : wind stress X UNITS : N/m2 DESCRIPTION : Computed wind stress X FILE_IN_TIME : NONE REMAIN_CONSTANT : 0 TIME_SERIE : 0 DEFAULTVALUE : 0. DEFINE_CDWIND : 0 OUTPUT_HDF : 0 <endproperty>
<beginproperty> NAME : wind stress Y UNITS : N/m2 DESCRIPTION : Computed wind stress Y FILE_IN_TIME : NONE REMAIN_CONSTANT : 0 TIME_SERIE : 0 DEFAULTVALUE : 0. DEFINE_CDWIND : 0 OUTPUT_HDF : 0 <endproperty>
<beginproperty> NAME : latent heat UNITS : W/m^2 DESCRIPTION : Computed latent heat FILE_IN_TIME : NONE REMAIN_CONSTANT : 0 DEFAULTVALUE : 0. TIME_SERIE : 0 OUTPUT_HDF : 0 <endproperty>
<beginproperty> NAME : sensible heat UNITS : W/m^2 DESCRIPTION : Computed sensible heat FILE_IN_TIME : NONE REMAIN_CONSTANT : 0 DEFAULTVALUE : 0. TIME_SERIE : 0 OUTPUT_HDF : 0 <endproperty>
<beginproperty> NAME : surface radiation UNITS : W/m^2 DESCRIPTION : Computed infrared radiation ALBEDO : 0.05 FILE_IN_TIME : NONE REMAIN_CONSTANT : 0 DEFAULTVALUE : 0. TIME_SERIE : 0 OUTPUT_HDF : 0 <endproperty>
<beginproperty> NAME : net long wave radiation UNITS : W/m^2 DESCRIPTION : Computed net long wave radiation FILE_IN_TIME : NONE REMAIN_CONSTANT : 0 DEFAULTVALUE : 0. TIME_SERIE : 0 OUTPUT_HDF : 0 <endproperty>
<beginproperty> NAME : downward long wave radiation UNITS : W/m^2 DESCRIPTION : Computed downward long wave radiation FILE_IN_TIME : NONE REMAIN_CONSTANT : 0 DEFAULTVALUE : 0. TIME_SERIE : 0 OUTPUT_HDF : 0 <endproperty>
<beginproperty> NAME : downward long wave radiation UNITS : W/m^2 DESCRIPTION : Computed downward long wave radiation FILE_IN_TIME : NONE REMAIN_CONSTANT : 0 DEFAULTVALUE : 0. TIME_SERIE : 0 OUTPUT_HDF : 0 <endproperty>
<beginproperty> NAME : upward long wave radiation UNITS : W/m^2 DESCRIPTION : Computed upward long wave radiation FILE_IN_TIME : NONE REMAIN_CONSTANT : 0 DEFAULTVALUE : 0. TIME_SERIE : 0 OUTPUT_HDF : 0 <endproperty>
<beginproperty> NAME : non solar flux UNITS : W/m^2 DESCRIPTION : Computed infrared radiation FILE_IN_TIME : NONE REMAIN_CONSTANT : 0 DEFAULTVALUE : 0. TIME_SERIE : 0 OUTPUT_HDF : 0 <endproperty>
Iinital condition and Spin up
For the spin-up procedure, a methodology based on a slow connection of the forcing terms (baroclinic force, windstress) is used. This methodology consists of defining an initial condition where the initial fields of salinity and temperature are interpolated from the external 3D solution (MyOcean or RTOFS), a null velocity field is assumed, and a SSH field with null gradient is also considered. A coefficient that varies linearly between 0 and 1 along the “connection” period of 5 days is multiplied by the baroclinic force and wind stress. Because the forces are slowly connected, the velocity reference solution of the OBC also needs to be slowly connected. The nudging term in the momentum equation is multiplied by a coefficient C given by:
In this way, the velocity field near the boundary also converges slowly to the reference solution. To minimize the perturbations suffered by the initial condition of salinity and temperature along the spin-up period, a relaxation period variable in time was also assumed for these properties. The idea is to assume a relaxation period that increases with time; this way, in the beginning of the run the temperature and salinity fields have a stronger nudging when the external and internal activity is more intense due to the spin-up process. In the end of the spin-up period, the nudging in the model interior (out of the FRS area) is null. For the forces, a connection coefficient was assumed with a linear evolution over 5 days. For the reference solution a quadratic evolution was imposed. For the slow connection of the forcing mechanisms, the methodology followed by Mellor (2004) for the baroclinic force was assumed. This evolution allows, in the first instants, a strong nudging across the entire domain. With time, the model tends to be free except in the flow relaxation scheme area.
Slow connection of tide, wind, pressure an baroclinic force in the hydrodynamic file:
SLOWSTART : 86400 TIDE : 1 TIDEPOTENTIAL : 1
RAMP : 1 RAMP_PERIOD : 259200
WIND : 2 WIND_SMOOTH_PERIOD : 259200
ATM_PRESSURE : 1 ATM_PERIOD : 259200
FLATHER_COLD_PERIOD : 432000
Initial condition for salinity and temperature in waterproperties file:
OUTPUT_TIME : 0 10800 SURFACE_OUTPUT_TIME : 0 900
ADV_METHOD_H : 4 ADV_METHOD_V : 4 TVD_LIMIT_H : 4 TVD_LIMIT_V : 4 VOLUME_RELATION_MAX : 1.3
<beginproperty> NAME : salinity UNITS : ºC DESCRIPTION : MyOcean Interpolated results DEFAULTVALUE : 34.895 OLD : 1 TYPE_ZUV : z INITIALIZATION_METHOD : HDF FILENAME : ..\..\..\GeneralData\MyOcean\Level2_MyOcean_13-04_27-04_2013.hdf5 ADVECTION_DIFFUSION : 1 DATA_ASSIMILATION : 1 BOUNDARY_CONDITION : 4 OUTPUT_HDF : 1 OUTPUT_SURFACE_HDF : 1 <endproperty>
<beginproperty> NAME : temperature UNITS : ºC DESCRIPTION : MyOcean Interpolated results DEFAULTVALUE : 16. OLD : 1 TYPE_ZUV : z INITIALIZATION_METHOD : HDF FILENAME : ..\..\..\GeneralData\MyOcean\Level2_MyOcean_13-04_27-04_2013.hdf5 ADVECTION_DIFFUSION : 1 SURFACE_FLUXES : 1 DATA_ASSIMILATION : 1 BOUNDARY_CONDITION : 4 OUTPUT_HDF : 1 OUTPUT_SURFACE_HDF : 1 <endproperty>